@derelicious/ds 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +147 -2
- package/dist/a2ui/Surface.css +140 -0
- package/dist/a2ui/Surface.css.d.ts +22 -0
- package/dist/a2ui/Surface.css.js +29 -0
- package/dist/a2ui/Surface.d.ts +56 -0
- package/dist/a2ui/Surface.js +1411 -0
- package/dist/a2ui/catalog.d.ts +93 -0
- package/dist/a2ui/catalog.js +1666 -0
- package/dist/a2ui/clientMessages.d.ts +36 -0
- package/dist/a2ui/clientMessages.js +65 -0
- package/dist/a2ui/examples.d.ts +8 -0
- package/dist/a2ui/examples.js +877 -0
- package/dist/a2ui/functions.d.ts +55 -0
- package/dist/a2ui/functions.js +341 -0
- package/dist/a2ui/ids.d.ts +5 -0
- package/dist/a2ui/ids.js +7 -0
- package/dist/a2ui/index.d.ts +16 -0
- package/dist/a2ui/index.js +12 -0
- package/dist/a2ui/jsonl.d.ts +41 -0
- package/dist/a2ui/jsonl.js +127 -0
- package/dist/a2ui/links.d.ts +17 -0
- package/dist/a2ui/links.js +29 -0
- package/dist/a2ui/pointer.d.ts +22 -0
- package/dist/a2ui/pointer.js +85 -0
- package/dist/a2ui/processor.d.ts +126 -0
- package/dist/a2ui/processor.js +497 -0
- package/dist/a2ui/react.d.ts +2 -0
- package/dist/a2ui/react.js +1 -0
- package/dist/a2ui/toTsx.d.ts +9 -0
- package/dist/a2ui/toTsx.js +1389 -0
- package/dist/a2ui/types.d.ts +96 -0
- package/dist/a2ui/validate.d.ts +90 -0
- package/dist/a2ui/validate.js +750 -0
- package/dist/a2ui-catalog.json +4369 -0
- package/dist/a2ui-conformance.json +71 -0
- package/dist/components/Accordion/Accordion.css +58 -0
- package/dist/components/Accordion/Accordion.css.d.ts +5 -0
- package/dist/components/Accordion/Accordion.css.js +10 -0
- package/dist/components/Accordion/Accordion.d.ts +23 -0
- package/dist/components/Accordion/Accordion.docs.d.ts +19 -0
- package/dist/components/Accordion/Accordion.docs.js +43 -0
- package/dist/components/Accordion/Accordion.js +55 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/AiLabel/AiLabel.css +70 -0
- package/dist/components/AiLabel/AiLabel.css.d.ts +8 -0
- package/dist/components/AiLabel/AiLabel.css.js +11 -0
- package/dist/components/AiLabel/AiLabel.d.ts +29 -0
- package/dist/components/AiLabel/AiLabel.docs.d.ts +19 -0
- package/dist/components/AiLabel/AiLabel.docs.js +51 -0
- package/dist/components/AiLabel/AiLabel.js +41 -0
- package/dist/components/AiLabel/index.d.ts +1 -0
- package/dist/components/AiLabel/index.js +1 -0
- package/dist/components/Alert/Alert.css +76 -0
- package/dist/components/Alert/Alert.css.d.ts +9 -0
- package/dist/components/Alert/Alert.css.js +23 -0
- package/dist/components/Alert/Alert.d.ts +21 -0
- package/dist/components/Alert/Alert.docs.d.ts +19 -0
- package/dist/components/Alert/Alert.docs.js +57 -0
- package/dist/components/Alert/Alert.js +55 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.js +1 -0
- package/dist/components/Avatar/Avatar.css +42 -0
- package/dist/components/Avatar/Avatar.css.d.ts +3 -0
- package/dist/components/Avatar/Avatar.css.js +12 -0
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/Avatar/Avatar.docs.d.ts +19 -0
- package/dist/components/Avatar/Avatar.docs.js +43 -0
- package/dist/components/Avatar/Avatar.js +31 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +1 -0
- package/dist/components/Avatar/initials.d.ts +2 -0
- package/dist/components/Avatar/initials.js +8 -0
- package/dist/components/Badge/Badge.css +63 -0
- package/dist/components/Badge/Badge.css.d.ts +5 -0
- package/dist/components/Badge/Badge.css.js +16 -0
- package/dist/components/Badge/Badge.d.ts +15 -0
- package/dist/components/Badge/Badge.docs.d.ts +19 -0
- package/dist/components/Badge/Badge.docs.js +52 -0
- package/dist/components/Badge/Badge.js +24 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css +40 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css.d.ts +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css.js +10 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +17 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.docs.d.ts +19 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.docs.js +38 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +48 -0
- package/dist/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/Breadcrumbs/index.js +1 -0
- package/dist/components/Button/Button.css +101 -0
- package/dist/components/Button/Button.css.d.ts +72 -0
- package/dist/components/Button/Button.css.js +35 -0
- package/dist/components/Button/Button.d.ts +53 -0
- package/dist/components/Button/Button.docs.d.ts +19 -0
- package/dist/components/Button/Button.docs.js +71 -0
- package/dist/components/Button/Button.js +68 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Card/Card.css +122 -0
- package/dist/components/Card/Card.css.d.ts +12 -0
- package/dist/components/Card/Card.css.js +25 -0
- package/dist/components/Card/Card.d.ts +306 -0
- package/dist/components/Card/Card.docs.d.ts +19 -0
- package/dist/components/Card/Card.docs.js +65 -0
- package/dist/components/Card/Card.js +53 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +1 -0
- package/dist/components/ChatMessage/ChatMessage.css +56 -0
- package/dist/components/ChatMessage/ChatMessage.css.d.ts +7 -0
- package/dist/components/ChatMessage/ChatMessage.css.js +15 -0
- package/dist/components/ChatMessage/ChatMessage.d.ts +35 -0
- package/dist/components/ChatMessage/ChatMessage.docs.d.ts +19 -0
- package/dist/components/ChatMessage/ChatMessage.docs.js +45 -0
- package/dist/components/ChatMessage/ChatMessage.js +49 -0
- package/dist/components/ChatMessage/index.d.ts +1 -0
- package/dist/components/ChatMessage/index.js +1 -0
- package/dist/components/Checkbox/Checkbox.css +70 -0
- package/dist/components/Checkbox/Checkbox.css.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.css.js +6 -0
- package/dist/components/Checkbox/Checkbox.d.ts +28 -0
- package/dist/components/Checkbox/Checkbox.docs.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.docs.js +53 -0
- package/dist/components/Checkbox/Checkbox.js +63 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/Code/Code.css +12 -0
- package/dist/components/Code/Code.css.d.ts +1 -0
- package/dist/components/Code/Code.css.js +5 -0
- package/dist/components/Code/Code.d.ts +7 -0
- package/dist/components/Code/Code.docs.d.ts +19 -0
- package/dist/components/Code/Code.docs.js +26 -0
- package/dist/components/Code/Code.js +12 -0
- package/dist/components/Code/index.d.ts +1 -0
- package/dist/components/Code/index.js +1 -0
- package/dist/components/CodeBlock/CodeBlock.css +76 -0
- package/dist/components/CodeBlock/CodeBlock.css.d.ts +12 -0
- package/dist/components/CodeBlock/CodeBlock.css.js +21 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +19 -0
- package/dist/components/CodeBlock/CodeBlock.docs.d.ts +19 -0
- package/dist/components/CodeBlock/CodeBlock.docs.js +47 -0
- package/dist/components/CodeBlock/CodeBlock.js +82 -0
- package/dist/components/CodeBlock/highlight.d.ts +28 -0
- package/dist/components/CodeBlock/highlight.js +118 -0
- package/dist/components/CodeBlock/index.d.ts +1 -0
- package/dist/components/CodeBlock/index.js +1 -0
- package/dist/components/Container/Container.css +21 -0
- package/dist/components/Container/Container.css.d.ts +3 -0
- package/dist/components/Container/Container.css.js +12 -0
- package/dist/components/Container/Container.d.ts +295 -0
- package/dist/components/Container/Container.docs.d.ts +19 -0
- package/dist/components/Container/Container.docs.js +31 -0
- package/dist/components/Container/Container.js +12 -0
- package/dist/components/Container/index.d.ts +1 -0
- package/dist/components/Container/index.js +1 -0
- package/dist/components/Dialog/Dialog.css +94 -0
- package/dist/components/Dialog/Dialog.css.d.ts +9 -0
- package/dist/components/Dialog/Dialog.css.js +17 -0
- package/dist/components/Dialog/Dialog.d.ts +29 -0
- package/dist/components/Dialog/Dialog.docs.d.ts +19 -0
- package/dist/components/Dialog/Dialog.docs.js +50 -0
- package/dist/components/Dialog/Dialog.js +90 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Dialog/index.js +1 -0
- package/dist/components/Divider/Divider.css +41 -0
- package/dist/components/Divider/Divider.css.d.ts +6 -0
- package/dist/components/Divider/Divider.css.js +16 -0
- package/dist/components/Divider/Divider.d.ts +11 -0
- package/dist/components/Divider/Divider.docs.d.ts +19 -0
- package/dist/components/Divider/Divider.docs.js +43 -0
- package/dist/components/Divider/Divider.js +30 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/Grid/Grid.css +11 -0
- package/dist/components/Grid/Grid.css.d.ts +8 -0
- package/dist/components/Grid/Grid.css.js +8 -0
- package/dist/components/Grid/Grid.d.ts +18 -0
- package/dist/components/Grid/Grid.docs.d.ts +19 -0
- package/dist/components/Grid/Grid.docs.js +41 -0
- package/dist/components/Grid/Grid.js +22 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/index.js +1 -0
- package/dist/components/Heading/Heading.css +44 -0
- package/dist/components/Heading/Heading.css.d.ts +3 -0
- package/dist/components/Heading/Heading.css.js +17 -0
- package/dist/components/Heading/Heading.d.ts +298 -0
- package/dist/components/Heading/Heading.docs.d.ts +19 -0
- package/dist/components/Heading/Heading.docs.js +48 -0
- package/dist/components/Heading/Heading.js +20 -0
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Heading/index.js +1 -0
- package/dist/components/Icon/Icon.css +25 -0
- package/dist/components/Icon/Icon.css.d.ts +4 -0
- package/dist/components/Icon/Icon.css.js +13 -0
- package/dist/components/Icon/Icon.d.ts +16 -0
- package/dist/components/Icon/Icon.docs.d.ts +19 -0
- package/dist/components/Icon/Icon.docs.js +56 -0
- package/dist/components/Icon/Icon.js +25 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.js +1 -0
- package/dist/components/IconButton/IconButton.css +70 -0
- package/dist/components/IconButton/IconButton.css.d.ts +57 -0
- package/dist/components/IconButton/IconButton.css.js +27 -0
- package/dist/components/IconButton/IconButton.d.ts +46 -0
- package/dist/components/IconButton/IconButton.docs.d.ts +19 -0
- package/dist/components/IconButton/IconButton.docs.js +48 -0
- package/dist/components/IconButton/IconButton.js +44 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/IconButton/index.js +1 -0
- package/dist/components/Image/Image.css +53 -0
- package/dist/components/Image/Image.css.d.ts +7 -0
- package/dist/components/Image/Image.css.js +18 -0
- package/dist/components/Image/Image.d.ts +23 -0
- package/dist/components/Image/Image.docs.d.ts +19 -0
- package/dist/components/Image/Image.docs.js +48 -0
- package/dist/components/Image/Image.js +75 -0
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/Image/index.js +1 -0
- package/dist/components/Inline/Inline.css +38 -0
- package/dist/components/Inline/Inline.css.d.ts +4 -0
- package/dist/components/Inline/Inline.css.js +18 -0
- package/dist/components/Inline/Inline.d.ts +300 -0
- package/dist/components/Inline/Inline.docs.d.ts +19 -0
- package/dist/components/Inline/Inline.docs.js +48 -0
- package/dist/components/Inline/Inline.js +13 -0
- package/dist/components/Inline/index.d.ts +1 -0
- package/dist/components/Inline/index.js +1 -0
- package/dist/components/Link/Link.css +57 -0
- package/dist/components/Link/Link.css.d.ts +5 -0
- package/dist/components/Link/Link.css.js +14 -0
- package/dist/components/Link/Link.d.ts +19 -0
- package/dist/components/Link/Link.docs.d.ts +19 -0
- package/dist/components/Link/Link.docs.js +51 -0
- package/dist/components/Link/Link.js +39 -0
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Link/index.js +1 -0
- package/dist/components/List/List.css +39 -0
- package/dist/components/List/List.css.d.ts +5 -0
- package/dist/components/List/List.css.js +14 -0
- package/dist/components/List/List.d.ts +294 -0
- package/dist/components/List/List.docs.d.ts +19 -0
- package/dist/components/List/List.docs.js +43 -0
- package/dist/components/List/List.js +25 -0
- package/dist/components/List/index.d.ts +1 -0
- package/dist/components/List/index.js +1 -0
- package/dist/components/Menu/Menu.css +65 -0
- package/dist/components/Menu/Menu.css.d.ts +5 -0
- package/dist/components/Menu/Menu.css.js +9 -0
- package/dist/components/Menu/Menu.d.ts +60 -0
- package/dist/components/Menu/Menu.docs.d.ts +19 -0
- package/dist/components/Menu/Menu.docs.js +53 -0
- package/dist/components/Menu/Menu.js +192 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.js +1 -0
- package/dist/components/NavBar/NavBar.css +187 -0
- package/dist/components/NavBar/NavBar.css.d.ts +16 -0
- package/dist/components/NavBar/NavBar.css.js +19 -0
- package/dist/components/NavBar/NavBar.d.ts +31 -0
- package/dist/components/NavBar/NavBar.docs.d.ts +19 -0
- package/dist/components/NavBar/NavBar.docs.js +53 -0
- package/dist/components/NavBar/NavBar.js +110 -0
- package/dist/components/NavBar/index.d.ts +1 -0
- package/dist/components/NavBar/index.js +1 -0
- package/dist/components/Popover/Popover.css +28 -0
- package/dist/components/Popover/Popover.css.d.ts +3 -0
- package/dist/components/Popover/Popover.css.js +8 -0
- package/dist/components/Popover/Popover.d.ts +40 -0
- package/dist/components/Popover/Popover.docs.d.ts +19 -0
- package/dist/components/Popover/Popover.docs.js +50 -0
- package/dist/components/Popover/Popover.js +69 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Popover/index.js +1 -0
- package/dist/components/Progress/Progress.css +106 -0
- package/dist/components/Progress/Progress.css.d.ts +10 -0
- package/dist/components/Progress/Progress.css.js +24 -0
- package/dist/components/Progress/Progress.d.ts +23 -0
- package/dist/components/Progress/Progress.docs.d.ts +19 -0
- package/dist/components/Progress/Progress.docs.js +43 -0
- package/dist/components/Progress/Progress.js +54 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Progress/index.js +1 -0
- package/dist/components/PromptInput/PromptInput.css +25 -0
- package/dist/components/PromptInput/PromptInput.css.d.ts +5 -0
- package/dist/components/PromptInput/PromptInput.css.js +8 -0
- package/dist/components/PromptInput/PromptInput.d.ts +65 -0
- package/dist/components/PromptInput/PromptInput.docs.d.ts +19 -0
- package/dist/components/PromptInput/PromptInput.docs.js +45 -0
- package/dist/components/PromptInput/PromptInput.js +91 -0
- package/dist/components/PromptInput/index.d.ts +1 -0
- package/dist/components/PromptInput/index.js +1 -0
- package/dist/components/Quote/Quote.css +31 -0
- package/dist/components/Quote/Quote.css.d.ts +5 -0
- package/dist/components/Quote/Quote.css.js +9 -0
- package/dist/components/Quote/Quote.d.ts +13 -0
- package/dist/components/Quote/Quote.docs.d.ts +19 -0
- package/dist/components/Quote/Quote.docs.js +30 -0
- package/dist/components/Quote/Quote.js +26 -0
- package/dist/components/Quote/index.d.ts +1 -0
- package/dist/components/Quote/index.js +1 -0
- package/dist/components/RadioGroup/RadioGroup.css +70 -0
- package/dist/components/RadioGroup/RadioGroup.css.d.ts +4 -0
- package/dist/components/RadioGroup/RadioGroup.css.js +12 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +32 -0
- package/dist/components/RadioGroup/RadioGroup.docs.d.ts +19 -0
- package/dist/components/RadioGroup/RadioGroup.docs.js +47 -0
- package/dist/components/RadioGroup/RadioGroup.js +85 -0
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/RadioGroup/index.js +1 -0
- package/dist/components/Select/Select.css +17 -0
- package/dist/components/Select/Select.css.d.ts +3 -0
- package/dist/components/Select/Select.css.js +7 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.docs.d.ts +19 -0
- package/dist/components/Select/Select.docs.js +35 -0
- package/dist/components/Select/Select.js +57 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +1 -0
- package/dist/components/SideNav/SideNav.css +74 -0
- package/dist/components/SideNav/SideNav.css.d.ts +7 -0
- package/dist/components/SideNav/SideNav.css.js +12 -0
- package/dist/components/SideNav/SideNav.d.ts +23 -0
- package/dist/components/SideNav/SideNav.docs.d.ts +19 -0
- package/dist/components/SideNav/SideNav.docs.js +43 -0
- package/dist/components/SideNav/SideNav.js +55 -0
- package/dist/components/SideNav/index.d.ts +1 -0
- package/dist/components/SideNav/index.js +1 -0
- package/dist/components/Skeleton/Skeleton.css +45 -0
- package/dist/components/Skeleton/Skeleton.css.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.css.js +11 -0
- package/dist/components/Skeleton/Skeleton.d.ts +25 -0
- package/dist/components/Skeleton/Skeleton.docs.d.ts +19 -0
- package/dist/components/Skeleton/Skeleton.docs.js +43 -0
- package/dist/components/Skeleton/Skeleton.js +27 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/Spinner/Spinner.css +46 -0
- package/dist/components/Spinner/Spinner.css.d.ts +5 -0
- package/dist/components/Spinner/Spinner.css.js +13 -0
- package/dist/components/Spinner/Spinner.d.ts +24 -0
- package/dist/components/Spinner/Spinner.docs.d.ts +19 -0
- package/dist/components/Spinner/Spinner.docs.js +44 -0
- package/dist/components/Spinner/Spinner.js +46 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.js +1 -0
- package/dist/components/Stack/Stack.css +21 -0
- package/dist/components/Stack/Stack.css.d.ts +2 -0
- package/dist/components/Stack/Stack.css.js +10 -0
- package/dist/components/Stack/Stack.d.ts +296 -0
- package/dist/components/Stack/Stack.docs.d.ts +19 -0
- package/dist/components/Stack/Stack.docs.js +48 -0
- package/dist/components/Stack/Stack.js +13 -0
- package/dist/components/Stack/index.d.ts +1 -0
- package/dist/components/Stack/index.js +1 -0
- package/dist/components/Stat/Stat.css +59 -0
- package/dist/components/Stat/Stat.css.d.ts +13 -0
- package/dist/components/Stat/Stat.css.js +18 -0
- package/dist/components/Stat/Stat.d.ts +20 -0
- package/dist/components/Stat/Stat.docs.d.ts +19 -0
- package/dist/components/Stat/Stat.docs.js +52 -0
- package/dist/components/Stat/Stat.js +49 -0
- package/dist/components/Stat/index.d.ts +1 -0
- package/dist/components/Stat/index.js +1 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.css +46 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.css.d.ts +5 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.css.js +13 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.d.ts +22 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.docs.d.ts +19 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.docs.js +43 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.js +31 -0
- package/dist/components/StreamingIndicator/index.d.ts +1 -0
- package/dist/components/StreamingIndicator/index.js +1 -0
- package/dist/components/Switch/Switch.css +89 -0
- package/dist/components/Switch/Switch.css.d.ts +4 -0
- package/dist/components/Switch/Switch.css.js +9 -0
- package/dist/components/Switch/Switch.d.ts +21 -0
- package/dist/components/Switch/Switch.docs.d.ts +19 -0
- package/dist/components/Switch/Switch.docs.js +36 -0
- package/dist/components/Switch/Switch.js +51 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Switch/index.js +1 -0
- package/dist/components/TabBar/TabBar.css +94 -0
- package/dist/components/TabBar/TabBar.css.d.ts +7 -0
- package/dist/components/TabBar/TabBar.css.js +12 -0
- package/dist/components/TabBar/TabBar.d.ts +23 -0
- package/dist/components/TabBar/TabBar.docs.d.ts +19 -0
- package/dist/components/TabBar/TabBar.docs.js +43 -0
- package/dist/components/TabBar/TabBar.js +50 -0
- package/dist/components/TabBar/index.d.ts +1 -0
- package/dist/components/TabBar/index.js +1 -0
- package/dist/components/Table/Table.css +75 -0
- package/dist/components/Table/Table.css.d.ts +10 -0
- package/dist/components/Table/Table.css.js +22 -0
- package/dist/components/Table/Table.d.ts +32 -0
- package/dist/components/Table/Table.docs.d.ts +19 -0
- package/dist/components/Table/Table.docs.js +49 -0
- package/dist/components/Table/Table.js +69 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +1 -0
- package/dist/components/Tabs/Tabs.css +79 -0
- package/dist/components/Tabs/Tabs.css.d.ts +6 -0
- package/dist/components/Tabs/Tabs.css.js +14 -0
- package/dist/components/Tabs/Tabs.d.ts +33 -0
- package/dist/components/Tabs/Tabs.docs.d.ts +19 -0
- package/dist/components/Tabs/Tabs.docs.js +56 -0
- package/dist/components/Tabs/Tabs.js +90 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +1 -0
- package/dist/components/Tag/Tag.css +63 -0
- package/dist/components/Tag/Tag.css.d.ts +5 -0
- package/dist/components/Tag/Tag.css.js +10 -0
- package/dist/components/Tag/Tag.d.ts +13 -0
- package/dist/components/Tag/Tag.docs.d.ts +19 -0
- package/dist/components/Tag/Tag.docs.js +39 -0
- package/dist/components/Tag/Tag.js +35 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Tag/index.js +1 -0
- package/dist/components/Text/Text.css +86 -0
- package/dist/components/Text/Text.css.d.ts +6 -0
- package/dist/components/Text/Text.css.js +39 -0
- package/dist/components/Text/Text.d.ts +310 -0
- package/dist/components/Text/Text.docs.d.ts +19 -0
- package/dist/components/Text/Text.docs.js +52 -0
- package/dist/components/Text/Text.js +12 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Text/index.js +1 -0
- package/dist/components/TextArea/TextArea.css +8 -0
- package/dist/components/TextArea/TextArea.css.d.ts +1 -0
- package/dist/components/TextArea/TextArea.css.js +5 -0
- package/dist/components/TextArea/TextArea.d.ts +15 -0
- package/dist/components/TextArea/TextArea.docs.d.ts +19 -0
- package/dist/components/TextArea/TextArea.docs.js +31 -0
- package/dist/components/TextArea/TextArea.js +33 -0
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.js +1 -0
- package/dist/components/TextField/TextField.d.ts +14 -0
- package/dist/components/TextField/TextField.docs.d.ts +19 -0
- package/dist/components/TextField/TextField.docs.js +59 -0
- package/dist/components/TextField/TextField.js +32 -0
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/TextField/index.js +1 -0
- package/dist/components/Timeline/Timeline.css +100 -0
- package/dist/components/Timeline/Timeline.css.d.ts +10 -0
- package/dist/components/Timeline/Timeline.css.js +15 -0
- package/dist/components/Timeline/Timeline.d.ts +22 -0
- package/dist/components/Timeline/Timeline.docs.d.ts +19 -0
- package/dist/components/Timeline/Timeline.docs.js +39 -0
- package/dist/components/Timeline/Timeline.js +42 -0
- package/dist/components/Timeline/index.d.ts +1 -0
- package/dist/components/Timeline/index.js +1 -0
- package/dist/components/Toast/Toast.css +106 -0
- package/dist/components/Toast/Toast.css.d.ts +11 -0
- package/dist/components/Toast/Toast.css.js +25 -0
- package/dist/components/Toast/Toast.d.ts +30 -0
- package/dist/components/Toast/Toast.docs.d.ts +19 -0
- package/dist/components/Toast/Toast.docs.js +49 -0
- package/dist/components/Toast/Toast.js +68 -0
- package/dist/components/Toast/ToastProvider.d.ts +12 -0
- package/dist/components/Toast/ToastProvider.js +140 -0
- package/dist/components/Toast/index.d.ts +3 -0
- package/dist/components/Toast/index.js +4 -0
- package/dist/components/Toast/toast-context.d.ts +21 -0
- package/dist/components/Toast/toast-context.js +11 -0
- package/dist/components/Tooltip/Tooltip.css +18 -0
- package/dist/components/Tooltip/Tooltip.css.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.css.js +5 -0
- package/dist/components/Tooltip/Tooltip.d.ts +45 -0
- package/dist/components/Tooltip/Tooltip.docs.d.ts +19 -0
- package/dist/components/Tooltip/Tooltip.docs.js +47 -0
- package/dist/components/Tooltip/Tooltip.js +93 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/icons/index.d.ts +293 -0
- package/dist/icons/index.js +395 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +59 -0
- package/dist/internal/Field.d.ts +31 -0
- package/dist/internal/Field.js +54 -0
- package/dist/internal/field-ids.d.ts +7 -0
- package/dist/internal/field-ids.js +18 -0
- package/dist/internal/field.css +131 -0
- package/dist/internal/field.css.d.ts +16 -0
- package/dist/internal/field.css.js +22 -0
- package/dist/internal/floating-geometry.d.ts +42 -0
- package/dist/internal/floating-geometry.js +55 -0
- package/dist/internal/floating.css +36 -0
- package/dist/internal/floating.css.d.ts +8 -0
- package/dist/internal/floating.css.js +6 -0
- package/dist/internal/floating.d.ts +27 -0
- package/dist/internal/floating.js +118 -0
- package/dist/internal/useControllableState.d.ts +16 -0
- package/dist/internal/useControllableState.js +28 -0
- package/dist/internal/useOverflow.d.ts +7 -0
- package/dist/internal/useOverflow.js +24 -0
- package/dist/internal/usePopover.d.ts +28 -0
- package/dist/internal/usePopover.js +91 -0
- package/dist/manifest.json +12308 -0
- package/dist/patterns/dashboard-overview.docs.d.ts +22 -0
- package/dist/patterns/dashboard-overview.docs.js +80 -0
- package/dist/patterns/empty-state.docs.d.ts +22 -0
- package/dist/patterns/empty-state.docs.js +60 -0
- package/dist/patterns/index.d.ts +6 -0
- package/dist/patterns/index.js +14 -0
- package/dist/patterns/profile-card.docs.d.ts +22 -0
- package/dist/patterns/profile-card.docs.js +72 -0
- package/dist/patterns/settings-page.docs.d.ts +22 -0
- package/dist/patterns/settings-page.docs.js +76 -0
- package/dist/patterns/sign-in-form.docs.d.ts +22 -0
- package/dist/patterns/sign-in-form.docs.js +84 -0
- package/dist/primitives/VisuallyHidden.d.ts +13 -0
- package/dist/primitives/VisuallyHidden.js +18 -0
- package/dist/providers/LinkProvider.d.ts +18 -0
- package/dist/providers/LinkProvider.js +23 -0
- package/dist/providers/StringsProvider.d.ts +14 -0
- package/dist/providers/StringsProvider.js +25 -0
- package/dist/providers/link-context.d.ts +12 -0
- package/dist/providers/link-context.js +15 -0
- package/dist/providers/strings.d.ts +64 -0
- package/dist/providers/strings.js +38 -0
- package/dist/registry/gaps.d.ts +30 -0
- package/dist/registry/gaps.js +208 -0
- package/dist/registry/generated.d.ts +5 -0
- package/dist/registry/generated.js +2821 -0
- package/dist/registry/index.d.ts +36 -0
- package/dist/registry/index.js +201 -0
- package/dist/registry/types.d.ts +84 -0
- package/dist/styles/base.css +9 -0
- package/dist/styles/base.css.d.ts +1 -0
- package/dist/styles/base.css.js +1 -0
- package/dist/styles/layout.css +33 -0
- package/dist/styles/layout.css.d.ts +1 -0
- package/dist/styles/layout.css.js +17 -0
- package/dist/styles/shared.css +16 -0
- package/dist/styles/shared.css.d.ts +35 -0
- package/dist/styles/shared.css.js +5 -0
- package/dist/styles.css +3406 -0
- package/dist/themes/blueprint.css +115 -0
- package/dist/themes/contrast.d.ts +26 -0
- package/dist/themes/contrast.js +114 -0
- package/dist/themes/define.d.ts +9 -0
- package/dist/themes/define.js +29 -0
- package/dist/themes/dtcg.d.ts +126 -0
- package/dist/themes/dtcg.js +268 -0
- package/dist/themes/index.d.ts +19 -0
- package/dist/themes/index.js +21 -0
- package/dist/themes/letterpress.css +115 -0
- package/dist/themes/letterpress.d.ts +7 -0
- package/dist/themes/letterpress.js +187 -0
- package/dist/themes/presets/blueprint.d.ts +6 -0
- package/dist/themes/presets/blueprint.js +183 -0
- package/dist/themes/runtime/browser.d.ts +47 -0
- package/dist/themes/runtime/browser.js +164 -0
- package/dist/themes/runtime/cache.d.ts +43 -0
- package/dist/themes/runtime/cache.js +87 -0
- package/dist/themes/runtime/css.d.ts +43 -0
- package/dist/themes/runtime/css.js +89 -0
- package/dist/themes/runtime/diff.d.ts +22 -0
- package/dist/themes/runtime/diff.js +43 -0
- package/dist/themes/types.d.ts +59 -0
- package/dist/themes/values.d.ts +12 -0
- package/dist/themes/values.js +40 -0
- package/dist/tokens/blueprint.dark.tokens.json +1361 -0
- package/dist/tokens/blueprint.light.tokens.json +1361 -0
- package/dist/tokens/contract.d.ts +252 -0
- package/dist/tokens/contract.js +249 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/letterpress.dark.tokens.json +1391 -0
- package/dist/tokens/letterpress.light.tokens.json +1391 -0
- package/dist/tokens/tokens.css +117 -0
- package/dist/tokens/tokens.css.d.ts +128 -0
- package/dist/tokens/tokens.css.js +121 -0
- package/dist/utils/cx.d.ts +7 -0
- package/dist/utils/cx.js +14 -0
- package/dist/utils/space.d.ts +5 -0
- package/dist/utils/space.js +7 -0
- package/package.json +104 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ThemeDefinition } from './types.js';
|
|
2
|
+
export { type ContrastRequirement, type ContrastResult, checkThemeContrast, contrastRatio, contrastRequirements, relativeLuminance, } from './contrast.js';
|
|
3
|
+
export { defineTheme } from './define.js';
|
|
4
|
+
export { type DtcgColor, type DtcgCssOnly, type DtcgDimension, type DtcgDocument, type DtcgDuration, type DtcgGroup, type DtcgShadowLayer, type DtcgToken, type DtcgTokenType, dtcgExtension, dtcgFileName, dtcgFormatVersion, parseCssColor, parseDimension, parseFontFamily, parseShadow, themeToDtcg, } from './dtcg.js';
|
|
5
|
+
export { letterpress } from './letterpress.js';
|
|
6
|
+
export { blueprint } from './presets/blueprint.js';
|
|
7
|
+
export { clearPresetCache, hashString, isStalePresetCache, type PresetCache, type PresetStorage, presetCache, presetCacheVersion, presetFontHref, presetStorageKeys, readPresetCache, writePresetCache, } from './runtime/cache.js';
|
|
8
|
+
export { presetAttribute, presetScopeAttribute, type ThemeCssOptions, themeSelectors, themeToCss, } from './runtime/css.js';
|
|
9
|
+
export { changesForMode, type TokenChange, tokenDiff } from './runtime/diff.js';
|
|
10
|
+
export type { ColorMode, ColorTokens, ElevationTokens, ThemeDecision, ThemeDefinition, ThemeFonts, ThemeInput, ThemeTokenValues, } from './types.js';
|
|
11
|
+
export { modeTokenValues, staticTokenValues, themeTokenValues, } from './values.js';
|
|
12
|
+
/**
|
|
13
|
+
* Every theme that ships, in the order the switcher lists them. Letterpress is
|
|
14
|
+
* first and is the default. Add a preset here to ship it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const themes: ThemeDefinition[];
|
|
17
|
+
export declare const defaultTheme: ThemeDefinition;
|
|
18
|
+
/** The shipped theme with this id, if there is one. */
|
|
19
|
+
export declare function getTheme(id: string | null | undefined): ThemeDefinition | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { letterpress } from "./letterpress.js";
|
|
2
|
+
import { blueprint } from "./presets/blueprint.js";
|
|
3
|
+
import { checkThemeContrast, contrastRatio, contrastRequirements, relativeLuminance } from "./contrast.js";
|
|
4
|
+
import { defineTheme } from "./define.js";
|
|
5
|
+
import { dtcgExtension, dtcgFileName, dtcgFormatVersion, parseCssColor, parseDimension, parseFontFamily, parseShadow, themeToDtcg } from "./dtcg.js";
|
|
6
|
+
import { clearPresetCache, hashString, isStalePresetCache, presetCache, presetCacheVersion, presetFontHref, presetStorageKeys, readPresetCache, writePresetCache } from "./runtime/cache.js";
|
|
7
|
+
import { presetAttribute, presetScopeAttribute, themeSelectors, themeToCss } from "./runtime/css.js";
|
|
8
|
+
import { changesForMode, tokenDiff } from "./runtime/diff.js";
|
|
9
|
+
import { modeTokenValues, staticTokenValues, themeTokenValues } from "./values.js";
|
|
10
|
+
// src/themes/index.ts
|
|
11
|
+
/**
|
|
12
|
+
* Every theme that ships, in the order the switcher lists them. Letterpress is
|
|
13
|
+
* first and is the default. Add a preset here to ship it.
|
|
14
|
+
*/
|
|
15
|
+
var themes = [letterpress, blueprint];
|
|
16
|
+
var defaultTheme = letterpress;
|
|
17
|
+
/** The shipped theme with this id, if there is one. */
|
|
18
|
+
function getTheme(id) {
|
|
19
|
+
return themes.find((theme) => theme.id === id);
|
|
20
|
+
}
|
|
21
|
+
export { blueprint, changesForMode, checkThemeContrast, clearPresetCache, contrastRatio, contrastRequirements, defaultTheme, defineTheme, dtcgExtension, dtcgFileName, dtcgFormatVersion, getTheme, hashString, isStalePresetCache, letterpress, modeTokenValues, parseCssColor, parseDimension, parseFontFamily, parseShadow, presetAttribute, presetCache, presetCacheVersion, presetFontHref, presetScopeAttribute, presetStorageKeys, readPresetCache, relativeLuminance, staticTokenValues, themeSelectors, themeToCss, themeToDtcg, themeTokenValues, themes, tokenDiff, writePresetCache };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
:root[data-preset="letterpress"] {
|
|
2
|
+
--dw-font-display: 'Fraunces', 'Iowan Old Style', Palatino, 'Palatino Linotype', serif;
|
|
3
|
+
--dw-font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
|
|
4
|
+
--dw-font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
|
|
5
|
+
--dw-font-size-xs: 0.75rem;
|
|
6
|
+
--dw-font-size-sm: 0.9375rem;
|
|
7
|
+
--dw-font-size-md: 1.0625rem;
|
|
8
|
+
--dw-font-size-lg: 1.25rem;
|
|
9
|
+
--dw-font-size-xl: 1.5rem;
|
|
10
|
+
--dw-font-size-2xl: clamp(1.75rem, 3vw, 2.25rem);
|
|
11
|
+
--dw-font-size-3xl: clamp(2.15rem, 4vw, 3.15rem);
|
|
12
|
+
--dw-font-size-display: clamp(3.25rem, 12vw, 6.75rem);
|
|
13
|
+
--dw-line-tight: 0.92;
|
|
14
|
+
--dw-line-snug: 1.25;
|
|
15
|
+
--dw-line-body: 1.6;
|
|
16
|
+
--dw-weight-regular: 400;
|
|
17
|
+
--dw-weight-medium: 500;
|
|
18
|
+
--dw-weight-semibold: 600;
|
|
19
|
+
--dw-weight-bold: 700;
|
|
20
|
+
--dw-tracking-tight: -0.035em;
|
|
21
|
+
--dw-tracking-snug: -0.02em;
|
|
22
|
+
--dw-tracking-wide: 0.12em;
|
|
23
|
+
--dw-space-1: 0.25rem;
|
|
24
|
+
--dw-space-2: 0.5rem;
|
|
25
|
+
--dw-space-3: 0.75rem;
|
|
26
|
+
--dw-space-4: 1rem;
|
|
27
|
+
--dw-space-5: 1.25rem;
|
|
28
|
+
--dw-space-6: 1.5rem;
|
|
29
|
+
--dw-space-8: 2rem;
|
|
30
|
+
--dw-space-10: 2.5rem;
|
|
31
|
+
--dw-space-12: 3rem;
|
|
32
|
+
--dw-space-16: 4rem;
|
|
33
|
+
--dw-space-20: 5rem;
|
|
34
|
+
--dw-space-24: 6rem;
|
|
35
|
+
--dw-space-page: clamp(1.25rem, 4vw, 2.75rem);
|
|
36
|
+
--dw-size-content: 72rem;
|
|
37
|
+
--dw-size-prose: 75ch;
|
|
38
|
+
--dw-size-header: 4.5rem;
|
|
39
|
+
--dw-radius-sm: 0.5rem;
|
|
40
|
+
--dw-radius-md: 0.9rem;
|
|
41
|
+
--dw-radius-lg: 1.35rem;
|
|
42
|
+
--dw-radius-pill: 999px;
|
|
43
|
+
--dw-control-sm: 2.25rem;
|
|
44
|
+
--dw-control-md: 2.75rem;
|
|
45
|
+
--dw-control-lg: 3.25rem;
|
|
46
|
+
--dw-border-thin: 1px;
|
|
47
|
+
--dw-border-medium: 1.5px;
|
|
48
|
+
--dw-border-thick: 3px;
|
|
49
|
+
--dw-duration-fast: 160ms;
|
|
50
|
+
--dw-duration-base: 240ms;
|
|
51
|
+
--dw-duration-slow: 400ms;
|
|
52
|
+
--dw-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
53
|
+
--dw-easing-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);
|
|
54
|
+
--dw-layer-raised: 1;
|
|
55
|
+
--dw-layer-sticky: 30;
|
|
56
|
+
--dw-layer-overlay: 40;
|
|
57
|
+
--dw-layer-toast: 50;
|
|
58
|
+
--dw-opacity-disabled: 0.55;
|
|
59
|
+
--dw-color-bg: #f3eee4;
|
|
60
|
+
--dw-color-bg-elevated: #fffdf8;
|
|
61
|
+
--dw-color-bg-muted: #e6dfd1;
|
|
62
|
+
--dw-color-text: #1c1915;
|
|
63
|
+
--dw-color-text-muted: #4a443c;
|
|
64
|
+
--dw-color-border: #ddd4c4;
|
|
65
|
+
--dw-color-border-strong: #8a8173;
|
|
66
|
+
--dw-color-accent: #7a3010;
|
|
67
|
+
--dw-color-accent-hover: #5e240c;
|
|
68
|
+
--dw-color-on-accent: #fff8f3;
|
|
69
|
+
--dw-color-accent-soft: #f3e0d4;
|
|
70
|
+
--dw-color-focus: #0e5c4a;
|
|
71
|
+
--dw-color-positive: #0e5c4a;
|
|
72
|
+
--dw-color-positive-soft: #e4f3ed;
|
|
73
|
+
--dw-color-warning: #7d4e00;
|
|
74
|
+
--dw-color-warning-soft: #f7e6c4;
|
|
75
|
+
--dw-color-danger: #a3221b;
|
|
76
|
+
--dw-color-danger-soft: #f8dfda;
|
|
77
|
+
--dw-color-on-danger: #fff8f3;
|
|
78
|
+
--dw-color-info: #1d4f7c;
|
|
79
|
+
--dw-color-info-soft: #dfe9f3;
|
|
80
|
+
--dw-color-shadow: 0 24px 50px rgb(48 32 16 / 0.08);
|
|
81
|
+
--dw-color-bg-texture: radial-gradient(42rem 22rem at 100% -6rem, color-mix(in srgb, var(--dw-color-accent) 16%, transparent), transparent 70%) no-repeat;
|
|
82
|
+
--dw-color-scrim: rgb(19 18 16 / 0.55);
|
|
83
|
+
--dw-elevation-sm: 0 1px 2px rgb(48 32 16 / 0.06), 0 2px 6px rgb(48 32 16 / 0.05);
|
|
84
|
+
--dw-elevation-md: 0 4px 10px rgb(48 32 16 / 0.06), 0 12px 28px rgb(48 32 16 / 0.08);
|
|
85
|
+
--dw-elevation-lg: 0 12px 24px rgb(48 32 16 / 0.08), 0 32px 64px rgb(48 32 16 / 0.14);
|
|
86
|
+
}
|
|
87
|
+
:root[data-preset="letterpress"][data-theme="dark"] {
|
|
88
|
+
--dw-color-bg: #131210;
|
|
89
|
+
--dw-color-bg-elevated: #1e1c18;
|
|
90
|
+
--dw-color-bg-muted: #2a261f;
|
|
91
|
+
--dw-color-text: #f4efe6;
|
|
92
|
+
--dw-color-text-muted: #c8bfb2;
|
|
93
|
+
--dw-color-border: #3a362f;
|
|
94
|
+
--dw-color-border-strong: #746c60;
|
|
95
|
+
--dw-color-accent: #f0b48a;
|
|
96
|
+
--dw-color-accent-hover: #f7d0b4;
|
|
97
|
+
--dw-color-on-accent: #2a160c;
|
|
98
|
+
--dw-color-accent-soft: #3a2a20;
|
|
99
|
+
--dw-color-focus: #9ddecb;
|
|
100
|
+
--dw-color-positive: #9ddecb;
|
|
101
|
+
--dw-color-positive-soft: #17332e;
|
|
102
|
+
--dw-color-warning: #f0c674;
|
|
103
|
+
--dw-color-warning-soft: #3a2e14;
|
|
104
|
+
--dw-color-danger: #f5a094;
|
|
105
|
+
--dw-color-danger-soft: #3e1f1a;
|
|
106
|
+
--dw-color-on-danger: #2a0f0b;
|
|
107
|
+
--dw-color-info: #9fc6ee;
|
|
108
|
+
--dw-color-info-soft: #182838;
|
|
109
|
+
--dw-color-shadow: 0 24px 50px rgb(0 0 0 / 0.45);
|
|
110
|
+
--dw-color-bg-texture: radial-gradient(42rem 22rem at 100% -6rem, color-mix(in srgb, var(--dw-color-accent) 16%, transparent), transparent 70%) no-repeat;
|
|
111
|
+
--dw-color-scrim: rgb(19 18 16 / 0.55);
|
|
112
|
+
--dw-elevation-sm: 0 1px 2px rgb(0 0 0 / 0.4), 0 2px 6px rgb(0 0 0 / 0.3);
|
|
113
|
+
--dw-elevation-md: 0 4px 10px rgb(0 0 0 / 0.4), 0 12px 28px rgb(0 0 0 / 0.45);
|
|
114
|
+
--dw-elevation-lg: 0 12px 24px rgb(0 0 0 / 0.45), 0 32px 64px rgb(0 0 0 / 0.6);
|
|
115
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThemeDefinition } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Letterpress is the default theme and the base every preset merges onto.
|
|
4
|
+
* These are the system's original values. Changing one changes every app
|
|
5
|
+
* that uses the default preset.
|
|
6
|
+
*/
|
|
7
|
+
export declare const letterpress: ThemeDefinition;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
// src/themes/letterpress.ts
|
|
2
|
+
/** A soft copper glow in the top corner of the page. Follows the accent. */
|
|
3
|
+
var copperGlow = "radial-gradient(42rem 22rem at 100% -6rem, color-mix(in srgb, var(--dw-color-accent) 16%, transparent), transparent 70%) no-repeat";
|
|
4
|
+
/**
|
|
5
|
+
* Letterpress is the default theme and the base every preset merges onto.
|
|
6
|
+
* These are the system's original values. Changing one changes every app
|
|
7
|
+
* that uses the default preset.
|
|
8
|
+
*/
|
|
9
|
+
var letterpress = {
|
|
10
|
+
id: "letterpress",
|
|
11
|
+
name: "Letterpress",
|
|
12
|
+
tagline: "Warm paper, oxidized copper, and a serif that means it.",
|
|
13
|
+
description: "Letterpress reads like a well-made printed page. Surfaces are paper, text is ink, and one copper accent marks what you can act on. Headlines are set in Fraunces, reading text in Source Sans 3, and labels in IBM Plex Mono. It is calm by default and saves emphasis for the few things that need it.",
|
|
14
|
+
decisions: [
|
|
15
|
+
{
|
|
16
|
+
title: "Warm paper and oxidized copper",
|
|
17
|
+
body: "The light theme is paper, not white. Copper is the only accent, so a link or a primary action is never in doubt. Dark mode is ink and peach, tuned on its own rather than inverted."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: "Fraunces italic is the only flourish",
|
|
21
|
+
body: "Headlines use Fraunces at semibold with tight tracking. Italic is saved for one or two words, like a last name, and takes the accent color. Everything else stays upright."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: "Plex Mono for labels",
|
|
25
|
+
body: "Eyebrows, indexes, and metadata are small uppercase IBM Plex Mono with wide tracking. They read as labels without adding another color."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: "Contrast is a requirement",
|
|
29
|
+
body: "Text meets WCAG 2.2 AA on every surface it sits on, including the tinted status backgrounds. Strong borders and the focus ring clear 3:1. A test checks both modes."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: "Soft corners, quiet motion",
|
|
33
|
+
body: "Controls have a 0.9rem radius and cards 1.35rem. Motion is short, only confirms what happened, and stops when you ask for reduced motion."
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
fonts: {
|
|
37
|
+
display: "'Fraunces', 'Iowan Old Style', Palatino, 'Palatino Linotype', serif",
|
|
38
|
+
body: "'Source Sans 3', 'Segoe UI', sans-serif",
|
|
39
|
+
mono: "'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace",
|
|
40
|
+
href: "https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&family=IBM+Plex+Mono:wght@400;500&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;1,400&display=swap"
|
|
41
|
+
},
|
|
42
|
+
color: {
|
|
43
|
+
light: {
|
|
44
|
+
bg: "#f3eee4",
|
|
45
|
+
bgElevated: "#fffdf8",
|
|
46
|
+
bgMuted: "#e6dfd1",
|
|
47
|
+
text: "#1c1915",
|
|
48
|
+
textMuted: "#4a443c",
|
|
49
|
+
border: "#ddd4c4",
|
|
50
|
+
borderStrong: "#8a8173",
|
|
51
|
+
accent: "#7a3010",
|
|
52
|
+
accentHover: "#5e240c",
|
|
53
|
+
onAccent: "#fff8f3",
|
|
54
|
+
accentSoft: "#f3e0d4",
|
|
55
|
+
focus: "#0e5c4a",
|
|
56
|
+
positive: "#0e5c4a",
|
|
57
|
+
positiveSoft: "#e4f3ed",
|
|
58
|
+
warning: "#7d4e00",
|
|
59
|
+
warningSoft: "#f7e6c4",
|
|
60
|
+
danger: "#a3221b",
|
|
61
|
+
dangerSoft: "#f8dfda",
|
|
62
|
+
onDanger: "#fff8f3",
|
|
63
|
+
info: "#1d4f7c",
|
|
64
|
+
infoSoft: "#dfe9f3",
|
|
65
|
+
shadow: "0 24px 50px rgb(48 32 16 / 0.08)",
|
|
66
|
+
bgTexture: copperGlow,
|
|
67
|
+
scrim: "rgb(19 18 16 / 0.55)"
|
|
68
|
+
},
|
|
69
|
+
dark: {
|
|
70
|
+
bg: "#131210",
|
|
71
|
+
bgElevated: "#1e1c18",
|
|
72
|
+
bgMuted: "#2a261f",
|
|
73
|
+
text: "#f4efe6",
|
|
74
|
+
textMuted: "#c8bfb2",
|
|
75
|
+
border: "#3a362f",
|
|
76
|
+
borderStrong: "#746c60",
|
|
77
|
+
accent: "#f0b48a",
|
|
78
|
+
accentHover: "#f7d0b4",
|
|
79
|
+
onAccent: "#2a160c",
|
|
80
|
+
accentSoft: "#3a2a20",
|
|
81
|
+
focus: "#9ddecb",
|
|
82
|
+
positive: "#9ddecb",
|
|
83
|
+
positiveSoft: "#17332e",
|
|
84
|
+
warning: "#f0c674",
|
|
85
|
+
warningSoft: "#3a2e14",
|
|
86
|
+
danger: "#f5a094",
|
|
87
|
+
dangerSoft: "#3e1f1a",
|
|
88
|
+
onDanger: "#2a0f0b",
|
|
89
|
+
info: "#9fc6ee",
|
|
90
|
+
infoSoft: "#182838",
|
|
91
|
+
shadow: "0 24px 50px rgb(0 0 0 / 0.45)",
|
|
92
|
+
bgTexture: copperGlow,
|
|
93
|
+
scrim: "rgb(19 18 16 / 0.55)"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
elevation: {
|
|
97
|
+
light: {
|
|
98
|
+
sm: "0 1px 2px rgb(48 32 16 / 0.06), 0 2px 6px rgb(48 32 16 / 0.05)",
|
|
99
|
+
md: "0 4px 10px rgb(48 32 16 / 0.06), 0 12px 28px rgb(48 32 16 / 0.08)",
|
|
100
|
+
lg: "0 12px 24px rgb(48 32 16 / 0.08), 0 32px 64px rgb(48 32 16 / 0.14)"
|
|
101
|
+
},
|
|
102
|
+
dark: {
|
|
103
|
+
sm: "0 1px 2px rgb(0 0 0 / 0.4), 0 2px 6px rgb(0 0 0 / 0.3)",
|
|
104
|
+
md: "0 4px 10px rgb(0 0 0 / 0.4), 0 12px 28px rgb(0 0 0 / 0.45)",
|
|
105
|
+
lg: "0 12px 24px rgb(0 0 0 / 0.45), 0 32px 64px rgb(0 0 0 / 0.6)"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
fontSize: {
|
|
109
|
+
xs: "0.75rem",
|
|
110
|
+
sm: "0.9375rem",
|
|
111
|
+
md: "1.0625rem",
|
|
112
|
+
lg: "1.25rem",
|
|
113
|
+
xl: "1.5rem",
|
|
114
|
+
"2xl": "clamp(1.75rem, 3vw, 2.25rem)",
|
|
115
|
+
"3xl": "clamp(2.15rem, 4vw, 3.15rem)",
|
|
116
|
+
display: "clamp(3.25rem, 12vw, 6.75rem)"
|
|
117
|
+
},
|
|
118
|
+
line: {
|
|
119
|
+
tight: "0.92",
|
|
120
|
+
snug: "1.25",
|
|
121
|
+
body: "1.6"
|
|
122
|
+
},
|
|
123
|
+
weight: {
|
|
124
|
+
regular: "400",
|
|
125
|
+
medium: "500",
|
|
126
|
+
semibold: "600",
|
|
127
|
+
bold: "700"
|
|
128
|
+
},
|
|
129
|
+
tracking: {
|
|
130
|
+
tight: "-0.035em",
|
|
131
|
+
snug: "-0.02em",
|
|
132
|
+
wide: "0.12em"
|
|
133
|
+
},
|
|
134
|
+
space: {
|
|
135
|
+
1: "0.25rem",
|
|
136
|
+
2: "0.5rem",
|
|
137
|
+
3: "0.75rem",
|
|
138
|
+
4: "1rem",
|
|
139
|
+
5: "1.25rem",
|
|
140
|
+
6: "1.5rem",
|
|
141
|
+
8: "2rem",
|
|
142
|
+
10: "2.5rem",
|
|
143
|
+
12: "3rem",
|
|
144
|
+
16: "4rem",
|
|
145
|
+
20: "5rem",
|
|
146
|
+
24: "6rem",
|
|
147
|
+
page: "clamp(1.25rem, 4vw, 2.75rem)"
|
|
148
|
+
},
|
|
149
|
+
size: {
|
|
150
|
+
content: "72rem",
|
|
151
|
+
prose: "75ch",
|
|
152
|
+
header: "4.5rem"
|
|
153
|
+
},
|
|
154
|
+
radius: {
|
|
155
|
+
sm: "0.5rem",
|
|
156
|
+
md: "0.9rem",
|
|
157
|
+
lg: "1.35rem",
|
|
158
|
+
pill: "999px"
|
|
159
|
+
},
|
|
160
|
+
control: {
|
|
161
|
+
sm: "2.25rem",
|
|
162
|
+
md: "2.75rem",
|
|
163
|
+
lg: "3.25rem"
|
|
164
|
+
},
|
|
165
|
+
border: {
|
|
166
|
+
thin: "1px",
|
|
167
|
+
medium: "1.5px",
|
|
168
|
+
thick: "3px"
|
|
169
|
+
},
|
|
170
|
+
duration: {
|
|
171
|
+
fast: "160ms",
|
|
172
|
+
base: "240ms",
|
|
173
|
+
slow: "400ms"
|
|
174
|
+
},
|
|
175
|
+
easing: {
|
|
176
|
+
standard: "cubic-bezier(0.2, 0, 0, 1)",
|
|
177
|
+
emphasized: "cubic-bezier(0.05, 0.7, 0.1, 1)"
|
|
178
|
+
},
|
|
179
|
+
layer: {
|
|
180
|
+
raised: "1",
|
|
181
|
+
sticky: "30",
|
|
182
|
+
overlay: "40",
|
|
183
|
+
toast: "50"
|
|
184
|
+
},
|
|
185
|
+
opacity: { disabled: "0.55" }
|
|
186
|
+
};
|
|
187
|
+
export { letterpress };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { defineTheme } from "../define.js";
|
|
2
|
+
// src/themes/presets/blueprint.ts
|
|
3
|
+
/**
|
|
4
|
+
* Drafting-paper grid: a fine square every 1.5rem and a heavier line every
|
|
5
|
+
* five squares. The lines follow the accent, so they are blue ink on paper in
|
|
6
|
+
* light mode and cyan on the blue sheet in dark mode.
|
|
7
|
+
*/
|
|
8
|
+
var gridPaper = (minor, major) => {
|
|
9
|
+
const line = (percent) => `color-mix(in srgb, var(--dw-color-accent) ${percent}%, transparent)`;
|
|
10
|
+
const rules = (percent, size) => [`linear-gradient(${line(percent)} 1px, transparent 1px) 0 0 / ${size} ${size}`, `linear-gradient(90deg, ${line(percent)} 1px, transparent 1px) 0 0 / ${size} ${size}`];
|
|
11
|
+
return [...rules(major, "7.5rem"), ...rules(minor, "1.5rem")].join(", ");
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Blueprint: an engineering drawing. Precise, square, annotated, and cool.
|
|
15
|
+
* Copy this file to start a new preset; every value left out falls back to
|
|
16
|
+
* Letterpress.
|
|
17
|
+
*/
|
|
18
|
+
var blueprint = defineTheme({
|
|
19
|
+
id: "blueprint",
|
|
20
|
+
name: "Blueprint",
|
|
21
|
+
tagline: "Blue ink, square corners, and grid paper.",
|
|
22
|
+
description: "Blueprint reads like an engineering drawing. Surfaces are drafting paper with a faint grid, text is blue ink, and one strong blue marks what you can act on. Headlines are set in Space Grotesk, reading text in IBM Plex Sans, and labels in JetBrains Mono. It is denser and quicker than Letterpress, and it shows its structure on purpose.",
|
|
23
|
+
decisions: [
|
|
24
|
+
{
|
|
25
|
+
title: "Blue ink on drafting paper",
|
|
26
|
+
body: "Light mode is pale paper with Prussian-blue ink. Dark mode is the classic blueprint: a deep blue sheet with pale cyan lines. Each mode was tuned on its own, not inverted."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: "Square corners, round dots",
|
|
30
|
+
body: "Controls have a 3px radius and cards 4px, so edges read as measured rather than soft. Radios, dots, and avatars stay round, so a radio never looks like a checkbox."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: "A grotesk, a technical sans, and a mono for notes",
|
|
34
|
+
body: "Space Grotesk sets headlines and IBM Plex Sans sets reading text. Labels, eyebrows, and values use JetBrains Mono with less tracking, like the dimensions and notes on a drawing."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: "Denser, still easy to hit",
|
|
38
|
+
body: "Spacing runs about an eighth tighter, and default controls are 40px tall instead of 44px. More fits on a screen, and every target stays well above the 24px minimum in WCAG 2.2."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: "Flat shadows, quick motion",
|
|
42
|
+
body: "Shadows are short and hard-edged, like a sheet lifted a millimeter off the table. Transitions run 100 to 240ms on a plain curve and still stop when you ask for reduced motion."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
title: "A redline focus ring, checked for contrast",
|
|
46
|
+
body: "Focus is the orange of a redline markup, so it stands out against all the blue. Text clears 4.5:1 and borders and focus clear 3:1 on every surface, in both modes. The same test runs for every preset."
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
fonts: {
|
|
50
|
+
display: "'Space Grotesk', 'Helvetica Neue', Arial, sans-serif",
|
|
51
|
+
body: "'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif",
|
|
52
|
+
mono: "'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace",
|
|
53
|
+
href: "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap"
|
|
54
|
+
},
|
|
55
|
+
color: {
|
|
56
|
+
light: {
|
|
57
|
+
bg: "#e9eff5",
|
|
58
|
+
bgElevated: "#f7fafc",
|
|
59
|
+
bgMuted: "#d9e3ed",
|
|
60
|
+
text: "#0b2340",
|
|
61
|
+
textMuted: "#3b5169",
|
|
62
|
+
border: "#c4d2e0",
|
|
63
|
+
borderStrong: "#62809e",
|
|
64
|
+
accent: "#0b4f9c",
|
|
65
|
+
accentHover: "#083d7a",
|
|
66
|
+
onAccent: "#f4f8fd",
|
|
67
|
+
accentSoft: "#d4e4f5",
|
|
68
|
+
focus: "#b8400b",
|
|
69
|
+
positive: "#0d6650",
|
|
70
|
+
positiveSoft: "#d6eee5",
|
|
71
|
+
warning: "#7a4c00",
|
|
72
|
+
warningSoft: "#f4e6c6",
|
|
73
|
+
danger: "#a3201b",
|
|
74
|
+
dangerSoft: "#f6dddb",
|
|
75
|
+
onDanger: "#fff7f6",
|
|
76
|
+
info: "#0b5c70",
|
|
77
|
+
infoSoft: "#d3ebf0",
|
|
78
|
+
shadow: "0 2px 0 rgb(11 35 64 / 0.08)",
|
|
79
|
+
bgTexture: gridPaper(5, 9),
|
|
80
|
+
scrim: "rgb(11 35 64 / 0.45)"
|
|
81
|
+
},
|
|
82
|
+
dark: {
|
|
83
|
+
bg: "#0b2748",
|
|
84
|
+
bgElevated: "#10325a",
|
|
85
|
+
bgMuted: "#173d69",
|
|
86
|
+
text: "#eaf3fd",
|
|
87
|
+
textMuted: "#b6cbe2",
|
|
88
|
+
border: "#29507d",
|
|
89
|
+
borderStrong: "#6f93bc",
|
|
90
|
+
accent: "#86d5f2",
|
|
91
|
+
accentHover: "#b4e7f9",
|
|
92
|
+
onAccent: "#05223f",
|
|
93
|
+
accentSoft: "#153f63",
|
|
94
|
+
focus: "#ffb27a",
|
|
95
|
+
positive: "#90e0be",
|
|
96
|
+
positiveSoft: "#123e3e",
|
|
97
|
+
warning: "#f3cf7d",
|
|
98
|
+
warningSoft: "#363620",
|
|
99
|
+
danger: "#ffa49a",
|
|
100
|
+
dangerSoft: "#45233a",
|
|
101
|
+
onDanger: "#2a0b0b",
|
|
102
|
+
info: "#b0c8ff",
|
|
103
|
+
infoSoft: "#1c3666",
|
|
104
|
+
shadow: "0 2px 0 rgb(2 10 24 / 0.45)",
|
|
105
|
+
bgTexture: gridPaper(6, 11),
|
|
106
|
+
scrim: "rgb(2 10 24 / 0.7)"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
elevation: {
|
|
110
|
+
light: {
|
|
111
|
+
sm: "0 1px 0 rgb(11 35 64 / 0.1)",
|
|
112
|
+
md: "0 2px 0 rgb(11 35 64 / 0.1), 0 6px 14px rgb(11 35 64 / 0.06)",
|
|
113
|
+
lg: "0 3px 0 rgb(11 35 64 / 0.12), 0 18px 36px rgb(11 35 64 / 0.14)"
|
|
114
|
+
},
|
|
115
|
+
dark: {
|
|
116
|
+
sm: "0 1px 0 rgb(2 10 24 / 0.5)",
|
|
117
|
+
md: "0 2px 0 rgb(2 10 24 / 0.5), 0 6px 14px rgb(2 10 24 / 0.35)",
|
|
118
|
+
lg: "0 3px 0 rgb(2 10 24 / 0.55), 0 18px 36px rgb(2 10 24 / 0.5)"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
fontSize: {
|
|
122
|
+
xs: "0.75rem",
|
|
123
|
+
sm: "0.875rem",
|
|
124
|
+
md: "1rem",
|
|
125
|
+
lg: "1.1875rem",
|
|
126
|
+
xl: "1.375rem",
|
|
127
|
+
"2xl": "clamp(1.625rem, 2.6vw, 2rem)",
|
|
128
|
+
"3xl": "clamp(2rem, 3.6vw, 2.75rem)",
|
|
129
|
+
display: "clamp(2.75rem, 9vw, 5.5rem)"
|
|
130
|
+
},
|
|
131
|
+
line: {
|
|
132
|
+
tight: "1",
|
|
133
|
+
snug: "1.2",
|
|
134
|
+
body: "1.55"
|
|
135
|
+
},
|
|
136
|
+
tracking: {
|
|
137
|
+
tight: "-0.025em",
|
|
138
|
+
snug: "-0.01em",
|
|
139
|
+
wide: "0.06em"
|
|
140
|
+
},
|
|
141
|
+
space: {
|
|
142
|
+
3: "0.625rem",
|
|
143
|
+
4: "0.875rem",
|
|
144
|
+
5: "1.125rem",
|
|
145
|
+
6: "1.25rem",
|
|
146
|
+
8: "1.75rem",
|
|
147
|
+
10: "2.25rem",
|
|
148
|
+
12: "2.75rem",
|
|
149
|
+
16: "3.5rem",
|
|
150
|
+
20: "4.5rem",
|
|
151
|
+
24: "5.5rem",
|
|
152
|
+
page: "clamp(1rem, 3.5vw, 2.5rem)"
|
|
153
|
+
},
|
|
154
|
+
size: {
|
|
155
|
+
content: "76rem",
|
|
156
|
+
prose: "70ch",
|
|
157
|
+
header: "4rem"
|
|
158
|
+
},
|
|
159
|
+
radius: {
|
|
160
|
+
sm: "2px",
|
|
161
|
+
md: "3px",
|
|
162
|
+
lg: "4px"
|
|
163
|
+
},
|
|
164
|
+
control: {
|
|
165
|
+
sm: "2rem",
|
|
166
|
+
md: "2.5rem",
|
|
167
|
+
lg: "3rem"
|
|
168
|
+
},
|
|
169
|
+
border: {
|
|
170
|
+
medium: "1px",
|
|
171
|
+
thick: "2px"
|
|
172
|
+
},
|
|
173
|
+
duration: {
|
|
174
|
+
fast: "100ms",
|
|
175
|
+
base: "160ms",
|
|
176
|
+
slow: "240ms"
|
|
177
|
+
},
|
|
178
|
+
easing: {
|
|
179
|
+
standard: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
180
|
+
emphasized: "cubic-bezier(0.2, 0, 0, 1)"
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
export { blueprint };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ColorMode, ThemeDefinition } from '../types.js';
|
|
2
|
+
/** `<style id="dw-preset">` holds the active preset's CSS. */
|
|
3
|
+
export declare const presetStyleId = "dw-preset";
|
|
4
|
+
/** `<link id="dw-preset-fonts">` loads the active preset's fonts. */
|
|
5
|
+
export declare const presetFontsId = "dw-preset-fonts";
|
|
6
|
+
export type ApplyPresetOptions = {
|
|
7
|
+
/** Save the choice for the next visit. Default true. */
|
|
8
|
+
persist?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Cross-fade with a view transition when the browser supports it and the
|
|
11
|
+
* visitor allows motion. Default true.
|
|
12
|
+
*/
|
|
13
|
+
transition?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Runs inside the same update as the DOM change, e.g. React's
|
|
16
|
+
* `flushSync(() => setState(id))`, so the view transition captures both.
|
|
17
|
+
*/
|
|
18
|
+
onUpdate?: () => void;
|
|
19
|
+
};
|
|
20
|
+
/** The browser chrome color for a preset in one mode: its page background. */
|
|
21
|
+
export declare function themeColorFor(theme: ThemeDefinition, mode: ColorMode): string;
|
|
22
|
+
/** Point `<meta name="theme-color">` at the preset's page background. */
|
|
23
|
+
export declare function syncThemeColor(theme: ThemeDefinition, mode?: ColorMode): void;
|
|
24
|
+
/**
|
|
25
|
+
* Switch the whole page to `theme`: write its CSS into `<style id="dw-preset">`,
|
|
26
|
+
* set `data-preset` on `<html>`, load its fonts, update the theme color, and
|
|
27
|
+
* remember the choice. The default theme removes everything instead.
|
|
28
|
+
*/
|
|
29
|
+
export declare function applyPreset(theme: ThemeDefinition, options?: ApplyPresetOptions): void;
|
|
30
|
+
/** Go back to the default theme and forget the saved preset. */
|
|
31
|
+
export declare function clearPreset(options?: ApplyPresetOptions): void;
|
|
32
|
+
/**
|
|
33
|
+
* The saved preset id, if it names one of `presets`. Read this for the first
|
|
34
|
+
* render; `index.html` has already applied the cached CSS.
|
|
35
|
+
*/
|
|
36
|
+
export declare function readSavedPreset(presets: ThemeDefinition[]): ThemeDefinition;
|
|
37
|
+
/**
|
|
38
|
+
* Run once on boot. The pre-paint script applied whatever was cached, which
|
|
39
|
+
* may come from an older deploy. Rewrite the cache and the page from current
|
|
40
|
+
* preset data when the hash differs, and drop a preset that no longer exists.
|
|
41
|
+
*/
|
|
42
|
+
export declare function syncSavedPreset(presets: ThemeDefinition[]): ThemeDefinition;
|
|
43
|
+
/**
|
|
44
|
+
* Start loading a preset's fonts ahead of time, for example when a visitor
|
|
45
|
+
* hovers a preview, so the preview and the switch use the real type.
|
|
46
|
+
*/
|
|
47
|
+
export declare function preloadPresetFonts(theme: ThemeDefinition): void;
|