@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
@@ -23,7 +23,7 @@ import styles from '@polymorph/recipes/overlays/command.module.css'
23
23
  import { useModalFocus } from './modal-focus'
24
24
 
25
25
  /**
26
- * The command palette (`design/components/command.md`).
26
+ * Command palette (`design/components/command.md`).
27
27
  *
28
28
  * **Composed, not imported.** `cmdk` is rejected
29
29
  * (`design/components/README-substrates.md`, the command palette) because of
@@ -52,6 +52,14 @@ export interface CommandItem {
52
52
  onSelect: () => void
53
53
  }
54
54
 
55
+ /**
56
+ * What the status region says while the commands load and once some are shown,
57
+ * given whether they load and how many the query shows. One function rather
58
+ * than two phrases, as Stepper's `spoken`, because the words around a number
59
+ * are grammar and belong to the message catalog.
60
+ */
61
+ export type CommandSpoken = (status: { loading: boolean; count: number }) => string
62
+
55
63
  export interface CommandProps {
56
64
  /** The app owns the ⌘K binding, because a global hotkey is app policy, not vocabulary. */
57
65
  open: boolean
@@ -69,12 +77,21 @@ export interface CommandProps {
69
77
  filter?: 'contains' | false
70
78
  loading?: boolean
71
79
  emptyMessage?: string
80
+ /**
81
+ * The status region's words in the host's language, the localization seam;
82
+ * the default says `Loading commands…`, `1 command` or `4 commands`. With
83
+ * nothing shown, the region says `emptyMessage`.
84
+ */
85
+ spoken?: CommandSpoken
72
86
  /** `false` for chained palettes, where the query stays after a command runs. */
73
87
  closeOnSelect?: boolean
74
88
  }
75
89
 
76
90
  const SKELETON_ROWS = [0, 1, 2]
77
91
 
92
+ const defaultSpoken: CommandSpoken = ({ loading, count }) =>
93
+ loading ? 'Loading commands…' : count === 1 ? '1 command' : `${count} commands`
94
+
78
95
  export function Command({
79
96
  open,
80
97
  onOpenChange,
@@ -85,6 +102,7 @@ export function Command({
85
102
  filter = 'contains',
86
103
  loading = false,
87
104
  emptyMessage = 'No results',
105
+ spoken = defaultSpoken,
88
106
  closeOnSelect = true,
89
107
  }: CommandProps) {
90
108
  const focus = useModalFocus('primary')
@@ -140,6 +158,7 @@ export function Command({
140
158
  filter={filter}
141
159
  loading={loading}
142
160
  emptyMessage={emptyMessage}
161
+ spoken={spoken}
143
162
  closeOnSelect={closeOnSelect}
144
163
  onOpenChange={onOpenChange}
145
164
  />
@@ -166,6 +185,7 @@ function CommandPanel({
166
185
  filter,
167
186
  loading,
168
187
  emptyMessage,
188
+ spoken,
169
189
  closeOnSelect,
170
190
  onOpenChange,
171
191
  }: {
@@ -179,6 +199,7 @@ function CommandPanel({
179
199
  filter: 'contains' | false
180
200
  loading: boolean
181
201
  emptyMessage: string
202
+ spoken: CommandSpoken
182
203
  closeOnSelect: boolean
183
204
  onOpenChange: (open: boolean) => void
184
205
  }) {
@@ -326,7 +347,7 @@ function CommandPanel({
326
347
  </div>
327
348
 
328
349
  <div role="status" aria-live="polite" className={styles.status}>
329
- {loading ? 'Loading commands…' : count === 0 ? emptyMessage : `${count} commands`}
350
+ {showEmpty ? emptyMessage : spoken({ loading, count })}
330
351
  </div>
331
352
  </MotionSurface>
332
353
  </DialogPrimitive.Content>
@@ -103,7 +103,7 @@ function ToastCard({
103
103
  */
104
104
  const held = useSyncExternalStore(
105
105
  subscribeToasts,
106
- () => getToasts().some((each) => each.id === record.id),
106
+ () => getToasts().some((each) => each.key === record.key),
107
107
  () => true,
108
108
  )
109
109
  const leaving = record.closing === true || !held
@@ -376,7 +376,7 @@ export function Toaster({
376
376
  <MotionPresence>
377
377
  {records.map((record) => (
378
378
  <ToastCard
379
- key={record.id}
379
+ key={record.key}
380
380
  record={record}
381
381
  dismissLabel={messages.dismiss}
382
382
  paused={paused}
@@ -7,7 +7,8 @@ import { memberAttr } from '@polymorph/react'
7
7
  import styles from '@polymorph/recipes/structure/code-block.module.css'
8
8
 
9
9
  /**
10
- * Block of code, such as an install command or config sample (`design/components/code-block.md`).
10
+ * Verbatim code (`design/components/code-block.md`). An install command or a
11
+ * config sample is shown as written.
11
12
  *
12
13
  * The block is its own scroll container (container-first, `docs/layout.md`), so
13
14
  * wide code never makes the page scroll sideways.
@@ -46,6 +47,8 @@ export interface CodeBlockProps {
46
47
  copyable?: boolean
47
48
  /** The copy control's accessible name, default `'Copy'`; apps pass a localized one. */
48
49
  copyLabel?: string
50
+ /** What a screen reader hears after a copy, default `'Copied'`; apps pass a localized one. */
51
+ copiedLabel?: string
49
52
  }
50
53
 
51
54
  export function CodeBlock({
@@ -53,6 +56,7 @@ export function CodeBlock({
53
56
  label = SCROLL_REGION_LABEL,
54
57
  copyable = false,
55
58
  copyLabel = 'Copy',
59
+ copiedLabel = 'Copied',
56
60
  }: CodeBlockProps) {
57
61
  const block = useRef<HTMLPreElement>(null)
58
62
  const [overflowing, setOverflowing] = useState(false)
@@ -133,9 +137,9 @@ export function CodeBlock({
133
137
  </div>
134
138
 
135
139
  {/* Announces the result politely, because a copy never justifies an
136
- interruption. Fixed English here; CopyButton takes `copiedLabel`. */}
140
+ interruption. */}
137
141
  <span className={styles.reader} aria-live="polite">
138
- {copied ? 'Copied' : ''}
142
+ {copied ? copiedLabel : ''}
139
143
  </span>
140
144
  </div>
141
145
  )
@@ -1,15 +1,20 @@
1
1
  import { Icon, type IconRole, memberAttr } from '@polymorph/react'
2
2
  import { Sparkline } from '../charts/Sparkline'
3
3
  import { Badge } from './Badge'
4
+ import { Skeleton } from './Skeleton'
4
5
  import styles from '@polymorph/recipes/structure/stat.module.css'
5
6
 
6
7
  /**
7
- * A key number with its label and direction of change
8
- * (`design/components/stat.md`).
8
+ * A key number and how it moved (`design/components/stat.md`).
9
9
  *
10
10
  * Content, not a surface: Dashboard wraps these in Cards, so a Stat's own box
11
11
  * would nest. `value` is pre-formatted, because separators, currency, precision
12
12
  * and locale are data logic this component cannot know.
13
+ *
14
+ * While `loading`, the label row stays and every part that states the number is
15
+ * a Skeleton of that part's size, so the card keeps its height when the number
16
+ * arrives. Nothing the caller passes about the number is in the document then:
17
+ * not the value, the delta's words, the chip's label, the spark or the footer.
13
18
  */
14
19
 
15
20
  export type DeltaDirection = 'up' | 'down'
@@ -24,6 +29,17 @@ export interface StatDelta {
24
29
  positive?: boolean
25
30
  }
26
31
 
32
+ /**
33
+ * The delta's spoken sentence, given its value, its direction and its
34
+ * sentiment resolved (`positive` is never absent here). A function, not three
35
+ * words, because the order of the words is grammar and belongs to the catalog.
36
+ */
37
+ export type StatDeltaLabel = (delta: {
38
+ value: string
39
+ direction: DeltaDirection
40
+ positive: boolean
41
+ }) => string
42
+
27
43
  /**
28
44
  * The movement, as a neutral outline chip on the label row, the way the
29
45
  * dashboard block's reference design draws it.
@@ -59,6 +75,11 @@ export interface StatProps {
59
75
  numeric?: boolean
60
76
  icon?: IconRole
61
77
  delta?: StatDelta
78
+ /**
79
+ * The delta's spoken sentence in the host's words, the localization seam;
80
+ * the default is `{direction} {value} — positive` or `— negative`.
81
+ */
82
+ deltaLabel?: StatDeltaLabel
62
83
  /** The neutral movement chip, top-right. See `StatTrend` for why it is not `delta`. */
63
84
  trend?: StatTrend
64
85
  /**
@@ -77,26 +98,49 @@ export interface StatProps {
77
98
  description?: string
78
99
  /** The two-line footer: the interpretation, then the period it covers. */
79
100
  footer?: StatFooter
101
+ /**
102
+ * The number has not arrived. The label row stays, and the value and each part
103
+ * the caller passes that states the number is a Skeleton of that part's size.
104
+ * `value` stays required, as a chart's rows do with its `loading`: pass what
105
+ * there is, `''` or the last value, and it is not drawn.
106
+ */
107
+ loading?: boolean
108
+ /**
109
+ * What a screen reader hears in the value's place while `loading`, the
110
+ * value's Skeleton's name. Default "Loading".
111
+ */
112
+ loadingLabel?: string
80
113
  }
81
114
 
82
115
  const defaultSparkLabel = (label: string) => `${label}, recent trend`
83
116
 
117
+ const defaultDeltaLabel: StatDeltaLabel = ({ value, direction, positive }) =>
118
+ `${direction} ${value} — ${positive ? 'positive' : 'negative'}`
119
+
84
120
  export function Stat({
85
121
  label,
86
122
  value,
87
123
  numeric = true,
88
124
  icon,
89
125
  delta,
126
+ deltaLabel = defaultDeltaLabel,
90
127
  trend,
91
128
  spark,
92
129
  sparkLabel = defaultSparkLabel,
93
130
  description,
94
131
  footer,
132
+ loading = false,
133
+ loadingLabel = 'Loading',
95
134
  }: StatProps) {
96
135
  const positive = delta === undefined ? undefined : (delta.positive ?? delta.direction === 'up')
97
136
 
98
137
  return (
99
- <div className={styles.stat} {...memberAttr('Stat')}>
138
+ <div
139
+ className={styles.stat}
140
+ data-loading={loading ? '' : undefined}
141
+ aria-busy={loading ? true : undefined}
142
+ {...memberAttr('Stat')}
143
+ >
100
144
  <div className={styles.labelRow}>
101
145
  <span className={styles.label}>{label}</span>
102
146
 
@@ -107,7 +151,13 @@ export function Stat({
107
151
  <Icon name={icon} />
108
152
  </span>
109
153
  )}
110
- {trend === undefined ? null : (
154
+ {trend === undefined ? null : loading ? (
155
+ // The chip's box with its line held by a Skeleton, so the label
156
+ // row keeps the chip's height and states no movement yet.
157
+ <span className={styles.trendPlaceholder}>
158
+ <Skeleton textStep="xs" width={7} />
159
+ </span>
160
+ ) : (
111
161
  <Badge variant="outline" icon={trend.direction}>
112
162
  {trend.label}
113
163
  </Badge>
@@ -117,26 +167,42 @@ export function Stat({
117
167
  </div>
118
168
 
119
169
  <div className={styles.valueRow}>
120
- <span className={styles.value} data-numeric={numeric ? '' : undefined}>
121
- {value}
122
- </span>
170
+ {loading ? (
171
+ // The value's line box, and the one placeholder a screen reader hears.
172
+ <Skeleton textStep="3xl" width={10} label={loadingLabel} />
173
+ ) : (
174
+ <span className={styles.value} data-numeric={numeric ? '' : undefined}>
175
+ {value}
176
+ </span>
177
+ )}
123
178
 
124
179
  {/*
125
180
  * Sparkline is the one chart with no table twin, so its accessible name
126
181
  * carries the trend in this Stat's words. The wrapper never shrinks,
127
- * because a squashed spark is a different shape.
182
+ * because a squashed spark is a different shape. While loading, the
183
+ * placeholder is shorter than the value's line box, so the row keeps
184
+ * its height.
128
185
  */}
129
186
  {spark === undefined ? null : (
130
187
  <span className={styles.spark}>
131
- <Sparkline data={spark} label={sparkLabel(label)} />
188
+ {loading ? (
189
+ <Skeleton shape="rect" size={6} width={9} />
190
+ ) : (
191
+ <Sparkline data={spark} label={sparkLabel(label)} />
192
+ )}
132
193
  </span>
133
194
  )}
134
195
  </div>
135
196
 
136
197
  {delta === undefined ? (
137
- description === undefined ? null : (
198
+ description === undefined ? null : loading ? (
199
+ <Skeleton textStep="xs" width={10} />
200
+ ) : (
138
201
  <span className={styles.description}>{description}</span>
139
202
  )
203
+ ) : loading ? (
204
+ // No direction, value or sentiment for a number that has not arrived.
205
+ <Skeleton textStep="sm" width={9} />
140
206
  ) : (
141
207
  <span
142
208
  className={styles.delta}
@@ -148,15 +214,26 @@ export function Stat({
148
214
 
149
215
  {/*
150
216
  * Spoken text: colour and the arrow are not read aloud, so this states
151
- * the direction and the sentiment.
217
+ * the direction and the sentiment, in the host's words from `deltaLabel`.
152
218
  */}
153
219
  <span className={styles.spoken}>
154
- {`${delta.direction} ${delta.value} — ${positive ? 'positive' : 'negative'}`}
220
+ {deltaLabel({
221
+ value: delta.value,
222
+ direction: delta.direction,
223
+ positive: positive === true,
224
+ })}
155
225
  </span>
156
226
  </span>
157
227
  )}
158
228
 
159
- {footer === undefined ? null : (
229
+ {footer === undefined ? null : loading ? (
230
+ // The footer's box and two lines of its step: the interpretation and
231
+ // the period come with the number.
232
+ <div className={styles.footer}>
233
+ <Skeleton textStep="sm" />
234
+ <Skeleton textStep="sm" width={10} />
235
+ </div>
236
+ ) : (
160
237
  <div className={styles.footer}>
161
238
  <span className={styles.footerPrimary}>
162
239
  {footer.primary}
@@ -99,6 +99,74 @@ export const states: ComponentStates = {
99
99
  <Stat label="Urgent" value="1" trend={{ direction: 'down', label: '2 fewer' }} />
100
100
  ),
101
101
  },
102
+
103
+ /* The path as a shape at the value row's end. */
104
+ {
105
+ name: 'spark trending down beside a down-positive delta — direction is not sentiment, as a shape',
106
+ render: () => (
107
+ <Stat
108
+ label="First response"
109
+ value="26m"
110
+ delta={{ value: '16m', direction: 'down', positive: true }}
111
+ spark={[42, 40, 41, 38, 35, 36, 33, 31, 32, 29, 27, 26]}
112
+ />
113
+ ),
114
+ },
115
+ {
116
+ name: 'spark with the trend chip — words and shape together',
117
+ render: () => (
118
+ <Stat
119
+ label="Revenue"
120
+ value="$48,200"
121
+ trend={{ direction: 'up', label: '+12.5%' }}
122
+ spark={[180, 195, 190, 210, 220, 216, 240, 251, 248, 262, 270, 284]}
123
+ />
124
+ ),
125
+ },
126
+ {
127
+ name: 'spark alone',
128
+ render: () => (
129
+ <Stat
130
+ label="Open tickets"
131
+ value="128"
132
+ spark={[180, 195, 190, 210, 220, 216, 240, 251, 248, 262, 270, 284]}
133
+ />
134
+ ),
135
+ },
136
+
137
+ /*
138
+ * The number has not arrived. The label row is known before it; every part
139
+ * that states the number is a Skeleton of that part's size.
140
+ */
141
+ {
142
+ name: 'loading — the label stays and the number holds its place',
143
+ render: () => <Stat label="Response time" value="" icon="time" loading />,
144
+ expect: { 'data-loading': '', 'aria-busy': 'true' },
145
+ },
146
+ {
147
+ name: 'loading with a delta — no sentiment before the number',
148
+ render: () => (
149
+ <Stat label="Resolved" value="342" delta={{ value: '12%', direction: 'up' }} loading />
150
+ ),
151
+ expect: { 'data-loading': '', 'aria-busy': 'true' },
152
+ },
153
+ {
154
+ name: 'loading a dashboard card — the chip, the spark and the footer hold their places',
155
+ render: () => (
156
+ <Stat
157
+ label="Solved this week"
158
+ value="1,204"
159
+ trend={{ direction: 'up', label: '+12.5%' }}
160
+ spark={[180, 195, 190, 210, 220, 216, 240, 251, 248, 262, 270, 284]}
161
+ footer={{
162
+ primary: 'Trending up this month',
163
+ secondary: 'Against the same week last month',
164
+ }}
165
+ loading
166
+ />
167
+ ),
168
+ expect: { 'data-loading': '', 'aria-busy': 'true' },
169
+ },
102
170
  ],
103
171
 
104
172
  requiredSelectors: ['[data-positive]'],
@@ -51,13 +51,13 @@
51
51
  min-inline-size: 0;
52
52
  }
53
53
 
54
- /* Body size at the emphasis weight, matching Heading level 4. A pane's name is
55
- a section title, not a page title, and the thread beside it already carries
56
- strong visual weight. */
54
+ /* Body size at the emphasis weight in the heading slot, matching Heading level
55
+ 4. A pane's name is a section title, not a page title, and the thread beside
56
+ it already carries strong visual weight. */
57
57
  .title {
58
58
  margin: 0;
59
59
  overflow: hidden;
60
- font-family: var(--pm-text-md-family);
60
+ font-family: var(--pm-text-xl-family);
61
61
  font-size: var(--pm-text-md-size);
62
62
  font-weight: var(--pm-text-xl-weight);
63
63
  line-height: var(--pm-text-md-line-height);
@@ -199,7 +199,7 @@
199
199
 
200
200
  .heading3 {
201
201
  composes: heading from '../structure/heading.module.css';
202
- font-family: var(--pm-text-md-family);
202
+ font-family: var(--pm-text-xl-family);
203
203
  font-size: var(--pm-text-md-size);
204
204
  font-weight: var(--pm-text-xl-weight);
205
205
  line-height: var(--pm-text-md-line-height);
@@ -86,10 +86,12 @@
86
86
  letter-spacing: var(--pm-text-sm-tracking);
87
87
  }
88
88
 
89
+ /* Initials are a mark, not a heading, so they keep the body slot's family at
90
+ every size: `text.lg` draws in the heading slot. */
89
91
  .avatar[data-size='lg'] {
90
92
  inline-size: var(--pm-space-8);
91
93
  block-size: var(--pm-space-8);
92
- font-family: var(--pm-text-lg-family);
94
+ font-family: var(--pm-text-md-family);
93
95
  font-size: var(--pm-text-lg-size);
94
96
  font-weight: var(--pm-text-lg-weight);
95
97
  line-height: var(--pm-text-lg-line-height);
@@ -24,11 +24,12 @@
24
24
  letter-spacing: var(--pm-text-lg-tracking);
25
25
  }
26
26
 
27
- /* Level 4 matches Text's `strong` cell: below `text.lg` the sizes are body
28
- sizes, so weight marks the level, using `xl`'s weight from the scale (the
29
- type-usage law, `design/components/README.md`). */
27
+ /* Level 4 is `text.md` sized: below `text.lg` the sizes are body sizes, so
28
+ weight marks the level, using `xl`'s weight from the scale (the type-usage
29
+ law, `design/components/README.md`). It takes `xl`'s family with the weight,
30
+ the heading slot, so every level is in one face. */
30
31
  .heading[data-level='4'] {
31
- font-family: var(--pm-text-md-family);
32
+ font-family: var(--pm-text-xl-family);
32
33
  font-size: var(--pm-text-md-size);
33
34
  font-weight: var(--pm-text-xl-weight);
34
35
  line-height: var(--pm-text-md-line-height);
@@ -59,9 +59,11 @@
59
59
  }
60
60
  }
61
61
 
62
+ /* The lede is a paragraph, not a heading, so it takes the body slot's family
63
+ at the `text.lg` size: `text.lg` draws in the heading slot. */
62
64
  .lede {
63
65
  margin: 0;
64
- font-family: var(--pm-text-lg-family);
66
+ font-family: var(--pm-text-md-family);
65
67
  font-size: var(--pm-text-lg-size);
66
68
  font-weight: var(--pm-text-lg-weight);
67
69
  line-height: var(--pm-text-lg-line-height);
@@ -44,6 +44,13 @@
44
44
  color: var(--pm-text-muted);
45
45
  }
46
46
 
47
+ /* The trend chip's place while the number loads: Badge's own box, with no
48
+ colour, around a Skeleton of the chip's line. The chip is taller than the
49
+ label beside it, so the box keeps the label row at the chip's height. */
50
+ .trendPlaceholder {
51
+ composes: badge from './badge.module.css';
52
+ }
53
+
47
54
  /* Number at the start and spark at the end, baseline-aligned so the spark reads
48
55
  as a note *on* the number. */
49
56
  .valueRow {
@@ -302,15 +302,16 @@ function renderSystemCard(registry, options = {}) {
302
302
  write("");
303
303
  }
304
304
  write("## Platforms", "", "On a platform a member is native (its own form, from the platform’s primitives),", "adapted (rendered another way) or absent (use the substitute). `get_system_card` and", "`search_components` take a `platform`; a screen spec names one.", "", ...platformLines(registry), "");
305
- write("## Icon roles", "", `Closed enum of *meanings*, never glyph names. Sizes: ${registry.icons.sizes.join(", ")}.`, "", registry.icons.roles.map((role) => role.name).join(", ") + ".", "", "## Theme — systems, palettes, pairings", "", "A **system** is the structural personality: the eight axes below, three font", "slots, presentation defaults. A **palette** is the colour voice: accent hue,", "optional gradient partner, neutral tint, chroma budget. A **pairing** is one of", "each, worn by the DOM (`data-system` + `data-palette`); every palette is lawful", "on every system, and everything else derives from those decisions.", "", "**Axes.**", "");
305
+ write("## Icon roles", "", `Closed enum of *meanings*, never glyph names. Sizes: ${registry.icons.sizes.join(", ")}.`, "", registry.icons.roles.map((role) => role.name).join(", ") + ".", "", "## Theme — systems, palettes, pairings", "", "A **system** is the structural personality: the eight axes below, four font", "slots (heading optional), presentation defaults. A **palette** is the colour voice: accent hue,", "optional gradient partner, neutral tint, chroma budget. A **pairing** is one of", "each, worn by the DOM (`data-system` + `data-palette`); every palette is lawful", "on every system, and everything else derives from those decisions.", "", "**Axes.**", "");
306
306
  for (const axis of registry.theme.axes) {
307
307
  const exposed = axis.exposed ? " *(exposed to recipes as a flag)*" : "";
308
308
  write(`- **${axis.name}** — ${axis.values.join(" | ")}${exposed}`);
309
309
  }
310
- write("", "**Systems.** `(kind, mode) — default palette · axes` in the order above.", "");
310
+ write("", "**Systems.** `(kind, mode) — default palette · axes` in the order above. No mode: it follows the device.", "");
311
311
  for (const system of registry.theme.systems) {
312
312
  const axes = registry.theme.axes.map((axis) => system.axes[axis.name]).join(", ");
313
- write(`- **${system.name}** (${system.kind}, ${system.defaultMode}) — ${system.defaultPalette} · ${axes}`);
313
+ const mode = system.defaultMode === "system" ? "" : `, ${system.defaultMode}`;
314
+ write(`- **${system.name}** (${system.kind}${mode}) — ${system.defaultPalette} · ${axes}`);
314
315
  }
315
316
  write("", "**Palettes.**", "");
316
317
  for (const palette of registry.theme.palettes) {
@@ -295,5 +295,32 @@ function vueBinding(prop) {
295
295
  name: prop.name
296
296
  };
297
297
  }
298
+ /**
299
+ * The controlled props of a member or a part, each with the event prop that
300
+ * reports its change: `open` with `onOpenChange`, and `value` with
301
+ * `onChange` where the member has no `onValueChange`. A controlled prop is a
302
+ * value prop, not an event or a slot (`vueBinding`). `props` are the member's
303
+ * own props, without a part's dotted ones.
304
+ *
305
+ * An element follows the reader through these pairs
306
+ * (`packages/shells/src/elements.ts`), and so does a screen drawn at run time
307
+ * (`@polymorph/screen`), so the two read one rule.
308
+ */
309
+ function controlledProps(props) {
310
+ const values = [];
311
+ const events = /* @__PURE__ */ new Set();
312
+ for (const prop of props) {
313
+ const { kind } = vueBinding(prop);
314
+ if (kind === "event") events.add(prop.name);
315
+ else if (kind === "prop" || kind === "scoped-slot") values.push(prop.name);
316
+ }
317
+ const controlled = {};
318
+ for (const name of values) {
319
+ const change = `on${name.charAt(0).toUpperCase()}${name.slice(1)}Change`;
320
+ if (events.has(change)) controlled[name] = change;
321
+ else if (name === "value" && events.has("onChange")) controlled[name] = "onChange";
322
+ }
323
+ return controlled;
324
+ }
298
325
  //#endregion
299
- export { DEFAULT_FRAMEWORK, FRAMEWORKS, FRAMEWORK_ENTRY, FRAMEWORK_EXTENSIONS, FRAMEWORK_FOUNDATION, FRAMEWORK_NAMES, FRAMEWORK_STATUSES, FRAMEWORK_VOCABULARY, MAPPED_FRAMEWORKS, codeFrameworkOf, frameworkOfPath, shippedParts, unionParts, vueBinding };
326
+ export { DEFAULT_FRAMEWORK, FRAMEWORKS, FRAMEWORK_ENTRY, FRAMEWORK_EXTENSIONS, FRAMEWORK_FOUNDATION, FRAMEWORK_NAMES, FRAMEWORK_STATUSES, FRAMEWORK_VOCABULARY, MAPPED_FRAMEWORKS, codeFrameworkOf, controlledProps, frameworkOfPath, shippedParts, unionParts, vueBinding };