@metamorph-labs/polymorph 1.0.18 → 1.0.19

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 (319) hide show
  1. package/CHANGELOG.md +242 -0
  2. package/dist/design/systems/desktop.json +1 -1
  3. package/dist/design/systems/dew.json +1 -1
  4. package/dist/design/systems/flint.json +1 -1
  5. package/dist/design/systems/glassmorphic.json +1 -1
  6. package/dist/design/systems/harbor.json +1 -1
  7. package/dist/design/systems/journal.json +1 -1
  8. package/dist/design/systems/pastel.json +1 -1
  9. package/dist/design/systems/pebble.json +1 -1
  10. package/dist/design/systems/plain.json +1 -1
  11. package/dist/design/systems/pop.json +1 -1
  12. package/dist/design/systems/press.json +1 -1
  13. package/dist/packages/angular-ui/src/ai/ArtifactPane.ts +15 -4
  14. package/dist/packages/angular-ui/src/ai/PromptInput.ts +3 -1
  15. package/dist/packages/angular-ui/src/archetypes/Dashboard.ts +38 -20
  16. package/dist/packages/angular-ui/src/archetypes/dashboard.states.ts +52 -0
  17. package/dist/packages/angular-ui/src/controls/ColorInput.ts +62 -34
  18. package/dist/packages/angular-ui/src/controls/Combobox.ts +28 -7
  19. package/dist/packages/angular-ui/src/controls/DatePicker.ts +12 -11
  20. package/dist/packages/angular-ui/src/controls/DateRangePicker.ts +22 -17
  21. package/dist/packages/angular-ui/src/controls/DateRangePickerRangeCalendar.ts +3 -2
  22. package/dist/packages/angular-ui/src/controls/FileUpload.ts +18 -12
  23. package/dist/packages/angular-ui/src/controls/FileUploadRow.ts +24 -4
  24. package/dist/packages/angular-ui/src/controls/MultiSelect.ts +49 -12
  25. package/dist/packages/angular-ui/src/controls/NumberInput.ts +27 -3
  26. package/dist/packages/angular-ui/src/controls/PhoneInput.ts +9 -5
  27. package/dist/packages/angular-ui/src/controls/Select.ts +36 -7
  28. package/dist/packages/angular-ui/src/controls/TagInput.ts +61 -7
  29. package/dist/packages/angular-ui/src/controls/TimeInput.ts +15 -1
  30. package/dist/packages/angular-ui/src/controls/select.states.ts +79 -58
  31. package/dist/packages/angular-ui/src/overlays/Command.ts +50 -13
  32. package/dist/packages/angular-ui/src/overlays/CommandPanel.ts +11 -7
  33. package/dist/packages/angular-ui/src/overlays/ToastViewport.ts +1 -1
  34. package/dist/packages/angular-ui/src/structure/CodeBlock.ts +18 -4
  35. package/dist/packages/angular-ui/src/structure/Stat.ts +295 -84
  36. package/dist/packages/angular-ui/src/structure/stat.states.ts +116 -0
  37. package/dist/packages/cli/src/agents.js +4 -3
  38. package/dist/packages/cli/src/apply.js +43 -18
  39. package/dist/packages/cli/src/check.js +4 -0
  40. package/dist/packages/cli/src/cli.js +6 -2
  41. package/dist/packages/cli/src/elements.js +12 -2
  42. package/dist/packages/cli/src/emit.js +43 -8
  43. package/dist/packages/cli/src/readings.js +29 -3
  44. package/dist/packages/cli/src/skills/bridge.js +1197 -0
  45. package/dist/packages/cli/src/skills/facts.js +190 -0
  46. package/dist/packages/cli/src/skills/native.js +1580 -0
  47. package/dist/packages/cli/src/skills/rules.js +199 -0
  48. package/dist/packages/cli/src/skills/runtime.js +1020 -0
  49. package/dist/packages/cli/src/skills/screen-charts.js +334 -0
  50. package/dist/packages/cli/src/skills/screen-chat.js +247 -0
  51. package/dist/packages/cli/src/skills/screen-code.js +565 -0
  52. package/dist/packages/cli/src/skills/screen-rich-text.js +305 -0
  53. package/dist/packages/cli/src/skills/screen.js +378 -0
  54. package/dist/packages/cli/src/skills/setup-packages.js +307 -0
  55. package/dist/packages/cli/src/skills/setup.js +125 -0
  56. package/dist/packages/cli/src/skills/theme-documents.js +351 -0
  57. package/dist/packages/cli/src/skills/theme.js +208 -0
  58. package/dist/packages/cli/src/skills.js +13 -794
  59. package/dist/packages/cli/src/theme.js +42 -1
  60. package/dist/packages/cli/src/tool-verbs.js +19 -4
  61. package/dist/packages/cli/src/verbs.js +28 -2
  62. package/dist/packages/elements-ui/dist/cdn/chunks/{AppShellUserCard-0eCCnnN_.js → AppShellUserCard-XT4br4fr.js} +1 -1
  63. package/dist/packages/elements-ui/dist/cdn/chunks/{AreaChart-DftfzLG0.js → AreaChart-CXNFfbJ8.js} +1 -1
  64. package/dist/packages/elements-ui/dist/cdn/chunks/ArtifactPane-Pr9_K2uM.js +1 -0
  65. package/dist/packages/elements-ui/dist/cdn/chunks/{Avatar-DcdMgxgY.js → Avatar-3WXoBPLv.js} +1 -1
  66. package/dist/packages/elements-ui/dist/cdn/chunks/{Avatar-DcuvZwe7.js → Avatar-BKqjM8qW.js} +1 -1
  67. package/dist/packages/elements-ui/dist/cdn/chunks/{AvatarButton-D5XKVduu.js → AvatarButton-BasMQCSM.js} +1 -1
  68. package/dist/packages/elements-ui/dist/cdn/chunks/{AvatarGroup-DgFwJUNO.js → AvatarGroup-COch2-O0.js} +1 -1
  69. package/dist/packages/elements-ui/dist/cdn/chunks/{BarChart-myuR0aHc.js → BarChart-ugae8zfr.js} +1 -1
  70. package/dist/packages/elements-ui/dist/cdn/chunks/{ChatMessage-CgQ1h_JP.js → ChatMessage-Bx4yrF2x.js} +1 -1
  71. package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-B_e5ma3K.js +1 -0
  72. package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-Fgtr48Vb.js +1 -0
  73. package/dist/packages/elements-ui/dist/cdn/chunks/ColorInput-CD7rsWRp.js +1 -0
  74. package/dist/packages/elements-ui/dist/cdn/chunks/Combobox-CUw7z6TS.js +1 -0
  75. package/dist/packages/elements-ui/dist/cdn/chunks/{Combobox-DB2FT7so.js → Combobox-hWIFU9X_.js} +1 -1
  76. package/dist/packages/elements-ui/dist/cdn/chunks/Command-BXgqRd3I.js +1 -0
  77. package/dist/packages/elements-ui/dist/cdn/chunks/{ConfirmDialog-BtQOAHY2.js → ConfirmDialog-CAaBRKxl.js} +1 -1
  78. package/dist/packages/elements-ui/dist/cdn/chunks/{Dashboard-ChMPH4_Q.js → Dashboard-DwNw5Wnd.js} +1 -1
  79. package/dist/packages/elements-ui/dist/cdn/chunks/DatePicker-DjqtswQR.js +1 -0
  80. package/dist/packages/elements-ui/dist/cdn/chunks/DateRangePicker-LsXFHOzm.js +1 -0
  81. package/dist/packages/elements-ui/dist/cdn/chunks/{DonutChart-BEK89BeL.js → DonutChart-DYXx6eTe.js} +1 -1
  82. package/dist/packages/elements-ui/dist/cdn/chunks/FileUpload-3gbZTSSx.js +1 -0
  83. package/dist/packages/elements-ui/dist/cdn/chunks/{FormField-PlLLDKqc.js → FormField-Bvw4cLBc.js} +1 -1
  84. package/dist/packages/elements-ui/dist/cdn/chunks/{FormField-C6L3vYp4.js → FormField-DzhcinED.js} +1 -1
  85. package/dist/packages/elements-ui/dist/cdn/chunks/{FunnelChart-DVQz_gad.js → FunnelChart-D24XhrGw.js} +1 -1
  86. package/dist/packages/elements-ui/dist/cdn/chunks/{Heading-fAcu6Vrw.js → Heading-Cvfyu8pc.js} +1 -1
  87. package/dist/packages/elements-ui/dist/cdn/chunks/{Heading-CgzEi9OQ.js → Heading-XDJzlwt9.js} +1 -1
  88. package/dist/packages/elements-ui/dist/cdn/chunks/{Heatmap-BRwR-n-V.js → Heatmap-BQoUS6gY.js} +1 -1
  89. package/dist/packages/elements-ui/dist/cdn/chunks/{Hero-CV2YWeb4.js → Hero-CXuuFceS.js} +1 -1
  90. package/dist/packages/elements-ui/dist/cdn/chunks/{Histogram-CCYwlinB.js → Histogram-DW_ZPHpR.js} +1 -1
  91. package/dist/packages/elements-ui/dist/cdn/chunks/{LineChart-BH6Pq1P1.js → LineChart-kf-zlNWe.js} +1 -1
  92. package/dist/packages/elements-ui/dist/cdn/chunks/{Markdown-DmZEch4i.js → Markdown-C3rjhIbt.js} +1 -1
  93. package/dist/packages/elements-ui/dist/cdn/chunks/ModeSwitch-DQ86CK9h.js +1 -0
  94. package/dist/packages/elements-ui/dist/cdn/chunks/MultiSelect-DbSx9QtV.js +1 -0
  95. package/dist/packages/elements-ui/dist/cdn/chunks/NumberInput-B4ZZOGLl.js +7 -0
  96. package/dist/packages/elements-ui/dist/cdn/chunks/PhoneInput-BsMfbNi6.js +210 -0
  97. package/dist/packages/elements-ui/dist/cdn/chunks/PromptInput-l_-zAXSZ.js +1 -0
  98. package/dist/packages/elements-ui/dist/cdn/chunks/{RadarChart-Coje7Sb0.js → RadarChart-CwJAWRki.js} +1 -1
  99. package/dist/packages/elements-ui/dist/cdn/chunks/{RichTextContent-CufjptHF.js → RichTextContent-D51UfuWk.js} +1 -1
  100. package/dist/packages/elements-ui/dist/cdn/chunks/{RichTextInput-Dz7yBFUA.js → RichTextInput-B32fN_p9.js} +3 -3
  101. package/dist/packages/elements-ui/dist/cdn/chunks/{ScatterChart-Do5tQTC5.js → ScatterChart-Mps7l5-i.js} +1 -1
  102. package/dist/packages/elements-ui/dist/cdn/chunks/Select-CpsRP0NR.js +1 -0
  103. package/dist/packages/elements-ui/dist/cdn/chunks/Stat-CXR6bP7X.js +1 -0
  104. package/dist/packages/elements-ui/dist/cdn/chunks/Stat-DGcx2ZZq.js +1 -0
  105. package/dist/packages/elements-ui/dist/cdn/chunks/TagInput-BhkLU4gE.js +1 -0
  106. package/dist/packages/elements-ui/dist/cdn/chunks/TimeInput-r2jNTOLN.js +1 -0
  107. package/dist/packages/elements-ui/dist/cdn/chunks/{Toast-CAYGbn7g.js → Toast-BTfcZn0I.js} +1 -1
  108. package/dist/packages/elements-ui/dist/cdn/chunks/{ToastViewport-CFslglYc.js → ToastViewport-BBQMRCQT.js} +1 -1
  109. package/dist/packages/elements-ui/dist/cdn/chunks/{ToolCall-DUCoKsoE.js → ToolCall-DNU5kk9_.js} +1 -1
  110. package/dist/packages/elements-ui/dist/cdn/chunks/{Treemap-Bh3ruYGJ.js → Treemap-BV8TlZHB.js} +1 -1
  111. package/dist/packages/elements-ui/dist/cdn/chunks/agent-DfOqpL9c.js +1 -0
  112. package/dist/packages/elements-ui/dist/cdn/chunks/api-DJBiUXxK.js +4 -0
  113. package/dist/packages/elements-ui/dist/cdn/chunks/avatar.module-D4YdFevY.js +1 -0
  114. package/dist/packages/elements-ui/dist/cdn/chunks/cap-DA71oFHt.js +1 -0
  115. package/dist/packages/elements-ui/dist/cdn/chunks/{cartesian-I5uPfyqv.js → cartesian-CEn2lJCc.js} +1 -1
  116. package/dist/packages/elements-ui/dist/cdn/chunks/{chart-annotations.module-xUExw4pu.js → chart-annotations.module-hA_KO_Pe.js} +1 -1
  117. package/dist/packages/elements-ui/dist/cdn/chunks/chart-brush.module-C_8txUW5.js +1 -0
  118. package/dist/packages/elements-ui/dist/cdn/chunks/chart-twin.module-BpfyTQ9R.js +1 -0
  119. package/dist/packages/elements-ui/dist/cdn/chunks/check-CHvc4yHL.js +1 -0
  120. package/dist/packages/elements-ui/dist/cdn/chunks/css-vars-DeZ4TCna.js +1 -0
  121. package/dist/packages/elements-ui/dist/cdn/chunks/draw-BiQ3Of6N.js +1 -0
  122. package/dist/packages/elements-ui/dist/cdn/chunks/drawing-nhJNBahV.js +1 -0
  123. package/dist/packages/elements-ui/dist/cdn/chunks/field-labels-Df5HuYC5.js +1 -0
  124. package/dist/packages/elements-ui/dist/cdn/chunks/frame-CtTY4oCn.js +1 -0
  125. package/dist/packages/elements-ui/dist/cdn/chunks/on-call-YKLF3-FH.js +1 -0
  126. package/dist/packages/elements-ui/dist/cdn/chunks/runtime-QRQ3CjZg.js +1 -0
  127. package/dist/packages/elements-ui/dist/cdn/chunks/series-uUg6_JtL.js +1 -0
  128. package/dist/packages/elements-ui/dist/cdn/chunks/src-XnWjGSDr.js +67 -0
  129. package/dist/packages/elements-ui/dist/cdn/chunks/toast-pwGvxH2T.js +1 -0
  130. package/dist/packages/elements-ui/dist/cdn/chunks/urls-Qks0KJ_p.js +6 -0
  131. package/dist/packages/elements-ui/dist/cdn/chunks/webmcp-Dro53ATH.js +1 -0
  132. package/dist/packages/elements-ui/dist/cdn/polymorph-all.js +52 -50
  133. package/dist/packages/elements-ui/dist/cdn/polymorph.css +1 -1
  134. package/dist/packages/elements-ui/dist/cdn/polymorph.js +1 -1
  135. package/dist/packages/elements-ui/dist/cdn/prepaint.js +1 -1
  136. package/dist/packages/elements-ui/dist/cdn/themes/desktop.css +5 -4
  137. package/dist/packages/elements-ui/dist/cdn/themes/dew.css +5 -4
  138. package/dist/packages/elements-ui/dist/cdn/themes/flint.css +5 -4
  139. package/dist/packages/elements-ui/dist/cdn/themes/glassmorphic.css +5 -4
  140. package/dist/packages/elements-ui/dist/cdn/themes/harbor.css +5 -4
  141. package/dist/packages/elements-ui/dist/cdn/themes/journal.css +5 -4
  142. package/dist/packages/elements-ui/dist/cdn/themes/pastel.css +5 -4
  143. package/dist/packages/elements-ui/dist/cdn/themes/pebble.css +5 -4
  144. package/dist/packages/elements-ui/dist/cdn/themes/plain.css +5 -4
  145. package/dist/packages/elements-ui/dist/cdn/themes/pop.css +5 -4
  146. package/dist/packages/elements-ui/dist/cdn/themes/press.css +5 -4
  147. package/dist/packages/elements-ui/dist/cdn/themes/terminal.css +5 -4
  148. package/dist/packages/elements-ui/src/ai/ArtifactPane.ts +2 -0
  149. package/dist/packages/elements-ui/src/archetypes/dashboard.states.ts +9 -0
  150. package/dist/packages/elements-ui/src/controls/ColorInput.ts +2 -0
  151. package/dist/packages/elements-ui/src/controls/NumberInput.ts +2 -0
  152. package/dist/packages/elements-ui/src/controls/TagInput.ts +4 -0
  153. package/dist/packages/elements-ui/src/controls/TimeInput.ts +2 -0
  154. package/dist/packages/elements-ui/src/controls/select.states.ts +10 -0
  155. package/dist/packages/elements-ui/src/overlays/Command.ts +2 -0
  156. package/dist/packages/elements-ui/src/structure/CodeBlock.ts +5 -2
  157. package/dist/packages/elements-ui/src/structure/Stat.ts +6 -0
  158. package/dist/packages/elements-ui/src/structure/stat.states.ts +33 -0
  159. package/dist/packages/mcp/src/propose.js +92 -15
  160. package/dist/packages/mcp/src/server.js +19 -8
  161. package/dist/packages/mcp/src/tools.js +80 -5
  162. package/dist/packages/mcp/src/write.js +95 -13
  163. package/dist/packages/react-ui/src/ai/ArtifactPane.tsx +5 -2
  164. package/dist/packages/react-ui/src/ai/PromptInput.tsx +5 -2
  165. package/dist/packages/react-ui/src/archetypes/dashboard.states.tsx +28 -0
  166. package/dist/packages/react-ui/src/controls/ColorInput.tsx +69 -13
  167. package/dist/packages/react-ui/src/controls/Combobox.tsx +13 -5
  168. package/dist/packages/react-ui/src/controls/DatePicker.tsx +3 -0
  169. package/dist/packages/react-ui/src/controls/DateRangePicker.tsx +22 -5
  170. package/dist/packages/react-ui/src/controls/FileUpload.tsx +2 -0
  171. package/dist/packages/react-ui/src/controls/MultiSelect.tsx +30 -6
  172. package/dist/packages/react-ui/src/controls/NumberInput.tsx +19 -1
  173. package/dist/packages/react-ui/src/controls/PhoneInput.tsx +3 -3
  174. package/dist/packages/react-ui/src/controls/Select.tsx +59 -23
  175. package/dist/packages/react-ui/src/controls/TagInput.tsx +43 -10
  176. package/dist/packages/react-ui/src/controls/TimeInput.tsx +10 -0
  177. package/dist/packages/react-ui/src/controls/date-segments.tsx +16 -0
  178. package/dist/packages/react-ui/src/controls/select.states.tsx +13 -0
  179. package/dist/packages/react-ui/src/overlays/Command.tsx +23 -2
  180. package/dist/packages/react-ui/src/overlays/Toaster.tsx +2 -2
  181. package/dist/packages/react-ui/src/structure/CodeBlock.tsx +7 -3
  182. package/dist/packages/react-ui/src/structure/Stat.tsx +90 -13
  183. package/dist/packages/react-ui/src/structure/stat.states.tsx +68 -0
  184. package/dist/packages/recipes/src/ai/artifact-pane.module.css +4 -4
  185. package/dist/packages/recipes/src/controls/rich-text-input.module.css +1 -1
  186. package/dist/packages/recipes/src/structure/avatar.module.css +3 -1
  187. package/dist/packages/recipes/src/structure/heading.module.css +5 -4
  188. package/dist/packages/recipes/src/structure/hero.module.css +3 -1
  189. package/dist/packages/recipes/src/structure/stat.module.css +7 -0
  190. package/dist/packages/registry/src/card.js +4 -3
  191. package/dist/packages/registry/src/frameworks.js +28 -1
  192. package/dist/packages/registry/src/runtime-card.js +300 -0
  193. package/dist/packages/registry/src/runtime-members.js +176 -0
  194. package/dist/packages/registry/src/screen-table.js +166 -0
  195. package/dist/packages/rules/package.js +1 -1
  196. package/dist/packages/solid-ui/src/ai/ArtifactPane.tsx +11 -3
  197. package/dist/packages/solid-ui/src/ai/PromptInput.tsx +3 -1
  198. package/dist/packages/solid-ui/src/archetypes/Dashboard.tsx +3 -0
  199. package/dist/packages/solid-ui/src/archetypes/dashboard.states.tsx +39 -0
  200. package/dist/packages/solid-ui/src/controls/ColorInput.tsx +38 -17
  201. package/dist/packages/solid-ui/src/controls/Combobox.tsx +27 -6
  202. package/dist/packages/solid-ui/src/controls/DatePicker.tsx +12 -11
  203. package/dist/packages/solid-ui/src/controls/DateRangePicker.tsx +21 -16
  204. package/dist/packages/solid-ui/src/controls/DateRangePickerRangeCalendar.tsx +3 -4
  205. package/dist/packages/solid-ui/src/controls/FileUpload.tsx +1 -0
  206. package/dist/packages/solid-ui/src/controls/FileUploadRow.tsx +6 -0
  207. package/dist/packages/solid-ui/src/controls/MultiSelect.tsx +51 -11
  208. package/dist/packages/solid-ui/src/controls/NumberInput.tsx +21 -2
  209. package/dist/packages/solid-ui/src/controls/PhoneInput.tsx +8 -4
  210. package/dist/packages/solid-ui/src/controls/Select.tsx +37 -6
  211. package/dist/packages/solid-ui/src/controls/TagInput.tsx +26 -5
  212. package/dist/packages/solid-ui/src/controls/TimeInput.tsx +10 -1
  213. package/dist/packages/solid-ui/src/controls/select.states.tsx +18 -0
  214. package/dist/packages/solid-ui/src/overlays/Command.tsx +15 -2
  215. package/dist/packages/solid-ui/src/overlays/CommandPanel.tsx +7 -7
  216. package/dist/packages/solid-ui/src/overlays/ToastViewport.tsx +1 -1
  217. package/dist/packages/solid-ui/src/structure/CodeBlock.tsx +9 -5
  218. package/dist/packages/solid-ui/src/structure/Stat.tsx +86 -25
  219. package/dist/packages/solid-ui/src/structure/stat.states.tsx +73 -0
  220. package/dist/packages/svelte-ui/src/ai/ArtifactPane.svelte +8 -2
  221. package/dist/packages/svelte-ui/src/ai/PromptInput.svelte +3 -1
  222. package/dist/packages/svelte-ui/src/archetypes/Dashboard.svelte +3 -0
  223. package/dist/packages/svelte-ui/src/archetypes/dashboard.states.svelte +2 -0
  224. package/dist/packages/svelte-ui/src/controls/ColorInput.svelte +29 -8
  225. package/dist/packages/svelte-ui/src/controls/Combobox.svelte +26 -5
  226. package/dist/packages/svelte-ui/src/controls/DatePicker.svelte +7 -5
  227. package/dist/packages/svelte-ui/src/controls/DateRangePicker.svelte +15 -9
  228. package/dist/packages/svelte-ui/src/controls/DateRangePickerRangeCalendar.svelte +3 -2
  229. package/dist/packages/svelte-ui/src/controls/FileUpload.svelte +1 -0
  230. package/dist/packages/svelte-ui/src/controls/FileUploadRow.svelte +8 -1
  231. package/dist/packages/svelte-ui/src/controls/MultiSelect.svelte +36 -10
  232. package/dist/packages/svelte-ui/src/controls/NumberInput.svelte +14 -1
  233. package/dist/packages/svelte-ui/src/controls/PhoneInput.svelte +3 -3
  234. package/dist/packages/svelte-ui/src/controls/Select.svelte +20 -6
  235. package/dist/packages/svelte-ui/src/controls/TagInput.svelte +21 -3
  236. package/dist/packages/svelte-ui/src/controls/TimeInput.svelte +11 -1
  237. package/dist/packages/svelte-ui/src/controls/select.states.svelte +26 -24
  238. package/dist/packages/svelte-ui/src/overlays/Command.svelte +13 -1
  239. package/dist/packages/svelte-ui/src/overlays/CommandPanel.svelte +11 -6
  240. package/dist/packages/svelte-ui/src/overlays/ToastViewport.svelte +1 -1
  241. package/dist/packages/svelte-ui/src/structure/CodeBlock.svelte +7 -2
  242. package/dist/packages/svelte-ui/src/structure/Stat.svelte +70 -17
  243. package/dist/packages/svelte-ui/src/structure/stat.states.svelte +27 -0
  244. package/dist/packages/theme/src/admit.js +6 -3
  245. package/dist/packages/theme/src/color/resolve.js +19 -2
  246. package/dist/packages/theme/src/derive.js +13 -6
  247. package/dist/packages/theme/src/emit.js +1 -1
  248. package/dist/packages/theme/src/runtime.js +58 -0
  249. package/dist/packages/theme/src/seeds.js +30 -4
  250. package/dist/packages/theme/src/systems.js +1 -1
  251. package/dist/packages/theme/src/tokens.js +15 -6
  252. package/dist/packages/vue-ui/src/ai/ArtifactPane.vue +11 -2
  253. package/dist/packages/vue-ui/src/ai/PromptInput.vue +3 -1
  254. package/dist/packages/vue-ui/src/archetypes/Dashboard.vue +3 -0
  255. package/dist/packages/vue-ui/src/archetypes/dashboard.states.ts +49 -0
  256. package/dist/packages/vue-ui/src/controls/ColorInput.vue +33 -12
  257. package/dist/packages/vue-ui/src/controls/Combobox.vue +26 -5
  258. package/dist/packages/vue-ui/src/controls/DatePicker.vue +12 -11
  259. package/dist/packages/vue-ui/src/controls/DateRangePicker.vue +20 -15
  260. package/dist/packages/vue-ui/src/controls/DateRangePickerRangeCalendar.vue +3 -4
  261. package/dist/packages/vue-ui/src/controls/FileUpload.vue +1 -0
  262. package/dist/packages/vue-ui/src/controls/FileUploadRow.vue +6 -0
  263. package/dist/packages/vue-ui/src/controls/MultiSelect.vue +37 -10
  264. package/dist/packages/vue-ui/src/controls/NumberInput.vue +17 -1
  265. package/dist/packages/vue-ui/src/controls/PhoneInput.vue +7 -3
  266. package/dist/packages/vue-ui/src/controls/Select.vue +22 -7
  267. package/dist/packages/vue-ui/src/controls/TagInput.vue +21 -3
  268. package/dist/packages/vue-ui/src/controls/TimeInput.vue +10 -1
  269. package/dist/packages/vue-ui/src/controls/select.states.ts +17 -0
  270. package/dist/packages/vue-ui/src/overlays/Command.vue +13 -1
  271. package/dist/packages/vue-ui/src/overlays/CommandPanel.vue +7 -7
  272. package/dist/packages/vue-ui/src/overlays/ToastViewport.vue +1 -1
  273. package/dist/packages/vue-ui/src/structure/CodeBlock.vue +7 -2
  274. package/dist/packages/vue-ui/src/structure/Stat.vue +71 -18
  275. package/dist/packages/vue-ui/src/structure/stat.states.ts +67 -0
  276. package/dist/platforms/android/ui/src/generated/kotlin/dev/polymorph/ui/Contracts.kt +144 -33
  277. package/dist/platforms/android/ui/src/generated/kotlin/dev/polymorph/ui/Members.kt +17 -7
  278. package/dist/platforms/ios/Sources/PolymorphUI/Generated/Contracts.swift +204 -31
  279. package/dist/registry/registry.json +371 -75
  280. package/dist/screen/assets/{screen-CuQbskb8.css → screen-B22PTPwF.css} +1 -1
  281. package/dist/screen/assets/screen-Cpbh7XMb.js +372 -0
  282. package/dist/screen/screen.html +3 -3
  283. package/package.json +1 -1
  284. package/dist/packages/elements-ui/dist/cdn/chunks/ArtifactPane-DsmRlr6d.js +0 -1
  285. package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-BqP8HZKM.js +0 -1
  286. package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-D8VARz0a.js +0 -1
  287. package/dist/packages/elements-ui/dist/cdn/chunks/ColorInput-BrzZOVeL.js +0 -1
  288. package/dist/packages/elements-ui/dist/cdn/chunks/Combobox-BiUq0h-w.js +0 -1
  289. package/dist/packages/elements-ui/dist/cdn/chunks/Command-hmxVRdFg.js +0 -1
  290. package/dist/packages/elements-ui/dist/cdn/chunks/DatePicker-C8prGbJ2.js +0 -1
  291. package/dist/packages/elements-ui/dist/cdn/chunks/DateRangePicker-CO1ioqwN.js +0 -1
  292. package/dist/packages/elements-ui/dist/cdn/chunks/FileUpload-HPQe-ttb.js +0 -1
  293. package/dist/packages/elements-ui/dist/cdn/chunks/ModeSwitch-CerqbGv3.js +0 -1
  294. package/dist/packages/elements-ui/dist/cdn/chunks/MultiSelect-CQq7jPgI.js +0 -1
  295. package/dist/packages/elements-ui/dist/cdn/chunks/NumberInput-Dre9GwBy.js +0 -7
  296. package/dist/packages/elements-ui/dist/cdn/chunks/PhoneInput-D6_J6Es_.js +0 -210
  297. package/dist/packages/elements-ui/dist/cdn/chunks/PromptInput-BXcsUQ5W.js +0 -1
  298. package/dist/packages/elements-ui/dist/cdn/chunks/Select-DxGQgv2q.js +0 -1
  299. package/dist/packages/elements-ui/dist/cdn/chunks/Stat-FsMUWigK.js +0 -1
  300. package/dist/packages/elements-ui/dist/cdn/chunks/Stat-WS8v6BQv.js +0 -1
  301. package/dist/packages/elements-ui/dist/cdn/chunks/TagInput-D-uIQEGS.js +0 -1
  302. package/dist/packages/elements-ui/dist/cdn/chunks/TimeInput-Dho571vA.js +0 -1
  303. package/dist/packages/elements-ui/dist/cdn/chunks/agent-DBDk4wLH.js +0 -1
  304. package/dist/packages/elements-ui/dist/cdn/chunks/api-B9sGZiYn.js +0 -4
  305. package/dist/packages/elements-ui/dist/cdn/chunks/avatar.module-CQwnWhWo.js +0 -1
  306. package/dist/packages/elements-ui/dist/cdn/chunks/cap-Ct4k7zNC.js +0 -1
  307. package/dist/packages/elements-ui/dist/cdn/chunks/chart-brush.module-DycBfben.js +0 -1
  308. package/dist/packages/elements-ui/dist/cdn/chunks/chart-twin.module-Cks7VwS5.js +0 -1
  309. package/dist/packages/elements-ui/dist/cdn/chunks/check-dOfCSYFA.js +0 -1
  310. package/dist/packages/elements-ui/dist/cdn/chunks/draw-DclRgiWM.js +0 -1
  311. package/dist/packages/elements-ui/dist/cdn/chunks/drawing-DjkZr0z8.js +0 -1
  312. package/dist/packages/elements-ui/dist/cdn/chunks/frame-BSvl4y47.js +0 -1
  313. package/dist/packages/elements-ui/dist/cdn/chunks/on-call-Jk1sYJc_.js +0 -1
  314. package/dist/packages/elements-ui/dist/cdn/chunks/receivers-BpRfF6dV.js +0 -4
  315. package/dist/packages/elements-ui/dist/cdn/chunks/series-C_1TNd2n.js +0 -1
  316. package/dist/packages/elements-ui/dist/cdn/chunks/src-Bub3C9YP.js +0 -67
  317. package/dist/packages/elements-ui/dist/cdn/chunks/toast-AarMGYJn.js +0 -1
  318. package/dist/packages/elements-ui/dist/cdn/chunks/webmcp-eEPzSqph.js +0 -1
  319. package/dist/screen/assets/screen-Clj2u6_s.js +0 -372
