@vireo-ai/trellis-ui 0.1.61 → 0.1.63

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.
Files changed (537) hide show
  1. package/THIRD_PARTY_NOTICES.md +9 -0
  2. package/package.json +15 -35
  3. package/packages/client/skills/compose-trellis-ui/SKILL.md +84 -0
  4. package/packages/client/skills/compose-trellis-ui/references/project-ui.md +40 -0
  5. package/packages/client/src/components/accordion/styles.css +21 -9
  6. package/packages/client/src/components/badge/styles.css +12 -0
  7. package/packages/client/src/components/button/styles.css +31 -5
  8. package/packages/client/src/components/card/styles.css +16 -0
  9. package/packages/client/src/components/checkbox/styles.css +29 -5
  10. package/packages/client/src/components/date-picker/styles.css +22 -17
  11. package/packages/client/src/components/field/styles.css +16 -16
  12. package/packages/client/src/components/input/styles.css +1 -0
  13. package/packages/client/src/components/keybinding/styles.css +9 -2
  14. package/packages/client/src/components/menu/styles.css +13 -0
  15. package/packages/client/src/components/panels/styles.css +12 -2
  16. package/packages/client/src/components/scroll-area/styles.css +169 -2
  17. package/packages/client/src/components/select/styles.css +28 -8
  18. package/packages/client/src/components/sidebar/styles.css +218 -0
  19. package/packages/client/src/components/slider/styles.css +57 -0
  20. package/packages/client/src/components/tabs/styles.css +26 -24
  21. package/packages/client/src/components/toast/styles.css +31 -0
  22. package/packages/client/src/directives/sortable.css +5 -0
  23. package/packages/client/src/runtime/drag-and-drop/resize-handle.css +2 -2
  24. package/packages/client/src/styles/components.css +8 -4
  25. package/packages/client/src/styles/fonts/fira-code/5.3.0/LICENSE +93 -0
  26. package/packages/client/src/styles/fonts/fira-code/5.3.0/download.json +47 -0
  27. package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-cyrillic-ext-wght-normal.woff2 +0 -0
  28. package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-cyrillic-wght-normal.woff2 +0 -0
  29. package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-greek-ext-wght-normal.woff2 +0 -0
  30. package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-greek-wght-normal.woff2 +0 -0
  31. package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-latin-ext-wght-normal.woff2 +0 -0
  32. package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-latin-wght-normal.woff2 +0 -0
  33. package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-symbols2-wght-normal.woff2 +0 -0
  34. package/packages/client/src/styles/fonts/fira-code/5.3.0/font.css +62 -0
  35. package/packages/client/src/styles/fonts/fira-code/5.3.0/resource.json +82 -0
  36. package/packages/client/src/styles/fonts/inter/5.3.0/LICENSE +93 -0
  37. package/packages/client/src/styles/fonts/inter/5.3.0/download.json +47 -0
  38. package/packages/client/src/styles/fonts/inter/5.3.0/font.css +62 -0
  39. package/packages/client/src/styles/fonts/inter/5.3.0/inter-cyrillic-ext-standard-normal.woff2 +0 -0
  40. package/packages/client/src/styles/fonts/inter/5.3.0/inter-cyrillic-standard-normal.woff2 +0 -0
  41. package/packages/client/src/styles/fonts/inter/5.3.0/inter-greek-ext-standard-normal.woff2 +0 -0
  42. package/packages/client/src/styles/fonts/inter/5.3.0/inter-greek-standard-normal.woff2 +0 -0
  43. package/packages/client/src/styles/fonts/inter/5.3.0/inter-latin-ext-standard-normal.woff2 +0 -0
  44. package/packages/client/src/styles/fonts/inter/5.3.0/inter-latin-standard-normal.woff2 +0 -0
  45. package/packages/client/src/styles/fonts/inter/5.3.0/inter-vietnamese-standard-normal.woff2 +0 -0
  46. package/packages/client/src/styles/fonts/inter/5.3.0/resource.json +82 -0
  47. package/packages/client/src/styles/generated/theme-fonts.css +3 -3
  48. package/packages/client/src/styles/generated/theme-palette.css +1001 -634
  49. package/packages/client/src/styles/generated/theme-runtime.css +938 -607
  50. package/packages/client/src/styles/generated-sources.css +1 -1
  51. package/packages/client/src/styles/layout.css +88 -0
  52. package/packages/client/src/styles/recipes/action.css +4 -16
  53. package/packages/client/src/styles/recipes/disabled.css +8 -0
  54. package/packages/client/src/styles/recipes/option.css +0 -44
  55. package/packages/client/src/styles/recipes/selection.css +28 -39
  56. package/packages/client/src/styles/theme-support.css +26 -42
  57. package/packages/client/src/styles/typography.css +26 -0
  58. package/packages/client/types/assets/bridge.d.ts +1 -2
  59. package/packages/client/types/capabilities/collection.d.ts +7 -0
  60. package/packages/client/types/capabilities/collection.entry.generated.d.ts +3 -0
  61. package/packages/client/types/capabilities/shortcut.d.ts +4 -3
  62. package/packages/client/types/components/accordion/machine.d.ts +4 -4
  63. package/packages/client/types/components/app/contract.d.ts +5 -5
  64. package/packages/client/types/components/badge/contract.d.ts +1 -0
  65. package/packages/client/types/components/box/contract.d.ts +17 -12
  66. package/packages/client/types/components/box/index.d.ts +1 -1
  67. package/packages/client/types/components/button/contract.d.ts +3 -2
  68. package/packages/client/types/components/card/contract.d.ts +27 -16
  69. package/packages/client/types/components/checkbox/contract.d.ts +13 -13
  70. package/packages/client/types/components/common.d.ts +13 -11
  71. package/packages/client/types/components/container/contract.d.ts +4 -3
  72. package/packages/client/types/components/data-grid/contract.d.ts +3 -2
  73. package/packages/client/types/components/date-picker/contract.d.ts +2 -2
  74. package/packages/client/types/components/date-picker/machine.d.ts +11 -11
  75. package/packages/client/types/components/dropdown/contract.d.ts +1 -1
  76. package/packages/client/types/components/dropdown/machine.d.ts +5 -3
  77. package/packages/client/types/components/field/contract.d.ts +4 -4
  78. package/packages/client/types/components/file-upload/contract.d.ts +3 -3
  79. package/packages/client/types/components/file-upload/machine.d.ts +4 -4
  80. package/packages/client/types/components/flex/contract.d.ts +10 -8
  81. package/packages/client/types/components/frame/contract.d.ts +14 -11
  82. package/packages/client/types/components/grid/contract.d.ts +8 -7
  83. package/packages/client/types/components/image/contract.d.ts +1 -0
  84. package/packages/client/types/components/import-flow/contract.d.ts +1 -0
  85. package/packages/client/types/components/input/contract.d.ts +1 -0
  86. package/packages/client/types/components/input/machine.d.ts +2 -2
  87. package/packages/client/types/components/layout.d.ts +91 -35
  88. package/packages/client/types/components/menu/contract.d.ts +27 -10
  89. package/packages/client/types/components/modal/contract.d.ts +22 -5
  90. package/packages/client/types/components/panels/contract.d.ts +2 -2
  91. package/packages/client/types/components/panels/index.d.ts +2 -1
  92. package/packages/client/types/components/panels/machine.d.ts +9 -8
  93. package/packages/client/types/components/radio/contract.d.ts +8 -8
  94. package/packages/client/types/components/scroll-area/contract.d.ts +1 -20
  95. package/packages/client/types/components/section/contract.d.ts +4 -3
  96. package/packages/client/types/components/select/contract.d.ts +3 -3
  97. package/packages/client/types/components/select/machine.d.ts +13 -13
  98. package/packages/client/types/components/select/presentation.d.ts +1 -0
  99. package/packages/client/types/components/sidebar/contract.d.ts +26 -8
  100. package/packages/client/types/components/sidebar/groups.d.ts +4 -0
  101. package/packages/client/types/components/sidebar/index.d.ts +5 -4
  102. package/packages/client/types/components/slider/contract.d.ts +1 -0
  103. package/packages/client/types/components/slider/machine.d.ts +10 -5
  104. package/packages/client/types/components/stack/contract.d.ts +10 -8
  105. package/packages/client/types/components/switch/contract.d.ts +8 -8
  106. package/packages/client/types/components/table/contract.d.ts +6 -5
  107. package/packages/client/types/components/tabs/index.d.ts +2 -1
  108. package/packages/client/types/components/tabs/machine.d.ts +2 -2
  109. package/packages/client/types/components/textarea/contract.d.ts +1 -1
  110. package/packages/client/types/components/toast/machine.d.ts +2 -2
  111. package/packages/client/types/components/tooltip/contract.d.ts +13 -13
  112. package/packages/client/types/components/tooltip/machine.d.ts +3 -7
  113. package/packages/client/types/core.d.ts +3 -1
  114. package/packages/client/types/directives/anchor.d.ts +1 -0
  115. package/packages/client/types/directives/animate.d.ts +3 -0
  116. package/packages/client/types/directives/collection.d.ts +9 -0
  117. package/packages/client/types/directives/index.d.ts +2 -2
  118. package/packages/client/types/docs/transition-docs.d.ts +0 -2
  119. package/packages/client/types/motion/animate.d.ts +7 -2
  120. package/packages/client/types/motion/config.d.ts +118 -0
  121. package/packages/client/types/motion/feedback.d.ts +3 -0
  122. package/packages/client/types/motion/index.d.ts +8 -107
  123. package/packages/client/types/motion/layout.d.ts +25 -0
  124. package/packages/client/types/motion/lifecycle.d.ts +10 -0
  125. package/packages/client/types/motion/owned.d.ts +15 -4
  126. package/packages/client/types/motion/properties.d.ts +17 -0
  127. package/packages/client/types/motion/recipe.d.ts +8 -75
  128. package/packages/client/types/motion/reduced-motion.d.ts +7 -8
  129. package/packages/client/types/motion/registry.d.ts +37 -0
  130. package/packages/client/types/motion/resize-preview.d.ts +26 -0
  131. package/packages/client/types/motion/resize.d.ts +3 -1
  132. package/packages/client/types/motion/size.d.ts +7 -4
  133. package/packages/client/types/runtime/anchored-popover.d.ts +11 -2
  134. package/packages/client/types/runtime/collection-navigation.d.ts +12 -4
  135. package/packages/client/types/runtime/control-size.d.ts +4 -0
  136. package/packages/client/types/runtime/drag-and-drop/index.d.ts +10 -3
  137. package/packages/client/types/runtime/drag-and-drop/sortable/ghost.d.ts +2 -1
  138. package/packages/client/types/runtime/engine/fragment.d.ts +2 -1
  139. package/packages/client/types/runtime/engine/stream.d.ts +5 -9
  140. package/packages/client/types/runtime/focus.d.ts +3 -1
  141. package/packages/client/types/runtime/index.d.ts +2 -2
  142. package/packages/client/types/runtime/layout-participant.d.ts +10 -9
  143. package/packages/client/types/runtime/layout-task.d.ts +9 -0
  144. package/packages/client/types/runtime/morph-engine.d.ts +1 -0
  145. package/packages/client/types/runtime/option-data.d.ts +2 -1
  146. package/packages/client/types/runtime/preferences.d.ts +14 -0
  147. package/packages/client/types/runtime/scroll-area-schema.d.ts +23 -0
  148. package/packages/client/types/runtime/theme.d.ts +6 -4
  149. package/packages/client/types/runtime/ui.d.ts +5 -5
  150. package/packages/client/types/runtime/virtualizer-schema.d.ts +3 -1
  151. package/packages/client/types/runtime/virtualizer-size.d.ts +7 -0
  152. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-B7apK0M-.js +2 -0
  153. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-B7apK0M-.js.map +1 -0
  154. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge.js +1 -1
  155. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/build-metadata.json +984 -1132
  156. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{anchor-B-CbpFFU.js → anchor-DXCLxWw-.js} +2 -2
  157. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{anchor-B-CbpFFU.js.map → anchor-DXCLxWw-.js.map} +1 -1
  158. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/anchor.js +2 -2
  159. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection-CSrnChwy.js +2 -0
  160. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection-CSrnChwy.js.map +1 -0
  161. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection.js +2 -0
  162. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable-DlgeSL0c.js +2 -0
  163. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{resizable-Ctqx_OoS.js.map → resizable-DlgeSL0c.js.map} +1 -1
  164. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable.js +2 -2
  165. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut-Qa2EByIB.js +2 -0
  166. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{shortcut-D2NgvMgw.js.map → shortcut-Qa2EByIB.js.map} +1 -1
  167. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut.js +2 -2
  168. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable-CgP1efhO.js +2 -0
  169. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{sortable-CbIOS4Lm.js.map → sortable-CgP1efhO.js.map} +1 -1
  170. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable.js +2 -2
  171. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-BqejlBjS.js +2 -0
  172. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-BqejlBjS.js.map +1 -0
  173. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-DPMSJ1AR.js +2 -0
  174. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-DPMSJ1AR.js.map +1 -0
  175. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BFvGIAs8.js +2 -0
  176. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BFvGIAs8.js.map +1 -0
  177. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-CpUAUTdh.js +5 -0
  178. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-CpUAUTdh.js.map +1 -0
  179. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-et2se66r.js +2 -0
  180. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-et2se66r.js.map +1 -0
  181. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DnEHZCqy.js +2 -0
  182. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DnEHZCqy.js.map +1 -0
  183. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/control-size-BcDu1m1N.js +2 -0
  184. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/control-size-BcDu1m1N.js.map +1 -0
  185. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-de7TruDm.js +2 -0
  186. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-de7TruDm.js.map +1 -0
  187. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-DdiMUeJM.js +2 -0
  188. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-DdiMUeJM.js.map +1 -0
  189. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-MzcgNRti.js +2 -0
  190. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-MzcgNRti.js.map +1 -0
  191. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-zFOeeob-.js +6 -0
  192. 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
  193. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/feedback-DP_ydw-J.js +2 -0
  194. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/feedback-DP_ydw-J.js.map +1 -0
  195. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/floating-ui.dom-B05VsV_p.js +2 -0
  196. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/floating-ui.dom-B05VsV_p.js.map +1 -0
  197. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-pk_lz9sg.js → focus-BvBkrIcj.js} +2 -2
  198. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-pk_lz9sg.js.map → focus-BvBkrIcj.js.map} +1 -1
  199. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-DYfME-Rk.js +2 -0
  200. 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
  201. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-DVphuQVV.js +2 -0
  202. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-DVphuQVV.js.map +1 -0
  203. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/frame-DsKHMcuL.js +2 -0
  204. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/frame-DsKHMcuL.js.map +1 -0
  205. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/hover-CqeHOHpJ.js +2 -0
  206. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/hover-CqeHOHpJ.js.map +1 -0
  207. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/identity-BMTQyLbq.js +2 -0
  208. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/identity-BMTQyLbq.js.map +1 -0
  209. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-mHPk9rxi.js +2 -0
  210. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-mHPk9rxi.js.map +1 -0
  211. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-task-B6P8q7BH.js +2 -0
  212. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-task-B6P8q7BH.js.map +1 -0
  213. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-wLgk8rAu.js +2 -0
  214. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-wLgk8rAu.js.map +1 -0
  215. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-Do4tL7nc.js +2 -0
  216. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-Do4tL7nc.js.map +1 -0
  217. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/option-data-Du9mqQPo.js +2 -0
  218. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/option-data-Du9mqQPo.js.map +1 -0
  219. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preferences-BZyZ-kK6.js +2 -0
  220. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preferences-BZyZ-kK6.js.map +1 -0
  221. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preload-helper-BZ1Pz5am.js +1 -0
  222. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/properties-D8pFWF8g.js +2 -0
  223. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/properties-D8pFWF8g.js.map +1 -0
  224. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-DRGrWivx.js +2 -0
  225. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-DRGrWivx.js.map +1 -0
  226. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-preview-hnUhGcMX.js +2 -0
  227. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-preview-hnUhGcMX.js.map +1 -0
  228. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-area-schema-DZgYyysJ.js +2 -0
  229. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-area-schema-DZgYyysJ.js.map +1 -0
  230. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/size-DAtboz8G.js +2 -0
  231. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/size-DAtboz8G.js.map +1 -0
  232. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{styles-CQDZhwd_.js → styles-BvLCjUXV.js} +2 -2
  233. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-BvLCjUXV.js.map +1 -0
  234. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CVVSxrtG.js +4 -0
  235. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CVVSxrtG.js.map +1 -0
  236. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-size-CTy2gO64.js +2 -0
  237. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-size-CTy2gO64.js.map +1 -0
  238. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DGWRKBdw.js +2 -0
  239. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DGWRKBdw.js.map +1 -0
  240. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion.js +2 -2
  241. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-DA4Ii46-.js +2 -0
  242. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-DA4Ii46-.js.map +1 -0
  243. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button.js +2 -2
  244. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-omt0I9Rh.js +2 -0
  245. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-omt0I9Rh.js.map +1 -0
  246. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox.js +2 -2
  247. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-Cr9kEoo9.js +2 -0
  248. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-Cr9kEoo9.js.map +1 -0
  249. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid.js +2 -2
  250. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-CtTM4Gf6.js +2 -0
  251. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-CtTM4Gf6.js.map +1 -0
  252. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker.js +2 -2
  253. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-B4dcq4bn.js +2 -0
  254. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-B4dcq4bn.js.map +1 -0
  255. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload.js +2 -2
  256. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-BEMZqp_I.js +2 -0
  257. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-BEMZqp_I.js.map +1 -0
  258. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown.js +2 -2
  259. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-BeqlTp38.js +2 -0
  260. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-BeqlTp38.js.map +1 -0
  261. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field.js +2 -2
  262. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DCluNmYW.js +2 -0
  263. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DCluNmYW.js.map +1 -0
  264. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload.js +2 -2
  265. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-DkPKkwlt.js +2 -0
  266. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-DkPKkwlt.js.map +1 -0
  267. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset.js +2 -2
  268. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-aSuqkRen.js +2 -0
  269. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-aSuqkRen.js.map +1 -0
  270. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper.js +2 -2
  271. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-2UqpKKXs.js +2 -0
  272. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-2UqpKKXs.js.map +1 -0
  273. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input.js +2 -2
  274. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-DjUHW-EE.js +2 -0
  275. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-DjUHW-EE.js.map +1 -0
  276. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding.js +2 -2
  277. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-DYn805Mg.js +2 -0
  278. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-DYn805Mg.js.map +1 -0
  279. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal.js +2 -2
  280. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-C4TtKM8_.js +2 -0
  281. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-C4TtKM8_.js.map +1 -0
  282. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels.js +2 -2
  283. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-gAYZVe11.js +2 -0
  284. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-gAYZVe11.js.map +1 -0
  285. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio.js +2 -2
  286. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-SBruA-pr.js +2 -0
  287. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-SBruA-pr.js.map +1 -0
  288. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area.js +2 -2
  289. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-C3hjgwMw.js +2 -0
  290. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-C3hjgwMw.js.map +1 -0
  291. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select.js +2 -2
  292. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-b0T3yohM.js +2 -0
  293. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-b0T3yohM.js.map +1 -0
  294. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar.js +2 -2
  295. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-B08DRTzI.js +2 -0
  296. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-B08DRTzI.js.map +1 -0
  297. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider.js +2 -2
  298. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CO-1hVz6.js +2 -0
  299. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CO-1hVz6.js.map +1 -0
  300. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch.js +2 -2
  301. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-BlPgZVqW.js +2 -0
  302. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-BlPgZVqW.js.map +1 -0
  303. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table.js +2 -2
  304. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-CDbYmlUb.js +2 -0
  305. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-CDbYmlUb.js.map +1 -0
  306. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs.js +2 -2
  307. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-Dxht5Hhg.js +2 -0
  308. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-Dxht5Hhg.js.map +1 -0
  309. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast.js +2 -2
  310. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-Ck_ZV7RN.js +2 -0
  311. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-Ck_ZV7RN.js.map +1 -0
  312. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip.js +2 -2
  313. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-BfCjewp3.js +2 -0
  314. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-BfCjewp3.js.map +1 -0
  315. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer.js +2 -2
  316. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-CbDVD_pk.js +2 -0
  317. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-CbDVD_pk.js.map +1 -0
  318. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core.js +2 -2
  319. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/logical-entry-manifest.json +299 -441
  320. package/packages/theme-engine/README.md +98 -18
  321. package/packages/theme-engine/THEME_AUTHORING.md +34 -0
  322. package/packages/theme-engine/dist/trellis.js +613 -285
  323. package/packages/theme-engine/fonts/fira-code/5.3.0/LICENSE +93 -0
  324. package/packages/theme-engine/fonts/fira-code/5.3.0/download.json +47 -0
  325. package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-cyrillic-ext-wght-normal.woff2 +0 -0
  326. package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-cyrillic-wght-normal.woff2 +0 -0
  327. package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-greek-ext-wght-normal.woff2 +0 -0
  328. package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-greek-wght-normal.woff2 +0 -0
  329. package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-latin-ext-wght-normal.woff2 +0 -0
  330. package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-latin-wght-normal.woff2 +0 -0
  331. package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-symbols2-wght-normal.woff2 +0 -0
  332. package/packages/theme-engine/fonts/fira-code/5.3.0/font.css +62 -0
  333. package/packages/theme-engine/fonts/fira-code/5.3.0/resource.json +82 -0
  334. package/packages/theme-engine/fonts/inter/5.3.0/LICENSE +93 -0
  335. package/packages/theme-engine/fonts/inter/5.3.0/download.json +47 -0
  336. package/packages/theme-engine/fonts/inter/5.3.0/font.css +62 -0
  337. package/packages/theme-engine/fonts/inter/5.3.0/inter-cyrillic-ext-standard-normal.woff2 +0 -0
  338. package/packages/theme-engine/fonts/inter/5.3.0/inter-cyrillic-standard-normal.woff2 +0 -0
  339. package/packages/theme-engine/fonts/inter/5.3.0/inter-greek-ext-standard-normal.woff2 +0 -0
  340. package/packages/theme-engine/fonts/inter/5.3.0/inter-greek-standard-normal.woff2 +0 -0
  341. package/packages/theme-engine/fonts/inter/5.3.0/inter-latin-ext-standard-normal.woff2 +0 -0
  342. package/packages/theme-engine/fonts/inter/5.3.0/inter-latin-standard-normal.woff2 +0 -0
  343. package/packages/theme-engine/fonts/inter/5.3.0/inter-vietnamese-standard-normal.woff2 +0 -0
  344. package/packages/theme-engine/fonts/inter/5.3.0/resource.json +82 -0
  345. package/packages/theme-engine/generated/knobs/v1/color-alpha.json +1 -1
  346. package/packages/theme-engine/generated/knobs/v1/color-foundations.json +1 -1
  347. package/packages/theme-engine/generated/knobs/v1/color-ink.json +1 -1
  348. package/packages/theme-engine/generated/knobs/v1/color-lighting.json +1 -1
  349. package/packages/theme-engine/generated/knobs/v1/color-normalization.json +1 -1
  350. package/packages/theme-engine/generated/knobs/v1/color-ramps.json +1 -1
  351. package/packages/theme-engine/generated/knobs/v1/composition.json +1 -1
  352. package/packages/theme-engine/generated/knobs/v1/depth.json +1 -1
  353. package/packages/theme-engine/generated/knobs/v1/edges.json +1 -1
  354. package/packages/theme-engine/generated/knobs/v1/index.json +572 -85
  355. package/packages/theme-engine/generated/knobs/v1/manifest.json +25 -46
  356. package/packages/theme-engine/generated/knobs/v1/radii.json +50 -1
  357. package/packages/theme-engine/generated/knobs/v1/semantic-actions.json +1 -1
  358. package/packages/theme-engine/generated/knobs/v1/semantic-disabled.json +1 -1
  359. package/packages/theme-engine/generated/knobs/v1/semantic-disclosure.json +1 -1
  360. package/packages/theme-engine/generated/knobs/v1/semantic-intents.json +856 -37
  361. package/packages/theme-engine/generated/knobs/v1/semantic-scrim.json +1 -1
  362. package/packages/theme-engine/generated/knobs/v1/semantic-selection.json +1 -1
  363. package/packages/theme-engine/generated/knobs/v1/semantic-structure.json +1 -1
  364. package/packages/theme-engine/generated/knobs/v1/semantic-text-selection.json +372 -0
  365. package/packages/theme-engine/generated/knobs/v1/sizing-anatomy.json +4 -4
  366. package/packages/theme-engine/generated/knobs/v1/sizing-controls.json +1 -1
  367. package/packages/theme-engine/generated/knobs/v1/sizing-measures.json +1 -1
  368. package/packages/theme-engine/generated/knobs/v1/spacing.json +2 -2
  369. package/packages/theme-engine/generated/knobs/v1/substrates.json +1 -1
  370. package/packages/theme-engine/generated/knobs/v1/surfaces.json +1 -1
  371. package/packages/theme-engine/generated/knobs/v1/typography-anatomy.json +1 -1
  372. package/packages/theme-engine/generated/knobs/v1/typography-fonts.json +158 -40
  373. package/packages/theme-engine/generated/knobs/v1/typography-scale.json +1 -1
  374. package/packages/theme-engine/generated/schemas/theme-config-v1.json +108 -36
  375. package/packages/theme-engine/generated/schemas/theme-manifest-v1.json +10 -37
  376. package/packages/theme-engine/skills/create-trellis-theme/SKILL.md +4 -5
  377. package/packages/client/src/components/app/styles.css +0 -1
  378. package/packages/client/src/components/brand/styles.css +0 -8
  379. package/packages/client/src/styles/motion.css +0 -26
  380. package/packages/client/src/styles/static.css +0 -3
  381. package/packages/client/types/assets/full-runtime.generated.d.ts +0 -2
  382. package/packages/client/types/capabilities/motion.d.ts +0 -6
  383. package/packages/client/types/capabilities/motion.entry.generated.d.ts +0 -3
  384. package/packages/client/types/cdn.d.ts +0 -2
  385. package/packages/client/types/components/entry.generated.d.ts +0 -37
  386. package/packages/client/types/directives/bounds.d.ts +0 -4
  387. package/packages/client/types/directives/layout.d.ts +0 -3
  388. package/packages/client/types/index.d.ts +0 -8
  389. package/packages/client/types/motion/bounds.d.ts +0 -20
  390. package/packages/client/types/motion/controller.d.ts +0 -33
  391. package/packages/client/types/motion/flip.d.ts +0 -14
  392. package/packages/client/types/motion/plan.d.ts +0 -52
  393. package/packages/client/types/motion/stream.d.ts +0 -18
  394. package/packages/client/types/motion/targets.d.ts +0 -23
  395. package/packages/client/types/motion/view.d.ts +0 -27
  396. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis-103fb43eb5e1.css +0 -14030
  397. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.css +0 -14030
  398. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min-584dec82495c.css +0 -2
  399. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min.css +0 -2
  400. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-COxhbtRZ.js +0 -1
  401. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion-CKiK3BQA.js +0 -2
  402. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion-CKiK3BQA.js.map +0 -1
  403. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion.js +0 -2
  404. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable-Ctqx_OoS.js +0 -2
  405. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut-D2NgvMgw.js +0 -2
  406. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable-CbIOS4Lm.js +0 -2
  407. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/alpine-machine-CE2UN4Qu.js +0 -2
  408. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/alpine-machine-CE2UN4Qu.js.map +0 -1
  409. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-DMrvM3JE.js +0 -2
  410. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-DMrvM3JE.js.map +0 -1
  411. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-lhqk7hfo.js +0 -2
  412. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-lhqk7hfo.js.map +0 -1
  413. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-B32HePGn.js +0 -2
  414. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-B32HePGn.js.map +0 -1
  415. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-ByUbMIHF.js +0 -2
  416. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-ByUbMIHF.js.map +0 -1
  417. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js +0 -2
  418. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js.map +0 -1
  419. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bl6ng6Hd.js +0 -5
  420. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bl6ng6Hd.js.map +0 -1
  421. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js +0 -2
  422. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js.map +0 -1
  423. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-CBK89mIt.js +0 -2
  424. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-CBK89mIt.js.map +0 -1
  425. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-C8xqwkr0.js +0 -2
  426. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-C8xqwkr0.js.map +0 -1
  427. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-BxNepYBE.js +0 -2
  428. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-BxNepYBE.js.map +0 -1
  429. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js +0 -2
  430. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js.map +0 -1
  431. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js +0 -2
  432. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js.map +0 -1
  433. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-DrqJDAVH.js +0 -6
  434. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-7hdXmBLE.js +0 -2
  435. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-7hdXmBLE.js.map +0 -1
  436. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BCTWp6Xu.js +0 -2
  437. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BCTWp6Xu.js.map +0 -1
  438. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BQNpmLZO.js +0 -2
  439. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BQNpmLZO.js.map +0 -1
  440. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BRaKxvab.js +0 -2
  441. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BRaKxvab.js.map +0 -1
  442. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BZWdGtgg.js +0 -2
  443. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BZWdGtgg.js.map +0 -1
  444. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BnqcHAaF.js +0 -2
  445. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BnqcHAaF.js.map +0 -1
  446. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BzLNUDzF.js +0 -2
  447. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BzLNUDzF.js.map +0 -1
  448. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CC6pQ0nu.js +0 -2
  449. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CC6pQ0nu.js.map +0 -1
  450. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CEfr2bmw.js +0 -2
  451. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CEfr2bmw.js.map +0 -1
  452. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CL4bjCqf.js +0 -2
  453. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CL4bjCqf.js.map +0 -1
  454. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CVWqQEed.js +0 -2
  455. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CVWqQEed.js.map +0 -1
  456. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C_SxTqg5.js +0 -2
  457. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C_SxTqg5.js.map +0 -1
  458. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cbyseoex.js +0 -2
  459. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cbyseoex.js.map +0 -1
  460. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cf2hKkwA.js +0 -2
  461. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cf2hKkwA.js.map +0 -1
  462. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CfYgsDun.js +0 -2
  463. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CfYgsDun.js.map +0 -1
  464. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cl8rInnJ.js +0 -2
  465. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cl8rInnJ.js.map +0 -1
  466. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Ct9H8Hlf.js +0 -2
  467. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Ct9H8Hlf.js.map +0 -1
  468. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D2es_Wi2.js +0 -2
  469. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D2es_Wi2.js.map +0 -1
  470. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DQtFqG0K.js +0 -2
  471. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DQtFqG0K.js.map +0 -1
  472. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-EqHVGr1d.js +0 -2
  473. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-EqHVGr1d.js.map +0 -1
  474. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-FCDgmA0s.js +0 -2
  475. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-FCDgmA0s.js.map +0 -1
  476. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-HqE8R7N1.js +0 -2
  477. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-HqE8R7N1.js.map +0 -1
  478. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-J0oGNBzS.js +0 -2
  479. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-J0oGNBzS.js.map +0 -1
  480. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-O0hEhk-2.js +0 -2
  481. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-O0hEhk-2.js.map +0 -1
  482. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oJwO9fIY.js +0 -2
  483. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oJwO9fIY.js.map +0 -1
  484. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js +0 -2
  485. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js.map +0 -1
  486. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/flip-BKThFI4L.js +0 -2
  487. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/flip-BKThFI4L.js.map +0 -1
  488. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-BrYxsrhc.js +0 -2
  489. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-9OT0mn7F.js +0 -2
  490. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-9OT0mn7F.js.map +0 -1
  491. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CNnHDbyo.js +0 -2
  492. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CNnHDbyo.js.map +0 -1
  493. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-RwlK04Cy.js +0 -3
  494. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-RwlK04Cy.js.map +0 -1
  495. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/pdd-BG5sXFGF.js +0 -2
  496. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/pdd-BG5sXFGF.js.map +0 -1
  497. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-CQDZhwd_.js.map +0 -1
  498. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-Bg44ZmC3.js +0 -4
  499. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-Bg44ZmC3.js.map +0 -1
  500. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DpoqsP_I.js +0 -1
  501. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-Dnf0aKac.js +0 -1
  502. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-BpFFtrfY.js +0 -1
  503. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-CCPYnOuT.js +0 -1
  504. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-BCkP5gtC.js +0 -1
  505. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-DaT6-YFL.js +0 -1
  506. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-Cc84envj.js +0 -1
  507. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-CtQbyblj.js +0 -1
  508. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DARtpJDT.js +0 -1
  509. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-CPO4XZkB.js +0 -1
  510. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-C-3lKsKm.js +0 -1
  511. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index-DRH3gncZ.js +0 -2
  512. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index-DRH3gncZ.js.map +0 -1
  513. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js +0 -2
  514. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-BKEbDkKa.js +0 -1
  515. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-RIi2q1IT.js +0 -1
  516. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-MUHGUsup.js +0 -1
  517. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-DNAroAhk.js +0 -1
  518. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-DrGFMWGq.js +0 -1
  519. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-CyUCAbgG.js +0 -1
  520. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-BjLF548F.js +0 -1
  521. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-GpvEBW3K.js +0 -1
  522. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-OztnTlqr.js +0 -1
  523. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CZ7aiASg.js +0 -1
  524. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-G3G5d2Eo.js +0 -1
  525. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-bq7j1uwx.js +0 -1
  526. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-DkP0-rBO.js +0 -1
  527. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-OITEWczP.js +0 -1
  528. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-CkRX2qVO.js +0 -1
  529. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-Z4zMCScs.js +0 -1
  530. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index-DAz_hKiB.js +0 -2
  531. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index-DAz_hKiB.js.map +0 -1
  532. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +0 -2
  533. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis-ecb43dfd3b7b.js +0 -11
  534. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +0 -11
  535. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min-ecb43dfd3b7b.js +0 -11
  536. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +0 -11
  537. 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) => {
@@ -3090,6 +3066,13 @@ var addAppearanceTokens = (group, appearance) => {
3090
3066
  "focus-width"
3091
3067
  ], token("dimension", dimensionValue(output.focus.width), `--color-intent-${intentName}-focus-width`, "runtime"));
