@yaks/ui 0.0.0-stage → 0.2.36
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/Address.css +9 -0
- package/Address.js +32 -0
- package/Address.js.map +1 -0
- package/Address.ts +35 -0
- package/Annotated.css +17 -0
- package/Annotated.js +27 -0
- package/Annotated.js.map +1 -0
- package/Annotated.ts +32 -0
- package/AppShell.css +133 -0
- package/AppShell.js +90 -0
- package/AppShell.js.map +1 -0
- package/AppShell.ts +75 -0
- package/At.css +16 -0
- package/At.js +28 -0
- package/At.js.map +1 -0
- package/At.ts +37 -0
- package/Attachments.css +110 -0
- package/Attachments.js +119 -0
- package/Attachments.js.map +1 -0
- package/Attachments.ts +158 -0
- package/Badge.css +41 -0
- package/Badge.js +49 -0
- package/Badge.js.map +1 -0
- package/Badge.ts +38 -0
- package/Body.css +61 -0
- package/Body.js +103 -0
- package/Body.js.map +1 -0
- package/Body.ts +144 -0
- package/Button.css +121 -0
- package/Button.js +161 -0
- package/Button.js.map +1 -0
- package/Button.ts +92 -0
- package/Card.css +173 -0
- package/Card.js +165 -0
- package/Card.js.map +1 -0
- package/Card.ts +185 -0
- package/Cards.css +16 -0
- package/Cards.js +36 -0
- package/Cards.js.map +1 -0
- package/Cards.ts +64 -0
- package/Catalog.css +53 -0
- package/Catalog.js +55 -0
- package/Catalog.js.map +1 -0
- package/Catalog.ts +77 -0
- package/Chart.css +55 -0
- package/Chart.js +54 -0
- package/Chart.js.map +1 -0
- package/Chart.ts +62 -0
- package/Check.css +27 -0
- package/Check.js +77 -0
- package/Check.js.map +1 -0
- package/Check.ts +109 -0
- package/Chip.css +64 -0
- package/Chip.js +100 -0
- package/Chip.js.map +1 -0
- package/Chip.ts +66 -0
- package/Chips.css +10 -0
- package/Chips.js +41 -0
- package/Chips.js.map +1 -0
- package/Chips.ts +49 -0
- package/Choices.css +59 -0
- package/Choices.js +56 -0
- package/Choices.js.map +1 -0
- package/Choices.ts +73 -0
- package/Combobox.js +115 -0
- package/Combobox.js.map +1 -0
- package/Combobox.ts +230 -0
- package/Composer.css +247 -0
- package/Composer.js +222 -0
- package/Composer.js.map +1 -0
- package/Composer.ts +249 -0
- package/Contents.css +87 -0
- package/Contents.js +85 -0
- package/Contents.js.map +1 -0
- package/Contents.ts +117 -0
- package/Copy.css +28 -0
- package/Copy.js +62 -0
- package/Copy.js.map +1 -0
- package/Copy.ts +76 -0
- package/Doc.css +29 -0
- package/Doc.js +46 -0
- package/Doc.js.map +1 -0
- package/Doc.ts +64 -0
- package/Dock.css +157 -0
- package/Dock.js +229 -0
- package/Dock.js.map +1 -0
- package/Dock.ts +234 -0
- package/Dot.css +132 -0
- package/Dot.js +91 -0
- package/Dot.js.map +1 -0
- package/Dot.ts +72 -0
- package/Drop.css +133 -0
- package/Drop.js +148 -0
- package/Drop.js.map +1 -0
- package/Drop.ts +162 -0
- package/Edit.css +32 -0
- package/Edit.js +77 -0
- package/Edit.js.map +1 -0
- package/Edit.ts +72 -0
- package/Empty.css +32 -0
- package/Empty.js +45 -0
- package/Empty.js.map +1 -0
- package/Empty.ts +61 -0
- package/ErrorNotice.css +107 -0
- package/ErrorNotice.js +127 -0
- package/ErrorNotice.js.map +1 -0
- package/ErrorNotice.ts +133 -0
- package/Field.css +42 -0
- package/Field.js +186 -0
- package/Field.js.map +1 -0
- package/Field.ts +251 -0
- package/Form.css +95 -0
- package/Form.js +158 -0
- package/Form.js.map +1 -0
- package/Form.ts +212 -0
- package/Gallery.css +42 -0
- package/Gallery.js +57 -0
- package/Gallery.js.map +1 -0
- package/Gallery.ts +89 -0
- package/Group.css +8 -0
- package/Group.js +25 -0
- package/Group.js.map +1 -0
- package/Group.ts +40 -0
- package/Head.css +108 -0
- package/Head.js +124 -0
- package/Head.js.map +1 -0
- package/Head.ts +161 -0
- package/Icon.css +14 -0
- package/Icon.js +79 -0
- package/Icon.js.map +1 -0
- package/Icon.ts +78 -0
- package/IconButton.css +32 -0
- package/IconButton.js +74 -0
- package/IconButton.js.map +1 -0
- package/IconButton.ts +55 -0
- package/Id.css +29 -0
- package/Id.js +42 -0
- package/Id.js.map +1 -0
- package/Id.ts +31 -0
- package/Identity.css +122 -0
- package/Identity.js +88 -0
- package/Identity.js.map +1 -0
- package/Identity.ts +100 -0
- package/Index.css +68 -0
- package/Index.js +66 -0
- package/Index.js.map +1 -0
- package/Index.ts +63 -0
- package/LICENSE +202 -0
- package/Layer.css +82 -0
- package/Layer.js +86 -0
- package/Layer.js.map +1 -0
- package/Layer.ts +85 -0
- package/Lightbox.css +86 -0
- package/Lightbox.js +69 -0
- package/Lightbox.js.map +1 -0
- package/Lightbox.ts +79 -0
- package/Loading.css +22 -0
- package/Loading.js +75 -0
- package/Loading.js.map +1 -0
- package/Loading.ts +87 -0
- package/Logo.css +32 -0
- package/Logo.js +69 -0
- package/Logo.js.map +1 -0
- package/Logo.ts +81 -0
- package/Match.css +7 -0
- package/Match.js +51 -0
- package/Match.js.map +1 -0
- package/Match.ts +53 -0
- package/Menu.css +202 -0
- package/Menu.js +197 -0
- package/Menu.js.map +1 -0
- package/Menu.ts +233 -0
- package/Meter.css +49 -0
- package/Meter.js +149 -0
- package/Meter.js.map +1 -0
- package/Meter.ts +126 -0
- package/Metrics.css +43 -0
- package/Metrics.js +72 -0
- package/Metrics.js.map +1 -0
- package/Metrics.ts +66 -0
- package/Modal.css +94 -0
- package/Modal.js +114 -0
- package/Modal.js.map +1 -0
- package/Modal.ts +149 -0
- package/ModalDOM.css +23 -0
- package/More.css +135 -0
- package/More.js +135 -0
- package/More.js.map +1 -0
- package/More.ts +157 -0
- package/Notes.css +51 -0
- package/Notes.js +64 -0
- package/Notes.js.map +1 -0
- package/Notes.ts +95 -0
- package/Notice.css +30 -0
- package/Notice.js +50 -0
- package/Notice.js.map +1 -0
- package/Notice.ts +40 -0
- package/Overlay.css +8 -0
- package/Overlay.js +25 -0
- package/Overlay.js.map +1 -0
- package/Overlay.ts +33 -0
- package/Pager.css +33 -0
- package/Pager.js +44 -0
- package/Pager.js.map +1 -0
- package/Pager.ts +56 -0
- package/Pairs.css +50 -0
- package/Pairs.js +45 -0
- package/Pairs.js.map +1 -0
- package/Pairs.ts +88 -0
- package/Palette.css +77 -0
- package/Palette.js +41 -0
- package/Palette.js.map +1 -0
- package/Palette.ts +44 -0
- package/Panes.css +68 -0
- package/Panes.js +100 -0
- package/Panes.js.map +1 -0
- package/Panes.ts +97 -0
- package/Passage.css +58 -0
- package/Passage.js +80 -0
- package/Passage.js.map +1 -0
- package/Passage.ts +112 -0
- package/Peek.css +75 -0
- package/Peek.js +51 -0
- package/Peek.js.map +1 -0
- package/Peek.ts +74 -0
- package/Pills.css +127 -0
- package/Pills.js +119 -0
- package/Pills.js.map +1 -0
- package/Pills.ts +131 -0
- package/Plan.css +73 -0
- package/Plan.js +62 -0
- package/Plan.js.map +1 -0
- package/Plan.ts +80 -0
- package/Popover.css +47 -0
- package/Popover.js +62 -0
- package/Popover.js.map +1 -0
- package/Popover.ts +80 -0
- package/Preview.css +89 -0
- package/Preview.js +84 -0
- package/Preview.js.map +1 -0
- package/Preview.ts +98 -0
- package/Prop.css +117 -0
- package/Prop.js +94 -0
- package/Prop.js.map +1 -0
- package/Prop.ts +91 -0
- package/Quote.css +55 -0
- package/Quote.js +79 -0
- package/Quote.js.map +1 -0
- package/Quote.ts +85 -0
- package/README.md +596 -2
- package/Report.css +76 -0
- package/Report.js +105 -0
- package/Report.js.map +1 -0
- package/Report.ts +118 -0
- package/Rows.css +289 -0
- package/Rows.js +265 -0
- package/Rows.js.map +1 -0
- package/Rows.ts +337 -0
- package/Save.css +112 -0
- package/Save.js +100 -0
- package/Save.js.map +1 -0
- package/Save.ts +102 -0
- package/Section.css +52 -0
- package/Section.js +73 -0
- package/Section.js.map +1 -0
- package/Section.ts +86 -0
- package/Select.css +140 -0
- package/Select.js +208 -0
- package/Select.js.map +1 -0
- package/Select.ts +238 -0
- package/Shell.css +292 -0
- package/Shell.js +197 -0
- package/Shell.js.map +1 -0
- package/Shell.ts +193 -0
- package/SideNav.css +105 -0
- package/SideNav.js +197 -0
- package/SideNav.js.map +1 -0
- package/SideNav.ts +189 -0
- package/Skip.css +11 -0
- package/Skip.js +18 -0
- package/Skip.js.map +1 -0
- package/Skip.ts +16 -0
- package/Spark.css +14 -0
- package/Spark.js +84 -0
- package/Spark.js.map +1 -0
- package/Spark.ts +67 -0
- package/Stack.css +13 -0
- package/Stack.js +20 -0
- package/Stack.js.map +1 -0
- package/Stack.ts +31 -0
- package/Stamp.css +11 -0
- package/Stamp.js +40 -0
- package/Stamp.js.map +1 -0
- package/Stamp.ts +62 -0
- package/State.css +10 -0
- package/State.js +38 -0
- package/State.js.map +1 -0
- package/State.ts +38 -0
- package/Surface.css +139 -0
- package/Surface.js +79 -0
- package/Surface.js.map +1 -0
- package/Surface.ts +55 -0
- package/Table.css +147 -0
- package/Table.js +289 -0
- package/Table.js.map +1 -0
- package/Table.ts +343 -0
- package/Tabs.css +100 -0
- package/Tabs.js +108 -0
- package/Tabs.js.map +1 -0
- package/Tabs.ts +111 -0
- package/Tile.css +164 -0
- package/Tile.js +211 -0
- package/Tile.js.map +1 -0
- package/Tile.ts +174 -0
- package/Time.css +5 -0
- package/Time.js +80 -0
- package/Time.js.map +1 -0
- package/Time.ts +105 -0
- package/Timeline.css +35 -0
- package/Timeline.js +55 -0
- package/Timeline.js.map +1 -0
- package/Timeline.ts +84 -0
- package/Tip.css +18 -0
- package/Tip.js +24 -0
- package/Tip.js.map +1 -0
- package/Tip.ts +29 -0
- package/Toast.css +25 -0
- package/Toast.js +32 -0
- package/Toast.js.map +1 -0
- package/Toast.ts +34 -0
- package/Toolbar.css +66 -0
- package/Toolbar.js +58 -0
- package/Toolbar.js.map +1 -0
- package/Toolbar.ts +68 -0
- package/Transcript.css +221 -0
- package/Transcript.js +254 -0
- package/Transcript.js.map +1 -0
- package/Transcript.ts +296 -0
- package/Turns.css +49 -0
- package/Turns.js +58 -0
- package/Turns.js.map +1 -0
- package/Turns.ts +67 -0
- package/Value.css +33 -0
- package/Value.js +60 -0
- package/Value.js.map +1 -0
- package/Value.ts +48 -0
- package/_dist/Address.d.ts +3 -0
- package/_dist/Address.d.ts.map +1 -0
- package/_dist/Annotated.d.ts +3 -0
- package/_dist/Annotated.d.ts.map +1 -0
- package/_dist/AppShell.d.ts +3 -0
- package/_dist/AppShell.d.ts.map +1 -0
- package/_dist/At.d.ts +14 -0
- package/_dist/At.d.ts.map +1 -0
- package/_dist/Attachments.d.ts +6 -0
- package/_dist/Attachments.d.ts.map +1 -0
- package/_dist/Badge.d.ts +19 -0
- package/_dist/Badge.d.ts.map +1 -0
- package/_dist/Body.d.ts +5 -0
- package/_dist/Body.d.ts.map +1 -0
- package/_dist/Button.d.ts +18 -0
- package/_dist/Button.d.ts.map +1 -0
- package/_dist/Card.d.ts +28 -0
- package/_dist/Card.d.ts.map +1 -0
- package/_dist/Cards.d.ts +15 -0
- package/_dist/Cards.d.ts.map +1 -0
- package/_dist/Catalog.d.ts +3 -0
- package/_dist/Catalog.d.ts.map +1 -0
- package/_dist/Chart.d.ts +5 -0
- package/_dist/Chart.d.ts.map +1 -0
- package/_dist/Check.d.ts +17 -0
- package/_dist/Check.d.ts.map +1 -0
- package/_dist/Chip.d.ts +22 -0
- package/_dist/Chip.d.ts.map +1 -0
- package/_dist/Chips.d.ts +15 -0
- package/_dist/Chips.d.ts.map +1 -0
- package/_dist/Choices.d.ts +3 -0
- package/_dist/Choices.d.ts.map +1 -0
- package/_dist/Combobox.d.ts +55 -0
- package/_dist/Combobox.d.ts.map +1 -0
- package/_dist/Composer.d.ts +15 -0
- package/_dist/Composer.d.ts.map +1 -0
- package/_dist/Contents.d.ts +20 -0
- package/_dist/Contents.d.ts.map +1 -0
- package/_dist/Copy.d.ts +24 -0
- package/_dist/Copy.d.ts.map +1 -0
- package/_dist/Doc.d.ts +3 -0
- package/_dist/Doc.d.ts.map +1 -0
- package/_dist/Dock.d.ts +29 -0
- package/_dist/Dock.d.ts.map +1 -0
- package/_dist/Dot.d.ts +16 -0
- package/_dist/Dot.d.ts.map +1 -0
- package/_dist/Drop.d.ts +27 -0
- package/_dist/Drop.d.ts.map +1 -0
- package/_dist/Edit.d.ts +3 -0
- package/_dist/Edit.d.ts.map +1 -0
- package/_dist/Empty.d.ts +16 -0
- package/_dist/Empty.d.ts.map +1 -0
- package/_dist/ErrorNotice.d.ts +16 -0
- package/_dist/ErrorNotice.d.ts.map +1 -0
- package/_dist/Field.d.ts +53 -0
- package/_dist/Field.d.ts.map +1 -0
- package/_dist/Form.d.ts +44 -0
- package/_dist/Form.d.ts.map +1 -0
- package/_dist/Gallery.d.ts +3 -0
- package/_dist/Gallery.d.ts.map +1 -0
- package/_dist/Group.d.ts +14 -0
- package/_dist/Group.d.ts.map +1 -0
- package/_dist/Head.d.ts +13 -0
- package/_dist/Head.d.ts.map +1 -0
- package/_dist/Icon.d.ts +23 -0
- package/_dist/Icon.d.ts.map +1 -0
- package/_dist/IconButton.d.ts +8 -0
- package/_dist/IconButton.d.ts.map +1 -0
- package/_dist/Id.d.ts +3 -0
- package/_dist/Id.d.ts.map +1 -0
- package/_dist/Identity.d.ts +15 -0
- package/_dist/Identity.d.ts.map +1 -0
- package/_dist/Index.d.ts +3 -0
- package/_dist/Index.d.ts.map +1 -0
- package/_dist/Layer.d.ts +8 -0
- package/_dist/Layer.d.ts.map +1 -0
- package/_dist/Lightbox.d.ts +27 -0
- package/_dist/Lightbox.d.ts.map +1 -0
- package/_dist/Loading.d.ts +24 -0
- package/_dist/Loading.d.ts.map +1 -0
- package/_dist/Logo.d.ts +26 -0
- package/_dist/Logo.d.ts.map +1 -0
- package/_dist/Match.d.ts +5 -0
- package/_dist/Match.d.ts.map +1 -0
- package/_dist/Menu.d.ts +23 -0
- package/_dist/Menu.d.ts.map +1 -0
- package/_dist/Meter.d.ts +10 -0
- package/_dist/Meter.d.ts.map +1 -0
- package/_dist/Metrics.d.ts +3 -0
- package/_dist/Metrics.d.ts.map +1 -0
- package/_dist/Modal.d.ts +32 -0
- package/_dist/Modal.d.ts.map +1 -0
- package/_dist/More.d.ts +29 -0
- package/_dist/More.d.ts.map +1 -0
- package/_dist/Notes.d.ts +3 -0
- package/_dist/Notes.d.ts.map +1 -0
- package/_dist/Notice.d.ts +15 -0
- package/_dist/Notice.d.ts.map +1 -0
- package/_dist/Overlay.d.ts +3 -0
- package/_dist/Overlay.d.ts.map +1 -0
- package/_dist/Pager.d.ts +3 -0
- package/_dist/Pager.d.ts.map +1 -0
- package/_dist/Pairs.d.ts +3 -0
- package/_dist/Pairs.d.ts.map +1 -0
- package/_dist/Palette.d.ts +3 -0
- package/_dist/Palette.d.ts.map +1 -0
- package/_dist/Panes.d.ts +3 -0
- package/_dist/Panes.d.ts.map +1 -0
- package/_dist/Passage.d.ts +3 -0
- package/_dist/Passage.d.ts.map +1 -0
- package/_dist/Peek.d.ts +3 -0
- package/_dist/Peek.d.ts.map +1 -0
- package/_dist/Pills.d.ts +3 -0
- package/_dist/Pills.d.ts.map +1 -0
- package/_dist/Plan.d.ts +4 -0
- package/_dist/Plan.d.ts.map +1 -0
- package/_dist/Popover.d.ts +3 -0
- package/_dist/Popover.d.ts.map +1 -0
- package/_dist/Preview.d.ts +8 -0
- package/_dist/Preview.d.ts.map +1 -0
- package/_dist/Prop.d.ts +7 -0
- package/_dist/Prop.d.ts.map +1 -0
- package/_dist/Quote.d.ts +3 -0
- package/_dist/Quote.d.ts.map +1 -0
- package/_dist/Report.d.ts +8 -0
- package/_dist/Report.d.ts.map +1 -0
- package/_dist/Rows.d.ts +36 -0
- package/_dist/Rows.d.ts.map +1 -0
- package/_dist/Save.d.ts +4 -0
- package/_dist/Save.d.ts.map +1 -0
- package/_dist/Section.d.ts +3 -0
- package/_dist/Section.d.ts.map +1 -0
- package/_dist/Select.d.ts +29 -0
- package/_dist/Select.d.ts.map +1 -0
- package/_dist/Shell.d.ts +3 -0
- package/_dist/Shell.d.ts.map +1 -0
- package/_dist/SideNav.d.ts +31 -0
- package/_dist/SideNav.d.ts.map +1 -0
- package/_dist/Skip.d.ts +3 -0
- package/_dist/Skip.d.ts.map +1 -0
- package/_dist/Spark.d.ts +9 -0
- package/_dist/Spark.d.ts.map +1 -0
- package/_dist/Stack.d.ts +11 -0
- package/_dist/Stack.d.ts.map +1 -0
- package/_dist/Stamp.d.ts +3 -0
- package/_dist/Stamp.d.ts.map +1 -0
- package/_dist/State.d.ts +16 -0
- package/_dist/State.d.ts.map +1 -0
- package/_dist/Surface.d.ts +7 -0
- package/_dist/Surface.d.ts.map +1 -0
- package/_dist/Table.d.ts +10 -0
- package/_dist/Table.d.ts.map +1 -0
- package/_dist/Tabs.d.ts +30 -0
- package/_dist/Tabs.d.ts.map +1 -0
- package/_dist/Tile.d.ts +3 -0
- package/_dist/Tile.d.ts.map +1 -0
- package/_dist/Time.d.ts +24 -0
- package/_dist/Time.d.ts.map +1 -0
- package/_dist/Timeline.d.ts +3 -0
- package/_dist/Timeline.d.ts.map +1 -0
- package/_dist/Tip.d.ts +3 -0
- package/_dist/Tip.d.ts.map +1 -0
- package/_dist/Toast.d.ts +5 -0
- package/_dist/Toast.d.ts.map +1 -0
- package/_dist/Toolbar.d.ts +3 -0
- package/_dist/Toolbar.d.ts.map +1 -0
- package/_dist/Transcript.d.ts +35 -0
- package/_dist/Transcript.d.ts.map +1 -0
- package/_dist/Turns.d.ts +3 -0
- package/_dist/Turns.d.ts.map +1 -0
- package/_dist/Value.d.ts +3 -0
- package/_dist/Value.d.ts.map +1 -0
- package/_dist/ahead.d.ts +41 -0
- package/_dist/ahead.d.ts.map +1 -0
- package/_dist/chart-marks.d.ts +75 -0
- package/_dist/chart-marks.d.ts.map +1 -0
- package/_dist/clock.d.ts +4 -0
- package/_dist/clock.d.ts.map +1 -0
- package/_dist/contents-browser.d.ts +29 -0
- package/_dist/contents-browser.d.ts.map +1 -0
- package/_dist/contributions.d.ts +5 -0
- package/_dist/contributions.d.ts.map +1 -0
- package/_dist/copy-browser.d.ts +4 -0
- package/_dist/copy-browser.d.ts.map +1 -0
- package/_dist/el.d.ts +58 -0
- package/_dist/el.d.ts.map +1 -0
- package/_dist/everforest.d.ts +8 -0
- package/_dist/everforest.d.ts.map +1 -0
- package/_dist/float.d.ts +55 -0
- package/_dist/float.d.ts.map +1 -0
- package/_dist/gouache.d.ts +9 -0
- package/_dist/gouache.d.ts.map +1 -0
- package/_dist/guide.d.ts +38 -0
- package/_dist/guide.d.ts.map +1 -0
- package/_dist/halved.d.ts +3 -0
- package/_dist/halved.d.ts.map +1 -0
- package/_dist/history.d.ts +15 -0
- package/_dist/history.d.ts.map +1 -0
- package/_dist/interaction.d.ts +15 -0
- package/_dist/interaction.d.ts.map +1 -0
- package/_dist/kit.d.ts +30 -0
- package/_dist/kit.d.ts.map +1 -0
- package/_dist/ledger.d.ts +3 -0
- package/_dist/ledger.d.ts.map +1 -0
- package/_dist/linen.d.ts +8 -0
- package/_dist/linen.d.ts.map +1 -0
- package/_dist/menus-browser.d.ts +2 -0
- package/_dist/menus-browser.d.ts.map +1 -0
- package/_dist/menus.d.ts +6 -0
- package/_dist/menus.d.ts.map +1 -0
- package/_dist/mod.d.ts +47 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/modal-browser.d.ts +2 -0
- package/_dist/modal-browser.d.ts.map +1 -0
- package/_dist/modal-head.d.ts +43 -0
- package/_dist/modal-head.d.ts.map +1 -0
- package/_dist/navigate.d.ts +170 -0
- package/_dist/navigate.d.ts.map +1 -0
- package/_dist/overlays.d.ts +16 -0
- package/_dist/overlays.d.ts.map +1 -0
- package/_dist/palette-browser.d.ts +3 -0
- package/_dist/palette-browser.d.ts.map +1 -0
- package/_dist/panes-browser.d.ts +4 -0
- package/_dist/panes-browser.d.ts.map +1 -0
- package/_dist/paper.d.ts +6 -0
- package/_dist/paper.d.ts.map +1 -0
- package/_dist/parts.d.ts +102 -0
- package/_dist/parts.d.ts.map +1 -0
- package/_dist/pencil.d.ts +6 -0
- package/_dist/pencil.d.ts.map +1 -0
- package/_dist/placement.d.ts +12 -0
- package/_dist/placement.d.ts.map +1 -0
- package/_dist/relative.d.ts +41 -0
- package/_dist/relative.d.ts.map +1 -0
- package/_dist/rosepine.d.ts +8 -0
- package/_dist/rosepine.d.ts.map +1 -0
- package/_dist/routes.d.ts +20 -0
- package/_dist/routes.d.ts.map +1 -0
- package/_dist/sheet.d.ts +44 -0
- package/_dist/sheet.d.ts.map +1 -0
- package/_dist/slide.d.ts +4 -0
- package/_dist/slide.d.ts.map +1 -0
- package/_dist/stock.d.ts +21 -0
- package/_dist/stock.d.ts.map +1 -0
- package/_dist/store.d.ts +2 -0
- package/_dist/store.d.ts.map +1 -0
- package/_dist/theme.d.ts +102 -0
- package/_dist/theme.d.ts.map +1 -0
- package/_dist/ui.d.ts +2 -0
- package/_dist/ui.d.ts.map +1 -0
- package/_dist/video-cover.d.ts +3 -0
- package/_dist/video-cover.d.ts.map +1 -0
- package/_dist/viewport.d.ts +14 -0
- package/_dist/viewport.d.ts.map +1 -0
- package/_dist/wear.d.ts +5 -0
- package/_dist/wear.d.ts.map +1 -0
- package/ahead.js +81 -0
- package/ahead.js.map +1 -0
- package/ahead.ts +102 -0
- package/base.css +220 -0
- package/base.js +129 -0
- package/base.js.map +1 -0
- package/base.ts +127 -0
- package/chart-marks.js +156 -0
- package/chart-marks.js.map +1 -0
- package/chart-marks.ts +221 -0
- package/clock.js +41 -0
- package/clock.js.map +1 -0
- package/clock.ts +39 -0
- package/contents-browser.js +122 -0
- package/contents-browser.js.map +1 -0
- package/contents-browser.ts +135 -0
- package/contributions.js +28 -0
- package/contributions.js.map +1 -0
- package/contributions.ts +21 -0
- package/copy-browser.js +39 -0
- package/copy-browser.js.map +1 -0
- package/copy-browser.ts +44 -0
- package/deno.json +1 -0
- package/derived.css +64 -0
- package/el.js +176 -0
- package/el.js.map +1 -0
- package/el.ts +240 -0
- package/everforest.css +65 -0
- package/everforest.js +54 -0
- package/everforest.js.map +1 -0
- package/everforest.ts +52 -0
- package/float.js +182 -0
- package/float.js.map +1 -0
- package/float.ts +222 -0
- package/gouache.css +62 -0
- package/gouache.js +54 -0
- package/gouache.js.map +1 -0
- package/gouache.ts +52 -0
- package/guide.js +124 -0
- package/guide.js.map +1 -0
- package/guide.ts +222 -0
- package/halved.js +88 -0
- package/halved.js.map +1 -0
- package/halved.ts +102 -0
- package/history.js +11 -0
- package/history.js.map +1 -0
- package/history.ts +22 -0
- package/interaction.js +23 -0
- package/interaction.js.map +1 -0
- package/interaction.ts +43 -0
- package/kit.js +345 -0
- package/kit.js.map +1 -0
- package/kit.ts +408 -0
- package/ledger/Button.css +22 -0
- package/ledger/Head.css +72 -0
- package/ledger/Tabs.css +19 -0
- package/ledger/Tile.css +12 -0
- package/ledger.js +52 -0
- package/ledger.js.map +1 -0
- package/ledger.ts +34 -0
- package/linen.css +71 -0
- package/linen.js +54 -0
- package/linen.js.map +1 -0
- package/linen.ts +52 -0
- package/lucide.d.ts +4 -0
- package/menus-browser.js +72 -0
- package/menus-browser.js.map +1 -0
- package/menus-browser.ts +75 -0
- package/menus.js +84 -0
- package/menus.js.map +1 -0
- package/menus.ts +90 -0
- package/mod.js +46 -0
- package/mod.js.map +1 -0
- package/mod.ts +78 -0
- package/modal-browser.js +29 -0
- package/modal-browser.js.map +1 -0
- package/modal-browser.ts +31 -0
- package/modal-head.js +75 -0
- package/modal-head.js.map +1 -0
- package/modal-head.ts +81 -0
- package/navigate.js +934 -0
- package/navigate.js.map +1 -0
- package/navigate.ts +1177 -0
- package/overlays.js +177 -0
- package/overlays.js.map +1 -0
- package/overlays.ts +257 -0
- package/package.json +280 -4
- package/palette-browser.js +52 -0
- package/palette-browser.js.map +1 -0
- package/palette-browser.ts +54 -0
- package/panes-browser.js +40 -0
- package/panes-browser.js.map +1 -0
- package/panes-browser.ts +59 -0
- package/paper/base.css +28 -0
- package/paper/grain.css +18 -0
- package/paper.js +14 -0
- package/paper.js.map +1 -0
- package/paper.ts +16 -0
- package/parts.js +102 -0
- package/parts.js.map +1 -0
- package/parts.ts +117 -0
- package/pencil/Address.css +5 -0
- package/pencil/At.css +14 -0
- package/pencil/Body.css +10 -0
- package/pencil/Button.css +81 -0
- package/pencil/Card.css +175 -0
- package/pencil/Chart.css +31 -0
- package/pencil/Check.css +66 -0
- package/pencil/Chip.css +100 -0
- package/pencil/Chips.css +6 -0
- package/pencil/Copy.css +33 -0
- package/pencil/Drop.css +145 -0
- package/pencil/Empty.css +48 -0
- package/pencil/Field.css +42 -0
- package/pencil/Form.css +88 -0
- package/pencil/Loading.css +14 -0
- package/pencil/Menu.css +26 -0
- package/pencil/More.css +41 -0
- package/pencil/Report.css +11 -0
- package/pencil/Rows.css +48 -0
- package/pencil/SideNav.css +173 -0
- package/pencil/State.css +28 -0
- package/pencil/Surface.css +69 -0
- package/pencil/Tabs.css +137 -0
- package/pencil/base.css +19 -0
- package/pencil/paper.webp +0 -0
- package/pencil/pencil.svg +181 -0
- package/pencil.js +81 -0
- package/pencil.js.map +1 -0
- package/pencil.ts +34 -0
- package/placement.js +62 -0
- package/placement.js.map +1 -0
- package/placement.ts +93 -0
- package/relative.js +150 -0
- package/relative.js.map +1 -0
- package/relative.ts +186 -0
- package/resizes.js +23 -0
- package/resizes.js.map +1 -0
- package/resizes.ts +37 -0
- package/rosepine.css +59 -0
- package/rosepine.js +54 -0
- package/rosepine.js.map +1 -0
- package/rosepine.ts +52 -0
- package/routes.js +136 -0
- package/routes.js.map +1 -0
- package/routes.ts +190 -0
- package/sheet.js +7 -0
- package/sheet.js.map +1 -0
- package/sheet.ts +72 -0
- package/slide.js +37 -0
- package/slide.js.map +1 -0
- package/slide.ts +41 -0
- package/stock.js +38 -0
- package/stock.js.map +1 -0
- package/stock.ts +54 -0
- package/store.js +6 -0
- package/store.js.map +1 -0
- package/store.ts +14 -0
- package/theme.js +21 -0
- package/theme.js.map +1 -0
- package/theme.ts +159 -0
- package/ui.js +2 -0
- package/ui.js.map +1 -0
- package/ui.ts +2 -0
- package/video-cover.js +55 -0
- package/video-cover.js.map +1 -0
- package/video-cover.ts +72 -0
- package/viewport.js +56 -0
- package/viewport.js.map +1 -0
- package/viewport.ts +61 -0
- package/wear-build.ts +12 -0
- package/wear.js +40 -0
- package/wear.js.map +1 -0
- package/wear.ts +65 -0
package/rosepine.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rosé Pine, the second theme: rosepine.css for a browser, and its dark
|
|
3
|
+
* palette (Rosé Pine main) for a terminal.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/ import { beside } from "./theme.js";
|
|
7
|
+
let at = beside(import.meta.url);
|
|
8
|
+
let love = '#eb6f92';
|
|
9
|
+
let gold = '#f6c177';
|
|
10
|
+
let rose = '#ebbcba';
|
|
11
|
+
let pine = '#31748f';
|
|
12
|
+
let foam = '#9ccfd8';
|
|
13
|
+
let iris = '#c4a7e7';
|
|
14
|
+
let fg = '#e0def4';
|
|
15
|
+
/** Rosé Pine (main). */ export let rosepine = {
|
|
16
|
+
css: at('./rosepine.css'),
|
|
17
|
+
colors: {
|
|
18
|
+
bg: '#191724',
|
|
19
|
+
surface: '#1f1d2e',
|
|
20
|
+
card: '#26233a',
|
|
21
|
+
border: '#403d52',
|
|
22
|
+
border2: '#524f67',
|
|
23
|
+
text: fg,
|
|
24
|
+
muted: '#908caa',
|
|
25
|
+
dim: '#6e6a86',
|
|
26
|
+
accent: rose,
|
|
27
|
+
link: iris,
|
|
28
|
+
heading: fg,
|
|
29
|
+
info: foam,
|
|
30
|
+
active: rose,
|
|
31
|
+
positive: pine,
|
|
32
|
+
negative: love,
|
|
33
|
+
caution: gold,
|
|
34
|
+
special: iris,
|
|
35
|
+
number: gold,
|
|
36
|
+
literal: rose,
|
|
37
|
+
time: foam,
|
|
38
|
+
who: iris,
|
|
39
|
+
keyword: pine,
|
|
40
|
+
string: gold,
|
|
41
|
+
fn: rose,
|
|
42
|
+
type: foam,
|
|
43
|
+
attr: iris,
|
|
44
|
+
hues: [
|
|
45
|
+
foam,
|
|
46
|
+
gold,
|
|
47
|
+
iris,
|
|
48
|
+
pine,
|
|
49
|
+
rose,
|
|
50
|
+
love
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=rosepine.js.map
|
package/rosepine.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rosepine.js","sources":["./rosepine.ts"],"names":[],"mappings":"AAAA;;;;;CAKC,GAED,SAAS,MAAM,qBAAgC;AAE/C,IAAI,KAAK,OAAO,YAAY,GAAG;AAE/B,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,KAAK;AAET,sBAAsB,GACtB,OAAO,IAAI,WAAkB;EAC3B,KAAK,GAAG;EACR,QAAQ;IACN,IAAI;IACJ,SAAS;IACT,MAAM;IACN,QAAQ;IACR,SAAS;IACT,MAAM;IACN,OAAO;IACP,KAAK;IACL,QAAQ;IACR,MAAM;IACN,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,UAAU;IACV,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;IACT,MAAM;IACN,KAAK;IACL,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,MAAM;MAAC;MAAM;MAAM;MAAM;MAAM;MAAM;KAAK;EAC5C;AACF,EAAC"}
|
package/rosepine.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rosé Pine, the second theme: rosepine.css for a browser, and its dark
|
|
3
|
+
* palette (Rosé Pine main) for a terminal.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { beside, type Theme } from './theme.js'
|
|
9
|
+
|
|
10
|
+
let at = beside(import.meta.url)
|
|
11
|
+
|
|
12
|
+
let love = '#eb6f92'
|
|
13
|
+
let gold = '#f6c177'
|
|
14
|
+
let rose = '#ebbcba'
|
|
15
|
+
let pine = '#31748f'
|
|
16
|
+
let foam = '#9ccfd8'
|
|
17
|
+
let iris = '#c4a7e7'
|
|
18
|
+
let fg = '#e0def4'
|
|
19
|
+
|
|
20
|
+
/** Rosé Pine (main). */
|
|
21
|
+
export let rosepine: Theme = {
|
|
22
|
+
css: at('./rosepine.css'),
|
|
23
|
+
colors: {
|
|
24
|
+
bg: '#191724',
|
|
25
|
+
surface: '#1f1d2e',
|
|
26
|
+
card: '#26233a',
|
|
27
|
+
border: '#403d52',
|
|
28
|
+
border2: '#524f67',
|
|
29
|
+
text: fg,
|
|
30
|
+
muted: '#908caa',
|
|
31
|
+
dim: '#6e6a86',
|
|
32
|
+
accent: rose,
|
|
33
|
+
link: iris,
|
|
34
|
+
heading: fg,
|
|
35
|
+
info: foam,
|
|
36
|
+
active: rose,
|
|
37
|
+
positive: pine,
|
|
38
|
+
negative: love,
|
|
39
|
+
caution: gold,
|
|
40
|
+
special: iris,
|
|
41
|
+
number: gold,
|
|
42
|
+
literal: rose,
|
|
43
|
+
time: foam,
|
|
44
|
+
who: iris,
|
|
45
|
+
keyword: pine,
|
|
46
|
+
string: gold,
|
|
47
|
+
fn: rose,
|
|
48
|
+
type: foam,
|
|
49
|
+
attr: iris,
|
|
50
|
+
hues: [foam, gold, iris, pine, rose, love],
|
|
51
|
+
},
|
|
52
|
+
}
|
package/routes.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/** The static guide composes the installed ./ui facets. Query links select
|
|
2
|
+
* theme, skin and colour scheme without loading any client script. A host
|
|
3
|
+
* that reads no files (a Worker) draws the same page with sheets it built
|
|
4
|
+
* (`Dress`). */ import { bytes } from "@yaks/api/asset";
|
|
5
|
+
/* @ts-types="npm:@types/react@19.3.0" */ import { createElement as h } from "react";
|
|
6
|
+
/* @ts-types="npm:@types/react-dom@19.3.0/server" */ import { renderToStaticMarkup as renderToString } from "react-dom/server";
|
|
7
|
+
import { Contents, Guide, title } from "./guide.js";
|
|
8
|
+
import { kits, skins, stylesheet, themes } from "./kit.js";
|
|
9
|
+
import { Pairs } from "./Pairs.js";
|
|
10
|
+
import { Panes } from "./Panes.js";
|
|
11
|
+
import { Tabs } from "./Tabs.js";
|
|
12
|
+
let schemes = [
|
|
13
|
+
'system',
|
|
14
|
+
'light',
|
|
15
|
+
'dark'
|
|
16
|
+
];
|
|
17
|
+
let base = {
|
|
18
|
+
kits,
|
|
19
|
+
themes,
|
|
20
|
+
skins
|
|
21
|
+
};
|
|
22
|
+
let tabs = (all, on, href)=>/*#__PURE__*/ h(Tabs, {}, all.map((pick)=>/*#__PURE__*/ h(Tabs.Tab, {
|
|
23
|
+
key: pick,
|
|
24
|
+
href: href(pick),
|
|
25
|
+
mod: pick == on && 'on'
|
|
26
|
+
}, pick)));
|
|
27
|
+
/** What a query names: a theme and a skin among those installed, the
|
|
28
|
+
* defaults where it names none, and every theme and skin it could name. */ export let dressed = (theme = Object.keys(themes)[0], skin = Object.keys(skins)[0], contributed = base)=>{
|
|
29
|
+
let available = {
|
|
30
|
+
kits: {
|
|
31
|
+
...kits,
|
|
32
|
+
...contributed.kits
|
|
33
|
+
},
|
|
34
|
+
themes: {
|
|
35
|
+
...themes,
|
|
36
|
+
...contributed.themes
|
|
37
|
+
},
|
|
38
|
+
skins: {
|
|
39
|
+
...skins,
|
|
40
|
+
...contributed.skins
|
|
41
|
+
},
|
|
42
|
+
ux: contributed.ux
|
|
43
|
+
};
|
|
44
|
+
let t = available.themes[theme] ? theme : Object.keys(available.themes)[0];
|
|
45
|
+
let k = available.skins[skin] ? skin : 'base';
|
|
46
|
+
let c = {
|
|
47
|
+
kits: available.kits,
|
|
48
|
+
ux: available.ux,
|
|
49
|
+
theme: available.themes[t],
|
|
50
|
+
skin: available.skins[k]
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
c,
|
|
54
|
+
t,
|
|
55
|
+
k,
|
|
56
|
+
allThemes: available.themes,
|
|
57
|
+
allSkins: available.skins
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
// A file a sheet points at (a skin's pencil, its grain), which stylesheet()
|
|
61
|
+
// names by its whole address: the page asks the guide for it beside itself.
|
|
62
|
+
let FILED = /url\("(file:\/\/[^"#]+)(#[^"]*)?"\)/g;
|
|
63
|
+
let TYPES = {
|
|
64
|
+
svg: 'image/svg+xml',
|
|
65
|
+
webp: 'image/webp',
|
|
66
|
+
png: 'image/png',
|
|
67
|
+
woff2: 'font/woff2'
|
|
68
|
+
};
|
|
69
|
+
/** The whole sheet inline, the files it points at asked of the guide beside
|
|
70
|
+
* the page (`/ui/file`). */ let inline = async (c, theme, skin)=>`<style>${(await stylesheet(c)).replace(FILED, (_, at, fragment = '')=>`url("ui/file?${new URLSearchParams({
|
|
71
|
+
theme,
|
|
72
|
+
skin,
|
|
73
|
+
at
|
|
74
|
+
})}${fragment}")`)}</style>`;
|
|
75
|
+
/** The guide's page, using contributions gathered by the page's host. */ export let page = async (theme, scheme = 'system', skin, contributed = base, dress = inline)=>{
|
|
76
|
+
let { c, t, k, allThemes, allSkins } = dressed(theme, skin, contributed);
|
|
77
|
+
let s = schemes.includes(scheme) ? scheme : 'system';
|
|
78
|
+
let at = (theme, scheme, skin)=>`?${new URLSearchParams({
|
|
79
|
+
theme,
|
|
80
|
+
scheme,
|
|
81
|
+
skin
|
|
82
|
+
})}`;
|
|
83
|
+
let switches = /*#__PURE__*/ h(Pairs, {}, /*#__PURE__*/ h(Pairs.Key, {}, 'theme'), /*#__PURE__*/ h(Pairs.Value, {}, tabs(Object.keys(allThemes), t, (pick)=>at(pick, s, k))), /*#__PURE__*/ h(Pairs.Key, {}, 'scheme'), /*#__PURE__*/ h(Pairs.Value, {}, tabs(schemes, s, (pick)=>at(t, pick, k))), /*#__PURE__*/ h(Pairs.Key, {}, 'skin'), /*#__PURE__*/ h(Pairs.Value, {}, tabs([
|
|
84
|
+
'base',
|
|
85
|
+
...Object.keys(allSkins)
|
|
86
|
+
], k, (pick)=>at(t, s, pick))));
|
|
87
|
+
let shell = /*#__PURE__*/ h(Panes, {}, /*#__PURE__*/ h(Panes.Pane, {
|
|
88
|
+
mod: 'nav'
|
|
89
|
+
}, /*#__PURE__*/ h(Panes.Top, {}, switches), /*#__PURE__*/ h(Panes.Body, {}, /*#__PURE__*/ h(Contents, {
|
|
90
|
+
composition: c,
|
|
91
|
+
entry: (stop)=>({
|
|
92
|
+
href: `#${stop}`
|
|
93
|
+
})
|
|
94
|
+
}))), /*#__PURE__*/ h(Panes.Pane, {
|
|
95
|
+
mod: 'main'
|
|
96
|
+
}, /*#__PURE__*/ h(Panes.Body, {}, /*#__PURE__*/ h(Guide, {
|
|
97
|
+
composition: c
|
|
98
|
+
}))));
|
|
99
|
+
let forced = s == 'system' ? '' : ` style="color-scheme: ${s}"`;
|
|
100
|
+
return `<!doctype html><html${forced}><head><meta charset="utf-8">` + '<meta name="viewport" content="width=device-width, initial-scale=1, interactive-widget=resizes-content">' + `<title>${title}</title>${await dress(c, t, k)}</head>` + `<body>${renderToString(shell)}</body></html>`;
|
|
101
|
+
};
|
|
102
|
+
/** A file the page's sheet points at, and only such a file. */ let file = async (q, contributed)=>{
|
|
103
|
+
let at = q.get('at') ?? '';
|
|
104
|
+
let { c } = dressed(q.get('theme') ?? undefined, q.get('skin') ?? undefined, contributed);
|
|
105
|
+
if (!at || !(await stylesheet(c)).includes(`url("${at}`)) {
|
|
106
|
+
return new Response('not a file of this guide', {
|
|
107
|
+
status: 404
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
let type = TYPES[at.split('.').pop()] ?? 'application/octet-stream';
|
|
111
|
+
return new Response(await bytes(new URL(at)), {
|
|
112
|
+
headers: {
|
|
113
|
+
'content-type': type
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
/** A host passes its gathered facets; a standalone guide shows the base. */ export let routes = (host)=>[
|
|
118
|
+
{
|
|
119
|
+
method: 'GET',
|
|
120
|
+
path: '/ui',
|
|
121
|
+
handle: async (req)=>{
|
|
122
|
+
let q = new URL(req.url).searchParams;
|
|
123
|
+
return new Response(await page(q.get('theme') ?? undefined, q.get('scheme') ?? undefined, q.get('skin') ?? undefined, host?.ui), {
|
|
124
|
+
headers: {
|
|
125
|
+
'content-type': 'text/html; charset=utf-8'
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
method: 'GET',
|
|
132
|
+
path: '/ui/file',
|
|
133
|
+
handle: (req)=>file(new URL(req.url).searchParams, host?.ui)
|
|
134
|
+
}
|
|
135
|
+
];
|
|
136
|
+
//# sourceMappingURL=routes.js.map
|
package/routes.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sources":["./routes.ts"],"names":[],"mappings":"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"}
|
package/routes.ts
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/** The static guide composes the installed ./ui facets. Query links select
|
|
2
|
+
* theme, skin and colour scheme without loading any client script. A host
|
|
3
|
+
* that reads no files (a Worker) draws the same page with sheets it built
|
|
4
|
+
* (`Dress`). */
|
|
5
|
+
import type { Route } from 'jsr:@yaks/api@0.2.36'
|
|
6
|
+
import { bytes } from '@yaks/api/asset'
|
|
7
|
+
/* @ts-types="npm:@types/react@19.3.0" */ import { createElement as h } from 'react'
|
|
8
|
+
/* @ts-types="npm:@types/react-dom@19.3.0/server" */ import { renderToStaticMarkup as renderToString } from 'react-dom/server'
|
|
9
|
+
import { Contents, Guide, title } from './guide.js'
|
|
10
|
+
import { kits, skins, stylesheet, themes } from './kit.js'
|
|
11
|
+
import { Pairs } from './Pairs.js'
|
|
12
|
+
import { Panes } from './Panes.js'
|
|
13
|
+
import { Tabs } from './Tabs.js'
|
|
14
|
+
import type { Composition, Contributions, Skin, Theme } from './theme.ts'
|
|
15
|
+
|
|
16
|
+
let schemes = ['system', 'light', 'dark']
|
|
17
|
+
let base: Contributions = { kits, themes, skins }
|
|
18
|
+
let tabs = (all: string[], on: string, href: (pick: string) => string) =>
|
|
19
|
+
h(
|
|
20
|
+
Tabs,
|
|
21
|
+
{},
|
|
22
|
+
all.map((pick) =>
|
|
23
|
+
h(
|
|
24
|
+
Tabs.Tab,
|
|
25
|
+
{ key: pick, href: href(pick), mod: pick == on && 'on' },
|
|
26
|
+
pick,
|
|
27
|
+
)
|
|
28
|
+
),
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
/** What a query names: a theme and a skin among those installed, the
|
|
32
|
+
* defaults where it names none, and every theme and skin it could name. */
|
|
33
|
+
export let dressed = (
|
|
34
|
+
theme: string = Object.keys(themes)[0],
|
|
35
|
+
skin: string = Object.keys(skins)[0],
|
|
36
|
+
contributed: Contributions = base,
|
|
37
|
+
): {
|
|
38
|
+
c: Composition
|
|
39
|
+
t: string
|
|
40
|
+
k: string
|
|
41
|
+
allThemes: Record<string, Theme>
|
|
42
|
+
allSkins: Record<string, Skin>
|
|
43
|
+
} => {
|
|
44
|
+
let available = {
|
|
45
|
+
kits: { ...kits, ...contributed.kits },
|
|
46
|
+
themes: { ...themes, ...contributed.themes },
|
|
47
|
+
skins: { ...skins, ...contributed.skins },
|
|
48
|
+
ux: contributed.ux,
|
|
49
|
+
}
|
|
50
|
+
let t = available.themes[theme] ? theme : Object.keys(available.themes)[0]
|
|
51
|
+
let k = available.skins[skin] ? skin : 'base'
|
|
52
|
+
let c: Composition = {
|
|
53
|
+
kits: available.kits,
|
|
54
|
+
ux: available.ux,
|
|
55
|
+
theme: available.themes[t],
|
|
56
|
+
skin: available.skins[k],
|
|
57
|
+
}
|
|
58
|
+
return { c, t, k, allThemes: available.themes, allSkins: available.skins }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// A file a sheet points at (a skin's pencil, its grain), which stylesheet()
|
|
62
|
+
// names by its whole address: the page asks the guide for it beside itself.
|
|
63
|
+
let FILED = /url\("(file:\/\/[^"#]+)(#[^"]*)?"\)/g
|
|
64
|
+
let TYPES: Record<string, string> = {
|
|
65
|
+
svg: 'image/svg+xml',
|
|
66
|
+
webp: 'image/webp',
|
|
67
|
+
png: 'image/png',
|
|
68
|
+
woff2: 'font/woff2',
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** What puts composition `c`, the theme and skin named `theme` and `skin`,
|
|
72
|
+
* into the guide's head: a `<style>` or the `<link>`s of sheets built ahead. */
|
|
73
|
+
export type Dress = (
|
|
74
|
+
c: Composition,
|
|
75
|
+
theme: string,
|
|
76
|
+
skin: string,
|
|
77
|
+
) => string | Promise<string>
|
|
78
|
+
|
|
79
|
+
/** The whole sheet inline, the files it points at asked of the guide beside
|
|
80
|
+
* the page (`/ui/file`). */
|
|
81
|
+
let inline: Dress = async (c, theme, skin) =>
|
|
82
|
+
`<style>${
|
|
83
|
+
(await stylesheet(c)).replace(
|
|
84
|
+
FILED,
|
|
85
|
+
(_, at, fragment = '') =>
|
|
86
|
+
`url("ui/file?${new URLSearchParams({ theme, skin, at })}${fragment}")`,
|
|
87
|
+
)
|
|
88
|
+
}</style>`
|
|
89
|
+
|
|
90
|
+
/** The guide's page, using contributions gathered by the page's host. */
|
|
91
|
+
export let page = async (
|
|
92
|
+
theme?: string,
|
|
93
|
+
scheme = 'system',
|
|
94
|
+
skin?: string,
|
|
95
|
+
contributed: Contributions = base,
|
|
96
|
+
dress: Dress = inline,
|
|
97
|
+
): Promise<string> => {
|
|
98
|
+
let { c, t, k, allThemes, allSkins } = dressed(theme, skin, contributed)
|
|
99
|
+
let s = schemes.includes(scheme) ? scheme : 'system'
|
|
100
|
+
let at = (theme: string, scheme: string, skin: string) =>
|
|
101
|
+
`?${new URLSearchParams({
|
|
102
|
+
theme,
|
|
103
|
+
scheme,
|
|
104
|
+
skin,
|
|
105
|
+
})}`
|
|
106
|
+
let switches = h(
|
|
107
|
+
Pairs,
|
|
108
|
+
{},
|
|
109
|
+
h(Pairs.Key, {}, 'theme'),
|
|
110
|
+
h(
|
|
111
|
+
Pairs.Value,
|
|
112
|
+
{},
|
|
113
|
+
tabs(Object.keys(allThemes), t, (pick) => at(pick, s, k)),
|
|
114
|
+
),
|
|
115
|
+
h(Pairs.Key, {}, 'scheme'),
|
|
116
|
+
h(Pairs.Value, {}, tabs(schemes, s, (pick) => at(t, pick, k))),
|
|
117
|
+
h(Pairs.Key, {}, 'skin'),
|
|
118
|
+
h(
|
|
119
|
+
Pairs.Value,
|
|
120
|
+
{},
|
|
121
|
+
tabs(['base', ...Object.keys(allSkins)], k, (pick) => at(t, s, pick)),
|
|
122
|
+
),
|
|
123
|
+
)
|
|
124
|
+
let shell = h(
|
|
125
|
+
Panes,
|
|
126
|
+
{},
|
|
127
|
+
h(
|
|
128
|
+
Panes.Pane,
|
|
129
|
+
{ mod: 'nav' },
|
|
130
|
+
h(Panes.Top, {}, switches),
|
|
131
|
+
h(
|
|
132
|
+
Panes.Body,
|
|
133
|
+
{},
|
|
134
|
+
h(Contents, {
|
|
135
|
+
composition: c,
|
|
136
|
+
entry: (stop: string) => ({ href: `#${stop}` }),
|
|
137
|
+
}),
|
|
138
|
+
),
|
|
139
|
+
),
|
|
140
|
+
h(
|
|
141
|
+
Panes.Pane,
|
|
142
|
+
{ mod: 'main' },
|
|
143
|
+
h(Panes.Body, {}, h(Guide, { composition: c })),
|
|
144
|
+
),
|
|
145
|
+
)
|
|
146
|
+
let forced = s == 'system' ? '' : ` style="color-scheme: ${s}"`
|
|
147
|
+
return `<!doctype html><html${forced}><head><meta charset="utf-8">` +
|
|
148
|
+
'<meta name="viewport" content="width=device-width, initial-scale=1, interactive-widget=resizes-content">' +
|
|
149
|
+
`<title>${title}</title>${await dress(c, t, k)}</head>` +
|
|
150
|
+
`<body>${renderToString(shell)}</body></html>`
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** A file the page's sheet points at, and only such a file. */
|
|
154
|
+
let file = async (q: URLSearchParams, contributed?: Contributions) => {
|
|
155
|
+
let at = q.get('at') ?? ''
|
|
156
|
+
let { c } = dressed(
|
|
157
|
+
q.get('theme') ?? undefined,
|
|
158
|
+
q.get('skin') ?? undefined,
|
|
159
|
+
contributed,
|
|
160
|
+
)
|
|
161
|
+
if (!at || !(await stylesheet(c)).includes(`url("${at}`)) {
|
|
162
|
+
return new Response('not a file of this guide', { status: 404 })
|
|
163
|
+
}
|
|
164
|
+
let type = TYPES[at.split('.').pop()!] ?? 'application/octet-stream'
|
|
165
|
+
return new Response(await bytes(new URL(at)), {
|
|
166
|
+
headers: { 'content-type': type },
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** A host passes its gathered facets; a standalone guide shows the base. */
|
|
171
|
+
export let routes = (host?: { ui: Contributions }): Route[] => [{
|
|
172
|
+
method: 'GET',
|
|
173
|
+
path: '/ui',
|
|
174
|
+
handle: async (req) => {
|
|
175
|
+
let q = new URL(req.url).searchParams
|
|
176
|
+
return new Response(
|
|
177
|
+
await page(
|
|
178
|
+
q.get('theme') ?? undefined,
|
|
179
|
+
q.get('scheme') ?? undefined,
|
|
180
|
+
q.get('skin') ?? undefined,
|
|
181
|
+
host?.ui,
|
|
182
|
+
),
|
|
183
|
+
{ headers: { 'content-type': 'text/html; charset=utf-8' } },
|
|
184
|
+
)
|
|
185
|
+
},
|
|
186
|
+
}, {
|
|
187
|
+
method: 'GET',
|
|
188
|
+
path: '/ui/file',
|
|
189
|
+
handle: (req) => file(new URL(req.url).searchParams, host?.ui),
|
|
190
|
+
}]
|
package/sheet.js
ADDED
package/sheet.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.js","sources":["./sheet.ts"],"names":[],"mappings":"AAAA;;;;;CAKC,GAED,qDAAqD,GACrD"}
|
package/sheet.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The class sheet maps the kit's class names to styles for terminal layout
|
|
3
|
+
* and painting. It uses the same class names as the kit's CSS.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Everything a class can set on the text under it. */
|
|
9
|
+
export type Style = {
|
|
10
|
+
/** Foreground colour, `#rrggbb`. */
|
|
11
|
+
fg?: string
|
|
12
|
+
/** Background colour, `#rrggbb`. */
|
|
13
|
+
bg?: string
|
|
14
|
+
/** Bold. */
|
|
15
|
+
bold?: boolean
|
|
16
|
+
/** Dim. */
|
|
17
|
+
dim?: boolean
|
|
18
|
+
/** Italic. */
|
|
19
|
+
italic?: boolean
|
|
20
|
+
/** Underline. */
|
|
21
|
+
underline?: boolean
|
|
22
|
+
/** Strikethrough. */
|
|
23
|
+
strike?: boolean
|
|
24
|
+
/** Swap foreground and background — how a cursor and a selection show. */
|
|
25
|
+
inverse?: boolean
|
|
26
|
+
/** An OSC 8 hyperlink target; set from an `<a href>`, never from the sheet. */
|
|
27
|
+
href?: string
|
|
28
|
+
/** Paint this instead of the element's children. */
|
|
29
|
+
glyph?: string
|
|
30
|
+
/** Shift this element's lines right by n columns. */
|
|
31
|
+
indent?: number
|
|
32
|
+
/** A blank line after this element's lines. */
|
|
33
|
+
gap?: boolean
|
|
34
|
+
/** Paint nothing and take no room, as CSS's `display: none` does: for a
|
|
35
|
+
* part a terminal has no use for, such as a phone's menu. */
|
|
36
|
+
hidden?: boolean
|
|
37
|
+
/** Lay this element out as a block, on lines of its own, whatever its tag:
|
|
38
|
+
* CSS's `display: block` for a `button` or a `span`. */
|
|
39
|
+
block?: boolean
|
|
40
|
+
/** Keep the runs on this element's lines apart with a space, as a CSS gap
|
|
41
|
+
* keeps a flex row's items apart in a browser. Not inherited, as a gap is
|
|
42
|
+
* not. */
|
|
43
|
+
spaced?: boolean
|
|
44
|
+
/** Lay this element's children side by side, as a `row` attribute does. */
|
|
45
|
+
row?: boolean
|
|
46
|
+
/** Stack this element's children, `grow` ones sharing the rows left, as a
|
|
47
|
+
* `col` attribute does. */
|
|
48
|
+
col?: boolean
|
|
49
|
+
/** In a row, this many columns wide, as a `width` attribute says. */
|
|
50
|
+
width?: number
|
|
51
|
+
/** In a row or a column, take what is left, as a `grow` attribute does. */
|
|
52
|
+
grow?: boolean
|
|
53
|
+
/** Lay the rows under this element out in shared columns, as a CSS grid
|
|
54
|
+
* whose rows are subgrids: each `row` under it, through whatever holds it
|
|
55
|
+
* (a head, a body), takes its cells' widths from the grid's columns, a gap
|
|
56
|
+
* apart. */
|
|
57
|
+
grid?: boolean
|
|
58
|
+
/** Fold this element's lines at its width, as a `wrap` attribute does. */
|
|
59
|
+
wrap?: boolean
|
|
60
|
+
/** Where this element's line is cut to its width, end it in `…`, as CSS's
|
|
61
|
+
* `text-overflow: ellipsis` does. */
|
|
62
|
+
ellipsis?: boolean
|
|
63
|
+
/** Where this element is narrower than its width, set it to this side, as
|
|
64
|
+
* CSS's `text-align` does. */
|
|
65
|
+
align?: 'left' | 'center' | 'right'
|
|
66
|
+
/** Frame this element in a line of the sheet's class of this name, as a
|
|
67
|
+
* `border` attribute does. */
|
|
68
|
+
border?: string
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** A class sheet: class name to style. */
|
|
72
|
+
export type Sheet = Record<string, Style>
|
package/slide.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Show a newly drawn view entering from the right. */ export let slideIn = (view)=>{
|
|
2
|
+
let win = view?.ownerDocument.defaultView;
|
|
3
|
+
if (!view?.animate || win?.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
view.animate([
|
|
7
|
+
{
|
|
8
|
+
transform: 'translateX(2rem)',
|
|
9
|
+
opacity: .65
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
transform: 'none',
|
|
13
|
+
opacity: 1
|
|
14
|
+
}
|
|
15
|
+
], {
|
|
16
|
+
duration: 200,
|
|
17
|
+
easing: 'ease-out'
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
let ARRIVING = '#yak-slide:';
|
|
21
|
+
/** Carry the entering animation across a document navigation. */ export let slideAddress = (to)=>{
|
|
22
|
+
let address = new URL(to);
|
|
23
|
+
address.hash = ARRIVING + to.hash.slice(1);
|
|
24
|
+
return address;
|
|
25
|
+
};
|
|
26
|
+
/** Animate an arriving document and restore its ordinary fragment. */ export let slideArrival = (doc, content)=>{
|
|
27
|
+
let win = doc.defaultView;
|
|
28
|
+
if (!win?.location.hash.startsWith(ARRIVING)) return;
|
|
29
|
+
let anchor = win.location.hash.slice(ARRIVING.length);
|
|
30
|
+
if (anchor) win.location.replace('#' + anchor);
|
|
31
|
+
else {
|
|
32
|
+
win.history.replaceState(win.history.state, '', win.location.pathname + win.location.search);
|
|
33
|
+
}
|
|
34
|
+
let view = anchor && doc.getElementById(anchor) || doc.querySelector(content);
|
|
35
|
+
slideIn(view);
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=slide.js.map
|
package/slide.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide.js","sources":["./slide.ts"],"names":[],"mappings":"AAAA,qDAAqD,GACrD,OAAO,IAAI,UAAU,CAAC;EACpB,IAAI,MAAM,MAAM,cAAc;EAC9B,IACE,CAAC,MAAM,WACP,KAAK,aAAa,oCAAoC,SACtD;IACA;EACF;EACA,KAAK,OAAO,CACV;IAAC;MAAE,WAAW;MAAoB,SAAS;IAAI;IAAG;MAChD,WAAW;MACX,SAAS;IACX;GAAE,EACF;IAAE,UAAU;IAAK,QAAQ;EAAW;AAExC,EAAC;AAED,IAAI,WAAW;AAEf,+DAA+D,GAC/D,OAAO,IAAI,eAAe,CAAC;EACzB,IAAI,UAAU,IAAI,IAAI;EACtB,QAAQ,IAAI,GAAG,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC;EACxC,OAAO;AACT,EAAC;AAED,oEAAoE,GACpE,OAAO,IAAI,eAAe,CAAC,KAAe;EACxC,IAAI,MAAM,IAAI,WAAW;EACzB,IAAI,CAAC,KAAK,SAAS,KAAK,WAAW,WAAW;EAC9C,IAAI,SAAS,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,MAAM;EACpD,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM;OAClC;IAAC,IAAI,OAAO,CAAC,YAAY,CAC1B,IAAI,OAAO,CAAC,KAAK,EACjB,IACA,IAAI,QAAQ,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM;EAC5C;EACH,IAAI,OAAO,UAAU,IAAI,cAAc,CAAC,WAAW,IAAI,aAAa,CAAC;EACrE,QAAQ;AACV,EAAC"}
|
package/slide.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Show a newly drawn view entering from the right. */
|
|
2
|
+
export let slideIn = (view: Element | null | undefined): void => {
|
|
3
|
+
let win = view?.ownerDocument.defaultView
|
|
4
|
+
if (
|
|
5
|
+
!view?.animate ||
|
|
6
|
+
win?.matchMedia?.('(prefers-reduced-motion: reduce)').matches
|
|
7
|
+
) {
|
|
8
|
+
return
|
|
9
|
+
}
|
|
10
|
+
view.animate(
|
|
11
|
+
[{ transform: 'translateX(2rem)', opacity: .65 }, {
|
|
12
|
+
transform: 'none',
|
|
13
|
+
opacity: 1,
|
|
14
|
+
}],
|
|
15
|
+
{ duration: 200, easing: 'ease-out' },
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let ARRIVING = '#yak-slide:'
|
|
20
|
+
|
|
21
|
+
/** Carry the entering animation across a document navigation. */
|
|
22
|
+
export let slideAddress = (to: URL): URL => {
|
|
23
|
+
let address = new URL(to)
|
|
24
|
+
address.hash = ARRIVING + to.hash.slice(1)
|
|
25
|
+
return address
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Animate an arriving document and restore its ordinary fragment. */
|
|
29
|
+
export let slideArrival = (doc: Document, content: string): void => {
|
|
30
|
+
let win = doc.defaultView
|
|
31
|
+
if (!win?.location.hash.startsWith(ARRIVING)) return
|
|
32
|
+
let anchor = win.location.hash.slice(ARRIVING.length)
|
|
33
|
+
if (anchor) win.location.replace('#' + anchor)
|
|
34
|
+
else {win.history.replaceState(
|
|
35
|
+
win.history.state,
|
|
36
|
+
'',
|
|
37
|
+
win.location.pathname + win.location.search,
|
|
38
|
+
)}
|
|
39
|
+
let view = anchor && doc.getElementById(anchor) || doc.querySelector(content)
|
|
40
|
+
slideIn(view)
|
|
41
|
+
}
|
package/stock.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stock kit, every part in Linen, for a page that asks for it: a yaks
|
|
3
|
+
* app's page imports this and awaits it before drawing, and its controls wear
|
|
4
|
+
* the kit. The page's own sheets come after it, so the page wins.
|
|
5
|
+
*
|
|
6
|
+
* ```ts ignore
|
|
7
|
+
* import { wearStock } from '@yaks/ui/stock'
|
|
8
|
+
* await wearStock()
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* The sheet is one file the compiler writes beside this module
|
|
12
|
+
* (wear-build.ts), so a page loads no part modules to get it. A page that
|
|
13
|
+
* composes its own kit, theme or skin uses `@yaks/ui/wear`.
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/ /** The stock Linen stylesheet generated for compiled browser packages. */ export let linenAsset = 'wear-linen.css';
|
|
17
|
+
/** Link a sheet before `before`, settling true once it loads and false if it
|
|
18
|
+
* fails; `forget` takes a failed link back out. */ export let linkSheet = (doc, before, href, forget = false)=>new Promise((done)=>{
|
|
19
|
+
let link = doc.createElement('link');
|
|
20
|
+
link.rel = 'stylesheet';
|
|
21
|
+
link.href = href;
|
|
22
|
+
link.onload = ()=>done(true);
|
|
23
|
+
link.onerror = ()=>{
|
|
24
|
+
if (forget) link.remove();
|
|
25
|
+
done(false);
|
|
26
|
+
};
|
|
27
|
+
doc.head.insertBefore(link, before);
|
|
28
|
+
});
|
|
29
|
+
/** Link the stock kit's sheet before the page's first stylesheet, once,
|
|
30
|
+
* settling when it has loaded or failed. */ export let wearStock = async (doc = document, moduleUrl = import.meta.url)=>{
|
|
31
|
+
let href = new URL(linenAsset, moduleUrl).href;
|
|
32
|
+
let linked = [
|
|
33
|
+
...doc.querySelectorAll('link[rel=stylesheet]')
|
|
34
|
+
].some((l)=>l.href == href);
|
|
35
|
+
if (linked) return;
|
|
36
|
+
await linkSheet(doc, doc.querySelector('link[rel=stylesheet],style'), href);
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=stock.js.map
|
package/stock.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stock.js","sources":["./stock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,wEAAwE,GACxE,OAAO,IAAI,aAAa,iBAAgB;AAExC;iDACiD,GACjD,OAAO,IAAI,YAAY,CACrB,KACA,QACA,MACA,SAAS,KAAK,GAEd,IAAI,QAAiB,CAAC;IACpB,IAAI,OAAO,IAAI,aAAa,CAAC;IAC7B,KAAK,GAAG,GAAG;IACX,KAAK,IAAI,GAAG;IACZ,KAAK,MAAM,GAAG,IAAM,KAAK;IACzB,KAAK,OAAO,GAAG;MACb,IAAI,QAAQ,KAAK,MAAM;MACvB,KAAK;IACP;IACA,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM;EAC9B,GAAE;AAEJ;0CAC0C,GAC1C,OAAO,IAAI,YAAY,OACrB,MAAgB,QAAQ,EACxB,YAAoB,YAAY,GAAG;EAEnC,IAAI,OAAO,IAAI,IAAI,YAAY,WAAW,IAAI;EAC9C,IAAI,SAAS;OACR,IAAI,gBAAgB,CAAkB;GAC1C,CACE,IAAI,CAAC,CAAC,IAAM,EAAE,IAAI,IAAI;EACzB,IAAI,QAAQ;EACZ,MAAM,UAAU,KAAK,IAAI,aAAa,CAAC,+BAA+B;AACxE,EAAC"}
|