@signalflare-ai/ui 0.5.0 → 1.0.0
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 +117 -1
- package/ai/USAGE.md +64 -0
- package/ai/component-registry.json +492 -618
- package/ai/component-registry.md +167 -85
- package/ai/schemas.ts +545 -102
- package/bin/sf.js +2 -3
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +1659 -5532
- package/dist/ai/schemas.d.ts.map +1 -1
- package/dist/{ai-actions-DG1dhDMP.js → ai-actions-DSVeQn4e.js} +1 -1
- package/dist/{ai-actions-DG1dhDMP.js.map → ai-actions-DSVeQn4e.js.map} +1 -1
- package/dist/{ai-agent-card-BbtL4NII.js → ai-agent-card-BXHwhWAU.js} +1 -1
- package/dist/{ai-agent-card-BbtL4NII.js.map → ai-agent-card-BXHwhWAU.js.map} +1 -1
- package/dist/{ai-approval-Mb7-BY6i.js → ai-approval-aa0qvjFN.js} +1 -1
- package/dist/{ai-approval-Mb7-BY6i.js.map → ai-approval-aa0qvjFN.js.map} +1 -1
- package/dist/{ai-code-block-BI_z0UVR.js → ai-code-block-BgtIxtZZ.js} +1 -1
- package/dist/{ai-code-block-BI_z0UVR.js.map → ai-code-block-BgtIxtZZ.js.map} +1 -1
- package/dist/{ai-conversation-DYtExcrw.js → ai-conversation-CArP7C8K.js} +1 -1
- package/dist/{ai-conversation-DYtExcrw.js.map → ai-conversation-CArP7C8K.js.map} +1 -1
- package/dist/{ai-info-banner-BpzauUAY.js → ai-info-banner-uFxHHwBA.js} +1 -1
- package/dist/{ai-info-banner-BpzauUAY.js.map → ai-info-banner-uFxHHwBA.js.map} +1 -1
- package/dist/{ai-message-CV8SBoHM.js → ai-message-BjnFznXy.js} +1 -1
- package/dist/{ai-message-CV8SBoHM.js.map → ai-message-BjnFznXy.js.map} +1 -1
- package/dist/{ai-mission-header-ByYkJ6YP.js → ai-mission-header-08__gULL.js} +1 -1
- package/dist/{ai-mission-header-ByYkJ6YP.js.map → ai-mission-header-08__gULL.js.map} +1 -1
- package/dist/ai-part-group-DBtgTgAn.js +277 -0
- package/dist/ai-part-group-DBtgTgAn.js.map +1 -0
- package/dist/ai-prompt-input-Dy1LfxPk.js +1541 -0
- package/dist/ai-prompt-input-Dy1LfxPk.js.map +1 -0
- package/dist/{ai-question-Dp1g9k2o.js → ai-question-CHHoDJMg.js} +1 -1
- package/dist/{ai-question-Dp1g9k2o.js.map → ai-question-CHHoDJMg.js.map} +1 -1
- package/dist/{ai-reasoning-UAmNx_LD.js → ai-reasoning-CnL6ZSr5.js} +84 -5
- package/dist/ai-reasoning-CnL6ZSr5.js.map +1 -0
- package/dist/{ai-response-BWoVsNQG.js → ai-response-BEUg3xvd.js} +13 -16
- package/dist/ai-response-BEUg3xvd.js.map +1 -0
- package/dist/{ai-shimmer-BpOmfonu.js → ai-shimmer-By5_L05p.js} +1 -1
- package/dist/{ai-shimmer-BpOmfonu.js.map → ai-shimmer-By5_L05p.js.map} +1 -1
- package/dist/{ai-status-badge-WhbKVeqn.js → ai-status-badge-BGYGWYF6.js} +1 -1
- package/dist/{ai-status-badge-WhbKVeqn.js.map → ai-status-badge-BGYGWYF6.js.map} +1 -1
- package/dist/{ai-streaming-text-ClL7FwvD.js → ai-streaming-text-CMfoThV0.js} +1 -1
- package/dist/{ai-streaming-text-ClL7FwvD.js.map → ai-streaming-text-CMfoThV0.js.map} +1 -1
- package/dist/{ai-subagent-BruGN1UE.js → ai-subagent-DcPRqkAA.js} +1 -1
- package/dist/{ai-subagent-BruGN1UE.js.map → ai-subagent-DcPRqkAA.js.map} +1 -1
- package/dist/{ai-suggestion-CNsCZj5P.js → ai-suggestion-MgeCg5Ar.js} +1 -1
- package/dist/{ai-suggestion-CNsCZj5P.js.map → ai-suggestion-MgeCg5Ar.js.map} +1 -1
- package/dist/{ai-task-list-B9CpMDYN.js → ai-task-list-Da9zIm00.js} +9 -12
- package/dist/ai-task-list-Da9zIm00.js.map +1 -0
- package/dist/{ai-timeline-Bb5ntsr3.js → ai-timeline-Cwu045IR.js} +1 -1
- package/dist/ai-timeline-Cwu045IR.js.map +1 -0
- package/dist/{ai-tool-BGH8nQ_D.js → ai-tool-Cn1O4xjP.js} +168 -11
- package/dist/ai-tool-Cn1O4xjP.js.map +1 -0
- package/dist/{ai-usage-bar-BI-p-JBk.js → ai-usage-bar-DjS12DMp.js} +1 -1
- package/dist/{ai-usage-bar-BI-p-JBk.js.map → ai-usage-bar-DjS12DMp.js.map} +1 -1
- package/dist/catalog.js +3 -3
- package/dist/catalog.js.map +1 -1
- package/dist/{chart-Bes4MN3C.js → chart-BK3sVPnD.js} +442 -248
- package/dist/chart-BK3sVPnD.js.map +1 -0
- package/dist/{checkbox-CPX7lBaU.js → checkbox-DYhUmZNw.js} +4 -4
- package/dist/checkbox-DYhUmZNw.js.map +1 -0
- package/dist/{clipboard-text-92YeCybc.js → clipboard-text-ssybngLw.js} +2 -2
- package/dist/{clipboard-text-92YeCybc.js.map → clipboard-text-ssybngLw.js.map} +1 -1
- package/dist/{code-DE1Yy1Cu.js → code-Cx-QSoOT.js} +2 -2
- package/dist/{code-DE1Yy1Cu.js.map → code-Cx-QSoOT.js.map} +1 -1
- package/dist/{combobox-B0bLdsX8.js → combobox-C0iW6a0r.js} +2 -2
- package/dist/{combobox-B0bLdsX8.js.map → combobox-C0iW6a0r.js.map} +1 -1
- package/dist/command-line/cli.js +22 -27
- package/dist/{command-palette-CBTY8EiF.js → command-palette-DGzioeki.js} +2 -2
- package/dist/command-palette-DGzioeki.js.map +1 -0
- package/dist/components/ai-actions.js +1 -1
- package/dist/components/ai-agent-card.js +1 -1
- package/dist/components/ai-approval.js +1 -1
- package/dist/components/ai-code-block.js +1 -1
- package/dist/components/ai-conversation.js +1 -1
- package/dist/components/ai-info-banner.js +1 -1
- package/dist/components/ai-message.js +1 -1
- package/dist/components/ai-mission-header.js +1 -1
- package/dist/components/ai-part-group.js +3 -0
- package/dist/components/ai-prompt-input.js +2 -2
- package/dist/components/ai-question.js +1 -1
- package/dist/components/ai-reasoning.js +1 -1
- package/dist/components/ai-response.js +1 -1
- package/dist/components/ai-shimmer.js +1 -1
- package/dist/components/ai-status-badge.js +1 -1
- package/dist/components/ai-streaming-text.js +1 -1
- package/dist/components/ai-subagent.js +1 -1
- package/dist/components/ai-suggestion.js +1 -1
- package/dist/components/ai-task-list.js +1 -1
- package/dist/components/ai-timeline.js +1 -1
- package/dist/components/ai-tool.js +1 -1
- package/dist/components/ai-usage-bar.js +1 -1
- package/dist/components/chart.js +3 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/code.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/data-grid.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/filters.js +1 -1
- package/dist/components/input.js +2 -2
- package/dist/components/link.js +2 -2
- package/dist/components/link.js.map +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sparkline.js +3 -0
- package/dist/components/stat-card.js +3 -0
- package/dist/components/table.js +1 -1
- package/dist/components/text-roll.js +3 -0
- package/dist/components/theme-toggle.js +1 -1
- package/dist/components/use-agent-harness.js +1 -1
- package/dist/{data-grid-UJ9ja5cu.js → data-grid-CG76N_hK.js} +6 -6
- package/dist/data-grid-CG76N_hK.js.map +1 -0
- package/dist/{date-picker-ebekkC3R.js → date-picker-Dqg9L4xu.js} +2 -2
- package/dist/{date-picker-ebekkC3R.js.map → date-picker-Dqg9L4xu.js.map} +1 -1
- package/dist/{dist-BNlyONdD.js → dist-1-gcEL2L.js} +224 -135
- package/dist/dist-1-gcEL2L.js.map +1 -0
- package/dist/{dropdown-J5T4pHaR.js → dropdown-qnEYRFXZ.js} +2 -2
- package/dist/{dropdown-J5T4pHaR.js.map → dropdown-qnEYRFXZ.js.map} +1 -1
- package/dist/echart-DURZEyai.js +314 -0
- package/dist/echart-DURZEyai.js.map +1 -0
- package/dist/{filters-BdBogf7D.js → filters-Bw_U6ZTx.js} +5 -5
- package/dist/filters-Bw_U6ZTx.js.map +1 -0
- package/dist/flow-BRsYUCJa.js.map +1 -1
- package/dist/genui.js +2 -2
- package/dist/genui.js.map +1 -1
- package/dist/index.js +45 -42
- package/dist/index.js.map +1 -1
- package/dist/{input-BxQAnXki.js → input-DXYUjGgD.js} +2 -2
- package/dist/{input-BxQAnXki.js.map → input-DXYUjGgD.js.map} +1 -1
- package/dist/{input-Cn25I4o5.js → input-DddtBN-g.js} +2 -2
- package/dist/{input-Cn25I4o5.js.map → input-DddtBN-g.js.map} +1 -1
- package/dist/layer-card-BME0eljh.js.map +1 -1
- package/dist/{pagination-C_YqCy8l.js → pagination-BVqdlONY.js} +2 -2
- package/dist/{pagination-C_YqCy8l.js.map → pagination-BVqdlONY.js.map} +1 -1
- package/dist/primitives/otp-field.js +2 -0
- package/dist/primitives.js +1 -0
- package/dist/{radio-B7zg1wUI.js → radio-BNSwOt3B.js} +3 -3
- package/dist/radio-BNSwOt3B.js.map +1 -0
- package/dist/{select-9p721G00.js → select-1w2aebGQ.js} +2 -2
- package/dist/select-1w2aebGQ.js.map +1 -0
- package/dist/{sensitive-input-D5je2NLl.js → sensitive-input-82Cez3vj.js} +2 -2
- package/dist/{sensitive-input-D5je2NLl.js.map → sensitive-input-82Cez3vj.js.map} +1 -1
- package/dist/{sidebar-DOwBrq57.js → sidebar-CAsCmSpM.js} +3 -3
- package/dist/sidebar-CAsCmSpM.js.map +1 -0
- package/dist/sparkline-DdbeM4Ai.js +108 -0
- package/dist/sparkline-DdbeM4Ai.js.map +1 -0
- package/dist/src/blocks/agent-harness/agent-harness.d.ts +30 -9
- package/dist/src/blocks/agent-harness/agent-harness.d.ts.map +1 -1
- package/dist/src/blocks/agent-harness/agent-harness.stories.tsx +114 -0
- package/dist/src/blocks/agent-harness/agent-harness.tsx +144 -63
- package/dist/src/blocks/commander/commander.stories.tsx +31 -0
- package/dist/src/blocks/dashboard-grid/dashboard-grid.d.ts +48 -0
- package/dist/src/blocks/dashboard-grid/dashboard-grid.d.ts.map +1 -0
- package/dist/src/blocks/dashboard-grid/dashboard-grid.stories.tsx +19 -0
- package/dist/src/blocks/dashboard-grid/dashboard-grid.tsx +110 -0
- package/dist/src/blocks/dashboard-grid/index.d.ts +2 -0
- package/dist/src/blocks/dashboard-grid/index.d.ts.map +1 -0
- package/dist/src/blocks/delete-resource/delete-resource.stories.tsx +31 -0
- package/dist/src/blocks/map-block/map-block.stories.tsx +41 -0
- package/dist/src/blocks/metrics-overview/index.d.ts +2 -0
- package/dist/src/blocks/metrics-overview/index.d.ts.map +1 -0
- package/dist/src/blocks/metrics-overview/metrics-overview.d.ts +67 -0
- package/dist/src/blocks/metrics-overview/metrics-overview.d.ts.map +1 -0
- package/dist/src/blocks/metrics-overview/metrics-overview.stories.tsx +26 -0
- package/dist/src/blocks/metrics-overview/metrics-overview.tsx +139 -0
- package/dist/src/blocks/page-header/page-header.stories.tsx +56 -0
- package/dist/src/blocks/resource-list/resource-list.stories.tsx +31 -0
- package/dist/src/catalog/catalog.d.ts +1 -1
- package/dist/src/catalog/index.d.ts +1 -1
- package/dist/src/catalog/types.d.ts +1 -1
- package/dist/src/command-line/build-cli.d.ts +1 -1
- package/dist/src/command-line/cli.d.ts +1 -1
- package/dist/src/command-line/commands/add.d.ts +1 -1
- package/dist/src/command-line/commands/add.d.ts.map +1 -1
- package/dist/src/command-line/commands/ai.d.ts.map +1 -1
- package/dist/src/command-line/commands/blocks.d.ts +1 -1
- package/dist/src/command-line/commands/blocks.d.ts.map +1 -1
- package/dist/src/command-line/commands/doc.d.ts +1 -1
- package/dist/src/command-line/commands/doc.d.ts.map +1 -1
- package/dist/src/command-line/commands/ls.d.ts +1 -1
- package/dist/src/command-line/commands/ls.d.ts.map +1 -1
- package/dist/src/command-line/commands/migrate.d.ts +3 -3
- package/dist/src/command-line/commands/migrate.d.ts.map +1 -1
- package/dist/src/command-line/utils/config.d.ts +1 -1
- package/dist/src/command-line/utils/transformer.d.ts +1 -1
- package/dist/src/components/ai-part-group/ai-part-group.d.ts +134 -0
- package/dist/src/components/ai-part-group/ai-part-group.d.ts.map +1 -0
- package/dist/src/components/ai-part-group/index.d.ts +2 -0
- package/dist/src/components/ai-part-group/index.d.ts.map +1 -0
- package/dist/src/components/ai-prompt-input/ai-prompt-input.d.ts +196 -7
- package/dist/src/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -1
- package/dist/src/components/ai-prompt-input/controller.d.ts +41 -0
- package/dist/src/components/ai-prompt-input/controller.d.ts.map +1 -0
- package/dist/src/components/ai-prompt-input/index.d.ts +3 -1
- package/dist/src/components/ai-prompt-input/index.d.ts.map +1 -1
- package/dist/src/components/ai-prompt-input/types.d.ts +86 -0
- package/dist/src/components/ai-prompt-input/types.d.ts.map +1 -0
- package/dist/src/components/ai-reasoning/ai-reasoning.d.ts +17 -1
- package/dist/src/components/ai-reasoning/ai-reasoning.d.ts.map +1 -1
- package/dist/src/components/ai-response/ai-response.d.ts +1 -2
- package/dist/src/components/ai-response/ai-response.d.ts.map +1 -1
- package/dist/src/components/ai-task-list/ai-task-list.d.ts.map +1 -1
- package/dist/src/components/ai-tool/ai-tool.d.ts +17 -1
- package/dist/src/components/ai-tool/ai-tool.d.ts.map +1 -1
- package/dist/src/components/chart/area-chart.d.ts +69 -0
- package/dist/src/components/chart/area-chart.d.ts.map +1 -0
- package/dist/src/components/chart/bar-chart.d.ts +60 -0
- package/dist/src/components/chart/bar-chart.d.ts.map +1 -0
- package/dist/src/components/chart/color.d.ts +56 -0
- package/dist/src/components/chart/color.d.ts.map +1 -1
- package/dist/src/components/chart/echart.d.ts.map +1 -1
- package/dist/src/components/chart/index.d.ts +5 -0
- package/dist/src/components/chart/index.d.ts.map +1 -1
- package/dist/src/components/chart/pie-chart.d.ts +64 -0
- package/dist/src/components/chart/pie-chart.d.ts.map +1 -0
- package/dist/src/components/chart/scatter-chart.d.ts +57 -0
- package/dist/src/components/chart/scatter-chart.d.ts.map +1 -0
- package/dist/src/components/chart/stacked-bar-chart.d.ts +59 -0
- package/dist/src/components/chart/stacked-bar-chart.d.ts.map +1 -0
- package/dist/src/components/chart/timeseries-chart.d.ts.map +1 -1
- package/dist/src/components/code/code.d.ts +1 -1
- package/dist/src/components/command-palette/command-palette.d.ts +1 -1
- package/dist/src/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/src/components/data-grid/index.d.ts +1 -1
- package/dist/src/components/data-grid/index.d.ts.map +1 -1
- package/dist/src/components/data-grid/types.d.ts.map +1 -1
- package/dist/src/components/date-picker/date-picker.d.ts +2 -2
- package/dist/src/components/filters/filters.d.ts.map +1 -1
- package/dist/src/components/filters/helpers.d.ts.map +1 -1
- package/dist/src/components/filters/types.d.ts.map +1 -1
- package/dist/src/components/layer-card/layer-card.d.ts +1 -1
- package/dist/src/components/link/link.d.ts +2 -2
- package/dist/src/components/radio/radio.d.ts +1 -1
- package/dist/src/components/select/select.d.ts +1 -1
- package/dist/src/components/sidebar/sidebar.d.ts +2 -2
- package/dist/src/components/sparkline/index.d.ts +2 -0
- package/dist/src/components/sparkline/index.d.ts.map +1 -0
- package/dist/src/components/sparkline/sparkline.d.ts +52 -0
- package/dist/src/components/sparkline/sparkline.d.ts.map +1 -0
- package/dist/src/components/stat-card/index.d.ts +2 -0
- package/dist/src/components/{ai-loader → stat-card}/index.d.ts.map +1 -1
- package/dist/src/components/stat-card/stat-card.d.ts +80 -0
- package/dist/src/components/stat-card/stat-card.d.ts.map +1 -0
- package/dist/src/components/text-roll/index.d.ts +2 -0
- package/dist/src/components/text-roll/index.d.ts.map +1 -0
- package/dist/src/components/text-roll/text-roll.d.ts +49 -0
- package/dist/src/components/text-roll/text-roll.d.ts.map +1 -0
- package/dist/src/components/toast/toast.d.ts.map +1 -1
- package/dist/src/components/use-agent-harness/use-agent-harness.d.ts +2 -2
- package/dist/src/genui/genui.d.ts.map +1 -1
- package/dist/src/index.d.ts +5 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/primitives/index.d.ts +1 -0
- package/dist/src/primitives/index.d.ts.map +1 -1
- package/dist/src/primitives/otp-field.d.ts +13 -0
- package/dist/src/primitives/otp-field.d.ts.map +1 -0
- package/dist/src/registry/index.d.ts +1 -1
- package/dist/src/registry/types.d.ts +1 -1
- package/dist/stat-card-CEZscNh8.js +103 -0
- package/dist/stat-card-CEZscNh8.js.map +1 -0
- package/dist/styles/sf-binding.css +20 -62
- package/dist/styles/sf-standalone.css +2 -2
- package/dist/styles/shadcn.css +120 -0
- package/dist/styles/theme-blue-tint.css +98 -0
- package/dist/styles/theme-fedramp.css +3 -12
- package/dist/styles/theme-minimal.css +26 -104
- package/dist/styles/theme-sf.css +96 -114
- package/dist/{table-CIMx0Oq0.js → table-Rv4JMy0B.js} +2 -2
- package/dist/{table-CIMx0Oq0.js.map → table-Rv4JMy0B.js.map} +1 -1
- package/dist/text-roll-BZ3I1umc.js +79 -0
- package/dist/text-roll-BZ3I1umc.js.map +1 -0
- package/dist/{theme-toggle-Dpgnoj_Q.js → theme-toggle-Bhu681D7.js} +1 -1
- package/dist/{theme-toggle-Dpgnoj_Q.js.map → theme-toggle-Bhu681D7.js.map} +1 -1
- package/dist/{use-agent-harness-DZzcn96L.js → use-agent-harness-BMyF8pTq.js} +5 -5
- package/dist/use-agent-harness-BMyF8pTq.js.map +1 -0
- package/package.json +48 -19
- package/scripts/component-registry/discovery.ts +2 -2
- package/scripts/component-registry/index.ts +1 -1
- package/scripts/component-registry/props-filter.ts +1 -1
- package/scripts/component-registry/utils.ts +5 -5
- package/scripts/component-registry/variant-parser.ts +124 -19
- package/scripts/convert-demos-to-stories.ts +253 -0
- package/scripts/css-build.ts +4 -3
- package/scripts/generate-primitives.ts +11 -3
- package/scripts/theme-generator/config.ts +339 -71
- package/scripts/theme-generator/generate-css.ts +17 -3
- package/scripts/theme-generator/index.ts +3 -3
- package/scripts/theme-generator/migrate.ts +1 -1
- package/dist/ai-loader-Cr3eQkNS.js +0 -134
- package/dist/ai-loader-Cr3eQkNS.js.map +0 -1
- package/dist/ai-prompt-input-Bo1YuJly.js +0 -769
- package/dist/ai-prompt-input-Bo1YuJly.js.map +0 -1
- package/dist/ai-reasoning-UAmNx_LD.js.map +0 -1
- package/dist/ai-response-BWoVsNQG.js.map +0 -1
- package/dist/ai-task-list-B9CpMDYN.js.map +0 -1
- package/dist/ai-timeline-Bb5ntsr3.js.map +0 -1
- package/dist/ai-tool-BGH8nQ_D.js.map +0 -1
- package/dist/chart-Bes4MN3C.js.map +0 -1
- package/dist/checkbox-CPX7lBaU.js.map +0 -1
- package/dist/command-palette-CBTY8EiF.js.map +0 -1
- package/dist/components/ai-loader.js +0 -3
- package/dist/data-grid-UJ9ja5cu.js.map +0 -1
- package/dist/dist-BNlyONdD.js.map +0 -1
- package/dist/filters-BdBogf7D.js.map +0 -1
- package/dist/radio-B7zg1wUI.js.map +0 -1
- package/dist/select-9p721G00.js.map +0 -1
- package/dist/sidebar-DOwBrq57.js.map +0 -1
- package/dist/src/components/ai-loader/ai-loader.d.ts +0 -44
- package/dist/src/components/ai-loader/ai-loader.d.ts.map +0 -1
- package/dist/src/components/ai-loader/index.d.ts +0 -2
- package/dist/styles/theme-navigator.css +0 -137
- package/dist/use-agent-harness-DZzcn96L.js.map +0 -1
|
@@ -4,27 +4,27 @@ import { t as Tooltip } from "./tooltip-Cb7QW-7H.js";
|
|
|
4
4
|
import { t as Badge } from "./badge-D_eaA6wv.js";
|
|
5
5
|
import { t as Banner } from "./banner-B_6oBrsu.js";
|
|
6
6
|
import { t as Button } from "./button-De0267YU.js";
|
|
7
|
-
import { t as Checkbox } from "./checkbox-
|
|
7
|
+
import { t as Checkbox } from "./checkbox-DYhUmZNw.js";
|
|
8
8
|
import { t as Field } from "./field-Y_UK1_Cg.js";
|
|
9
|
-
import { t as Input } from "./input-
|
|
10
|
-
import { n as InputArea } from "./input-
|
|
11
|
-
import { t as Code } from "./code-
|
|
9
|
+
import { t as Input } from "./input-DXYUjGgD.js";
|
|
10
|
+
import { n as InputArea } from "./input-DddtBN-g.js";
|
|
11
|
+
import { t as Code } from "./code-Cx-QSoOT.js";
|
|
12
12
|
import { t as Surface } from "./surface-BduI7Ehl.js";
|
|
13
13
|
import { t as Dialog } from "./dialog-CyHEQXEY.js";
|
|
14
14
|
import { t as Collapsible } from "./collapsible-DWsXeXmS.js";
|
|
15
15
|
import { t as LayerCard } from "./layer-card-BME0eljh.js";
|
|
16
16
|
import { t as Meter } from "./meter-CpmTenEr.js";
|
|
17
|
-
import { t as Select } from "./select-
|
|
17
|
+
import { t as Select } from "./select-1w2aebGQ.js";
|
|
18
18
|
import { r as Switch } from "./switch-CzZBRBL7.js";
|
|
19
19
|
import { t as Tabs } from "./tabs-1cHrYoel.js";
|
|
20
|
-
import { r as Table } from "./table-
|
|
20
|
+
import { r as Table } from "./table-Rv4JMy0B.js";
|
|
21
21
|
import { t as Popover } from "./popover-BRQZ2b6z.js";
|
|
22
22
|
import { t as Empty } from "./empty-D2TypIId.js";
|
|
23
23
|
import { t as Text } from "./text-KJmGkwnf.js";
|
|
24
|
-
import { t as Radio } from "./radio-
|
|
24
|
+
import { t as Radio } from "./radio-BNSwOt3B.js";
|
|
25
25
|
import { Link } from "./components/link.js";
|
|
26
26
|
import { t as Grid } from "./grid-qUAN9hFx.js";
|
|
27
|
-
import { i as ChartPalette,
|
|
27
|
+
import { i as ChartPalette, t as Chart } from "./echart-DURZEyai.js";
|
|
28
28
|
import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
29
29
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
30
30
|
import { z } from "zod";
|
|
@@ -44,7 +44,7 @@ echarts.use([
|
|
|
44
44
|
CanvasRenderer
|
|
45
45
|
]);
|
|
46
46
|
/**
|
|
47
|
-
* Hardcoded
|
|
47
|
+
* Hardcoded SignalFlare theme color tokens for ECharts canvas rendering.
|
|
48
48
|
* ECharts draws on <canvas> so it cannot resolve CSS custom properties
|
|
49
49
|
* or `light-dark()`. We detect `data-mode` and return matching hex values
|
|
50
50
|
* derived from theme-sf.css oklch fallbacks.
|
|
@@ -354,7 +354,7 @@ var sfComponents = {
|
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
//#endregion
|
|
357
|
-
//#region ../../node_modules/.bun/@json-render+core@0.
|
|
357
|
+
//#region ../../node_modules/.bun/@json-render+core@0.18.0/node_modules/@json-render/core/dist/chunk-AFLK3Q4T.mjs
|
|
358
358
|
var DynamicValueSchema = z.union([
|
|
359
359
|
z.string(),
|
|
360
360
|
z.number(),
|
|
@@ -670,7 +670,7 @@ function flattenToPointers(obj, prefix = "", _depth = 0, _seen, _warned) {
|
|
|
670
670
|
return result;
|
|
671
671
|
}
|
|
672
672
|
//#endregion
|
|
673
|
-
//#region ../../node_modules/.bun/@json-render+core@0.
|
|
673
|
+
//#region ../../node_modules/.bun/@json-render+core@0.18.0/node_modules/@json-render/core/dist/index.mjs
|
|
674
674
|
var numericOrStateRef = z.union([z.number(), z.object({ $state: z.string() })]);
|
|
675
675
|
var comparisonOps = {
|
|
676
676
|
eq: z.unknown().optional(),
|
|
@@ -785,8 +785,6 @@ function isTemplateExpression(value) {
|
|
|
785
785
|
}
|
|
786
786
|
var WARNED_COMPUTED_MAX = 100;
|
|
787
787
|
var warnedComputedFns = /* @__PURE__ */ new Set();
|
|
788
|
-
var WARNED_TEMPLATE_MAX = 100;
|
|
789
|
-
var warnedTemplatePaths = /* @__PURE__ */ new Set();
|
|
790
788
|
function resolveBindItemPath(itemPath, ctx) {
|
|
791
789
|
if (ctx.repeatBasePath == null) {
|
|
792
790
|
console.warn(`$bindItem used outside repeat scope: "${itemPath}"`);
|
|
@@ -824,15 +822,15 @@ function resolvePropValue(value, ctx) {
|
|
|
824
822
|
return fn(resolvedArgs);
|
|
825
823
|
}
|
|
826
824
|
if (isTemplateExpression(value)) return value.$template.replace(/\$\{([^}]+)\}/g, (_match, rawPath) => {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
825
|
+
if (rawPath.startsWith("/")) {
|
|
826
|
+
const resolved2 = getByPath(ctx.stateModel, rawPath);
|
|
827
|
+
return resolved2 != null ? String(resolved2) : "";
|
|
828
|
+
}
|
|
829
|
+
if (ctx.repeatItem !== void 0) {
|
|
830
|
+
const fromItem = getByPath(ctx.repeatItem, rawPath);
|
|
831
|
+
if (fromItem != null) return String(fromItem);
|
|
834
832
|
}
|
|
835
|
-
const resolved = getByPath(ctx.stateModel,
|
|
833
|
+
const resolved = getByPath(ctx.stateModel, "/" + rawPath);
|
|
836
834
|
return resolved != null ? String(resolved) : "";
|
|
837
835
|
});
|
|
838
836
|
if (Array.isArray(value)) return value.map((item) => resolvePropValue(item, ctx));
|
|
@@ -867,6 +865,45 @@ function resolveActionParam(value, ctx) {
|
|
|
867
865
|
if (isIndexExpression(value)) return ctx.repeatIndex;
|
|
868
866
|
return resolvePropValue(value, ctx);
|
|
869
867
|
}
|
|
868
|
+
var observers = /* @__PURE__ */ new Set();
|
|
869
|
+
function notifyActionDispatch(evt) {
|
|
870
|
+
for (const o of observers) {
|
|
871
|
+
const fn = o.onDispatch;
|
|
872
|
+
if (!fn) continue;
|
|
873
|
+
try {
|
|
874
|
+
fn(evt);
|
|
875
|
+
} catch (err) {
|
|
876
|
+
if (process.env.NODE_ENV !== "production") console.error("[json-render] action observer threw in onDispatch:", err);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
function notifyActionSettle(evt) {
|
|
881
|
+
for (const o of observers) {
|
|
882
|
+
const fn = o.onSettle;
|
|
883
|
+
if (!fn) continue;
|
|
884
|
+
try {
|
|
885
|
+
fn(evt);
|
|
886
|
+
} catch (err) {
|
|
887
|
+
if (process.env.NODE_ENV !== "production") console.error("[json-render] action observer threw in onSettle:", err);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
var dispatchCounter = 0;
|
|
892
|
+
function nextActionDispatchId() {
|
|
893
|
+
dispatchCounter += 1;
|
|
894
|
+
return `${Date.now()}-${dispatchCounter}`;
|
|
895
|
+
}
|
|
896
|
+
var activeCount = 0;
|
|
897
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
898
|
+
function isDevtoolsActive() {
|
|
899
|
+
return activeCount > 0;
|
|
900
|
+
}
|
|
901
|
+
function subscribeDevtoolsActive(listener) {
|
|
902
|
+
listeners.add(listener);
|
|
903
|
+
return () => {
|
|
904
|
+
listeners.delete(listener);
|
|
905
|
+
};
|
|
906
|
+
}
|
|
870
907
|
var ActionConfirmSchema = z.object({
|
|
871
908
|
title: z.string(),
|
|
872
909
|
message: z.string(),
|
|
@@ -1803,8 +1840,8 @@ Note: state patches appear right after the elements that use them, so the UI fil
|
|
|
1803
1840
|
lines.push("");
|
|
1804
1841
|
lines.push("Use $bindState for form inputs (text fields, checkboxes, selects, sliders, etc.) and $state for read-only data display. Inside repeat scopes, use $bindItem for form inputs bound to the current item. Use dynamic props instead of duplicating elements with opposing visible conditions when only prop values differ.");
|
|
1805
1842
|
lines.push("");
|
|
1806
|
-
lines.push("4. Template: `{ \"$template\": \"Hello, ${/name}!\" }` - interpolates `${/path}`
|
|
1807
|
-
lines.push(" Example: `\"label\": { \"$template\": \"Items: ${/cart/count} | Total: ${/cart/total}\" }` renders \"Items: 3 | Total: 42.00\" when /cart/count is 3 and /cart/total is 42.00.");
|
|
1843
|
+
lines.push("4. Template: `{ \"$template\": \"Hello, ${/name}!\" }` - interpolates references in the string. Absolute paths like `${/path}` resolve against the state model. Bare names like `${field}` resolve against the current repeat item first, then fall back to the state model at `/<field>`.");
|
|
1844
|
+
lines.push(" Example: `\"label\": { \"$template\": \"Items: ${/cart/count} | Total: ${/cart/total}\" }` renders \"Items: 3 | Total: 42.00\" when /cart/count is 3 and /cart/total is 42.00. Inside a repeat, `{ \"$template\": \"${name} - ${email}\" }` reads name and email from each item.");
|
|
1808
1845
|
lines.push("");
|
|
1809
1846
|
const catalogFunctions = catalog.data.functions;
|
|
1810
1847
|
if (catalogFunctions && Object.keys(catalogFunctions).length > 0) {
|
|
@@ -1994,7 +2031,10 @@ function formatZodType(schema) {
|
|
|
1994
2031
|
case "ZodBoolean":
|
|
1995
2032
|
case "boolean": return "boolean";
|
|
1996
2033
|
case "ZodLiteral":
|
|
1997
|
-
case "literal":
|
|
2034
|
+
case "literal": {
|
|
2035
|
+
const litValue = def.values?.[0] ?? def.value;
|
|
2036
|
+
return JSON.stringify(litValue);
|
|
2037
|
+
}
|
|
1998
2038
|
case "ZodEnum":
|
|
1999
2039
|
case "enum": {
|
|
2000
2040
|
let values;
|
|
@@ -2029,6 +2069,17 @@ function formatZodType(schema) {
|
|
|
2029
2069
|
const options = def.options;
|
|
2030
2070
|
return options ? options.map((opt) => formatZodType(opt)).join(" | ") : "unknown";
|
|
2031
2071
|
}
|
|
2072
|
+
case "ZodRecord":
|
|
2073
|
+
case "record": {
|
|
2074
|
+
const keyType = def.keyType ?? void 0;
|
|
2075
|
+
const valueType = def.valueType ?? def.element ?? void 0;
|
|
2076
|
+
return `Record<${keyType ? formatZodType(keyType) : "string"}, ${valueType ? formatZodType(valueType) : "unknown"}>`;
|
|
2077
|
+
}
|
|
2078
|
+
case "ZodDefault":
|
|
2079
|
+
case "default": {
|
|
2080
|
+
const inner = def.innerType ?? def.wrapped;
|
|
2081
|
+
return inner ? formatZodType(inner) : "unknown";
|
|
2082
|
+
}
|
|
2032
2083
|
default: return "unknown";
|
|
2033
2084
|
}
|
|
2034
2085
|
}
|
|
@@ -2226,7 +2277,7 @@ function diffToPatches(oldObj, newObj, basePath = "") {
|
|
|
2226
2277
|
return patches;
|
|
2227
2278
|
}
|
|
2228
2279
|
//#endregion
|
|
2229
|
-
//#region ../../node_modules/.bun/@json-render+react@0.
|
|
2280
|
+
//#region ../../node_modules/.bun/@json-render+react@0.18.0+3f10a4be4e334a9b/node_modules/@json-render/react/dist/chunk-WYDS23XB.mjs
|
|
2230
2281
|
var schema = defineSchema((s) => ({
|
|
2231
2282
|
spec: s.object({
|
|
2232
2283
|
root: s.string(),
|
|
@@ -2281,7 +2332,7 @@ var schema = defineSchema((s) => ({
|
|
|
2281
2332
|
]
|
|
2282
2333
|
});
|
|
2283
2334
|
//#endregion
|
|
2284
|
-
//#region ../../node_modules/.bun/@json-render+react@0.
|
|
2335
|
+
//#region ../../node_modules/.bun/@json-render+react@0.18.0+3f10a4be4e334a9b/node_modules/@json-render/react/dist/index.mjs
|
|
2285
2336
|
var StateContext = createContext(null);
|
|
2286
2337
|
function computeInitialFlat(isControlled, initialState) {
|
|
2287
2338
|
if (isControlled) return null;
|
|
@@ -2554,84 +2605,114 @@ function ActionProvider({ handlers: initialHandlers = {}, navigate, children })
|
|
|
2554
2605
|
}, []);
|
|
2555
2606
|
const execute = useCallback(async (binding) => {
|
|
2556
2607
|
const resolved = resolveAction(binding, getSnapshot());
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2608
|
+
const dispatchId = nextActionDispatchId();
|
|
2609
|
+
const dispatchedAt = Date.now();
|
|
2610
|
+
notifyActionDispatch({
|
|
2611
|
+
id: dispatchId,
|
|
2612
|
+
name: resolved.action,
|
|
2613
|
+
params: resolved.params,
|
|
2614
|
+
at: dispatchedAt
|
|
2615
|
+
});
|
|
2616
|
+
let __ok = true;
|
|
2617
|
+
let __error = void 0;
|
|
2618
|
+
try {
|
|
2619
|
+
if (resolved.action === "setState" && resolved.params) {
|
|
2620
|
+
const statePath = resolved.params.statePath;
|
|
2621
|
+
const value2 = resolved.params.value;
|
|
2622
|
+
if (statePath) set(statePath, value2);
|
|
2623
|
+
return;
|
|
2571
2624
|
}
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2625
|
+
if (resolved.action === "pushState" && resolved.params) {
|
|
2626
|
+
const statePath = resolved.params.statePath;
|
|
2627
|
+
const rawValue = resolved.params.value;
|
|
2628
|
+
if (statePath) {
|
|
2629
|
+
const resolvedValue = deepResolveValue(rawValue, get);
|
|
2630
|
+
set(statePath, [...get(statePath) ?? [], resolvedValue]);
|
|
2631
|
+
const clearStatePath = resolved.params.clearStatePath;
|
|
2632
|
+
if (clearStatePath) set(clearStatePath, "");
|
|
2633
|
+
}
|
|
2634
|
+
return;
|
|
2635
|
+
}
|
|
2636
|
+
if (resolved.action === "removeState" && resolved.params) {
|
|
2637
|
+
const statePath = resolved.params.statePath;
|
|
2638
|
+
const index = resolved.params.index;
|
|
2639
|
+
if (statePath !== void 0 && index !== void 0) set(statePath, (get(statePath) ?? []).filter((_, i) => i !== index));
|
|
2640
|
+
return;
|
|
2641
|
+
}
|
|
2642
|
+
if (resolved.action === "push" && resolved.params) {
|
|
2643
|
+
const screen = resolved.params.screen;
|
|
2644
|
+
if (screen) {
|
|
2645
|
+
const currentScreen = get("/currentScreen");
|
|
2646
|
+
const navStack = get("/navStack") ?? [];
|
|
2647
|
+
if (currentScreen) set("/navStack", [...navStack, currentScreen]);
|
|
2648
|
+
else set("/navStack", [...navStack, ""]);
|
|
2649
|
+
set("/currentScreen", screen);
|
|
2650
|
+
}
|
|
2651
|
+
return;
|
|
2652
|
+
}
|
|
2653
|
+
if (resolved.action === "pop") {
|
|
2584
2654
|
const navStack = get("/navStack") ?? [];
|
|
2585
|
-
if (
|
|
2586
|
-
|
|
2587
|
-
|
|
2655
|
+
if (navStack.length > 0) {
|
|
2656
|
+
const previousScreen = navStack[navStack.length - 1];
|
|
2657
|
+
set("/navStack", navStack.slice(0, -1));
|
|
2658
|
+
if (previousScreen) set("/currentScreen", previousScreen);
|
|
2659
|
+
else set("/currentScreen", void 0);
|
|
2660
|
+
}
|
|
2661
|
+
return;
|
|
2588
2662
|
}
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2663
|
+
if (resolved.action === "validateForm") {
|
|
2664
|
+
const validateAll = validation?.validateAll;
|
|
2665
|
+
if (!validateAll) {
|
|
2666
|
+
console.warn("validateForm action was dispatched but no ValidationProvider is connected. Ensure ValidationProvider is rendered inside the provider tree.");
|
|
2667
|
+
return;
|
|
2668
|
+
}
|
|
2669
|
+
const valid = validateAll();
|
|
2670
|
+
const errors = {};
|
|
2671
|
+
for (const [path, fs] of Object.entries(validation.fieldStates)) if (fs.result && !fs.result.valid) errors[path] = fs.result.errors;
|
|
2672
|
+
set(resolved.params?.statePath || "/formValidation", {
|
|
2673
|
+
valid,
|
|
2674
|
+
errors
|
|
2675
|
+
});
|
|
2676
|
+
return;
|
|
2598
2677
|
}
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
const validateAll = validation?.validateAll;
|
|
2603
|
-
if (!validateAll) {
|
|
2604
|
-
console.warn("validateForm action was dispatched but no ValidationProvider is connected. Ensure ValidationProvider is rendered inside the provider tree.");
|
|
2678
|
+
const handler = handlers[resolved.action];
|
|
2679
|
+
if (!handler) {
|
|
2680
|
+
console.warn(`No handler registered for action: ${resolved.action}`);
|
|
2605
2681
|
return;
|
|
2606
2682
|
}
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2683
|
+
if (resolved.confirm) return new Promise((resolve, reject) => {
|
|
2684
|
+
setPendingConfirmation({
|
|
2685
|
+
action: resolved,
|
|
2686
|
+
handler,
|
|
2687
|
+
resolve: () => {
|
|
2688
|
+
setPendingConfirmation(null);
|
|
2689
|
+
resolve();
|
|
2690
|
+
},
|
|
2691
|
+
reject: () => {
|
|
2692
|
+
setPendingConfirmation(null);
|
|
2693
|
+
reject(/* @__PURE__ */ new Error("Action cancelled"));
|
|
2694
|
+
}
|
|
2695
|
+
});
|
|
2696
|
+
}).then(async () => {
|
|
2697
|
+
setLoadingActions((prev) => new Set(prev).add(resolved.action));
|
|
2698
|
+
try {
|
|
2699
|
+
await executeAction({
|
|
2700
|
+
action: resolved,
|
|
2701
|
+
handler,
|
|
2702
|
+
setState: set,
|
|
2703
|
+
navigate,
|
|
2704
|
+
executeAction: async (name) => {
|
|
2705
|
+
await execute({ action: name });
|
|
2706
|
+
}
|
|
2707
|
+
});
|
|
2708
|
+
} finally {
|
|
2709
|
+
setLoadingActions((prev) => {
|
|
2710
|
+
const next = new Set(prev);
|
|
2711
|
+
next.delete(resolved.action);
|
|
2712
|
+
return next;
|
|
2713
|
+
});
|
|
2632
2714
|
}
|
|
2633
2715
|
});
|
|
2634
|
-
}).then(async () => {
|
|
2635
2716
|
setLoadingActions((prev) => new Set(prev).add(resolved.action));
|
|
2636
2717
|
try {
|
|
2637
2718
|
await executeAction({
|
|
@@ -2650,23 +2731,19 @@ function ActionProvider({ handlers: initialHandlers = {}, navigate, children })
|
|
|
2650
2731
|
return next;
|
|
2651
2732
|
});
|
|
2652
2733
|
}
|
|
2653
|
-
})
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
action: resolved,
|
|
2658
|
-
handler,
|
|
2659
|
-
setState: set,
|
|
2660
|
-
navigate,
|
|
2661
|
-
executeAction: async (name) => {
|
|
2662
|
-
await execute({ action: name });
|
|
2663
|
-
}
|
|
2664
|
-
});
|
|
2734
|
+
} catch (err) {
|
|
2735
|
+
__ok = false;
|
|
2736
|
+
__error = err;
|
|
2737
|
+
throw err;
|
|
2665
2738
|
} finally {
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2739
|
+
const now = Date.now();
|
|
2740
|
+
notifyActionSettle({
|
|
2741
|
+
id: dispatchId,
|
|
2742
|
+
name: resolved.action,
|
|
2743
|
+
ok: __ok,
|
|
2744
|
+
at: now,
|
|
2745
|
+
durationMs: now - dispatchedAt,
|
|
2746
|
+
error: __error
|
|
2670
2747
|
});
|
|
2671
2748
|
}
|
|
2672
2749
|
}, [
|
|
@@ -2817,7 +2894,11 @@ var FunctionsContext = React.createContext(EMPTY_FUNCTIONS);
|
|
|
2817
2894
|
function useFunctions() {
|
|
2818
2895
|
return React.useContext(FunctionsContext);
|
|
2819
2896
|
}
|
|
2820
|
-
|
|
2897
|
+
function useDevtoolsActive() {
|
|
2898
|
+
return React.useSyncExternalStore(subscribeDevtoolsActive, isDevtoolsActive, () => false);
|
|
2899
|
+
}
|
|
2900
|
+
var ElementRenderer = React.memo(function ElementRenderer2({ element, elementKey, spec, registry, loading, fallback }) {
|
|
2901
|
+
const devtoolsActive = useDevtoolsActive();
|
|
2821
2902
|
const repeatScope = useRepeatScope();
|
|
2822
2903
|
const { ctx } = useVisibility();
|
|
2823
2904
|
const { execute } = useActions();
|
|
@@ -2953,36 +3034,42 @@ var ElementRenderer = React.memo(function ElementRenderer2({ element, spec, regi
|
|
|
2953
3034
|
console.warn(`No renderer for component type: ${resolvedElement.type}`);
|
|
2954
3035
|
return null;
|
|
2955
3036
|
}
|
|
2956
|
-
const
|
|
3037
|
+
const rendered = /* @__PURE__ */ jsx(Component, {
|
|
2957
3038
|
element: resolvedElement,
|
|
2958
|
-
|
|
2959
|
-
|
|
3039
|
+
emit,
|
|
3040
|
+
on,
|
|
3041
|
+
bindings: elementBindings,
|
|
2960
3042
|
loading,
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
const childElement = spec.elements[childKey];
|
|
2964
|
-
if (!childElement) {
|
|
2965
|
-
if (!loading) console.warn(`[json-render] Missing element "${childKey}" referenced as child of "${resolvedElement.type}". This element will not render.`);
|
|
2966
|
-
return null;
|
|
2967
|
-
}
|
|
2968
|
-
return /* @__PURE__ */ jsx(ElementRenderer2, {
|
|
2969
|
-
element: childElement,
|
|
3043
|
+
children: resolvedElement.repeat ? /* @__PURE__ */ jsx(RepeatChildren, {
|
|
3044
|
+
element: resolvedElement,
|
|
2970
3045
|
spec,
|
|
2971
3046
|
registry,
|
|
2972
3047
|
loading,
|
|
2973
3048
|
fallback
|
|
2974
|
-
}
|
|
3049
|
+
}) : resolvedElement.children?.map((childKey) => {
|
|
3050
|
+
const childElement = spec.elements[childKey];
|
|
3051
|
+
if (!childElement) {
|
|
3052
|
+
if (!loading) console.warn(`[json-render] Missing element "${childKey}" referenced as child of "${resolvedElement.type}". This element will not render.`);
|
|
3053
|
+
return null;
|
|
3054
|
+
}
|
|
3055
|
+
return /* @__PURE__ */ jsx(ElementRenderer2, {
|
|
3056
|
+
element: childElement,
|
|
3057
|
+
elementKey: childKey,
|
|
3058
|
+
spec,
|
|
3059
|
+
registry,
|
|
3060
|
+
loading,
|
|
3061
|
+
fallback
|
|
3062
|
+
}, childKey);
|
|
3063
|
+
})
|
|
2975
3064
|
});
|
|
3065
|
+
const tagged = devtoolsActive && elementKey ? /* @__PURE__ */ jsx("span", {
|
|
3066
|
+
"data-jr-key": elementKey,
|
|
3067
|
+
style: { display: "contents" },
|
|
3068
|
+
children: rendered
|
|
3069
|
+
}) : rendered;
|
|
2976
3070
|
return /* @__PURE__ */ jsx(ElementErrorBoundary, {
|
|
2977
3071
|
elementType: resolvedElement.type,
|
|
2978
|
-
children:
|
|
2979
|
-
element: resolvedElement,
|
|
2980
|
-
emit,
|
|
2981
|
-
on,
|
|
2982
|
-
bindings: elementBindings,
|
|
2983
|
-
loading,
|
|
2984
|
-
children
|
|
2985
|
-
})
|
|
3072
|
+
children: tagged
|
|
2986
3073
|
});
|
|
2987
3074
|
});
|
|
2988
3075
|
function RepeatChildren({ element, spec, registry, loading, fallback }) {
|
|
@@ -3003,6 +3090,7 @@ function RepeatChildren({ element, spec, registry, loading, fallback }) {
|
|
|
3003
3090
|
}
|
|
3004
3091
|
return /* @__PURE__ */ jsx(ElementRenderer, {
|
|
3005
3092
|
element: childElement,
|
|
3093
|
+
elementKey: childKey,
|
|
3006
3094
|
spec,
|
|
3007
3095
|
registry,
|
|
3008
3096
|
loading,
|
|
@@ -3018,6 +3106,7 @@ function Renderer({ spec, registry, loading, fallback }) {
|
|
|
3018
3106
|
if (!rootElement) return null;
|
|
3019
3107
|
return /* @__PURE__ */ jsx(ElementRenderer, {
|
|
3020
3108
|
element: rootElement,
|
|
3109
|
+
elementKey: spec.root,
|
|
3021
3110
|
spec,
|
|
3022
3111
|
registry,
|
|
3023
3112
|
loading,
|
|
@@ -3543,4 +3632,4 @@ function useChatUI({ api, onComplete, onError }) {
|
|
|
3543
3632
|
//#endregion
|
|
3544
3633
|
export { resolveDynamicValue as C, getByPath as S, sfComponents as T, defineCatalog as _, ValidationProvider as a, validateSpec as b, defineRegistry as c, useJsonRenderMessage as d, useUIStream as f, deepMergeSpec as g, buildUserPrompt as h, StateProvider as i, useBoundProp as l, autoFixSpec as m, JSONUIProvider as n, VisibilityProvider as o, schema as p, Renderer as r, createRenderer as s, ActionProvider as t, useChatUI as u, diffToPatches as v, setByPath as w, createStateStore as x, evaluateVisibility as y };
|
|
3545
3634
|
|
|
3546
|
-
//# sourceMappingURL=dist-
|
|
3635
|
+
//# sourceMappingURL=dist-1-gcEL2L.js.map
|