@@ -6,6 +6,7 @@
6
6
  --pm-font-body: "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
7
7
  --pm-font-display: var(--pm-font-body);
8
8
  --pm-font-mono: "Geist Mono Variable", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
9
+ --pm-font-heading: var(--pm-font-body);
9
10
  --pm-text-xs-size: 0.78125rem;
10
11
  --pm-text-xs-line-height: 1.5;
11
12
  --pm-text-xs-weight: 400;
@@ -24,22 +25,22 @@
24
25
  --pm-text-lg-size: 1.25rem;
25
26
  --pm-text-lg-line-height: 1.45;
26
27
  --pm-text-lg-weight: 400;
27
- --pm-text-lg-family: var(--pm-font-body);
28
+ --pm-text-lg-family: var(--pm-font-heading);
28
29
  --pm-text-lg-tracking: 0em;
29
30
  --pm-text-xl-size: 1.5625rem;
30
31
  --pm-text-xl-line-height: 1.35;
31
32
  --pm-text-xl-weight: 500;
32
- --pm-text-xl-family: var(--pm-font-body);
33
+ --pm-text-xl-family: var(--pm-font-heading);
33
34
  --pm-text-xl-tracking: 0em;
34
35
  --pm-text-2xl-size: 1.96875rem;
35
36
  --pm-text-2xl-line-height: 1.25;
