@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.
- package/CHANGELOG.md +242 -0
- package/dist/design/systems/desktop.json +1 -1
- package/dist/design/systems/dew.json +1 -1
- package/dist/design/systems/flint.json +1 -1
- package/dist/design/systems/glassmorphic.json +1 -1
- package/dist/design/systems/harbor.json +1 -1
- package/dist/design/systems/journal.json +1 -1
- package/dist/design/systems/pastel.json +1 -1
- package/dist/design/systems/pebble.json +1 -1
- package/dist/design/systems/plain.json +1 -1
- package/dist/design/systems/pop.json +1 -1
- package/dist/design/systems/press.json +1 -1
- package/dist/packages/angular-ui/src/ai/ArtifactPane.ts +15 -4
- package/dist/packages/angular-ui/src/ai/PromptInput.ts +3 -1
- package/dist/packages/angular-ui/src/archetypes/Dashboard.ts +38 -20
- package/dist/packages/angular-ui/src/archetypes/dashboard.states.ts +52 -0
- package/dist/packages/angular-ui/src/controls/ColorInput.ts +62 -34
- package/dist/packages/angular-ui/src/controls/Combobox.ts +28 -7
- package/dist/packages/angular-ui/src/controls/DatePicker.ts +12 -11
- package/dist/packages/angular-ui/src/controls/DateRangePicker.ts +22 -17
- package/dist/packages/angular-ui/src/controls/DateRangePickerRangeCalendar.ts +3 -2
- package/dist/packages/angular-ui/src/controls/FileUpload.ts +18 -12
- package/dist/packages/angular-ui/src/controls/FileUploadRow.ts +24 -4
- package/dist/packages/angular-ui/src/controls/MultiSelect.ts +49 -12
- package/dist/packages/angular-ui/src/controls/NumberInput.ts +27 -3
- package/dist/packages/angular-ui/src/controls/PhoneInput.ts +9 -5
- package/dist/packages/angular-ui/src/controls/Select.ts +36 -7
- package/dist/packages/angular-ui/src/controls/TagInput.ts +61 -7
- package/dist/packages/angular-ui/src/controls/TimeInput.ts +15 -1
- package/dist/packages/angular-ui/src/controls/select.states.ts +79 -58
- package/dist/packages/angular-ui/src/overlays/Command.ts +50 -13
- package/dist/packages/angular-ui/src/overlays/CommandPanel.ts +11 -7
- package/dist/packages/angular-ui/src/overlays/ToastViewport.ts +1 -1
- package/dist/packages/angular-ui/src/structure/CodeBlock.ts +18 -4
- package/dist/packages/angular-ui/src/structure/Stat.ts +295 -84
- package/dist/packages/angular-ui/src/structure/stat.states.ts +116 -0
- package/dist/packages/cli/src/agents.js +4 -3
- package/dist/packages/cli/src/apply.js +43 -18
- package/dist/packages/cli/src/check.js +4 -0
- package/dist/packages/cli/src/cli.js +6 -2
- package/dist/packages/cli/src/elements.js +12 -2
- package/dist/packages/cli/src/emit.js +43 -8
- package/dist/packages/cli/src/readings.js +29 -3
- package/dist/packages/cli/src/skills/bridge.js +1197 -0
- package/dist/packages/cli/src/skills/facts.js +190 -0
- package/dist/packages/cli/src/skills/native.js +1580 -0
- package/dist/packages/cli/src/skills/rules.js +199 -0
- package/dist/packages/cli/src/skills/runtime.js +1020 -0
- package/dist/packages/cli/src/skills/screen-charts.js +334 -0
- package/dist/packages/cli/src/skills/screen-chat.js +247 -0
- package/dist/packages/cli/src/skills/screen-code.js +565 -0
- package/dist/packages/cli/src/skills/screen-rich-text.js +305 -0
- package/dist/packages/cli/src/skills/screen.js +378 -0
- package/dist/packages/cli/src/skills/setup-packages.js +307 -0
- package/dist/packages/cli/src/skills/setup.js +125 -0
- package/dist/packages/cli/src/skills/theme-documents.js +351 -0
- package/dist/packages/cli/src/skills/theme.js +208 -0
- package/dist/packages/cli/src/skills.js +13 -794
- package/dist/packages/cli/src/theme.js +42 -1
- package/dist/packages/cli/src/tool-verbs.js +19 -4
- package/dist/packages/cli/src/verbs.js +28 -2
- package/dist/packages/elements-ui/dist/cdn/chunks/{AppShellUserCard-0eCCnnN_.js → AppShellUserCard-XT4br4fr.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{AreaChart-DftfzLG0.js → AreaChart-CXNFfbJ8.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ArtifactPane-Pr9_K2uM.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{Avatar-DcdMgxgY.js → Avatar-3WXoBPLv.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Avatar-DcuvZwe7.js → Avatar-BKqjM8qW.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{AvatarButton-D5XKVduu.js → AvatarButton-BasMQCSM.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{AvatarGroup-DgFwJUNO.js → AvatarGroup-COch2-O0.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{BarChart-myuR0aHc.js → BarChart-ugae8zfr.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{ChatMessage-CgQ1h_JP.js → ChatMessage-Bx4yrF2x.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-B_e5ma3K.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-Fgtr48Vb.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/ColorInput-CD7rsWRp.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/Combobox-CUw7z6TS.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{Combobox-DB2FT7so.js → Combobox-hWIFU9X_.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Command-BXgqRd3I.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{ConfirmDialog-BtQOAHY2.js → ConfirmDialog-CAaBRKxl.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Dashboard-ChMPH4_Q.js → Dashboard-DwNw5Wnd.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/DatePicker-DjqtswQR.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/DateRangePicker-LsXFHOzm.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{DonutChart-BEK89BeL.js → DonutChart-DYXx6eTe.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/FileUpload-3gbZTSSx.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{FormField-PlLLDKqc.js → FormField-Bvw4cLBc.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{FormField-C6L3vYp4.js → FormField-DzhcinED.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{FunnelChart-DVQz_gad.js → FunnelChart-D24XhrGw.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Heading-fAcu6Vrw.js → Heading-Cvfyu8pc.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Heading-CgzEi9OQ.js → Heading-XDJzlwt9.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Heatmap-BRwR-n-V.js → Heatmap-BQoUS6gY.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Hero-CV2YWeb4.js → Hero-CXuuFceS.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Histogram-CCYwlinB.js → Histogram-DW_ZPHpR.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{LineChart-BH6Pq1P1.js → LineChart-kf-zlNWe.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Markdown-DmZEch4i.js → Markdown-C3rjhIbt.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ModeSwitch-DQ86CK9h.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/MultiSelect-DbSx9QtV.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/NumberInput-B4ZZOGLl.js +7 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/PhoneInput-BsMfbNi6.js +210 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/PromptInput-l_-zAXSZ.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{RadarChart-Coje7Sb0.js → RadarChart-CwJAWRki.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{RichTextContent-CufjptHF.js → RichTextContent-D51UfuWk.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{RichTextInput-Dz7yBFUA.js → RichTextInput-B32fN_p9.js} +3 -3
- package/dist/packages/elements-ui/dist/cdn/chunks/{ScatterChart-Do5tQTC5.js → ScatterChart-Mps7l5-i.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Select-CpsRP0NR.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-CXR6bP7X.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-DGcx2ZZq.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/TagInput-BhkLU4gE.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/TimeInput-r2jNTOLN.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{Toast-CAYGbn7g.js → Toast-BTfcZn0I.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{ToastViewport-CFslglYc.js → ToastViewport-BBQMRCQT.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{ToolCall-DUCoKsoE.js → ToolCall-DNU5kk9_.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Treemap-Bh3ruYGJ.js → Treemap-BV8TlZHB.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/agent-DfOqpL9c.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/api-DJBiUXxK.js +4 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/avatar.module-D4YdFevY.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/cap-DA71oFHt.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{cartesian-I5uPfyqv.js → cartesian-CEn2lJCc.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{chart-annotations.module-xUExw4pu.js → chart-annotations.module-hA_KO_Pe.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-brush.module-C_8txUW5.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-twin.module-BpfyTQ9R.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/check-CHvc4yHL.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/css-vars-DeZ4TCna.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/draw-BiQ3Of6N.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/drawing-nhJNBahV.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/field-labels-Df5HuYC5.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/frame-CtTY4oCn.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/on-call-YKLF3-FH.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/runtime-QRQ3CjZg.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/series-uUg6_JtL.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/src-XnWjGSDr.js +67 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/toast-pwGvxH2T.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/urls-Qks0KJ_p.js +6 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/webmcp-Dro53ATH.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/polymorph-all.js +52 -50
- package/dist/packages/elements-ui/dist/cdn/polymorph.css +1 -1
- package/dist/packages/elements-ui/dist/cdn/polymorph.js +1 -1
- package/dist/packages/elements-ui/dist/cdn/prepaint.js +1 -1
- package/dist/packages/elements-ui/dist/cdn/themes/desktop.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/dew.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/flint.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/glassmorphic.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/harbor.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/journal.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/pastel.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/pebble.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/plain.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/pop.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/press.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/terminal.css +5 -4
- package/dist/packages/elements-ui/src/ai/ArtifactPane.ts +2 -0
- package/dist/packages/elements-ui/src/archetypes/dashboard.states.ts +9 -0
- package/dist/packages/elements-ui/src/controls/ColorInput.ts +2 -0
- package/dist/packages/elements-ui/src/controls/NumberInput.ts +2 -0
- package/dist/packages/elements-ui/src/controls/TagInput.ts +4 -0
- package/dist/packages/elements-ui/src/controls/TimeInput.ts +2 -0
- package/dist/packages/elements-ui/src/controls/select.states.ts +10 -0
- package/dist/packages/elements-ui/src/overlays/Command.ts +2 -0
- package/dist/packages/elements-ui/src/structure/CodeBlock.ts +5 -2
- package/dist/packages/elements-ui/src/structure/Stat.ts +6 -0
- package/dist/packages/elements-ui/src/structure/stat.states.ts +33 -0
- package/dist/packages/mcp/src/propose.js +92 -15
- package/dist/packages/mcp/src/server.js +19 -8
- package/dist/packages/mcp/src/tools.js +80 -5
- package/dist/packages/mcp/src/write.js +95 -13
- package/dist/packages/react-ui/src/ai/ArtifactPane.tsx +5 -2
- package/dist/packages/react-ui/src/ai/PromptInput.tsx +5 -2
- package/dist/packages/react-ui/src/archetypes/dashboard.states.tsx +28 -0
- package/dist/packages/react-ui/src/controls/ColorInput.tsx +69 -13
- package/dist/packages/react-ui/src/controls/Combobox.tsx +13 -5
- package/dist/packages/react-ui/src/controls/DatePicker.tsx +3 -0
- package/dist/packages/react-ui/src/controls/DateRangePicker.tsx +22 -5
- package/dist/packages/react-ui/src/controls/FileUpload.tsx +2 -0
- package/dist/packages/react-ui/src/controls/MultiSelect.tsx +30 -6
- package/dist/packages/react-ui/src/controls/NumberInput.tsx +19 -1
- package/dist/packages/react-ui/src/controls/PhoneInput.tsx +3 -3
- package/dist/packages/react-ui/src/controls/Select.tsx +59 -23
- package/dist/packages/react-ui/src/controls/TagInput.tsx +43 -10
- package/dist/packages/react-ui/src/controls/TimeInput.tsx +10 -0
- package/dist/packages/react-ui/src/controls/date-segments.tsx +16 -0
- package/dist/packages/react-ui/src/controls/select.states.tsx +13 -0
- package/dist/packages/react-ui/src/overlays/Command.tsx +23 -2
- package/dist/packages/react-ui/src/overlays/Toaster.tsx +2 -2
- package/dist/packages/react-ui/src/structure/CodeBlock.tsx +7 -3
- package/dist/packages/react-ui/src/structure/Stat.tsx +90 -13
- package/dist/packages/react-ui/src/structure/stat.states.tsx +68 -0
- package/dist/packages/recipes/src/ai/artifact-pane.module.css +4 -4
- package/dist/packages/recipes/src/controls/rich-text-input.module.css +1 -1
- package/dist/packages/recipes/src/structure/avatar.module.css +3 -1
- package/dist/packages/recipes/src/structure/heading.module.css +5 -4
- package/dist/packages/recipes/src/structure/hero.module.css +3 -1
- package/dist/packages/recipes/src/structure/stat.module.css +7 -0
- package/dist/packages/registry/src/card.js +4 -3
- package/dist/packages/registry/src/frameworks.js +28 -1
- package/dist/packages/registry/src/runtime-card.js +300 -0
- package/dist/packages/registry/src/runtime-members.js +176 -0
- package/dist/packages/registry/src/screen-table.js +166 -0
- package/dist/packages/rules/package.js +1 -1
- package/dist/packages/solid-ui/src/ai/ArtifactPane.tsx +11 -3
- package/dist/packages/solid-ui/src/ai/PromptInput.tsx +3 -1
- package/dist/packages/solid-ui/src/archetypes/Dashboard.tsx +3 -0
- package/dist/packages/solid-ui/src/archetypes/dashboard.states.tsx +39 -0
- package/dist/packages/solid-ui/src/controls/ColorInput.tsx +38 -17
- package/dist/packages/solid-ui/src/controls/Combobox.tsx +27 -6
- package/dist/packages/solid-ui/src/controls/DatePicker.tsx +12 -11
- package/dist/packages/solid-ui/src/controls/DateRangePicker.tsx +21 -16
- package/dist/packages/solid-ui/src/controls/DateRangePickerRangeCalendar.tsx +3 -4
- package/dist/packages/solid-ui/src/controls/FileUpload.tsx +1 -0
- package/dist/packages/solid-ui/src/controls/FileUploadRow.tsx +6 -0
- package/dist/packages/solid-ui/src/controls/MultiSelect.tsx +51 -11
- package/dist/packages/solid-ui/src/controls/NumberInput.tsx +21 -2
- package/dist/packages/solid-ui/src/controls/PhoneInput.tsx +8 -4
- package/dist/packages/solid-ui/src/controls/Select.tsx +37 -6
- package/dist/packages/solid-ui/src/controls/TagInput.tsx +26 -5
- package/dist/packages/solid-ui/src/controls/TimeInput.tsx +10 -1
- package/dist/packages/solid-ui/src/controls/select.states.tsx +18 -0
- package/dist/packages/solid-ui/src/overlays/Command.tsx +15 -2
- package/dist/packages/solid-ui/src/overlays/CommandPanel.tsx +7 -7
- package/dist/packages/solid-ui/src/overlays/ToastViewport.tsx +1 -1
- package/dist/packages/solid-ui/src/structure/CodeBlock.tsx +9 -5
- package/dist/packages/solid-ui/src/structure/Stat.tsx +86 -25
- package/dist/packages/solid-ui/src/structure/stat.states.tsx +73 -0
- package/dist/packages/svelte-ui/src/ai/ArtifactPane.svelte +8 -2
- package/dist/packages/svelte-ui/src/ai/PromptInput.svelte +3 -1
- package/dist/packages/svelte-ui/src/archetypes/Dashboard.svelte +3 -0
- package/dist/packages/svelte-ui/src/archetypes/dashboard.states.svelte +2 -0
- package/dist/packages/svelte-ui/src/controls/ColorInput.svelte +29 -8
- package/dist/packages/svelte-ui/src/controls/Combobox.svelte +26 -5
- package/dist/packages/svelte-ui/src/controls/DatePicker.svelte +7 -5
- package/dist/packages/svelte-ui/src/controls/DateRangePicker.svelte +15 -9
- package/dist/packages/svelte-ui/src/controls/DateRangePickerRangeCalendar.svelte +3 -2
- package/dist/packages/svelte-ui/src/controls/FileUpload.svelte +1 -0
- package/dist/packages/svelte-ui/src/controls/FileUploadRow.svelte +8 -1
- package/dist/packages/svelte-ui/src/controls/MultiSelect.svelte +36 -10
- package/dist/packages/svelte-ui/src/controls/NumberInput.svelte +14 -1
- package/dist/packages/svelte-ui/src/controls/PhoneInput.svelte +3 -3
- package/dist/packages/svelte-ui/src/controls/Select.svelte +20 -6
- package/dist/packages/svelte-ui/src/controls/TagInput.svelte +21 -3
- package/dist/packages/svelte-ui/src/controls/TimeInput.svelte +11 -1
- package/dist/packages/svelte-ui/src/controls/select.states.svelte +26 -24
- package/dist/packages/svelte-ui/src/overlays/Command.svelte +13 -1
- package/dist/packages/svelte-ui/src/overlays/CommandPanel.svelte +11 -6
- package/dist/packages/svelte-ui/src/overlays/ToastViewport.svelte +1 -1
- package/dist/packages/svelte-ui/src/structure/CodeBlock.svelte +7 -2
- package/dist/packages/svelte-ui/src/structure/Stat.svelte +70 -17
- package/dist/packages/svelte-ui/src/structure/stat.states.svelte +27 -0
- package/dist/packages/theme/src/admit.js +6 -3
- package/dist/packages/theme/src/color/resolve.js +19 -2
- package/dist/packages/theme/src/derive.js +13 -6
- package/dist/packages/theme/src/emit.js +1 -1
- package/dist/packages/theme/src/runtime.js +58 -0
- package/dist/packages/theme/src/seeds.js +30 -4
- package/dist/packages/theme/src/systems.js +1 -1
- package/dist/packages/theme/src/tokens.js +15 -6
- package/dist/packages/vue-ui/src/ai/ArtifactPane.vue +11 -2
- package/dist/packages/vue-ui/src/ai/PromptInput.vue +3 -1
- package/dist/packages/vue-ui/src/archetypes/Dashboard.vue +3 -0
- package/dist/packages/vue-ui/src/archetypes/dashboard.states.ts +49 -0
- package/dist/packages/vue-ui/src/controls/ColorInput.vue +33 -12
- package/dist/packages/vue-ui/src/controls/Combobox.vue +26 -5
- package/dist/packages/vue-ui/src/controls/DatePicker.vue +12 -11
- package/dist/packages/vue-ui/src/controls/DateRangePicker.vue +20 -15
- package/dist/packages/vue-ui/src/controls/DateRangePickerRangeCalendar.vue +3 -4
- package/dist/packages/vue-ui/src/controls/FileUpload.vue +1 -0
- package/dist/packages/vue-ui/src/controls/FileUploadRow.vue +6 -0
- package/dist/packages/vue-ui/src/controls/MultiSelect.vue +37 -10
- package/dist/packages/vue-ui/src/controls/NumberInput.vue +17 -1
- package/dist/packages/vue-ui/src/controls/PhoneInput.vue +7 -3
- package/dist/packages/vue-ui/src/controls/Select.vue +22 -7
- package/dist/packages/vue-ui/src/controls/TagInput.vue +21 -3
- package/dist/packages/vue-ui/src/controls/TimeInput.vue +10 -1
- package/dist/packages/vue-ui/src/controls/select.states.ts +17 -0
- package/dist/packages/vue-ui/src/overlays/Command.vue +13 -1
- package/dist/packages/vue-ui/src/overlays/CommandPanel.vue +7 -7
- package/dist/packages/vue-ui/src/overlays/ToastViewport.vue +1 -1
- package/dist/packages/vue-ui/src/structure/CodeBlock.vue +7 -2
- package/dist/packages/vue-ui/src/structure/Stat.vue +71 -18
- package/dist/packages/vue-ui/src/structure/stat.states.ts +67 -0
- package/dist/platforms/android/ui/src/generated/kotlin/dev/polymorph/ui/Contracts.kt +144 -33
- package/dist/platforms/android/ui/src/generated/kotlin/dev/polymorph/ui/Members.kt +17 -7
- package/dist/platforms/ios/Sources/PolymorphUI/Generated/Contracts.swift +204 -31
- package/dist/registry/registry.json +371 -75
- package/dist/screen/assets/{screen-CuQbskb8.css → screen-B22PTPwF.css} +1 -1
- package/dist/screen/assets/screen-Cpbh7XMb.js +372 -0
- package/dist/screen/screen.html +3 -3
- package/package.json +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ArtifactPane-DsmRlr6d.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-BqP8HZKM.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-D8VARz0a.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ColorInput-BrzZOVeL.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Combobox-BiUq0h-w.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Command-hmxVRdFg.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/DatePicker-C8prGbJ2.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/DateRangePicker-CO1ioqwN.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/FileUpload-HPQe-ttb.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ModeSwitch-CerqbGv3.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/MultiSelect-CQq7jPgI.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/NumberInput-Dre9GwBy.js +0 -7
- package/dist/packages/elements-ui/dist/cdn/chunks/PhoneInput-D6_J6Es_.js +0 -210
- package/dist/packages/elements-ui/dist/cdn/chunks/PromptInput-BXcsUQ5W.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Select-DxGQgv2q.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-FsMUWigK.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-WS8v6BQv.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/TagInput-D-uIQEGS.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/TimeInput-Dho571vA.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/agent-DBDk4wLH.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/api-B9sGZiYn.js +0 -4
- package/dist/packages/elements-ui/dist/cdn/chunks/avatar.module-CQwnWhWo.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/cap-Ct4k7zNC.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-brush.module-DycBfben.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-twin.module-Cks7VwS5.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/check-dOfCSYFA.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/draw-DclRgiWM.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/drawing-DjkZr0z8.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/frame-BSvl4y47.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/on-call-Jk1sYJc_.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/receivers-BpRfF6dV.js +0 -4
- package/dist/packages/elements-ui/dist/cdn/chunks/series-C_1TNd2n.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/src-Bub3C9YP.js +0 -67
- package/dist/packages/elements-ui/dist/cdn/chunks/toast-AarMGYJn.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/webmcp-eEPzSqph.js +0 -1
- package/dist/screen/assets/screen-Clj2u6_s.js +0 -372
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,247 @@
|
|
|
1
1
|
# @polymorph/tools
|
|
2
2
|
|
|
3
|
+
## 1.0.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f51f471: The skills that `polymorph agents` writes, and that the plugin carries, cover more of the system.
|
|
8
|
+
Three skills are new: `polymorph-runtime-screen` (a screen a model writes while the product runs),
|
|
9
|
+
`polymorph-agent-bridge` (an agent on the page that reads and operates the members) and
|
|
10
|
+
`polymorph-native` (a SwiftUI or Compose screen). `polymorph-screen` gains references for a screen
|
|
11
|
+
written in code and its container, a conversation with a model, charts and formatted text.
|
|
12
|
+
`polymorph-setup` holds the packages route step by step, and `polymorph-theme` covers the theme
|
|
13
|
+
documents, pins, a partner palette and `theme emit`. The block in `AGENTS.md` lists each skill with
|
|
14
|
+
the job it is for. Run `polymorph agents` again to take the new files.
|
|
15
|
+
|
|
16
|
+
`polymorph component <Name>` prints, under `## Types`, the fields of each data type the member's
|
|
17
|
+
props name, and the tool `get_component` answers them as `types`: a prop typed `PromptTrigger[]`
|
|
18
|
+
can be written from that one reading. `polymorph check` over a directory with no file the red
|
|
19
|
+
rules read ends by saying that no file was read. It used to end "No violations.".
|
|
20
|
+
|
|
21
|
+
`polymorph update` compiles the theme sheets again when a vendored system or palette was edited,
|
|
22
|
+
as the generated theme module says it does. It used to answer "nothing to update" while no file
|
|
23
|
+
had changed upstream. `polymorph update --force` compiles the sheets from the shipped documents it
|
|
24
|
+
puts back. It used to leave the sheet compiled from the edited copy.
|
|
25
|
+
|
|
26
|
+
- 92cccc2: The date and time fields and `ArtifactPane` take the words they said to a screen reader in English
|
|
27
|
+
whatever the page's language. Each is optional; left out, every member says what it said before.
|
|
28
|
+
|
|
29
|
+
- `DatePicker`'s and `DateRangePicker`'s `messages` take `empty`, what an unfilled segment says as
|
|
30
|
+
its value, and `DateRangePicker`'s also take `start` and `end`, the names of its two halves.
|
|
31
|
+
`TimeInput` takes `messages` (`TimeInputMessages`, exported, `{ empty }`), as `MonthInput` does.
|
|
32
|
+
On React the defaults stay React Aria's words ("Empty", "Start Date", "End Date"), which React
|
|
33
|
+
Aria says in the page's locale; in Vue, Svelte, Solid, Angular and the elements they are
|
|
34
|
+
"Empty", "Start date" and "End date". A host that already passes `messages` to the pickers needs
|
|
35
|
+
nothing more for the words it passes; add `empty`, `start` and `end` to its catalogue to say
|
|
36
|
+
those in its language too.
|
|
37
|
+
- `ArtifactPane` takes `streamingLabel`, what its spinner says while the artifact is being
|
|
38
|
+
written, "{title}: still being written" by default, on every web renderer and on SwiftUI and
|
|
39
|
+
Compose, which say the string catalogue's sentence when it is left out, as before.
|
|
40
|
+
|
|
41
|
+
The SwiftUI and Compose contracts carry the new `messages` fields and `TimeInput`'s `messages`.
|
|
42
|
+
The native date and time fields say no value while empty, so they do not draw `empty`, and the
|
|
43
|
+
SwiftUI range field names each of its two dates with `start` or `end`. `ArtifactPane`'s purpose
|
|
44
|
+
on the cards is "A side pane for one artifact a turn produced", and `DateRangePicker`'s "A date
|
|
45
|
+
range _field_: two segmented dates and a calendar popup".
|
|
46
|
+
|
|
47
|
+
- d017458: `Command` takes `spoken`, the words its status region says while the commands load and once some
|
|
48
|
+
are shown, as a function of `{ loading, count }` (its type is exported as `CommandSpoken`). Every
|
|
49
|
+
web framework and `<poly-command>` said "Loading commands…" and "4 commands" in English whatever
|
|
50
|
+
the page's language. Pass `spoken` to say both in the app's words and number grammar; left out,
|
|
51
|
+
the words are the same as before, and with nothing shown the region still says `emptyMessage`.
|
|
52
|
+
`<poly-command>` takes it as a property. Command has no SwiftUI or Compose rendering, so nothing
|
|
53
|
+
changes there.
|
|
54
|
+
|
|
55
|
+
`CodeBlock` takes `copiedLabel`, what a screen reader hears after a copy, as `CopyButton` does.
|
|
56
|
+
Every web framework and `<poly-code-block>` said "Copied" in English. Left out, it is "Copied" as
|
|
57
|
+
before. The SwiftUI and Compose CodeBlocks take it too, and announce the string catalogue's
|
|
58
|
+
"Copied" when it is left out, as before. In Kotlin, `PMCodeBlock` and `PMCodeBlockProps` take
|
|
59
|
+
`copiedLabel` second, after `children`, so a call that passed `copyable`, `copyLabel` or `label`
|
|
60
|
+
by position names them.
|
|
61
|
+
|
|
62
|
+
The screen skill's reference names `spoken` and `copiedLabel` among the words a member takes; run
|
|
63
|
+
`polymorph agents` again to take it.
|
|
64
|
+
|
|
65
|
+
- de9bd89: **A system's `defaultMode` now decides the mode of a reader who has not chosen one.** A guest
|
|
66
|
+
system whose document says `"defaultMode": "light"` or `"dark"` opens a first visit in that mode,
|
|
67
|
+
where it followed the device before. To keep following the device, write
|
|
68
|
+
`"defaultMode": "system"` in the system document. A reader's own choice (`setMode`, a
|
|
69
|
+
`ModeSwitch`) is stored and wins, as before.
|
|
70
|
+
|
|
71
|
+
- Every house system that said `light` now says `system`, so it follows the device on a first
|
|
72
|
+
visit, as it did. `terminal` says `dark`, and a first visit to a page wearing it opens dark.
|
|
73
|
+
- `hydrateTheme(fallbackSystem, installed)` applies the worn system's default when no mode is
|
|
74
|
+
stored, and no longer stores a mode on the first hydration. `InstalledCatalogue` takes an
|
|
75
|
+
optional `modes`, each system's `defaultMode`; without it every system follows the device. A
|
|
76
|
+
reader for whom an earlier release stored `system` on the first hydration keeps following the
|
|
77
|
+
device. `setSystem` moves an unchosen mode to the new system's default. `getModePreference`,
|
|
78
|
+
`readMode`, `useMode` and `ModeSwitch` show the default as the current preference.
|
|
79
|
+
- `prepaintScript({ modes, system })` in `@polymorph/engine/runtime` builds the pre-paint script
|
|
80
|
+
for a page that knows its systems' default modes, so a system that opens dark does not paint
|
|
81
|
+
light first. `PREPAINT_SCRIPT` stays the script that follows the device. The Vite plugin
|
|
82
|
+
(`@polymorph/engine/vite`) inlines the built script, and `virtual:polymorph/theme`'s `catalogue`
|
|
83
|
+
carries `modes`.
|
|
84
|
+
- `polymorph add theme:<system>` and `polymorph update` build the script from the installed
|
|
85
|
+
systems' documents, patch it into `index.html`, and write it as `themes/prepaint.ts`, which a
|
|
86
|
+
Next.js root layout imports in place of `PREPAINT_SCRIPT`. The theme module's catalogue carries
|
|
87
|
+
`modes`. Run `polymorph update` to take both.
|
|
88
|
+
- `prepaint.js` for a page with no build, and the page `polymorph init --framework elements`
|
|
89
|
+
writes, carry the house systems' default modes.
|
|
90
|
+
- On iOS and Android, `theme.preferredColorScheme` and `theme.preferredDark` read the same field,
|
|
91
|
+
so they are `nil` and null for every house pairing but `terminal_petrol`. An app that passes the
|
|
92
|
+
preferred mode for one of them follows the device where it was held light.
|
|
93
|
+
|
|
94
|
+
- 2ddbed9: A page names a member for its agent policy with a key that stays the same in every language and
|
|
95
|
+
on every mount. The page writes `data-agent-key` on an element around the member, or on a
|
|
96
|
+
`poly-*` element itself, and the policy reads `keys`: the key of that element and of each element
|
|
97
|
+
around it, the nearest first. `policy.hide`, `policy.deny`, `confirm`'s request and the change
|
|
98
|
+
event's detail carry `keys`; no snapshot, query, step result or tool output does. No member takes
|
|
99
|
+
a new prop, so every renderer reads keys alike. `AGENT_KEY_ATTRIBUTE` from
|
|
100
|
+
`@polymorph/engine/agent` names the attribute.
|
|
101
|
+
|
|
102
|
+
`registerWebMCPOnCall({ bridge })` runs the WebMCP tools on a bridge the page already has, such as
|
|
103
|
+
its assistant's, or on the one a function returns when the first tool call arrives, so the page
|
|
104
|
+
can load that bridge on its first use. Unregistering removes the tools and leaves that bridge as it
|
|
105
|
+
is. `registerWebMCPOnCall(load, options)` creates and disposes of its own bridge as before.
|
|
106
|
+
|
|
107
|
+
`@polymorph/engine/webmcp` exports `AGENT_TOOL_DEFINITIONS`, the three tools' names, titles,
|
|
108
|
+
descriptions, input schemas and hints, so a page's assistant can send its model the tools before
|
|
109
|
+
it loads the bridge.
|
|
110
|
+
|
|
111
|
+
The `polymorph-agent-bridge` skill uses all three: a policy that names a member by its key, one
|
|
112
|
+
bridge shared by the assistant and WebMCP with no stand-in module, and the definitions sent before
|
|
113
|
+
the bridge loads.
|
|
114
|
+
|
|
115
|
+
- d67d9c6: Four additions to run-time screens, a screen a model writes and a host draws while it runs.
|
|
116
|
+
|
|
117
|
+
- **`checkAnswer(text, options)`** (`@polymorph/screen/check`, and bound to the elements in
|
|
118
|
+
`@polymorph/elements-ui/screen` and `loadScreen()`) checks a model's whole answer as text. An
|
|
119
|
+
answer that ended before its document did, most often at the model's output limit, is a fault
|
|
120
|
+
at `$` whose words ask for the whole document again. Calling `parsePartial` and then
|
|
121
|
+
`checkScreen` passed such an answer when what had arrived was lawful as far as it went, so a
|
|
122
|
+
host that checked that way should call `checkAnswer` once the answer has ended. `checkScreen`
|
|
123
|
+
is unchanged for a host that holds a parsed document. `<poly-screen>`'s `check()` gives
|
|
124
|
+
`checkAnswer`'s faults for its `text` once `streaming` is off.
|
|
125
|
+
- **`parsePartial` returns the model's prose**: `prose`, the text outside the block that holds the
|
|
126
|
+
document, found by the same reading, and `fence`, `open` or `closed`. A host that copied a
|
|
127
|
+
helper to take the prose can use the field. A last line that begins with code (`` `name` is … ``)
|
|
128
|
+
no longer holds back a document written with no fence.
|
|
129
|
+
- **`addresses: 'refused'`** refuses every address and keeps the members that do without one. The
|
|
130
|
+
card (`runtimeCard`), the checks (`checkScreen`, `checkAnswer`) and the walk (`createScreen`)
|
|
131
|
+
take it as an option, `ScreenView` as its `addresses` prop and `<poly-screen>` as its
|
|
132
|
+
`addresses` attribute or property. The card lists no prop that takes an address, the check
|
|
133
|
+
reports each one a document writes or binds, and the renderers pass none. A member that cannot
|
|
134
|
+
be drawn without an address (`Link`, `Image`, `AudioPlayer`, `Lightbox`, `SectionNav`,
|
|
135
|
+
`Citation`, `SourceList`) and `Markdown`, which draws the links its text writes, are left out.
|
|
136
|
+
The default, `allowed`, is unchanged.
|
|
137
|
+
- **`polymorph card --runtime`** prints the run-time card for `--framework` (`react` or
|
|
138
|
+
`elements`), `--members` and `--addresses`, the text `runtimeCard` returns, and its length in
|
|
139
|
+
characters on stderr. The MCP tool `get_system_card` gives it with `runtime: true`.
|
|
140
|
+
|
|
141
|
+
- 9a7d54b: `polymorph emit` and the MCP tool `emit_screen` write a native screen into a native repository. A
|
|
142
|
+
directory with no `package.json` or `polymorph.json` that holds a `Package.swift`, a `.xcodeproj`
|
|
143
|
+
or `.xcworkspace` bundle, or `settings.gradle(.kts)` or `build.gradle(.kts)` is a project for that
|
|
144
|
+
platform's screens: an iOS project takes a `.swift` emit and an Android project a `.kt` one. A web
|
|
145
|
+
screen, the other platform's screen, an install, a theme and a fix are refused there, each with a
|
|
146
|
+
sentence that says where it belongs. Such a repository used to refuse every write, so a native app
|
|
147
|
+
could emit its screens only from a checkout with `pnpm emit`. The `polymorph-native` skill now
|
|
148
|
+
gives the emit command first, and keeps writing a view by hand for what a spec cannot say.
|
|
149
|
+
|
|
150
|
+
`polymorph theme propose` and `propose_theme` read `<axis>=<value>`, such as `geometry=crisp`, and
|
|
151
|
+
set the axis to that value, from the axes and values `polymorph axes` lists. It combines with
|
|
152
|
+
ordinary words, and the later of two that name one axis wins. An axis or a value the catalogue
|
|
153
|
+
does not have moves nothing and is reported with the lawful ones. A word of degree (slightly,
|
|
154
|
+
somewhat, bit, little, very, much, less) is reported as not read instead of being skipped without
|
|
155
|
+
a trace: "slightly rounded" still sets the roundest geometry, and the answer now says that
|
|
156
|
+
"slightly" moved nothing. The answer gains `unread`, each word in `unmapped` that the table read
|
|
157
|
+
and could not apply with why; `unmapped` now holds those words too.
|
|
158
|
+
|
|
159
|
+
`polymorph theme hue <colour>` prints a colour written as a palette writes one (`#rrggbb`, or
|
|
160
|
+
`rgb(r g b / a)`) in OKLCH, and the `accentHue` a palette takes from it in whole degrees; `--json`
|
|
161
|
+
prints `{ color, l, c, h, accentHue }`. A grey has no hue, and the answer says so. The engine
|
|
162
|
+
exports the reading it uses, `oklchOf`, from `@polymorph/engine` and `@polymorph/theme`.
|
|
163
|
+
|
|
164
|
+
- 6ed8546: `FONT_ROLES` lists a fourth role, `heading`, and `FontRole` includes it. Code that reads a slot
|
|
165
|
+
for every role, such as `FONT_ROLES.map((role) => system.fonts[role].family)`, no longer
|
|
166
|
+
type-checks, because `fonts.heading` is optional: read the slot with `fontSlot(fonts, role)`,
|
|
167
|
+
which gives the body slot for a heading the system leaves out. A `Record<FontRole, …>` of your
|
|
168
|
+
own needs a `heading` entry.
|
|
169
|
+
|
|
170
|
+
A system file may state `fonts.heading`, which takes what the other slots take
|
|
171
|
+
(`{ family, fallback?, style? }`). It is the face of the heading steps, `text.lg` to `text.3xl`:
|
|
172
|
+
every Heading level, the page, dialog and drawer titles, EmptyState's title and Stat's value.
|
|
173
|
+
`HEADING_TEXT_STEPS` lists those steps. `text.xs` to `text.md` stay in the body slot and the
|
|
174
|
+
display steps in the display slot. A system without it draws its headings in the body slot, so
|
|
175
|
+
every system file written before resolves to the same type, and no house system states one.
|
|
176
|
+
`fonts.heading` with an unknown field is refused, and so is a slot the schema does not name.
|
|
177
|
+
|
|
178
|
+
- The stylesheet declares `--pm-font-heading` in every pairing, written as
|
|
179
|
+
`var(--pm-font-body)` when the heading stack is the body stack, and the four heading steps'
|
|
180
|
+
`--pm-text-<step>-family` reference it. Each pairing's sheet grows by about 50 bytes, the
|
|
181
|
+
no-build theme sheets of the elements included.
|
|
182
|
+
- Heading's level 4, ArtifactPane's title and RichTextInput's level 3 heading draw at `text.md`
|
|
183
|
+
in `text.xl`'s weight and now also its family, so every heading level is in one face. Hero's
|
|
184
|
+
lede and Avatar's `lg` initials are at `text.lg` and are not headings: they take `text.md`'s
|
|
185
|
+
family, the body slot. In a system without a heading slot nothing is drawn differently.
|
|
186
|
+
- `typePersonality` gives a heading slot that names no `fallback` the class it gives body and
|
|
187
|
+
display: serif under `editorial`, sans under the others.
|
|
188
|
+
- A heading weight (`overrides.type.titleWeight`) is drawn in the heading family, so
|
|
189
|
+
`pnpm registry` checks it against that family once a system states one.
|
|
190
|
+
- `admitTheme` lists the heading role with the family that draws it, the body family when the
|
|
191
|
+
system has no heading slot, and `polymorph theme validate` prints it. The registry's system
|
|
192
|
+
entries do the same, and `propose_theme` carries a heading face of its own into its proposal.
|
|
193
|
+
- The token document has `fonts.heading`, the body slot's values in a system that states none,
|
|
194
|
+
and the heading steps' `family` names `font.heading`. On iOS `PMFonts.heading` is new, and
|
|
195
|
+
`PMFonts(body:display:mono:)` without it takes the body slot. `PMTheme(tokenDocument:)` reads a
|
|
196
|
+
document written before this release, which has no `fonts.heading`, with the body slot as its
|
|
197
|
+
heading slot. In Kotlin `PMFonts.heading` defaults to `body`, and a step's `slot` is
|
|
198
|
+
`"heading"` for the heading steps. In Dart `PMFonts` takes a required `heading`, so a Dart
|
|
199
|
+
program that builds its own `PMFonts` passes one.
|
|
200
|
+
- A native app that bundles font files bundles `theme.fonts.heading.family` too when it differs
|
|
201
|
+
from the body family. The SwiftUI and Compose Heading at level 4, ArtifactPane's title, Hero's
|
|
202
|
+
lede and Avatar's `lg` initials follow the web.
|
|
203
|
+
|
|
204
|
+
- 3ce4bef: `Stat` takes `deltaLabel`, the sentence a screen reader hears for its delta, as a function of the
|
|
205
|
+
delta's `value`, its `direction` and its resolved `positive` (its type is exported as
|
|
206
|
+
`StatDeltaLabel`). Every web framework and `<poly-stat>`
|
|
207
|
+
said "up 12% — positive" in English whatever the page's language. Pass `deltaLabel` to say it in
|
|
208
|
+
the app's words and word order; left out, the sentence is the same as before. A
|
|
209
|
+
Dashboard's `stats` entries pass it through in every framework, and `<poly-stat>` takes it as a
|
|
210
|
+
property. The SwiftUI and Compose Stats take it too, as a closure of `PMStatDeltaFacts`, and say
|
|
211
|
+
the string catalogue's sentence when it is left out, as before. Stat's states fixture gains the
|
|
212
|
+
spark entries its spec lists (a spark trending down beside a down-positive delta, a spark with the
|
|
213
|
+
trend chip, a spark alone), and its native fixtures gain the up-negative delta. The screen skill's
|
|
214
|
+
reference names `deltaLabel` among the words a member takes; run `polymorph agents` again to take
|
|
215
|
+
it.
|
|
216
|
+
- c808441: `Stat` takes `loading`, for a number that has not arrived. The label row stays as it is, and the
|
|
217
|
+
value and each part the stat is passed that states the number (the trend chip, the spark, the
|
|
218
|
+
delta or the description, the footer) draw a Skeleton of that part's size, so the card keeps its
|
|
219
|
+
height when the number arrives. `value` stays required: pass `''` on the first load, or the last
|
|
220
|
+
value on a reload, and it is not drawn. Pass the parts the loaded card will have, so their
|
|
221
|
+
placeholders hold its height; a part that is not passed draws nothing. While loading, the stat's
|
|
222
|
+
root carries `aria-busy="true"` and `data-loading`, the value's Skeleton is named by the new
|
|
223
|
+
`loadingLabel` ("Loading" by default), and no value, delta, sentiment, chip label or sparkline
|
|
224
|
+
name is drawn or read. `<poly-stat>` takes the `loading` and `loading-label` attributes, a
|
|
225
|
+
Dashboard's `stats` entries pass both through in every framework, and the SwiftUI and Compose
|
|
226
|
+
Stats draw the same state from `loading` and `loadingLabel`. The screen skill's reference says
|
|
227
|
+
what a dashboard passes while its numbers load; run `polymorph agents` again to take it.
|
|
228
|
+
- 862fd43: `TagInput` takes `countLabel`, the count sentence in the field's description, as a
|
|
229
|
+
`TagInputCountLabel`: a function of the number of tags (`count`), `max`, and `atMax`, which the
|
|
230
|
+
member resolves. Every web framework and `<poly-tag-input>` said "2 added" and "Maximum of 3
|
|
231
|
+
added" in English whatever the page's language. Pass `countLabel` to say the count in the app's
|
|
232
|
+
words, plural and word order; left out, the sentence is the same as before. `<poly-tag-input>`
|
|
233
|
+
takes it as a property. The SwiftUI and Compose TagInputs take it too, as a closure of
|
|
234
|
+
`PMTagInputCountFacts`, and say the string catalogue's sentence when it is left out, as before.
|
|
235
|
+
|
|
236
|
+
`TagInput` also takes `removedLabel`, a `TagInputRemovedLabel`: `(tag, count) => string`, the
|
|
237
|
+
sentence its live region announces when a tag is removed, given the tag and how many tags remain.
|
|
238
|
+
It said "billing removed, 2 remain" in English on every web framework. Left out, the sentence is
|
|
239
|
+
the same as before. `<poly-tag-input>` takes it as a property, and the SwiftUI and Compose
|
|
240
|
+
TagInputs take it as a closure and announce the string catalogue's sentence when it is left out.
|
|
241
|
+
|
|
242
|
+
TagInput's purpose on the cards is now "Free-text tags". The screen skill's reference names
|
|
243
|
+
`countLabel` among the words a member takes; run `polymorph agents` again to take it.
|
|
244
|
+
|
|
3
245
|
## 1.0.18
|
|
4
246
|
|
|
5
247
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A side pane
|
|
2
|
+
* A side pane for one artifact a turn produced (`design/components/artifact-pane.md`).
|
|
3
3
|
*
|
|
4
4
|
* Generated by `pnpm shells` from `packages/shells/src/members/artifact-pane.ts`, the member's
|
|
5
5
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -41,7 +41,7 @@ export interface ArtifactView {
|
|
|
41
41
|
content: NodeTemplate | string
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
/** A side pane
|
|
44
|
+
/** A side pane for one artifact a turn produced: the inputs it takes, by the React member's prop names. */
|
|
45
45
|
export interface ArtifactPaneProps {
|
|
46
46
|
/**
|
|
47
47
|
* The close button's accessible name (generic default `Close`), which localized hosts replace.
|
|
@@ -60,6 +60,11 @@ export interface ArtifactPaneProps {
|
|
|
60
60
|
* Whether the artifact is still being written, which shows a spinner and sets `aria-busy`.
|
|
61
61
|
*/
|
|
62
62
|
streaming?: boolean
|
|
63
|
+
/**
|
|
64
|
+
* The status announced while streaming (default `{title}: still being written`), which apps
|
|
65
|
+
* pass to localize.
|
|
66
|
+
*/
|
|
67
|
+
streamingLabel?: string
|
|
63
68
|
/**
|
|
64
69
|
* The artifact's name, used as the pane's heading and accessible name.
|
|
65
70
|
*/
|
|
@@ -76,7 +81,7 @@ export interface ArtifactPaneProps {
|
|
|
76
81
|
viewsLabel?: string
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
/** A side pane
|
|
84
|
+
/** A side pane for one artifact a turn produced. */
|
|
80
85
|
@Component({
|
|
81
86
|
selector: 'pm-artifact-pane',
|
|
82
87
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -178,6 +183,11 @@ export class ArtifactPane {
|
|
|
178
183
|
>(false, {
|
|
179
184
|
transform: (value: ArtifactPaneProps['streaming']) => (value === undefined ? false : value),
|
|
180
185
|
})
|
|
186
|
+
/**
|
|
187
|
+
* The status announced while streaming (default `{title}: still being written`), which apps
|
|
188
|
+
* pass to localize.
|
|
189
|
+
*/
|
|
190
|
+
readonly streamingLabel = input<ArtifactPaneProps['streamingLabel']>(undefined)
|
|
181
191
|
/**
|
|
182
192
|
* The artifact's name, used as the pane's heading and accessible name.
|
|
183
193
|
*/
|
|
@@ -210,6 +220,7 @@ export class ArtifactPane {
|
|
|
210
220
|
kind: () => this.kind(),
|
|
211
221
|
meta: () => this.meta(),
|
|
212
222
|
streaming: () => this.streaming(),
|
|
223
|
+
streamingLabel: () => this.streamingLabel(),
|
|
213
224
|
title: () => this.title(),
|
|
214
225
|
view: () => this.view(),
|
|
215
226
|
views: () => this.views(),
|
|
@@ -300,7 +311,7 @@ export class ArtifactPane {
|
|
|
300
311
|
|
|
301
312
|
protected e9(): SpinnerProps['label'] {
|
|
302
313
|
if (!this.$p.streaming) return undefined as never
|
|
303
|
-
return `${this.$p.title}: still being written`
|
|
314
|
+
return this.$p.streamingLabel ?? `${this.$p.title}: still being written`
|
|
304
315
|
}
|
|
305
316
|
|
|
306
317
|
protected e10(): IconProps['name'] {
|
|
@@ -580,7 +580,9 @@ export class PromptInput {
|
|
|
580
580
|
)
|
|
581
581
|
protected readonly listId = derived(() => `${this.uid}-suggestions`)
|
|
582
582
|
protected readonly say = derived(() => ({
|
|
583
|
-
suggestions:
|
|
583
|
+
suggestions:
|
|
584
|
+
this.$p.messages.suggestions ??
|
|
585
|
+
((count: number) => (count === 1 ? '1 suggestion' : `${count} suggestions`)),
|
|
584
586
|
loadingSuggestions: this.$p.messages.loadingSuggestions ?? 'Loading suggestions…',
|
|
585
587
|
noSuggestions: this.$p.messages.noSuggestions ?? 'No results',
|
|
586
588
|
}))
|
|
@@ -60,23 +60,26 @@ data-member="dashboard"
|
|
|
60
60
|
[numeric]="e13(stat)"
|
|
61
61
|
[icon]="e14(stat)"
|
|
62
62
|
[delta]="e15(stat)"
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
63
|
+
[deltaLabel]="e16(stat)"
|
|
64
|
+
[trend]="e17(stat)"
|
|
65
|
+
[spark]="e18(stat)"
|
|
66
|
+
[sparkLabel]="e19(stat)"
|
|
67
|
+
[description]="e20(stat)"
|
|
68
|
+
[footer]="e21(stat)"
|
|
69
|
+
[loading]="e22(stat)"
|
|
70
|
+
[loadingLabel]="e23(stat)"
|
|
68
71
|
></pm-stat></pm-card>}</div>}
|
|
69
72
|
<!-- body -->
|
|
70
73
|
<div
|
|
71
|
-
[attr.class]="
|
|
72
|
-
[attr.data-secondary]="
|
|
74
|
+
[attr.class]="e24()"
|
|
75
|
+
[attr.data-secondary]="e25()"
|
|
73
76
|
><!-- primary -->
|
|
74
77
|
<div
|
|
75
|
-
[attr.class]="
|
|
78
|
+
[attr.class]="e26()"
|
|
76
79
|
><ng-container [pmSlotOutlet]="'primary'" [pmSlotOf]="$" /></div>
|
|
77
|
-
@if (
|
|
80
|
+
@if (e27()) {<!-- secondary -->
|
|
78
81
|
<div
|
|
79
|
-
[attr.class]="
|
|
82
|
+
[attr.class]="e28()"
|
|
80
83
|
><ng-container [pmSlotOutlet]="'secondary'" [pmSlotOf]="$" /></div>}</div></div>`,
|
|
81
84
|
})
|
|
82
85
|
export class Dashboard {
|
|
@@ -168,48 +171,63 @@ export class Dashboard {
|
|
|
168
171
|
return stat.delta
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
protected e16(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['
|
|
174
|
+
protected e16(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['deltaLabel'] {
|
|
175
|
+
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
176
|
+
return stat.deltaLabel
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
protected e17(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['trend'] {
|
|
172
180
|
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
173
181
|
return stat.trend
|
|
174
182
|
}
|
|
175
183
|
|
|
176
|
-
protected
|
|
184
|
+
protected e18(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['spark'] {
|
|
177
185
|
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
178
186
|
return stat.spark
|
|
179
187
|
}
|
|
180
188
|
|
|
181
|
-
protected
|
|
189
|
+
protected e19(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['sparkLabel'] {
|
|
182
190
|
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
183
191
|
return stat.sparkLabel
|
|
184
192
|
}
|
|
185
193
|
|
|
186
|
-
protected
|
|
194
|
+
protected e20(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['description'] {
|
|
187
195
|
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
188
196
|
return stat.description
|
|
189
197
|
}
|
|
190
198
|
|
|
191
|
-
protected
|
|
199
|
+
protected e21(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['footer'] {
|
|
192
200
|
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
193
201
|
return stat.footer
|
|
194
202
|
}
|
|
195
203
|
|
|
196
|
-
protected
|
|
204
|
+
protected e22(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['loading'] {
|
|
205
|
+
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
206
|
+
return stat.loading
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
protected e23(stat: Each<ReturnType<Dashboard['e9']>>): StatProps['loadingLabel'] {
|
|
210
|
+
if (!(this.$p.stats !== undefined && this.$p.stats.length > 0)) return undefined as never
|
|
211
|
+
return stat.loadingLabel
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
protected e24() {
|
|
197
215
|
return styles.body
|
|
198
216
|
}
|
|
199
217
|
|
|
200
|
-
protected
|
|
218
|
+
protected e25() {
|
|
201
219
|
return this.$.filled('secondary') ? '' : undefined
|
|
202
220
|
}
|
|
203
221
|
|
|
204
|
-
protected
|
|
222
|
+
protected e26() {
|
|
205
223
|
return styles.primary
|
|
206
224
|
}
|
|
207
225
|
|
|
208
|
-
protected
|
|
226
|
+
protected e27() {
|
|
209
227
|
return this.$.filled('secondary')
|
|
210
228
|
}
|
|
211
229
|
|
|
212
|
-
protected
|
|
230
|
+
protected e28() {
|
|
213
231
|
if (!this.$.filled('secondary')) return undefined as never
|
|
214
232
|
return styles.secondary
|
|
215
233
|
}
|
|
@@ -252,6 +252,19 @@ pmTableCell
|
|
|
252
252
|
pmTableCell
|
|
253
253
|
[numeric]="e24()"
|
|
254
254
|
>26m ago</td></tr></tbody></pm-table></pm-dashboard-panel></ng-container></pm-dashboard>}
|
|
255
|
+
@case (5) {<pm-dashboard
|
|
256
|
+
title="Overview"
|
|
257
|
+
[stats]="e25()"
|
|
258
|
+
[pmOverrides]="overrides()"
|
|
259
|
+
><ng-container ngProjectAs="[slot=primary]"><pm-dashboard-panel
|
|
260
|
+
title="Ticket volume"
|
|
261
|
+
><pm-line-chart
|
|
262
|
+
[data]="e26()"
|
|
263
|
+
[loading]="e27()"
|
|
264
|
+
[series]="e28()"
|
|
265
|
+
[x]="e29()"
|
|
266
|
+
label="Tickets opened and resolved by day"
|
|
267
|
+
></pm-line-chart></pm-dashboard-panel></ng-container></pm-dashboard>}
|
|
255
268
|
}`,
|
|
256
269
|
})
|
|
257
270
|
export class DashboardStates {
|
|
@@ -406,6 +419,44 @@ export class DashboardStates {
|
|
|
406
419
|
protected e24(): TableCellProps['numeric'] {
|
|
407
420
|
return true
|
|
408
421
|
}
|
|
422
|
+
|
|
423
|
+
protected e25(): DashboardProps['stats'] {
|
|
424
|
+
return [
|
|
425
|
+
{
|
|
426
|
+
label: 'Open tickets',
|
|
427
|
+
value: '128',
|
|
428
|
+
delta: { value: '8%', direction: 'down', positive: true },
|
|
429
|
+
spark: [141, 138, 144, 136, 132, 135, 129, 131, 126, 128],
|
|
430
|
+
loading: true,
|
|
431
|
+
},
|
|
432
|
+
{ label: 'First response', value: '14m', icon: 'time', loading: true },
|
|
433
|
+
{
|
|
434
|
+
label: 'Satisfaction',
|
|
435
|
+
value: '91%',
|
|
436
|
+
delta: { value: '3pts', direction: 'down' },
|
|
437
|
+
loading: true,
|
|
438
|
+
},
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
protected e26(): LineChartProps['data'] {
|
|
443
|
+
return []
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
protected e27(): LineChartProps['loading'] {
|
|
447
|
+
return true
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
protected e28(): LineChartProps['series'] {
|
|
451
|
+
return [
|
|
452
|
+
{ key: 'opened', label: 'Opened' },
|
|
453
|
+
{ key: 'resolved', label: 'Resolved' },
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
protected e29(): LineChartProps['x'] {
|
|
458
|
+
return { key: 'day', scale: 'time', label: 'Day' }
|
|
459
|
+
}
|
|
409
460
|
}
|
|
410
461
|
|
|
411
462
|
export const states: ComponentStates = {
|
|
@@ -417,5 +468,6 @@ export const states: ComponentStates = {
|
|
|
417
468
|
{ name: 'no second column — the primary takes the width' },
|
|
418
469
|
{ name: 'a panel with no title, and no stats at all' },
|
|
419
470
|
{ name: 'a title edited in place — the overview of one environment the reader names' },
|
|
471
|
+
{ name: 'the numbers loading — each card keeps its label and its height' },
|
|
420
472
|
],
|
|
421
473
|
}
|