@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,295 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PieChart as PieChartComponent, Pie, LabelList } from "recharts";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
registerComponent,
|
|
6
|
+
Prop,
|
|
7
|
+
Section,
|
|
8
|
+
PropsCategory,
|
|
9
|
+
} from "@superblocksteam/library";
|
|
10
|
+
|
|
11
|
+
import { cn } from "@/lib/utils";
|
|
12
|
+
|
|
13
|
+
import type { ChartConfig } from "./chart";
|
|
14
|
+
import {
|
|
15
|
+
ChartContainer,
|
|
16
|
+
ChartTooltip,
|
|
17
|
+
ChartTooltipContent,
|
|
18
|
+
ChartLegend,
|
|
19
|
+
ChartLegendContent,
|
|
20
|
+
sanitizeForCssVar,
|
|
21
|
+
fixColorFormat,
|
|
22
|
+
} from "./chart";
|
|
23
|
+
|
|
24
|
+
type ComponentProps = Omit<
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof ChartContainer>,
|
|
26
|
+
"children" | "config"
|
|
27
|
+
> & {
|
|
28
|
+
data?: any[];
|
|
29
|
+
valueKey?: string;
|
|
30
|
+
nameKey?: string;
|
|
31
|
+
labelKey?: string;
|
|
32
|
+
colorKey?: string;
|
|
33
|
+
colors?: string[];
|
|
34
|
+
startAngle?: number;
|
|
35
|
+
endAngle?: number;
|
|
36
|
+
enableAnimation?: boolean;
|
|
37
|
+
showLabels?: boolean;
|
|
38
|
+
showTooltip?: boolean;
|
|
39
|
+
showLegend?: boolean;
|
|
40
|
+
onDataClick?: (data: any) => void;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const PieChart = ({ className, ...props }: ComponentProps) => {
|
|
44
|
+
const chartConfig: ChartConfig = React.useMemo(() => {
|
|
45
|
+
if (!props.data || !Array.isArray(props.data)) return {};
|
|
46
|
+
|
|
47
|
+
const config: ChartConfig = {};
|
|
48
|
+
props.data.forEach((item, index) => {
|
|
49
|
+
const nameValue = item[props.nameKey ?? "name"];
|
|
50
|
+
const labelValue = props.labelKey ? item[props.labelKey] : nameValue;
|
|
51
|
+
const sanitizedName = sanitizeForCssVar(nameValue);
|
|
52
|
+
|
|
53
|
+
// Get color from: 1) data item colorKey, 2) colors array, 3) default theme color
|
|
54
|
+
const itemColor = props.colorKey ? item[props.colorKey] : undefined;
|
|
55
|
+
const color = fixColorFormat(
|
|
56
|
+
itemColor || props.colors?.[index] || `var(--chart-${(index % 5) + 1})`,
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
config[sanitizedName] = {
|
|
60
|
+
label: labelValue,
|
|
61
|
+
color,
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
return config;
|
|
65
|
+
}, [props.data, props.nameKey, props.labelKey, props.colorKey, props.colors]);
|
|
66
|
+
|
|
67
|
+
const chartData = React.useMemo(() => {
|
|
68
|
+
return props.data?.map((item) => {
|
|
69
|
+
const nameValue = item[props.nameKey ?? "name"];
|
|
70
|
+
const sanitizedName = sanitizeForCssVar(nameValue);
|
|
71
|
+
|
|
72
|
+
const fillColor = chartConfig[sanitizedName]
|
|
73
|
+
? `var(--color-${sanitizedName})`
|
|
74
|
+
: "var(--chart-1)";
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
...item,
|
|
78
|
+
fill: fillColor,
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
}, [props.data, props.nameKey, chartConfig]);
|
|
82
|
+
|
|
83
|
+
const hasData = Array.isArray(props.data) && props.data?.length;
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<ChartContainer
|
|
87
|
+
className={cn(
|
|
88
|
+
"h-full w-full",
|
|
89
|
+
props.showLabels ? "[&_.recharts-pie-label-text]:fill-foreground" : "",
|
|
90
|
+
className,
|
|
91
|
+
)}
|
|
92
|
+
{...props}
|
|
93
|
+
config={chartConfig}
|
|
94
|
+
>
|
|
95
|
+
{hasData ? (
|
|
96
|
+
<PieChartComponent accessibilityLayer>
|
|
97
|
+
{props.showTooltip && (
|
|
98
|
+
<ChartTooltip
|
|
99
|
+
cursor={false}
|
|
100
|
+
content={<ChartTooltipContent hideLabel />}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
103
|
+
{props.showLegend && (
|
|
104
|
+
<ChartLegend
|
|
105
|
+
content={<ChartLegendContent nameKey={props.nameKey} />}
|
|
106
|
+
className="-translate-y-2 flex-wrap gap-2 [&>*]:basis-1/4 [&>*]:justify-center"
|
|
107
|
+
/>
|
|
108
|
+
)}
|
|
109
|
+
<Pie
|
|
110
|
+
data={chartData}
|
|
111
|
+
dataKey={props.valueKey ?? "value"}
|
|
112
|
+
nameKey={props.nameKey}
|
|
113
|
+
startAngle={props.startAngle}
|
|
114
|
+
endAngle={props.endAngle}
|
|
115
|
+
paddingAngle={0}
|
|
116
|
+
isAnimationActive={props.enableAnimation}
|
|
117
|
+
label={props.showLabels}
|
|
118
|
+
onClick={props.onDataClick}
|
|
119
|
+
>
|
|
120
|
+
{props.showLabels && (
|
|
121
|
+
<LabelList
|
|
122
|
+
dataKey={props.nameKey}
|
|
123
|
+
className="fill-background"
|
|
124
|
+
stroke="none"
|
|
125
|
+
fontSize={12}
|
|
126
|
+
/>
|
|
127
|
+
)}
|
|
128
|
+
</Pie>
|
|
129
|
+
</PieChartComponent>
|
|
130
|
+
) : (
|
|
131
|
+
<div className="flex items-center justify-center h-full w-full min-h-32 text-muted-foreground">
|
|
132
|
+
No data available
|
|
133
|
+
</div>
|
|
134
|
+
)}
|
|
135
|
+
</ChartContainer>
|
|
136
|
+
);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
registerComponent(PieChart, {
|
|
140
|
+
general: Section.category(PropsCategory.Content).children({
|
|
141
|
+
data: Prop.array<any>()
|
|
142
|
+
.propertiesPanel({
|
|
143
|
+
label: "Data",
|
|
144
|
+
description: "Array of data objects for the pie chart",
|
|
145
|
+
controlType: "FUNCTION_CODE_EDITOR",
|
|
146
|
+
isJSConvertible: false,
|
|
147
|
+
})
|
|
148
|
+
.docs({
|
|
149
|
+
description:
|
|
150
|
+
"Array of objects where each object represents a pie slice. Each object should have properties for the slice name/label and numeric value. Example: [{name: 'Chrome', value: 275, color: '#4285F4'}, {name: 'Safari', value: 200}]. The nameKey, valueKey, and colorKey props specify which properties to use.",
|
|
151
|
+
}),
|
|
152
|
+
nameKey: Prop.string()
|
|
153
|
+
.propertiesPanel({
|
|
154
|
+
label: "Name data key",
|
|
155
|
+
description: " name for slice names/identifiers",
|
|
156
|
+
placeholder: "name",
|
|
157
|
+
controlType: "DROP_DOWN",
|
|
158
|
+
options: function (this) {
|
|
159
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
160
|
+
return [];
|
|
161
|
+
}
|
|
162
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
163
|
+
label: key,
|
|
164
|
+
value: key,
|
|
165
|
+
}));
|
|
166
|
+
},
|
|
167
|
+
})
|
|
168
|
+
.docs({
|
|
169
|
+
description:
|
|
170
|
+
"The property name in your data objects that contains unique identifiers for each slice. Used to generate consistent colors and match data across renders.",
|
|
171
|
+
}),
|
|
172
|
+
valueKey: Prop.string()
|
|
173
|
+
.propertiesPanel({
|
|
174
|
+
label: "Value data key",
|
|
175
|
+
description: " name for slice values",
|
|
176
|
+
placeholder: "value",
|
|
177
|
+
controlType: "DROP_DOWN",
|
|
178
|
+
options: function (this) {
|
|
179
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
183
|
+
label: key,
|
|
184
|
+
value: key,
|
|
185
|
+
}));
|
|
186
|
+
},
|
|
187
|
+
})
|
|
188
|
+
.docs({
|
|
189
|
+
description:
|
|
190
|
+
"The property name in your data objects that contains the numeric values for each slice. These values determine slice sizes and are used in calculations for percentages and display.",
|
|
191
|
+
}),
|
|
192
|
+
labelKey: Prop.string()
|
|
193
|
+
.propertiesPanel({
|
|
194
|
+
label: "Label data key",
|
|
195
|
+
description: " name for display labels (optional, defaults to nameKey)",
|
|
196
|
+
placeholder: "label",
|
|
197
|
+
controlType: "DROP_DOWN",
|
|
198
|
+
options: function (this) {
|
|
199
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
200
|
+
return [];
|
|
201
|
+
}
|
|
202
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
203
|
+
label: key,
|
|
204
|
+
value: key,
|
|
205
|
+
}));
|
|
206
|
+
},
|
|
207
|
+
})
|
|
208
|
+
.docs({
|
|
209
|
+
description:
|
|
210
|
+
"Optional property name for human-readable labels shown in tooltips and legends. If not specified, the nameKey value is used as the label.",
|
|
211
|
+
}),
|
|
212
|
+
colorKey: Prop.string()
|
|
213
|
+
.propertiesPanel({
|
|
214
|
+
label: "Color data key",
|
|
215
|
+
description: " name for slice colors (optional)",
|
|
216
|
+
placeholder: "color",
|
|
217
|
+
controlType: "DROP_DOWN",
|
|
218
|
+
options: function (this) {
|
|
219
|
+
if (!this.data || !Array.isArray(this.data) || !this.data.length) {
|
|
220
|
+
return [];
|
|
221
|
+
}
|
|
222
|
+
return Object.keys(this.data[0]).map((key) => ({
|
|
223
|
+
label: key,
|
|
224
|
+
value: key,
|
|
225
|
+
}));
|
|
226
|
+
},
|
|
227
|
+
})
|
|
228
|
+
.docs({
|
|
229
|
+
description:
|
|
230
|
+
"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.",
|
|
231
|
+
}),
|
|
232
|
+
colors: Prop.array<string>()
|
|
233
|
+
.propertiesPanel({
|
|
234
|
+
label: "Colors",
|
|
235
|
+
description: "Array of colors to use for slices (optional)",
|
|
236
|
+
controlType: "FUNCTION_CODE_EDITOR",
|
|
237
|
+
isJSConvertible: false,
|
|
238
|
+
})
|
|
239
|
+
.docs({
|
|
240
|
+
description:
|
|
241
|
+
"Optional array of color values to use for slices in order. Can be hex codes, rgb values, or CSS variables like 'var(--chart-1)'. Falls back to theme colors if not provided.",
|
|
242
|
+
}),
|
|
243
|
+
}),
|
|
244
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
245
|
+
startAngle: Prop.number().propertiesPanel({
|
|
246
|
+
label: "Start angle",
|
|
247
|
+
description: "Start angle in degrees (90 = top, 0 = right)",
|
|
248
|
+
visibility: "SHOW_NAME",
|
|
249
|
+
defaultOnAdd: 90,
|
|
250
|
+
}),
|
|
251
|
+
endAngle: Prop.number().propertiesPanel({
|
|
252
|
+
label: "End angle",
|
|
253
|
+
description: "End angle in degrees (450 = full circle from 90°)",
|
|
254
|
+
visibility: "SHOW_NAME",
|
|
255
|
+
defaultOnAdd: 450,
|
|
256
|
+
}),
|
|
257
|
+
showTooltip: Prop.boolean().propertiesPanel({
|
|
258
|
+
label: "Show tooltip",
|
|
259
|
+
description: "Display tooltip on hover",
|
|
260
|
+
controlType: "SWITCH",
|
|
261
|
+
}),
|
|
262
|
+
showLegend: Prop.boolean().propertiesPanel({
|
|
263
|
+
label: "Show legend",
|
|
264
|
+
description: "Display chart legend",
|
|
265
|
+
controlType: "SWITCH",
|
|
266
|
+
}),
|
|
267
|
+
showLabels: Prop.boolean().propertiesPanel({
|
|
268
|
+
label: "Show labels",
|
|
269
|
+
description: "Display value labels on pie slices",
|
|
270
|
+
controlType: "SWITCH",
|
|
271
|
+
}),
|
|
272
|
+
}),
|
|
273
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
274
|
+
enableAnimation: Prop.boolean().propertiesPanel({
|
|
275
|
+
label: "Enable animation",
|
|
276
|
+
description: "Enable chart animations on load",
|
|
277
|
+
controlType: "SWITCH",
|
|
278
|
+
}),
|
|
279
|
+
}),
|
|
280
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
281
|
+
onDataClick: Prop.eventHandler().propertiesPanel({
|
|
282
|
+
label: "onDataClick",
|
|
283
|
+
description: "Triggered when a pie slice is clicked",
|
|
284
|
+
computedArgs: [
|
|
285
|
+
{
|
|
286
|
+
name: "data",
|
|
287
|
+
type: "object",
|
|
288
|
+
description: "The data point that was clicked",
|
|
289
|
+
},
|
|
290
|
+
],
|
|
291
|
+
}),
|
|
292
|
+
}),
|
|
293
|
+
}).editorConfig({ icon: "chart" });
|
|
294
|
+
|
|
295
|
+
export { PieChart };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Prop,
|
|
6
|
+
Section,
|
|
7
|
+
PropsCategory,
|
|
8
|
+
registerComponent,
|
|
9
|
+
type PropertiesPanelDefinition,
|
|
10
|
+
type EditorConfig,
|
|
11
|
+
} from "@superblocksteam/library";
|
|
12
|
+
|
|
13
|
+
import { cn } from "@/lib/utils";
|
|
14
|
+
|
|
15
|
+
function Popover({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
18
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function PopoverTrigger({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
24
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function PopoverContent({
|
|
28
|
+
className,
|
|
29
|
+
align = "center",
|
|
30
|
+
sideOffset = 4,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
33
|
+
return (
|
|
34
|
+
<PopoverPrimitive.Portal>
|
|
35
|
+
<PopoverPrimitive.Content
|
|
36
|
+
data-slot="popover-content"
|
|
37
|
+
align={align}
|
|
38
|
+
sideOffset={sideOffset}
|
|
39
|
+
className={cn(
|
|
40
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
41
|
+
className,
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
</PopoverPrimitive.Portal>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function PopoverAnchor({
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
52
|
+
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
56
|
+
|
|
57
|
+
// Properties Definition for Popover (root)
|
|
58
|
+
const popoverPropertiesDefinition: PropertiesPanelDefinition<
|
|
59
|
+
React.ComponentPropsWithoutRef<typeof Popover>
|
|
60
|
+
> = {
|
|
61
|
+
general: Section.category(PropsCategory.Content).children({
|
|
62
|
+
open: Prop.boolean().propertiesPanel({
|
|
63
|
+
label: "Open",
|
|
64
|
+
controlType: "SWITCH",
|
|
65
|
+
description:
|
|
66
|
+
"The controlled open state of the popover. Must be used in conjunction with `onOpenChange`.",
|
|
67
|
+
isRemovable: true,
|
|
68
|
+
visibility: "SHOW_NAME",
|
|
69
|
+
}),
|
|
70
|
+
children: Prop.jsx(),
|
|
71
|
+
}),
|
|
72
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
73
|
+
defaultOpen: Prop.boolean().propertiesPanel({
|
|
74
|
+
label: "Default open",
|
|
75
|
+
description: "Whether the popover is open by default",
|
|
76
|
+
}),
|
|
77
|
+
modal: Prop.boolean().propertiesPanel({
|
|
78
|
+
label: "Modal",
|
|
79
|
+
description:
|
|
80
|
+
"Whether the popover should be modal, trapping focus and blocking interaction with other elements.",
|
|
81
|
+
}),
|
|
82
|
+
}),
|
|
83
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
84
|
+
onOpenChange: Prop.eventHandler().propertiesPanel({
|
|
85
|
+
label: "onOpenChange",
|
|
86
|
+
computedArgs: [
|
|
87
|
+
{
|
|
88
|
+
name: "open",
|
|
89
|
+
type: "boolean",
|
|
90
|
+
description: "Whether the popover is open",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
}),
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const popoverEditorConfig: EditorConfig = {
|
|
98
|
+
icon: "modal",
|
|
99
|
+
isDetached: true,
|
|
100
|
+
isDraggable: false,
|
|
101
|
+
description:
|
|
102
|
+
"A modal popover that displays rich content in relation to a trigger element.",
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// Properties Definition for PopoverContent
|
|
106
|
+
const popoverContentPropertiesDefinition: PropertiesPanelDefinition<
|
|
107
|
+
React.ComponentPropsWithoutRef<typeof PopoverContent>
|
|
108
|
+
> = {
|
|
109
|
+
general: Section.category(PropsCategory.Content).children({
|
|
110
|
+
children: Prop.jsx(),
|
|
111
|
+
}),
|
|
112
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
113
|
+
side: Prop.string<"top" | "right" | "bottom" | "left">().propertiesPanel({
|
|
114
|
+
label: "Side",
|
|
115
|
+
controlType: "DROP_DOWN",
|
|
116
|
+
description: "The preferred side of the trigger to render against",
|
|
117
|
+
options: [
|
|
118
|
+
{ label: "Top", value: "top" },
|
|
119
|
+
{ label: "Right", value: "right" },
|
|
120
|
+
{ label: "Bottom", value: "bottom" },
|
|
121
|
+
{ label: "Left", value: "left" },
|
|
122
|
+
],
|
|
123
|
+
}),
|
|
124
|
+
align: Prop.string<"start" | "center" | "end">().propertiesPanel({
|
|
125
|
+
label: "Align",
|
|
126
|
+
controlType: "DROP_DOWN",
|
|
127
|
+
description: "The preferred alignment against the trigger",
|
|
128
|
+
options: [
|
|
129
|
+
{ label: "Start", value: "start" },
|
|
130
|
+
{ label: "Center", value: "center" },
|
|
131
|
+
{ label: "End", value: "end" },
|
|
132
|
+
],
|
|
133
|
+
}),
|
|
134
|
+
sideOffset: Prop.number().propertiesPanel({
|
|
135
|
+
label: "Side offset",
|
|
136
|
+
description: "The distance in pixels from the trigger",
|
|
137
|
+
}),
|
|
138
|
+
alignOffset: Prop.number().propertiesPanel({
|
|
139
|
+
label: "Align offset",
|
|
140
|
+
description: "An offset in pixels from the alignment axis",
|
|
141
|
+
}),
|
|
142
|
+
avoidCollisions: Prop.boolean().propertiesPanel({
|
|
143
|
+
label: "Avoid collisions",
|
|
144
|
+
description:
|
|
145
|
+
"Whether the content should avoid collisions with other elements",
|
|
146
|
+
}),
|
|
147
|
+
}),
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const childrenPropertiesDefinition = {
|
|
151
|
+
general: Section.category(PropsCategory.Content).children({
|
|
152
|
+
children: Prop.jsx(),
|
|
153
|
+
}),
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
// Register Components
|
|
157
|
+
registerComponent(Popover, popoverPropertiesDefinition).editorConfig(
|
|
158
|
+
popoverEditorConfig,
|
|
159
|
+
);
|
|
160
|
+
registerComponent(PopoverTrigger, childrenPropertiesDefinition);
|
|
161
|
+
registerComponent(PopoverContent, popoverContentPropertiesDefinition);
|
|
162
|
+
registerComponent(PopoverAnchor);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
2
|
+
import * 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
|
+
// Progress Component
|
|
16
|
+
function Progress({
|
|
17
|
+
className,
|
|
18
|
+
value,
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
|
21
|
+
return (
|
|
22
|
+
<ProgressPrimitive.Root
|
|
23
|
+
data-slot="progress"
|
|
24
|
+
className={cn(
|
|
25
|
+
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
{...props}
|
|
29
|
+
>
|
|
30
|
+
<ProgressPrimitive.Indicator
|
|
31
|
+
data-slot="progress-indicator"
|
|
32
|
+
className="bg-primary h-full w-full flex-1 transition-all"
|
|
33
|
+
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
34
|
+
/>
|
|
35
|
+
</ProgressPrimitive.Root>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type ProgressProps = React.ComponentProps<typeof Progress>;
|
|
40
|
+
|
|
41
|
+
// Properties Definition
|
|
42
|
+
const propertiesDefinition: PropertiesPanelDefinition<ProgressProps> = {
|
|
43
|
+
general: Section.category(PropsCategory.Content).children({
|
|
44
|
+
value: Prop.number().propertiesPanel({
|
|
45
|
+
label: "Value",
|
|
46
|
+
controlType: "INPUT_TEXT",
|
|
47
|
+
description: "The current progress value (0-100)",
|
|
48
|
+
isRemovable: true,
|
|
49
|
+
visibility: "SHOW_NAME",
|
|
50
|
+
}),
|
|
51
|
+
max: Prop.number().propertiesPanel({
|
|
52
|
+
label: "Max value",
|
|
53
|
+
description: "The maximum progress value",
|
|
54
|
+
}),
|
|
55
|
+
}),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// Editor Configuration
|
|
59
|
+
const editorConfig: EditorConfig = {
|
|
60
|
+
icon: "custom",
|
|
61
|
+
isDraggable: true,
|
|
62
|
+
description:
|
|
63
|
+
"Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.",
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// Registration
|
|
67
|
+
registerComponent(Progress, propertiesDefinition).editorConfig(editorConfig);
|
|
68
|
+
|
|
69
|
+
export { Progress };
|