36
37
  --pm-text-2xl-weight: 600;
37
- --pm-text-2xl-family: var(--pm-font-body);
38
+ --pm-text-2xl-family: var(--pm-font-heading);
38
39
  --pm-text-2xl-tracking: -0.02em;
39
40
  --pm-text-3xl-size: 2.4375rem;
40
41
  --pm-text-3xl-line-height: 1.2;
41
42
  --pm-text-3xl-weight: 600;
42
- --pm-text-3xl-family: var(--pm-font-body);
43
+ --pm-text-3xl-family: var(--pm-font-heading);
43
44
  --pm-text-3xl-tracking: -0.02em;
44
45
  --pm-text-entry-size: 1rem;
45
46
  --pm-text-entry-line-height: 1.5;
@@ -6,6 +6,7 @@
6
6
  --pm-font-body: "Outfit Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
7
7
  --pm-font-display: "Bricolage Grotesque Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
8
8
  --pm-font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
9
+ --pm-font-heading: var(--pm-font-body);
9
10
  --pm-text-xs-size: 0.75rem;
10
11
  --pm-text-xs-line-height: 1.5;
11
12
  --pm-text-xs-weight: 400;
@@ -24,22 +25,22 @@
24
25
  --pm-text-lg-size: 1.3125rem;
25
26
  --pm-text-lg-line-height: 1.45;
