@signalflare-ai/ui 0.5.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 +96 -0
- package/README.md +527 -0
- package/ai/USAGE.md +200 -0
- package/ai/component-registry.json +7103 -0
- package/ai/component-registry.md +3046 -0
- package/ai/schemas.ts +1230 -0
- package/bin/intent.js +23 -0
- package/bin/sf.js +34 -0
- package/dist/.build-complete +1 -0
- package/dist/ai/schemas.d.ts +7056 -0
- package/dist/ai/schemas.d.ts.map +1 -0
- package/dist/ai-actions-DG1dhDMP.js +57 -0
- package/dist/ai-actions-DG1dhDMP.js.map +1 -0
- package/dist/ai-agent-card-BbtL4NII.js +171 -0
- package/dist/ai-agent-card-BbtL4NII.js.map +1 -0
- package/dist/ai-approval-Mb7-BY6i.js +184 -0
- package/dist/ai-approval-Mb7-BY6i.js.map +1 -0
- package/dist/ai-code-block-BI_z0UVR.js +110 -0
- package/dist/ai-code-block-BI_z0UVR.js.map +1 -0
- package/dist/ai-conversation-DYtExcrw.js +184 -0
- package/dist/ai-conversation-DYtExcrw.js.map +1 -0
- package/dist/ai-info-banner-BpzauUAY.js +76 -0
- package/dist/ai-info-banner-BpzauUAY.js.map +1 -0
- package/dist/ai-loader-Cr3eQkNS.js +134 -0
- package/dist/ai-loader-Cr3eQkNS.js.map +1 -0
- package/dist/ai-message-CV8SBoHM.js +286 -0
- package/dist/ai-message-CV8SBoHM.js.map +1 -0
- package/dist/ai-mission-header-ByYkJ6YP.js +171 -0
- package/dist/ai-mission-header-ByYkJ6YP.js.map +1 -0
- package/dist/ai-prompt-input-Bo1YuJly.js +769 -0
- package/dist/ai-prompt-input-Bo1YuJly.js.map +1 -0
- package/dist/ai-question-Dp1g9k2o.js +149 -0
- package/dist/ai-question-Dp1g9k2o.js.map +1 -0
- package/dist/ai-reasoning-UAmNx_LD.js +270 -0
- package/dist/ai-reasoning-UAmNx_LD.js.map +1 -0
- package/dist/ai-response-BWoVsNQG.js +42 -0
- package/dist/ai-response-BWoVsNQG.js.map +1 -0
- package/dist/ai-shimmer-BpOmfonu.js +43 -0
- package/dist/ai-shimmer-BpOmfonu.js.map +1 -0
- package/dist/ai-status-badge-WhbKVeqn.js +63 -0
- package/dist/ai-status-badge-WhbKVeqn.js.map +1 -0
- package/dist/ai-streaming-text-ClL7FwvD.js +81 -0
- package/dist/ai-streaming-text-ClL7FwvD.js.map +1 -0
- package/dist/ai-subagent-BruGN1UE.js +133 -0
- package/dist/ai-subagent-BruGN1UE.js.map +1 -0
- package/dist/ai-suggestion-CNsCZj5P.js +55 -0
- package/dist/ai-suggestion-CNsCZj5P.js.map +1 -0
- package/dist/ai-task-list-B9CpMDYN.js +120 -0
- package/dist/ai-task-list-B9CpMDYN.js.map +1 -0
- package/dist/ai-timeline-Bb5ntsr3.js +373 -0
- package/dist/ai-timeline-Bb5ntsr3.js.map +1 -0
- package/dist/ai-tool-BGH8nQ_D.js +437 -0
- package/dist/ai-tool-BGH8nQ_D.js.map +1 -0
- package/dist/ai-usage-bar-BI-p-JBk.js +70 -0
- package/dist/ai-usage-bar-BI-p-JBk.js.map +1 -0
- package/dist/badge-D_eaA6wv.js +128 -0
- package/dist/badge-D_eaA6wv.js.map +1 -0
- package/dist/banner-B_6oBrsu.js +54 -0
- package/dist/banner-B_6oBrsu.js.map +1 -0
- package/dist/breadcrumbs-BlmeYfgq.js +128 -0
- package/dist/breadcrumbs-BlmeYfgq.js.map +1 -0
- package/dist/button-De0267YU.js +170 -0
- package/dist/button-De0267YU.js.map +1 -0
- package/dist/catalog.js +506 -0
- package/dist/catalog.js.map +1 -0
- package/dist/chart-Bes4MN3C.js +618 -0
- package/dist/chart-Bes4MN3C.js.map +1 -0
- package/dist/checkbox-CPX7lBaU.js +153 -0
- package/dist/checkbox-CPX7lBaU.js.map +1 -0
- package/dist/clipboard-text-92YeCybc.js +176 -0
- package/dist/clipboard-text-92YeCybc.js.map +1 -0
- package/dist/cn-YROP2_ox.js +25 -0
- package/dist/cn-YROP2_ox.js.map +1 -0
- package/dist/code-DE1Yy1Cu.js +97 -0
- package/dist/code-DE1Yy1Cu.js.map +1 -0
- package/dist/collapsible-DWsXeXmS.js +72 -0
- package/dist/collapsible-DWsXeXmS.js.map +1 -0
- package/dist/combobox-B0bLdsX8.js +197 -0
- package/dist/combobox-B0bLdsX8.js.map +1 -0
- package/dist/command-line/cli.js +823 -0
- package/dist/command-palette-CBTY8EiF.js +484 -0
- package/dist/command-palette-CBTY8EiF.js.map +1 -0
- package/dist/components/ai-actions.js +3 -0
- package/dist/components/ai-agent-card.js +3 -0
- package/dist/components/ai-approval.js +3 -0
- package/dist/components/ai-code-block.js +3 -0
- package/dist/components/ai-conversation.js +3 -0
- package/dist/components/ai-info-banner.js +3 -0
- package/dist/components/ai-loader.js +3 -0
- package/dist/components/ai-message.js +3 -0
- package/dist/components/ai-mission-header.js +3 -0
- package/dist/components/ai-prompt-input.js +3 -0
- package/dist/components/ai-question.js +3 -0
- package/dist/components/ai-reasoning.js +3 -0
- package/dist/components/ai-response.js +3 -0
- package/dist/components/ai-shimmer.js +3 -0
- package/dist/components/ai-status-badge.js +3 -0
- package/dist/components/ai-streaming-text.js +3 -0
- package/dist/components/ai-subagent.js +3 -0
- package/dist/components/ai-suggestion.js +3 -0
- package/dist/components/ai-task-list.js +3 -0
- package/dist/components/ai-timeline.js +3 -0
- package/dist/components/ai-tool.js +3 -0
- package/dist/components/ai-usage-bar.js +3 -0
- package/dist/components/badge.js +3 -0
- package/dist/components/banner.js +3 -0
- package/dist/components/breadcrumbs.js +3 -0
- package/dist/components/button.js +3 -0
- package/dist/components/chart.js +3 -0
- package/dist/components/checkbox.js +3 -0
- package/dist/components/clipboard-text.js +3 -0
- package/dist/components/code.js +3 -0
- package/dist/components/collapsible.js +3 -0
- package/dist/components/combobox.js +3 -0
- package/dist/components/command-palette.js +3 -0
- package/dist/components/data-grid.js +3 -0
- package/dist/components/date-picker.js +3 -0
- package/dist/components/date-range-picker.js +3 -0
- package/dist/components/dialog.js +3 -0
- package/dist/components/dropdown.js +3 -0
- package/dist/components/empty.js +3 -0
- package/dist/components/field.js +3 -0
- package/dist/components/filters.js +3 -0
- package/dist/components/flow.js +3 -0
- package/dist/components/grid.js +3 -0
- package/dist/components/input.js +4 -0
- package/dist/components/label.js +3 -0
- package/dist/components/layer-card.js +3 -0
- package/dist/components/link.js +92 -0
- package/dist/components/link.js.map +1 -0
- package/dist/components/loader.js +4 -0
- package/dist/components/menubar.js +3 -0
- package/dist/components/meter.js +3 -0
- package/dist/components/pagination.js +3 -0
- package/dist/components/popover.js +3 -0
- package/dist/components/radio.js +3 -0
- package/dist/components/select.js +3 -0
- package/dist/components/sensitive-input.js +3 -0
- package/dist/components/sidebar.js +3 -0
- package/dist/components/signalflare-ai-logo.js +3 -0
- package/dist/components/surface.js +3 -0
- package/dist/components/switch.js +3 -0
- package/dist/components/table.js +3 -0
- package/dist/components/tabs.js +3 -0
- package/dist/components/text.js +3 -0
- package/dist/components/theme-toggle.js +3 -0
- package/dist/components/toast.js +3 -0
- package/dist/components/tooltip.js +3 -0
- package/dist/components/use-agent-harness.js +3 -0
- package/dist/data-grid-UJ9ja5cu.js +305 -0
- package/dist/data-grid-UJ9ja5cu.js.map +1 -0
- package/dist/date-picker-ebekkC3R.js +57 -0
- package/dist/date-picker-ebekkC3R.js.map +1 -0
- package/dist/date-range-picker-D75LLINc.js +347 -0
- package/dist/date-range-picker-D75LLINc.js.map +1 -0
- package/dist/dialog-CyHEQXEY.js +104 -0
- package/dist/dialog-CyHEQXEY.js.map +1 -0
- package/dist/dist-BNlyONdD.js +3546 -0
- package/dist/dist-BNlyONdD.js.map +1 -0
- package/dist/dropdown-J5T4pHaR.js +202 -0
- package/dist/dropdown-J5T4pHaR.js.map +1 -0
- package/dist/empty-D2TypIId.js +90 -0
- package/dist/empty-D2TypIId.js.map +1 -0
- package/dist/favicon.svg +4 -0
- package/dist/field-Y_UK1_Cg.js +57 -0
- package/dist/field-Y_UK1_Cg.js.map +1 -0
- package/dist/filters-BdBogf7D.js +682 -0
- package/dist/filters-BdBogf7D.js.map +1 -0
- package/dist/flow-BRsYUCJa.js +741 -0
- package/dist/flow-BRsYUCJa.js.map +1 -0
- package/dist/genui.js +40 -0
- package/dist/genui.js.map +1 -0
- package/dist/grid-qUAN9hFx.js +119 -0
- package/dist/grid-qUAN9hFx.js.map +1 -0
- package/dist/highlight-to-react-ClEfL81q.js +57 -0
- package/dist/highlight-to-react-ClEfL81q.js.map +1 -0
- package/dist/index.js +215 -0
- package/dist/index.js.map +1 -0
- package/dist/input-BxQAnXki.js +81 -0
- package/dist/input-BxQAnXki.js.map +1 -0
- package/dist/input-Cn25I4o5.js +121 -0
- package/dist/input-Cn25I4o5.js.map +1 -0
- package/dist/label-QtJxtJ4u.js +70 -0
- package/dist/label-QtJxtJ4u.js.map +1 -0
- package/dist/layer-card-BME0eljh.js +44 -0
- package/dist/layer-card-BME0eljh.js.map +1 -0
- package/dist/link-provider-BUZKXaNE.js +25 -0
- package/dist/link-provider-BUZKXaNE.js.map +1 -0
- package/dist/loader-DAcc-Uag.js +84 -0
- package/dist/loader-DAcc-Uag.js.map +1 -0
- package/dist/logo.svg +1 -0
- package/dist/menubar-C8NzAjfd.js +102 -0
- package/dist/menubar-C8NzAjfd.js.map +1 -0
- package/dist/meter-CpmTenEr.js +37 -0
- package/dist/meter-CpmTenEr.js.map +1 -0
- package/dist/pagination-C_YqCy8l.js +117 -0
- package/dist/pagination-C_YqCy8l.js.map +1 -0
- package/dist/popover-BRQZ2b6z.js +147 -0
- package/dist/popover-BRQZ2b6z.js.map +1 -0
- package/dist/primitives/accordion.js +2 -0
- package/dist/primitives/alert-dialog.js +2 -0
- package/dist/primitives/autocomplete.js +2 -0
- package/dist/primitives/avatar.js +2 -0
- package/dist/primitives/button.js +2 -0
- package/dist/primitives/checkbox-group.js +2 -0
- package/dist/primitives/checkbox.js +2 -0
- package/dist/primitives/collapsible.js +2 -0
- package/dist/primitives/combobox.js +2 -0
- package/dist/primitives/context-menu.js +2 -0
- package/dist/primitives/csp-provider.js +2 -0
- package/dist/primitives/dialog.js +2 -0
- package/dist/primitives/direction-provider.js +2 -0
- package/dist/primitives/drawer.js +2 -0
- package/dist/primitives/field.js +2 -0
- package/dist/primitives/fieldset.js +2 -0
- package/dist/primitives/form.js +2 -0
- package/dist/primitives/input.js +2 -0
- package/dist/primitives/menu.js +2 -0
- package/dist/primitives/menubar.js +2 -0
- package/dist/primitives/meter.js +2 -0
- package/dist/primitives/navigation-menu.js +2 -0
- package/dist/primitives/number-field.js +2 -0
- package/dist/primitives/popover.js +2 -0
- package/dist/primitives/preview-card.js +2 -0
- package/dist/primitives/progress.js +2 -0
- package/dist/primitives/radio-group.js +2 -0
- package/dist/primitives/radio.js +2 -0
- package/dist/primitives/scroll-area.js +2 -0
- package/dist/primitives/select.js +2 -0
- package/dist/primitives/separator.js +2 -0
- package/dist/primitives/slider.js +2 -0
- package/dist/primitives/switch.js +2 -0
- package/dist/primitives/tabs.js +2 -0
- package/dist/primitives/toast.js +2 -0
- package/dist/primitives/toggle-group.js +2 -0
- package/dist/primitives/toggle.js +2 -0
- package/dist/primitives/toolbar.js +2 -0
- package/dist/primitives/tooltip.js +2 -0
- package/dist/primitives.js +40 -0
- package/dist/radio-B7zg1wUI.js +101 -0
- package/dist/radio-B7zg1wUI.js.map +1 -0
- package/dist/registry.js +1 -0
- package/dist/select-9p721G00.js +95 -0
- package/dist/select-9p721G00.js.map +1 -0
- package/dist/sensitive-input-D5je2NLl.js +248 -0
- package/dist/sensitive-input-D5je2NLl.js.map +1 -0
- package/dist/sidebar-DOwBrq57.js +964 -0
- package/dist/sidebar-DOwBrq57.js.map +1 -0
- package/dist/signalflare-ai-logo-DDhxMJD6.js +260 -0
- package/dist/signalflare-ai-logo-DDhxMJD6.js.map +1 -0
- package/dist/skeleton-line-Do3UmGk9.js +36 -0
- package/dist/skeleton-line-Do3UmGk9.js.map +1 -0
- package/dist/src/blocks/agent-harness/agent-harness.d.ts +177 -0
- package/dist/src/blocks/agent-harness/agent-harness.d.ts.map +1 -0
- package/dist/src/blocks/agent-harness/agent-harness.tsx +1122 -0
- package/dist/src/blocks/agent-harness/index.d.ts +2 -0
- package/dist/src/blocks/agent-harness/index.d.ts.map +1 -0
- package/dist/src/blocks/commander/commander.d.ts +101 -0
- package/dist/src/blocks/commander/commander.d.ts.map +1 -0
- package/dist/src/blocks/commander/commander.tsx +477 -0
- package/dist/src/blocks/commander/index.d.ts +2 -0
- package/dist/src/blocks/commander/index.d.ts.map +1 -0
- package/dist/src/blocks/delete-resource/delete-resource.d.ts +46 -0
- package/dist/src/blocks/delete-resource/delete-resource.d.ts.map +1 -0
- package/dist/src/blocks/delete-resource/delete-resource.tsx +214 -0
- package/dist/src/blocks/delete-resource/index.d.ts +2 -0
- package/dist/src/blocks/delete-resource/index.d.ts.map +1 -0
- package/dist/src/blocks/map-block/index.d.ts +2 -0
- package/dist/src/blocks/map-block/index.d.ts.map +1 -0
- package/dist/src/blocks/map-block/map-block.d.ts +79 -0
- package/dist/src/blocks/map-block/map-block.d.ts.map +1 -0
- package/dist/src/blocks/map-block/map-block.tsx +522 -0
- package/dist/src/blocks/page-header/index.d.ts +2 -0
- package/dist/src/blocks/page-header/index.d.ts.map +1 -0
- package/dist/src/blocks/page-header/page-header.d.ts +38 -0
- package/dist/src/blocks/page-header/page-header.d.ts.map +1 -0
- package/dist/src/blocks/page-header/page-header.tsx +96 -0
- package/dist/src/blocks/resource-list/index.d.ts +2 -0
- package/dist/src/blocks/resource-list/index.d.ts.map +1 -0
- package/dist/src/blocks/resource-list/resource-list.d.ts +18 -0
- package/dist/src/blocks/resource-list/resource-list.d.ts.map +1 -0
- package/dist/src/blocks/resource-list/resource-list.test.tsx +27 -0
- package/dist/src/blocks/resource-list/resource-list.tsx +65 -0
- package/dist/src/catalog/catalog.d.ts +75 -0
- package/dist/src/catalog/catalog.d.ts.map +1 -0
- package/dist/src/catalog/data.d.ts +44 -0
- package/dist/src/catalog/data.d.ts.map +1 -0
- package/dist/src/catalog/index.d.ts +35 -0
- package/dist/src/catalog/index.d.ts.map +1 -0
- package/dist/src/catalog/sf-components.d.ts +8 -0
- package/dist/src/catalog/sf-components.d.ts.map +1 -0
- package/dist/src/catalog/sf-registry.d.ts +4 -0
- package/dist/src/catalog/sf-registry.d.ts.map +1 -0
- package/dist/src/catalog/types.d.ts +226 -0
- package/dist/src/catalog/types.d.ts.map +1 -0
- package/dist/src/catalog/visibility.d.ts +37 -0
- package/dist/src/catalog/visibility.d.ts.map +1 -0
- package/dist/src/command-line/build-cli.d.ts +7 -0
- package/dist/src/command-line/build-cli.d.ts.map +1 -0
- package/dist/src/command-line/cli.d.ts +13 -0
- package/dist/src/command-line/cli.d.ts.map +1 -0
- package/dist/src/command-line/commands/add.d.ts +10 -0
- package/dist/src/command-line/commands/add.d.ts.map +1 -0
- package/dist/src/command-line/commands/ai.d.ts +10 -0
- package/dist/src/command-line/commands/ai.d.ts.map +1 -0
- package/dist/src/command-line/commands/blocks.d.ts +10 -0
- package/dist/src/command-line/commands/blocks.d.ts.map +1 -0
- package/dist/src/command-line/commands/doc.d.ts +14 -0
- package/dist/src/command-line/commands/doc.d.ts.map +1 -0
- package/dist/src/command-line/commands/init.d.ts +18 -0
- package/dist/src/command-line/commands/init.d.ts.map +1 -0
- package/dist/src/command-line/commands/ls.d.ts +10 -0
- package/dist/src/command-line/commands/ls.d.ts.map +1 -0
- package/dist/src/command-line/commands/migrate.d.ts +10 -0
- package/dist/src/command-line/commands/migrate.d.ts.map +1 -0
- package/dist/src/command-line/utils/config.d.ts +42 -0
- package/dist/src/command-line/utils/config.d.ts.map +1 -0
- package/dist/src/command-line/utils/transformer.d.ts +21 -0
- package/dist/src/command-line/utils/transformer.d.ts.map +1 -0
- package/dist/src/components/ai-actions/ai-actions.d.ts +35 -0
- package/dist/src/components/ai-actions/ai-actions.d.ts.map +1 -0
- package/dist/src/components/ai-actions/index.d.ts +2 -0
- package/dist/src/components/ai-actions/index.d.ts.map +1 -0
- package/dist/src/components/ai-agent-card/ai-agent-card.d.ts +82 -0
- package/dist/src/components/ai-agent-card/ai-agent-card.d.ts.map +1 -0
- package/dist/src/components/ai-agent-card/index.d.ts +2 -0
- package/dist/src/components/ai-agent-card/index.d.ts.map +1 -0
- package/dist/src/components/ai-approval/ai-approval.d.ts +102 -0
- package/dist/src/components/ai-approval/ai-approval.d.ts.map +1 -0
- package/dist/src/components/ai-approval/index.d.ts +2 -0
- package/dist/src/components/ai-approval/index.d.ts.map +1 -0
- package/dist/src/components/ai-code-block/ai-code-block.d.ts +48 -0
- package/dist/src/components/ai-code-block/ai-code-block.d.ts.map +1 -0
- package/dist/src/components/ai-code-block/index.d.ts +2 -0
- package/dist/src/components/ai-code-block/index.d.ts.map +1 -0
- package/dist/src/components/ai-conversation/ai-conversation.d.ts +125 -0
- package/dist/src/components/ai-conversation/ai-conversation.d.ts.map +1 -0
- package/dist/src/components/ai-conversation/index.d.ts +2 -0
- package/dist/src/components/ai-conversation/index.d.ts.map +1 -0
- package/dist/src/components/ai-info-banner/ai-info-banner.d.ts +55 -0
- package/dist/src/components/ai-info-banner/ai-info-banner.d.ts.map +1 -0
- package/dist/src/components/ai-info-banner/index.d.ts +2 -0
- package/dist/src/components/ai-info-banner/index.d.ts.map +1 -0
- package/dist/src/components/ai-loader/ai-loader.d.ts +44 -0
- package/dist/src/components/ai-loader/ai-loader.d.ts.map +1 -0
- package/dist/src/components/ai-loader/index.d.ts +2 -0
- package/dist/src/components/ai-loader/index.d.ts.map +1 -0
- package/dist/src/components/ai-message/ai-message.d.ts +97 -0
- package/dist/src/components/ai-message/ai-message.d.ts.map +1 -0
- package/dist/src/components/ai-message/index.d.ts +2 -0
- package/dist/src/components/ai-message/index.d.ts.map +1 -0
- package/dist/src/components/ai-mission-header/ai-mission-header.d.ts +62 -0
- package/dist/src/components/ai-mission-header/ai-mission-header.d.ts.map +1 -0
- package/dist/src/components/ai-mission-header/index.d.ts +2 -0
- package/dist/src/components/ai-mission-header/index.d.ts.map +1 -0
- package/dist/src/components/ai-prompt-input/ai-prompt-input.d.ts +260 -0
- package/dist/src/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -0
- package/dist/src/components/ai-prompt-input/index.d.ts +2 -0
- package/dist/src/components/ai-prompt-input/index.d.ts.map +1 -0
- package/dist/src/components/ai-question/ai-question.d.ts +73 -0
- package/dist/src/components/ai-question/ai-question.d.ts.map +1 -0
- package/dist/src/components/ai-question/index.d.ts +2 -0
- package/dist/src/components/ai-question/index.d.ts.map +1 -0
- package/dist/src/components/ai-reasoning/ai-reasoning.d.ts +107 -0
- package/dist/src/components/ai-reasoning/ai-reasoning.d.ts.map +1 -0
- package/dist/src/components/ai-reasoning/index.d.ts +2 -0
- package/dist/src/components/ai-reasoning/index.d.ts.map +1 -0
- package/dist/src/components/ai-response/ai-response.d.ts +26 -0
- package/dist/src/components/ai-response/ai-response.d.ts.map +1 -0
- package/dist/src/components/ai-response/index.d.ts +2 -0
- package/dist/src/components/ai-response/index.d.ts.map +1 -0
- package/dist/src/components/ai-shimmer/ai-shimmer.d.ts +29 -0
- package/dist/src/components/ai-shimmer/ai-shimmer.d.ts.map +1 -0
- package/dist/src/components/ai-shimmer/index.d.ts +2 -0
- package/dist/src/components/ai-shimmer/index.d.ts.map +1 -0
- package/dist/src/components/ai-status-badge/ai-status-badge.d.ts +46 -0
- package/dist/src/components/ai-status-badge/ai-status-badge.d.ts.map +1 -0
- package/dist/src/components/ai-status-badge/index.d.ts +2 -0
- package/dist/src/components/ai-status-badge/index.d.ts.map +1 -0
- package/dist/src/components/ai-streaming-text/ai-streaming-text.d.ts +27 -0
- package/dist/src/components/ai-streaming-text/ai-streaming-text.d.ts.map +1 -0
- package/dist/src/components/ai-streaming-text/index.d.ts +2 -0
- package/dist/src/components/ai-streaming-text/index.d.ts.map +1 -0
- package/dist/src/components/ai-subagent/ai-subagent.d.ts +74 -0
- package/dist/src/components/ai-subagent/ai-subagent.d.ts.map +1 -0
- package/dist/src/components/ai-subagent/index.d.ts +2 -0
- package/dist/src/components/ai-subagent/index.d.ts.map +1 -0
- package/dist/src/components/ai-suggestion/ai-suggestion.d.ts +40 -0
- package/dist/src/components/ai-suggestion/ai-suggestion.d.ts.map +1 -0
- package/dist/src/components/ai-suggestion/index.d.ts +2 -0
- package/dist/src/components/ai-suggestion/index.d.ts.map +1 -0
- package/dist/src/components/ai-task-list/ai-task-list.d.ts +61 -0
- package/dist/src/components/ai-task-list/ai-task-list.d.ts.map +1 -0
- package/dist/src/components/ai-task-list/index.d.ts +2 -0
- package/dist/src/components/ai-task-list/index.d.ts.map +1 -0
- package/dist/src/components/ai-timeline/ai-timeline.d.ts +130 -0
- package/dist/src/components/ai-timeline/ai-timeline.d.ts.map +1 -0
- package/dist/src/components/ai-timeline/index.d.ts +2 -0
- package/dist/src/components/ai-timeline/index.d.ts.map +1 -0
- package/dist/src/components/ai-tool/ai-tool.d.ts +138 -0
- package/dist/src/components/ai-tool/ai-tool.d.ts.map +1 -0
- package/dist/src/components/ai-tool/index.d.ts +2 -0
- package/dist/src/components/ai-tool/index.d.ts.map +1 -0
- package/dist/src/components/ai-usage-bar/ai-usage-bar.d.ts +38 -0
- package/dist/src/components/ai-usage-bar/ai-usage-bar.d.ts.map +1 -0
- package/dist/src/components/ai-usage-bar/index.d.ts +2 -0
- package/dist/src/components/ai-usage-bar/index.d.ts.map +1 -0
- package/dist/src/components/badge/badge.d.ts +129 -0
- package/dist/src/components/badge/badge.d.ts.map +1 -0
- package/dist/src/components/badge/index.d.ts +2 -0
- package/dist/src/components/badge/index.d.ts.map +1 -0
- package/dist/src/components/banner/banner.d.ts +80 -0
- package/dist/src/components/banner/banner.d.ts.map +1 -0
- package/dist/src/components/banner/index.d.ts +2 -0
- package/dist/src/components/banner/index.d.ts.map +1 -0
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +78 -0
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/src/components/breadcrumbs/index.d.ts +2 -0
- package/dist/src/components/breadcrumbs/index.d.ts.map +1 -0
- package/dist/src/components/button/button.d.ts +212 -0
- package/dist/src/components/button/button.d.ts.map +1 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/button/index.d.ts.map +1 -0
- package/dist/src/components/chart/color.d.ts +98 -0
- package/dist/src/components/chart/color.d.ts.map +1 -0
- package/dist/src/components/chart/echart.d.ts +135 -0
- package/dist/src/components/chart/echart.d.ts.map +1 -0
- package/dist/src/components/chart/index.d.ts +5 -0
- package/dist/src/components/chart/index.d.ts.map +1 -0
- package/dist/src/components/chart/legend.d.ts +42 -0
- package/dist/src/components/chart/legend.d.ts.map +1 -0
- package/dist/src/components/chart/timeseries-chart.d.ts +119 -0
- package/dist/src/components/chart/timeseries-chart.d.ts.map +1 -0
- package/dist/src/components/checkbox/checkbox.d.ts +174 -0
- package/dist/src/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/src/components/checkbox/index.d.ts +2 -0
- package/dist/src/components/checkbox/index.d.ts.map +1 -0
- package/dist/src/components/clipboard-text/clipboard-text.d.ts +86 -0
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +1 -0
- package/dist/src/components/clipboard-text/index.d.ts +2 -0
- package/dist/src/components/clipboard-text/index.d.ts.map +1 -0
- package/dist/src/components/code/code.d.ts +165 -0
- package/dist/src/components/code/code.d.ts.map +1 -0
- package/dist/src/components/code/index.d.ts +4 -0
- package/dist/src/components/code/index.d.ts.map +1 -0
- package/dist/src/components/collapsible/collapsible.d.ts +72 -0
- package/dist/src/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/src/components/collapsible/index.d.ts +2 -0
- package/dist/src/components/collapsible/index.d.ts.map +1 -0
- package/dist/src/components/combobox/combobox.d.ts +188 -0
- package/dist/src/components/combobox/combobox.d.ts.map +1 -0
- package/dist/src/components/combobox/index.d.ts +2 -0
- package/dist/src/components/combobox/index.d.ts.map +1 -0
- package/dist/src/components/command-palette/command-palette.d.ts +260 -0
- package/dist/src/components/command-palette/command-palette.d.ts.map +1 -0
- package/dist/src/components/command-palette/index.d.ts +3 -0
- package/dist/src/components/command-palette/index.d.ts.map +1 -0
- package/dist/src/components/command-palette/types.d.ts +149 -0
- package/dist/src/components/command-palette/types.d.ts.map +1 -0
- package/dist/src/components/data-grid/data-grid.d.ts +78 -0
- package/dist/src/components/data-grid/data-grid.d.ts.map +1 -0
- package/dist/src/components/data-grid/index.d.ts +3 -0
- package/dist/src/components/data-grid/index.d.ts.map +1 -0
- package/dist/src/components/data-grid/types.d.ts +236 -0
- package/dist/src/components/data-grid/types.d.ts.map +1 -0
- package/dist/src/components/date-picker/date-picker.d.ts +65 -0
- package/dist/src/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/src/components/date-picker/index.d.ts +4 -0
- package/dist/src/components/date-picker/index.d.ts.map +1 -0
- package/dist/src/components/date-range-picker/date-range-picker.d.ts +125 -0
- package/dist/src/components/date-range-picker/date-range-picker.d.ts.map +1 -0
- package/dist/src/components/date-range-picker/index.d.ts +5 -0
- package/dist/src/components/date-range-picker/index.d.ts.map +1 -0
- package/dist/src/components/dialog/dialog.d.ts +189 -0
- package/dist/src/components/dialog/dialog.d.ts.map +1 -0
- package/dist/src/components/dialog/index.d.ts +2 -0
- package/dist/src/components/dialog/index.d.ts.map +1 -0
- package/dist/src/components/dropdown/dropdown.d.ts +91 -0
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -0
- package/dist/src/components/dropdown/index.d.ts +2 -0
- package/dist/src/components/dropdown/index.d.ts.map +1 -0
- package/dist/src/components/empty/empty.d.ts +69 -0
- package/dist/src/components/empty/empty.d.ts.map +1 -0
- package/dist/src/components/empty/index.d.ts +2 -0
- package/dist/src/components/empty/index.d.ts.map +1 -0
- package/dist/src/components/field/field.d.ts +68 -0
- package/dist/src/components/field/field.d.ts.map +1 -0
- package/dist/src/components/field/index.d.ts +2 -0
- package/dist/src/components/field/index.d.ts.map +1 -0
- package/dist/src/components/filters/filters.d.ts +54 -0
- package/dist/src/components/filters/filters.d.ts.map +1 -0
- package/dist/src/components/filters/helpers.d.ts +56 -0
- package/dist/src/components/filters/helpers.d.ts.map +1 -0
- package/dist/src/components/filters/index.d.ts +3 -0
- package/dist/src/components/filters/index.d.ts.map +1 -0
- package/dist/src/components/filters/types.d.ts +148 -0
- package/dist/src/components/filters/types.d.ts.map +1 -0
- package/dist/src/components/flow/connectors.d.ts +35 -0
- package/dist/src/components/flow/connectors.d.ts.map +1 -0
- package/dist/src/components/flow/diagram.d.ts +62 -0
- package/dist/src/components/flow/diagram.d.ts.map +1 -0
- package/dist/src/components/flow/index.d.ts +26 -0
- package/dist/src/components/flow/index.d.ts.map +1 -0
- package/dist/src/components/flow/node.d.ts +52 -0
- package/dist/src/components/flow/node.d.ts.map +1 -0
- package/dist/src/components/flow/parallel.d.ts +5 -0
- package/dist/src/components/flow/parallel.d.ts.map +1 -0
- package/dist/src/components/flow/use-children.d.ts +69 -0
- package/dist/src/components/flow/use-children.d.ts.map +1 -0
- package/dist/src/components/grid/grid.d.ts +135 -0
- package/dist/src/components/grid/grid.d.ts.map +1 -0
- package/dist/src/components/grid/index.d.ts +2 -0
- package/dist/src/components/grid/index.d.ts.map +1 -0
- package/dist/src/components/input/index.d.ts +4 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/input/input-area.d.ts +65 -0
- package/dist/src/components/input/input-area.d.ts.map +1 -0
- package/dist/src/components/input/input-group.d.ts +39 -0
- package/dist/src/components/input/input-group.d.ts.map +1 -0
- package/dist/src/components/input/input.d.ts +172 -0
- package/dist/src/components/input/input.d.ts.map +1 -0
- package/dist/src/components/label/index.d.ts +2 -0
- package/dist/src/components/label/index.d.ts.map +1 -0
- package/dist/src/components/label/label.d.ts +67 -0
- package/dist/src/components/label/label.d.ts.map +1 -0
- package/dist/src/components/layer-card/index.d.ts +2 -0
- package/dist/src/components/layer-card/index.d.ts.map +1 -0
- package/dist/src/components/layer-card/layer-card.d.ts +29 -0
- package/dist/src/components/layer-card/layer-card.d.ts.map +1 -0
- package/dist/src/components/link/index.d.ts +2 -0
- package/dist/src/components/link/index.d.ts.map +1 -0
- package/dist/src/components/link/link.d.ts +55 -0
- package/dist/src/components/link/link.d.ts.map +1 -0
- package/dist/src/components/loader/index.d.ts +3 -0
- package/dist/src/components/loader/index.d.ts.map +1 -0
- package/dist/src/components/loader/loader.d.ts +65 -0
- package/dist/src/components/loader/loader.d.ts.map +1 -0
- package/dist/src/components/loader/skeleton-line.d.ts +10 -0
- package/dist/src/components/loader/skeleton-line.d.ts.map +1 -0
- package/dist/src/components/menubar/index.d.ts +3 -0
- package/dist/src/components/menubar/index.d.ts.map +1 -0
- package/dist/src/components/menubar/menubar.d.ts +66 -0
- package/dist/src/components/menubar/menubar.d.ts.map +1 -0
- package/dist/src/components/menubar/use-menu-navigation.d.ts +8 -0
- package/dist/src/components/menubar/use-menu-navigation.d.ts.map +1 -0
- package/dist/src/components/meter/index.d.ts +2 -0
- package/dist/src/components/meter/index.d.ts.map +1 -0
- package/dist/src/components/meter/meter.d.ts +44 -0
- package/dist/src/components/meter/meter.d.ts.map +1 -0
- package/dist/src/components/pagination/index.d.ts +2 -0
- package/dist/src/components/pagination/index.d.ts.map +1 -0
- package/dist/src/components/pagination/pagination.d.ts +60 -0
- package/dist/src/components/pagination/pagination.d.ts.map +1 -0
- package/dist/src/components/popover/index.d.ts +3 -0
- package/dist/src/components/popover/index.d.ts.map +1 -0
- package/dist/src/components/popover/popover.d.ts +138 -0
- package/dist/src/components/popover/popover.d.ts.map +1 -0
- package/dist/src/components/radio/index.d.ts +2 -0
- package/dist/src/components/radio/index.d.ts.map +1 -0
- package/dist/src/components/radio/radio.d.ts +163 -0
- package/dist/src/components/radio/radio.d.ts.map +1 -0
- package/dist/src/components/select/index.d.ts +2 -0
- package/dist/src/components/select/index.d.ts.map +1 -0
- package/dist/src/components/select/select.d.ts +150 -0
- package/dist/src/components/select/select.d.ts.map +1 -0
- package/dist/src/components/sensitive-input/index.d.ts +2 -0
- package/dist/src/components/sensitive-input/index.d.ts.map +1 -0
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +94 -0
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -0
- package/dist/src/components/sidebar/index.d.ts +2 -0
- package/dist/src/components/sidebar/index.d.ts.map +1 -0
- package/dist/src/components/sidebar/sidebar.d.ts +556 -0
- package/dist/src/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/src/components/signalflare-ai-logo/index.d.ts +2 -0
- package/dist/src/components/signalflare-ai-logo/index.d.ts.map +1 -0
- package/dist/src/components/signalflare-ai-logo/signalflare-ai-logo.d.ts +171 -0
- package/dist/src/components/signalflare-ai-logo/signalflare-ai-logo.d.ts.map +1 -0
- package/dist/src/components/surface/index.d.ts +2 -0
- package/dist/src/components/surface/index.d.ts.map +1 -0
- package/dist/src/components/surface/surface.d.ts +60 -0
- package/dist/src/components/surface/surface.d.ts.map +1 -0
- package/dist/src/components/switch/index.d.ts +2 -0
- package/dist/src/components/switch/index.d.ts.map +1 -0
- package/dist/src/components/switch/switch.d.ts +169 -0
- package/dist/src/components/switch/switch.d.ts.map +1 -0
- package/dist/src/components/table/index.d.ts +2 -0
- package/dist/src/components/table/index.d.ts.map +1 -0
- package/dist/src/components/table/table.d.ts +89 -0
- package/dist/src/components/table/table.d.ts.map +1 -0
- package/dist/src/components/tabs/index.d.ts +3 -0
- package/dist/src/components/tabs/index.d.ts.map +1 -0
- package/dist/src/components/tabs/tabs.d.ts +105 -0
- package/dist/src/components/tabs/tabs.d.ts.map +1 -0
- package/dist/src/components/text/index.d.ts +2 -0
- package/dist/src/components/text/index.d.ts.map +1 -0
- package/dist/src/components/text/text.d.ts +181 -0
- package/dist/src/components/text/text.d.ts.map +1 -0
- package/dist/src/components/theme-toggle/index.d.ts +2 -0
- package/dist/src/components/theme-toggle/index.d.ts.map +1 -0
- package/dist/src/components/theme-toggle/theme-toggle.d.ts +68 -0
- package/dist/src/components/theme-toggle/theme-toggle.d.ts.map +1 -0
- package/dist/src/components/toast/index.d.ts +5 -0
- package/dist/src/components/toast/index.d.ts.map +1 -0
- package/dist/src/components/toast/toast.d.ts +152 -0
- package/dist/src/components/toast/toast.d.ts.map +1 -0
- package/dist/src/components/tooltip/index.d.ts +2 -0
- package/dist/src/components/tooltip/index.d.ts.map +1 -0
- package/dist/src/components/tooltip/tooltip.d.ts +82 -0
- package/dist/src/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/src/components/use-agent-harness/index.d.ts +2 -0
- package/dist/src/components/use-agent-harness/index.d.ts.map +1 -0
- package/dist/src/components/use-agent-harness/use-agent-harness.d.ts +642 -0
- package/dist/src/components/use-agent-harness/use-agent-harness.d.ts.map +1 -0
- package/dist/src/genui/genui.d.ts +17 -0
- package/dist/src/genui/genui.d.ts.map +1 -0
- package/dist/src/genui/index.d.ts +19 -0
- package/dist/src/genui/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +102 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/utils.d.ts +2 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/primitives/accordion.d.ts +13 -0
- package/dist/src/primitives/accordion.d.ts.map +1 -0
- package/dist/src/primitives/alert-dialog.d.ts +13 -0
- package/dist/src/primitives/alert-dialog.d.ts.map +1 -0
- package/dist/src/primitives/autocomplete.d.ts +13 -0
- package/dist/src/primitives/autocomplete.d.ts.map +1 -0
- package/dist/src/primitives/avatar.d.ts +13 -0
- package/dist/src/primitives/avatar.d.ts.map +1 -0
- package/dist/src/primitives/button.d.ts +13 -0
- package/dist/src/primitives/button.d.ts.map +1 -0
- package/dist/src/primitives/checkbox-group.d.ts +13 -0
- package/dist/src/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/src/primitives/checkbox.d.ts +13 -0
- package/dist/src/primitives/checkbox.d.ts.map +1 -0
- package/dist/src/primitives/collapsible.d.ts +13 -0
- package/dist/src/primitives/collapsible.d.ts.map +1 -0
- package/dist/src/primitives/combobox.d.ts +13 -0
- package/dist/src/primitives/combobox.d.ts.map +1 -0
- package/dist/src/primitives/context-menu.d.ts +13 -0
- package/dist/src/primitives/context-menu.d.ts.map +1 -0
- package/dist/src/primitives/csp-provider.d.ts +13 -0
- package/dist/src/primitives/csp-provider.d.ts.map +1 -0
- package/dist/src/primitives/dialog.d.ts +13 -0
- package/dist/src/primitives/dialog.d.ts.map +1 -0
- package/dist/src/primitives/direction-provider.d.ts +13 -0
- package/dist/src/primitives/direction-provider.d.ts.map +1 -0
- package/dist/src/primitives/drawer.d.ts +13 -0
- package/dist/src/primitives/drawer.d.ts.map +1 -0
- package/dist/src/primitives/field.d.ts +13 -0
- package/dist/src/primitives/field.d.ts.map +1 -0
- package/dist/src/primitives/fieldset.d.ts +13 -0
- package/dist/src/primitives/fieldset.d.ts.map +1 -0
- package/dist/src/primitives/form.d.ts +13 -0
- package/dist/src/primitives/form.d.ts.map +1 -0
- package/dist/src/primitives/index.d.ts +54 -0
- package/dist/src/primitives/index.d.ts.map +1 -0
- package/dist/src/primitives/input.d.ts +13 -0
- package/dist/src/primitives/input.d.ts.map +1 -0
- package/dist/src/primitives/menu.d.ts +13 -0
- package/dist/src/primitives/menu.d.ts.map +1 -0
- package/dist/src/primitives/menubar.d.ts +13 -0
- package/dist/src/primitives/menubar.d.ts.map +1 -0
- package/dist/src/primitives/meter.d.ts +13 -0
- package/dist/src/primitives/meter.d.ts.map +1 -0
- package/dist/src/primitives/navigation-menu.d.ts +13 -0
- package/dist/src/primitives/navigation-menu.d.ts.map +1 -0
- package/dist/src/primitives/number-field.d.ts +13 -0
- package/dist/src/primitives/number-field.d.ts.map +1 -0
- package/dist/src/primitives/popover.d.ts +13 -0
- package/dist/src/primitives/popover.d.ts.map +1 -0
- package/dist/src/primitives/preview-card.d.ts +13 -0
- package/dist/src/primitives/preview-card.d.ts.map +1 -0
- package/dist/src/primitives/progress.d.ts +13 -0
- package/dist/src/primitives/progress.d.ts.map +1 -0
- package/dist/src/primitives/radio-group.d.ts +13 -0
- package/dist/src/primitives/radio-group.d.ts.map +1 -0
- package/dist/src/primitives/radio.d.ts +13 -0
- package/dist/src/primitives/radio.d.ts.map +1 -0
- package/dist/src/primitives/scroll-area.d.ts +13 -0
- package/dist/src/primitives/scroll-area.d.ts.map +1 -0
- package/dist/src/primitives/select.d.ts +13 -0
- package/dist/src/primitives/select.d.ts.map +1 -0
- package/dist/src/primitives/separator.d.ts +13 -0
- package/dist/src/primitives/separator.d.ts.map +1 -0
- package/dist/src/primitives/slider.d.ts +13 -0
- package/dist/src/primitives/slider.d.ts.map +1 -0
- package/dist/src/primitives/switch.d.ts +13 -0
- package/dist/src/primitives/switch.d.ts.map +1 -0
- package/dist/src/primitives/tabs.d.ts +13 -0
- package/dist/src/primitives/tabs.d.ts.map +1 -0
- package/dist/src/primitives/toast.d.ts +13 -0
- package/dist/src/primitives/toast.d.ts.map +1 -0
- package/dist/src/primitives/toggle-group.d.ts +13 -0
- package/dist/src/primitives/toggle-group.d.ts.map +1 -0
- package/dist/src/primitives/toggle.d.ts +13 -0
- package/dist/src/primitives/toggle.d.ts.map +1 -0
- package/dist/src/primitives/toolbar.d.ts +13 -0
- package/dist/src/primitives/toolbar.d.ts.map +1 -0
- package/dist/src/primitives/tooltip.d.ts +13 -0
- package/dist/src/primitives/tooltip.d.ts.map +1 -0
- package/dist/src/registry/index.d.ts +8 -0
- package/dist/src/registry/index.d.ts.map +1 -0
- package/dist/src/registry/types.d.ts +191 -0
- package/dist/src/registry/types.d.ts.map +1 -0
- package/dist/src/utils/cn.d.ts +4 -0
- package/dist/src/utils/cn.d.ts.map +1 -0
- package/dist/src/utils/highlight-to-react.d.ts +12 -0
- package/dist/src/utils/highlight-to-react.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/link-provider.d.ts +12 -0
- package/dist/src/utils/link-provider.d.ts.map +1 -0
- package/dist/src/utils/prop-examples.d.ts +36 -0
- package/dist/src/utils/prop-examples.d.ts.map +1 -0
- package/dist/styles/sf-binding.css +255 -0
- package/dist/styles/sf-standalone.css +2 -0
- package/dist/styles/sf.css +596 -0
- package/dist/styles/theme-fedramp.css +22 -0
- package/dist/styles/theme-minimal.css +127 -0
- package/dist/styles/theme-navigator.css +137 -0
- package/dist/styles/theme-sf.css +191 -0
- package/dist/surface-BduI7Ehl.js +18 -0
- package/dist/surface-BduI7Ehl.js.map +1 -0
- package/dist/switch-CzZBRBL7.js +169 -0
- package/dist/switch-CzZBRBL7.js.map +1 -0
- package/dist/table-CIMx0Oq0.js +200 -0
- package/dist/table-CIMx0Oq0.js.map +1 -0
- package/dist/tabs-1cHrYoel.js +54 -0
- package/dist/tabs-1cHrYoel.js.map +1 -0
- package/dist/text-KJmGkwnf.js +103 -0
- package/dist/text-KJmGkwnf.js.map +1 -0
- package/dist/theme-toggle-Dpgnoj_Q.js +129 -0
- package/dist/theme-toggle-Dpgnoj_Q.js.map +1 -0
- package/dist/toast-Nw28a5Cx.js +161 -0
- package/dist/toast-Nw28a5Cx.js.map +1 -0
- package/dist/tooltip-Cb7QW-7H.js +79 -0
- package/dist/tooltip-Cb7QW-7H.js.map +1 -0
- package/dist/use-agent-harness-DZzcn96L.js +929 -0
- package/dist/use-agent-harness-DZzcn96L.js.map +1 -0
- package/dist/utils.js +4 -0
- package/package.json +620 -0
- package/scripts/component-registry/cache.ts +124 -0
- package/scripts/component-registry/discovery.ts +464 -0
- package/scripts/component-registry/example-cleanup.ts +168 -0
- package/scripts/component-registry/index.test.ts +678 -0
- package/scripts/component-registry/index.ts +931 -0
- package/scripts/component-registry/markdown-generator.ts +222 -0
- package/scripts/component-registry/metadata.ts +653 -0
- package/scripts/component-registry/props-filter.ts +313 -0
- package/scripts/component-registry/schema-generator.ts +332 -0
- package/scripts/component-registry/sub-components.ts +350 -0
- package/scripts/component-registry/types.ts +156 -0
- package/scripts/component-registry/utils.ts +280 -0
- package/scripts/component-registry/variant-parser.ts +262 -0
- package/scripts/css-build.ts +117 -0
- package/scripts/generate-primitives.ts +178 -0
- package/scripts/theme-generator/config.ts +538 -0
- package/scripts/theme-generator/generate-css.ts +256 -0
- package/scripts/theme-generator/index.ts +161 -0
- package/scripts/theme-generator/migrate.ts +584 -0
- package/scripts/theme-generator/types.ts +86 -0
- package/skills/component-selection/SKILL.md +64 -0
- package/skills/installing-blocks/SKILL.md +47 -0
- package/skills/theming-and-tokens/SKILL.md +62 -0
|
@@ -0,0 +1,823 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/command-line/commands/add.ts
|
|
4
|
+
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5
|
+
import { dirname, join as join2, resolve, relative, isAbsolute } from "node:path";
|
|
6
|
+
import { createInterface } from "node:readline/promises";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
|
|
9
|
+
// src/command-line/utils/config.ts
|
|
10
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
var DEFAULT_CONFIG = {
|
|
13
|
+
blocksDir: "src/components/sf",
|
|
14
|
+
version: "1.0.0"
|
|
15
|
+
};
|
|
16
|
+
function readConfig(projectRoot = process.cwd()) {
|
|
17
|
+
const configPath = join(projectRoot, "sf.json");
|
|
18
|
+
if (!existsSync(configPath)) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const content = readFileSync(configPath, "utf-8");
|
|
23
|
+
const config = JSON.parse(content);
|
|
24
|
+
return {
|
|
25
|
+
...DEFAULT_CONFIG,
|
|
26
|
+
...config
|
|
27
|
+
};
|
|
28
|
+
} catch (error) {
|
|
29
|
+
throw new Error(`Failed to parse sf.json: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function writeConfig(config, projectRoot = process.cwd()) {
|
|
33
|
+
const configPath = join(projectRoot, "sf.json");
|
|
34
|
+
const fullConfig = {
|
|
35
|
+
...DEFAULT_CONFIG,
|
|
36
|
+
...config
|
|
37
|
+
};
|
|
38
|
+
try {
|
|
39
|
+
const content = JSON.stringify(fullConfig, null, 2) + `
|
|
40
|
+
`;
|
|
41
|
+
writeFileSync(configPath, content, "utf-8");
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw new Error(`Failed to write sf.json: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function configExists(projectRoot = process.cwd()) {
|
|
47
|
+
const configPath = join(projectRoot, "sf.json");
|
|
48
|
+
return existsSync(configPath);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/command-line/utils/transformer.ts
|
|
52
|
+
function parseImports(content) {
|
|
53
|
+
const importRegex = /import\s+(type\s+)?{([^}]+)}\s+from\s+["']([^"']+)["'];?/g;
|
|
54
|
+
const imports = [];
|
|
55
|
+
let match;
|
|
56
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
57
|
+
imports.push({
|
|
58
|
+
fullMatch: match[0],
|
|
59
|
+
imports: match[2],
|
|
60
|
+
path: match[3],
|
|
61
|
+
startIndex: match.index,
|
|
62
|
+
endIndex: match.index + match[0].length,
|
|
63
|
+
isTypeOnlyImport: match[1] !== undefined
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return imports;
|
|
67
|
+
}
|
|
68
|
+
function shouldTransformToSF(path) {
|
|
69
|
+
if (!path.startsWith("../")) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return path.includes("/components/") || path.includes("/utils/");
|
|
73
|
+
}
|
|
74
|
+
function parseImportItems(imports, isTypeOnlyImport) {
|
|
75
|
+
const items = imports.split(",").map((item) => item.trim()).filter((item) => item.length > 0);
|
|
76
|
+
const valueImports = [];
|
|
77
|
+
const typeImports = [];
|
|
78
|
+
for (const item of items) {
|
|
79
|
+
if (isTypeOnlyImport || item.startsWith("type ")) {
|
|
80
|
+
const typeName = item.startsWith("type ") ? item.slice(5).trim() : item;
|
|
81
|
+
typeImports.push(typeName);
|
|
82
|
+
} else {
|
|
83
|
+
valueImports.push(item);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return { valueImports, typeImports };
|
|
87
|
+
}
|
|
88
|
+
function buildConsolidatedImport(valueImports, typeImports) {
|
|
89
|
+
const parts = [];
|
|
90
|
+
for (const item of valueImports) {
|
|
91
|
+
parts.push(item);
|
|
92
|
+
}
|
|
93
|
+
for (const item of typeImports) {
|
|
94
|
+
parts.push(`type ${item}`);
|
|
95
|
+
}
|
|
96
|
+
return `import { ${parts.join(", ")} } from "@signalflare-ai/ui";`;
|
|
97
|
+
}
|
|
98
|
+
function transformImports(content) {
|
|
99
|
+
const parsedImports = parseImports(content);
|
|
100
|
+
const sfImports = [];
|
|
101
|
+
const nonSFImports = [];
|
|
102
|
+
for (const imp of parsedImports) {
|
|
103
|
+
if (shouldTransformToSF(imp.path)) {
|
|
104
|
+
sfImports.push(imp);
|
|
105
|
+
} else {
|
|
106
|
+
nonSFImports.push(imp);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (sfImports.length === 0) {
|
|
110
|
+
return content;
|
|
111
|
+
}
|
|
112
|
+
const allValueImports = [];
|
|
113
|
+
const allTypeImports = [];
|
|
114
|
+
for (const imp of sfImports) {
|
|
115
|
+
const { valueImports, typeImports } = parseImportItems(imp.imports, imp.isTypeOnlyImport);
|
|
116
|
+
allValueImports.push(...valueImports);
|
|
117
|
+
allTypeImports.push(...typeImports);
|
|
118
|
+
}
|
|
119
|
+
const consolidatedImport = buildConsolidatedImport(allValueImports, allTypeImports);
|
|
120
|
+
let result = content;
|
|
121
|
+
const sortedSFImports = [...sfImports].sort((a, b) => b.startIndex - a.startIndex);
|
|
122
|
+
for (let i = 0;i < sortedSFImports.length; i++) {
|
|
123
|
+
const imp = sortedSFImports[i];
|
|
124
|
+
if (i === sortedSFImports.length - 1) {
|
|
125
|
+
result = result.slice(0, imp.startIndex) + consolidatedImport + result.slice(imp.endIndex);
|
|
126
|
+
} else {
|
|
127
|
+
let startIndex = imp.startIndex;
|
|
128
|
+
let endIndex = imp.endIndex;
|
|
129
|
+
if (startIndex > 0 && result[startIndex - 1] === `
|
|
130
|
+
`) {
|
|
131
|
+
startIndex--;
|
|
132
|
+
}
|
|
133
|
+
result = result.slice(0, startIndex) + result.slice(endIndex);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/command-line/commands/add.ts
|
|
140
|
+
function getRegistryPath() {
|
|
141
|
+
const __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
142
|
+
const possiblePaths = [
|
|
143
|
+
join2(__dirname2, "..", "..", "ai", "component-registry.json"),
|
|
144
|
+
join2(__dirname2, "..", "ai", "component-registry.json"),
|
|
145
|
+
join2(__dirname2, "ai", "component-registry.json")
|
|
146
|
+
];
|
|
147
|
+
for (const path of possiblePaths) {
|
|
148
|
+
if (existsSync2(path)) {
|
|
149
|
+
return path;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
throw new Error("component-registry.json not found. Please regenerate with: bun run codegen:registry");
|
|
153
|
+
}
|
|
154
|
+
function getBlocksSourcePath() {
|
|
155
|
+
const __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
156
|
+
const possiblePaths = [
|
|
157
|
+
join2(__dirname2, "..", "..", "src", "blocks"),
|
|
158
|
+
join2(__dirname2, "..", "src", "blocks"),
|
|
159
|
+
join2(__dirname2, "src", "blocks")
|
|
160
|
+
];
|
|
161
|
+
for (const path of possiblePaths) {
|
|
162
|
+
if (existsSync2(path)) {
|
|
163
|
+
return path;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
throw new Error("Blocks source directory not found. The package may be corrupted.");
|
|
167
|
+
}
|
|
168
|
+
function loadRegistry() {
|
|
169
|
+
const registryPath = getRegistryPath();
|
|
170
|
+
const content = readFileSync2(registryPath, "utf-8");
|
|
171
|
+
return JSON.parse(content);
|
|
172
|
+
}
|
|
173
|
+
async function confirm(message) {
|
|
174
|
+
const rl = createInterface({
|
|
175
|
+
input: process.stdin,
|
|
176
|
+
output: process.stdout
|
|
177
|
+
});
|
|
178
|
+
const answer = await rl.question(`${message} (y/n): `);
|
|
179
|
+
rl.close();
|
|
180
|
+
return answer.toLowerCase() === "y" || answer.toLowerCase() === "yes";
|
|
181
|
+
}
|
|
182
|
+
async function add(blockName) {
|
|
183
|
+
if (!blockName) {
|
|
184
|
+
console.error("Error: Block name is required.");
|
|
185
|
+
console.log(`
|
|
186
|
+
Usage: sf add <block-name>`);
|
|
187
|
+
console.log(`
|
|
188
|
+
Run 'sf blocks' to see available blocks.`);
|
|
189
|
+
process.exit(1);
|
|
190
|
+
}
|
|
191
|
+
const config = readConfig();
|
|
192
|
+
if (!config) {
|
|
193
|
+
console.error("Error: sf.json not found. Run 'sf init' first to initialize the configuration.");
|
|
194
|
+
process.exit(1);
|
|
195
|
+
}
|
|
196
|
+
let registry;
|
|
197
|
+
try {
|
|
198
|
+
registry = loadRegistry();
|
|
199
|
+
} catch (error) {
|
|
200
|
+
const message = error instanceof Error ? error.message : "Component registry not found. Run `bun run codegen:registry` first.";
|
|
201
|
+
console.error(`Error: ${message}`);
|
|
202
|
+
process.exit(1);
|
|
203
|
+
}
|
|
204
|
+
const block = registry.blocks?.[blockName];
|
|
205
|
+
if (!block) {
|
|
206
|
+
console.error(`Error: Block '${blockName}' not found.`);
|
|
207
|
+
console.log(`
|
|
208
|
+
Run 'sf blocks' to see available blocks.`);
|
|
209
|
+
process.exit(1);
|
|
210
|
+
}
|
|
211
|
+
let blocksSourcePath;
|
|
212
|
+
try {
|
|
213
|
+
blocksSourcePath = getBlocksSourcePath();
|
|
214
|
+
} catch (error) {
|
|
215
|
+
const message = error instanceof Error ? error.message : "Blocks source directory not found.";
|
|
216
|
+
console.error(`Error: ${message}`);
|
|
217
|
+
process.exit(1);
|
|
218
|
+
}
|
|
219
|
+
const projectRoot = process.cwd();
|
|
220
|
+
const targetDir = join2(projectRoot, config.blocksDir);
|
|
221
|
+
if (!existsSync2(targetDir)) {
|
|
222
|
+
mkdirSync(targetDir, { recursive: true });
|
|
223
|
+
console.log(`\uD83D\uDCC1 Created directory: ${config.blocksDir}`);
|
|
224
|
+
}
|
|
225
|
+
const blockExists = block.files.some((file) => {
|
|
226
|
+
const targetPath = join2(targetDir, file);
|
|
227
|
+
return existsSync2(targetPath);
|
|
228
|
+
});
|
|
229
|
+
if (blockExists) {
|
|
230
|
+
console.log(`⚠️ Block '${blockName}' already exists in ${config.blocksDir}`);
|
|
231
|
+
const shouldOverwrite = await confirm("Do you want to overwrite it?");
|
|
232
|
+
if (!shouldOverwrite) {
|
|
233
|
+
console.log("Installation cancelled.");
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
console.log(`\uD83D\uDCE6 Installing block: ${blockName}`);
|
|
238
|
+
for (const file of block.files) {
|
|
239
|
+
const sourcePath = resolve(blocksSourcePath, file);
|
|
240
|
+
const targetPath = resolve(targetDir, file);
|
|
241
|
+
const relativeSource = relative(blocksSourcePath, sourcePath);
|
|
242
|
+
if (relativeSource.startsWith("..") || relativeSource.startsWith("/") || isAbsolute(relativeSource)) {
|
|
243
|
+
console.error(`Error: Invalid source path for file: ${file}`);
|
|
244
|
+
process.exit(1);
|
|
245
|
+
}
|
|
246
|
+
const relativeTarget = relative(targetDir, targetPath);
|
|
247
|
+
if (relativeTarget.startsWith("..") || relativeTarget.startsWith("/") || isAbsolute(relativeTarget)) {
|
|
248
|
+
console.error(`Error: Invalid target path for file: ${file}`);
|
|
249
|
+
process.exit(1);
|
|
250
|
+
}
|
|
251
|
+
const targetSubdir = dirname(targetPath);
|
|
252
|
+
if (!existsSync2(targetSubdir)) {
|
|
253
|
+
mkdirSync(targetSubdir, { recursive: true });
|
|
254
|
+
}
|
|
255
|
+
const content = readFileSync2(sourcePath, "utf-8");
|
|
256
|
+
const transformed = transformImports(content);
|
|
257
|
+
writeFileSync2(targetPath, transformed, "utf-8");
|
|
258
|
+
console.log(` ✅ ${file}`);
|
|
259
|
+
}
|
|
260
|
+
if (block.dependencies.length > 0) {
|
|
261
|
+
console.log(`
|
|
262
|
+
\uD83D\uDCDA This block depends on the following SF components:
|
|
263
|
+
`);
|
|
264
|
+
for (const dep of block.dependencies) {
|
|
265
|
+
console.log(` - ${dep} (from @signalflare-ai/ui)`);
|
|
266
|
+
}
|
|
267
|
+
console.log(`
|
|
268
|
+
Make sure @signalflare-ai/ui is installed in your project:`);
|
|
269
|
+
console.log(" bun add @signalflare-ai/ui");
|
|
270
|
+
}
|
|
271
|
+
console.log(`
|
|
272
|
+
\uD83C\uDF89 Successfully installed ${blockName}!`);
|
|
273
|
+
console.log(`
|
|
274
|
+
You can now import it in your project:
|
|
275
|
+
`);
|
|
276
|
+
const blockFile = block.files[0].replace(/\.tsx?$/, "");
|
|
277
|
+
const importPath = join2(config.blocksDir, blockFile).replace(/\\/g, "/");
|
|
278
|
+
console.log(` import { ${blockName} } from "${importPath}";`);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// src/command-line/commands/ai.ts
|
|
282
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
283
|
+
import { dirname as dirname2, join as join3 } from "node:path";
|
|
284
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
285
|
+
function ai() {
|
|
286
|
+
const __dirname2 = dirname2(fileURLToPath2(import.meta.url));
|
|
287
|
+
const usagePath = join3(__dirname2, "..", "..", "ai", "USAGE.md");
|
|
288
|
+
try {
|
|
289
|
+
const content = readFileSync3(usagePath, "utf-8");
|
|
290
|
+
console.log(content);
|
|
291
|
+
} catch {
|
|
292
|
+
console.error("Could not read ai/USAGE.md. Make sure you are running this from an installed @signalflare-ai/ui package.");
|
|
293
|
+
process.exit(1);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// src/command-line/commands/blocks.ts
|
|
298
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
299
|
+
import { dirname as dirname3, join as join4 } from "node:path";
|
|
300
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
301
|
+
function getRegistryPath2() {
|
|
302
|
+
const __dirname2 = dirname3(fileURLToPath3(import.meta.url));
|
|
303
|
+
return join4(__dirname2, "..", "..", "ai", "component-registry.json");
|
|
304
|
+
}
|
|
305
|
+
function loadRegistry2() {
|
|
306
|
+
const registryPath = getRegistryPath2();
|
|
307
|
+
const content = readFileSync4(registryPath, "utf-8");
|
|
308
|
+
return JSON.parse(content);
|
|
309
|
+
}
|
|
310
|
+
function blocks() {
|
|
311
|
+
try {
|
|
312
|
+
const registry = loadRegistry2();
|
|
313
|
+
if (!registry.blocks || Object.keys(registry.blocks).length === 0) {
|
|
314
|
+
console.log("No blocks available.");
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
const blockList = Object.values(registry.blocks);
|
|
318
|
+
const byCategory = new Map;
|
|
319
|
+
for (const block of blockList) {
|
|
320
|
+
const category = block.category || "Other";
|
|
321
|
+
if (!byCategory.has(category)) {
|
|
322
|
+
byCategory.set(category, []);
|
|
323
|
+
}
|
|
324
|
+
byCategory.get(category).push(block);
|
|
325
|
+
}
|
|
326
|
+
const sortedCategories = [...byCategory.keys()].sort();
|
|
327
|
+
console.log(`SF Blocks (${blockList.length} total)
|
|
328
|
+
`);
|
|
329
|
+
for (const category of sortedCategories) {
|
|
330
|
+
const categoryBlocks = [...byCategory.get(category)].sort((a, b) => a.name.localeCompare(b.name));
|
|
331
|
+
console.log(`${category}:`);
|
|
332
|
+
for (const block of categoryBlocks) {
|
|
333
|
+
console.log(` ${block.name} - ${block.description}`);
|
|
334
|
+
}
|
|
335
|
+
console.log();
|
|
336
|
+
}
|
|
337
|
+
console.log("To install a block, run:");
|
|
338
|
+
console.log(` sf add <block-name>
|
|
339
|
+
`);
|
|
340
|
+
console.log("Example:");
|
|
341
|
+
console.log(" sf add PageHeader");
|
|
342
|
+
} catch (error) {
|
|
343
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
344
|
+
console.error("Error: Component registry not found. Run `bun run codegen:registry` first.");
|
|
345
|
+
process.exit(1);
|
|
346
|
+
}
|
|
347
|
+
throw error;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// src/command-line/commands/doc.ts
|
|
352
|
+
import { readFileSync as readFileSync5 } from "node:fs";
|
|
353
|
+
import { dirname as dirname4, join as join5 } from "node:path";
|
|
354
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
355
|
+
function getRegistryPath3() {
|
|
356
|
+
const __dirname2 = dirname4(fileURLToPath4(import.meta.url));
|
|
357
|
+
return join5(__dirname2, "..", "..", "ai", "component-registry.json");
|
|
358
|
+
}
|
|
359
|
+
function loadRegistry3() {
|
|
360
|
+
const registryPath = getRegistryPath3();
|
|
361
|
+
const content = readFileSync5(registryPath, "utf-8");
|
|
362
|
+
return JSON.parse(content);
|
|
363
|
+
}
|
|
364
|
+
function findComponent(registry, name) {
|
|
365
|
+
const lowerName = name.toLowerCase();
|
|
366
|
+
for (const [key, component] of Object.entries(registry.components)) {
|
|
367
|
+
if (key.toLowerCase() === lowerName) {
|
|
368
|
+
return component;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
function findSimilar(registry, name) {
|
|
374
|
+
const lowerName = name.toLowerCase();
|
|
375
|
+
const componentNames = Object.keys(registry.components);
|
|
376
|
+
return componentNames.filter((n) => n.toLowerCase().includes(lowerName) || lowerName.includes(n.toLowerCase())).slice(0, 5);
|
|
377
|
+
}
|
|
378
|
+
function formatProp(name, prop) {
|
|
379
|
+
const parts = [];
|
|
380
|
+
let typeStr = prop.type;
|
|
381
|
+
if (prop.values && prop.values.length > 0) {
|
|
382
|
+
typeStr = prop.values.map((v) => `"${v}"`).join(" | ");
|
|
383
|
+
}
|
|
384
|
+
const required = prop.required === true || prop.optional === false;
|
|
385
|
+
const requiredStr = required ? "(required)" : "";
|
|
386
|
+
const defaultStr = prop.default ? `[default: ${prop.default}]` : "";
|
|
387
|
+
parts.push(` ${name}: ${typeStr} ${requiredStr} ${defaultStr}`.trim());
|
|
388
|
+
if (prop.description) {
|
|
389
|
+
parts.push(` ${prop.description}`);
|
|
390
|
+
}
|
|
391
|
+
if (prop.descriptions && Object.keys(prop.descriptions).length > 0) {
|
|
392
|
+
for (const [value, desc] of Object.entries(prop.descriptions)) {
|
|
393
|
+
parts.push(` - "${value}": ${desc}`);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return parts.join(`
|
|
397
|
+
`);
|
|
398
|
+
}
|
|
399
|
+
function formatComponentDoc(component) {
|
|
400
|
+
const lines = [];
|
|
401
|
+
lines.push(`# ${component.name}
|
|
402
|
+
`);
|
|
403
|
+
lines.push(`${component.description}
|
|
404
|
+
`);
|
|
405
|
+
lines.push(`**Import:** \`import { ${component.name} } from "${component.importPath}";\`
|
|
406
|
+
`);
|
|
407
|
+
lines.push(`**Category:** ${component.category}
|
|
408
|
+
`);
|
|
409
|
+
const propEntries = Object.entries(component.props);
|
|
410
|
+
if (propEntries.length > 0) {
|
|
411
|
+
lines.push(`## Props
|
|
412
|
+
`);
|
|
413
|
+
for (const [propName, propInfo] of propEntries) {
|
|
414
|
+
lines.push(formatProp(propName, propInfo));
|
|
415
|
+
lines.push("");
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (component.subComponents) {
|
|
419
|
+
lines.push(`## Sub-Components
|
|
420
|
+
`);
|
|
421
|
+
for (const [subName, subInfo] of Object.entries(component.subComponents)) {
|
|
422
|
+
lines.push(`### ${component.name}.${subName}`);
|
|
423
|
+
if (subInfo.description) {
|
|
424
|
+
lines.push(subInfo.description);
|
|
425
|
+
}
|
|
426
|
+
if (subInfo.renderElement) {
|
|
427
|
+
lines.push(`Renders: ${subInfo.renderElement}`);
|
|
428
|
+
}
|
|
429
|
+
if (subInfo.props) {
|
|
430
|
+
lines.push("Props:");
|
|
431
|
+
for (const [propName, propInfo] of Object.entries(subInfo.props)) {
|
|
432
|
+
const required = propInfo.required ? "(required)" : "";
|
|
433
|
+
lines.push(` - ${propName}: ${propInfo.type} ${required}`);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
lines.push("");
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
if (component.examples && component.examples.length > 0) {
|
|
440
|
+
lines.push(`## Examples
|
|
441
|
+
`);
|
|
442
|
+
for (const example of component.examples.slice(0, 3)) {
|
|
443
|
+
lines.push("```tsx");
|
|
444
|
+
lines.push(example);
|
|
445
|
+
lines.push("```\n");
|
|
446
|
+
}
|
|
447
|
+
if (component.examples.length > 3) {
|
|
448
|
+
lines.push(`(${component.examples.length - 3} more examples available in Storybook)`);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
if (component.colors && component.colors.length > 0) {
|
|
452
|
+
lines.push(`
|
|
453
|
+
## Semantic Tokens Used
|
|
454
|
+
`);
|
|
455
|
+
lines.push(component.colors.join(", "));
|
|
456
|
+
}
|
|
457
|
+
return lines.join(`
|
|
458
|
+
`);
|
|
459
|
+
}
|
|
460
|
+
function docs() {
|
|
461
|
+
try {
|
|
462
|
+
const registry = loadRegistry3();
|
|
463
|
+
const components = Object.values(registry.components);
|
|
464
|
+
console.log(`# SF Component Documentation
|
|
465
|
+
`);
|
|
466
|
+
console.log(`${components.length} components available
|
|
467
|
+
`);
|
|
468
|
+
console.log(`---
|
|
469
|
+
`);
|
|
470
|
+
for (const component of components) {
|
|
471
|
+
console.log(formatComponentDoc(component));
|
|
472
|
+
console.log(`
|
|
473
|
+
---
|
|
474
|
+
`);
|
|
475
|
+
}
|
|
476
|
+
} catch (error) {
|
|
477
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
478
|
+
console.error("Error: Component registry not found. Run `bun run codegen:registry` first.");
|
|
479
|
+
process.exit(1);
|
|
480
|
+
}
|
|
481
|
+
throw error;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function doc(componentName) {
|
|
485
|
+
if (!componentName) {
|
|
486
|
+
docs();
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
try {
|
|
490
|
+
const registry = loadRegistry3();
|
|
491
|
+
const component = findComponent(registry, componentName);
|
|
492
|
+
if (!component) {
|
|
493
|
+
const similar = findSimilar(registry, componentName);
|
|
494
|
+
console.error(`Component "${componentName}" not found.`);
|
|
495
|
+
if (similar.length > 0) {
|
|
496
|
+
console.error(`
|
|
497
|
+
Did you mean: ${similar.join(", ")}?`);
|
|
498
|
+
}
|
|
499
|
+
console.error(`
|
|
500
|
+
Run "sf ls" to see all available components.`);
|
|
501
|
+
process.exit(1);
|
|
502
|
+
}
|
|
503
|
+
console.log(formatComponentDoc(component));
|
|
504
|
+
} catch (error) {
|
|
505
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
506
|
+
console.error("Error: Component registry not found. Run `bun run codegen:registry` first.");
|
|
507
|
+
process.exit(1);
|
|
508
|
+
}
|
|
509
|
+
throw error;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// src/command-line/commands/init.ts
|
|
514
|
+
import { createInterface as createInterface2 } from "node:readline/promises";
|
|
515
|
+
async function prompt(question, defaultValue) {
|
|
516
|
+
const rl = createInterface2({
|
|
517
|
+
input: process.stdin,
|
|
518
|
+
output: process.stdout
|
|
519
|
+
});
|
|
520
|
+
try {
|
|
521
|
+
const suffix = defaultValue ? ` (${defaultValue})` : "";
|
|
522
|
+
const answer = await rl.question(`${question}${suffix}: `);
|
|
523
|
+
return answer.trim() || defaultValue || "";
|
|
524
|
+
} finally {
|
|
525
|
+
rl.close();
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
async function confirm2(question) {
|
|
529
|
+
const rl = createInterface2({
|
|
530
|
+
input: process.stdin,
|
|
531
|
+
output: process.stdout
|
|
532
|
+
});
|
|
533
|
+
try {
|
|
534
|
+
const answer = await rl.question(`${question} (y/n): `);
|
|
535
|
+
return answer.trim().toLowerCase() === "y";
|
|
536
|
+
} finally {
|
|
537
|
+
rl.close();
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
async function init() {
|
|
541
|
+
try {
|
|
542
|
+
const projectRoot = process.cwd();
|
|
543
|
+
if (configExists(projectRoot)) {
|
|
544
|
+
console.log("⚠️ sf.json already exists in this directory.");
|
|
545
|
+
const shouldOverwrite = await confirm2("Do you want to overwrite it?");
|
|
546
|
+
if (!shouldOverwrite) {
|
|
547
|
+
console.log("Initialization cancelled.");
|
|
548
|
+
process.exit(0);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
console.log(`
|
|
552
|
+
\uD83D\uDE80 Initializing SF configuration...
|
|
553
|
+
`);
|
|
554
|
+
const blocksDir = await prompt("Where should blocks be installed?", DEFAULT_CONFIG.blocksDir);
|
|
555
|
+
const config = {
|
|
556
|
+
blocksDir: blocksDir || DEFAULT_CONFIG.blocksDir,
|
|
557
|
+
version: DEFAULT_CONFIG.version
|
|
558
|
+
};
|
|
559
|
+
writeConfig(config, projectRoot);
|
|
560
|
+
console.log(`
|
|
561
|
+
✅ Created sf.json with the following configuration:`);
|
|
562
|
+
console.log(` \uD83D\uDCC1 Blocks directory: ${config.blocksDir}`);
|
|
563
|
+
console.log(`
|
|
564
|
+
Next steps:`);
|
|
565
|
+
console.log(" • Run `sf blocks` to see available blocks");
|
|
566
|
+
console.log(" • Run `sf add <block>` to install a block");
|
|
567
|
+
} catch (error) {
|
|
568
|
+
console.error("Error initializing configuration:", error);
|
|
569
|
+
process.exit(1);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
// src/command-line/commands/ls.ts
|
|
574
|
+
import { readFileSync as readFileSync6 } from "node:fs";
|
|
575
|
+
import { dirname as dirname5, join as join6 } from "node:path";
|
|
576
|
+
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
577
|
+
function getRegistryPath4() {
|
|
578
|
+
const __dirname2 = dirname5(fileURLToPath5(import.meta.url));
|
|
579
|
+
return join6(__dirname2, "..", "..", "ai", "component-registry.json");
|
|
580
|
+
}
|
|
581
|
+
function loadRegistry4() {
|
|
582
|
+
const registryPath = getRegistryPath4();
|
|
583
|
+
const content = readFileSync6(registryPath, "utf-8");
|
|
584
|
+
return JSON.parse(content);
|
|
585
|
+
}
|
|
586
|
+
function ls() {
|
|
587
|
+
try {
|
|
588
|
+
const registry = loadRegistry4();
|
|
589
|
+
const components = Object.values(registry.components);
|
|
590
|
+
const byCategory = new Map;
|
|
591
|
+
for (const component of components) {
|
|
592
|
+
const category = component.category || "Other";
|
|
593
|
+
if (!byCategory.has(category)) {
|
|
594
|
+
byCategory.set(category, []);
|
|
595
|
+
}
|
|
596
|
+
byCategory.get(category).push(component);
|
|
597
|
+
}
|
|
598
|
+
const sortedCategories = [...byCategory.keys()].sort();
|
|
599
|
+
console.log(`SF Components (${components.length} total)
|
|
600
|
+
`);
|
|
601
|
+
for (const category of sortedCategories) {
|
|
602
|
+
const categoryComponents = [...byCategory.get(category)].sort((a, b) => a.name.localeCompare(b.name));
|
|
603
|
+
console.log(`${category}:`);
|
|
604
|
+
for (const component of categoryComponents) {
|
|
605
|
+
console.log(` ${component.name} - ${component.description}`);
|
|
606
|
+
}
|
|
607
|
+
console.log();
|
|
608
|
+
}
|
|
609
|
+
} catch (error) {
|
|
610
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
611
|
+
console.error("Error: Component registry not found. Run `bun run codegen:registry` first.");
|
|
612
|
+
process.exit(1);
|
|
613
|
+
}
|
|
614
|
+
throw error;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
// src/command-line/commands/migrate.ts
|
|
619
|
+
var PENDING_MIGRATIONS = {
|
|
620
|
+
text: {},
|
|
621
|
+
color: {}
|
|
622
|
+
};
|
|
623
|
+
var COLOR_PREFIXES = [
|
|
624
|
+
"bg",
|
|
625
|
+
"border",
|
|
626
|
+
"border-t",
|
|
627
|
+
"border-r",
|
|
628
|
+
"border-b",
|
|
629
|
+
"border-l",
|
|
630
|
+
"border-x",
|
|
631
|
+
"border-y",
|
|
632
|
+
"ring",
|
|
633
|
+
"ring-offset",
|
|
634
|
+
"outline",
|
|
635
|
+
"divide",
|
|
636
|
+
"shadow",
|
|
637
|
+
"accent",
|
|
638
|
+
"caret",
|
|
639
|
+
"fill",
|
|
640
|
+
"stroke",
|
|
641
|
+
"decoration",
|
|
642
|
+
"from",
|
|
643
|
+
"via",
|
|
644
|
+
"to"
|
|
645
|
+
];
|
|
646
|
+
var TEXT_PREFIXES = ["text"];
|
|
647
|
+
function hasPendingMigrations() {
|
|
648
|
+
return Object.values(PENDING_MIGRATIONS.text).some((v) => v !== "") || Object.values(PENDING_MIGRATIONS.color).some((v) => v !== "");
|
|
649
|
+
}
|
|
650
|
+
function generateClassMap(direction) {
|
|
651
|
+
const classMap = {};
|
|
652
|
+
for (const [oldName, newName] of Object.entries(PENDING_MIGRATIONS.text)) {
|
|
653
|
+
if (!newName)
|
|
654
|
+
continue;
|
|
655
|
+
const [from, to] = direction === "to-new" ? [oldName, newName] : [newName, oldName];
|
|
656
|
+
for (const prefix of TEXT_PREFIXES) {
|
|
657
|
+
classMap[`${prefix}-${from}`] = `${prefix}-${to}`;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
for (const [oldName, newName] of Object.entries(PENDING_MIGRATIONS.color)) {
|
|
661
|
+
if (!newName)
|
|
662
|
+
continue;
|
|
663
|
+
const [from, to] = direction === "to-new" ? [oldName, newName] : [newName, oldName];
|
|
664
|
+
for (const prefix of COLOR_PREFIXES) {
|
|
665
|
+
classMap[`${prefix}-${from}`] = `${prefix}-${to}`;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
return classMap;
|
|
669
|
+
}
|
|
670
|
+
var MIGRATE_HELP = `
|
|
671
|
+
SF Token Migration Tool (for consumers)
|
|
672
|
+
|
|
673
|
+
When SF releases breaking changes to token names, use this command
|
|
674
|
+
to get the rename map for updating your codebase.
|
|
675
|
+
|
|
676
|
+
USAGE:
|
|
677
|
+
npx @signalflare-ai/ui migrate [options]
|
|
678
|
+
|
|
679
|
+
OPTIONS:
|
|
680
|
+
--json Output machine-readable JSON (default)
|
|
681
|
+
--classes Output as class-level mapping (bg-sf-base -> bg-sf-base)
|
|
682
|
+
--to-old Reverse mapping (new names -> old names)
|
|
683
|
+
--help Show this help message
|
|
684
|
+
|
|
685
|
+
EXAMPLES:
|
|
686
|
+
# Check if there are pending migrations
|
|
687
|
+
npx @signalflare-ai/ui migrate
|
|
688
|
+
|
|
689
|
+
# Get class-level mapping for sed/find-replace
|
|
690
|
+
npx @signalflare-ai/ui migrate --classes
|
|
691
|
+
|
|
692
|
+
# Get JSON for custom codemod
|
|
693
|
+
npx @signalflare-ai/ui migrate --json > rename-map.json
|
|
694
|
+
|
|
695
|
+
USING WITH sed:
|
|
696
|
+
npx @signalflare-ai/ui migrate --classes | grep "^bg-\\|^text-" | \\
|
|
697
|
+
while IFS= read -r line; do
|
|
698
|
+
old=$(echo "$line" | awk '{print $1}')
|
|
699
|
+
new=$(echo "$line" | awk '{print $3}')
|
|
700
|
+
find src -name '*.tsx' -exec sed -i '' "s/\\b$old\\b/$new/g" {} +
|
|
701
|
+
done
|
|
702
|
+
|
|
703
|
+
NOTE:
|
|
704
|
+
If no migrations are pending, you're up to date with the current version.
|
|
705
|
+
Migrations are only needed when upgrading to a new major/minor version
|
|
706
|
+
that includes breaking token name changes.
|
|
707
|
+
`;
|
|
708
|
+
function migrate(args) {
|
|
709
|
+
const showHelp = args.includes("--help") || args.includes("-h");
|
|
710
|
+
const outputClasses = args.includes("--classes");
|
|
711
|
+
const toOld = args.includes("--to-old");
|
|
712
|
+
if (showHelp) {
|
|
713
|
+
console.log(MIGRATE_HELP.trim());
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
if (!hasPendingMigrations()) {
|
|
717
|
+
console.log("No pending token migrations.");
|
|
718
|
+
console.log(`
|
|
719
|
+
Your codebase is up to date with the current SF version.`);
|
|
720
|
+
console.log("Token migrations are only needed when upgrading to versions");
|
|
721
|
+
console.log("that include breaking changes to token names.");
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
const direction = toOld ? "to-old" : "to-new";
|
|
725
|
+
const classMap = generateClassMap(direction);
|
|
726
|
+
if (outputClasses) {
|
|
727
|
+
const maxKeyLen = Math.max(...Object.keys(classMap).map((k) => k.length));
|
|
728
|
+
console.log(`# SF Token Migration (${direction})`);
|
|
729
|
+
console.log(`# ${Object.keys(classMap).length} class mappings
|
|
730
|
+
`);
|
|
731
|
+
for (const [from, to] of Object.entries(classMap)) {
|
|
732
|
+
console.log(`${from.padEnd(maxKeyLen)} -> ${to}`);
|
|
733
|
+
}
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
const output = {
|
|
737
|
+
meta: {
|
|
738
|
+
description: "SF token class name migration map",
|
|
739
|
+
direction,
|
|
740
|
+
generatedAt: new Date().toISOString()
|
|
741
|
+
},
|
|
742
|
+
tokens: PENDING_MIGRATIONS,
|
|
743
|
+
classes: classMap
|
|
744
|
+
};
|
|
745
|
+
console.log(JSON.stringify(output, null, 2));
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// src/command-line/cli.ts
|
|
749
|
+
var HELP = `
|
|
750
|
+
SF CLI - Component registry and blocks distribution
|
|
751
|
+
|
|
752
|
+
BLOCKS:
|
|
753
|
+
sf init Initialize sf.json configuration file
|
|
754
|
+
sf blocks List all available blocks for CLI installation
|
|
755
|
+
sf add <block> Install a block to your project
|
|
756
|
+
|
|
757
|
+
COMPONENT REGISTRY:
|
|
758
|
+
sf ls List all SF components with categories
|
|
759
|
+
sf doc <name> Get detailed documentation for a component
|
|
760
|
+
sf docs Get documentation for all components
|
|
761
|
+
|
|
762
|
+
MIGRATION:
|
|
763
|
+
sf migrate Export token rename map for codebase migration
|
|
764
|
+
sf migrate --classes Show class-level mappings (bg-sf-base -> bg-sf-base)
|
|
765
|
+
sf migrate --help Show migration help
|
|
766
|
+
|
|
767
|
+
AI:
|
|
768
|
+
sf ai Print the AI usage guide (component API reference)
|
|
769
|
+
|
|
770
|
+
GENERAL:
|
|
771
|
+
sf help Show this help message
|
|
772
|
+
|
|
773
|
+
Examples:
|
|
774
|
+
sf init
|
|
775
|
+
sf blocks
|
|
776
|
+
sf add PageHeader
|
|
777
|
+
sf ls
|
|
778
|
+
sf doc Button
|
|
779
|
+
sf docs
|
|
780
|
+
sf migrate --json > rename-map.json
|
|
781
|
+
`;
|
|
782
|
+
async function main() {
|
|
783
|
+
const args = process.argv.slice(2);
|
|
784
|
+
const command = args[0]?.toLowerCase();
|
|
785
|
+
switch (command) {
|
|
786
|
+
case "init":
|
|
787
|
+
await init();
|
|
788
|
+
break;
|
|
789
|
+
case "blocks":
|
|
790
|
+
blocks();
|
|
791
|
+
break;
|
|
792
|
+
case "add":
|
|
793
|
+
await add(args[1]);
|
|
794
|
+
break;
|
|
795
|
+
case "ls":
|
|
796
|
+
ls();
|
|
797
|
+
break;
|
|
798
|
+
case "doc":
|
|
799
|
+
case "docs":
|
|
800
|
+
doc(args[1]);
|
|
801
|
+
break;
|
|
802
|
+
case "migrate":
|
|
803
|
+
migrate(args.slice(1));
|
|
804
|
+
break;
|
|
805
|
+
case "ai":
|
|
806
|
+
ai();
|
|
807
|
+
break;
|
|
808
|
+
case "help":
|
|
809
|
+
case "--help":
|
|
810
|
+
case "-h":
|
|
811
|
+
case undefined:
|
|
812
|
+
console.log(HELP.trim());
|
|
813
|
+
break;
|
|
814
|
+
default:
|
|
815
|
+
console.error(`Unknown command: ${command}`);
|
|
816
|
+
console.log(HELP.trim());
|
|
817
|
+
process.exit(1);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
main().catch((error) => {
|
|
821
|
+
console.error(error);
|
|
822
|
+
process.exit(1);
|
|
823
|
+
});
|