@superblocksteam/vite-plugin-file-sync 2.0.115-next.0 → 2.0.115-next.2
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/dist/ai-service/agent/middleware.d.ts.map +1 -1
- package/dist/ai-service/agent/middleware.js +19 -0
- package/dist/ai-service/agent/middleware.js.map +1 -1
- package/dist/ai-service/agent/prompts/api-prompts.d.ts.map +1 -1
- package/dist/ai-service/agent/prompts/api-prompts.js +13 -17
- package/dist/ai-service/agent/prompts/api-prompts.js.map +1 -1
- package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts.map +1 -1
- package/dist/ai-service/agent/prompts/build-base-system-prompt.js +22 -3
- package/dist/ai-service/agent/prompts/build-base-system-prompt.js.map +1 -1
- package/dist/ai-service/agent/subagents/coding/prompt-builder.d.ts +16 -0
- package/dist/ai-service/agent/subagents/coding/prompt-builder.d.ts.map +1 -0
- package/dist/ai-service/agent/subagents/coding/prompt-builder.js +30 -0
- package/dist/ai-service/agent/subagents/coding/prompt-builder.js.map +1 -0
- package/dist/ai-service/agent/subagents/coding/run-coding-subagent.d.ts +29 -0
- package/dist/ai-service/agent/subagents/coding/run-coding-subagent.d.ts.map +1 -0
- package/dist/ai-service/agent/subagents/coding/run-coding-subagent.js +108 -0
- package/dist/ai-service/agent/subagents/coding/run-coding-subagent.js.map +1 -0
- package/dist/ai-service/agent/subagents/types.d.ts +9 -1
- package/dist/ai-service/agent/subagents/types.d.ts.map +1 -1
- package/dist/ai-service/agent/subagents/types.js +8 -0
- package/dist/ai-service/agent/subagents/types.js.map +1 -1
- package/dist/ai-service/agent/tool-message-utils.d.ts.map +1 -1
- package/dist/ai-service/agent/tool-message-utils.js +5 -0
- package/dist/ai-service/agent/tool-message-utils.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js +2 -1
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.d.ts +6 -0
- package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.d.ts.map +1 -0
- package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js +138 -0
- package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js.map +1 -0
- package/dist/ai-service/agent/tools/build-finalize.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-finalize.js +39 -15
- package/dist/ai-service/agent/tools/build-finalize.js.map +1 -1
- package/dist/ai-service/agent/tools/build-manage-checklist.d.ts +6 -3
- package/dist/ai-service/agent/tools/build-manage-checklist.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-manage-checklist.js +116 -49
- package/dist/ai-service/agent/tools/build-manage-checklist.js.map +1 -1
- package/dist/ai-service/agent/tools/index.d.ts +2 -0
- package/dist/ai-service/agent/tools/index.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/index.js +2 -0
- package/dist/ai-service/agent/tools/index.js.map +1 -1
- package/dist/ai-service/agent/tools/integrations/execute-request.d.ts +3 -0
- package/dist/ai-service/agent/tools/integrations/execute-request.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/integrations/execute-request.js +330 -204
- package/dist/ai-service/agent/tools/integrations/execute-request.js.map +1 -1
- package/dist/ai-service/agent/tools.d.ts.map +1 -1
- package/dist/ai-service/agent/tools.js +40 -2
- package/dist/ai-service/agent/tools.js.map +1 -1
- package/dist/ai-service/agent/tools2/access-control.d.ts +1 -1
- package/dist/ai-service/agent/tools2/access-control.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/access-control.js +15 -4
- package/dist/ai-service/agent/tools2/access-control.js.map +1 -1
- package/dist/ai-service/agent/tools2/registry.d.ts +3 -0
- package/dist/ai-service/agent/tools2/registry.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/registry.js +50 -8
- package/dist/ai-service/agent/tools2/registry.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-multi-choice.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-multi-choice.js +3 -2
- package/dist/ai-service/agent/tools2/tools/ask-multi-choice.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.js +2 -1
- package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/deploy-service.d.ts +16 -0
- package/dist/ai-service/agent/tools2/tools/deploy-service.d.ts.map +1 -0
- package/dist/ai-service/agent/tools2/tools/deploy-service.js +135 -0
- package/dist/ai-service/agent/tools2/tools/deploy-service.js.map +1 -0
- package/dist/ai-service/agent/tools2/tools/download-attachments.d.ts +33 -0
- package/dist/ai-service/agent/tools2/tools/download-attachments.d.ts.map +1 -0
- package/dist/ai-service/agent/tools2/tools/download-attachments.js +308 -0
- package/dist/ai-service/agent/tools2/tools/download-attachments.js.map +1 -0
- package/dist/ai-service/agent/tools2/tools/exit-plan-mode.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js +8 -4
- package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/git.d.ts +57 -1
- package/dist/ai-service/agent/tools2/tools/git.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/git.js +275 -8
- package/dist/ai-service/agent/tools2/tools/git.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/index.d.ts +2 -1
- package/dist/ai-service/agent/tools2/tools/index.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/index.js +2 -1
- package/dist/ai-service/agent/tools2/tools/index.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/list-attachments.d.ts +4 -1
- package/dist/ai-service/agent/tools2/tools/list-attachments.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/list-attachments.js +20 -4
- package/dist/ai-service/agent/tools2/tools/list-attachments.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.d.ts +28 -0
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.d.ts.map +1 -0
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.js +152 -0
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.js.map +1 -0
- package/dist/ai-service/agent/tools2/types.d.ts +1 -18
- package/dist/ai-service/agent/tools2/types.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/types.js.map +1 -1
- package/dist/ai-service/agent/utils.d.ts.map +1 -1
- package/dist/ai-service/agent/utils.js +22 -5
- package/dist/ai-service/agent/utils.js.map +1 -1
- package/dist/ai-service/app-interface/file-system-interface.d.ts +0 -4
- package/dist/ai-service/app-interface/file-system-interface.d.ts.map +1 -1
- package/dist/ai-service/app-interface/file-system-interface.js +0 -21
- package/dist/ai-service/app-interface/file-system-interface.js.map +1 -1
- package/dist/ai-service/app-interface/filesystem/virtual-file-system.d.ts +11 -1
- package/dist/ai-service/app-interface/filesystem/virtual-file-system.d.ts.map +1 -1
- package/dist/ai-service/app-interface/filesystem/virtual-file-system.js +29 -7
- package/dist/ai-service/app-interface/filesystem/virtual-file-system.js.map +1 -1
- package/dist/ai-service/app-interface/shell.d.ts +6 -0
- package/dist/ai-service/app-interface/shell.d.ts.map +1 -1
- package/dist/ai-service/app-interface/shell.js +8 -0
- package/dist/ai-service/app-interface/shell.js.map +1 -1
- package/dist/ai-service/app-skills/helpers.d.ts.map +1 -1
- package/dist/ai-service/app-skills/helpers.js +4 -2
- package/dist/ai-service/app-skills/helpers.js.map +1 -1
- package/dist/ai-service/attachments/store.d.ts +18 -2
- package/dist/ai-service/attachments/store.d.ts.map +1 -1
- package/dist/ai-service/attachments/store.js +102 -9
- package/dist/ai-service/attachments/store.js.map +1 -1
- package/dist/ai-service/attachments/uploaded-content-part.d.ts +5 -2
- package/dist/ai-service/attachments/uploaded-content-part.d.ts.map +1 -1
- package/dist/ai-service/attachments/uploaded-content-part.js +32 -0
- package/dist/ai-service/attachments/uploaded-content-part.js.map +1 -1
- package/dist/ai-service/chat/chat-session-store.d.ts +2 -2
- package/dist/ai-service/chat/chat-session-store.d.ts.map +1 -1
- package/dist/ai-service/chat/chat-session-store.js +45 -243
- package/dist/ai-service/chat/chat-session-store.js.map +1 -1
- package/dist/ai-service/chat/utils.d.ts +6 -0
- package/dist/ai-service/chat/utils.d.ts.map +1 -1
- package/dist/ai-service/chat/utils.js +47 -0
- package/dist/ai-service/chat/utils.js.map +1 -1
- package/dist/ai-service/features.d.ts +4 -0
- package/dist/ai-service/features.d.ts.map +1 -1
- package/dist/ai-service/features.js +4 -0
- package/dist/ai-service/features.js.map +1 -1
- package/dist/ai-service/index.d.ts +36 -11
- package/dist/ai-service/index.d.ts.map +1 -1
- package/dist/ai-service/index.js +228 -68
- package/dist/ai-service/index.js.map +1 -1
- package/dist/ai-service/judge/tools/playwright-action.d.ts +1 -1
- package/dist/ai-service/llm/client.d.ts.map +1 -1
- package/dist/ai-service/llm/client.js +4 -2
- package/dist/ai-service/llm/client.js.map +1 -1
- package/dist/ai-service/llm/stream/observers/retry-notification.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/observers/retry-notification.js +4 -2
- package/dist/ai-service/llm/stream/observers/retry-notification.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js +1 -16
- package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/types.d.ts +2 -13
- package/dist/ai-service/prompt-builder-service/types.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/types.js.map +1 -1
- package/dist/ai-service/skills/system/_registry.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/_registry.generated.js +6 -0
- package/dist/ai-service/skills/system/_registry.generated.js.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.d.ts +2 -0
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.d.ts.map +1 -0
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.js +58 -0
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.js.map +1 -0
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.d.ts +2 -0
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.d.ts.map +1 -0
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.js +107 -0
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.js.map +1 -0
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts +2 -0
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts.map +1 -0
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js +137 -0
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js.map +1 -0
- package/dist/ai-service/state-machine/clark-fsm.d.ts +26 -13
- package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
- package/dist/ai-service/state-machine/clark-fsm.js +12 -7
- package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/agent-planning.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/agent-planning.js +76 -27
- package/dist/ai-service/state-machine/handlers/agent-planning.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/awaiting-user.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/awaiting-user.js +15 -6
- package/dist/ai-service/state-machine/handlers/awaiting-user.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/idle.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/idle.js +4 -2
- package/dist/ai-service/state-machine/handlers/idle.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.js +48 -15
- package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/post-processing.d.ts +1 -1
- package/dist/ai-service/state-machine/handlers/post-processing.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/post-processing.js +23 -151
- package/dist/ai-service/state-machine/handlers/post-processing.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/runtime-reviewing.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/runtime-reviewing.js +16 -8
- package/dist/ai-service/state-machine/handlers/runtime-reviewing.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/change-info.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/change-info.js +2 -15
- package/dist/ai-service/state-machine/helpers/change-info.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/peer.d.ts +3 -3
- package/dist/ai-service/state-machine/helpers/peer.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/peer.js +9 -23
- package/dist/ai-service/state-machine/helpers/peer.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/stable-peer.d.ts +52 -0
- package/dist/ai-service/state-machine/helpers/stable-peer.d.ts.map +1 -0
- package/dist/ai-service/state-machine/helpers/stable-peer.js +141 -0
- package/dist/ai-service/state-machine/helpers/stable-peer.js.map +1 -0
- package/dist/ai-service/state-machine/mocks.d.ts.map +1 -1
- package/dist/ai-service/state-machine/mocks.js +0 -17
- package/dist/ai-service/state-machine/mocks.js.map +1 -1
- package/dist/ai-service/types.d.ts +2 -21
- package/dist/ai-service/types.d.ts.map +1 -1
- package/dist/ai-service/types.js.map +1 -1
- package/dist/ai-service/util/archive-extractors.d.ts +52 -0
- package/dist/ai-service/util/archive-extractors.d.ts.map +1 -0
- package/dist/ai-service/util/archive-extractors.js +278 -0
- package/dist/ai-service/util/archive-extractors.js.map +1 -0
- package/dist/codegen.d.ts +1 -22
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +1 -117
- package/dist/codegen.js.map +1 -1
- package/dist/components-manager.d.ts +0 -6
- package/dist/components-manager.d.ts.map +1 -1
- package/dist/components-manager.js +0 -27
- package/dist/components-manager.js.map +1 -1
- package/dist/file-sync-vite-plugin.d.ts.map +1 -1
- package/dist/file-sync-vite-plugin.js +47 -94
- package/dist/file-sync-vite-plugin.js.map +1 -1
- package/dist/file-system-manager.d.ts +2 -15
- package/dist/file-system-manager.d.ts.map +1 -1
- package/dist/file-system-manager.js +16 -128
- package/dist/file-system-manager.js.map +1 -1
- package/dist/git-service/live-branch.d.ts.map +1 -1
- package/dist/git-service/live-branch.js +15 -1
- package/dist/git-service/live-branch.js.map +1 -1
- package/dist/lock-service/index.d.ts.map +1 -1
- package/dist/lock-service/index.js +8 -5
- package/dist/lock-service/index.js.map +1 -1
- package/dist/migration/get-fullstack-template-dir.d.ts +37 -0
- package/dist/migration/get-fullstack-template-dir.d.ts.map +1 -0
- package/dist/migration/get-fullstack-template-dir.js +99 -0
- package/dist/migration/get-fullstack-template-dir.js.map +1 -0
- package/dist/migration/migration-checklist.d.ts +60 -0
- package/dist/migration/migration-checklist.d.ts.map +1 -0
- package/dist/migration/migration-checklist.js +230 -0
- package/dist/migration/migration-checklist.js.map +1 -0
- package/dist/migration/migration-routes.d.ts +23 -0
- package/dist/migration/migration-routes.d.ts.map +1 -0
- package/dist/migration/migration-routes.js +533 -0
- package/dist/migration/migration-routes.js.map +1 -0
- package/dist/migration/restructure.d.ts +76 -0
- package/dist/migration/restructure.d.ts.map +1 -0
- package/dist/migration/restructure.js +446 -0
- package/dist/migration/restructure.js.map +1 -0
- package/dist/migration/translation-prompt.d.ts +22 -0
- package/dist/migration/translation-prompt.d.ts.map +1 -0
- package/dist/migration/translation-prompt.js +27 -0
- package/dist/migration/translation-prompt.js.map +1 -0
- package/dist/migration-templates/app-fullstack/client/App.tsx +17 -0
- package/dist/migration-templates/app-fullstack/client/components/common/sonner.tsx +20 -0
- package/dist/migration-templates/app-fullstack/client/components/hooks/use-active-page.ts +73 -0
- package/dist/migration-templates/app-fullstack/client/components/hooks/use-mobile.ts +21 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/accordion.tsx +197 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/area-chart.tsx +432 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/aspect-ratio.tsx +45 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/avatar.tsx +117 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/badge.tsx +143 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/bar-chart.tsx +390 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/breadcrumb.tsx +259 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/button.tsx +182 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/calendar.tsx +300 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/card.tsx +129 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/chart.tsx +403 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/chat.tsx +2303 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/checkbox.tsx +97 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/code-block-content.tsx +66 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/date-range-picker.tsx +396 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/dialog.tsx +223 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/dropdown-menu.tsx +284 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/file-dropzone.tsx +395 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/file-input.tsx +166 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/hover-card.tsx +162 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/icon.tsx +133 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/image.tsx +68 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/input.tsx +219 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/label.tsx +55 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/line-chart.tsx +380 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/link.tsx +139 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/navigation-menu.tsx +345 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/pagination.tsx +192 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/pie-chart.tsx +295 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/popover.tsx +162 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/progress.tsx +69 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/radar-chart.tsx +386 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/radial-chart.tsx +402 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/scroll-area.tsx +86 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/select.tsx +229 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/separator.tsx +62 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/sheet.tsx +234 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/sidebar.tsx +974 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/skeleton.tsx +13 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/slider.tsx +198 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/switch.tsx +95 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/table.tsx +145 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/tabs.tsx +87 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/textarea.tsx +148 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/toggle-group.tsx +225 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/toggle.tsx +150 -0
- package/dist/migration-templates/app-fullstack/client/components/ui/tooltip.tsx +175 -0
- package/dist/migration-templates/app-fullstack/client/hooks/useApi.ts +25 -0
- package/dist/migration-templates/app-fullstack/client/hooks/useApiData.ts +10 -0
- package/dist/migration-templates/app-fullstack/client/index.css +131 -0
- package/dist/migration-templates/app-fullstack/client/lib/executeApi.ts +9 -0
- package/dist/migration-templates/app-fullstack/client/lib/utils.ts +6 -0
- package/dist/migration-templates/app-fullstack/client/pages/Page1/index.tsx +3 -0
- package/dist/migration-templates/app-fullstack/client/root.tsx +17 -0
- package/dist/migration-templates/app-fullstack/client/router.tsx +48 -0
- package/dist/migration-templates/app-fullstack/client/types/node.d.ts +9 -0
- package/dist/migration-templates/app-fullstack/components.json +21 -0
- package/dist/migration-templates/app-fullstack/eslint.config.js +108 -0
- package/dist/migration-templates/app-fullstack/package.json +89 -0
- package/dist/migration-templates/app-fullstack/server/.gitkeep +0 -0
- package/dist/migration-templates/app-fullstack/server/apis/index.ts +22 -0
- package/dist/migration-templates/app-fullstack/server/index.ts +2 -0
- package/dist/migration-templates/app-fullstack/tsconfig.client.json +27 -0
- package/dist/migration-templates/app-fullstack/tsconfig.eslint.json +8 -0
- package/dist/migration-templates/app-fullstack/tsconfig.json +25 -0
- package/dist/migration-templates/app-fullstack/tsconfig.server.json +13 -0
- package/dist/migration-templates/app-fullstack/vite.config.ts +17 -0
- package/dist/parsing/imports.d.ts +0 -16
- package/dist/parsing/imports.d.ts.map +1 -1
- package/dist/parsing/imports.js +0 -68
- package/dist/parsing/imports.js.map +1 -1
- package/dist/parsing/jsx.d.ts +0 -2
- package/dist/parsing/jsx.d.ts.map +1 -1
- package/dist/parsing/jsx.js +0 -62
- package/dist/parsing/jsx.js.map +1 -1
- package/dist/socket-manager.d.ts.map +1 -1
- package/dist/socket-manager.js +109 -32
- package/dist/socket-manager.js.map +1 -1
- package/dist/source-tracker.d.ts +7 -85
- package/dist/source-tracker.d.ts.map +1 -1
- package/dist/source-tracker.js +19 -695
- package/dist/source-tracker.js.map +1 -1
- package/dist/sync-service/index.d.ts +79 -2
- package/dist/sync-service/index.d.ts.map +1 -1
- package/dist/sync-service/index.js +139 -10
- package/dist/sync-service/index.js.map +1 -1
- package/package.json +11 -9
- package/dist/ai-service/artifacts/bolt.d.ts +0 -8
- package/dist/ai-service/artifacts/bolt.d.ts.map +0 -1
- package/dist/ai-service/artifacts/bolt.js +0 -92
- package/dist/ai-service/artifacts/bolt.js.map +0 -1
- package/dist/ai-service/result-buffer/bolt.d.ts +0 -18
- package/dist/ai-service/result-buffer/bolt.d.ts.map +0 -1
- package/dist/ai-service/result-buffer/bolt.js +0 -100
- package/dist/ai-service/result-buffer/bolt.js.map +0 -1
- package/dist/ai-service/result-buffer/shared.d.ts +0 -17
- package/dist/ai-service/result-buffer/shared.d.ts.map +0 -1
- package/dist/ai-service/result-buffer/shared.js +0 -7
- package/dist/ai-service/result-buffer/shared.js.map +0 -1
- package/dist/inject-no-select.d.ts +0 -15
- package/dist/inject-no-select.d.ts.map +0 -1
- package/dist/inject-no-select.js +0 -175
- package/dist/inject-no-select.js.map +0 -1
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
RadialBarChart as RadialBarChartComponent,
|
|
4
|
+
RadialBar,
|
|
5
|
+
LabelList,
|
|
6
|
+
} from "recharts";
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
registerComponent,
|
|
10
|
+
Prop,
|
|
11
|
+
Section,
|
|
12
|
+
PropsCategory,
|
|
13
|
+
} from "@superblocksteam/library";
|
|
14
|
+
|
|
15
|
+
import { cn } from "@/lib/utils";
|
|
16
|
+
|
|
17
|
+
import type { ChartConfig } from "./chart";
|
|
18
|
+
import {
|
|
19
|
+
ChartContainer,
|
|
20
|
+
ChartTooltip,
|
|
21
|
+
ChartTooltipContent,
|
|
22
|
+
ChartLegend,
|
|
23
|
+
ChartLegendContent,
|
|
24
|
+
sanitizeForCssVar,
|
|
25
|
+
fixColorFormat,
|
|
26
|
+
} from "./chart";
|
|
27
|
+
|
|
28
|
+
type ComponentProps = Omit<
|
|
29
|
+
React.ComponentPropsWithoutRef<typeof ChartContainer>,
|
|
30
|
+
"children" | "config"
|
|
31
|
+
> & {
|
|
32
|
+
data?: any[];
|
|
33
|
+
valueKey?: string;
|
|
34
|
+
nameKey?: string;
|
|
35
|
+
labelKey?: string;
|
|
36
|
+
colorKey?: string;
|
|
37
|
+
colors?: string[];
|
|
38
|
+
chartType?: "single" | "stacked";
|
|
39
|
+
startAngle?: number;
|
|
40
|
+
endAngle?: number;
|
|
41
|
+
innerRadius?: number | string;
|
|
42
|
+
cornerRadius?: number;
|
|
43
|
+
enableAnimation?: boolean;
|
|
44
|
+
showBarLabels?: boolean;
|
|
45
|
+
showTooltip?: boolean;
|
|
46
|
+
showLegend?: boolean;
|
|
47
|
+
showCenterLabel?: boolean;
|
|
48
|
+
labelText?: string;
|
|
49
|
+
labelSubtext?: string;
|
|
50
|
+
onDataClick?: (data: any) => void;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const RadialBarChart = ({ className, ...props }: ComponentProps) => {
|
|
54
|
+
const valueKey = props.valueKey || "value";
|
|
55
|
+
const nameKey = props.nameKey || "name";
|
|
56
|
+
|
|
57
|
+
const chartConfig: ChartConfig = React.useMemo(() => {
|
|
58
|
+
if (!props.data || !Array.isArray(props.data)) return {};
|
|
59
|
+
|
|
60
|
+
const config: ChartConfig = {};
|
|
61
|
+
props.data.forEach((item, index) => {
|
|
62
|
+
const nameValue = item[nameKey];
|
|
63
|
+
const labelValue = props.labelKey ? item[props.labelKey] : nameValue;
|
|
64
|
+
const sanitizedName = sanitizeForCssVar(nameValue);
|
|
65
|
+
|
|
66
|
+
// Get color from: 1) data item colorKey, 2) colors array, 3) default theme color
|
|
67
|
+
const itemColor = props.colorKey ? item[props.colorKey] : undefined;
|
|
68
|
+
const color = fixColorFormat(
|
|
69
|
+
itemColor || props.colors?.[index] || `var(--chart-${(index % 5) + 1})`,
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
config[sanitizedName] = {
|
|
73
|
+
label: labelValue,
|
|
74
|
+
color,
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
return config;
|
|
78
|
+
}, [props.data, nameKey, props.labelKey, props.colorKey, props.colors]);
|
|
79
|
+
|
|
80
|
+
const chartData = React.useMemo(() => {
|
|
81
|
+
return props.data?.map((item) => {
|
|
82
|
+
const nameValue = item[nameKey];
|
|
83
|
+
const sanitizedName = sanitizeForCssVar(nameValue);
|
|
84
|
+
|
|
85
|
+
const fillColor = chartConfig[sanitizedName]
|
|
86
|
+
? `var(--color-${sanitizedName})`
|
|
87
|
+
: "var(--chart-1)";
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
...item,
|
|
91
|
+
fill: fillColor,
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
}, [props.data, nameKey, chartConfig]);
|
|
95
|
+
|
|
96
|
+
const totalValue = React.useMemo(() => {
|
|
97
|
+
if (!Array.isArray(props.data) || !props.data?.length || !props.valueKey)
|
|
98
|
+
return 0;
|
|
99
|
+
if (props.chartType === "single") {
|
|
100
|
+
return props.data[0]?.[props.valueKey] || 0;
|
|
101
|
+
} else {
|
|
102
|
+
return props.data.reduce((sum, item) => {
|
|
103
|
+
const value = typeof item[valueKey] === "number" ? item[valueKey] : 0;
|
|
104
|
+
return sum + value;
|
|
105
|
+
}, 0);
|
|
106
|
+
}
|
|
107
|
+
}, [props.data, props.valueKey, props.chartType, valueKey]);
|
|
108
|
+
|
|
109
|
+
const hasData = Array.isArray(props.data) && props.data?.length;
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<ChartContainer
|
|
113
|
+
className={cn("h-full w-full", className)}
|
|
114
|
+
{...props}
|
|
115
|
+
config={chartConfig}
|
|
116
|
+
>
|
|
117
|
+
{hasData ? (
|
|
118
|
+
<RadialBarChartComponent
|
|
119
|
+
data={chartData}
|
|
120
|
+
startAngle={props.startAngle}
|
|
121
|
+
endAngle={props.endAngle}
|
|
122
|
+
innerRadius={props.innerRadius}
|
|
123
|
+
onClick={props.onDataClick}
|
|
124
|
+
accessibilityLayer
|
|
125
|
+
>
|
|
126
|
+
{props.showTooltip && (
|
|
127
|
+
<ChartTooltip
|
|
128
|
+
cursor={false}
|
|
129
|
+
content={<ChartTooltipContent nameKey={props.nameKey} />}
|
|
130
|
+
/>
|
|
131
|
+
)}
|
|
132
|
+
{props.showLegend && (
|
|
133
|
+
<ChartLegend
|
|
134
|
+
content={<ChartLegendContent nameKey={props.nameKey} />}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
<RadialBar
|
|
138
|
+
dataKey={valueKey}
|
|
139
|
+
background
|
|
140
|
+
cornerRadius={props.cornerRadius}
|
|
141
|
+
isAnimationActive={props.enableAnimation}
|
|
142
|
+
>
|
|
143
|
+
{props.showBarLabels && (
|
|
144
|
+
<LabelList
|
|
145
|
+
position="insideStart"
|
|
146
|
+
dataKey={nameKey}
|
|
147
|
+
className="fill-white capitalize mix-blend-luminosity"
|
|
148
|
+
fontSize={11}
|
|
149
|
+
/>
|
|
150
|
+
)}
|
|
151
|
+
</RadialBar>
|
|
152
|
+
{props.showCenterLabel && (
|
|
153
|
+
<text
|
|
154
|
+
x="50%"
|
|
155
|
+
y="50%"
|
|
156
|
+
textAnchor="middle"
|
|
157
|
+
dominantBaseline="middle"
|
|
158
|
+
className="fill-foreground"
|
|
159
|
+
>
|
|
160
|
+
<tspan x="50%" dy="-0.5em" className="text-2xl font-bold">
|
|
161
|
+
{props.labelText || totalValue.toLocaleString()}
|
|
162
|
+
</tspan>
|
|
163
|
+
{props.labelSubtext && (
|
|
164
|
+
<tspan
|
|
165
|
+
x="50%"
|
|
166
|
+
dy="1.2em"
|
|
167
|
+
className="fill-muted-foreground text-sm"
|
|
168
|
+
>
|
|
169
|
+
{props.labelSubtext}
|
|
170
|
+
</tspan>
|
|
171
|
+
)}
|
|
172
|
+
</text>
|
|
173
|
+
)}
|
|
174
|
+
</RadialBarChartComponent>
|
|
175
|
+
) : (
|
|
176
|
+
<div className="flex items-center justify-center h-full w-full min-h-32 text-muted-foreground">
|
|
177
|
+
No data available
|
|
178
|
+
</div>
|
|
179
|
+
)}
|
|
180
|
+
</ChartContainer>
|
|
181
|
+
);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
registerComponent(RadialBarChart, {
|
|
185
|
+
general: Section.category(PropsCategory.Content).children({
|
|
186
|
+
data: Prop.array<any>()
|
|
187
|
+
.propertiesPanel({
|
|
188
|
+
label: "Data",
|
|
189
|
+
description: "Array of data objects for the radial chart",
|
|
190
|
+
controlType: "FUNCTION_CODE_EDITOR",
|
|
191
|
+
isJSConvertible: false,
|
|
192
|
+
})
|
|
193
|
+
.docs({
|
|
194
|
+
description:
|
|
195
|
+
"Array of objects for circular bar visualization. For single radial charts, typically contains one object with category name and value. For stacked radial charts, contains multiple objects representing concentric bars. Example: [{browser: 'Chrome', visitors: 275, color: '#4285F4'}, {browser: 'Safari', visitors: 200}]. Values are often percentages or progress indicators displayed as arc lengths.",
|
|
196
|
+
}),
|
|
197
|
+
valueKey: Prop.string()
|
|
198
|
+
.propertiesPanel({
|
|
199
|
+
label: "Value data key",
|
|
200
|
+
description: " name for the values to display",
|
|
201
|
+
placeholder: "value",
|
|
202
|
+
controlType: "DROP_DOWN",
|
|
203
|
+
options: function (this) {
|
|
204
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
205
|
+
return [];
|
|
206
|
+
}
|
|
207
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
208
|
+
label: key,
|
|
209
|
+
value: key,
|
|
210
|
+
}));
|
|
211
|
+
},
|
|
212
|
+
})
|
|
213
|
+
.docs({
|
|
214
|
+
description:
|
|
215
|
+
"The property name in your data objects that contains the numeric values determining arc lengths. Values typically represent percentages (0-100), progress (0-1), or absolute numbers that will be proportionally rendered as circular arcs from startAngle to calculated end positions.",
|
|
216
|
+
}),
|
|
217
|
+
nameKey: Prop.string()
|
|
218
|
+
.propertiesPanel({
|
|
219
|
+
label: "Name data key",
|
|
220
|
+
description: " name for category names/identifiers",
|
|
221
|
+
placeholder: "name",
|
|
222
|
+
controlType: "DROP_DOWN",
|
|
223
|
+
options: function (this) {
|
|
224
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
225
|
+
return [];
|
|
226
|
+
}
|
|
227
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
228
|
+
label: key,
|
|
229
|
+
value: key,
|
|
230
|
+
}));
|
|
231
|
+
},
|
|
232
|
+
})
|
|
233
|
+
.docs({
|
|
234
|
+
description:
|
|
235
|
+
"The property name in your data objects that contains unique identifiers for each bar. Used to generate consistent colors and match data across renders.",
|
|
236
|
+
}),
|
|
237
|
+
labelKey: Prop.string()
|
|
238
|
+
.propertiesPanel({
|
|
239
|
+
label: "Label data key",
|
|
240
|
+
description: " name for display labels (optional, defaults to nameKey)",
|
|
241
|
+
placeholder: "label",
|
|
242
|
+
controlType: "DROP_DOWN",
|
|
243
|
+
options: function (this) {
|
|
244
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
245
|
+
return [];
|
|
246
|
+
}
|
|
247
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
248
|
+
label: key,
|
|
249
|
+
value: key,
|
|
250
|
+
}));
|
|
251
|
+
},
|
|
252
|
+
})
|
|
253
|
+
.docs({
|
|
254
|
+
description:
|
|
255
|
+
"Optional property name for human-readable labels shown in tooltips and legends. If not specified, the nameKey value is used as the label.",
|
|
256
|
+
}),
|
|
257
|
+
colorKey: Prop.string()
|
|
258
|
+
.propertiesPanel({
|
|
259
|
+
label: "Color data key",
|
|
260
|
+
description: " name for bar colors (optional)",
|
|
261
|
+
placeholder: "color",
|
|
262
|
+
controlType: "DROP_DOWN",
|
|
263
|
+
options: function (this) {
|
|
264
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
265
|
+
return [];
|
|
266
|
+
}
|
|
267
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
268
|
+
label: key,
|
|
269
|
+
value: key,
|
|
270
|
+
}));
|
|
271
|
+
},
|
|
272
|
+
})
|
|
273
|
+
.docs({
|
|
274
|
+
description:
|
|
275
|
+
"Optional property name in your data objects that contains color values (hex, rgb, or CSS variable). If not specified, colors are auto-assigned from the theme.",
|
|
276
|
+
}),
|
|
277
|
+
colors: Prop.array<string>()
|
|
278
|
+
.propertiesPanel({
|
|
279
|
+
label: "Colors",
|
|
280
|
+
description: "Array of colors to use for bars (optional)",
|
|
281
|
+
controlType: "FUNCTION_CODE_EDITOR",
|
|
282
|
+
isJSConvertible: false,
|
|
283
|
+
})
|
|
284
|
+
.docs({
|
|
285
|
+
description:
|
|
286
|
+
"Optional array of color values to use for bars in order. Can be hex codes, rgb values, or CSS variables like 'var(--chart-1)'. Falls back to theme colors if not provided.",
|
|
287
|
+
}),
|
|
288
|
+
}),
|
|
289
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
290
|
+
chartType: Prop.string<"single" | "stacked">()
|
|
291
|
+
.propertiesPanel({
|
|
292
|
+
label: "Chart type",
|
|
293
|
+
description: "Type of radial chart to display",
|
|
294
|
+
controlType: "DROP_DOWN",
|
|
295
|
+
options: [
|
|
296
|
+
{ label: "Single", value: "single" },
|
|
297
|
+
{ label: "Stacked", value: "stacked" },
|
|
298
|
+
],
|
|
299
|
+
})
|
|
300
|
+
.docs({
|
|
301
|
+
description:
|
|
302
|
+
"Visual layout of the radial chart. 'single' displays one circular bar (ideal for progress indicators, gauges, or single metrics). 'stacked' displays multiple concentric circular bars (ideal for comparing multiple categories or showing layered data). Single charts often show one data point, while stacked charts display multiple data points as concentric arcs.",
|
|
303
|
+
}),
|
|
304
|
+
startAngle: Prop.number()
|
|
305
|
+
.propertiesPanel({
|
|
306
|
+
label: "Start angle",
|
|
307
|
+
description: "Starting angle of the radial chart in degrees",
|
|
308
|
+
})
|
|
309
|
+
.docs({
|
|
310
|
+
description:
|
|
311
|
+
"Starting position of the radial bars in degrees. 0° = 3 o'clock (right), 90° = 12 o'clock (top), 180° = 9 o'clock (left), 270° = 6 o'clock (bottom). Common values: 90° for top-start, 180° for left-start. Determines where the arc begins drawing. For a single radial chart showing percentage, use start and end angles to control the arc range to show a percentage of the total.",
|
|
312
|
+
}),
|
|
313
|
+
endAngle: Prop.number()
|
|
314
|
+
.propertiesPanel({
|
|
315
|
+
label: "End angle",
|
|
316
|
+
description: "Ending angle of the radial chart in degrees",
|
|
317
|
+
})
|
|
318
|
+
.docs({
|
|
319
|
+
description:
|
|
320
|
+
"Ending position of the radial bars in degrees, defining the full arc sweep. Negative values create clockwise motion. Common combinations: startAngle 90° + endAngle -270° = full circle clockwise from top. startAngle 180° + endAngle 0° = semicircle left to right. The difference determines the total arc range for 100% values.",
|
|
321
|
+
}),
|
|
322
|
+
innerRadius: Prop.number()
|
|
323
|
+
.propertiesPanel({
|
|
324
|
+
label: "Inner radius",
|
|
325
|
+
description: "Inner radius of the radial chart",
|
|
326
|
+
})
|
|
327
|
+
.docs({
|
|
328
|
+
description:
|
|
329
|
+
"Size of the hollow center area in pixels or percentage. Creates the donut-like appearance. Larger values create bigger center areas (useful for center labels). Smaller values create thicker bars. For stacked charts, determines the starting radius of the innermost bar.",
|
|
330
|
+
}),
|
|
331
|
+
cornerRadius: Prop.number().propertiesPanel({
|
|
332
|
+
label: "Corner radius",
|
|
333
|
+
description: "Radius of rounded corners on bars",
|
|
334
|
+
}),
|
|
335
|
+
showTooltip: Prop.boolean().propertiesPanel({
|
|
336
|
+
label: "Show tooltip",
|
|
337
|
+
description: "Display tooltip on hover",
|
|
338
|
+
controlType: "SWITCH",
|
|
339
|
+
}),
|
|
340
|
+
showLegend: Prop.boolean().propertiesPanel({
|
|
341
|
+
label: "Show legend",
|
|
342
|
+
description: "Display chart legend",
|
|
343
|
+
controlType: "SWITCH",
|
|
344
|
+
}),
|
|
345
|
+
showBarLabels: Prop.boolean().propertiesPanel({
|
|
346
|
+
label: "Show bar labels",
|
|
347
|
+
description: "Display labels on the bars",
|
|
348
|
+
controlType: "SWITCH",
|
|
349
|
+
}),
|
|
350
|
+
showCenterLabel: Prop.boolean().propertiesPanel({
|
|
351
|
+
label: "Show center label",
|
|
352
|
+
description: "Display label in the center of the chart",
|
|
353
|
+
controlType: "SWITCH",
|
|
354
|
+
}),
|
|
355
|
+
labelText: Prop.string()
|
|
356
|
+
.propertiesPanel({
|
|
357
|
+
label: "Label text",
|
|
358
|
+
description: "Custom text to display in center (leave empty for auto)",
|
|
359
|
+
isVisible: function (this: any) {
|
|
360
|
+
return this.showCenterLabel;
|
|
361
|
+
},
|
|
362
|
+
})
|
|
363
|
+
.docs({
|
|
364
|
+
description:
|
|
365
|
+
"Custom text for center label. If empty, automatically displays calculated total (sum for stacked, first value for single). Useful for custom metrics, percentages with % symbols, or descriptive text. Displayed with large, bold styling.",
|
|
366
|
+
}),
|
|
367
|
+
labelSubtext: Prop.string()
|
|
368
|
+
.propertiesPanel({
|
|
369
|
+
label: "Label subtext",
|
|
370
|
+
description: "Subtext to display below main label",
|
|
371
|
+
isVisible: function (this: any) {
|
|
372
|
+
return this.showCenterLabel;
|
|
373
|
+
},
|
|
374
|
+
})
|
|
375
|
+
.docs({
|
|
376
|
+
description:
|
|
377
|
+
"Secondary text displayed below the main center label with smaller, muted styling. Typically used for units, descriptions, or context like 'completion', 'users', 'progress', etc. Positioned below the main label for hierarchical information display.",
|
|
378
|
+
}),
|
|
379
|
+
}),
|
|
380
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
381
|
+
enableAnimation: Prop.boolean().propertiesPanel({
|
|
382
|
+
label: "Enable animation",
|
|
383
|
+
description: "Enable chart animations on load",
|
|
384
|
+
controlType: "SWITCH",
|
|
385
|
+
}),
|
|
386
|
+
}),
|
|
387
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
388
|
+
onDataClick: Prop.eventHandler().propertiesPanel({
|
|
389
|
+
label: "onDataClick",
|
|
390
|
+
description: "Triggered when a radial segment is clicked",
|
|
391
|
+
computedArgs: [
|
|
392
|
+
{
|
|
393
|
+
name: "data",
|
|
394
|
+
type: "object",
|
|
395
|
+
description: "The data point that was clicked",
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
}),
|
|
399
|
+
}),
|
|
400
|
+
}).editorConfig({ icon: "chart" });
|
|
401
|
+
|
|
402
|
+
export { RadialBarChart };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { registerComponent } from "@superblocksteam/library";
|
|
5
|
+
import {
|
|
6
|
+
Prop,
|
|
7
|
+
Section,
|
|
8
|
+
PropsCategory,
|
|
9
|
+
type PropertiesPanelDefinition,
|
|
10
|
+
type EditorConfig,
|
|
11
|
+
} from "@superblocksteam/library";
|
|
12
|
+
|
|
13
|
+
import { cn } from "@/lib/utils";
|
|
14
|
+
|
|
15
|
+
// Primitive Components
|
|
16
|
+
function ScrollArea({
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
21
|
+
return (
|
|
22
|
+
<ScrollAreaPrimitive.Root
|
|
23
|
+
data-slot="scroll-area"
|
|
24
|
+
className={cn("relative", className)}
|
|
25
|
+
{...props}
|
|
26
|
+
>
|
|
27
|
+
<ScrollAreaPrimitive.Viewport
|
|
28
|
+
data-slot="scroll-area-viewport"
|
|
29
|
+
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
</ScrollAreaPrimitive.Viewport>
|
|
33
|
+
<ScrollBar />
|
|
34
|
+
<ScrollAreaPrimitive.Corner />
|
|
35
|
+
</ScrollAreaPrimitive.Root>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function ScrollBar({
|
|
40
|
+
className,
|
|
41
|
+
orientation = "vertical",
|
|
42
|
+
...props
|
|
43
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
44
|
+
return (
|
|
45
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
46
|
+
data-slot="scroll-area-scrollbar"
|
|
47
|
+
orientation={orientation}
|
|
48
|
+
className={cn(
|
|
49
|
+
"flex touch-none p-px transition-colors select-none",
|
|
50
|
+
orientation === "vertical" &&
|
|
51
|
+
"h-full w-2.5 border-l border-l-transparent",
|
|
52
|
+
orientation === "horizontal" &&
|
|
53
|
+
"h-2.5 flex-col border-t border-t-transparent",
|
|
54
|
+
className,
|
|
55
|
+
)}
|
|
56
|
+
{...props}
|
|
57
|
+
>
|
|
58
|
+
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
59
|
+
data-slot="scroll-area-thumb"
|
|
60
|
+
className="bg-border relative flex-1 rounded-full"
|
|
61
|
+
/>
|
|
62
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Types
|
|
67
|
+
type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root>;
|
|
68
|
+
|
|
69
|
+
// Properties Definition
|
|
70
|
+
const propertiesDefinition: PropertiesPanelDefinition<ScrollAreaProps> = {
|
|
71
|
+
general: Section.category(PropsCategory.Content).children({
|
|
72
|
+
children: Prop.jsx(),
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// Editor Configuration
|
|
77
|
+
const editorConfig: EditorConfig = {
|
|
78
|
+
icon: "container",
|
|
79
|
+
description:
|
|
80
|
+
"Scroll container with custom, cross-browser styling based on shadcn/ui",
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Registration
|
|
84
|
+
registerComponent(ScrollArea, propertiesDefinition).editorConfig(editorConfig);
|
|
85
|
+
|
|
86
|
+
export { ScrollArea, ScrollBar };
|