26
27
  --pm-text-lg-weight: 400;
27
- --pm-text-lg-family: var(--pm-font-body);
28
+ --pm-text-lg-family: var(--pm-font-heading);
28
29
  --pm-text-lg-tracking: 0em;
29
30
  --pm-text-xl-size: 1.6875rem;
30
31
  --pm-text-xl-line-height: 1.35;
31
32
  --pm-text-xl-weight: 500;
32
- --pm-text-xl-family: var(--pm-font-body);
33
+ --pm-text-xl-family: var(--pm-font-heading);
33
34
  --pm-text-xl-tracking: 0em;
34
35
  --pm-text-2xl-size: 2.1875rem;
35
36
  --pm-text-2xl-line-height: 1.25;
36
37
  --pm-text-2xl-weight: 600;
37
- --pm-text-2xl-family: var(--pm-font-body);
38
+ --pm-text-2xl-family: var(--pm-font-heading);
38
39
  --pm-text-2xl-tracking: -0.02em;
39
40
  --pm-text-3xl-size: 2.84375rem;
40
41
  --pm-text-3xl-line-height: 1.2;
41
42
  --pm-text-3xl-weight: 600;
42
- --pm-text-3xl-family: var(--pm-font-body);
43
+ --pm-text-3xl-family: var(--pm-font-heading);
43
44
  --pm-text-3xl-tracking: -0.02em;