3092
3068
  }
3069
+ const textSelection = appearance.semantic.textSelection;
3070
+ put(group, ["background", "text-selection"], colorToken(textSelection.background.color, "--background-text-selection", "runtime"));
3071
+ if (textSelection.foreground !== "inherit") put(group, [
3072
+ "color",
3073
+ "text-selection",
3074
+ "ink"
3075
+ ], colorToken(textSelection.foreground.color, "--color-text-selection-ink", "runtime"));
3093
3076
  const interactions = appearance.semantic.interactions;
3094
3077
  for (const name of Object.keys(interactions.selection.treatments).sort()) {
3095
3078
  const treatment = interactions.selection.treatments[name];
@@ -3222,6 +3205,7 @@ var generateDesignTokens = (theme) => {
3222
3205
  //#endregion
3223
3206
  //#region packages/theme-engine/src/design-tokens/validate.ts
3224
3207
  var TOKEN_TYPES = /* @__PURE__ */ new Set([
3208
+ "cubicBezier",
3225
3209
  "color",
3226
3210
  "dimension",
3227
3211
  "duration",
@@ -3349,7 +3333,12 @@ var validateFontResource = (value, path, diagnostics) => {
3349
3333
  reject(diagnostics, path, value, "A font resource must be an object.");
3350
3334
  return;
3351
3335
  }
3352
- if (typeof value.id !== "string") reject(diagnostics, `${path}/id`, value.id, "A font resource id must be a string.");
3336
+ if (typeof value.resourceId !== "string") reject(diagnostics, `${path}/resourceId`, value.resourceId, "A font resource name must be a string.");
3337
+ if (value.type === "fontsource") {
3338
+ if (typeof value.id !== "string" || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(value.id)) reject(diagnostics, `${path}/id`, value.id, "Invalid Fontsource catalog id.");
3339
+ if (typeof value.version !== "string" || !/^\d+\.\d+\.\d+$/.test(value.version)) reject(diagnostics, `${path}/version`, value.version, "Fontsource requires an exact package version.");
3340
+ return;
3341
+ }
3353
3342
  if (value.type === "bunny") {
3354
3343
  if (typeof value.url !== "string") reject(diagnostics, `${path}/url`, value.url, "A Bunny font resource URL must be a string.");
3355
3344
  return;
@@ -3369,6 +3358,7 @@ var validateFontResource = (value, path, diagnostics) => {
3369
3358
  return;
3370
3359
  }
3371
3360
  for (const field of ["family", "src"]) if (typeof face[field] !== "string") reject(diagnostics, `${facePath}/${field}`, face[field], `Font face ${field} must be a string.`);
3361
+ 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
3362
  if (!FONT_FORMATS.has(String(face.format))) reject(diagnostics, `${facePath}/format`, face.format, "The font face format is not supported by Trellis.");
3373
3363
  if (!FONT_STYLES.has(String(face.style))) reject(diagnostics, `${facePath}/style`, face.style, "The font face style is not supported by Trellis.");
3374
3364
  if (!isRecord$1(face.weight)) reject(diagnostics, `${facePath}/weight`, face.weight, "Font face weight must be an object.");
@@ -3401,6 +3391,9 @@ var validateTokenValue = (type, value, path, diagnostics) => {
3401
3391
  case "dimension":
3402
3392
  validateDimension(value, path, diagnostics);
3403
3393
  break;
3394
+ case "cubicBezier":
3395
+ 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.");
3396
+ break;
3404
3397
  case "duration":
3405
3398
  validateDimension(value, path, diagnostics, DURATION_UNITS);
3406
3399
  break;
@@ -5071,7 +5064,12 @@ var RadiusConfigSchema = Type.Object({
5071
5064
  control: Type.Optional(RadiusStepSchema),
5072
5065
  surface: Type.Optional(RadiusStepSchema),
5073
5066
  overlay: Type.Optional(RadiusStepSchema)
5074
- }, closed$1))
5067
+ }, closed$1)),
5068
+ dismiss: Type.Optional(Type.Union([
5069
+ RadiusStepSchema,
5070
+ Type.Literal("none"),
5071
+ Type.Literal("full")
5072
+ ]))
5075
5073
  }, closed$1);
