@vireo-ai/trellis-ui 0.1.61 → 0.1.62
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/THIRD_PARTY_NOTICES.md +9 -0
- package/package.json +14 -35
- package/packages/client/src/components/accordion/styles.css +21 -9
- package/packages/client/src/components/badge/styles.css +12 -0
- package/packages/client/src/components/button/styles.css +31 -5
- package/packages/client/src/components/card/styles.css +16 -0
- package/packages/client/src/components/checkbox/styles.css +29 -5
- package/packages/client/src/components/date-picker/styles.css +22 -17
- package/packages/client/src/components/field/styles.css +16 -16
- package/packages/client/src/components/input/styles.css +1 -0
- package/packages/client/src/components/keybinding/styles.css +9 -2
- package/packages/client/src/components/menu/styles.css +13 -0
- package/packages/client/src/components/panels/styles.css +12 -2
- package/packages/client/src/components/scroll-area/styles.css +169 -2
- package/packages/client/src/components/select/styles.css +28 -8
- package/packages/client/src/components/sidebar/styles.css +218 -0
- package/packages/client/src/components/slider/styles.css +57 -0
- package/packages/client/src/components/tabs/styles.css +26 -24
- package/packages/client/src/components/toast/styles.css +31 -0
- package/packages/client/src/directives/sortable.css +5 -0
- package/packages/client/src/runtime/drag-and-drop/resize-handle.css +2 -2
- package/packages/client/src/styles/components.css +8 -4
- package/packages/client/src/styles/fonts/fira-code/5.3.0/LICENSE +93 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/download.json +47 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-cyrillic-ext-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-cyrillic-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-greek-ext-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-greek-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-latin-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-symbols2-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/font.css +62 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/resource.json +82 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/LICENSE +93 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/download.json +47 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/font.css +62 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-cyrillic-ext-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-cyrillic-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-greek-ext-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-greek-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-latin-ext-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-latin-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-vietnamese-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/resource.json +82 -0
- package/packages/client/src/styles/generated/theme-fonts.css +3 -3
- package/packages/client/src/styles/generated/theme-palette.css +1001 -634
- package/packages/client/src/styles/generated/theme-runtime.css +905 -580
- package/packages/client/src/styles/generated-sources.css +1 -1
- package/packages/client/src/styles/layout.css +88 -0
- package/packages/client/src/styles/recipes/action.css +4 -16
- package/packages/client/src/styles/recipes/disabled.css +8 -0
- package/packages/client/src/styles/recipes/option.css +0 -44
- package/packages/client/src/styles/recipes/selection.css +28 -39
- package/packages/client/src/styles/theme-support.css +19 -42
- package/packages/client/src/styles/typography.css +26 -0
- package/packages/client/types/assets/bridge.d.ts +1 -2
- package/packages/client/types/capabilities/collection.d.ts +7 -0
- package/packages/client/types/capabilities/collection.entry.generated.d.ts +3 -0
- package/packages/client/types/capabilities/shortcut.d.ts +4 -3
- package/packages/client/types/components/accordion/machine.d.ts +4 -4
- package/packages/client/types/components/app/contract.d.ts +5 -5
- package/packages/client/types/components/badge/contract.d.ts +1 -0
- package/packages/client/types/components/box/contract.d.ts +17 -12
- package/packages/client/types/components/box/index.d.ts +1 -1
- package/packages/client/types/components/button/contract.d.ts +3 -2
- package/packages/client/types/components/card/contract.d.ts +27 -16
- package/packages/client/types/components/checkbox/contract.d.ts +13 -13
- package/packages/client/types/components/common.d.ts +13 -11
- package/packages/client/types/components/container/contract.d.ts +4 -3
- package/packages/client/types/components/data-grid/contract.d.ts +3 -2
- package/packages/client/types/components/date-picker/contract.d.ts +2 -2
- package/packages/client/types/components/date-picker/machine.d.ts +11 -11
- package/packages/client/types/components/dropdown/contract.d.ts +1 -1
- package/packages/client/types/components/dropdown/machine.d.ts +5 -3
- package/packages/client/types/components/field/contract.d.ts +4 -4
- package/packages/client/types/components/file-upload/contract.d.ts +3 -3
- package/packages/client/types/components/file-upload/machine.d.ts +4 -4
- package/packages/client/types/components/flex/contract.d.ts +10 -8
- package/packages/client/types/components/frame/contract.d.ts +14 -11
- package/packages/client/types/components/grid/contract.d.ts +8 -7
- package/packages/client/types/components/image/contract.d.ts +1 -0
- package/packages/client/types/components/input/contract.d.ts +1 -0
- package/packages/client/types/components/input/machine.d.ts +2 -2
- package/packages/client/types/components/layout.d.ts +91 -35
- package/packages/client/types/components/menu/contract.d.ts +27 -10
- package/packages/client/types/components/modal/contract.d.ts +22 -5
- package/packages/client/types/components/panels/contract.d.ts +2 -2
- package/packages/client/types/components/panels/index.d.ts +2 -1
- package/packages/client/types/components/panels/machine.d.ts +9 -8
- package/packages/client/types/components/radio/contract.d.ts +8 -8
- package/packages/client/types/components/scroll-area/contract.d.ts +1 -20
- package/packages/client/types/components/section/contract.d.ts +4 -3
- package/packages/client/types/components/select/contract.d.ts +3 -3
- package/packages/client/types/components/select/machine.d.ts +13 -13
- package/packages/client/types/components/select/presentation.d.ts +1 -0
- package/packages/client/types/components/sidebar/contract.d.ts +26 -8
- package/packages/client/types/components/sidebar/groups.d.ts +4 -0
- package/packages/client/types/components/sidebar/index.d.ts +5 -4
- package/packages/client/types/components/slider/contract.d.ts +1 -0
- package/packages/client/types/components/slider/machine.d.ts +10 -5
- package/packages/client/types/components/stack/contract.d.ts +10 -8
- package/packages/client/types/components/switch/contract.d.ts +8 -8
- package/packages/client/types/components/table/contract.d.ts +6 -5
- package/packages/client/types/components/tabs/index.d.ts +2 -1
- package/packages/client/types/components/tabs/machine.d.ts +2 -2
- package/packages/client/types/components/textarea/contract.d.ts +1 -1
- package/packages/client/types/components/toast/machine.d.ts +2 -2
- package/packages/client/types/components/tooltip/contract.d.ts +13 -13
- package/packages/client/types/components/tooltip/machine.d.ts +3 -7
- package/packages/client/types/core.d.ts +2 -0
- package/packages/client/types/directives/anchor.d.ts +1 -0
- package/packages/client/types/directives/animate.d.ts +3 -0
- package/packages/client/types/directives/collection.d.ts +9 -0
- package/packages/client/types/directives/index.d.ts +2 -2
- package/packages/client/types/docs/transition-docs.d.ts +0 -2
- package/packages/client/types/motion/animate.d.ts +7 -2
- package/packages/client/types/motion/config.d.ts +118 -0
- package/packages/client/types/motion/feedback.d.ts +3 -0
- package/packages/client/types/motion/index.d.ts +8 -107
- package/packages/client/types/motion/layout.d.ts +25 -0
- package/packages/client/types/motion/lifecycle.d.ts +10 -0
- package/packages/client/types/motion/owned.d.ts +15 -4
- package/packages/client/types/motion/properties.d.ts +17 -0
- package/packages/client/types/motion/recipe.d.ts +8 -75
- package/packages/client/types/motion/reduced-motion.d.ts +7 -8
- package/packages/client/types/motion/registry.d.ts +37 -0
- package/packages/client/types/motion/resize-preview.d.ts +26 -0
- package/packages/client/types/motion/resize.d.ts +3 -1
- package/packages/client/types/motion/size.d.ts +7 -4
- package/packages/client/types/runtime/anchored-popover.d.ts +11 -2
- package/packages/client/types/runtime/collection-navigation.d.ts +12 -4
- package/packages/client/types/runtime/control-size.d.ts +4 -0
- package/packages/client/types/runtime/drag-and-drop/index.d.ts +10 -3
- package/packages/client/types/runtime/drag-and-drop/sortable/ghost.d.ts +2 -1
- package/packages/client/types/runtime/engine/fragment.d.ts +2 -1
- package/packages/client/types/runtime/engine/stream.d.ts +5 -9
- package/packages/client/types/runtime/focus.d.ts +3 -1
- package/packages/client/types/runtime/index.d.ts +1 -1
- package/packages/client/types/runtime/layout-participant.d.ts +10 -9
- package/packages/client/types/runtime/layout-task.d.ts +9 -0
- package/packages/client/types/runtime/morph-engine.d.ts +1 -0
- package/packages/client/types/runtime/option-data.d.ts +2 -1
- package/packages/client/types/runtime/preferences.d.ts +14 -0
- package/packages/client/types/runtime/scroll-area-schema.d.ts +23 -0
- package/packages/client/types/runtime/ui.d.ts +3 -5
- package/packages/client/types/runtime/virtualizer-schema.d.ts +3 -1
- package/packages/client/types/runtime/virtualizer-size.d.ts +7 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-B7apK0M-.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-B7apK0M-.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/build-metadata.json +984 -1132
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{anchor-B-CbpFFU.js → anchor-DXCLxWw-.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{anchor-B-CbpFFU.js.map → anchor-DXCLxWw-.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/anchor.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection-CSrnChwy.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection-CSrnChwy.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable-DlgeSL0c.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{resizable-Ctqx_OoS.js.map → resizable-DlgeSL0c.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut-Qa2EByIB.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{shortcut-D2NgvMgw.js.map → shortcut-Qa2EByIB.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{sortable-CbIOS4Lm.js → sortable-Do3a0LA9.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{sortable-CbIOS4Lm.js.map → sortable-Do3a0LA9.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-BqejlBjS.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-BqejlBjS.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-DPMSJ1AR.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-DPMSJ1AR.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BFvGIAs8.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BFvGIAs8.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bm1phXnj.js +5 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bm1phXnj.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-et2se66r.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-et2se66r.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DnEHZCqy.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DnEHZCqy.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/control-size-BcDu1m1N.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/control-size-BcDu1m1N.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-de7TruDm.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-de7TruDm.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-DdiMUeJM.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-DdiMUeJM.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-MzcgNRti.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-MzcgNRti.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-zFOeeob-.js +6 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{element-adapter-native-data-key-DrqJDAVH.js.map → element-adapter-native-data-key-zFOeeob-.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/feedback-DP_ydw-J.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/feedback-DP_ydw-J.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/floating-ui.dom-B05VsV_p.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/floating-ui.dom-B05VsV_p.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-pk_lz9sg.js → focus-BvBkrIcj.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-pk_lz9sg.js.map → focus-BvBkrIcj.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-DYfME-Rk.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-scope-BrYxsrhc.js.map → focus-scope-DYfME-Rk.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-DVphuQVV.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-DVphuQVV.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/frame-DsKHMcuL.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/frame-DsKHMcuL.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/hover-CqeHOHpJ.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/hover-CqeHOHpJ.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/identity-BMTQyLbq.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/identity-BMTQyLbq.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-mHPk9rxi.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-mHPk9rxi.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-task-B6P8q7BH.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-task-B6P8q7BH.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-wLgk8rAu.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-wLgk8rAu.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-Do4tL7nc.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-Do4tL7nc.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/option-data-Du9mqQPo.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/option-data-Du9mqQPo.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preferences-BZyZ-kK6.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preferences-BZyZ-kK6.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preload-helper-BZ1Pz5am.js +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/properties-D8pFWF8g.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/properties-D8pFWF8g.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-DRGrWivx.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-DRGrWivx.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-preview-hnUhGcMX.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-preview-hnUhGcMX.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-area-schema-DZgYyysJ.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-area-schema-DZgYyysJ.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/size-DAtboz8G.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/size-DAtboz8G.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{styles-CQDZhwd_.js → styles-BvLCjUXV.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-BvLCjUXV.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CZ7fEQL2.js +4 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CZ7fEQL2.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-size-CTy2gO64.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-size-CTy2gO64.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DGWRKBdw.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DGWRKBdw.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-DA4Ii46-.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-DA4Ii46-.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-omt0I9Rh.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-omt0I9Rh.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-Dm3rQfQ_.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-Dm3rQfQ_.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-CtTM4Gf6.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-CtTM4Gf6.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-B4dcq4bn.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-B4dcq4bn.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-BEMZqp_I.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-BEMZqp_I.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-BeqlTp38.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-BeqlTp38.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DCluNmYW.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DCluNmYW.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-DkPKkwlt.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-DkPKkwlt.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-aSuqkRen.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-aSuqkRen.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-2UqpKKXs.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-2UqpKKXs.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-DjUHW-EE.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-DjUHW-EE.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-DYn805Mg.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-DYn805Mg.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-C4TtKM8_.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-C4TtKM8_.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-gAYZVe11.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-gAYZVe11.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-SBruA-pr.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-SBruA-pr.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-C3hjgwMw.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-C3hjgwMw.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-b0T3yohM.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-b0T3yohM.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-B08DRTzI.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-B08DRTzI.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CO-1hVz6.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CO-1hVz6.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-BlPgZVqW.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-BlPgZVqW.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-CDbYmlUb.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-CDbYmlUb.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-Dxht5Hhg.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-Dxht5Hhg.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-Ck_ZV7RN.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-Ck_ZV7RN.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-BfCjewp3.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-BfCjewp3.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-CX4J7tsN.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-CX4J7tsN.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/logical-entry-manifest.json +297 -441
- package/packages/theme-engine/README.md +70 -18
- package/packages/theme-engine/THEME_AUTHORING.md +34 -0
- package/packages/theme-engine/dist/trellis.js +544 -279
- package/packages/theme-engine/fonts/fira-code/5.3.0/LICENSE +93 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/download.json +47 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-cyrillic-ext-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-cyrillic-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-greek-ext-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-greek-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-latin-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-symbols2-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/font.css +62 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/resource.json +82 -0
- package/packages/theme-engine/fonts/inter/5.3.0/LICENSE +93 -0
- package/packages/theme-engine/fonts/inter/5.3.0/download.json +47 -0
- package/packages/theme-engine/fonts/inter/5.3.0/font.css +62 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-cyrillic-ext-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-cyrillic-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-greek-ext-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-greek-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-latin-ext-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-latin-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-vietnamese-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/resource.json +82 -0
- package/packages/theme-engine/generated/knobs/v1/color-alpha.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-foundations.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-ink.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-lighting.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-normalization.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-ramps.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/composition.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/depth.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/edges.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/index.json +398 -85
- package/packages/theme-engine/generated/knobs/v1/manifest.json +16 -52
- package/packages/theme-engine/generated/knobs/v1/radii.json +50 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-actions.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-disabled.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-disclosure.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-intents.json +856 -37
- package/packages/theme-engine/generated/knobs/v1/semantic-scrim.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-selection.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-structure.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/sizing-anatomy.json +4 -4
- package/packages/theme-engine/generated/knobs/v1/sizing-controls.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/sizing-measures.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/spacing.json +2 -2
- package/packages/theme-engine/generated/knobs/v1/substrates.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/surfaces.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/typography-anatomy.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/typography-fonts.json +158 -40
- package/packages/theme-engine/generated/knobs/v1/typography-scale.json +1 -1
- package/packages/theme-engine/generated/schemas/theme-config-v1.json +57 -36
- package/packages/theme-engine/generated/schemas/theme-manifest-v1.json +10 -37
- package/packages/theme-engine/skills/create-trellis-theme/SKILL.md +4 -5
- package/packages/client/src/components/app/styles.css +0 -1
- package/packages/client/src/components/brand/styles.css +0 -8
- package/packages/client/src/styles/motion.css +0 -26
- package/packages/client/src/styles/static.css +0 -3
- package/packages/client/types/assets/full-runtime.generated.d.ts +0 -2
- package/packages/client/types/capabilities/motion.d.ts +0 -6
- package/packages/client/types/capabilities/motion.entry.generated.d.ts +0 -3
- package/packages/client/types/cdn.d.ts +0 -2
- package/packages/client/types/components/entry.generated.d.ts +0 -37
- package/packages/client/types/directives/bounds.d.ts +0 -4
- package/packages/client/types/directives/layout.d.ts +0 -3
- package/packages/client/types/index.d.ts +0 -8
- package/packages/client/types/motion/bounds.d.ts +0 -20
- package/packages/client/types/motion/controller.d.ts +0 -33
- package/packages/client/types/motion/flip.d.ts +0 -14
- package/packages/client/types/motion/plan.d.ts +0 -52
- package/packages/client/types/motion/stream.d.ts +0 -18
- package/packages/client/types/motion/targets.d.ts +0 -23
- package/packages/client/types/motion/view.d.ts +0 -27
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis-103fb43eb5e1.css +0 -14030
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.css +0 -14030
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min-584dec82495c.css +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min.css +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-COxhbtRZ.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion-CKiK3BQA.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion-CKiK3BQA.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable-Ctqx_OoS.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut-D2NgvMgw.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/alpine-machine-CE2UN4Qu.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/alpine-machine-CE2UN4Qu.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-DMrvM3JE.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-DMrvM3JE.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-lhqk7hfo.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-lhqk7hfo.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-B32HePGn.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-B32HePGn.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-ByUbMIHF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-ByUbMIHF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bl6ng6Hd.js +0 -5
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bl6ng6Hd.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-CBK89mIt.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-CBK89mIt.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-C8xqwkr0.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-C8xqwkr0.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-BxNepYBE.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-BxNepYBE.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-DrqJDAVH.js +0 -6
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-7hdXmBLE.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-7hdXmBLE.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BCTWp6Xu.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BCTWp6Xu.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BQNpmLZO.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BQNpmLZO.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BRaKxvab.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BRaKxvab.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BZWdGtgg.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BZWdGtgg.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BnqcHAaF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BnqcHAaF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BzLNUDzF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BzLNUDzF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CC6pQ0nu.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CC6pQ0nu.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CEfr2bmw.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CEfr2bmw.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CL4bjCqf.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CL4bjCqf.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CVWqQEed.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CVWqQEed.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C_SxTqg5.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C_SxTqg5.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cbyseoex.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cbyseoex.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cf2hKkwA.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cf2hKkwA.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CfYgsDun.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CfYgsDun.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cl8rInnJ.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cl8rInnJ.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Ct9H8Hlf.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Ct9H8Hlf.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D2es_Wi2.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D2es_Wi2.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DQtFqG0K.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DQtFqG0K.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-EqHVGr1d.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-EqHVGr1d.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-FCDgmA0s.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-FCDgmA0s.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-HqE8R7N1.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-HqE8R7N1.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-J0oGNBzS.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-J0oGNBzS.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-O0hEhk-2.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-O0hEhk-2.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oJwO9fIY.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oJwO9fIY.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/flip-BKThFI4L.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/flip-BKThFI4L.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-BrYxsrhc.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-9OT0mn7F.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-9OT0mn7F.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CNnHDbyo.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CNnHDbyo.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-RwlK04Cy.js +0 -3
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-RwlK04Cy.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/pdd-BG5sXFGF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/pdd-BG5sXFGF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-CQDZhwd_.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-Bg44ZmC3.js +0 -4
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-Bg44ZmC3.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DpoqsP_I.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-Dnf0aKac.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-BpFFtrfY.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-CCPYnOuT.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-BCkP5gtC.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-DaT6-YFL.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-Cc84envj.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-CtQbyblj.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DARtpJDT.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-CPO4XZkB.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-C-3lKsKm.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index-DRH3gncZ.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index-DRH3gncZ.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-BKEbDkKa.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-RIi2q1IT.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-MUHGUsup.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-DNAroAhk.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-DrGFMWGq.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-CyUCAbgG.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-BjLF548F.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-GpvEBW3K.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-OztnTlqr.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CZ7aiASg.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-G3G5d2Eo.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-bq7j1uwx.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-DkP0-rBO.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-OITEWczP.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-CkRX2qVO.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-Z4zMCScs.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index-DAz_hKiB.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index-DAz_hKiB.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis-ecb43dfd3b7b.js +0 -11
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +0 -11
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min-ecb43dfd3b7b.js +0 -11
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +0 -11
- package/packages/theme-engine/generated/knobs/v1/motion.json +0 -128
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
3
|
import { lstat, mkdir, readFile, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
4
4
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
5
6
|
//#region \0rolldown/runtime.js
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -2711,7 +2712,8 @@ var extensions = (variable, artifact, options = {}) => ({ "dev.trellis": {
|
|
|
2711
2712
|
variable,
|
|
2712
2713
|
artifact,
|
|
2713
2714
|
...options.registry === void 0 ? {} : { registry: options.registry },
|
|
2714
|
-
...options.unit === void 0 ? {} : { unit: options.unit }
|
|
2715
|
+
...options.unit === void 0 ? {} : { unit: options.unit },
|
|
2716
|
+
...options.spring === void 0 ? {} : { spring: options.spring }
|
|
2715
2717
|
},
|
|
2716
2718
|
...options.fluid === void 0 ? {} : { fluid: options.fluid }
|
|
2717
2719
|
} });
|
|
@@ -2773,36 +2775,6 @@ var shadowValue = (layers) => {
|
|
|
2773
2775
|
}));
|
|
2774
2776
|
return values.length === 1 ? values[0] : values;
|
|
2775
2777
|
};
|
|
2776
|
-
var addMotionTokens = (group, theme) => {
|
|
2777
|
-
const { tempo, elasticity, displacement, duration, displacementScale, bounce } = theme.motion;
|
|
2778
|
-
const number = (path, value, variable) => put(group, path, token("number", Number(value.toFixed(3)), variable, "runtime"));
|
|
2779
|
-
number(["motion", "tempo"], tempo, "--motion-tempo");
|
|
2780
|
-
number(["motion", "elasticity"], elasticity, "--motion-elasticity");
|
|
2781
|
-
number(["motion", "displacement"], displacement, "--motion-displacement");
|
|
2782
|
-
for (const [name, value] of Object.entries(duration)) put(group, [
|
|
2783
|
-
"motion",
|
|
2784
|
-
"duration",
|
|
2785
|
-
name
|
|
2786
|
-
], token("duration", {
|
|
2787
|
-
value,
|
|
2788
|
-
unit: "ms"
|
|
2789
|
-
}, `--motion-duration-${name}`, "runtime"));
|
|
2790
|
-
number(["motion", "displacement-scale"], displacementScale, "--motion-displacement-scale");
|
|
2791
|
-
for (const [name, value] of Object.entries({
|
|
2792
|
-
feedback: bounce.feedback,
|
|
2793
|
-
presence: bounce.presence,
|
|
2794
|
-
"presence-emphasized": bounce.presenceEmphasized,
|
|
2795
|
-
layout: bounce.layout,
|
|
2796
|
-
"layout-quick": bounce.layoutQuick,
|
|
2797
|
-
"layout-spring": bounce.layoutSpring,
|
|
2798
|
-
resize: bounce.resize,
|
|
2799
|
-
"gesture-settle": bounce.gestureSettle
|
|
2800
|
-
})) number([
|
|
2801
|
-
"motion",
|
|
2802
|
-
"bounce",
|
|
2803
|
-
name
|
|
2804
|
-
], value, `--motion-bounce-${name}`);
|
|
2805
|
-
};
|
|
2806
2778
|
var spacingName = (step) => String(step).replace(".", "-");
|
|
2807
2779
|
var addInvariantTokens = (group, theme) => {
|
|
2808
2780
|
const expandedTreatment = theme.appearances.light.semantic.interactions.disclosure.expandedTreatment;
|
|
@@ -2909,6 +2881,11 @@ var addInvariantTokens = (group, theme) => {
|
|
|
2909
2881
|
], token("dimension", alias(["radius", String(step)]), `--radius-${role}-${choice}`, "invariant", { registry: "theme" }));
|
|
2910
2882
|
}
|
|
2911
2883
|
}
|
|
2884
|
+
put(group, [
|
|
2885
|
+
"radius",
|
|
2886
|
+
"role",
|
|
2887
|
+
"dismiss"
|
|
2888
|
+
], token("dimension", alias(["radius", String(theme.radius.dismiss)]), "--radius-dismiss", "invariant", { registry: "theme" }));
|
|
2912
2889
|
put(group, ["radius", "none"], dimensionToken(0, "--radius-none"));
|
|
2913
2890
|
put(group, ["radius", "full"], dimensionToken(9999, "--radius-full"));
|
|
2914
2891
|
put(group, ["radius", "circle"], token("number", .5, "--radius-circle", "invariant", {
|
|
@@ -3019,7 +2996,6 @@ var addInvariantTokens = (group, theme) => {
|
|
|
3019
2996
|
registry: "theme",
|
|
3020
2997
|
unit: "ch"
|
|
3021
2998
|
}));
|
|
3022
|
-
addMotionTokens(group, theme);
|
|
3023
2999
|
};
|
|
3024
3000
|
var compositeColor = (semantic, substrate, surface) => semantic?.composites.find((candidate) => candidate.substrate === substrate && candidate.surface === surface)?.color;
|
|
3025
3001
|
var addAppearanceTokens = (group, appearance) => {
|
|
@@ -3222,6 +3198,7 @@ var generateDesignTokens = (theme) => {
|
|
|
3222
3198
|
//#endregion
|
|
3223
3199
|
//#region packages/theme-engine/src/design-tokens/validate.ts
|
|
3224
3200
|
var TOKEN_TYPES = /* @__PURE__ */ new Set([
|
|
3201
|
+
"cubicBezier",
|
|
3225
3202
|
"color",
|
|
3226
3203
|
"dimension",
|
|
3227
3204
|
"duration",
|
|
@@ -3349,7 +3326,12 @@ var validateFontResource = (value, path, diagnostics) => {
|
|
|
3349
3326
|
reject(diagnostics, path, value, "A font resource must be an object.");
|
|
3350
3327
|
return;
|
|
3351
3328
|
}
|
|
3352
|
-
if (typeof value.
|
|
3329
|
+
if (typeof value.resourceId !== "string") reject(diagnostics, `${path}/resourceId`, value.resourceId, "A font resource name must be a string.");
|
|
3330
|
+
if (value.type === "fontsource") {
|
|
3331
|
+
if (typeof value.id !== "string" || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(value.id)) reject(diagnostics, `${path}/id`, value.id, "Invalid Fontsource catalog id.");
|
|
3332
|
+
if (typeof value.version !== "string" || !/^\d+\.\d+\.\d+$/.test(value.version)) reject(diagnostics, `${path}/version`, value.version, "Fontsource requires an exact package version.");
|
|
3333
|
+
return;
|
|
3334
|
+
}
|
|
3353
3335
|
if (value.type === "bunny") {
|
|
3354
3336
|
if (typeof value.url !== "string") reject(diagnostics, `${path}/url`, value.url, "A Bunny font resource URL must be a string.");
|
|
3355
3337
|
return;
|
|
@@ -3369,6 +3351,7 @@ var validateFontResource = (value, path, diagnostics) => {
|
|
|
3369
3351
|
return;
|
|
3370
3352
|
}
|
|
3371
3353
|
for (const field of ["family", "src"]) if (typeof face[field] !== "string") reject(diagnostics, `${facePath}/${field}`, face[field], `Font face ${field} must be a string.`);
|
|
3354
|
+
if (face.unicodeRange !== void 0 && (typeof face.unicodeRange !== "string" || !/^U\+[0-9A-F?]+(?:-[0-9A-F]+)?(?:\s*,\s*U\+[0-9A-F?]+(?:-[0-9A-F]+)?)*$/i.test(face.unicodeRange))) reject(diagnostics, `${facePath}/unicodeRange`, face.unicodeRange, "Invalid font Unicode range.");
|
|
3372
3355
|
if (!FONT_FORMATS.has(String(face.format))) reject(diagnostics, `${facePath}/format`, face.format, "The font face format is not supported by Trellis.");
|
|
3373
3356
|
if (!FONT_STYLES.has(String(face.style))) reject(diagnostics, `${facePath}/style`, face.style, "The font face style is not supported by Trellis.");
|
|
3374
3357
|
if (!isRecord$1(face.weight)) reject(diagnostics, `${facePath}/weight`, face.weight, "Font face weight must be an object.");
|
|
@@ -3401,6 +3384,9 @@ var validateTokenValue = (type, value, path, diagnostics) => {
|
|
|
3401
3384
|
case "dimension":
|
|
3402
3385
|
validateDimension(value, path, diagnostics);
|
|
3403
3386
|
break;
|
|
3387
|
+
case "cubicBezier":
|
|
3388
|
+
if (!Array.isArray(value) || value.length !== 4 || !value.every(isFiniteNumber) || value[0] < 0 || value[0] > 1 || value[2] < 0 || value[2] > 1) reject(diagnostics, path, value, "A cubic bezier must contain four finite coordinates with x values from 0 to 1.");
|
|
3389
|
+
break;
|
|
3404
3390
|
case "duration":
|
|
3405
3391
|
validateDimension(value, path, diagnostics, DURATION_UNITS);
|
|
3406
3392
|
break;
|
|
@@ -5071,7 +5057,12 @@ var RadiusConfigSchema = Type.Object({
|
|
|
5071
5057
|
control: Type.Optional(RadiusStepSchema),
|
|
5072
5058
|
surface: Type.Optional(RadiusStepSchema),
|
|
5073
5059
|
overlay: Type.Optional(RadiusStepSchema)
|
|
5074
|
-
}, closed$1))
|
|
5060
|
+
}, closed$1)),
|
|
5061
|
+
dismiss: Type.Optional(Type.Union([
|
|
5062
|
+
RadiusStepSchema,
|
|
5063
|
+
Type.Literal("none"),
|
|
5064
|
+
Type.Literal("full")
|
|
5065
|
+
]))
|
|
5075
5066
|
}, closed$1);
|
|
5076
5067
|
var SpacingStepSchema = Type.Number({
|
|
5077
5068
|
minimum: 0,
|
|
@@ -5197,37 +5188,46 @@ var FontWeightRangeSchema = Type.Object({
|
|
|
5197
5188
|
maximum: 1e3
|
|
5198
5189
|
})
|
|
5199
5190
|
}, closed$1);
|
|
5200
|
-
var FontResourceSchema = Type.Union([
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
})
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
family: Type.String({
|
|
5210
|
-
minLength: 1,
|
|
5211
|
-
maxLength: 128
|
|
5212
|
-
}),
|
|
5213
|
-
src: Type.String({
|
|
5191
|
+
var FontResourceSchema = Type.Union([
|
|
5192
|
+
Type.Object({
|
|
5193
|
+
type: Type.Literal("fontsource"),
|
|
5194
|
+
id: Type.String({ pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" }),
|
|
5195
|
+
version: Type.String({ pattern: "^\\d+\\.\\d+\\.\\d+$" })
|
|
5196
|
+
}, closed$1),
|
|
5197
|
+
Type.Object({
|
|
5198
|
+
type: Type.Literal("bunny"),
|
|
5199
|
+
url: Type.String({
|
|
5214
5200
|
minLength: 1,
|
|
5215
5201
|
maxLength: 2048
|
|
5216
|
-
})
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
Type.
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
Type.
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5202
|
+
})
|
|
5203
|
+
}, closed$1),
|
|
5204
|
+
Type.Object({
|
|
5205
|
+
type: Type.Literal("local"),
|
|
5206
|
+
faces: Type.Array(Type.Object({
|
|
5207
|
+
family: Type.String({
|
|
5208
|
+
minLength: 1,
|
|
5209
|
+
maxLength: 128
|
|
5210
|
+
}),
|
|
5211
|
+
src: Type.String({
|
|
5212
|
+
minLength: 1,
|
|
5213
|
+
maxLength: 2048
|
|
5214
|
+
}),
|
|
5215
|
+
format: Type.Union([
|
|
5216
|
+
Type.Literal("woff2"),
|
|
5217
|
+
Type.Literal("woff"),
|
|
5218
|
+
Type.Literal("opentype"),
|
|
5219
|
+
Type.Literal("truetype")
|
|
5220
|
+
]),
|
|
5221
|
+
weight: FontWeightRangeSchema,
|
|
5222
|
+
style: Type.Union([
|
|
5223
|
+
Type.Literal("normal"),
|
|
5224
|
+
Type.Literal("italic"),
|
|
5225
|
+
Type.Literal("oblique")
|
|
5226
|
+
]),
|
|
5227
|
+
unicodeRange: Type.Optional(Type.String({ pattern: "^U\\+[0-9A-Fa-f?]+(?:-[0-9A-Fa-f]+)?(?:\\s*,\\s*U\\+[0-9A-Fa-f?]+(?:-[0-9A-Fa-f]+)?)*$" }))
|
|
5228
|
+
}, closed$1), { minItems: 1 })
|
|
5229
|
+
}, closed$1)
|
|
5230
|
+
]);
|
|
5231
5231
|
var FontFamilyBindingSchema = Type.Object({
|
|
5232
5232
|
resource: FontResourceNameSchema,
|
|
5233
5233
|
family: Type.String({
|
|
@@ -5488,6 +5488,11 @@ var IntentRoleProfileSchema = Type.Object({
|
|
|
5488
5488
|
rest: Type.Optional(SemanticColorReferenceSchema),
|
|
5489
5489
|
hover: Type.Optional(SemanticColorReferenceSchema),
|
|
5490
5490
|
pressed: Type.Optional(SemanticColorReferenceSchema),
|
|
5491
|
+
strength: Type.Optional(Type.Object({
|
|
5492
|
+
rest: Type.Optional(StateLayerStrengthSchema),
|
|
5493
|
+
hover: Type.Optional(StateLayerStrengthSchema),
|
|
5494
|
+
pressed: Type.Optional(StateLayerStrengthSchema)
|
|
5495
|
+
}, closed$1)),
|
|
5491
5496
|
foreground: Type.Optional(SemanticColorReferenceSchema),
|
|
5492
5497
|
foregroundMuted: Type.Optional(SemanticColorReferenceSchema)
|
|
5493
5498
|
}, closed$1)),
|
|
@@ -5652,13 +5657,6 @@ var SemanticConfigSchema = Type.Object({
|
|
|
5652
5657
|
}, closed$1))
|
|
5653
5658
|
}, closed$1)) }, closed$1))
|
|
5654
5659
|
}, closed$1);
|
|
5655
|
-
var MotionConfigSchema = Type.Object({
|
|
5656
|
-
strategy: Type.Literal("semantic-motion"),
|
|
5657
|
-
version: Type.Literal(1),
|
|
5658
|
-
tempo: Type.Optional(Type.Number(unit)),
|
|
5659
|
-
elasticity: Type.Optional(Type.Number(unit)),
|
|
5660
|
-
displacement: Type.Optional(Type.Number(unit))
|
|
5661
|
-
}, closed$1);
|
|
5662
5660
|
var ThemeConfigSchema = Type.Object({
|
|
5663
5661
|
$schema: Type.Optional(Type.String()),
|
|
5664
5662
|
schemaVersion: Type.Literal(1),
|
|
@@ -5690,7 +5688,6 @@ var ThemeConfigSchema = Type.Object({
|
|
|
5690
5688
|
spacing: Type.Optional(SpacingConfigSchema),
|
|
5691
5689
|
typography: Type.Optional(TypographyConfigSchema),
|
|
5692
5690
|
sizing: Type.Optional(SizingConfigSchema),
|
|
5693
|
-
motion: Type.Optional(MotionConfigSchema),
|
|
5694
5691
|
semantic: Type.Optional(SemanticConfigSchema)
|
|
5695
5692
|
}, {
|
|
5696
5693
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -10806,13 +10803,6 @@ var parseColor = (input, path) => {
|
|
|
10806
10803
|
var isThemeDiagnostic = (value) => "severity" in value;
|
|
10807
10804
|
//#endregion
|
|
10808
10805
|
//#region packages/theme-engine/src/defaults.ts
|
|
10809
|
-
var BASELINE_MOTION = {
|
|
10810
|
-
strategy: "semantic-motion",
|
|
10811
|
-
version: 1,
|
|
10812
|
-
tempo: .5,
|
|
10813
|
-
elasticity: 0,
|
|
10814
|
-
displacement: .5
|
|
10815
|
-
};
|
|
10816
10806
|
var BASELINE_SUBSTRATE = {
|
|
10817
10807
|
strategy: "region-substrates",
|
|
10818
10808
|
version: 1,
|
|
@@ -10904,7 +10894,8 @@ var BASELINE_RADIUS = {
|
|
|
10904
10894
|
control: 3,
|
|
10905
10895
|
surface: 4,
|
|
10906
10896
|
overlay: 5
|
|
10907
|
-
}
|
|
10897
|
+
},
|
|
10898
|
+
dismiss: "full"
|
|
10908
10899
|
};
|
|
10909
10900
|
var BASELINE_EDGE = {
|
|
10910
10901
|
strategy: "fixed-line-weights",
|
|
@@ -10969,7 +10960,7 @@ var BASELINE_SPACING = {
|
|
|
10969
10960
|
headerGap: 2,
|
|
10970
10961
|
headerPaddingInline: 3,
|
|
10971
10962
|
headerPaddingBlock: 2,
|
|
10972
|
-
contentGap:
|
|
10963
|
+
contentGap: .5,
|
|
10973
10964
|
contentPaddingInline: 2,
|
|
10974
10965
|
contentPaddingBlock: 2
|
|
10975
10966
|
}
|
|
@@ -11104,10 +11095,10 @@ var BASELINE_SIZING = {
|
|
|
11104
11095
|
inset: fixedSizing(2)
|
|
11105
11096
|
},
|
|
11106
11097
|
menu: { minimumWidth: fixedSizing(192) },
|
|
11107
|
-
menuItem: { controlSize: "
|
|
11098
|
+
menuItem: { controlSize: "md" },
|
|
11108
11099
|
keybinding: { key: {
|
|
11109
|
-
minimum:
|
|
11110
|
-
maximum:
|
|
11100
|
+
minimum: 16,
|
|
11101
|
+
maximum: 16
|
|
11111
11102
|
} },
|
|
11112
11103
|
select: { listboxMaxHeight: fixedSizing(256) },
|
|
11113
11104
|
panel: {
|
|
@@ -11166,12 +11157,14 @@ var BASELINE_TYPOGRAPHY = {
|
|
|
11166
11157
|
},
|
|
11167
11158
|
resources: {
|
|
11168
11159
|
brand: {
|
|
11169
|
-
type: "
|
|
11170
|
-
|
|
11160
|
+
type: "fontsource",
|
|
11161
|
+
id: "inter",
|
|
11162
|
+
version: "5.3.0"
|
|
11171
11163
|
},
|
|
11172
11164
|
code: {
|
|
11173
|
-
type: "
|
|
11174
|
-
|
|
11165
|
+
type: "fontsource",
|
|
11166
|
+
id: "fira-code",
|
|
11167
|
+
version: "5.3.0"
|
|
11175
11168
|
}
|
|
11176
11169
|
},
|
|
11177
11170
|
families: {
|
|
@@ -11204,8 +11197,8 @@ var BASELINE_TYPOGRAPHY = {
|
|
|
11204
11197
|
},
|
|
11205
11198
|
2: {
|
|
11206
11199
|
size: {
|
|
11207
|
-
minimum:
|
|
11208
|
-
maximum:
|
|
11200
|
+
minimum: 13,
|
|
11201
|
+
maximum: 13
|
|
11209
11202
|
},
|
|
11210
11203
|
lineHeight: {
|
|
11211
11204
|
minimum: 20,
|
|
@@ -11416,17 +11409,22 @@ var intent = (family, neutral = false) => ({
|
|
|
11416
11409
|
},
|
|
11417
11410
|
soft: {
|
|
11418
11411
|
rest: {
|
|
11419
|
-
kind: "alpha-step",
|
|
11420
|
-
step:
|
|
11412
|
+
kind: neutral ? "alpha-step" : "step",
|
|
11413
|
+
step: neutral ? 2 : 9
|
|
11421
11414
|
},
|
|
11422
11415
|
hover: {
|
|
11423
|
-
kind: "alpha-step",
|
|
11424
|
-
step:
|
|
11416
|
+
kind: neutral ? "alpha-step" : "step",
|
|
11417
|
+
step: neutral ? 3 : 9
|
|
11425
11418
|
},
|
|
11426
11419
|
pressed: {
|
|
11427
|
-
kind: "alpha-step",
|
|
11428
|
-
step:
|
|
11420
|
+
kind: neutral ? "alpha-step" : "step",
|
|
11421
|
+
step: neutral ? 4 : 9
|
|
11429
11422
|
},
|
|
11423
|
+
...neutral ? {} : { strength: {
|
|
11424
|
+
rest: .1,
|
|
11425
|
+
hover: .15,
|
|
11426
|
+
pressed: .2
|
|
11427
|
+
} },
|
|
11430
11428
|
foreground: {
|
|
11431
11429
|
kind: "step",
|
|
11432
11430
|
step: 11
|
|
@@ -12666,6 +12664,7 @@ var validateTypography = (typography) => {
|
|
|
12666
12664
|
}
|
|
12667
12665
|
continue;
|
|
12668
12666
|
}
|
|
12667
|
+
if (resource.type === "fontsource") continue;
|
|
12669
12668
|
for (const [index, face] of resource.faces.entries()) if (face.weight.minimum > face.weight.maximum) diagnostics.push({
|
|
12670
12669
|
severity: "error",
|
|
12671
12670
|
code: "config.typography-weight-range",
|
|
@@ -12706,6 +12705,15 @@ var validateTypography = (typography) => {
|
|
|
12706
12705
|
requested: family.family,
|
|
12707
12706
|
message: `Typography family ${name} is not requested by its Bunny font resource.`
|
|
12708
12707
|
});
|
|
12708
|
+
} else if (resource.type === "fontsource") {
|
|
12709
|
+
if (family.family.toLowerCase().replaceAll(/[^a-z0-9]+/g, "-").replaceAll(/^-|-$/g, "") !== resource.id) diagnostics.push({
|
|
12710
|
+
severity: "error",
|
|
12711
|
+
code: "config.typography-family-unavailable",
|
|
12712
|
+
stage: "config",
|
|
12713
|
+
path: `/typography/families/${name}/family`,
|
|
12714
|
+
requested: family.family,
|
|
12715
|
+
message: `Typography family ${name} does not match its Fontsource catalog id.`
|
|
12716
|
+
});
|
|
12709
12717
|
} else if (!resource.faces.some((face) => face.family === family.family)) diagnostics.push({
|
|
12710
12718
|
severity: "error",
|
|
12711
12719
|
code: "config.typography-family-unavailable",
|
|
@@ -12826,7 +12834,7 @@ var validateTypography = (typography) => {
|
|
|
12826
12834
|
const resource = family === void 0 ? void 0 : typography.resources[family.resource];
|
|
12827
12835
|
if (family === void 0 || resource === void 0) continue;
|
|
12828
12836
|
const value = typography.weights[weightName];
|
|
12829
|
-
if (!(resource.type === "bunny" ? bunnyFamilies.get(family.resource)?.get(family.family.toLowerCase().trim().replaceAll(/[^a-z0-9]+/g, "-").replaceAll(/^-|-$/g, ""))?.has(value) === true : resource.faces.some((face) => face.family === family.family && face.style === "normal" && face.weight.minimum <= value && face.weight.maximum >= value))) diagnostics.push({
|
|
12837
|
+
if (!(resource.type === "fontsource" ? true : resource.type === "bunny" ? bunnyFamilies.get(family.resource)?.get(family.family.toLowerCase().trim().replaceAll(/[^a-z0-9]+/g, "-").replaceAll(/^-|-$/g, ""))?.has(value) === true : resource.faces.some((face) => face.family === family.family && face.style === "normal" && face.weight.minimum <= value && face.weight.maximum >= value))) diagnostics.push({
|
|
12830
12838
|
severity: "error",
|
|
12831
12839
|
code: "config.typography-weight-unavailable",
|
|
12832
12840
|
stage: "config",
|
|
@@ -12999,7 +13007,6 @@ var resolveThemeConfig = (input) => {
|
|
|
12999
13007
|
diagnostics.push(...validateTypography(typography));
|
|
13000
13008
|
const sizing = mergeObjects(BASELINE_SIZING, config.sizing);
|
|
13001
13009
|
diagnostics.push(...validateSizing(sizing));
|
|
13002
|
-
const motion = mergeObjects(BASELINE_MOTION, config.motion);
|
|
13003
13010
|
const semantic = resolveSemantic(config, diagnostics);
|
|
13004
13011
|
const neutral = resolveFamily(familyConfig.catalogue.get("neutral"), config, familyConfig.appearanceOverrides, policies, diagnostics);
|
|
13005
13012
|
const accent = resolveFamily(familyConfig.catalogue.get("accent"), config, familyConfig.appearanceOverrides, policies, diagnostics);
|
|
@@ -13035,7 +13042,6 @@ var resolveThemeConfig = (input) => {
|
|
|
13035
13042
|
buildPolicyProvenance(spacing, config.spacing, "/spacing", provenance);
|
|
13036
13043
|
buildPolicyProvenance(typography, config.typography, "/typography", provenance);
|
|
13037
13044
|
buildPolicyProvenance(sizing, config.sizing, "/sizing", provenance);
|
|
13038
|
-
buildPolicyProvenance(motion, config.motion, "/motion", provenance);
|
|
13039
13045
|
buildPolicyProvenance(semantic, config.semantic, "/semantic", provenance);
|
|
13040
13046
|
const authoredInteractions = config.semantic?.interactions;
|
|
13041
13047
|
if (authoredInteractions?.version === 1) {
|
|
@@ -13093,7 +13099,6 @@ var resolveThemeConfig = (input) => {
|
|
|
13093
13099
|
spacing,
|
|
13094
13100
|
typography,
|
|
13095
13101
|
sizing,
|
|
13096
|
-
motion,
|
|
13097
13102
|
semantic,
|
|
13098
13103
|
provenance
|
|
13099
13104
|
}
|
|
@@ -13115,6 +13120,13 @@ var compositeLinearRgb = (foreground, opacity, background) => [
|
|
|
13115
13120
|
foreground[1] * opacity + background[1] * (1 - opacity),
|
|
13116
13121
|
foreground[2] * opacity + background[2] * (1 - opacity)
|
|
13117
13122
|
];
|
|
13123
|
+
/** Browser source-over compositing uses encoded sRGB channels. */
|
|
13124
|
+
var compositeSrgb = (foreground, background) => {
|
|
13125
|
+
if (foreground.alpha === 1) return foreground;
|
|
13126
|
+
const source = asColor(foreground).to("srgb").coords;
|
|
13127
|
+
const destination = asColor(background).to("srgb").coords;
|
|
13128
|
+
return toCanonicalOklch(new Color("srgb", source.map((channel, index) => Number(channel) * foreground.alpha + Number(destination[index]) * (1 - foreground.alpha)), 1));
|
|
13129
|
+
};
|
|
13118
13130
|
//#endregion
|
|
13119
13131
|
//#region packages/theme-engine/src/color/policies/alpha/substrate-composite.ts
|
|
13120
13132
|
var clamp$1 = (value) => Math.min(1, Math.max(0, value));
|
|
@@ -13720,6 +13732,11 @@ var normalizeConstraintPriorityRamp = (input) => {
|
|
|
13720
13732
|
};
|
|
13721
13733
|
};
|
|
13722
13734
|
//#endregion
|
|
13735
|
+
//#region packages/theme-engine/src/color/css-color.ts
|
|
13736
|
+
var number$1 = (value) => Number(value.toPrecision(6)).toString();
|
|
13737
|
+
/** The emitted color representation is also the input to rendered contrast proof. */
|
|
13738
|
+
var cssColor = (color) => `oklch(${number$1(color.lightness * 100)}% ${number$1(color.chroma)} ${color.hue === null ? "none" : number$1(color.hue)} / ${number$1(color.alpha)})`;
|
|
13739
|
+
//#endregion
|
|
13723
13740
|
//#region packages/theme-engine/src/color/srgb-proof.ts
|
|
13724
13741
|
var isInSrgb = (color) => asColor(color).inGamut("srgb", { epsilon: 0 });
|
|
13725
13742
|
var mapToSrgb = (canonicalColor) => {
|
|
@@ -13757,7 +13774,33 @@ var proveRampInSrgb = (ramp) => ({
|
|
|
13757
13774
|
//#region packages/theme-engine/src/color/policies/pairing/accessible-ink.ts
|
|
13758
13775
|
var meetsMinimum = (solution, target) => solution.measurements.wcagRatio >= target.minimumWcagRatio;
|
|
13759
13776
|
var meetsTarget = (solution, target) => solution.measurements.wcagRatio >= target.targetWcagRatio && Math.abs(solution.measurements.apcaLc) >= target.targetApcaLc;
|
|
13760
|
-
var
|
|
13777
|
+
var measureInk = (backgrounds, color) => {
|
|
13778
|
+
const proof = (value) => {
|
|
13779
|
+
const srgb = new Color(cssColor(value)).to("srgb");
|
|
13780
|
+
const serialized = toCanonicalOklch(srgb);
|
|
13781
|
+
srgb.coords = srgb.coords.map((channel) => Math.round(Math.min(1, Math.max(0, Number(channel))) * 255) / 255);
|
|
13782
|
+
return {
|
|
13783
|
+
serialized,
|
|
13784
|
+
rendered: toCanonicalOklch(srgb)
|
|
13785
|
+
};
|
|
13786
|
+
};
|
|
13787
|
+
const proofs = backgrounds.map((surface) => {
|
|
13788
|
+
const foreground = compositeSrgb(color, surface);
|
|
13789
|
+
const floating = measureContrast(surface, foreground);
|
|
13790
|
+
const backgroundProof = proof(surface);
|
|
13791
|
+
const foregroundProof = proof(foreground);
|
|
13792
|
+
return {
|
|
13793
|
+
...floating,
|
|
13794
|
+
wcagRatio: Math.min(floating.wcagRatio, measureContrast(backgroundProof.serialized, foregroundProof.serialized).wcagRatio, measureContrast(backgroundProof.rendered, foregroundProof.rendered).wcagRatio)
|
|
13795
|
+
};
|
|
13796
|
+
});
|
|
13797
|
+
return {
|
|
13798
|
+
wcagRatio: Math.min(...proofs.map(({ wcagRatio }) => wcagRatio)),
|
|
13799
|
+
apcaLc: proofs.reduce((a, b) => Math.abs(a.apcaLc) < Math.abs(b.apcaLc) ? a : b).apcaLc
|
|
13800
|
+
};
|
|
13801
|
+
};
|
|
13802
|
+
var solvePolarity = (name, backgrounds, policy, target, polarity) => {
|
|
13803
|
+
const background = backgrounds[0];
|
|
13761
13804
|
const desiredChroma = Math.min(target.maximumChroma, background.chroma * policy.chromaInfluence);
|
|
13762
13805
|
const candidate = (lightness) => {
|
|
13763
13806
|
const color = proveColorInSrgb({
|
|
@@ -13771,15 +13814,15 @@ var solvePolarity = (name, background, policy, target, polarity) => {
|
|
|
13771
13814
|
name,
|
|
13772
13815
|
color,
|
|
13773
13816
|
polarity,
|
|
13774
|
-
measurements:
|
|
13817
|
+
measurements: measureInk(backgrounds, color),
|
|
13775
13818
|
targetMet: false
|
|
13776
13819
|
};
|
|
13777
13820
|
};
|
|
13778
13821
|
const endpoint = candidate(polarity === "darker" ? 0 : 1);
|
|
13779
13822
|
if (!meetsMinimum(endpoint, target)) return void 0;
|
|
13780
13823
|
const solveNearest = (predicate) => {
|
|
13781
|
-
let lower = polarity === "darker" ? 0 :
|
|
13782
|
-
let upper = polarity === "darker" ?
|
|
13824
|
+
let lower = polarity === "darker" ? 0 : Math.max(...backgrounds.map(({ lightness }) => lightness));
|
|
13825
|
+
let upper = polarity === "darker" ? Math.min(...backgrounds.map(({ lightness }) => lightness)) : 1;
|
|
13783
13826
|
for (let iteration = 0; iteration < 28; iteration += 1) {
|
|
13784
13827
|
const midpoint = (lower + upper) / 2;
|
|
13785
13828
|
const ink = candidate(midpoint);
|
|
@@ -13800,10 +13843,11 @@ var solvePolarity = (name, background, policy, target, polarity) => {
|
|
|
13800
13843
|
distance: Math.abs(background.lightness - solution.color.lightness)
|
|
13801
13844
|
};
|
|
13802
13845
|
};
|
|
13803
|
-
var selectSolution = (name, step,
|
|
13846
|
+
var selectSolution = (name, step, backgrounds, policy, target) => {
|
|
13847
|
+
const background = backgrounds[0];
|
|
13804
13848
|
const polarities = policy.polarity === "auto" ? ["darker", "lighter"] : [policy.polarity];
|
|
13805
13849
|
const preferred = policy.polarity === "auto" && (step === 9 || step === 10) ? background.lightness <= policy.polarityPivot ? "lighter" : "darker" : void 0;
|
|
13806
|
-
return polarities.map((polarity) => solvePolarity(name,
|
|
13850
|
+
return polarities.map((polarity) => solvePolarity(name, backgrounds, policy, target, polarity)).filter((solution) => solution !== void 0).sort((first, second) => Number(second.polarity === preferred) - Number(first.polarity === preferred) || Number(second.targetMet) - Number(first.targetMet) || (first.targetMet ? first.distance - second.distance : second.measurements.wcagRatio - first.measurements.wcagRatio) || first.distance - second.distance || (first.polarity === "darker" ? -1 : 1))[0];
|
|
13807
13851
|
};
|
|
13808
13852
|
var fitSolidInkRamp = (input) => {
|
|
13809
13853
|
const diagnostics = [];
|
|
@@ -13904,20 +13948,24 @@ var fitSolidInkRamp = (input) => {
|
|
|
13904
13948
|
diagnostics
|
|
13905
13949
|
};
|
|
13906
13950
|
};
|
|
13907
|
-
var
|
|
13908
|
-
const
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13919
|
-
|
|
13920
|
-
|
|
13951
|
+
var pairAccessibleInk = (input) => {
|
|
13952
|
+
const { name, target, path } = input;
|
|
13953
|
+
let value;
|
|
13954
|
+
if (input.preferred !== void 0) {
|
|
13955
|
+
const measurements = measureInk(input.backgrounds, input.preferred);
|
|
13956
|
+
if (measurements.wcagRatio >= target.minimumWcagRatio) value = {
|
|
13957
|
+
name,
|
|
13958
|
+
color: input.preferred,
|
|
13959
|
+
polarity: input.preferred.lightness < input.backgrounds[0].lightness ? "darker" : "lighter",
|
|
13960
|
+
measurements,
|
|
13961
|
+
targetMet: meetsTarget({ measurements }, target)
|
|
13962
|
+
};
|
|
13963
|
+
}
|
|
13964
|
+
if (value === void 0) {
|
|
13965
|
+
const solution = selectSolution(name, input.step ?? 1, input.backgrounds, input.policy, target);
|
|
13966
|
+
if (solution === void 0) return {
|
|
13967
|
+
ok: false,
|
|
13968
|
+
diagnostics: [{
|
|
13921
13969
|
severity: "error",
|
|
13922
13970
|
code: "pairing.minimum-unreachable",
|
|
13923
13971
|
stage: "pairing",
|
|
@@ -13926,21 +13974,46 @@ var pairAccessibleInks = (input) => {
|
|
|
13926
13974
|
target,
|
|
13927
13975
|
polarity: input.policy.polarity
|
|
13928
13976
|
},
|
|
13929
|
-
message: `${name} cannot meet its minimum WCAG ratio against
|
|
13930
|
-
}
|
|
13931
|
-
|
|
13932
|
-
}
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
|
|
13977
|
+
message: `${name} cannot meet its minimum WCAG ratio against every generated background with the configured polarity.`
|
|
13978
|
+
}]
|
|
13979
|
+
};
|
|
13980
|
+
const { distance: _distance, ...paired } = solution;
|
|
13981
|
+
value = paired;
|
|
13982
|
+
}
|
|
13983
|
+
return {
|
|
13984
|
+
ok: true,
|
|
13985
|
+
value,
|
|
13986
|
+
diagnostics: value.targetMet ? [] : [{
|
|
13936
13987
|
severity: "warning",
|
|
13937
13988
|
code: "pairing.target-constrained",
|
|
13938
13989
|
stage: "pairing",
|
|
13939
13990
|
path,
|
|
13940
13991
|
requested: target,
|
|
13941
|
-
effective:
|
|
13992
|
+
effective: value.measurements,
|
|
13942
13993
|
message: `${name} meets its minimum contrast but cannot reach every preferred target.`
|
|
13994
|
+
}]
|
|
13995
|
+
};
|
|
13996
|
+
};
|
|
13997
|
+
var pairAccessibleInks = (input) => {
|
|
13998
|
+
const diagnostics = [];
|
|
13999
|
+
const inks = {};
|
|
14000
|
+
const targets = [
|
|
14001
|
+
["ink", input.policy.ink],
|
|
14002
|
+
["ink-subtle", input.policy.inkSubtle],
|
|
14003
|
+
["ink-muted", input.policy.inkMuted],
|
|
14004
|
+
...Object.entries(input.policy.additional)
|
|
14005
|
+
];
|
|
14006
|
+
for (const [name, target] of targets) {
|
|
14007
|
+
const result = pairAccessibleInk({
|
|
14008
|
+
backgrounds: [input.background],
|
|
14009
|
+
policy: input.policy,
|
|
14010
|
+
target,
|
|
14011
|
+
name,
|
|
14012
|
+
path: `${input.path ?? "/color"}/srgb-proof/${name}`,
|
|
14013
|
+
...input.step === void 0 ? {} : { step: input.step }
|
|
13943
14014
|
});
|
|
14015
|
+
diagnostics.push(...result.diagnostics);
|
|
14016
|
+
if (result.ok) inks[name] = result.value;
|
|
13944
14017
|
}
|
|
13945
14018
|
return diagnostics.some(({ severity }) => severity === "error") ? {
|
|
13946
14019
|
ok: false,
|
|
@@ -14560,13 +14633,13 @@ var calibrateSolidState = (rest, state, solidInk, minimumDeltaE, family, authore
|
|
|
14560
14633
|
minimumDeltaE: deltaEOK(rest.color, color)
|
|
14561
14634
|
};
|
|
14562
14635
|
};
|
|
14563
|
-
var intentOutput = (appearance, profile, families, surfaces, family) => {
|
|
14564
|
-
const color = (reference) => semanticColor(families, profile.family, reference, surfaces);
|
|
14636
|
+
var intentOutput = (appearance, profile, families, surfaces, family, path, diagnostics) => {
|
|
14637
|
+
const color = (reference, strength) => semanticColor(families, profile.family, reference, surfaces, strength);
|
|
14565
14638
|
const textRest = color(profile.text.rest);
|
|
14566
14639
|
const textHover = color(profile.text.hover);
|
|
14567
|
-
const softRest = color(profile.soft.rest);
|
|
14568
|
-
const softHover = color(profile.soft.hover);
|
|
14569
|
-
const softPressed = color(profile.soft.pressed);
|
|
14640
|
+
const softRest = color(profile.soft.rest, profile.soft.strength?.rest);
|
|
14641
|
+
const softHover = color(profile.soft.hover, profile.soft.strength?.hover);
|
|
14642
|
+
const softPressed = color(profile.soft.pressed, profile.soft.strength?.pressed);
|
|
14570
14643
|
const softInk = color(profile.soft.foreground);
|
|
14571
14644
|
const softInkMuted = color(profile.soft.foregroundMuted);
|
|
14572
14645
|
const solidRest = color(profile.solid.rest);
|
|
@@ -14595,6 +14668,42 @@ var intentOutput = (appearance, profile, families, surfaces, family) => {
|
|
|
14595
14668
|
focus,
|
|
14596
14669
|
solidInk
|
|
14597
14670
|
].some((value) => value === void 0)) return;
|
|
14671
|
+
const softBackgrounds = Object.values(surfaces.substrates).flatMap((substrate) => substrate.levels.flatMap((surface) => [
|
|
14672
|
+
softRest,
|
|
14673
|
+
softHover,
|
|
14674
|
+
softPressed
|
|
14675
|
+
].map(({ color }) => compositeSrgb(color, surface.color.mappedColor))));
|
|
14676
|
+
const softInks = {
|
|
14677
|
+
ink: softInk,
|
|
14678
|
+
inkMuted: softInkMuted
|
|
14679
|
+
};
|
|
14680
|
+
for (const [role, field] of [["ink", "foreground"], ["inkMuted", "foregroundMuted"]]) {
|
|
14681
|
+
const foreground = softInks[role];
|
|
14682
|
+
const paired = pairAccessibleInk({
|
|
14683
|
+
backgrounds: softBackgrounds,
|
|
14684
|
+
policy: family.policies.pairing,
|
|
14685
|
+
target: family.policies.pairing[role],
|
|
14686
|
+
preferred: foreground.color,
|
|
14687
|
+
name: "soft-ink",
|
|
14688
|
+
path: `${path}/soft/${field}`
|
|
14689
|
+
});
|
|
14690
|
+
diagnostics.push(...paired.diagnostics);
|
|
14691
|
+
if (!paired.ok) return void 0;
|
|
14692
|
+
if (paired.value.color !== foreground.color) diagnostics.push({
|
|
14693
|
+
severity: "information",
|
|
14694
|
+
code: "semantic.soft-ink-adjusted",
|
|
14695
|
+
stage: "semantic",
|
|
14696
|
+
path: `${path}/soft/${field}`,
|
|
14697
|
+
requested: foreground.color,
|
|
14698
|
+
effective: paired.value.color,
|
|
14699
|
+
message: "Adjusted soft ink to meet minimum contrast on rest, hover and pressed surfaces."
|
|
14700
|
+
});
|
|
14701
|
+
softInks[role] = {
|
|
14702
|
+
...foreground,
|
|
14703
|
+
color: paired.value.color,
|
|
14704
|
+
composites: paired.value.color === foreground.color ? foreground.composites : []
|
|
14705
|
+
};
|
|
14706
|
+
}
|
|
14598
14707
|
const calibratedHover = calibrateSolidState(solidRest, solidHover, solidInk, profile.solid.separation.hover[appearance], family, families[profile.family].steps[profile.solid.hover.step - 1].requestedColor.lightness - families[profile.family].steps[profile.solid.rest.step - 1].requestedColor.lightness);
|
|
14599
14708
|
const calibratedPressed = calibrateSolidState(solidRest, solidPressed, solidInk, profile.solid.separation.pressed[appearance], family, families[profile.family].steps[profile.solid.pressed.step - 1].requestedColor.lightness - families[profile.family].steps[profile.solid.rest.step - 1].requestedColor.lightness);
|
|
14600
14709
|
if (calibratedHover === void 0 || calibratedPressed === void 0) return void 0;
|
|
@@ -14607,8 +14716,7 @@ var intentOutput = (appearance, profile, families, surfaces, family) => {
|
|
|
14607
14716
|
rest: softRest,
|
|
14608
14717
|
hover: softHover,
|
|
14609
14718
|
pressed: softPressed,
|
|
14610
|
-
|
|
14611
|
-
inkMuted: softInkMuted
|
|
14719
|
+
...softInks
|
|
14612
14720
|
},
|
|
14613
14721
|
solid: {
|
|
14614
14722
|
rest: solidRest,
|
|
@@ -14629,7 +14737,7 @@ var intentOutput = (appearance, profile, families, surfaces, family) => {
|
|
|
14629
14737
|
};
|
|
14630
14738
|
};
|
|
14631
14739
|
var layer = (reference, families, surfaces, calibration = "surfaces") => semanticColor(families, reference.family, reference.color, surfaces, reference.strength, calibration);
|
|
14632
|
-
var interactionOutput = (config, families, surfaces) => {
|
|
14740
|
+
var interactionOutput = (config, families, surfaces, familyAppearances, diagnostics) => {
|
|
14633
14741
|
const hover = layer(config.actions.hover, families, surfaces, "substrates");
|
|
14634
14742
|
const pressed = layer(config.actions.pressed, families, surfaces, "substrates");
|
|
14635
14743
|
const treatments = {};
|
|
@@ -14646,11 +14754,37 @@ var interactionOutput = (config, families, surfaces) => {
|
|
|
14646
14754
|
}, families, surfaces);
|
|
14647
14755
|
const foreground = semanticColor(families, treatment.family, treatment.foreground, surfaces);
|
|
14648
14756
|
if (background === void 0 || backgroundHover === void 0 || foreground === void 0) return void 0;
|
|
14757
|
+
const policy = familyAppearances[treatment.family].policies.pairing;
|
|
14758
|
+
const backgrounds = ["workspace", "chrome"].flatMap((substrate) => surfaces.substrates[substrate].levels.flatMap((surface) => [background, backgroundHover].map(({ color }) => compositeSrgb(color, surface.color.mappedColor))));
|
|
14759
|
+
const path = `/semantic/interactions/selection/treatments/${name}/foreground`;
|
|
14760
|
+
const paired = pairAccessibleInk({
|
|
14761
|
+
backgrounds,
|
|
14762
|
+
policy,
|
|
14763
|
+
target: policy.ink,
|
|
14764
|
+
preferred: foreground.color,
|
|
14765
|
+
name: "selection-ink",
|
|
14766
|
+
path
|
|
14767
|
+
});
|
|
14768
|
+
diagnostics.push(...paired.diagnostics);
|
|
14769
|
+
if (!paired.ok) return void 0;
|
|
14770
|
+
if (paired.value.color !== foreground.color) diagnostics.push({
|
|
14771
|
+
severity: "information",
|
|
14772
|
+
code: "semantic.selection-ink-adjusted",
|
|
14773
|
+
stage: "semantic",
|
|
14774
|
+
path,
|
|
14775
|
+
requested: foreground.color,
|
|
14776
|
+
effective: paired.value.color,
|
|
14777
|
+
message: "Adjusted selection ink to meet minimum contrast on selected and selected-hover surfaces."
|
|
14778
|
+
});
|
|
14649
14779
|
treatments[name] = {
|
|
14650
14780
|
family: treatment.family,
|
|
14651
14781
|
background,
|
|
14652
14782
|
backgroundHover,
|
|
14653
|
-
foreground
|
|
14783
|
+
foreground: {
|
|
14784
|
+
...foreground,
|
|
14785
|
+
color: paired.value.color,
|
|
14786
|
+
composites: paired.value.color === foreground.color ? foreground.composites : []
|
|
14787
|
+
}
|
|
14654
14788
|
};
|
|
14655
14789
|
}
|
|
14656
14790
|
const defaultTreatment = treatments[config.selection.default];
|
|
@@ -14738,7 +14872,7 @@ var generateSemanticRoles = (appearance, families, config, surfaces, familyAppea
|
|
|
14738
14872
|
for (const [name, profile] of Object.entries(config.roles.intents)) {
|
|
14739
14873
|
if (profile === void 0) continue;
|
|
14740
14874
|
const family = familyAppearances[profile.family];
|
|
14741
|
-
const output = family === void 0 ? void 0 : intentOutput(appearance, profile, families, surfaces, family);
|
|
14875
|
+
const output = family === void 0 ? void 0 : intentOutput(appearance, profile, families, surfaces, family, `/semantic/intents/${name}`, diagnostics);
|
|
14742
14876
|
if (output === void 0) diagnostics.push({
|
|
14743
14877
|
severity: "error",
|
|
14744
14878
|
code: "semantic.reference-unresolved",
|
|
@@ -14751,15 +14885,16 @@ var generateSemanticRoles = (appearance, families, config, surfaces, familyAppea
|
|
|
14751
14885
|
output
|
|
14752
14886
|
};
|
|
14753
14887
|
}
|
|
14754
|
-
const
|
|
14755
|
-
|
|
14888
|
+
const interactionDiagnosticStart = diagnostics.length;
|
|
14889
|
+
const interactions = interactionOutput(config.interactions, families, surfaces, familyAppearances, diagnostics);
|
|
14890
|
+
if (interactions === void 0 && !diagnostics.slice(interactionDiagnosticStart).some(({ severity }) => severity === "error")) diagnostics.push({
|
|
14756
14891
|
severity: "error",
|
|
14757
14892
|
code: "semantic.reference-unresolved",
|
|
14758
14893
|
stage: "semantic",
|
|
14759
14894
|
path: "/semantic/interactions",
|
|
14760
14895
|
message: "Semantic interaction layers could not resolve every configured color reference."
|
|
14761
14896
|
});
|
|
14762
|
-
return diagnostics.
|
|
14897
|
+
return diagnostics.some(({ severity }) => severity === "error") ? {
|
|
14763
14898
|
ok: false,
|
|
14764
14899
|
diagnostics
|
|
14765
14900
|
} : {
|
|
@@ -14890,8 +15025,26 @@ var validateGeneratedColorTheme = (theme) => {
|
|
|
14890
15025
|
if (resolved === void 0) continue;
|
|
14891
15026
|
const intentOutput = generated.semantic.intents[intent];
|
|
14892
15027
|
if (intentOutput === void 0 || intentOutput.family !== resolved.family) diagnostics.push(error("validation.semantic-intent-missing", `${appearancePath}/semantic/intents/${intent}`, `Appearance ${appearance} is missing resolved semantic intent ${intent}.`, appearance));
|
|
15028
|
+
if (intentOutput === void 0) continue;
|
|
15029
|
+
const policy = resolvedFamily(theme, intentOutput.family, appearance)?.policies.pairing;
|
|
15030
|
+
const soft = intentOutput.output.soft;
|
|
15031
|
+
for (const [role, field] of [["ink", "foreground"], ["inkMuted", "foregroundMuted"]]) if (!(policy !== void 0 && Object.values(generated.surfaces.substrates).every((substrate) => substrate.levels.every((surface) => [
|
|
15032
|
+
soft.rest,
|
|
15033
|
+
soft.hover,
|
|
15034
|
+
soft.pressed
|
|
15035
|
+
].every((layer) => {
|
|
15036
|
+
const background = compositeSrgb(layer.color, surface.color.mappedColor);
|
|
15037
|
+
return measureContrast(background, compositeSrgb(soft[role].color, background)).wcagRatio + 1e-10 >= policy[role].minimumWcagRatio;
|
|
15038
|
+
}))))) diagnostics.push(error("validation.soft-ink-contrast", `${appearancePath}/semantic/intents/${intent}/soft/${field}`, "Soft ink must meet minimum contrast on every rest, hover and pressed surface.", appearance, intentOutput.family));
|
|
14893
15039
|
}
|
|
14894
15040
|
if (!Number.isFinite(generated.semantic.structure.separatorMutedOpacity)) diagnostics.push(error("validation.semantic-output-missing", `${appearancePath}/semantic/structure`, "Semantic structure is incomplete.", appearance));
|
|
15041
|
+
for (const [name, treatment] of Object.entries(generated.semantic.interactions.selection.treatments)) {
|
|
15042
|
+
const policy = resolvedFamily(theme, treatment.family, appearance)?.policies.pairing;
|
|
15043
|
+
if (!(policy !== void 0 && Object.values(generated.surfaces.substrates).every((substrate) => substrate.levels.every((surface) => [treatment.background, treatment.backgroundHover].every((layer) => {
|
|
15044
|
+
const background = compositeSrgb(layer.color, surface.color.mappedColor);
|
|
15045
|
+
return measureContrast(background, compositeSrgb(treatment.foreground.color, background)).wcagRatio + 1e-10 >= policy.ink.minimumWcagRatio;
|
|
15046
|
+
}))))) diagnostics.push(error("validation.selection-ink-contrast", `${appearancePath}/semantic/interactions/selection/treatments/${name}/foreground`, "Selection ink must meet minimum contrast on every selected and selected-hover surface.", appearance, treatment.family));
|
|
15047
|
+
}
|
|
14895
15048
|
const scrim = generated.semantic.composites.scrim;
|
|
14896
15049
|
if (scrim.composites.length !== 9 || scrim.composites.some(({ deltaE }) => !Number.isFinite(deltaE))) diagnostics.push(error("validation.scrim-output", `${appearancePath}/semantic/composites/scrim`, "Scrim is missing a valid sRGB proof over every surface.", appearance));
|
|
14897
15050
|
}
|
|
@@ -15211,7 +15364,8 @@ var generateRadiusScale = (config) => {
|
|
|
15211
15364
|
step,
|
|
15212
15365
|
value: byStep.get(step)
|
|
15213
15366
|
}];
|
|
15214
|
-
}))
|
|
15367
|
+
})),
|
|
15368
|
+
dismiss: config.dismiss
|
|
15215
15369
|
};
|
|
15216
15370
|
};
|
|
15217
15371
|
//#endregion
|
|
@@ -15499,7 +15653,7 @@ var generateTypographyScale = (config) => {
|
|
|
15499
15653
|
strategy: "fluid-type-scale",
|
|
15500
15654
|
version: 1,
|
|
15501
15655
|
resources: Object.entries(config.resources).filter(([id]) => usedResources.has(id)).sort(([left], [right]) => left.localeCompare(right)).map(([id, resource]) => ({
|
|
15502
|
-
id,
|
|
15656
|
+
resourceId: id,
|
|
15503
15657
|
...structuredClone(resource)
|
|
15504
15658
|
})),
|
|
15505
15659
|
families: Object.fromEntries(Object.entries(config.families).sort(([left], [right]) => left.localeCompare(right)).map(([id, family]) => [id, {
|
|
@@ -15513,62 +15667,9 @@ var generateTypographyScale = (config) => {
|
|
|
15513
15667
|
};
|
|
15514
15668
|
};
|
|
15515
15669
|
//#endregion
|
|
15516
|
-
//#region packages/theme-engine/src/motion/semantic-motion.ts
|
|
15517
|
-
var rounded = (value) => Number(value.toFixed(3));
|
|
15518
|
-
var generateMotionScale = (config) => {
|
|
15519
|
-
const durationScale = 1.4 - config.tempo * .8;
|
|
15520
|
-
const milliseconds = (base) => Math.round(base * durationScale);
|
|
15521
|
-
const bounce = (multiplier) => rounded(config.elasticity * multiplier);
|
|
15522
|
-
return {
|
|
15523
|
-
...config,
|
|
15524
|
-
duration: {
|
|
15525
|
-
fast: milliseconds(80),
|
|
15526
|
-
moderate: milliseconds(160),
|
|
15527
|
-
slow: milliseconds(240),
|
|
15528
|
-
continuous: milliseconds(800)
|
|
15529
|
-
},
|
|
15530
|
-
displacementScale: rounded(.5 + config.displacement),
|
|
15531
|
-
bounce: {
|
|
15532
|
-
feedback: bounce(.12),
|
|
15533
|
-
presence: bounce(.2),
|
|
15534
|
-
presenceEmphasized: bounce(.24),
|
|
15535
|
-
layout: bounce(.14),
|
|
15536
|
-
layoutQuick: bounce(.08),
|
|
15537
|
-
layoutSpring: bounce(.22),
|
|
15538
|
-
resize: bounce(.18),
|
|
15539
|
-
gestureSettle: bounce(.3)
|
|
15540
|
-
}
|
|
15541
|
-
};
|
|
15542
|
-
};
|
|
15543
|
-
//#endregion
|
|
15544
15670
|
//#region packages/theme-engine/src/validate-generated-theme.ts
|
|
15545
15671
|
var validateGeneratedTheme = (theme) => {
|
|
15546
15672
|
const diagnostics = validateGeneratedColorTheme(theme);
|
|
15547
|
-
const durations = Object.values(theme.motion.duration);
|
|
15548
|
-
if (durations.some((value) => !Number.isFinite(value) || value <= 0) || durations.some((value, index) => index > 0 && value <= durations[index - 1])) diagnostics.push({
|
|
15549
|
-
severity: "error",
|
|
15550
|
-
code: "validation.motion-duration",
|
|
15551
|
-
stage: "validation",
|
|
15552
|
-
path: "/motion/duration",
|
|
15553
|
-
requested: theme.motion.duration,
|
|
15554
|
-
message: "Generated motion durations must be finite, positive, and strictly increasing."
|
|
15555
|
-
});
|
|
15556
|
-
if (!Number.isFinite(theme.motion.displacementScale) || theme.motion.displacementScale < .5 || theme.motion.displacementScale > 1.5) diagnostics.push({
|
|
15557
|
-
severity: "error",
|
|
15558
|
-
code: "validation.motion-displacement",
|
|
15559
|
-
stage: "validation",
|
|
15560
|
-
path: "/motion/displacementScale",
|
|
15561
|
-
requested: theme.motion.displacementScale,
|
|
15562
|
-
message: "Generated motion displacement scale must stay within its supported range."
|
|
15563
|
-
});
|
|
15564
|
-
if (Object.values(theme.motion.bounce).some((value) => !Number.isFinite(value) || value < 0 || value > .3)) diagnostics.push({
|
|
15565
|
-
severity: "error",
|
|
15566
|
-
code: "validation.motion-bounce",
|
|
15567
|
-
stage: "validation",
|
|
15568
|
-
path: "/motion/bounce",
|
|
15569
|
-
requested: theme.motion.bounce,
|
|
15570
|
-
message: "Generated motion bounce values must stay between zero and 0.3."
|
|
15571
|
-
});
|
|
15572
15673
|
if (theme.edge.widths.length !== EDGE_STEPS.length || theme.edge.widths.some(({ step }, index) => step !== EDGE_STEPS[index])) diagnostics.push({
|
|
15573
15674
|
severity: "error",
|
|
15574
15675
|
code: "validation.edge-steps",
|
|
@@ -15670,8 +15771,7 @@ var generateTheme = (input) => {
|
|
|
15670
15771
|
radius: generateRadiusScale(color.value.resolvedConfig.radius),
|
|
15671
15772
|
spacing: generateSpacingScale(color.value.resolvedConfig.spacing),
|
|
15672
15773
|
typography: generateTypographyScale(color.value.resolvedConfig.typography),
|
|
15673
|
-
sizing: generateSizingScale(color.value.resolvedConfig.sizing)
|
|
15674
|
-
motion: generateMotionScale(color.value.resolvedConfig.motion)
|
|
15774
|
+
sizing: generateSizingScale(color.value.resolvedConfig.sizing)
|
|
15675
15775
|
};
|
|
15676
15776
|
const validationDiagnostics = validateGeneratedTheme(value);
|
|
15677
15777
|
if (validationDiagnostics.length > 0) return {
|
|
@@ -15721,16 +15821,7 @@ var compileMaterializedTheme = (request) => {
|
|
|
15721
15821
|
};
|
|
15722
15822
|
};
|
|
15723
15823
|
var LOCAL_THEME_COMPILER_PROVIDER = { compile: async (request) => compileMaterializedTheme(request) };
|
|
15724
|
-
|
|
15725
|
-
//#region packages/theme-engine/src/schema/theme-manifest.ts
|
|
15726
|
-
var closed = { additionalProperties: false };
|
|
15727
|
-
var ThemeOutputSchema = Type.Union([Type.Object({
|
|
15728
|
-
format: Type.Literal("tailwind"),
|
|
15729
|
-
path: Type.String({ minLength: 1 })
|
|
15730
|
-
}, closed), Type.Object({
|
|
15731
|
-
format: Type.Literal("dtcg"),
|
|
15732
|
-
path: Type.String({ minLength: 1 })
|
|
15733
|
-
}, closed)]);
|
|
15824
|
+
var ThemeOutputSchema = Type.Object({ path: Type.String({ minLength: 1 }) }, { additionalProperties: false });
|
|
15734
15825
|
var ThemeManifestSchema = Type.Object({
|
|
15735
15826
|
$schema: Type.Literal("https://trellis.build/schemas/theme-manifest-v1.json"),
|
|
15736
15827
|
formatVersion: Type.Literal(1),
|
|
@@ -15783,7 +15874,7 @@ var dimensionTokenValue = (group, path) => {
|
|
|
15783
15874
|
var scopedRoot = (lightSelector, darkSelector) => {
|
|
15784
15875
|
return `:where(${[...lightSelector.split(","), ...darkSelector.split(",")].map((selector) => selector.trim()).filter((selector, index, values) => selector.length > 0 && values.indexOf(selector) === index).join(", ")})`;
|
|
15785
15876
|
};
|
|
15786
|
-
var gridSelector = (scope, requested) => `${scope} :where([data-ui-grid][data-columns="${requested}"], [data-ui-box][data-layout="grid"][data-columns="${requested}"])`;
|
|
15877
|
+
var gridSelector = (scope, requested) => `${scope} :where([data-ui-grid][data-columns="${requested}"], [data-ui-box][data-ui-layout-mode="grid"][data-columns="${requested}"])`;
|
|
15787
15878
|
var rule$1 = (selector, declarations) => `${selector} {\n${declarations.map((declaration) => ` ${declaration}`).join("\n")}\n}`;
|
|
15788
15879
|
var indent = (css) => css.split("\n").map((line) => line ? ` ${line}` : "").join("\n");
|
|
15789
15880
|
var appStructureCss = (scope, breakpoint) => {
|
|
@@ -15826,7 +15917,7 @@ var appStructureCss = (scope, breakpoint) => {
|
|
|
15826
15917
|
"width: var(--ui-sidebar-width, var(--spacing-sidebar-width));",
|
|
15827
15918
|
"height: 100vh;",
|
|
15828
15919
|
"border-radius: 0;",
|
|
15829
|
-
"translate:
|
|
15920
|
+
"translate: none;",
|
|
15830
15921
|
"--ui-active-elevation-shadow-layers: var(--ui-sidebar-resting-elevation);"
|
|
15831
15922
|
]),
|
|
15832
15923
|
rule$1(`${app} ${initialSidebar}[data-placement="side"][data-desktop-state="expanded"][data-sticky="false" i]`, ["position: relative;", "height: auto;"]),
|
|
@@ -15839,7 +15930,7 @@ var appStructureCss = (scope, breakpoint) => {
|
|
|
15839
15930
|
"max-width: none;",
|
|
15840
15931
|
"height: var(--ui-sidebar-height, auto);",
|
|
15841
15932
|
"border-radius: 0;",
|
|
15842
|
-
"translate:
|
|
15933
|
+
"translate: none;",
|
|
15843
15934
|
"flex-direction: row;",
|
|
15844
15935
|
"overflow: visible;",
|
|
15845
15936
|
"--ui-active-elevation-shadow-layers: var(--ui-sidebar-resting-elevation);"
|
|
@@ -15917,6 +16008,8 @@ var serializeCompositionCss = (document, lightSelector, darkSelector) => {
|
|
|
15917
16008
|
return [
|
|
15918
16009
|
...base,
|
|
15919
16010
|
...responsive,
|
|
16011
|
+
rule$1(`${scope} [data-ui-table]`, ["--ui-table-row-border: 0px;", "--ui-table-row-min-height: calc(var(--ui-table-control-height) + var(--spacing-1) * 2 + var(--ui-table-row-border));"]),
|
|
16012
|
+
rule$1(`${scope} [data-ui-table]:is([data-border="row"], [data-border="grid"])`, ["--ui-table-row-border: var(--border-width-edge-separator);"]),
|
|
15920
16013
|
appStructureCss(scope, dimensionTokenValue(tokens, [
|
|
15921
16014
|
"composition",
|
|
15922
16015
|
"shell",
|
|
@@ -16094,7 +16187,12 @@ var cssVariable = (value) => value.replaceAll(".", "\\.");
|
|
|
16094
16187
|
var fluidScalarCss = (scalar) => scalar.fluid ? `clamp(${number(scalar.minimum, 4)}px, calc(${number(scalar.preferred.constant, 4)}px + ${number(scalar.preferred.viewport, 4)}vw), ${number(scalar.maximum, 4)}px)` : `${number(scalar.minimum, 4)}px`;
|
|
16095
16188
|
var colorCss = (color) => {
|
|
16096
16189
|
const [lightness, chroma, hue] = color.components;
|
|
16097
|
-
return
|
|
16190
|
+
return cssColor({
|
|
16191
|
+
lightness,
|
|
16192
|
+
chroma,
|
|
16193
|
+
hue: hue === "none" ? null : hue,
|
|
16194
|
+
alpha: color.alpha ?? 1
|
|
16195
|
+
});
|
|
16098
16196
|
};
|
|
16099
16197
|
var dimensionCss = (dimension) => {
|
|
16100
16198
|
return `${number(dimension.value)}${dimension.unit}`;
|
|
@@ -16140,6 +16238,7 @@ var cssValue = (token, index) => {
|
|
|
16140
16238
|
const extension = trellisTokenExtension(token);
|
|
16141
16239
|
if (extension?.fluid !== void 0) return fluidScalarCss(extension.fluid);
|
|
16142
16240
|
switch (token.$type) {
|
|
16241
|
+
case "cubicBezier": return `cubic-bezier(${token.$value.join(", ")})`;
|
|
16143
16242
|
case "color": return colorCss(token.$value);
|
|
16144
16243
|
case "dimension": return dimensionCss(token.$value);
|
|
16145
16244
|
case "duration": return dimensionCss(token.$value);
|
|
@@ -16198,29 +16297,39 @@ var invariantRegistry = (document) => {
|
|
|
16198
16297
|
return [`@theme static {\n${declarations("static").map((line) => ` ${line}`).join("\n")}\n}`, `@theme {\n${declarations("theme").map((line) => ` ${line}`).join("\n")}\n}`].join("\n\n");
|
|
16199
16298
|
};
|
|
16200
16299
|
var fontFaceWeight = ({ minimum, maximum }) => minimum === maximum ? `${minimum}` : `${minimum} ${maximum}`;
|
|
16201
|
-
var typographyResourceCss = (document) => {
|
|
16300
|
+
var typographyResourceCss = (document, fontBaseUrl = "../fonts") => {
|
|
16202
16301
|
const resources = (invariantTokenSource(document).$extensions?.["dev.trellis"])?.fontResources ?? [];
|
|
16203
|
-
return [
|
|
16204
|
-
"
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
` font-style: ${face.style};`,
|
|
16209
|
-
" font-display: swap;",
|
|
16210
|
-
"}"
|
|
16211
|
-
].join("\n")) : [])];
|
|
16302
|
+
return [
|
|
16303
|
+
...resources.flatMap((resource) => resource.type === "fontsource" ? [`@import "${fontBaseUrl}/${resource.id}/${resource.version}/font.css";`] : []),
|
|
16304
|
+
...resources.flatMap((resource) => resource.type === "bunny" ? [`@import url("${resource.url}");`] : []),
|
|
16305
|
+
...resources.flatMap((resource) => resource.type === "local" ? localFontFaceCss(resource.faces) : [])
|
|
16306
|
+
];
|
|
16212
16307
|
};
|
|
16308
|
+
var localFontFaceCss = (faces) => faces.map((face) => [
|
|
16309
|
+
"@font-face {",
|
|
16310
|
+
` font-family: ${JSON.stringify(face.family)};`,
|
|
16311
|
+
` src: url(${JSON.stringify(face.src)}) format("${face.format}");`,
|
|
16312
|
+
` font-weight: ${fontFaceWeight(face.weight)};`,
|
|
16313
|
+
` font-style: ${face.style};`,
|
|
16314
|
+
" font-display: swap;",
|
|
16315
|
+
...face.unicodeRange === void 0 ? [] : [` unicode-range: ${face.unicodeRange};`],
|
|
16316
|
+
"}"
|
|
16317
|
+
].join("\n"));
|
|
16213
16318
|
//#endregion
|
|
16214
16319
|
//#region packages/theme-engine/src/serialize/css.ts
|
|
16215
16320
|
var cssArtifact = (css) => ({
|
|
16216
16321
|
css,
|
|
16217
16322
|
fingerprint: fingerprintValue(css)
|
|
16218
16323
|
});
|
|
16219
|
-
var serializeTypographyResourcesCss = (document) => cssArtifact(`${typographyResourceCss(document).join("\n\n")}\n`);
|
|
16324
|
+
var serializeTypographyResourcesCss = (document, fontBaseUrl = "../fonts") => cssArtifact(`${typographyResourceCss(document, fontBaseUrl).join("\n\n")}\n`);
|
|
16220
16325
|
var selectorBlock = (selector, declarations) => `${selector} {\n${declarations.map((line) => ` ${line}`).join("\n")}\n}`;
|
|
16221
16326
|
var combinedSelector = (...selectors) => [...new Set(selectors.flatMap((selector) => selector.split(",")).map((selector) => selector.trim()))].join(", ");
|
|
16222
16327
|
var artifactFromBlocks = (blocks) => cssArtifact(`${blocks.join("\n\n")}\n`);
|
|
16223
|
-
var appearanceBlocks = (document, options, artifacts, additions = []) => [
|
|
16328
|
+
var appearanceBlocks = (document, options, artifacts, additions = []) => [
|
|
16329
|
+
selectorBlock(options.lightSelector, [...tokenDeclarations(document, "light", artifacts), ...additions]),
|
|
16330
|
+
selectorBlock(options.darkSelector, [...tokenDeclarations(document, "dark", artifacts), ...additions]),
|
|
16331
|
+
...options.systemSelector ? [`@media (prefers-color-scheme: dark) {\n${selectorBlock(options.systemSelector, [...tokenDeclarations(document, "dark", artifacts), ...additions])}\n}`] : []
|
|
16332
|
+
];
|
|
16224
16333
|
var elevationAliases = () => Array.from({ length: 9 }, (_, level) => `--shadow-elevation-${level}: var(--ui-local-elevation-${level});`);
|
|
16225
16334
|
var runtimeCompositions = (document, options) => [
|
|
16226
16335
|
serializeSurfaceCompositionCss(),
|
|
@@ -16239,7 +16348,7 @@ var serializeRuntimeArtifact = (document, options) => artifactFromBlocks([
|
|
|
16239
16348
|
...runtimeCompositions(document, options)
|
|
16240
16349
|
]);
|
|
16241
16350
|
var serializeThemeArtifacts = (document, options) => ({
|
|
16242
|
-
resources: serializeTypographyResourcesCss(document),
|
|
16351
|
+
resources: serializeTypographyResourcesCss(document, options.fontBaseUrl),
|
|
16243
16352
|
palette: serializePaletteArtifact(document, options),
|
|
16244
16353
|
runtime: serializeRuntimeArtifact(document, options)
|
|
16245
16354
|
});
|
|
@@ -16250,7 +16359,7 @@ var serializeSurfaceArtifact = (document, options) => artifactFromBlocks([
|
|
|
16250
16359
|
]);
|
|
16251
16360
|
var serializeThemeCss = (document, options) => {
|
|
16252
16361
|
const scope = options.scope ?? "all";
|
|
16253
|
-
if (scope === "resources") return serializeTypographyResourcesCss(document);
|
|
16362
|
+
if (scope === "resources") return serializeTypographyResourcesCss(document, options.fontBaseUrl);
|
|
16254
16363
|
if (scope === "palette") return serializePaletteArtifact(document, options);
|
|
16255
16364
|
if (scope === "runtime") return serializeRuntimeArtifact(document, options);
|
|
16256
16365
|
if (scope === "surfaces") return serializeSurfaceArtifact(document, options);
|
|
@@ -16266,13 +16375,6 @@ var serializeThemeCss = (document, options) => {
|
|
|
16266
16375
|
//#region packages/theme-engine/src/presets/trellis-default.ts
|
|
16267
16376
|
var TRELLIS_DEFAULT_THEME_CONFIG = {
|
|
16268
16377
|
schemaVersion: 1,
|
|
16269
|
-
motion: {
|
|
16270
|
-
strategy: "semantic-motion",
|
|
16271
|
-
version: 1,
|
|
16272
|
-
tempo: .5,
|
|
16273
|
-
elasticity: 0,
|
|
16274
|
-
displacement: .5
|
|
16275
|
-
},
|
|
16276
16378
|
color: {
|
|
16277
16379
|
appearances: {
|
|
16278
16380
|
light: {
|
|
@@ -16382,7 +16484,8 @@ var TRELLIS_DEFAULT_THEME_CONFIG = {
|
|
|
16382
16484
|
control: 3,
|
|
16383
16485
|
surface: 4,
|
|
16384
16486
|
overlay: 5
|
|
16385
|
-
}
|
|
16487
|
+
},
|
|
16488
|
+
dismiss: "full"
|
|
16386
16489
|
},
|
|
16387
16490
|
spacing: {
|
|
16388
16491
|
strategy: "progressive-fluid-scale",
|
|
@@ -16452,20 +16555,6 @@ var TRELLIS_DEFAULT_THEME_CONFIG = {
|
|
|
16452
16555
|
step: 12
|
|
16453
16556
|
}
|
|
16454
16557
|
},
|
|
16455
|
-
soft: {
|
|
16456
|
-
rest: {
|
|
16457
|
-
kind: "alpha-step",
|
|
16458
|
-
step: 2
|
|
16459
|
-
},
|
|
16460
|
-
hover: {
|
|
16461
|
-
kind: "alpha-step",
|
|
16462
|
-
step: 3
|
|
16463
|
-
},
|
|
16464
|
-
pressed: {
|
|
16465
|
-
kind: "alpha-step",
|
|
16466
|
-
step: 4
|
|
16467
|
-
}
|
|
16468
|
-
},
|
|
16469
16558
|
solid: {
|
|
16470
16559
|
rest: {
|
|
16471
16560
|
kind: "step",
|
|
@@ -16574,6 +16663,138 @@ var TRELLIS_DEFAULT_THEME_CONFIG = {
|
|
|
16574
16663
|
}
|
|
16575
16664
|
};
|
|
16576
16665
|
//#endregion
|
|
16666
|
+
//#region packages/theme-engine/src/font-assets.ts
|
|
16667
|
+
var hash = (bytes) => createHash("sha256").update(bytes).digest("hex");
|
|
16668
|
+
var encode = (value) => new TextEncoder().encode(JSON.stringify(value, null, 2) + "\n");
|
|
16669
|
+
/** Network IO belongs to dependency preparation, never to the compiler. */
|
|
16670
|
+
var acquireFont = async ({ id, version }) => {
|
|
16671
|
+
let packageName = `@fontsource-variable/${id}`;
|
|
16672
|
+
const request = async (file) => fetch(`https://cdn.jsdelivr.net/npm/${packageName}@${version}/${file}`, {
|
|
16673
|
+
signal: AbortSignal.timeout(3e4),
|
|
16674
|
+
redirect: "error"
|
|
16675
|
+
});
|
|
16676
|
+
let metadataResponse = await request("metadata.json");
|
|
16677
|
+
if (metadataResponse.status === 404) {
|
|
16678
|
+
packageName = `@fontsource/${id}`;
|
|
16679
|
+
metadataResponse = await request("metadata.json");
|
|
16680
|
+
}
|
|
16681
|
+
if (!metadataResponse.ok) throw new Error(`Fontsource ${id}@${version}: metadata request failed (${metadataResponse.status}).`);
|
|
16682
|
+
const metadata = await metadataResponse.json();
|
|
16683
|
+
if (!metadata || typeof metadata !== "object" || !("family" in metadata) || typeof metadata.family !== "string" || !("weights" in metadata) || !Array.isArray(metadata.weights) || !metadata.weights.length || !metadata.weights.every((weight) => Number.isInteger(weight) && weight > 0 && weight <= 1e3)) throw new Error(`Invalid Fontsource metadata for ${id}@${version}.`);
|
|
16684
|
+
const files = /* @__PURE__ */ new Map();
|
|
16685
|
+
const sources = [];
|
|
16686
|
+
const get = async (file) => {
|
|
16687
|
+
const response = await request(file);
|
|
16688
|
+
if (!response.ok) throw new Error(`Fontsource ${id}@${version}: ${file} request failed (${response.status}).`);
|
|
16689
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
16690
|
+
};
|
|
16691
|
+
const stylesheets = [];
|
|
16692
|
+
if (packageName.startsWith("@fontsource-variable/")) {
|
|
16693
|
+
for (const filename of [
|
|
16694
|
+
"full.css",
|
|
16695
|
+
"standard.css",
|
|
16696
|
+
"index.css"
|
|
16697
|
+
]) {
|
|
16698
|
+
const response = await request(filename);
|
|
16699
|
+
if (response.status === 404) continue;
|
|
16700
|
+
if (!response.ok) throw new Error(`Fontsource stylesheet request failed (${response.status}).`);
|
|
16701
|
+
stylesheets.push(await response.text());
|
|
16702
|
+
break;
|
|
16703
|
+
}
|
|
16704
|
+
if (!stylesheets.length) throw new Error(`No variable stylesheet for ${id}@${version}.`);
|
|
16705
|
+
if ("styles" in metadata && Array.isArray(metadata.styles) && metadata.styles.includes("italic")) for (const filename of [
|
|
16706
|
+
"full-italic.css",
|
|
16707
|
+
"standard-italic.css",
|
|
16708
|
+
"wght-italic.css"
|
|
16709
|
+
]) {
|
|
16710
|
+
const response = await request(filename);
|
|
16711
|
+
if (response.status === 404) continue;
|
|
16712
|
+
if (!response.ok) throw new Error(`Fontsource italic request failed (${response.status}).`);
|
|
16713
|
+
stylesheets.push(await response.text());
|
|
16714
|
+
break;
|
|
16715
|
+
}
|
|
16716
|
+
} else for (const weight of metadata.weights) stylesheets.push(new TextDecoder().decode(await get(`${weight}.css`)));
|
|
16717
|
+
const faces = [];
|
|
16718
|
+
for (const css of stylesheets) for (const match of css.matchAll(/@font-face\s*\{([^}]+)\}/g)) {
|
|
16719
|
+
const declarations = new Map(match[1].split(";").filter((entry) => entry.trim()).map((entry) => {
|
|
16720
|
+
const colon = entry.indexOf(":");
|
|
16721
|
+
return [entry.slice(0, colon).trim(), entry.slice(colon + 1).trim()];
|
|
16722
|
+
}));
|
|
16723
|
+
const weights = declarations.get("font-weight")?.match(/^(\d+)(?:\s+(\d+))?$/);
|
|
16724
|
+
const source = declarations.get("src")?.match(/^url\(\.?\/?files\/([a-z0-9-]+\.woff2)\)\s+format\(['"]woff2(?:-variations)?['"]\)(?:\s*,|$)/);
|
|
16725
|
+
if (!weights || !source) throw new Error(`Unsupported Fontsource font-face for ${id}.`);
|
|
16726
|
+
faces.push({
|
|
16727
|
+
family: metadata.family,
|
|
16728
|
+
style: declarations.get("font-style"),
|
|
16729
|
+
format: "woff2",
|
|
16730
|
+
weight: {
|
|
16731
|
+
minimum: Number(weights[1]),
|
|
16732
|
+
maximum: Number(weights[2] ?? weights[1])
|
|
16733
|
+
},
|
|
16734
|
+
src: `./${source[1]}`,
|
|
16735
|
+
...declarations.has("unicode-range") ? { unicodeRange: declarations.get("unicode-range") } : {}
|
|
16736
|
+
});
|
|
16737
|
+
}
|
|
16738
|
+
const resource = {
|
|
16739
|
+
type: "local",
|
|
16740
|
+
faces
|
|
16741
|
+
};
|
|
16742
|
+
if (!faces.length || !Check(FontResourceSchema, resource)) throw new Error(`Invalid Fontsource font faces for ${id}.`);
|
|
16743
|
+
for (const file of /* @__PURE__ */ new Set(["LICENSE", ...faces.map(({ src }) => `files/${src.slice(2)}`)])) {
|
|
16744
|
+
const bytes = await get(file);
|
|
16745
|
+
if (file !== "LICENSE" && new TextDecoder().decode(bytes.slice(0, 4)) !== "wOF2") throw new Error(`Invalid WOFF2 font: ${file}`);
|
|
16746
|
+
const name = file.replace(/^files\//, "");
|
|
16747
|
+
files.set(name, bytes);
|
|
16748
|
+
sources.push({
|
|
16749
|
+
file: name,
|
|
16750
|
+
url: `https://cdn.jsdelivr.net/npm/${packageName}@${version}/${file}`,
|
|
16751
|
+
sha256: hash(bytes)
|
|
16752
|
+
});
|
|
16753
|
+
}
|
|
16754
|
+
files.set("resource.json", encode(resource));
|
|
16755
|
+
files.set("download.json", encode({
|
|
16756
|
+
package: packageName,
|
|
16757
|
+
version,
|
|
16758
|
+
files: sources
|
|
16759
|
+
}));
|
|
16760
|
+
files.set("font.css", new TextEncoder().encode(localFontFaceCss(faces).join("\n\n") + "\n"));
|
|
16761
|
+
return {
|
|
16762
|
+
resource,
|
|
16763
|
+
files
|
|
16764
|
+
};
|
|
16765
|
+
};
|
|
16766
|
+
var readFontAssets = async (directory, font) => {
|
|
16767
|
+
const provenance = JSON.parse(await readFile(join(directory, "download.json"), "utf8"));
|
|
16768
|
+
if (![`@fontsource/${font.id}`, `@fontsource-variable/${font.id}`].includes(provenance.package) || provenance.version !== font.version || !Array.isArray(provenance.files)) throw new Error("Font provenance does not match declaration.");
|
|
16769
|
+
const resource = JSON.parse(await readFile(join(directory, "resource.json"), "utf8"));
|
|
16770
|
+
if (!Check(FontResourceSchema, resource) || resource.type !== "local") throw new Error("Invalid local font metadata.");
|
|
16771
|
+
const local = resource;
|
|
16772
|
+
const files = /* @__PURE__ */ new Map();
|
|
16773
|
+
for (const record of provenance.files) {
|
|
16774
|
+
if (!/^(?:LICENSE|[a-z0-9-]+\.woff2)$/.test(record.file)) throw new Error("Invalid font asset filename.");
|
|
16775
|
+
const bytes = await readFile(join(directory, record.file));
|
|
16776
|
+
if (hash(bytes) !== record.sha256) throw new Error(`Font asset hash mismatch: ${record.file}`);
|
|
16777
|
+
files.set(record.file, bytes);
|
|
16778
|
+
}
|
|
16779
|
+
if (!files.has("LICENSE") || local.faces.some(({ src }) => !/^\.\/[a-z0-9-]+\.woff2$/.test(src) || !files.has(src.slice(2)))) throw new Error("Incomplete font assets.");
|
|
16780
|
+
files.set("resource.json", await readFile(join(directory, "resource.json")));
|
|
16781
|
+
files.set("download.json", await readFile(join(directory, "download.json")));
|
|
16782
|
+
files.set("font.css", new TextEncoder().encode(localFontFaceCss(local.faces).join("\n\n") + "\n"));
|
|
16783
|
+
return {
|
|
16784
|
+
resource: local,
|
|
16785
|
+
files
|
|
16786
|
+
};
|
|
16787
|
+
};
|
|
16788
|
+
var prepareFont = async (font, directory, acquire) => {
|
|
16789
|
+
for (const source of [fileURLToPath(new URL(`../fonts/${font.id}/${font.version}`, import.meta.url)), directory]) try {
|
|
16790
|
+
return await readFontAssets(source, font);
|
|
16791
|
+
} catch (error) {
|
|
16792
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) throw error;
|
|
16793
|
+
}
|
|
16794
|
+
if (acquire) return acquire(font);
|
|
16795
|
+
throw new Error(`Missing local font assets for ${font.id}@${font.version}. Run trellis theme build.`);
|
|
16796
|
+
};
|
|
16797
|
+
//#endregion
|
|
16577
16798
|
//#region packages/theme-engine/src/theme-workspace.ts
|
|
16578
16799
|
var ThemeWorkspaceError = class extends Error {
|
|
16579
16800
|
code;
|
|
@@ -16713,7 +16934,6 @@ var canonicalJsonValue = (value) => {
|
|
|
16713
16934
|
if (value === null || typeof value !== "object") return value;
|
|
16714
16935
|
return Object.fromEntries(Object.entries(value).filter(([, child]) => child !== void 0).sort(([first], [second]) => first < second ? -1 : first > second ? 1 : 0).map(([key, child]) => [key, canonicalJsonValue(child)]));
|
|
16715
16936
|
};
|
|
16716
|
-
var serializeDtcg = (tokens) => `${JSON.stringify(canonicalJsonValue(tokens), null, 2)}\n`;
|
|
16717
16937
|
var CANONICAL_FINGERPRINT = /^[0-9a-f]{16}$/;
|
|
16718
16938
|
var validateProviderFingerprints = (fingerprints, tokens) => {
|
|
16719
16939
|
for (const name of ["theme", "tokens"]) {
|
|
@@ -16723,18 +16943,7 @@ var validateProviderFingerprints = (fingerprints, tokens) => {
|
|
|
16723
16943
|
const tokenFingerprint = fingerprintValue(tokens);
|
|
16724
16944
|
if (tokenFingerprint !== fingerprints.tokens) throw new ThemeWorkspaceError("workspace.token-fingerprint", `Provider token fingerprint ${fingerprints.tokens} does not match ${tokenFingerprint}.`);
|
|
16725
16945
|
};
|
|
16726
|
-
var
|
|
16727
|
-
dtcg: serializeDtcg,
|
|
16728
|
-
tailwind: (tokens, fingerprints) => [
|
|
16729
|
-
"/* Generated by Trellis Theme Authoring. */",
|
|
16730
|
-
`/* Theme ${fingerprints.theme}; tokens ${fingerprints.tokens}. */`,
|
|
16731
|
-
serializeThemeCss(tokens, {
|
|
16732
|
-
lightSelector: ":root, .light",
|
|
16733
|
-
darkSelector: ".dark"
|
|
16734
|
-
}).css
|
|
16735
|
-
].join("\n")
|
|
16736
|
-
};
|
|
16737
|
-
var createBuildPlanForWorkspace = async (workspace, options = {}, commits = workspace.commits) => {
|
|
16946
|
+
var createBuildPlanForWorkspace = async (workspace, options = {}, commits = workspace.commits, acquire) => {
|
|
16738
16947
|
const materialized = materializeTheme(workspace.base, commits);
|
|
16739
16948
|
if (!materialized.ok) throw new ThemeWorkspaceError("workspace.materialization", materialized.diagnostics.map((diagnostic) => {
|
|
16740
16949
|
const requested = diagnostic.requested;
|
|
@@ -16751,15 +16960,64 @@ var createBuildPlanForWorkspace = async (workspace, options = {}, commits = work
|
|
|
16751
16960
|
const tokenDiagnostics = validateDesignTokenDocument(compiled.value.tokens);
|
|
16752
16961
|
if (tokenDiagnostics.length > 0) throw new ThemeWorkspaceError("workspace.tokens", `Provider returned an invalid design-token document:\n${tokenDiagnostics.map(diagnosticMessage).join("\n")}`);
|
|
16753
16962
|
validateProviderFingerprints(compiled.value.fingerprints, compiled.value.tokens);
|
|
16963
|
+
const assets = [];
|
|
16964
|
+
if (workspace.outputs.length > 0) {
|
|
16965
|
+
const resolved = resolveThemeConfig(materialized.value);
|
|
16966
|
+
if (!resolved.ok) throw new ThemeWorkspaceError("workspace.fonts", resolved.diagnostics.map(diagnosticMessage).join("\n"));
|
|
16967
|
+
const resources = structuredClone(resolved.value.typography.resources);
|
|
16968
|
+
const declarations = invariantTokenSource(compiled.value.tokens).$extensions?.["dev.trellis"]?.fontResources ?? [];
|
|
16969
|
+
const preparedFonts = /* @__PURE__ */ new Map();
|
|
16970
|
+
const canonicalRoot = await realpath(workspace.root);
|
|
16971
|
+
const protectedPaths = new Set(await Promise.all([
|
|
16972
|
+
workspace.manifestPath,
|
|
16973
|
+
workspace.basePath,
|
|
16974
|
+
workspace.commitsPath,
|
|
16975
|
+
...workspace.outputs.map(({ absolutePath }) => absolutePath)
|
|
16976
|
+
].map(async (path) => portableCollisionKey(await canonicalProspectivePath(path)))));
|
|
16977
|
+
for (const font of declarations) {
|
|
16978
|
+
if (font.type !== "fontsource") continue;
|
|
16979
|
+
const directory = join(workspace.root, "fonts", font.id, font.version);
|
|
16980
|
+
await resolveSafePath(workspace.root, canonicalRoot, relative(workspace.root, join(directory, "font.css")), "output");
|
|
16981
|
+
const key = `${font.id}/${font.version}`;
|
|
16982
|
+
const prepared = preparedFonts.get(key) ?? await prepareFont(font, directory, acquire);
|
|
16983
|
+
preparedFonts.set(key, prepared);
|
|
16984
|
+
resources[font.resourceId] = prepared.resource;
|
|
16985
|
+
for (const [file, content] of prepared.files) {
|
|
16986
|
+
const target = await resolveSafePath(workspace.root, canonicalRoot, relative(workspace.root, join(directory, file)), "output");
|
|
16987
|
+
if (protectedPaths.has(target.collisionKey)) throw new ThemeWorkspaceError("workspace.path-collision", `Font asset collides with a workspace file: ${target.absolutePath}`);
|
|
16988
|
+
if (!assets.some(({ path }) => path === target.absolutePath)) assets.push({
|
|
16989
|
+
path: target.absolutePath,
|
|
16990
|
+
content
|
|
16991
|
+
});
|
|
16992
|
+
}
|
|
16993
|
+
}
|
|
16994
|
+
const available = resolveThemeConfig({
|
|
16995
|
+
...materialized.value,
|
|
16996
|
+
typography: {
|
|
16997
|
+
...resolved.value.typography,
|
|
16998
|
+
resources
|
|
16999
|
+
}
|
|
17000
|
+
});
|
|
17001
|
+
if (!available.ok) throw new ThemeWorkspaceError("workspace.fonts", available.diagnostics.map(diagnosticMessage).join("\n"));
|
|
17002
|
+
}
|
|
16754
17003
|
return {
|
|
16755
17004
|
workspace,
|
|
17005
|
+
assets,
|
|
16756
17006
|
tokens: compiled.value.tokens,
|
|
16757
17007
|
diagnostics: compiled.value.diagnostics,
|
|
16758
17008
|
fingerprints: compiled.value.fingerprints,
|
|
16759
17009
|
outputs: workspace.outputs.map((output) => ({
|
|
16760
|
-
format: output.format,
|
|
16761
17010
|
path: output.absolutePath,
|
|
16762
|
-
content:
|
|
17011
|
+
content: [
|
|
17012
|
+
"/* Generated by Trellis Theme Authoring. */",
|
|
17013
|
+
`/* Theme ${compiled.value.fingerprints.theme}; tokens ${compiled.value.fingerprints.tokens}. */`,
|
|
17014
|
+
serializeThemeCss(compiled.value.tokens, {
|
|
17015
|
+
fontBaseUrl: relative(dirname(output.absolutePath), join(workspace.root, "fonts")).split(sep).join("/") || ".",
|
|
17016
|
+
lightSelector: ":root, .light",
|
|
17017
|
+
darkSelector: ".dark",
|
|
17018
|
+
systemSelector: ":root[data-theme=\"system\"]"
|
|
17019
|
+
}).css
|
|
17020
|
+
].join("\n")
|
|
16763
17021
|
}))
|
|
16764
17022
|
};
|
|
16765
17023
|
};
|
|
@@ -16793,8 +17051,9 @@ var promoteFiles = async (staged) => {
|
|
|
16793
17051
|
}
|
|
16794
17052
|
};
|
|
16795
17053
|
var buildThemeWorkspace = async (manifestPath, options = {}) => {
|
|
16796
|
-
const
|
|
16797
|
-
await
|
|
17054
|
+
const workspace = await loadThemeWorkspace(manifestPath);
|
|
17055
|
+
const plan = await createBuildPlanForWorkspace(workspace, options, workspace.commits, acquireFont);
|
|
17056
|
+
await promoteFiles(await stageFiles([...plan.assets, ...plan.outputs]));
|
|
16798
17057
|
return {
|
|
16799
17058
|
outputs: plan.outputs.map(({ path }) => path),
|
|
16800
17059
|
diagnostics: plan.diagnostics,
|
|
@@ -16804,10 +17063,14 @@ var buildThemeWorkspace = async (manifestPath, options = {}) => {
|
|
|
16804
17063
|
var checkThemeWorkspace = async (manifestPath, options = {}) => {
|
|
16805
17064
|
const plan = await createThemeBuildPlan(manifestPath, options);
|
|
16806
17065
|
const stale = [];
|
|
16807
|
-
for (const output of plan.
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
17066
|
+
for (const output of [...plan.assets, ...plan.outputs]) {
|
|
17067
|
+
const current = await readFile(output.path).catch((error) => {
|
|
17068
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return void 0;
|
|
17069
|
+
throw error;
|
|
17070
|
+
});
|
|
17071
|
+
const expected = Buffer.from(output.content);
|
|
17072
|
+
if (current === void 0 || !current.equals(expected)) stale.push(output.path);
|
|
17073
|
+
}
|
|
16811
17074
|
if (stale.length > 0) throw new ThemeWorkspaceError("workspace.stale-output", `Generated theme output is missing or stale:\n${stale.join("\n")}`);
|
|
16812
17075
|
return {
|
|
16813
17076
|
outputs: plan.outputs.map(({ path }) => path),
|
|
@@ -16834,7 +17097,8 @@ var initializeThemeWorkspace = async (authoredDirectory) => {
|
|
|
16834
17097
|
const sourcePaths = [
|
|
16835
17098
|
manifestPath,
|
|
16836
17099
|
basePath,
|
|
16837
|
-
commitsPath
|
|
17100
|
+
commitsPath,
|
|
17101
|
+
join(root, "fonts")
|
|
16838
17102
|
];
|
|
16839
17103
|
const existing = (await Promise.all(sourcePaths.map(async (path) => ({
|
|
16840
17104
|
path,
|
|
@@ -16847,10 +17111,7 @@ var initializeThemeWorkspace = async (authoredDirectory) => {
|
|
|
16847
17111
|
engineVersion: THEME_ENGINE_VERSION,
|
|
16848
17112
|
base: "./base.json",
|
|
16849
17113
|
commits: "./commits.jsonl",
|
|
16850
|
-
outputs: [{
|
|
16851
|
-
format: "tailwind",
|
|
16852
|
-
path: "./generated/theme.css"
|
|
16853
|
-
}]
|
|
17114
|
+
outputs: [{ path: "./generated/theme.css" }]
|
|
16854
17115
|
};
|
|
16855
17116
|
await mkdir(outputDirectory, { recursive: true });
|
|
16856
17117
|
await writeFile(manifestPath, `${JSON.stringify(canonicalJsonValue(manifest), null, 2)}\n`, { flag: "wx" });
|
|
@@ -16866,13 +17127,17 @@ var initializeThemeWorkspace = async (authoredDirectory) => {
|
|
|
16866
17127
|
var applyThemeCommit = async (manifestPath, commitPath, options = {}) => {
|
|
16867
17128
|
const workspace = await loadThemeWorkspace(manifestPath);
|
|
16868
17129
|
const candidate = parseThemePatchCommit(parseJson(await readFile(resolve(commitPath), "utf8"), resolve(commitPath)), resolve(commitPath));
|
|
16869
|
-
const plan = await createBuildPlanForWorkspace(workspace, { ...options }, [...workspace.commits, candidate]);
|
|
17130
|
+
const plan = await createBuildPlanForWorkspace(workspace, { ...options }, [...workspace.commits, candidate], acquireFont);
|
|
16870
17131
|
const separator = workspace.commitLogSource.length > 0 && !workspace.commitLogSource.endsWith("\n") ? "\n" : "";
|
|
16871
17132
|
const commitLogContent = `${workspace.commitLogSource}${separator}${serializeThemePatchCommit(candidate)}`;
|
|
16872
|
-
const staged = await stageFiles([
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
17133
|
+
const staged = await stageFiles([
|
|
17134
|
+
...plan.assets,
|
|
17135
|
+
...plan.outputs,
|
|
17136
|
+
{
|
|
17137
|
+
path: workspace.commitsPath,
|
|
17138
|
+
content: commitLogContent
|
|
17139
|
+
}
|
|
17140
|
+
]);
|
|
16876
17141
|
const commitLogStage = staged.at(-1);
|
|
16877
17142
|
const outputStages = staged.slice(0, -1);
|
|
16878
17143
|
const assertCommitLogUnchanged = async () => {
|