44
45
  --pm-text-entry-size: 1rem;
45
46
  --pm-text-entry-line-height: 1.5;
@@ -6,6 +6,7 @@
6
6
  --pm-font-body: "Source Serif 4 Variable", ui-serif, Georgia, Cambria, "Times New Roman", serif;
7
7
  --pm-font-display: "Fraunces Variable", ui-serif, Georgia, Cambria, "Times New Roman", serif;
8
8
  --pm-font-mono: "Fira Code Variable", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
9
+ --pm-font-heading: var(--pm-font-body);
9
10
  --pm-text-xs-size: 0.78125rem;
10
11
  --pm-text-xs-line-height: 1.5;
11
12
  --pm-text-xs-weight: 400;
@@ -24,22 +25,22 @@
24
25
  --pm-text-lg-size: 1.25rem;
25
26
  --pm-text-lg-line-height: 1.45;
26
27
  --pm-text-lg-weight: 400;
27
- --pm-text-lg-family: var(--pm-font-body);
28
+ --pm-text-lg-family: var(--pm-font-heading);
28
29
  --pm-text-lg-tracking: 0.005em;
29
30
  --pm-text-xl-size: 1.5625rem;
30
31
  --pm-text-xl-line-height: 1.35;
31
32
  --pm-text-xl-weight: 500;
32
- --pm-text-xl-family: var(--pm-font-body);
33
+ --pm-text-xl-family: var(--pm-font-heading);
33
34
  --pm-text-xl-tracking: 0.005em;
34
35
  --pm-text-2xl-size: 1.96875rem;
35
36
  --pm-text-2xl-line-height: 1.25;
36
37
  --pm-text-2xl-weight: 700;
37
- --pm-text-2xl-family: var(--pm-font-body);
38
+ --pm-text-2xl-family: var(--pm-font-heading);
38
39
  --pm-text-2xl-tracking: -0.015em;
39
40
  --pm-text-3xl-size: 2.4375rem;
40
41
  --pm-text-3xl-line-height: 1.2;
41
42
  --pm-text-3xl-weight: 700;
42
- --pm-text-3xl-family: var(--pm-font-body);
43
+ --pm-text-3xl-family: var(--pm-font-heading);
43
44
  --pm-text-3xl-tracking: -0.015em;
44
45
  --pm-text-entry-size: 1rem;
45
46
  --pm-text-entry-line-height: 1.5;
@@ -6,6 +6,7 @@
6
6
  --pm-font-body: "Space Grotesk Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
7
7
  --pm-font-display: var(--pm-font-body);
8
8
  --pm-font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
9
+ --pm-font-heading: var(--pm-font-body);
9
10
  --pm-text-xs-size: 0.8125rem;
10
11
  --pm-text-xs-line-height: 1.5;
11
12
  --pm-text-xs-weight: 400;
@@ -24,22 +25,22 @@
24
25
  --pm-text-lg-size: 1.1875rem;
25
26
  --pm-text-lg-line-height: 1.45;
26
27
  --pm-text-lg-weight: 400;
27
- --pm-text-lg-family: var(--pm-font-body);
28
+ --pm-text-lg-family: var(--pm-font-heading);
28
29
  --pm-text-lg-tracking: -0.01em;
29
30
  --pm-text-xl-size: 1.4375rem;
30
31
  --pm-text-xl-line-height: 1.35;
31
32
  --pm-text-xl-weight: 500;
32
- --pm-text-xl-family: var(--pm-font-body);
33
+ --pm-text-xl-family: var(--pm-font-heading);
33
34
  --pm-text-xl-tracking: -0.01em;
34
35
  --pm-text-2xl-size: 1.71875rem;
35
36
  --pm-text-2xl-line-height: 1.25;
36
37
  --pm-text-2xl-weight: 500;
37
- --pm-text-2xl-family: var(--pm-font-body);
38
+ --pm-text-2xl-family: var(--pm-font-heading);
38
39
  --pm-text-2xl-tracking: -0.01em;
39
40
  --pm-text-3xl-size: 2.0625rem;
40
41
  --pm-text-3xl-line-height: 1.2;
41
42
  --pm-text-3xl-weight: 500;
42
- --pm-text-3xl-family: var(--pm-font-body);
43
+ --pm-text-3xl-family: var(--pm-font-heading);
43
44
  --pm-text-3xl-tracking: -0.02em;
44
45
  --pm-text-entry-size: 1rem;
45
46
  --pm-text-entry-line-height: 1.5;
@@ -17,6 +17,7 @@ export const definition: ElementDefinition = {
17
17
  kind: 'string',
18
18
  meta: 'string',
19
19
  streaming: 'boolean',
20
+ streamingLabel: 'string',
20
21
  title: 'string',
21
22
  view: 'string',
22
23
  views: 'json',
@@ -38,6 +39,7 @@ export type PolyArtifactPaneElement = MemberElement<
38
39
  | 'kind'
39
40
  | 'meta'
40
41
  | 'streaming'
42
+ | 'streamingLabel'
41
43
  | 'title'
42
44
  | 'view'
43
45
  | 'views'
@@ -166,5 +166,14 @@ export const states: ComponentStates = {
166
166
  listen(e0, 'poly-commit', () => {})
167
167
  },
168
168
  },
169
+ {
170
+ name: 'the numbers loading — each card keeps its label and its height',
171
+ html: `<poly-dashboard title="Overview" stats='[{"label":"Open tickets","value":"128","delta":{"value":"8%","direction":"down","positive":true},"spark":[141,138,144,136,132,135,129,131,126,128],"loading":true},{"label":"First response","value":"14m","icon":"time","loading":true},{"label":"Satisfaction","value":"91%","delta":{"value":"3pts","direction":"down"},"loading":true}]'>
172
+ <poly-dashboard-panel slot="primary" title="Ticket volume">
173
+ <poly-line-chart data='[]' loading series='[{"key":"opened","label":"Opened"},{"key":"resolved","label":"Resolved"}]' x='{"key":"day","scale":"time","label":"Day"}' label="Tickets opened and resolved by day"></poly-line-chart>
174
+ </poly-dashboard-panel>
175
+ </poly-dashboard>`,
176
+ subject: 'poly-dashboard',
177
+ },
169
178
  ],
170
179
  }