5076
5074
  var SpacingStepSchema = Type.Number({
5077
5075
  minimum: 0,
@@ -5197,37 +5195,46 @@ var FontWeightRangeSchema = Type.Object({
5197
5195
  maximum: 1e3
5198
5196
  })
5199
5197
  }, closed$1);
5200
- var FontResourceSchema = Type.Union([Type.Object({
5201
- type: Type.Literal("bunny"),
5202
- url: Type.String({
5203
- minLength: 1,
5204
- maxLength: 2048
5205
- })
5206
- }, closed$1), Type.Object({
5207
- type: Type.Literal("local"),
5208
- faces: Type.Array(Type.Object({
5209
- family: Type.String({
5210
- minLength: 1,
5211
- maxLength: 128
5212
- }),
5213
- src: Type.String({
5198
+ var FontResourceSchema = Type.Union([
5199
+ Type.Object({
5200
+ type: Type.Literal("fontsource"),
5201
+ id: Type.String({ pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" }),
5202
+ version: Type.String({ pattern: "^\\d+\\.\\d+\\.\\d+$" })
5203
+ }, closed$1),
5204
+ Type.Object({
5205
+ type: Type.Literal("bunny"),
5206
+ url: Type.String({
5214
5207
  minLength: 1,
5215
5208
  maxLength: 2048
5216
- }),
5217
- format: Type.Union([
5218
- Type.Literal("woff2"),
5219
- Type.Literal("woff"),
5220
- Type.Literal("opentype"),
5221
- Type.Literal("truetype")
5222
- ]),
5223
- weight: FontWeightRangeSchema,
5224
- style: Type.Union([
5225
- Type.Literal("normal"),
5226
- Type.Literal("italic"),
5227
- Type.Literal("oblique")
5228
- ])
5229
- }, closed$1), { minItems: 1 })
5230
- }, closed$1)]);
5209
+ })
5210
+ }, closed$1),
5211
+ Type.Object({
5212
+ type: Type.Literal("local"),
5213
+ faces: Type.Array(Type.Object({
5214
+ family: Type.String({
5215
+ minLength: 1,
5216
+ maxLength: 128
5217
+ }),
5218
+ src: Type.String({
5219
+ minLength: 1,
5220
+ maxLength: 2048
5221
+ }),
5222
+ format: Type.Union([
5223
+ Type.Literal("woff2"),
5224
+ Type.Literal("woff"),
5225
+ Type.Literal("opentype"),
5226
+ Type.Literal("truetype")
5227
+ ]),
5228
+ weight: FontWeightRangeSchema,
5229
+ style: Type.Union([
5230
+ Type.Literal("normal"),
5231
+ Type.Literal("italic"),
5232
+ Type.Literal("oblique")
5233
+ ]),
5234
+ 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]+)?)*$" }))
5235
+ }, closed$1), { minItems: 1 })
5236
+ }, closed$1)
5237
+ ]);
5231
5238
  var FontFamilyBindingSchema = Type.Object({
5232
5239
  resource: FontResourceNameSchema,
5233
5240
  family: Type.String({
@@ -5466,6 +5473,15 @@ var SemanticColorReferenceSchema = Type.Union([Type.Object({
5466
5473
  kind: Type.Literal("alpha-step"),
5467
5474
  step: RadixStepSchema
5468
5475
  }, closed$1)]);
5476
+ var TextSelectionColorSchema = Type.Object({
5477
+ family: SemanticFamilySchema,
5478
+ color: SemanticColorReferenceSchema
5479
+ }, closed$1);
5480
+ var TextSelectionSchema = Type.Object({
5481
+ background: Type.Optional(TextSelectionColorSchema),
5482
+ opacity: Type.Optional(Type.Number(unit)),
5483
+ foreground: Type.Optional(Type.Union([Type.Literal("inherit"), TextSelectionColorSchema]))
5484
+ }, closed$1);
5469
5485
  var MinimumDeltaEStrengthSchema = Type.Object({
5470
5486
  kind: Type.Literal("minimum-delta-e"),
5471
5487
  minimum: Type.Number({
@@ -5488,6 +5504,11 @@ var IntentRoleProfileSchema = Type.Object({
5488
5504
  rest: Type.Optional(SemanticColorReferenceSchema),
5489
5505
  hover: Type.Optional(SemanticColorReferenceSchema),
5490
5506
  pressed: Type.Optional(SemanticColorReferenceSchema),
5507
+ strength: Type.Optional(Type.Object({
5508
+ rest: Type.Optional(StateLayerStrengthSchema),
5509
+ hover: Type.Optional(StateLayerStrengthSchema),
5510
+ pressed: Type.Optional(StateLayerStrengthSchema)
5511
+ }, closed$1)),
5491
5512
  foreground: Type.Optional(SemanticColorReferenceSchema),
5492
5513
  foregroundMuted: Type.Optional(SemanticColorReferenceSchema)
5493
5514
  }, closed$1)),
@@ -5603,6 +5624,7 @@ var InteractionConfigV3Schema = Type.Object({
5603
5624
  }, closed$1);
5604
5625
  var SemanticConfigSchema = Type.Object({
5605
5626
  roles: Type.Optional(Type.Object({
5627
+ textSelection: Type.Optional(TextSelectionSchema),
5606
5628
  strategy: Type.Literal("functional-role-graph"),
5607
5629
  version: Type.Literal(1),
5608
5630
  structure: Type.Optional(Type.Object({ separator: Type.Optional(Type.Object({
@@ -5652,13 +5674,6 @@ var SemanticConfigSchema = Type.Object({
5652
5674
  }, closed$1))
5653
5675
  }, closed$1)) }, closed$1))
5654
5676
  }, 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
5677
  var ThemeConfigSchema = Type.Object({
5663
5678
  $schema: Type.Optional(Type.String()),
5664
5679
  schemaVersion: Type.Literal(1),
@@ -5690,7 +5705,6 @@ var ThemeConfigSchema = Type.Object({
5690
5705
  spacing: Type.Optional(SpacingConfigSchema),
5691
5706
  typography: Type.Optional(TypographyConfigSchema),
5692
5707
  sizing: Type.Optional(SizingConfigSchema),
5693
- motion: Type.Optional(MotionConfigSchema),
5694
5708
  semantic: Type.Optional(SemanticConfigSchema)
5695
5709
  }, {
5696
5710
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -10806,13 +10820,6 @@ var parseColor = (input, path) => {
10806
10820
  var isThemeDiagnostic = (value) => "severity" in value;
10807
10821
  //#endregion
10808
10822
  //#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
10823
  var BASELINE_SUBSTRATE = {
10817
10824
  strategy: "region-substrates",
10818
10825
  version: 1,
@@ -10904,7 +10911,8 @@ var BASELINE_RADIUS = {
10904
10911
  control: 3,
10905
10912
  surface: 4,
10906
10913
  overlay: 5
10907
- }
10914
+ },
10915
+ dismiss: "full"
10908
10916
  };
10909
10917
  var BASELINE_EDGE = {
10910
10918
  strategy: "fixed-line-weights",
@@ -10969,7 +10977,7 @@ var BASELINE_SPACING = {
10969
10977
  headerGap: 2,
10970
10978
  headerPaddingInline: 3,
10971
10979
  headerPaddingBlock: 2,
10972
- contentGap: 1,
10980
+ contentGap: .5,
10973
10981
  contentPaddingInline: 2,
10974
10982
  contentPaddingBlock: 2
10975
10983
  }
@@ -11104,10 +11112,10 @@ var BASELINE_SIZING = {
11104
11112
  inset: fixedSizing(2)
11105
11113
  },
11106
11114
  menu: { minimumWidth: fixedSizing(192) },
11107
- menuItem: { controlSize: "lg" },
11115
+ menuItem: { controlSize: "md" },
11108
11116
  keybinding: { key: {
11109
- minimum: 18,
11110
- maximum: 18.5
11117
+ minimum: 16,
11118
+ maximum: 16
11111
11119
  } },
11112
11120
  select: { listboxMaxHeight: fixedSizing(256) },
11113
11121
  panel: {
@@ -11166,12 +11174,14 @@ var BASELINE_TYPOGRAPHY = {
11166
11174
  },
11167
11175
  resources: {
11168
11176
  brand: {
11169
- type: "bunny",
11170
- url: "https://fonts.bunny.net/css?family=inter:400,500,600,700&display=swap"
11177
+ type: "fontsource",
11178
+ id: "inter",
11179
+ version: "5.3.0"
11171
11180
  },
11172
11181
  code: {
11173
- type: "bunny",
11174
- url: "https://fonts.bunny.net/css?family=fira-code:400,500,600,700&display=swap"
11182
+ type: "fontsource",
11183
+ id: "fira-code",
11184
+ version: "5.3.0"
11175
11185
  }
11176
11186
  },
11177
11187
  families: {
@@ -11204,8 +11214,8 @@ var BASELINE_TYPOGRAPHY = {
11204
11214
  },
11205
11215
  2: {
11206
11216
  size: {
11207
- minimum: 14,
11208
- maximum: 14
11217
+ minimum: 13,
11218
+ maximum: 13
11209
11219
  },
11210
11220
  lineHeight: {
11211
11221
  minimum: 20,
@@ -11416,17 +11426,22 @@ var intent = (family, neutral = false) => ({
11416
11426
  },
11417
11427
  soft: {
11418
11428
  rest: {
11419
- kind: "alpha-step",
11420
- step: 3
11429
+ kind: neutral ? "alpha-step" : "step",
11430
+ step: neutral ? 2 : 9
11421
11431
  },
11422
11432
  hover: {
11423
- kind: "alpha-step",
11424
- step: 4
11433
+ kind: neutral ? "alpha-step" : "step",
11434
+ step: neutral ? 3 : 9
11425
11435
  },
11426
11436
  pressed: {
11427
- kind: "alpha-step",
11428
- step: 5
11437
+ kind: neutral ? "alpha-step" : "step",
11438
+ step: neutral ? 4 : 9
11429
11439
  },
11440
+ ...neutral ? {} : { strength: {
11441
+ rest: .1,
11442
+ hover: .15,
11443
+ pressed: .2
11444
+ } },
11430
11445
  foreground: {
11431
11446
  kind: "step",
11432
11447
  step: 11
@@ -11538,6 +11553,17 @@ var selectionTreatmentDefaults = (family) => ({
11538
11553
  });
11539
11554
  var BASELINE_SEMANTIC = {
11540
11555
  roles: {
11556
+ textSelection: {
11557
+ background: {
11558
+ family: "accent",
11559
+ color: {
11560
+ kind: "step",
11561
+ step: 9
11562
+ }
11563
+ },
11564
+ opacity: .25,
11565
+ foreground: "inherit"
11566
+ },
11541
11567
  strategy: "functional-role-graph",
11542
11568
  version: 1,
11543
11569
  structure: { separator: {
@@ -12666,6 +12692,7 @@ var validateTypography = (typography) => {
12666
12692
  }
12667
12693
  continue;
12668
12694
  }
12695
+ if (resource.type === "fontsource") continue;
12669
12696
  for (const [index, face] of resource.faces.entries()) if (face.weight.minimum > face.weight.maximum) diagnostics.push({
12670
12697
  severity: "error",
12671
12698
  code: "config.typography-weight-range",
@@ -12706,6 +12733,15 @@ var validateTypography = (typography) => {
12706
12733
  requested: family.family,
12707
12734
  message: `Typography family ${name} is not requested by its Bunny font resource.`
12708
12735
  });
12736
+ } else if (resource.type === "fontsource") {
12737
+ if (family.family.toLowerCase().replaceAll(/[^a-z0-9]+/g, "-").replaceAll(/^-|-$/g, "") !== resource.id) diagnostics.push({
12738
+ severity: "error",
12739
+ code: "config.typography-family-unavailable",
12740
+ stage: "config",
12741
+ path: `/typography/families/${name}/family`,
12742
+ requested: family.family,
12743
+ message: `Typography family ${name} does not match its Fontsource catalog id.`
12744
+ });
12709
12745
  } else if (!resource.faces.some((face) => face.family === family.family)) diagnostics.push({
12710
12746
  severity: "error",
12711
12747
  code: "config.typography-family-unavailable",
@@ -12826,7 +12862,7 @@ var validateTypography = (typography) => {
12826
12862
  const resource = family === void 0 ? void 0 : typography.resources[family.resource];
12827
12863
  if (family === void 0 || resource === void 0) continue;
12828
12864
  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({
12865
+ 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
12866
  severity: "error",
12831
12867
  code: "config.typography-weight-unavailable",
12832
12868
  stage: "config",
@@ -12918,14 +12954,28 @@ var resolveSemantic = (config, diagnostics) => {
12918
12954
  requested: profile.family,
12919
12955
  message: `Semantic intent ${intentName} references an undeclared palette family.`
12920
12956
  });
12921
- const separator = semantic.roles.structure.separator.color;
12922
- if (!available.has(separator.family)) diagnostics.push({
12957
+ const textSelection = semantic.roles.textSelection;
12958
+ const roleColors = [
12959
+ {
12960
+ path: "structure/separator/color",
12961
+ reference: semantic.roles.structure.separator.color
12962
+ },
12963
+ {
12964
+ path: "textSelection/background",
12965
+ reference: textSelection.background
12966
+ },
12967
+ ...textSelection.foreground === "inherit" ? [] : [{
12968
+ path: "textSelection/foreground",
12969
+ reference: textSelection.foreground
12970
+ }]
12971
+ ];
12972
+ for (const { path, reference } of roleColors) if (!available.has(reference.family)) diagnostics.push({
12923
12973
  severity: "error",
12924
12974
  code: "config.semantic-family-missing",
12925
12975
  stage: "config",
12926
- path: "/semantic/roles/structure/separator/color/family",
12927
- requested: separator.family,
12928
- message: "The structural separator references an undeclared palette family."
12976
+ path: `/semantic/roles/${path}/family`,
12977
+ requested: reference.family,
12978
+ message: `Semantic role ${path} references an undeclared palette family.`
12929
12979
  });
12930
12980
  const layers = [
12931
12981
  ["actions/hover", semantic.interactions.actions.hover],
@@ -12999,7 +13049,6 @@ var resolveThemeConfig = (input) => {
12999
13049
  diagnostics.push(...validateTypography(typography));
13000
13050
  const sizing = mergeObjects(BASELINE_SIZING, config.sizing);
13001
13051
  diagnostics.push(...validateSizing(sizing));
13002
- const motion = mergeObjects(BASELINE_MOTION, config.motion);
13003
13052
  const semantic = resolveSemantic(config, diagnostics);
13004
13053
  const neutral = resolveFamily(familyConfig.catalogue.get("neutral"), config, familyConfig.appearanceOverrides, policies, diagnostics);
13005
13054
  const accent = resolveFamily(familyConfig.catalogue.get("accent"), config, familyConfig.appearanceOverrides, policies, diagnostics);
@@ -13035,7 +13084,6 @@ var resolveThemeConfig = (input) => {
13035
13084
  buildPolicyProvenance(spacing, config.spacing, "/spacing", provenance);
13036
13085
  buildPolicyProvenance(typography, config.typography, "/typography", provenance);
13037
13086
  buildPolicyProvenance(sizing, config.sizing, "/sizing", provenance);
13038
- buildPolicyProvenance(motion, config.motion, "/motion", provenance);
13039
13087
  buildPolicyProvenance(semantic, config.semantic, "/semantic", provenance);
13040
13088
  const authoredInteractions = config.semantic?.interactions;
13041
13089
  if (authoredInteractions?.version === 1) {
@@ -13093,7 +13141,6 @@ var resolveThemeConfig = (input) => {
13093
13141
  spacing,
13094
13142
  typography,
13095
13143
  sizing,
13096
- motion,
13097
13144
  semantic,
13098
13145
  provenance
13099
13146
  }
@@ -13115,6 +13162,13 @@ var compositeLinearRgb = (foreground, opacity, background) => [
13115
13162
  foreground[1] * opacity + background[1] * (1 - opacity),
13116
13163
  foreground[2] * opacity + background[2] * (1 - opacity)
13117
13164
  ];
13165
+ /** Browser source-over compositing uses encoded sRGB channels. */
13166
+ var compositeSrgb = (foreground, background) => {
13167
+ if (foreground.alpha === 1) return foreground;
13168
+ const source = asColor(foreground).to("srgb").coords;
13169
+ const destination = asColor(background).to("srgb").coords;
13170
+ return toCanonicalOklch(new Color("srgb", source.map((channel, index) => Number(channel) * foreground.alpha + Number(destination[index]) * (1 - foreground.alpha)), 1));
13171
+ };
13118
13172
  //#endregion
13119
13173
  //#region packages/theme-engine/src/color/policies/alpha/substrate-composite.ts
13120
13174
  var clamp$1 = (value) => Math.min(1, Math.max(0, value));
@@ -13720,6 +13774,11 @@ var normalizeConstraintPriorityRamp = (input) => {
13720
13774
  };
13721
13775
  };
13722
13776
  //#endregion
13777
+ //#region packages/theme-engine/src/color/css-color.ts
13778
+ var number$1 = (value) => Number(value.toPrecision(6)).toString();
13779
+ /** The emitted color representation is also the input to rendered contrast proof. */
13780
+ 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)})`;
13781
+ //#endregion
13723
13782
  //#region packages/theme-engine/src/color/srgb-proof.ts
13724
13783
  var isInSrgb = (color) => asColor(color).inGamut("srgb", { epsilon: 0 });
13725
13784
  var mapToSrgb = (canonicalColor) => {
@@ -13757,7 +13816,33 @@ var proveRampInSrgb = (ramp) => ({
13757
13816
  //#region packages/theme-engine/src/color/policies/pairing/accessible-ink.ts
13758
13817
  var meetsMinimum = (solution, target) => solution.measurements.wcagRatio >= target.minimumWcagRatio;
13759
13818
  var meetsTarget = (solution, target) => solution.measurements.wcagRatio >= target.targetWcagRatio && Math.abs(solution.measurements.apcaLc) >= target.targetApcaLc;
13760
- var solvePolarity = (name, background, policy, target, polarity) => {
13819
+ var measureInk = (backgrounds, color) => {
13820
+ const proof = (value) => {
13821
+ const srgb = new Color(cssColor(value)).to("srgb");
13822
+ const serialized = toCanonicalOklch(srgb);
13823
+ srgb.coords = srgb.coords.map((channel) => Math.round(Math.min(1, Math.max(0, Number(channel))) * 255) / 255);
13824
+ return {
13825
+ serialized,
13826
+ rendered: toCanonicalOklch(srgb)
13827
+ };
13828
+ };
13829
+ const proofs = backgrounds.map((surface) => {
13830
+ const foreground = compositeSrgb(color, surface);
13831
+ const floating = measureContrast(surface, foreground);
13832
+ const backgroundProof = proof(surface);
13833
+ const foregroundProof = proof(foreground);
13834
+ return {
13835
+ ...floating,
13836
+ wcagRatio: Math.min(floating.wcagRatio, measureContrast(backgroundProof.serialized, foregroundProof.serialized).wcagRatio, measureContrast(backgroundProof.rendered, foregroundProof.rendered).wcagRatio)
13837
+ };
13838
+ });
13839
+ return {
13840
+ wcagRatio: Math.min(...proofs.map(({ wcagRatio }) => wcagRatio)),
13841
+ apcaLc: proofs.reduce((a, b) => Math.abs(a.apcaLc) < Math.abs(b.apcaLc) ? a : b).apcaLc
13842
+ };
13843
+ };
13844
+ var solvePolarity = (name, backgrounds, policy, target, polarity) => {
13845
+ const background = backgrounds[0];
13761
13846
  const desiredChroma = Math.min(target.maximumChroma, background.chroma * policy.chromaInfluence);
13762
13847
  const candidate = (lightness) => {
13763
13848
  const color = proveColorInSrgb({
@@ -13771,15 +13856,15 @@ var solvePolarity = (name, background, policy, target, polarity) => {
13771
13856
  name,
13772
13857
  color,
13773
13858
  polarity,
13774
- measurements: measureContrast(background, color),
13859
+ measurements: measureInk(backgrounds, color),
13775
13860
  targetMet: false
13776
13861
  };
13777
13862
  };
13778
13863
  const endpoint = candidate(polarity === "darker" ? 0 : 1);
13779
13864
  if (!meetsMinimum(endpoint, target)) return void 0;
13780
13865
  const solveNearest = (predicate) => {
13781
- let lower = polarity === "darker" ? 0 : background.lightness;
13782
- let upper = polarity === "darker" ? background.lightness : 1;
13866
+ let lower = polarity === "darker" ? 0 : Math.max(...backgrounds.map(({ lightness }) => lightness));
13867
+ let upper = polarity === "darker" ? Math.min(...backgrounds.map(({ lightness }) => lightness)) : 1;
13783
13868
  for (let iteration = 0; iteration < 28; iteration += 1) {
13784
13869
  const midpoint = (lower + upper) / 2;
13785
13870
  const ink = candidate(midpoint);
@@ -13800,10 +13885,11 @@ var solvePolarity = (name, background, policy, target, polarity) => {
13800
13885
  distance: Math.abs(background.lightness - solution.color.lightness)
13801
13886
  };
13802
13887
  };
13803
- var selectSolution = (name, step, background, policy, target) => {
13888
+ var selectSolution = (name, step, backgrounds, policy, target) => {
13889
+ const background = backgrounds[0];
13804
13890
  const polarities = policy.polarity === "auto" ? ["darker", "lighter"] : [policy.polarity];
13805
13891
  const preferred = policy.polarity === "auto" && (step === 9 || step === 10) ? background.lightness <= policy.polarityPivot ? "lighter" : "darker" : void 0;
13806
- return polarities.map((polarity) => solvePolarity(name, background, 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];
13892
+ 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
13893
  };
13808
13894
  var fitSolidInkRamp = (input) => {
13809
13895
  const diagnostics = [];
@@ -13904,20 +13990,24 @@ var fitSolidInkRamp = (input) => {
13904
13990
  diagnostics
13905
13991
  };
13906
13992
  };
13907
- var pairAccessibleInks = (input) => {
13908
- const diagnostics = [];
13909
- const inks = {};
13910
- const targets = [
13911
- ["ink", input.policy.ink],
13912
- ["ink-subtle", input.policy.inkSubtle],
13913
- ["ink-muted", input.policy.inkMuted],
13914
- ...Object.entries(input.policy.additional)
13915
- ];
13916
- for (const [name, target] of targets) {
13917
- const solution = selectSolution(name, input.step ?? 1, input.background, input.policy, target);
13918
- const path = `${input.path ?? "/color"}/srgb-proof/${name}`;
13919
- if (solution === void 0) {
13920
- diagnostics.push({
13993
+ var pairAccessibleInk = (input) => {
13994
+ const { name, target, path } = input;
13995
+ let value;
13996
+ if (input.preferred !== void 0) {
13997
+ const measurements = measureInk(input.backgrounds, input.preferred);
13998
+ if (measurements.wcagRatio >= target.minimumWcagRatio) value = {
13999
+ name,
14000
+ color: input.preferred,
14001
+ polarity: input.preferred.lightness < input.backgrounds[0].lightness ? "darker" : "lighter",
14002
+ measurements,
14003
+ targetMet: meetsTarget({ measurements }, target)
14004
+ };
14005
+ }
14006
+ if (value === void 0) {
14007
+ const solution = selectSolution(name, input.step ?? 1, input.backgrounds, input.policy, target);
14008
+ if (solution === void 0) return {
14009
+ ok: false,
14010
+ diagnostics: [{
13921
14011
  severity: "error",
13922
14012
  code: "pairing.minimum-unreachable",
13923
14013
  stage: "pairing",
@@ -13926,21 +14016,46 @@ var pairAccessibleInks = (input) => {
13926
14016
  target,
13927
14017
  polarity: input.policy.polarity
13928
14018
  },
13929
- message: `${name} cannot meet its minimum WCAG ratio against the generated background.`
13930
- });
13931
- continue;
13932
- }
13933
- const { distance: _distance, ...ink } = solution;
13934
- inks[name] = ink;
13935
- if (!ink.targetMet) diagnostics.push({
14019
+ message: `${name} cannot meet its minimum WCAG ratio against every generated background with the configured polarity.`
14020
+ }]
14021
+ };
14022
+ const { distance: _distance, ...paired } = solution;
14023
+ value = paired;
14024
+ }
14025
+ return {
14026
+ ok: true,
14027
+ value,
14028
+ diagnostics: value.targetMet ? [] : [{
13936
14029
  severity: "warning",
13937
14030
  code: "pairing.target-constrained",
13938
14031
  stage: "pairing",
13939
14032
  path,
13940
14033
  requested: target,
13941
- effective: ink.measurements,
14034
+ effective: value.measurements,
13942
14035
  message: `${name} meets its minimum contrast but cannot reach every preferred target.`
14036
+ }]
14037
+ };
14038
+ };
14039
+ var pairAccessibleInks = (input) => {
14040
+ const diagnostics = [];
14041
+ const inks = {};
14042
+ const targets = [
14043
+ ["ink", input.policy.ink],
14044
+ ["ink-subtle", input.policy.inkSubtle],
14045
+ ["ink-muted", input.policy.inkMuted],
14046
+ ...Object.entries(input.policy.additional)
14047
+ ];
14048
+ for (const [name, target] of targets) {
14049
+ const result = pairAccessibleInk({
14050
+ backgrounds: [input.background],
14051
+ policy: input.policy,
14052
+ target,
14053
+ name,
14054
+ path: `${input.path ?? "/color"}/srgb-proof/${name}`,
14055
+ ...input.step === void 0 ? {} : { step: input.step }
13943
14056
  });
14057
+ diagnostics.push(...result.diagnostics);
14058
+ if (result.ok) inks[name] = result.value;
13944
14059
  }
13945
14060
  return diagnostics.some(({ severity }) => severity === "error") ? {
13946
14061
  ok: false,
@@ -14560,13 +14675,13 @@ var calibrateSolidState = (rest, state, solidInk, minimumDeltaE, family, authore
14560
14675
  minimumDeltaE: deltaEOK(rest.color, color)
14561
14676
  };
14562
14677
  };
14563
- var intentOutput = (appearance, profile, families, surfaces, family) => {
14564
- const color = (reference) => semanticColor(families, profile.family, reference, surfaces);
14678
+ var intentOutput = (appearance, profile, families, surfaces, family, path, diagnostics) => {
14679
+ const color = (reference, strength) => semanticColor(families, profile.family, reference, surfaces, strength);
14565
14680
  const textRest = color(profile.text.rest);
14566
14681
  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);
14682
+ const softRest = color(profile.soft.rest, profile.soft.strength?.rest);
14683
+ const softHover = color(profile.soft.hover, profile.soft.strength?.hover);
14684
+ const softPressed = color(profile.soft.pressed, profile.soft.strength?.pressed);
14570
14685
  const softInk = color(profile.soft.foreground);
14571
14686
  const softInkMuted = color(profile.soft.foregroundMuted);
14572
14687
  const solidRest = color(profile.solid.rest);
@@ -14595,6 +14710,42 @@ var intentOutput = (appearance, profile, families, surfaces, family) => {
14595
14710
  focus,
14596
14711
  solidInk
14597
14712
  ].some((value) => value === void 0)) return;
14713
+ const softBackgrounds = Object.values(surfaces.substrates).flatMap((substrate) => substrate.levels.flatMap((surface) => [
14714
+ softRest,
14715
+ softHover,
14716
+ softPressed
14717
+ ].map(({ color }) => compositeSrgb(color, surface.color.mappedColor))));
14718
+ const softInks = {
14719
+ ink: softInk,
14720
+ inkMuted: softInkMuted
14721
+ };
14722
+ for (const [role, field] of [["ink", "foreground"], ["inkMuted", "foregroundMuted"]]) {
14723
+ const foreground = softInks[role];
14724
+ const paired = pairAccessibleInk({
14725
+ backgrounds: softBackgrounds,
14726
+ policy: family.policies.pairing,
14727
+ target: family.policies.pairing[role],
14728
+ preferred: foreground.color,
14729
+ name: "soft-ink",
14730
+ path: `${path}/soft/${field}`
14731
+ });
14732
+ diagnostics.push(...paired.diagnostics);
14733
+ if (!paired.ok) return void 0;
14734
+ if (paired.value.color !== foreground.color) diagnostics.push({
14735
+ severity: "information",
14736
+ code: "semantic.soft-ink-adjusted",
14737
+ stage: "semantic",
14738
+ path: `${path}/soft/${field}`,
14739
+ requested: foreground.color,
14740
+ effective: paired.value.color,
14741
+ message: "Adjusted soft ink to meet minimum contrast on rest, hover and pressed surfaces."
14742
+ });
14743
+ softInks[role] = {
14744
+ ...foreground,
14745
+ color: paired.value.color,
14746
+ composites: paired.value.color === foreground.color ? foreground.composites : []
14747
+ };
14748
+ }
14598
14749
  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
14750
  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
14751
  if (calibratedHover === void 0 || calibratedPressed === void 0) return void 0;
@@ -14607,8 +14758,7 @@ var intentOutput = (appearance, profile, families, surfaces, family) => {
14607
14758
  rest: softRest,
14608
14759
  hover: softHover,
14609
14760
  pressed: softPressed,
14610
- ink: softInk,
14611
- inkMuted: softInkMuted
14761
+ ...softInks
14612
14762
  },
14613
14763
  solid: {
14614
14764
  rest: solidRest,
@@ -14629,7 +14779,7 @@ var intentOutput = (appearance, profile, families, surfaces, family) => {
14629
14779
  };
14630
14780
  };
14631
14781
  var layer = (reference, families, surfaces, calibration = "surfaces") => semanticColor(families, reference.family, reference.color, surfaces, reference.strength, calibration);
14632
- var interactionOutput = (config, families, surfaces) => {
14782
+ var interactionOutput = (config, families, surfaces, familyAppearances, diagnostics) => {
14633
14783
  const hover = layer(config.actions.hover, families, surfaces, "substrates");
14634
14784
  const pressed = layer(config.actions.pressed, families, surfaces, "substrates");
14635
14785
  const treatments = {};
@@ -14646,11 +14796,37 @@ var interactionOutput = (config, families, surfaces) => {
14646
14796
  }, families, surfaces);
14647
14797
  const foreground = semanticColor(families, treatment.family, treatment.foreground, surfaces);
14648
14798
  if (background === void 0 || backgroundHover === void 0 || foreground === void 0) return void 0;
14799
+ const policy = familyAppearances[treatment.family].policies.pairing;
14800
+ const backgrounds = ["workspace", "chrome"].flatMap((substrate) => surfaces.substrates[substrate].levels.flatMap((surface) => [background, backgroundHover].map(({ color }) => compositeSrgb(color, surface.color.mappedColor))));
14801
+ const path = `/semantic/interactions/selection/treatments/${name}/foreground`;
14802
+ const paired = pairAccessibleInk({
14803
+ backgrounds,
14804
+ policy,
14805
+ target: policy.ink,
14806
+ preferred: foreground.color,
14807
+ name: "selection-ink",
14808
+ path
14809
+ });
14810
+ diagnostics.push(...paired.diagnostics);
14811
+ if (!paired.ok) return void 0;
14812
+ if (paired.value.color !== foreground.color) diagnostics.push({
14813
+ severity: "information",
14814
+ code: "semantic.selection-ink-adjusted",
14815
+ stage: "semantic",
14816
+ path,
14817
+ requested: foreground.color,
14818
+ effective: paired.value.color,
14819
+ message: "Adjusted selection ink to meet minimum contrast on selected and selected-hover surfaces."
14820
+ });
14649
14821
  treatments[name] = {
14650
14822
  family: treatment.family,
14651
14823
  background,
14652
14824
  backgroundHover,
14653
- foreground
14825
+ foreground: {
14826
+ ...foreground,
14827
+ color: paired.value.color,
14828
+ composites: paired.value.color === foreground.color ? foreground.composites : []
14829
+ }
14654
14830
  };
14655
14831
  }
14656
14832
  const defaultTreatment = treatments[config.selection.default];
@@ -14738,7 +14914,7 @@ var generateSemanticRoles = (appearance, families, config, surfaces, familyAppea
14738
14914
  for (const [name, profile] of Object.entries(config.roles.intents)) {
14739
14915
  if (profile === void 0) continue;
14740
14916
  const family = familyAppearances[profile.family];
14741
- const output = family === void 0 ? void 0 : intentOutput(appearance, profile, families, surfaces, family);
14917
+ const output = family === void 0 ? void 0 : intentOutput(appearance, profile, families, surfaces, family, `/semantic/intents/${name}`, diagnostics);
14742
14918
  if (output === void 0) diagnostics.push({
14743
14919
  severity: "error",
14744
14920
  code: "semantic.reference-unresolved",
@@ -14751,20 +14927,35 @@ var generateSemanticRoles = (appearance, families, config, surfaces, familyAppea
14751
14927
  output
14752
14928
  };
14753
14929
  }
14754
- const interactions = interactionOutput(config.interactions, families, surfaces);
14755
- if (interactions === void 0) diagnostics.push({
14930
+ const textSelectionConfig = config.roles.textSelection;
14931
+ const selectionBackground = semanticColor(families, textSelectionConfig.background.family, textSelectionConfig.background.color, surfaces, textSelectionConfig.opacity);
14932
+ const selectionForeground = textSelectionConfig.foreground === "inherit" ? "inherit" : semanticColor(families, textSelectionConfig.foreground.family, textSelectionConfig.foreground.color, surfaces);
14933
+ if (selectionBackground === void 0 || selectionForeground === void 0) diagnostics.push({
14934
+ severity: "error",
14935
+ code: "semantic.reference-unresolved",
14936
+ stage: "semantic",
14937
+ path: "/semantic/roles/textSelection",
14938
+ message: "Text selection could not resolve every configured color reference."
14939
+ });
14940
+ const interactionDiagnosticStart = diagnostics.length;
14941
+ const interactions = interactionOutput(config.interactions, families, surfaces, familyAppearances, diagnostics);
14942
+ if (interactions === void 0 && !diagnostics.slice(interactionDiagnosticStart).some(({ severity }) => severity === "error")) diagnostics.push({
14756
14943
  severity: "error",
14757
14944
  code: "semantic.reference-unresolved",
14758
14945
  stage: "semantic",
14759
14946
  path: "/semantic/interactions",
14760
14947
  message: "Semantic interaction layers could not resolve every configured color reference."
14761
14948
  });
14762
- return diagnostics.length > 0 ? {
14949
+ return diagnostics.some(({ severity }) => severity === "error") ? {
14763
14950
  ok: false,
14764
14951
  diagnostics
14765
14952
  } : {
14766
14953
  ok: true,
14767
14954
  value: {
14955
+ textSelection: {
14956
+ background: selectionBackground,
14957
+ foreground: selectionForeground
14958
+ },
14768
14959
  structure,
14769
14960
  intents,
14770
14961
  interactions,
@@ -14890,8 +15081,28 @@ var validateGeneratedColorTheme = (theme) => {
14890
15081
  if (resolved === void 0) continue;
14891
15082
  const intentOutput = generated.semantic.intents[intent];
14892
15083
  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));
15084
+ if (intentOutput === void 0) continue;
15085
+ const policy = resolvedFamily(theme, intentOutput.family, appearance)?.policies.pairing;
15086
+ const soft = intentOutput.output.soft;
15087
+ for (const [role, field] of [["ink", "foreground"], ["inkMuted", "foregroundMuted"]]) if (!(policy !== void 0 && Object.values(generated.surfaces.substrates).every((substrate) => substrate.levels.every((surface) => [
15088
+ soft.rest,
15089
+ soft.hover,
15090
+ soft.pressed
15091
+ ].every((layer) => {
15092
+ const background = compositeSrgb(layer.color, surface.color.mappedColor);
15093
+ return measureContrast(background, compositeSrgb(soft[role].color, background)).wcagRatio + 1e-10 >= policy[role].minimumWcagRatio;
15094
+ }))))) 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
15095
  }
14894
15096
  if (!Number.isFinite(generated.semantic.structure.separatorMutedOpacity)) diagnostics.push(error("validation.semantic-output-missing", `${appearancePath}/semantic/structure`, "Semantic structure is incomplete.", appearance));
15097
+ const textSelection = generated.semantic.textSelection;
15098
+ if (!validOklch(textSelection.background.color) || textSelection.foreground !== "inherit" && !validOklch(textSelection.foreground.color)) diagnostics.push(error("validation.color-domain", `${appearancePath}/semantic/textSelection`, "Text selection contains an invalid color channel.", appearance));
15099
+ for (const [name, treatment] of Object.entries(generated.semantic.interactions.selection.treatments)) {
15100
+ const policy = resolvedFamily(theme, treatment.family, appearance)?.policies.pairing;
15101
+ if (!(policy !== void 0 && Object.values(generated.surfaces.substrates).every((substrate) => substrate.levels.every((surface) => [treatment.background, treatment.backgroundHover].every((layer) => {
15102
+ const background = compositeSrgb(layer.color, surface.color.mappedColor);
15103
+ return measureContrast(background, compositeSrgb(treatment.foreground.color, background)).wcagRatio + 1e-10 >= policy.ink.minimumWcagRatio;
15104
+ }))))) 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));
15105
+ }
14895
15106
  const scrim = generated.semantic.composites.scrim;
14896
15107
  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
15108
  }
@@ -15211,7 +15422,8 @@ var generateRadiusScale = (config) => {
15211
15422
  step,
15212
15423
  value: byStep.get(step)
15213
15424
  }];
15214
- }))
15425
+ })),
15426
+ dismiss: config.dismiss
15215
15427
  };
15216
15428
  };
15217
15429
  //#endregion
@@ -15499,7 +15711,7 @@ var generateTypographyScale = (config) => {
15499
15711
  strategy: "fluid-type-scale",
15500
15712
  version: 1,
15501
15713
  resources: Object.entries(config.resources).filter(([id]) => usedResources.has(id)).sort(([left], [right]) => left.localeCompare(right)).map(([id, resource]) => ({
15502
- id,
15714
+ resourceId: id,
15503
15715
  ...structuredClone(resource)
15504
15716
  })),
15505
15717
  families: Object.fromEntries(Object.entries(config.families).sort(([left], [right]) => left.localeCompare(right)).map(([id, family]) => [id, {
@@ -15513,62 +15725,9 @@ var generateTypographyScale = (config) => {
15513
15725
  };
15514
15726
  };
15515
15727
  //#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
15728
  //#region packages/theme-engine/src/validate-generated-theme.ts
15545
15729
  var validateGeneratedTheme = (theme) => {
15546
15730
  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
15731
  if (theme.edge.widths.length !== EDGE_STEPS.length || theme.edge.widths.some(({ step }, index) => step !== EDGE_STEPS[index])) diagnostics.push({
15573
15732
  severity: "error",
15574
15733
  code: "validation.edge-steps",
@@ -15670,8 +15829,7 @@ var generateTheme = (input) => {
15670
15829
  radius: generateRadiusScale(color.value.resolvedConfig.radius),
15671
15830
  spacing: generateSpacingScale(color.value.resolvedConfig.spacing),
15672
15831
  typography: generateTypographyScale(color.value.resolvedConfig.typography),
15673
- sizing: generateSizingScale(color.value.resolvedConfig.sizing),
15674
- motion: generateMotionScale(color.value.resolvedConfig.motion)
15832
+ sizing: generateSizingScale(color.value.resolvedConfig.sizing)
15675
15833
  };
15676
15834
  const validationDiagnostics = validateGeneratedTheme(value);
15677
15835
  if (validationDiagnostics.length > 0) return {
@@ -15721,16 +15879,7 @@ var compileMaterializedTheme = (request) => {
15721
15879
  };
15722
15880
  };
15723
15881
  var LOCAL_THEME_COMPILER_PROVIDER = { compile: async (request) => compileMaterializedTheme(request) };
15724
- //#endregion
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)]);
15882
+ var ThemeOutputSchema = Type.Object({ path: Type.String({ minLength: 1 }) }, { additionalProperties: false });
15734
15883
  var ThemeManifestSchema = Type.Object({
15735
15884
  $schema: Type.Literal("https://trellis.build/schemas/theme-manifest-v1.json"),
15736
15885
  formatVersion: Type.Literal(1),
@@ -15783,7 +15932,7 @@ var dimensionTokenValue = (group, path) => {
15783
15932
  var scopedRoot = (lightSelector, darkSelector) => {
15784
15933
  return `:where(${[...lightSelector.split(","), ...darkSelector.split(",")].map((selector) => selector.trim()).filter((selector, index, values) => selector.length > 0 && values.indexOf(selector) === index).join(", ")})`;
15785
15934
  };
15786
- var gridSelector = (scope, requested) => `${scope} :where([data-ui-grid][data-columns="${requested}"], [data-ui-box][data-layout="grid"][data-columns="${requested}"])`;
15935
+ var gridSelector = (scope, requested) => `${scope} :where([data-ui-grid][data-columns="${requested}"], [data-ui-box][data-ui-layout-mode="grid"][data-columns="${requested}"])`;
15787
15936
  var rule$1 = (selector, declarations) => `${selector} {\n${declarations.map((declaration) => ` ${declaration}`).join("\n")}\n}`;
15788
15937
  var indent = (css) => css.split("\n").map((line) => line ? ` ${line}` : "").join("\n");
15789
15938
  var appStructureCss = (scope, breakpoint) => {
@@ -15826,7 +15975,7 @@ var appStructureCss = (scope, breakpoint) => {
15826
15975
  "width: var(--ui-sidebar-width, var(--spacing-sidebar-width));",
15827
15976
  "height: 100vh;",
15828
15977
  "border-radius: 0;",
15829
- "translate: 0;",
15978
+ "translate: none;",
15830
15979
  "--ui-active-elevation-shadow-layers: var(--ui-sidebar-resting-elevation);"
15831
15980
  ]),
15832
15981
  rule$1(`${app} ${initialSidebar}[data-placement="side"][data-desktop-state="expanded"][data-sticky="false" i]`, ["position: relative;", "height: auto;"]),
@@ -15839,7 +15988,7 @@ var appStructureCss = (scope, breakpoint) => {
15839
15988
  "max-width: none;",
15840
15989
  "height: var(--ui-sidebar-height, auto);",
15841
15990
  "border-radius: 0;",
15842
- "translate: 0;",
15991
+ "translate: none;",
15843
15992
  "flex-direction: row;",
15844
15993
  "overflow: visible;",
15845
15994
  "--ui-active-elevation-shadow-layers: var(--ui-sidebar-resting-elevation);"
@@ -15917,6 +16066,8 @@ var serializeCompositionCss = (document, lightSelector, darkSelector) => {
15917
16066
  return [
15918
16067
  ...base,
15919
16068
  ...responsive,
16069
+ 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));"]),
16070
+ rule$1(`${scope} [data-ui-table]:is([data-border="row"], [data-border="grid"])`, ["--ui-table-row-border: var(--border-width-edge-separator);"]),
15920
16071
  appStructureCss(scope, dimensionTokenValue(tokens, [
15921
16072
  "composition",
15922
16073
  "shell",
@@ -16094,7 +16245,12 @@ var cssVariable = (value) => value.replaceAll(".", "\\.");
16094
16245
  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
16246
  var colorCss = (color) => {
16096
16247
  const [lightness, chroma, hue] = color.components;
16097
- return `oklch(${number(lightness * 100)}% ${number(chroma)} ${hue === "none" ? "none" : number(hue)} / ${number(color.alpha ?? 1)})`;
16248
+ return cssColor({
16249
+ lightness,
16250
+ chroma,
16251
+ hue: hue === "none" ? null : hue,
16252
+ alpha: color.alpha ?? 1
16253
+ });
16098
16254
  };
16099
16255
  var dimensionCss = (dimension) => {
16100
16256
  return `${number(dimension.value)}${dimension.unit}`;
@@ -16140,6 +16296,7 @@ var cssValue = (token, index) => {
16140
16296
  const extension = trellisTokenExtension(token);
16141
16297
  if (extension?.fluid !== void 0) return fluidScalarCss(extension.fluid);
16142
16298
  switch (token.$type) {
16299
+ case "cubicBezier": return `cubic-bezier(${token.$value.join(", ")})`;
16143
16300
  case "color": return colorCss(token.$value);
16144
16301
  case "dimension": return dimensionCss(token.$value);
16145
16302
  case "duration": return dimensionCss(token.$value);
@@ -16185,7 +16342,11 @@ var appearanceRegistry = (document, scope) => {
16185
16342
  for (let level = 0; level <= 8; level += 1) variables.push(`--shadow-elevation-${level}`);
16186
16343
  variables.push("--color-interaction-disabled-ink");
16187
16344
  }
16188
- return registry([...new Set(variables)]);
16345
+ const unique = [...new Set(variables)];
16346
+ const colors = unique.filter((name) => name.startsWith("--color-"));
16347
+ const shadows = unique.filter((name) => name.startsWith("--shadow-"));
16348
+ const shadowRegistry = shadows.length === 0 ? "" : `@theme reference {\n${shadows.map((name) => ` ${name}: var(${name});`).join("\n")}\n}`;
16349
+ return [registry(colors), shadowRegistry].filter(Boolean).join("\n\n");
16189
16350
  };
16190
16351
  var invariantTokenDeclarations = (document) => tokenDeclarations(document, "invariant", ["invariant"]);
16191
16352
  var invariantRegistry = (document) => {
@@ -16198,29 +16359,39 @@ var invariantRegistry = (document) => {
16198
16359
  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
16360
  };
16200
16361
  var fontFaceWeight = ({ minimum, maximum }) => minimum === maximum ? `${minimum}` : `${minimum} ${maximum}`;
16201
- var typographyResourceCss = (document) => {
16362
+ var typographyResourceCss = (document, fontBaseUrl = "../fonts") => {
16202
16363
  const resources = (invariantTokenSource(document).$extensions?.["dev.trellis"])?.fontResources ?? [];
16203
- return [...resources.flatMap((resource) => resource.type === "bunny" ? [`@import url("${resource.url}");`] : []), ...resources.flatMap((resource) => resource.type === "local" ? resource.faces.map((face) => [
16204
- "@font-face {",
16205
- ` font-family: "${face.family.replaceAll("\"", "\\\"")}";`,
16206
- ` src: url("${face.src.replaceAll("\"", "\\\"")}") format("${face.format}");`,
16207
- ` font-weight: ${fontFaceWeight(face.weight)};`,
16208
- ` font-style: ${face.style};`,
16209
- " font-display: swap;",
16210
- "}"
16211
- ].join("\n")) : [])];
16364
+ return [
16365
+ ...resources.flatMap((resource) => resource.type === "fontsource" ? [`@import "${fontBaseUrl}/${resource.id}/${resource.version}/font.css";`] : []),
16366
+ ...resources.flatMap((resource) => resource.type === "bunny" ? [`@import url("${resource.url}");`] : []),
16367
+ ...resources.flatMap((resource) => resource.type === "local" ? localFontFaceCss(resource.faces) : [])
16368
+ ];
16212
16369
  };
16370
+ var localFontFaceCss = (faces) => faces.map((face) => [
16371
+ "@font-face {",
16372
+ ` font-family: ${JSON.stringify(face.family)};`,
16373
+ ` src: url(${JSON.stringify(face.src)}) format("${face.format}");`,
16374
+ ` font-weight: ${fontFaceWeight(face.weight)};`,
16375
+ ` font-style: ${face.style};`,
16376
+ " font-display: swap;",
16377
+ ...face.unicodeRange === void 0 ? [] : [` unicode-range: ${face.unicodeRange};`],
16378
+ "}"
16379
+ ].join("\n"));
16213
16380
  //#endregion
16214
16381
  //#region packages/theme-engine/src/serialize/css.ts
16215
16382
  var cssArtifact = (css) => ({
16216
16383
  css,
16217
16384
  fingerprint: fingerprintValue(css)
16218
16385
  });
16219
- var serializeTypographyResourcesCss = (document) => cssArtifact(`${typographyResourceCss(document).join("\n\n")}\n`);
16386
+ var serializeTypographyResourcesCss = (document, fontBaseUrl = "../fonts") => cssArtifact(`${typographyResourceCss(document, fontBaseUrl).join("\n\n")}\n`);
16220
16387
  var selectorBlock = (selector, declarations) => `${selector} {\n${declarations.map((line) => ` ${line}`).join("\n")}\n}`;
16221
16388
  var combinedSelector = (...selectors) => [...new Set(selectors.flatMap((selector) => selector.split(",")).map((selector) => selector.trim()))].join(", ");
16222
16389
  var artifactFromBlocks = (blocks) => cssArtifact(`${blocks.join("\n\n")}\n`);
16223
- var appearanceBlocks = (document, options, artifacts, additions = []) => [selectorBlock(options.lightSelector, [...tokenDeclarations(document, "light", artifacts), ...additions]), selectorBlock(options.darkSelector, [...tokenDeclarations(document, "dark", artifacts), ...additions])];
16390
+ var appearanceBlocks = (document, options, artifacts, additions = []) => [
16391
+ selectorBlock(options.lightSelector, [...tokenDeclarations(document, "light", artifacts), ...additions]),
16392
+ selectorBlock(options.darkSelector, [...tokenDeclarations(document, "dark", artifacts), ...additions]),
16393
+ ...options.systemSelector ? [`@media (prefers-color-scheme: dark) {\n${selectorBlock(options.systemSelector, [...tokenDeclarations(document, "dark", artifacts), ...additions])}\n}`] : []
16394
+ ];
16224
16395
  var elevationAliases = () => Array.from({ length: 9 }, (_, level) => `--shadow-elevation-${level}: var(--ui-local-elevation-${level});`);
16225
16396
  var runtimeCompositions = (document, options) => [
16226
16397
  serializeSurfaceCompositionCss(),
@@ -16239,7 +16410,7 @@ var serializeRuntimeArtifact = (document, options) => artifactFromBlocks([
16239
16410
  ...runtimeCompositions(document, options)
16240
16411
  ]);
16241
16412
  var serializeThemeArtifacts = (document, options) => ({
16242
- resources: serializeTypographyResourcesCss(document),
16413
+ resources: serializeTypographyResourcesCss(document, options.fontBaseUrl),
16243
16414
  palette: serializePaletteArtifact(document, options),
16244
16415
  runtime: serializeRuntimeArtifact(document, options)
16245
16416
  });
@@ -16250,7 +16421,7 @@ var serializeSurfaceArtifact = (document, options) => artifactFromBlocks([
16250
16421
  ]);
16251
16422
  var serializeThemeCss = (document, options) => {
16252
16423
  const scope = options.scope ?? "all";
16253
- if (scope === "resources") return serializeTypographyResourcesCss(document);
16424
+ if (scope === "resources") return serializeTypographyResourcesCss(document, options.fontBaseUrl);
16254
16425
  if (scope === "palette") return serializePaletteArtifact(document, options);
16255
16426
  if (scope === "runtime") return serializeRuntimeArtifact(document, options);
16256
16427
  if (scope === "surfaces") return serializeSurfaceArtifact(document, options);
@@ -16266,13 +16437,6 @@ var serializeThemeCss = (document, options) => {
16266
16437
  //#region packages/theme-engine/src/presets/trellis-default.ts
16267
16438
  var TRELLIS_DEFAULT_THEME_CONFIG = {
16268
16439
  schemaVersion: 1,
16269
- motion: {
16270
- strategy: "semantic-motion",
16271
- version: 1,
16272
- tempo: .5,
16273
- elasticity: 0,
16274
- displacement: .5
16275
- },
16276
16440
  color: {
16277
16441
  appearances: {
16278
16442
  light: {
@@ -16382,7 +16546,8 @@ var TRELLIS_DEFAULT_THEME_CONFIG = {
16382
16546
  control: 3,
16383
16547
  surface: 4,
16384
16548
  overlay: 5
16385
- }
16549
+ },
16550
+ dismiss: "full"
16386
16551
  },
16387
16552
  spacing: {
16388
16553
  strategy: "progressive-fluid-scale",
@@ -16428,6 +16593,7 @@ var TRELLIS_DEFAULT_THEME_CONFIG = {
16428
16593
  sizing: BASELINE_SIZING,
16429
16594
  semantic: {
16430
16595
  roles: {
16596
+ textSelection: BASELINE_SEMANTIC.roles.textSelection,
16431
16597
  strategy: "functional-role-graph",
16432
16598
  version: 1,
16433
16599
  structure: { separator: {
@@ -16452,20 +16618,6 @@ var TRELLIS_DEFAULT_THEME_CONFIG = {
16452
16618
  step: 12
16453
16619
  }
16454
16620
  },
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
16621
  solid: {
16470
16622
  rest: {
16471
16623
  kind: "step",
@@ -16574,6 +16726,138 @@ var TRELLIS_DEFAULT_THEME_CONFIG = {
16574
16726
  }
16575
16727
  };
16576
16728
  //#endregion
16729
+ //#region packages/theme-engine/src/font-assets.ts
16730
+ var hash = (bytes) => createHash("sha256").update(bytes).digest("hex");
16731
+ var encode = (value) => new TextEncoder().encode(JSON.stringify(value, null, 2) + "\n");
16732
+ /** Network IO belongs to dependency preparation, never to the compiler. */
16733
+ var acquireFont = async ({ id, version }) => {
16734
+ let packageName = `@fontsource-variable/${id}`;
16735
+ const request = async (file) => fetch(`https://cdn.jsdelivr.net/npm/${packageName}@${version}/${file}`, {
16736
+ signal: AbortSignal.timeout(3e4),
16737
+ redirect: "error"
16738
+ });
16739
+ let metadataResponse = await request("metadata.json");
16740
+ if (metadataResponse.status === 404) {
16741
+ packageName = `@fontsource/${id}`;
16742
+ metadataResponse = await request("metadata.json");
16743
+ }
16744
+ if (!metadataResponse.ok) throw new Error(`Fontsource ${id}@${version}: metadata request failed (${metadataResponse.status}).`);
16745
+ const metadata = await metadataResponse.json();
16746
+ 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}.`);
16747
+ const files = /* @__PURE__ */ new Map();
16748
+ const sources = [];
16749
+ const get = async (file) => {
16750
+ const response = await request(file);
16751
+ if (!response.ok) throw new Error(`Fontsource ${id}@${version}: ${file} request failed (${response.status}).`);
16752
+ return new Uint8Array(await response.arrayBuffer());
16753
+ };
16754
+ const stylesheets = [];
16755
+ if (packageName.startsWith("@fontsource-variable/")) {
16756
+ for (const filename of [
16757
+ "full.css",
16758
+ "standard.css",
16759
+ "index.css"
16760
+ ]) {
16761
+ const response = await request(filename);
16762
+ if (response.status === 404) continue;
16763
+ if (!response.ok) throw new Error(`Fontsource stylesheet request failed (${response.status}).`);
16764
+ stylesheets.push(await response.text());
16765
+ break;
16766
+ }
16767
+ if (!stylesheets.length) throw new Error(`No variable stylesheet for ${id}@${version}.`);
16768
+ if ("styles" in metadata && Array.isArray(metadata.styles) && metadata.styles.includes("italic")) for (const filename of [
16769
+ "full-italic.css",
16770
+ "standard-italic.css",
16771
+ "wght-italic.css"
16772
+ ]) {
16773
+ const response = await request(filename);
16774
+ if (response.status === 404) continue;
16775
+ if (!response.ok) throw new Error(`Fontsource italic request failed (${response.status}).`);
16776
+ stylesheets.push(await response.text());
16777
+ break;
16778
+ }
16779
+ } else for (const weight of metadata.weights) stylesheets.push(new TextDecoder().decode(await get(`${weight}.css`)));
16780
+ const faces = [];
16781
+ for (const css of stylesheets) for (const match of css.matchAll(/@font-face\s*\{([^}]+)\}/g)) {
16782
+ const declarations = new Map(match[1].split(";").filter((entry) => entry.trim()).map((entry) => {
16783
+ const colon = entry.indexOf(":");
16784
+ return [entry.slice(0, colon).trim(), entry.slice(colon + 1).trim()];
16785
+ }));
16786
+ const weights = declarations.get("font-weight")?.match(/^(\d+)(?:\s+(\d+))?$/);
16787
+ const source = declarations.get("src")?.match(/^url\(\.?\/?files\/([a-z0-9-]+\.woff2)\)\s+format\(['"]woff2(?:-variations)?['"]\)(?:\s*,|$)/);
16788
+ if (!weights || !source) throw new Error(`Unsupported Fontsource font-face for ${id}.`);
16789
+ faces.push({
16790
+ family: metadata.family,
16791
+ style: declarations.get("font-style"),
16792
+ format: "woff2",
16793
+ weight: {
16794
+ minimum: Number(weights[1]),
16795
+ maximum: Number(weights[2] ?? weights[1])
16796
+ },
16797
+ src: `./${source[1]}`,
16798
+ ...declarations.has("unicode-range") ? { unicodeRange: declarations.get("unicode-range") } : {}
16799
+ });
16800
+ }
16801
+ const resource = {
16802
+ type: "local",
16803
+ faces
16804
+ };
16805
+ if (!faces.length || !Check(FontResourceSchema, resource)) throw new Error(`Invalid Fontsource font faces for ${id}.`);
16806
+ for (const file of /* @__PURE__ */ new Set(["LICENSE", ...faces.map(({ src }) => `files/${src.slice(2)}`)])) {
16807
+ const bytes = await get(file);
16808
+ if (file !== "LICENSE" && new TextDecoder().decode(bytes.slice(0, 4)) !== "wOF2") throw new Error(`Invalid WOFF2 font: ${file}`);
16809
+ const name = file.replace(/^files\//, "");
16810
+ files.set(name, bytes);
16811
+ sources.push({
16812
+ file: name,
16813
+ url: `https://cdn.jsdelivr.net/npm/${packageName}@${version}/${file}`,
16814
+ sha256: hash(bytes)
16815
+ });
16816
+ }
16817
+ files.set("resource.json", encode(resource));
16818
+ files.set("download.json", encode({
16819
+ package: packageName,
16820
+ version,
16821
+ files: sources
16822
+ }));
16823
+ files.set("font.css", new TextEncoder().encode(localFontFaceCss(faces).join("\n\n") + "\n"));
16824
+ return {
16825
+ resource,
16826
+ files
16827
+ };
16828
+ };
16829
+ var readFontAssets = async (directory, font) => {
16830
+ const provenance = JSON.parse(await readFile(join(directory, "download.json"), "utf8"));
16831
+ 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.");
16832
+ const resource = JSON.parse(await readFile(join(directory, "resource.json"), "utf8"));
16833
+ if (!Check(FontResourceSchema, resource) || resource.type !== "local") throw new Error("Invalid local font metadata.");
16834
+ const local = resource;
16835
+ const files = /* @__PURE__ */ new Map();
16836
+ for (const record of provenance.files) {
16837
+ if (!/^(?:LICENSE|[a-z0-9-]+\.woff2)$/.test(record.file)) throw new Error("Invalid font asset filename.");
16838
+ const bytes = await readFile(join(directory, record.file));
16839
+ if (hash(bytes) !== record.sha256) throw new Error(`Font asset hash mismatch: ${record.file}`);
16840
+ files.set(record.file, bytes);
16841
+ }
16842
+ 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.");
16843
+ files.set("resource.json", await readFile(join(directory, "resource.json")));
16844
+ files.set("download.json", await readFile(join(directory, "download.json")));
16845
+ files.set("font.css", new TextEncoder().encode(localFontFaceCss(local.faces).join("\n\n") + "\n"));
16846
+ return {
16847
+ resource: local,
16848
+ files
16849
+ };
16850
+ };
16851
+ var prepareFont = async (font, directory, acquire) => {
16852
+ for (const source of [fileURLToPath(new URL(`../fonts/${font.id}/${font.version}`, import.meta.url)), directory]) try {
16853
+ return await readFontAssets(source, font);
16854
+ } catch (error) {
16855
+ if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) throw error;
16856
+ }
16857
+ if (acquire) return acquire(font);
16858
+ throw new Error(`Missing local font assets for ${font.id}@${font.version}. Run trellis theme build.`);
16859
+ };
16860
+ //#endregion
16577
16861
  //#region packages/theme-engine/src/theme-workspace.ts
16578
16862
  var ThemeWorkspaceError = class extends Error {
16579
16863
  code;
@@ -16713,7 +16997,6 @@ var canonicalJsonValue = (value) => {
16713
16997
  if (value === null || typeof value !== "object") return value;
16714
16998
  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
16999
  };
16716
- var serializeDtcg = (tokens) => `${JSON.stringify(canonicalJsonValue(tokens), null, 2)}\n`;
16717
17000
  var CANONICAL_FINGERPRINT = /^[0-9a-f]{16}$/;
16718
17001
  var validateProviderFingerprints = (fingerprints, tokens) => {
16719
17002
  for (const name of ["theme", "tokens"]) {
@@ -16723,18 +17006,7 @@ var validateProviderFingerprints = (fingerprints, tokens) => {
16723
17006
  const tokenFingerprint = fingerprintValue(tokens);
16724
17007
  if (tokenFingerprint !== fingerprints.tokens) throw new ThemeWorkspaceError("workspace.token-fingerprint", `Provider token fingerprint ${fingerprints.tokens} does not match ${tokenFingerprint}.`);
16725
17008
  };
16726
- var OUTPUT_ADAPTERS = {
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) => {
17009
+ var createBuildPlanForWorkspace = async (workspace, options = {}, commits = workspace.commits, acquire) => {
16738
17010
  const materialized = materializeTheme(workspace.base, commits);
16739
17011
  if (!materialized.ok) throw new ThemeWorkspaceError("workspace.materialization", materialized.diagnostics.map((diagnostic) => {
16740
17012
  const requested = diagnostic.requested;
@@ -16751,15 +17023,64 @@ var createBuildPlanForWorkspace = async (workspace, options = {}, commits = work
16751
17023
  const tokenDiagnostics = validateDesignTokenDocument(compiled.value.tokens);
16752
17024
  if (tokenDiagnostics.length > 0) throw new ThemeWorkspaceError("workspace.tokens", `Provider returned an invalid design-token document:\n${tokenDiagnostics.map(diagnosticMessage).join("\n")}`);
16753
17025
  validateProviderFingerprints(compiled.value.fingerprints, compiled.value.tokens);
17026
+ const assets = [];
17027
+ if (workspace.outputs.length > 0) {
17028
+ const resolved = resolveThemeConfig(materialized.value);
17029
+ if (!resolved.ok) throw new ThemeWorkspaceError("workspace.fonts", resolved.diagnostics.map(diagnosticMessage).join("\n"));
17030
+ const resources = structuredClone(resolved.value.typography.resources);
17031
+ const declarations = invariantTokenSource(compiled.value.tokens).$extensions?.["dev.trellis"]?.fontResources ?? [];
17032
+ const preparedFonts = /* @__PURE__ */ new Map();
17033
+ const canonicalRoot = await realpath(workspace.root);
17034
+ const protectedPaths = new Set(await Promise.all([
17035
+ workspace.manifestPath,
17036
+ workspace.basePath,
17037
+ workspace.commitsPath,
17038
+ ...workspace.outputs.map(({ absolutePath }) => absolutePath)
17039
+ ].map(async (path) => portableCollisionKey(await canonicalProspectivePath(path)))));
17040
+ for (const font of declarations) {
17041
+ if (font.type !== "fontsource") continue;
17042
+ const directory = join(workspace.root, "fonts", font.id, font.version);
17043
+ await resolveSafePath(workspace.root, canonicalRoot, relative(workspace.root, join(directory, "font.css")), "output");
17044
+ const key = `${font.id}/${font.version}`;
17045
+ const prepared = preparedFonts.get(key) ?? await prepareFont(font, directory, acquire);
17046
+ preparedFonts.set(key, prepared);
17047
+ resources[font.resourceId] = prepared.resource;
17048
+ for (const [file, content] of prepared.files) {
17049
+ const target = await resolveSafePath(workspace.root, canonicalRoot, relative(workspace.root, join(directory, file)), "output");
17050
+ if (protectedPaths.has(target.collisionKey)) throw new ThemeWorkspaceError("workspace.path-collision", `Font asset collides with a workspace file: ${target.absolutePath}`);
17051
+ if (!assets.some(({ path }) => path === target.absolutePath)) assets.push({
17052
+ path: target.absolutePath,
17053
+ content
17054
+ });
17055
+ }
17056
+ }
17057
+ const available = resolveThemeConfig({
17058
+ ...materialized.value,
17059
+ typography: {
17060
+ ...resolved.value.typography,
17061
+ resources
17062
+ }
17063
+ });
17064
+ if (!available.ok) throw new ThemeWorkspaceError("workspace.fonts", available.diagnostics.map(diagnosticMessage).join("\n"));
17065
+ }
16754
17066
  return {
16755
17067
  workspace,
17068
+ assets,
16756
17069
  tokens: compiled.value.tokens,
16757
17070
  diagnostics: compiled.value.diagnostics,
16758
17071
  fingerprints: compiled.value.fingerprints,
16759
17072
  outputs: workspace.outputs.map((output) => ({
16760
- format: output.format,
16761
17073
  path: output.absolutePath,
16762
- content: OUTPUT_ADAPTERS[output.format](compiled.value.tokens, compiled.value.fingerprints)
17074
+ content: [
17075
+ "/* Generated by Trellis Theme Authoring. */",
17076
+ `/* Theme ${compiled.value.fingerprints.theme}; tokens ${compiled.value.fingerprints.tokens}. */`,
17077
+ serializeThemeCss(compiled.value.tokens, {
17078
+ fontBaseUrl: relative(dirname(output.absolutePath), join(workspace.root, "fonts")).split(sep).join("/") || ".",
17079
+ lightSelector: ":root, .light",
17080
+ darkSelector: ".dark",
17081
+ systemSelector: ":root[data-theme=\"system\"]"
17082
+ }).css
17083
+ ].join("\n")
16763
17084
  }))
16764
17085
  };
16765
17086
  };
@@ -16793,8 +17114,9 @@ var promoteFiles = async (staged) => {
16793
17114
  }
16794
17115
  };
16795
17116
  var buildThemeWorkspace = async (manifestPath, options = {}) => {
16796
- const plan = await createThemeBuildPlan(manifestPath, options);
16797
- await promoteFiles(await stageFiles(plan.outputs));
17117
+ const workspace = await loadThemeWorkspace(manifestPath);
17118
+ const plan = await createBuildPlanForWorkspace(workspace, options, workspace.commits, acquireFont);
17119
+ await promoteFiles(await stageFiles([...plan.assets, ...plan.outputs]));
16798
17120
  return {
16799
17121
  outputs: plan.outputs.map(({ path }) => path),
16800
17122
  diagnostics: plan.diagnostics,
@@ -16804,10 +17126,14 @@ var buildThemeWorkspace = async (manifestPath, options = {}) => {
16804
17126
  var checkThemeWorkspace = async (manifestPath, options = {}) => {
16805
17127
  const plan = await createThemeBuildPlan(manifestPath, options);
16806
17128
  const stale = [];
16807
- for (const output of plan.outputs) if (await readFile(output.path, "utf8").catch((error) => {
16808
- if (error instanceof Error && "code" in error && error.code === "ENOENT") return void 0;
16809
- throw error;
16810
- }) !== output.content) stale.push(output.path);
17129
+ for (const output of [...plan.assets, ...plan.outputs]) {
17130
+ const current = await readFile(output.path).catch((error) => {
17131
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return void 0;
17132
+ throw error;
17133
+ });
17134
+ const expected = Buffer.from(output.content);
17135
+ if (current === void 0 || !current.equals(expected)) stale.push(output.path);
17136
+ }
16811
17137
  if (stale.length > 0) throw new ThemeWorkspaceError("workspace.stale-output", `Generated theme output is missing or stale:\n${stale.join("\n")}`);
16812
17138
  return {
16813
17139
  outputs: plan.outputs.map(({ path }) => path),
@@ -16834,7 +17160,8 @@ var initializeThemeWorkspace = async (authoredDirectory) => {
16834
17160
  const sourcePaths = [
16835
17161
  manifestPath,
16836
17162
  basePath,
16837
- commitsPath
17163
+ commitsPath,
17164
+ join(root, "fonts")
16838
17165
  ];
16839
17166
  const existing = (await Promise.all(sourcePaths.map(async (path) => ({
16840
17167
  path,
@@ -16847,10 +17174,7 @@ var initializeThemeWorkspace = async (authoredDirectory) => {
16847
17174
  engineVersion: THEME_ENGINE_VERSION,
16848
17175
  base: "./base.json",
16849
17176
  commits: "./commits.jsonl",
16850
- outputs: [{
16851
- format: "tailwind",
16852
- path: "./generated/theme.css"
16853
- }]
17177
+ outputs: [{ path: "./generated/theme.css" }]
16854
17178
  };
16855
17179
  await mkdir(outputDirectory, { recursive: true });
16856
17180
  await writeFile(manifestPath, `${JSON.stringify(canonicalJsonValue(manifest), null, 2)}\n`, { flag: "wx" });
@@ -16866,13 +17190,17 @@ var initializeThemeWorkspace = async (authoredDirectory) => {
16866
17190
  var applyThemeCommit = async (manifestPath, commitPath, options = {}) => {
16867
17191
  const workspace = await loadThemeWorkspace(manifestPath);
16868
17192
  const candidate = parseThemePatchCommit(parseJson(await readFile(resolve(commitPath), "utf8"), resolve(commitPath)), resolve(commitPath));
16869
- const plan = await createBuildPlanForWorkspace(workspace, { ...options }, [...workspace.commits, candidate]);
17193
+ const plan = await createBuildPlanForWorkspace(workspace, { ...options }, [...workspace.commits, candidate], acquireFont);
16870
17194
  const separator = workspace.commitLogSource.length > 0 && !workspace.commitLogSource.endsWith("\n") ? "\n" : "";
16871
17195
  const commitLogContent = `${workspace.commitLogSource}${separator}${serializeThemePatchCommit(candidate)}`;
16872
- const staged = await stageFiles([...plan.outputs, {
16873
- path: workspace.commitsPath,
16874
- content: commitLogContent
16875
- }]);
17196
+ const staged = await stageFiles([
17197
+ ...plan.assets,
17198
+ ...plan.outputs,
17199
+ {
17200
+ path: workspace.commitsPath,
17201
+ content: commitLogContent
17202
+ }
17203
+ ]);
16876
17204
  const commitLogStage = staged.at(-1);
16877
17205
  const outputStages = staged.slice(0, -1);
16878
17206
  const assertCommitLogUnchanged = async () => {