@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,584 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SF Token Migration Tool
|
|
4
|
+
*
|
|
5
|
+
* Complete migration workflow:
|
|
6
|
+
* 1. Renames Tailwind classes in source files (bg-surface -> bg-sf-base)
|
|
7
|
+
* 2. Updates config.ts: newName becomes key, newName field becomes ""
|
|
8
|
+
* 3. Regenerates theme CSS with new names
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* bun run migrate:tokens # Migrate sf codebase
|
|
12
|
+
* bun run migrate:tokens --dry-run # Preview changes without writing
|
|
13
|
+
* bun run migrate:tokens --path /app # Migrate external project (classes only)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import * as fs from "node:fs";
|
|
17
|
+
import * as path from "node:path";
|
|
18
|
+
import { fileURLToPath } from "node:url";
|
|
19
|
+
|
|
20
|
+
import { THEME_CONFIG } from "./config.js";
|
|
21
|
+
import { getTokenRenameMap } from "./generate-css.js";
|
|
22
|
+
import type { TokenRenameMap } from "./types.js";
|
|
23
|
+
|
|
24
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
const MONOREPO_ROOT = path.resolve(__dirname, "../../../..");
|
|
26
|
+
const CONFIG_PATH = path.resolve(__dirname, "config.ts");
|
|
27
|
+
|
|
28
|
+
interface MigrationOptions {
|
|
29
|
+
rootPath: string;
|
|
30
|
+
include: string[];
|
|
31
|
+
exclude: string[];
|
|
32
|
+
dryRun: boolean;
|
|
33
|
+
verbose: boolean;
|
|
34
|
+
/** If true, also update config.ts after migration */
|
|
35
|
+
updateConfig: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface FileChange {
|
|
39
|
+
file: string;
|
|
40
|
+
changes: Array<{
|
|
41
|
+
line: number;
|
|
42
|
+
before: string;
|
|
43
|
+
after: string;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function matchesAnyGlob(filePath: string, patterns: string[]): boolean {
|
|
48
|
+
return patterns.some((pattern) => new Bun.Glob(pattern).match(filePath));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function findFiles(options: MigrationOptions): Promise<string[]> {
|
|
52
|
+
const files = new Set<string>();
|
|
53
|
+
|
|
54
|
+
for (const pattern of options.include) {
|
|
55
|
+
const glob = new Bun.Glob(pattern);
|
|
56
|
+
for await (const file of glob.scan({
|
|
57
|
+
cwd: options.rootPath,
|
|
58
|
+
absolute: true,
|
|
59
|
+
onlyFiles: true,
|
|
60
|
+
})) {
|
|
61
|
+
const relativePath = path.relative(options.rootPath, file);
|
|
62
|
+
if (matchesAnyGlob(relativePath, options.exclude)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
files.add(file);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return [...files];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Tailwind utility prefixes
|
|
74
|
+
const COLOR_PREFIXES = [
|
|
75
|
+
"bg",
|
|
76
|
+
"border",
|
|
77
|
+
"border-t",
|
|
78
|
+
"border-r",
|
|
79
|
+
"border-b",
|
|
80
|
+
"border-l",
|
|
81
|
+
"border-x",
|
|
82
|
+
"border-y",
|
|
83
|
+
"ring",
|
|
84
|
+
"ring-offset",
|
|
85
|
+
"outline",
|
|
86
|
+
"divide",
|
|
87
|
+
"shadow",
|
|
88
|
+
"accent",
|
|
89
|
+
"caret",
|
|
90
|
+
"fill",
|
|
91
|
+
"stroke",
|
|
92
|
+
"decoration",
|
|
93
|
+
"from",
|
|
94
|
+
"via",
|
|
95
|
+
"to",
|
|
96
|
+
];
|
|
97
|
+
const TEXT_PREFIXES = ["text"];
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Build regex patterns for class replacement
|
|
101
|
+
*/
|
|
102
|
+
function buildPatterns(renameMap: TokenRenameMap): Array<{
|
|
103
|
+
pattern: RegExp;
|
|
104
|
+
replacement: string;
|
|
105
|
+
}> {
|
|
106
|
+
const patterns: Array<{ pattern: RegExp; replacement: string }> = [];
|
|
107
|
+
|
|
108
|
+
// Variant prefix: hover:, focus:, sm:, group-hover:, etc.
|
|
109
|
+
const variants = "(?:(?:[a-z0-9-]+:)*)?";
|
|
110
|
+
// Opacity: /50, /[0.5]
|
|
111
|
+
const opacity = "(?:\\/(?:\\d+|\\[[\\.\\d]+\\]))?";
|
|
112
|
+
|
|
113
|
+
for (const [oldName, newName] of Object.entries(renameMap.text)) {
|
|
114
|
+
if (!newName) continue; // Skip if no migration planned
|
|
115
|
+
for (const prefix of TEXT_PREFIXES) {
|
|
116
|
+
patterns.push({
|
|
117
|
+
pattern: new RegExp(
|
|
118
|
+
`(${variants})(${prefix}-${escapeRegex(oldName)})(${opacity})(?=\\s|"|'|\`|$|\\))`,
|
|
119
|
+
"g"
|
|
120
|
+
),
|
|
121
|
+
replacement: `$1${prefix}-${newName}$3`,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
for (const [oldName, newName] of Object.entries(renameMap.color)) {
|
|
127
|
+
if (!newName) continue;
|
|
128
|
+
for (const prefix of COLOR_PREFIXES) {
|
|
129
|
+
patterns.push({
|
|
130
|
+
pattern: new RegExp(
|
|
131
|
+
`(${variants})(${prefix}-${escapeRegex(oldName)})(${opacity})(?=\\s|"|'|\`|$|\\))`,
|
|
132
|
+
"g"
|
|
133
|
+
),
|
|
134
|
+
replacement: `$1${prefix}-${newName}$3`,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return patterns;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function escapeRegex(str: string): string {
|
|
143
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Migrate a single file's content
|
|
148
|
+
*/
|
|
149
|
+
function migrateContent(
|
|
150
|
+
content: string,
|
|
151
|
+
patterns: Array<{ pattern: RegExp; replacement: string }>
|
|
152
|
+
): {
|
|
153
|
+
content: string;
|
|
154
|
+
changes: Array<{ line: number; before: string; after: string }>;
|
|
155
|
+
} {
|
|
156
|
+
const lines = content.split("\n");
|
|
157
|
+
const changes: Array<{ line: number; before: string; after: string }> = [];
|
|
158
|
+
|
|
159
|
+
const updatedLines = lines.map((line, idx) => {
|
|
160
|
+
let updated = line;
|
|
161
|
+
for (const { pattern, replacement } of patterns) {
|
|
162
|
+
pattern.lastIndex = 0;
|
|
163
|
+
updated = updated.replace(pattern, replacement);
|
|
164
|
+
}
|
|
165
|
+
if (updated !== line) {
|
|
166
|
+
changes.push({
|
|
167
|
+
line: idx + 1,
|
|
168
|
+
before: line.trim(),
|
|
169
|
+
after: updated.trim(),
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return updated;
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
return { content: updatedLines.join("\n"), changes };
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Simpler approach: rewrite config from scratch based on the data structure
|
|
180
|
+
*/
|
|
181
|
+
function rewriteConfig(renameMap: TokenRenameMap): string {
|
|
182
|
+
// Read the current config to preserve theme values
|
|
183
|
+
const currentConfig = THEME_CONFIG;
|
|
184
|
+
|
|
185
|
+
const lines: string[] = [
|
|
186
|
+
`/**`,
|
|
187
|
+
` * SF Theme Configuration`,
|
|
188
|
+
` *`,
|
|
189
|
+
` * Single source of truth for all semantic color tokens.`,
|
|
190
|
+
` * This config is used to generate:`,
|
|
191
|
+
` * - theme-sf.css (base theme)`,
|
|
192
|
+
` * - theme-fedramp.css (fedramp overrides)`,
|
|
193
|
+
` * - Any future theme files`,
|
|
194
|
+
` *`,
|
|
195
|
+
` * Token naming:`,
|
|
196
|
+
` * - Key = current token name used in codebase`,
|
|
197
|
+
` * - newName = future name (empty string = no migration planned)`,
|
|
198
|
+
` */`,
|
|
199
|
+
``,
|
|
200
|
+
`import type { ThemeConfig } from "./types.js";`,
|
|
201
|
+
``,
|
|
202
|
+
`export const THEME_CONFIG: ThemeConfig = {`,
|
|
203
|
+
` /**`,
|
|
204
|
+
` * Text color tokens`,
|
|
205
|
+
` * Used with: text-{token}`,
|
|
206
|
+
` * CSS variable: --text-color-{token}`,
|
|
207
|
+
` */`,
|
|
208
|
+
` text: {`,
|
|
209
|
+
];
|
|
210
|
+
|
|
211
|
+
// Text tokens
|
|
212
|
+
for (const [oldName, def] of Object.entries(currentConfig.text)) {
|
|
213
|
+
const newName = renameMap.text[oldName];
|
|
214
|
+
const finalKey = newName || oldName;
|
|
215
|
+
|
|
216
|
+
lines.push(` "${finalKey}": {`);
|
|
217
|
+
lines.push(` newName: "",`);
|
|
218
|
+
lines.push(` theme: {`);
|
|
219
|
+
|
|
220
|
+
for (const [themeName, colors] of Object.entries(def.theme)) {
|
|
221
|
+
if (colors) {
|
|
222
|
+
lines.push(` ${themeName}: {`);
|
|
223
|
+
lines.push(` light: "${colors.light}",`);
|
|
224
|
+
// oxlint-disable-next-line sf/no-tailwind-dark-variant
|
|
225
|
+
lines.push(` dark: "${colors.dark}",`);
|
|
226
|
+
lines.push(` },`);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
lines.push(` },`);
|
|
231
|
+
lines.push(` },`);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
lines.push(` },`);
|
|
235
|
+
lines.push(``);
|
|
236
|
+
lines.push(` /**`);
|
|
237
|
+
lines.push(` * Color tokens`);
|
|
238
|
+
lines.push(` * Used with: bg-{token}, border-{token}, ring-{token}, etc.`);
|
|
239
|
+
lines.push(` * CSS variable: --color-{token}`);
|
|
240
|
+
lines.push(` */`);
|
|
241
|
+
lines.push(` color: {`);
|
|
242
|
+
|
|
243
|
+
// Color tokens
|
|
244
|
+
for (const [oldName, def] of Object.entries(currentConfig.color)) {
|
|
245
|
+
const newName = renameMap.color[oldName];
|
|
246
|
+
const finalKey = newName || oldName;
|
|
247
|
+
|
|
248
|
+
lines.push(` "${finalKey}": {`);
|
|
249
|
+
lines.push(` newName: "",`);
|
|
250
|
+
lines.push(` theme: {`);
|
|
251
|
+
|
|
252
|
+
for (const [themeName, colors] of Object.entries(def.theme)) {
|
|
253
|
+
if (colors) {
|
|
254
|
+
lines.push(` ${themeName}: {`);
|
|
255
|
+
lines.push(` light: "${colors.light}",`);
|
|
256
|
+
// oxlint-disable-next-line sf/no-tailwind-dark-variant
|
|
257
|
+
lines.push(` dark: "${colors.dark}",`);
|
|
258
|
+
lines.push(` },`);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
lines.push(` },`);
|
|
263
|
+
lines.push(` },`);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
lines.push(` },`);
|
|
267
|
+
lines.push(`};`);
|
|
268
|
+
lines.push(``);
|
|
269
|
+
lines.push(`/** List of all available themes */`);
|
|
270
|
+
lines.push(`export const AVAILABLE_THEMES = ["sf", "fedramp"] as const;`);
|
|
271
|
+
lines.push(`export type AvailableTheme = (typeof AVAILABLE_THEMES)[number];`);
|
|
272
|
+
lines.push(``);
|
|
273
|
+
|
|
274
|
+
return lines.join("\n");
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Check if there are any pending migrations
|
|
279
|
+
*/
|
|
280
|
+
function hasPendingMigrations(renameMap: TokenRenameMap): boolean {
|
|
281
|
+
for (const newName of Object.values(renameMap.text)) {
|
|
282
|
+
if (newName) return true;
|
|
283
|
+
}
|
|
284
|
+
for (const newName of Object.values(renameMap.color)) {
|
|
285
|
+
if (newName) return true;
|
|
286
|
+
}
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Run the full migration
|
|
292
|
+
*/
|
|
293
|
+
async function runMigration(options: MigrationOptions): Promise<{
|
|
294
|
+
fileChanges: FileChange[];
|
|
295
|
+
configUpdated: boolean;
|
|
296
|
+
stats: { files: number; changes: number };
|
|
297
|
+
}> {
|
|
298
|
+
const renameMap = getTokenRenameMap(THEME_CONFIG);
|
|
299
|
+
|
|
300
|
+
if (!hasPendingMigrations(renameMap)) {
|
|
301
|
+
return {
|
|
302
|
+
fileChanges: [],
|
|
303
|
+
configUpdated: false,
|
|
304
|
+
stats: { files: 0, changes: 0 },
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const patterns = buildPatterns(renameMap);
|
|
309
|
+
|
|
310
|
+
// Find files
|
|
311
|
+
const files = await findFiles(options);
|
|
312
|
+
|
|
313
|
+
const fileChanges: FileChange[] = [];
|
|
314
|
+
let totalChanges = 0;
|
|
315
|
+
|
|
316
|
+
for (const file of files) {
|
|
317
|
+
try {
|
|
318
|
+
const content = fs.readFileSync(file, "utf-8");
|
|
319
|
+
const { content: updated, changes } = migrateContent(content, patterns);
|
|
320
|
+
|
|
321
|
+
if (changes.length > 0) {
|
|
322
|
+
fileChanges.push({ file, changes });
|
|
323
|
+
totalChanges += changes.length;
|
|
324
|
+
|
|
325
|
+
if (!options.dryRun) {
|
|
326
|
+
fs.writeFileSync(file, updated, "utf-8");
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
} catch {
|
|
330
|
+
// Skip files that can't be read (binary, permissions, etc.)
|
|
331
|
+
if (options.verbose) {
|
|
332
|
+
console.warn(` Skipped: ${file}`);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Update config.ts if requested and not dry-run
|
|
338
|
+
let configUpdated = false;
|
|
339
|
+
if (options.updateConfig && !options.dryRun) {
|
|
340
|
+
const newConfig = rewriteConfig(renameMap);
|
|
341
|
+
fs.writeFileSync(CONFIG_PATH, newConfig, "utf-8");
|
|
342
|
+
configUpdated = true;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return {
|
|
346
|
+
fileChanges,
|
|
347
|
+
configUpdated,
|
|
348
|
+
stats: { files: fileChanges.length, changes: totalChanges },
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// CLI
|
|
353
|
+
function parseArgs(
|
|
354
|
+
args: string[]
|
|
355
|
+
): MigrationOptions & { help: boolean; exportMap: boolean } {
|
|
356
|
+
let rootPath = MONOREPO_ROOT;
|
|
357
|
+
let dryRun = false;
|
|
358
|
+
let verbose = false;
|
|
359
|
+
let updateConfig = true;
|
|
360
|
+
let help = false;
|
|
361
|
+
let exportMap = false;
|
|
362
|
+
const include: string[] = [];
|
|
363
|
+
const exclude: string[] = [];
|
|
364
|
+
|
|
365
|
+
for (let i = 0; i < args.length; i++) {
|
|
366
|
+
const arg = args[i];
|
|
367
|
+
if (arg === "--path" && args[i + 1]) {
|
|
368
|
+
rootPath = path.resolve(args[++i]);
|
|
369
|
+
updateConfig = false; // External projects don't update sf's config
|
|
370
|
+
} else if (arg === "--dry-run") {
|
|
371
|
+
dryRun = true;
|
|
372
|
+
} else if (arg === "--verbose" || arg === "-v") {
|
|
373
|
+
verbose = true;
|
|
374
|
+
} else if (arg === "--no-config") {
|
|
375
|
+
updateConfig = false;
|
|
376
|
+
} else if (arg === "--export-map") {
|
|
377
|
+
exportMap = true;
|
|
378
|
+
} else if (arg === "--help" || arg === "-h") {
|
|
379
|
+
help = true;
|
|
380
|
+
} else if (arg === "--include" && args[i + 1]) {
|
|
381
|
+
include.push(args[++i]);
|
|
382
|
+
} else if (arg === "--exclude" && args[i + 1]) {
|
|
383
|
+
exclude.push(args[++i]);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const defaultInclude = [
|
|
388
|
+
"**/*.ts",
|
|
389
|
+
"**/*.tsx",
|
|
390
|
+
"**/*.js",
|
|
391
|
+
"**/*.jsx",
|
|
392
|
+
"**/*.css",
|
|
393
|
+
"**/*.html",
|
|
394
|
+
"**/*.md",
|
|
395
|
+
"**/*.mdx",
|
|
396
|
+
"**/*.astro",
|
|
397
|
+
];
|
|
398
|
+
const defaultExclude = [
|
|
399
|
+
"**/node_modules/**",
|
|
400
|
+
"**/dist/**",
|
|
401
|
+
"**/build/**",
|
|
402
|
+
"**/.git/**",
|
|
403
|
+
"**/coverage/**",
|
|
404
|
+
"**/.next/**",
|
|
405
|
+
"**/.turbo/**",
|
|
406
|
+
"**/theme-sf.css",
|
|
407
|
+
"**/theme-fedramp.css",
|
|
408
|
+
"**/theme-generator/**",
|
|
409
|
+
"**/component-registry.json",
|
|
410
|
+
"**/component-registry.md",
|
|
411
|
+
];
|
|
412
|
+
|
|
413
|
+
return {
|
|
414
|
+
rootPath,
|
|
415
|
+
include: include.length > 0 ? include : defaultInclude,
|
|
416
|
+
exclude: [...defaultExclude, ...exclude],
|
|
417
|
+
dryRun,
|
|
418
|
+
verbose,
|
|
419
|
+
updateConfig,
|
|
420
|
+
help,
|
|
421
|
+
exportMap,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function printHelp(): void {
|
|
426
|
+
console.log(`
|
|
427
|
+
SF Token Migration Tool
|
|
428
|
+
|
|
429
|
+
Migrates Tailwind classes when token names change. This tool:
|
|
430
|
+
1. Updates class names in source files (bg-surface -> bg-sf-base)
|
|
431
|
+
2. Updates config.ts (newName becomes key, newName field cleared)
|
|
432
|
+
3. Ready for codegen:themes to regenerate CSS
|
|
433
|
+
|
|
434
|
+
USAGE:
|
|
435
|
+
bun run migrate:tokens [options]
|
|
436
|
+
|
|
437
|
+
OPTIONS:
|
|
438
|
+
--dry-run Preview changes without writing files
|
|
439
|
+
--verbose, -v Show detailed change information
|
|
440
|
+
--path <dir> Migrate external project (won't update config.ts)
|
|
441
|
+
--no-config Skip config.ts update
|
|
442
|
+
--export-map Output JSON rename map and exit
|
|
443
|
+
--help, -h Show this help
|
|
444
|
+
|
|
445
|
+
WORKFLOW:
|
|
446
|
+
1. Set newName in config.ts for tokens you want to rename
|
|
447
|
+
2. Run: bun run migrate:tokens --dry-run (preview)
|
|
448
|
+
3. Run: bun run migrate:tokens (apply)
|
|
449
|
+
4. Run: bun run codegen:themes (regenerate CSS)
|
|
450
|
+
5. Commit changes
|
|
451
|
+
|
|
452
|
+
EXAMPLE - Renaming "surface" to "sf-base":
|
|
453
|
+
|
|
454
|
+
Before config.ts:
|
|
455
|
+
surface: { newName: "sf-base", theme: { ... } }
|
|
456
|
+
|
|
457
|
+
After migration:
|
|
458
|
+
"sf-base": { newName: "", theme: { ... } }
|
|
459
|
+
|
|
460
|
+
Class changes:
|
|
461
|
+
bg-surface -> bg-sf-base
|
|
462
|
+
text-surface -> text-sf-base
|
|
463
|
+
hover:bg-surface/50 -> hover:bg-sf-base/50
|
|
464
|
+
`);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
function printExportMap(): void {
|
|
468
|
+
const renameMap = getTokenRenameMap(THEME_CONFIG);
|
|
469
|
+
const classMap: Record<string, string> = {};
|
|
470
|
+
|
|
471
|
+
for (const [oldName, newName] of Object.entries(renameMap.text)) {
|
|
472
|
+
if (!newName) continue;
|
|
473
|
+
for (const prefix of TEXT_PREFIXES) {
|
|
474
|
+
classMap[`${prefix}-${oldName}`] = `${prefix}-${newName}`;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
for (const [oldName, newName] of Object.entries(renameMap.color)) {
|
|
479
|
+
if (!newName) continue;
|
|
480
|
+
for (const prefix of COLOR_PREFIXES) {
|
|
481
|
+
classMap[`${prefix}-${oldName}`] = `${prefix}-${newName}`;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
console.log(
|
|
486
|
+
JSON.stringify(
|
|
487
|
+
{
|
|
488
|
+
meta: {
|
|
489
|
+
description: "SF token migration map",
|
|
490
|
+
generatedAt: new Date().toISOString(),
|
|
491
|
+
},
|
|
492
|
+
tokens: renameMap,
|
|
493
|
+
classes: classMap,
|
|
494
|
+
},
|
|
495
|
+
null,
|
|
496
|
+
2
|
|
497
|
+
)
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
async function main(): Promise<void> {
|
|
502
|
+
const options = parseArgs(process.argv.slice(2));
|
|
503
|
+
|
|
504
|
+
if (options.help) {
|
|
505
|
+
printHelp();
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
if (options.exportMap) {
|
|
510
|
+
printExportMap();
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
const renameMap = getTokenRenameMap(THEME_CONFIG);
|
|
515
|
+
|
|
516
|
+
if (!hasPendingMigrations(renameMap)) {
|
|
517
|
+
console.log("No pending migrations. All newName fields are empty.");
|
|
518
|
+
console.log("\nTo migrate tokens, set newName in config.ts:");
|
|
519
|
+
console.log(' surface: { newName: "sf-base", theme: { ... } }');
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
console.log("SF Token Migration\n");
|
|
524
|
+
console.log(`Root: ${options.rootPath}`);
|
|
525
|
+
console.log(`Dry run: ${options.dryRun}`);
|
|
526
|
+
console.log(`Update config: ${options.updateConfig}`);
|
|
527
|
+
console.log("");
|
|
528
|
+
|
|
529
|
+
// Show what will be renamed
|
|
530
|
+
console.log("Pending renames:");
|
|
531
|
+
for (const [old, newName] of Object.entries(renameMap.text)) {
|
|
532
|
+
if (newName) console.log(` text-${old} -> text-${newName}`);
|
|
533
|
+
}
|
|
534
|
+
for (const [old, newName] of Object.entries(renameMap.color)) {
|
|
535
|
+
if (newName)
|
|
536
|
+
console.log(` bg-${old} -> bg-${newName} (and border-, ring-, etc.)`);
|
|
537
|
+
}
|
|
538
|
+
console.log("");
|
|
539
|
+
|
|
540
|
+
const { fileChanges, configUpdated, stats } = await runMigration(options);
|
|
541
|
+
|
|
542
|
+
if (fileChanges.length === 0) {
|
|
543
|
+
console.log("No class usages found to migrate.");
|
|
544
|
+
} else {
|
|
545
|
+
console.log(`\n${"=".repeat(60)}`);
|
|
546
|
+
console.log(options.dryRun ? "PREVIEW (dry run)" : "MIGRATION COMPLETE");
|
|
547
|
+
console.log("=".repeat(60));
|
|
548
|
+
|
|
549
|
+
for (const { file, changes } of fileChanges) {
|
|
550
|
+
console.log(`\n${file}`);
|
|
551
|
+
if (options.verbose) {
|
|
552
|
+
for (const c of changes) {
|
|
553
|
+
console.log(` L${c.line}: ${c.before}`);
|
|
554
|
+
console.log(` -> ${c.after}`);
|
|
555
|
+
}
|
|
556
|
+
} else {
|
|
557
|
+
console.log(` ${changes.length} change(s)`);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
console.log(`\n${"-".repeat(60)}`);
|
|
562
|
+
console.log(`Files changed: ${stats.files}`);
|
|
563
|
+
console.log(`Total changes: ${stats.changes}`);
|
|
564
|
+
if (configUpdated) {
|
|
565
|
+
console.log(`Config updated: ${CONFIG_PATH}`);
|
|
566
|
+
}
|
|
567
|
+
console.log("-".repeat(60));
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
if (options.dryRun) {
|
|
571
|
+
console.log(
|
|
572
|
+
"\nThis was a dry run. Run without --dry-run to apply changes."
|
|
573
|
+
);
|
|
574
|
+
} else if (configUpdated) {
|
|
575
|
+
console.log("\nNext step: bun run codegen:themes");
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
main().catch((err) => {
|
|
580
|
+
console.error("Error:", err.message);
|
|
581
|
+
process.exit(1);
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
export { runMigration, buildPatterns, migrateContent, rewriteConfig };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF Theme Generator Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for semantic color tokens and typography that can be themed.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** Light and dark mode color values */
|
|
8
|
+
export type ColorMode = {
|
|
9
|
+
light: string;
|
|
10
|
+
dark: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** Theme-specific color overrides (sf is required, others are optional) */
|
|
14
|
+
export type ThemeColors = {
|
|
15
|
+
sf: ColorMode;
|
|
16
|
+
fedramp?: ColorMode;
|
|
17
|
+
[themeName: string]: ColorMode | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Definition of a single semantic token */
|
|
21
|
+
export type TokenDefinition = {
|
|
22
|
+
/** New name for the token (for future migration) */
|
|
23
|
+
newName: string;
|
|
24
|
+
/** Theme-specific color values */
|
|
25
|
+
theme: ThemeColors;
|
|
26
|
+
/** Optional description for documentation */
|
|
27
|
+
description?: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** Text color tokens (used with text-* utilities) */
|
|
31
|
+
export type TextTokens = {
|
|
32
|
+
[tokenName: string]: TokenDefinition;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Color tokens (used with bg-*, border-*, ring-*, etc.) */
|
|
36
|
+
export type ColorTokens = {
|
|
37
|
+
[tokenName: string]: TokenDefinition;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** Theme-specific typography values (sf is required, others are optional) */
|
|
41
|
+
export type ThemeTypography = {
|
|
42
|
+
sf: string;
|
|
43
|
+
fedramp?: string;
|
|
44
|
+
[themeName: string]: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Definition of a single typography token (font size or line height) */
|
|
48
|
+
export type TypographyTokenDefinition = {
|
|
49
|
+
/** New name for the token (for future migration) */
|
|
50
|
+
newName: string;
|
|
51
|
+
/** Theme-specific typography values */
|
|
52
|
+
theme: ThemeTypography;
|
|
53
|
+
/** Optional description for documentation */
|
|
54
|
+
description?: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** Typography tokens for text sizes and line heights */
|
|
58
|
+
export type TypographyTokens = {
|
|
59
|
+
[tokenName: string]: TypographyTokenDefinition;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** Complete theme configuration */
|
|
63
|
+
export type ThemeConfig = {
|
|
64
|
+
/** Text color tokens */
|
|
65
|
+
text: TextTokens;
|
|
66
|
+
/** General color tokens (bg, border, ring, etc.) */
|
|
67
|
+
color: ColorTokens;
|
|
68
|
+
/** Typography tokens (font sizes and line heights) */
|
|
69
|
+
typography?: TypographyTokens;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** Output options for CSS generation */
|
|
73
|
+
export type GeneratorOptions = {
|
|
74
|
+
/** Output directory for generated CSS files */
|
|
75
|
+
outputDir: string;
|
|
76
|
+
/** Whether to use the new token names (for migration) */
|
|
77
|
+
useNewNames?: boolean;
|
|
78
|
+
/** Themes to generate (defaults to all) */
|
|
79
|
+
themes?: string[];
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** Mapping from old token names to new names (for codemod) */
|
|
83
|
+
export type TokenRenameMap = {
|
|
84
|
+
text: Record<string, string>;
|
|
85
|
+
color: Record<string, string>;
|
|
86
|
+
};
|