@@ -22,6 +22,7 @@ export const definition: ElementDefinition = {
22
22
  disabled: 'boolean',
23
23
  id: 'string',
24
24
  invalid: 'boolean',
25
+ messages: 'json',
25
26
  name: 'string',
26
27
  pickerLabel: 'string',
27
28
  size: 'string',
@@ -45,6 +46,7 @@ export type PolyColorInputElement = MemberElement<
45
46
  | 'disabled'
46
47
  | 'id'
47
48
  | 'invalid'
49
+ | 'messages'
48
50
  | 'name'
49
51
  | 'pickerLabel'
50
52
  | 'size'
@@ -22,6 +22,7 @@ export const definition: ElementDefinition = {
22
22
  id: 'string',
23
23
  invalid: 'boolean',
24
24
  max: 'number',
25
+ messages: 'json',
25
26
  min: 'number',
26
27
  name: 'string',
27
28
  placeholder: 'string',
@@ -54,6 +55,7 @@ export type PolyNumberInputElement = MemberElement<
54
55
  | 'id'
55
56
  | 'invalid'
56
57
  | 'max'
58
+ | 'messages'
57
59
  | 'min'
58
60
  | 'name'
59
61
  | 'placeholder'
@@ -16,6 +16,7 @@ export const definition: ElementDefinition = {
16
16
  'aria-label': 'string',
17
17
  'aria-labelledby': 'string',
18
18
  'aria-required': 'boolean',
19
+ countLabel: 'property',
19
20
  defaultValue: 'json',
20
21
  disabled: 'boolean',
21
22
  id: 'string',
@@ -23,6 +24,7 @@ export const definition: ElementDefinition = {
23
24
  max: 'number',
24
25
  name: 'string',
25
26
  placeholder: 'string',
27
+ removedLabel: 'property',
26
28
  removeLabel: 'property',
27
29
  size: 'string',
28
30
  validate: 'property',
@@ -40,6 +42,7 @@ export type PolyTagInputElement = MemberElement<
40
42
  | 'aria-label'
41
43
  | 'aria-labelledby'
42
44
  | 'aria-required'
45
+ | 'countLabel'
43
46
  | 'defaultValue'
44
47
  | 'disabled'
45
48
  | 'id'
@@ -47,6 +50,7 @@ export type PolyTagInputElement = MemberElement<
47
50
  | 'max'
48
51
  | 'name'
49
52
  | 'placeholder'
53
+ | 'removedLabel'
50
54
  | 'removeLabel'
51
55
  | 'size'
52
56
  | 'validate'
@@ -24,6 +24,7 @@ export const definition: ElementDefinition = {
24
24
  id: 'string',
25
25
  invalid: 'boolean',
26
26
  locale: 'string',
27
+ messages: 'json',
27
28
  name: 'string',
28
29
  readOnly: 'boolean',
29
30
  size: 'string',
@@ -48,6 +49,7 @@ export type PolyTimeInputElement = MemberElement<
48
49
  | 'id'
49
50
  | 'invalid'
50
51
  | 'locale'
52
+ | 'messages'
51
53
  | 'name'
52
54
  | 'readOnly'
53
55
  | 'size'
@@ -26,6 +26,16 @@ export const states: ComponentStates = {
26
26
  subject: 'poly-select',
27
27
  expect: { 'data-placeholder': null },
28
28
  },
29
+ {
30
+ name: 'nothing chosen, held as null',
31
+ html: `<poly-select options='[{"value":"urgent","label":"Urgent"},{"value":"high","label":"High"},{"value":"normal","label":"Normal"},{"value":"low","label":"Low"}]' placeholder="Choose a priority" aria-label="Priority"></poly-select>`,
32
+ subject: 'poly-select',
33
+ setup: (find) => {
34
+ const e0 = find('poly-select', 0)
35
+ e0.value = null
36
+ },
37
+ expect: { 'data-placeholder': '' },
38
+ },
29
39
  {
30
40
  name: 'sizes side by side',
31
41
  html: `<poly-inline gap="3">
@@ -21,6 +21,7 @@ export const definition: ElementDefinition = {
21
21
  loading: 'boolean',
22
22
  open: 'boolean',
23
23
  placeholder: 'string',
24
+ spoken: 'property',
24
25
  },
25
26
  events: { onOpenChange: { type: 'poly-open-change' } },
26
27
  slots: [],
@@ -40,6 +41,7 @@ export type PolyCommandElement = MemberElement<
40
41
  | 'loading'
41
42
  | 'open'
42
43
  | 'placeholder'
44
+ | 'spoken'
43
45
  >
44
46
 
45
47
  export const PolyCommand = define(definition, Command)
@@ -11,13 +11,16 @@ import CodeBlock, { type CodeBlockProps } from '@polymorph/solid-ui/structure/Co
11
11
  export const definition: ElementDefinition = {
12
12
  tag: 'poly-code-block',
13
13
  member: 'CodeBlock',
14
- props: { copyable: 'boolean', copyLabel: 'string', label: 'string' },
14
+ props: { copiedLabel: 'string', copyable: 'boolean', copyLabel: 'string', label: 'string' },
15
15
  events: {},
16
16
  slots: ['children'],
17
17
  }
18
18
 
19
19
  /** The `<poly-code-block>` element. */
20
- export type PolyCodeBlockElement = MemberElement<CodeBlockProps, 'copyable' | 'copyLabel' | 'label'>
20
+ export type PolyCodeBlockElement = MemberElement<
21
+ CodeBlockProps,
22
+ 'copiedLabel' | 'copyable' | 'copyLabel' | 'label'
23
+ >
21
24
 
22
25
  export const PolyCodeBlock = define(definition, CodeBlock)
23
26
 
@@ -13,10 +13,13 @@ export const definition: ElementDefinition = {
13
13
  member: 'Stat',
14
14
  props: {
15
15
  delta: 'json',
16
+ deltaLabel: 'property',
16
17
  description: 'string',
17
18
  footer: 'json',
18
19
  icon: 'string',
19
20
  label: 'string',
21
+ loading: 'boolean',
22
+ loadingLabel: 'string',
20
23
  numeric: 'boolean',
21
24
  spark: 'json',
22
25
  sparkLabel: 'property',
@@ -31,10 +34,13 @@ export const definition: ElementDefinition = {
31
34
  export type PolyStatElement = MemberElement<
32
35
  StatProps,
33
36
  | 'delta'
37
+ | 'deltaLabel'
34
38
  | 'description'
35
39
  | 'footer'
36
40
  | 'icon'
37
41
  | 'label'
42
+ | 'loading'
43
+ | 'loadingLabel'
38
44
  | 'numeric'
39
45
  | 'spark'
40
46
  | 'sparkLabel'
@@ -73,5 +73,38 @@ export const states: ComponentStates = {
73
73
  html: `<poly-stat label="Urgent" value="1" trend='{"direction":"down","label":"2 fewer"}'></poly-stat>`,
74
74
  subject: 'poly-stat',
75
75
  },
76
+ {
77
+ name: 'spark trending down beside a down-positive delta — direction is not sentiment, as a shape',
78
+ html: `<poly-stat label="First response" value="26m" delta='{"value":"16m","direction":"down","positive":true}' spark='[42,40,41,38,35,36,33,31,32,29,27,26]'></poly-stat>`,
79
+ subject: 'poly-stat',
80
+ },
81
+ {
82
+ name: 'spark with the trend chip — words and shape together',
83
+ html: `<poly-stat label="Revenue" value="$48,200" trend='{"direction":"up","label":"+12.5%"}' spark='[180,195,190,210,220,216,240,251,248,262,270,284]'></poly-stat>`,
84
+ subject: 'poly-stat',
85
+ },
86
+ {
87
+ name: 'spark alone',
88
+ html: `<poly-stat label="Open tickets" value="128" spark='[180,195,190,210,220,216,240,251,248,262,270,284]'></poly-stat>`,
89
+ subject: 'poly-stat',
90
+ },
91
+ {
92
+ name: 'loading — the label stays and the number holds its place',
93
+ html: `<poly-stat label="Response time" value icon="time" loading></poly-stat>`,
94
+ subject: 'poly-stat',
95
+ expect: { 'data-loading': '', 'aria-busy': 'true' },
96
+ },
97
+ {
98
+ name: 'loading with a delta — no sentiment before the number',
99
+ html: `<poly-stat label="Resolved" value="342" delta='{"value":"12%","direction":"up"}' loading></poly-stat>`,
100
+ subject: 'poly-stat',
101
+ expect: { 'data-loading': '', 'aria-busy': 'true' },
102
+ },
103
+ {
104
+ name: 'loading a dashboard card — the chip, the spark and the footer hold their places',
105
+ html: `<poly-stat label="Solved this week" value="1,204" trend='{"direction":"up","label":"+12.5%"}' spark='[180,195,190,210,220,216,240,251,248,262,270,284]' footer='{"primary":"Trending up this month","secondary":"Against the same week last month"}' loading></poly-stat>`,
106
+ subject: 'poly-stat',
107
+ expect: { 'data-loading': '', 'aria-busy': 'true' },
108
+ },
76
109
  ],
77
110
  }
@@ -349,7 +349,7 @@ var PROJECTIONS = [
349
349
  "night",
350
350
  "nocturnal"
351
351
  ],
352
- why: "Which mode the pairing opens in. Both modes are always emitted; this is the default.",
352
+ why: "The mode a first visit opens in, whatever the device’s mode. Both modes are always emitted; this is the default.",
353
353
  apply: (candidate) => {
354
354
  const from = candidate.defaultMode;
355
355
  candidate.defaultMode = "dark";
@@ -362,7 +362,7 @@ var PROJECTIONS = [
362
362
  },
363
363
  {
364
364
  words: ["daylight", "daytime"],
365
- why: "The other default mode.",
365
+ why: "The other fixed default mode. Without either word the proposal keeps its starting system’s, which may follow the device.",
366
366
  apply: (candidate) => {
367
367
  const from = candidate.defaultMode;
368
368
  candidate.defaultMode = "light";
@@ -395,7 +395,8 @@ var PROJECTIONS = [
395
395
  /**
396
396
  * Words that carry no design decision, so they are neither mapped nor
397
397
  * reported. Listing them avoids guessing at them, and avoids hiding a real miss
398
- * such as "zesty" among articles and intensifiers.
398
+ * such as "zesty" among articles. "More" is here because every word in the
399
+ * table already means more of itself: "more editorial" is "editorial".
399
400
  */
400
401
  var IGNORED = [
401
402
  "a",
@@ -407,13 +408,6 @@ var IGNORED = [
407
408
  "with",
408
409
  "without",
409
410
  "more",
410
- "less",
411
- "very",
412
- "much",
413
- "bit",
414
- "little",
415
- "slightly",
416
- "somewhat",
417
411
  "make",
418
412
  "made",
419
413
  "making",
@@ -447,8 +441,56 @@ var IGNORED = [
447
441
  "palette",
448
442
  "design"
449
443
  ];
444
+ /** Why a word that asks for part of a move moves nothing. */
445
+ var SMALLER = "a degree: a word here moves its axis one whole step or sets one value, never part of one, so name the value meant as <axis>=<value>";
446
+ /** Why a word that asks for more than one move moves nothing. */
447
+ var LARGER = "a degree: a word here moves its axis one step each time it is written or sets one value, so write the word again, or name the value meant as <axis>=<value>";
448
+ /**
449
+ * Words of degree, each with why the table cannot express it. A word in the
450
+ * table moves its axis one step or sets it to one value, so "slightly rounded"
451
+ * reads as "rounded", the roundest geometry, and "less calm" as "calm". A
452
+ * degree word is reported in `unmapped`, and its reason in `unread`, so a
453
+ * reader knows that it moved nothing.
454
+ */
455
+ var DEGREES = {
456
+ less: "a degree: it does not turn the word after it around, which still moves its own way, so use the opposite word, or name the value meant as <axis>=<value>",
457
+ slightly: SMALLER,
458
+ somewhat: SMALLER,
459
+ bit: SMALLER,
460
+ little: SMALLER,
461
+ very: LARGER,
462
+ much: LARGER
463
+ };
464
+ /**
465
+ * An exact value, `<axis>=<value>`: an axis's name, then the value, to the
466
+ * next space, comma or semicolon. Every other word is a run of letters, as
467
+ * the table reads words, so punctuation and digits split rather than hide one.
468
+ */
469
+ var TOKEN = /([A-Za-z][A-Za-z0-9]*)=([^\s,;]*)|[A-Za-z]+/g;
450
470
  var IGNORED_SET = new Set(IGNORED);
451
471
  var BY_WORD = new Map(PROJECTIONS.flatMap((projection) => projection.words.map((word) => [word, projection])));
472
+ /**
473
+ * `<axis>=<value>` applied: the axis set to the value, when the catalogue has
474
+ * both, or why it moved nothing. The axis and its values are the registry's
475
+ * (`catalogue.ladders`), matched without regard to case, so `polymorph axes`
476
+ * and `get_theme_axes` list every lawful one.
477
+ */
478
+ function exact(candidate, catalogue, axisWritten, valueWritten) {
479
+ const axes = Object.keys(catalogue.ladders);
480
+ const axis = axes.find((name) => name.toLowerCase() === axisWritten.toLowerCase());
481
+ if (axis === void 0) return { why: `no axis is called ${axisWritten} — the axes are ${axes.join(", ")}` };
482
+ const ladder = catalogue.ladders[axis] ?? [];
483
+ const value = ladder.find((entry) => entry.toLowerCase() === valueWritten.toLowerCase());
484
+ if (value === void 0) return { why: `${axis} takes ${ladder.join(", ")}` };
485
+ return {
486
+ value,
487
+ entry: {
488
+ word: `${axis}=${value}`,
489
+ why: `A value named exactly, from the ones ${axis} takes: ${ladder.join(", ")}.`,
490
+ moves: set(candidate, axis, value)
491
+ }
492
+ };
493
+ }
452
494
  /** The canonical word of each entry, which the tool's description publishes. */
453
495
  function vocabulary() {
454
496
  return PROJECTIONS.map((projection) => projection.words[0]);
@@ -459,14 +501,24 @@ function catalogueOf(registry) {
459
501
  editorialDisplay: registry.theme.systems.find((system) => system.axes["typePersonality"] === "editorial")?.fonts.find((requirement) => requirement.roles.includes("display"))?.family ?? null
460
502
  };
461
503
  }
462
- /** The catalogue publishes a family per *package*, listing the roles it serves. */
504
+ /**
505
+ * The catalogue publishes a family per *package*, listing the roles it serves.
506
+ * The body family lists `heading` when the system states no heading slot, so a
507
+ * heading family is carried only when it is another family than the body's,
508
+ * and a proposal from a system without the slot has none either.
509
+ */
463
510
  function fontsOf(system) {
464
511
  const slots = {
465
512
  body: { family: "" },
466
513
  display: { family: "" },
467
514
  mono: { family: "" }
468
515
  };
469
- for (const requirement of system.fonts) for (const role of requirement.roles) if (role === "body" || role === "display" || role === "mono") slots[role] = { family: requirement.family };
516
+ let heading;
517
+ for (const requirement of system.fonts) for (const role of requirement.roles) {
518
+ if (role === "body" || role === "display" || role === "mono") slots[role] = { family: requirement.family };
519
+ if (role === "heading") heading = requirement.family;
520
+ }
521
+ if (heading !== void 0 && heading !== slots.body.family) slots.heading = { family: heading };
470
522
  return slots;
471
523
  }
472
524
  /**
@@ -526,12 +578,36 @@ function proposeTheme(context, args) {
526
578
  const catalogue = catalogueOf(registry);
527
579
  const rationale = [];
528
580
  const unmapped = [];
581
+ const unread = [];
529
582
  const canonical = [];
530
- for (const word of args.intent.toLowerCase().split(/[^a-z]+/).filter(Boolean)) {
583
+ const notRead = (word, why) => {
584
+ if (unmapped.includes(word)) return;
585
+ unmapped.push(word);
586
+ if (why !== null) unread.push({
587
+ word,
588
+ why
589
+ });
590
+ };
591
+ for (const [token, axis, written] of args.intent.matchAll(TOKEN)) {
592
+ if (axis !== void 0) {
593
+ const applied = exact(candidate, catalogue, axis, (written ?? "").replace(/[.!?]+$/, "").replace(/^(["'])(.*)\1$/, "$2"));
594
+ if ("why" in applied) notRead(token, applied.why);
595
+ else {
596
+ rationale.push(applied.entry);
597
+ if (!canonical.includes(applied.value)) canonical.push(applied.value);
598
+ }
599
+ continue;
600
+ }
601
+ const word = token.toLowerCase();
531
602
  if (IGNORED_SET.has(word)) continue;
603
+ const degree = Object.hasOwn(DEGREES, word) ? DEGREES[word] : void 0;
604
+ if (degree !== void 0) {
605
+ notRead(word, degree);
606
+ continue;
607
+ }
532
608
  const projection = BY_WORD.get(word);
533
609
  if (!projection) {
534
- if (!unmapped.includes(word)) unmapped.push(word);
610
+ notRead(word, null);
535
611
  continue;
536
612
  }
537
613
  rationale.push({
@@ -569,6 +645,7 @@ function proposeTheme(context, args) {
569
645
  },
570
646
  rationale,
571
647
  unmapped,
648
+ unread,
572
649
  lawful: faults.length === 0,
573
650
  faults
574
651
  };
@@ -589,4 +666,4 @@ function verdict(systemDocument, paletteDocument) {
589
666
  }).faults.map((fault) => fault.message);
590
667
  }
591
668
  //#endregion
592
- export { IGNORED, PROJECTIONS, proposeTheme, vocabulary };
669
+ export { DEGREES, IGNORED, PROJECTIONS, proposeTheme, vocabulary };
@@ -2,10 +2,11 @@ import { PLATFORMS } from "../../registry/src/platforms.js";
2
2
  import { FRAMEWORKS } from "../../registry/src/frameworks.js";
3
3
  import { FrameworkMismatchError, UnshippedMemberError } from "../../cli/src/vue.js";
4
4
  import { EscapingDirError, UnknownItemError } from "../../cli/src/plan.js";
5
+ import { ADDRESS_POLICIES } from "../../registry/src/runtime-members.js";
5
6
  import { RefusedWriteError, UnfinishedInstallError, emitScreen, fixFile, install, saveTheme } from "./write.js";
6
7
  import { proposeTheme, vocabulary } from "./propose.js";
7
8
  import { ScreenUnavailableError, VIEWPORTS, renderScreen } from "./render.js";
8
- import { UnknownComponentError, fix, getComponent, getInstallPlan, getSystemCard, getThemeAxes, searchComponents, validate } from "./tools.js";
9
+ import { SystemCardError, UnknownComponentError, fix, getComponent, getInstallPlan, getSystemCard, getThemeAxes, searchComponents, validate } from "./tools.js";
9
10
  import { z } from "zod";
10
11
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
11
12
  //#region ../mcp/src/server.ts
@@ -157,7 +158,7 @@ var TOOLS = [
157
158
  tool({
158
159
  name: "get_component",
159
160
  title: "Get a component",
160
- description: "One component: its prop surface with printed types, its lawful variant × tone cells, the states its fixture renders, the `data-*` attributes it surfaces, and its dependencies. Pass `source: true` for the actual files.",
161
+ description: "One component: its prop surface with printed types, the fields of each data type a prop names (`types`), its lawful variant × tone cells, the states its fixture renders, the `data-*` attributes it surfaces, and its dependencies. Pass `source: true` for the actual files.",
161
162
  inputSchema: {
162
163
  name: z.string().describe("`DatePicker`, `date-picker` and `datepicker` all work."),
163
164
  source: z.boolean().optional().describe("Include the component, stylesheet and fixture source. Off by default.")
@@ -194,13 +195,23 @@ var TOOLS = [
194
195
  tool({
195
196
  name: "get_system_card",
196
197
  title: "Get the system card",
197
- description: "The whole vocabulary compressed for a context window: every component with its purpose and lawful cells, the token and axis catalogue, the red rules and the exception ladder, and what each platform renders natively, adapts or lacks. Read this first — it is a few thousand tokens and answers most questions outright. Pass `platform` for the vocabulary as it exists on one platform, and `framework` for a Vue, Svelte, Solid, Angular or elements app.",
198
+ description: "The whole vocabulary compressed for a context window: every component with its purpose and lawful cells, the token and axis catalogue, the red rules and the exception ladder, and what each platform renders natively, adapts or lacks. Read this first — it is a few thousand tokens and answers most questions outright. Pass `platform` for the vocabulary as it exists on one platform, and `framework` for a Vue, Svelte, Solid, Angular or elements app. Pass `runtime: true` for the run-time card instead: the text a product puts in its model’s system prompt for a screen the model writes while the product runs, for `react` or `elements`, the `members` the product allows and its `addresses`.",
198
199
  inputSchema: {
199
200
  platform: PLATFORM_ARGUMENT,
200
- framework: FRAMEWORK_ARGUMENT
201
+ framework: FRAMEWORK_ARGUMENT,
202
+ runtime: z.boolean().optional().describe("The run-time card in place of the system card: what `runtimeCard` from `@polymorph/screen/card` returns for the same `framework`, `members` and `addresses`. `framework` is `react` (the default) or `elements`."),
203
+ members: z.array(z.string()).optional().describe("With `runtime`: the members and exception primitives the product allows, by name; a part comes with its member. Omitted, every member the framework draws but `ThirdParty` and, in React, `Toast`."),
204
+ addresses: z.enum(ADDRESS_POLICIES).optional().describe("With `runtime`: `allowed` (the default), or `refused` for a product that shows no link and loads no picture a model chose. Refused, the card lists no prop that takes an address and no member that cannot be drawn without one.")
201
205
  },
202
206
  annotations: READS,
203
- answer: (context, args) => answered(getSystemCard(context, args))
207
+ answer: (context, args) => {
208
+ try {
209
+ return answered(getSystemCard(context, args));
210
+ } catch (error) {
211
+ if (error instanceof SystemCardError) return refused(error.message);
212
+ throw error;
213
+ }
214
+ }
204
215
  }),
205
216
  tool({
206
217
  name: "get_theme_axes",
@@ -243,9 +254,9 @@ var TOOLS = [
243
254
  tool({
244
255
  name: "propose_theme",
245
256
  title: "Propose a theme",
246
- description: `Describe an intent — "calmer, more editorial, warmer paper" — and get a complete candidate system and palette back as JSON, plus the verdict from actually resolving the pair through the theme engine. The tool owns a projection table and nothing else: each word maps to bounded moves along the axes and seeds, applied in the order you wrote them, so a later word wins a contradiction. Words it does not have come back in \`unmapped\` rather than being guessed at. It writes no files — land a proposal with \`save_theme\`, or by pasting it into the workbench studio. The vocabulary is: ${vocabulary().join(", ")}.`,
257
+ description: `Describe an intent — "calmer, more editorial, warmer paper" — and get a complete candidate system and palette back as JSON, plus the verdict from actually resolving the pair through the theme engine. The tool owns a projection table and nothing else: each word maps to bounded moves along the axes and seeds, applied in the order you wrote them, so a later word wins a contradiction. A word moves its axis one step or sets one value; \`<axis>=<value>\` (\`geometry=soft\`) sets an axis to a value \`get_theme_axes\` lists. Words it does not have come back in \`unmapped\` rather than being guessed at, and so do words of degree (slightly, very, less), which no move expresses, and an exact value the catalogue does not have, each with why in \`unread\`. It writes no files — land a proposal with \`save_theme\`, or by pasting it into the workbench studio. The vocabulary is: ${vocabulary().join(", ")}.`,
247
258
  inputSchema: {
248
- intent: z.string().min(1).describe("Plain words. Every one it recognises is reported with what it moved."),
259
+ intent: z.string().min(1).describe("Plain words, and `<axis>=<value>` for an exact value. Every one it recognises is reported with what it moved."),
249
260
  basedOn: z.object({
250
261
  system: z.string().optional().describe("A shipped system to start the axes from."),
251
262
  palette: z.string().optional().describe("A shipped palette to start the seeds from.")
@@ -289,7 +300,7 @@ var TOOLS = [
289
300
  name: "emit_screen",
290
301
  writes: true,
291
302
  title: "Emit a screen",
292
- description: "Compile a screen spec to a TSX file in the project, to Solid TSX with `framework: \"solid\"` or in a project that uses `@polymorph/solid-ui` and not `@polymorph/react-ui`, to a Vue or Svelte single-file component with that `framework` or a `.vue` or `.svelte` path, or to an Angular standalone component with `framework: \"angular\"` or a `.ts` path. A spec whose `platform` is `ios` compiles to a `.swift` file instead, and one whose `platform` is `android` to a `.kt` file: a model, an actions record and a stateless SwiftUI or Compose view built from the platform’s members (design/native/screen-contract.md); a member the platform does not draw is a fault, and `framework` is refused. `framework: \"elements\"` is refused: HTML has no way to bind a screen’s callbacks and node renderers. The spec is checked exactly as `validate` checks one, and an unlawful spec writes nothing and comes back with its faults. A lawful one lands as a presentational component — composition and bindings only, formatted by the project’s Prettier config (a native file by the emitter’s own layout), and held to every red rule (for a native file, to the native contract’s law) before it is written — so the screen is never typed out by hand. The answer names the `language` written. Replaces a file only when that file is itself an emitted screen, hand edits to it included; state and handlers belong in a container that renders it, or in the app’s store for a native screen.",
303
+ description: "Compile a screen spec to a TSX file in the project, to Solid TSX with `framework: \"solid\"` or in a project that uses `@polymorph/solid-ui` and not `@polymorph/react-ui`, to a Vue or Svelte single-file component with that `framework` or a `.vue` or `.svelte` path, or to an Angular standalone component with `framework: \"angular\"` or a `.ts` path. A spec whose `platform` is `ios` compiles to a `.swift` file instead, and one whose `platform` is `android` to a `.kt` file: a model, an actions record and a stateless SwiftUI or Compose view built from the platform’s members (design/native/screen-contract.md); a member the platform does not draw is a fault, and `framework` is refused. A project with no `package.json` that is a Swift package or an Xcode project takes only `ios` screens, and one that is a Gradle build only `android` screens. `framework: \"elements\"` is refused: HTML has no way to bind a screen’s callbacks and node renderers. The spec is checked exactly as `validate` checks one, and an unlawful spec writes nothing and comes back with its faults. A lawful one lands as a presentational component — composition and bindings only, formatted by the project’s Prettier config (a native file by the emitter’s own layout), and held to every red rule (for a native file, to the native contract’s law) before it is written — so the screen is never typed out by hand. The answer names the `language` written. Replaces a file only when that file is itself an emitted screen, hand edits to it included; state and handlers belong in a container that renders it, or in the app’s store for a native screen.",
293
304
  inputSchema: {
294
305
  spec: SPEC.describe("A screen spec, as an object or as JSON text — the argument `validate` takes."),
295
306
  path: z.string().describe("Where the file lands, relative to the project root. Ends in `.tsx` (React or Solid), `.vue` for Vue, `.svelte` for Svelte, `.ts` for Angular, `.swift` for a spec whose platform is `ios`, or `.kt` for one whose platform is `android`."),