This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { variantImportant, variantVariables } from "@unocss/preset-mini/variants" | |
| import { Extractor, Rule } from "unocss" | |
| import { defineConfig } from "unocss/vite" | |
| //////////////////////////////////////////////////////////////////////////////// | |
| // Extractors | |
| // TODO: Get URL reference from source | |
| // TODO: Splitting on ' and " break values such as 'tnum' and url("...") | |
| function isValidSelector(selector: string) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* @refresh reload */ | |
| import "./css/reset.scss" | |
| import "./css/duomo.scss" | |
| import "./css/theme.scss" | |
| import * as Solid from "solid-js" | |
| import * as SolidWeb from "solid-js/web" | |
| import * as helpers from "./helpers" | |
| import * as utils from "./utils" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as Solid from "solid-js" | |
| import * as u from "./utils" | |
| import { css } from "./styled" | |
| //////////////////////////////////////////////////////////////////////////////// | |
| type DefaultProps = { | |
| class?: string, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dev: | |
| npx retro dev | |
| build: | |
| npx retro build && cp www/_redirects out/_redirects | |
| serve: | |
| npx retro serve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! Duomo CSS | MIT | https://github.com/zaydek/duomo */*,*:before,*:after{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! Duomo CSS | MIT | https://github.com/zaydek/duomo */ | |
| *, | |
| *::before, | |
| *::after { | |
| box-sizing: border-box; | |
| } | |
| :root { | |
| -moz-tab-size: 4; | |
| tab-size: 4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import create from "zustand" | |
| import createContext from 'zustand/context' | |
| import "./App.css" | |
| //////////////////////////////////////////////////////////////////////////////// | |
| const LOCALSTORAGE_KEY = "zustand-todos" | |
| function getStateLocalStorage() { | |
| const jsonStr = window.localStorage.getItem(LOCALSTORAGE_KEY) // Zero value is `null` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import "./App.css" | |
| //////////////////////////////////////////////////////////////////////////////// | |
| // These are the possible action types our app can emit. | |
| const TOGGLE_TODO = "TOGGLE_TODO" | |
| const CHANGE_TODO = "CHANGE_TODO" | |
| const COMMIT_TODO = "COMMIT_TODO" | |
| const TOGGLE_TODO_BY_ID = "TOGGLE_TODO_BY_ID" | |
| const CHANGE_TODO_BY_ID = "CHANGE_TODO_BY_ID" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function newTodo({ checked, value } = {}) { | |
| const id = Math.random().toString(36).slice(2, 8) | |
| checked ??= false | |
| value ??= "" | |
| return Todo({ | |
| id, | |
| checked, | |
| value, | |
| }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| React.useEffect(() => { | |
| let animationFrame = 0 | |
| function virtualScroller(targets, { offset, topOffset, bottomOffset } = {}) { | |
| offset ??= 0 | |
| topOffset ??= offset ?? 0 | |
| bottomOffset ??= offset ?? 0 | |
| cancelAnimationFrame(animationFrame) | |
| animationFrame = window.requestAnimationFrame(() => { | |
| for (let x = 0, len = targets.length; x < len; x++) { | |
| let target = targets[x] |
NewerOlder