@superblocksteam/vite-plugin-file-sync 2.0.114 → 2.0.115-next.1
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 +51 -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,162 @@
|
|
|
1
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
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 HoverCard({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
|
|
18
|
+
return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function HoverCardTrigger({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
|
|
24
|
+
return (
|
|
25
|
+
<HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function HoverCardContent({
|
|
30
|
+
className,
|
|
31
|
+
align = "center",
|
|
32
|
+
sideOffset = 4,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {
|
|
35
|
+
return (
|
|
36
|
+
<HoverCardPrimitive.Portal data-slot="hover-card-portal">
|
|
37
|
+
<HoverCardPrimitive.Content
|
|
38
|
+
data-slot="hover-card-content"
|
|
39
|
+
align={align}
|
|
40
|
+
sideOffset={sideOffset}
|
|
41
|
+
className={cn(
|
|
42
|
+
"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-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
43
|
+
className,
|
|
44
|
+
)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
</HoverCardPrimitive.Portal>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
52
|
+
|
|
53
|
+
// Properties Definition for HoverCard (root)
|
|
54
|
+
const hoverCardPropertiesDefinition: PropertiesPanelDefinition<
|
|
55
|
+
React.ComponentPropsWithoutRef<typeof HoverCard>
|
|
56
|
+
> = {
|
|
57
|
+
general: Section.category(PropsCategory.Content).children({
|
|
58
|
+
open: Prop.boolean().propertiesPanel({
|
|
59
|
+
label: "Open",
|
|
60
|
+
controlType: "SWITCH",
|
|
61
|
+
description:
|
|
62
|
+
"The controlled open state of the hover card. Must be used in conjunction with `onOpenChange`.",
|
|
63
|
+
isRemovable: true,
|
|
64
|
+
visibility: "SHOW_NAME",
|
|
65
|
+
}),
|
|
66
|
+
children: Prop.jsx(),
|
|
67
|
+
openDelay: Prop.number().propertiesPanel({
|
|
68
|
+
label: "Open delay",
|
|
69
|
+
description:
|
|
70
|
+
"The duration from when the mouse enters the trigger until the hover card opens (in milliseconds)",
|
|
71
|
+
}),
|
|
72
|
+
closeDelay: Prop.number().propertiesPanel({
|
|
73
|
+
label: "Close delay",
|
|
74
|
+
description:
|
|
75
|
+
"The duration from when the mouse leaves the trigger until the hover card closes (in milliseconds)",
|
|
76
|
+
}),
|
|
77
|
+
}),
|
|
78
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
79
|
+
defaultOpen: Prop.boolean().propertiesPanel({
|
|
80
|
+
label: "Default open",
|
|
81
|
+
description: "Whether the hover card is open by default",
|
|
82
|
+
}),
|
|
83
|
+
}),
|
|
84
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
85
|
+
onOpenChange: Prop.eventHandler().propertiesPanel({
|
|
86
|
+
label: "onOpenChange",
|
|
87
|
+
computedArgs: [
|
|
88
|
+
{
|
|
89
|
+
name: "open",
|
|
90
|
+
type: "boolean",
|
|
91
|
+
description: "Whether the hover card is open",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
}),
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const hoverCardEditorConfig: EditorConfig = {
|
|
99
|
+
icon: "custom",
|
|
100
|
+
isDetached: true,
|
|
101
|
+
isDraggable: false,
|
|
102
|
+
description:
|
|
103
|
+
"A hover card component for displaying contextual information on hover",
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// Properties Definition for HoverCardContent
|
|
107
|
+
const hoverCardContentPropertiesDefinition: PropertiesPanelDefinition<
|
|
108
|
+
React.ComponentPropsWithoutRef<typeof HoverCardContent>
|
|
109
|
+
> = {
|
|
110
|
+
general: Section.category(PropsCategory.Content).children({
|
|
111
|
+
children: Prop.jsx(),
|
|
112
|
+
}),
|
|
113
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
114
|
+
side: Prop.string<"top" | "right" | "bottom" | "left">().propertiesPanel({
|
|
115
|
+
label: "Side",
|
|
116
|
+
controlType: "DROP_DOWN",
|
|
117
|
+
description: "The preferred side of the trigger to render against",
|
|
118
|
+
options: [
|
|
119
|
+
{ label: "Top", value: "top" },
|
|
120
|
+
{ label: "Right", value: "right" },
|
|
121
|
+
{ label: "Bottom", value: "bottom" },
|
|
122
|
+
{ label: "Left", value: "left" },
|
|
123
|
+
],
|
|
124
|
+
}),
|
|
125
|
+
align: Prop.string<"start" | "center" | "end">().propertiesPanel({
|
|
126
|
+
label: "Align",
|
|
127
|
+
controlType: "DROP_DOWN",
|
|
128
|
+
description: "The preferred alignment against the trigger",
|
|
129
|
+
options: [
|
|
130
|
+
{ label: "Start", value: "start" },
|
|
131
|
+
{ label: "Center", value: "center" },
|
|
132
|
+
{ label: "End", value: "end" },
|
|
133
|
+
],
|
|
134
|
+
}),
|
|
135
|
+
sideOffset: Prop.number().propertiesPanel({
|
|
136
|
+
label: "Side offset",
|
|
137
|
+
description: "The distance in pixels from the trigger",
|
|
138
|
+
}),
|
|
139
|
+
alignOffset: Prop.number().propertiesPanel({
|
|
140
|
+
label: "Align offset",
|
|
141
|
+
description: "An offset in pixels from the alignment axis",
|
|
142
|
+
}),
|
|
143
|
+
avoidCollisions: Prop.boolean().propertiesPanel({
|
|
144
|
+
label: "Avoid collisions",
|
|
145
|
+
description:
|
|
146
|
+
"Whether the content should avoid collisions with other elements",
|
|
147
|
+
}),
|
|
148
|
+
}),
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const childrenPropertiesDefinition = {
|
|
152
|
+
general: Section.category(PropsCategory.Content).children({
|
|
153
|
+
children: Prop.jsx(),
|
|
154
|
+
}),
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// Register Components
|
|
158
|
+
registerComponent(HoverCard, hoverCardPropertiesDefinition).editorConfig(
|
|
159
|
+
hoverCardEditorConfig,
|
|
160
|
+
);
|
|
161
|
+
registerComponent(HoverCardTrigger, childrenPropertiesDefinition);
|
|
162
|
+
registerComponent(HoverCardContent, hoverCardContentPropertiesDefinition);
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { DynamicIcon, type IconName } from "lucide-react/dynamic";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
import { registerComponent } from "@superblocksteam/library";
|
|
6
|
+
import {
|
|
7
|
+
Prop,
|
|
8
|
+
Section,
|
|
9
|
+
PropsCategory,
|
|
10
|
+
tailwindStylesCategory,
|
|
11
|
+
type EditorConfig,
|
|
12
|
+
} from "@superblocksteam/library";
|
|
13
|
+
|
|
14
|
+
import { cn } from "@/lib/utils";
|
|
15
|
+
|
|
16
|
+
// Base Icon Component
|
|
17
|
+
interface IconComponentProps {
|
|
18
|
+
icon?: IconName;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
color?: string;
|
|
21
|
+
strokeWidth?: number;
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function IconComponent({
|
|
28
|
+
icon,
|
|
29
|
+
children,
|
|
30
|
+
onClick,
|
|
31
|
+
style,
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: IconComponentProps) {
|
|
35
|
+
if (icon) {
|
|
36
|
+
return (
|
|
37
|
+
<DynamicIcon
|
|
38
|
+
name={icon}
|
|
39
|
+
onClick={onClick}
|
|
40
|
+
style={style}
|
|
41
|
+
className={className}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (
|
|
48
|
+
children &&
|
|
49
|
+
(React.isValidElement(children) ||
|
|
50
|
+
(Array.isArray(children) && children.length > 0))
|
|
51
|
+
) {
|
|
52
|
+
return (
|
|
53
|
+
<span
|
|
54
|
+
className={cn("inline-flex items-center justify-center", className)}
|
|
55
|
+
style={style}
|
|
56
|
+
onClick={onClick}
|
|
57
|
+
{...props}
|
|
58
|
+
>
|
|
59
|
+
{children}
|
|
60
|
+
</span>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div
|
|
66
|
+
className={cn(
|
|
67
|
+
"inline-flex items-center justify-center border-2 border-dashed border-gray-300 text-gray-400 text-xs",
|
|
68
|
+
className,
|
|
69
|
+
)}
|
|
70
|
+
title={`Icon "${icon}" not found`}
|
|
71
|
+
onClick={onClick}
|
|
72
|
+
style={style}
|
|
73
|
+
{...props}
|
|
74
|
+
>
|
|
75
|
+
?
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Main Component with Registration
|
|
81
|
+
type IconProps = React.ComponentPropsWithoutRef<typeof IconComponent> & {
|
|
82
|
+
name?: string;
|
|
83
|
+
} & Record<string, unknown>;
|
|
84
|
+
|
|
85
|
+
const Icon = ({
|
|
86
|
+
children,
|
|
87
|
+
className,
|
|
88
|
+
// avoid passing name to the icon component, because we need to use icon as DynamicIcon.name
|
|
89
|
+
name: _name,
|
|
90
|
+
...props
|
|
91
|
+
}: IconProps) => {
|
|
92
|
+
return (
|
|
93
|
+
<IconComponent className={cn("w-fit h-fit", className)} {...props}>
|
|
94
|
+
{children}
|
|
95
|
+
</IconComponent>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Properties Definition
|
|
100
|
+
const propertiesDefinition = {
|
|
101
|
+
general: Section.category(PropsCategory.Content).children({
|
|
102
|
+
icon: Prop.string<IconName>().propertiesPanel({
|
|
103
|
+
label: "Icon name",
|
|
104
|
+
controlType: "ICON_SELECTOR",
|
|
105
|
+
description: "The name of the Lucide icon (e.g., 'heart', 'arrow-right')",
|
|
106
|
+
placeholder: "heart" satisfies IconName,
|
|
107
|
+
}),
|
|
108
|
+
// no props panel for now
|
|
109
|
+
children: Prop.jsx(),
|
|
110
|
+
}),
|
|
111
|
+
styles: tailwindStylesCategory({
|
|
112
|
+
prioritizedTailwindProperties: ["stroke", "stroke-width"],
|
|
113
|
+
}),
|
|
114
|
+
|
|
115
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
116
|
+
onClick: Prop.eventHandler().propertiesPanel({
|
|
117
|
+
label: "onClick",
|
|
118
|
+
description: "Triggered when the icon is clicked",
|
|
119
|
+
}),
|
|
120
|
+
}),
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// Editor Configuration
|
|
124
|
+
const editorConfig: EditorConfig = {
|
|
125
|
+
icon: "custom",
|
|
126
|
+
description:
|
|
127
|
+
"A versatile icon component supporting Lucide icons and custom content",
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// Registration
|
|
131
|
+
registerComponent(Icon, propertiesDefinition).editorConfig(editorConfig);
|
|
132
|
+
|
|
133
|
+
export { Icon };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { registerComponent } from "@superblocksteam/library";
|
|
4
|
+
import {
|
|
5
|
+
Prop,
|
|
6
|
+
Section,
|
|
7
|
+
PropsCategory,
|
|
8
|
+
tailwindStylesCategory,
|
|
9
|
+
type PropertiesPanelDefinition,
|
|
10
|
+
type EditorConfig,
|
|
11
|
+
} from "@superblocksteam/library";
|
|
12
|
+
|
|
13
|
+
// Base Image Component
|
|
14
|
+
interface ImageComponentProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
15
|
+
src: string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const ImageComponent = React.forwardRef<HTMLImageElement, ImageComponentProps>(
|
|
20
|
+
({ alt = "", ...props }, ref) => {
|
|
21
|
+
return <img ref={ref} alt={alt} {...props} />;
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
ImageComponent.displayName = "ImageComponent";
|
|
26
|
+
|
|
27
|
+
// Main Component
|
|
28
|
+
type ImageProps = React.ComponentPropsWithoutRef<typeof ImageComponent>;
|
|
29
|
+
|
|
30
|
+
const Image = ({ children: _, ...props }: ImageProps) => {
|
|
31
|
+
return <ImageComponent {...props} />;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Properties Definition
|
|
35
|
+
const propertiesDefinition: PropertiesPanelDefinition<ImageProps> = {
|
|
36
|
+
general: Section.category(PropsCategory.Content).children({
|
|
37
|
+
src: Prop.string().propertiesPanel({
|
|
38
|
+
label: "Image URL",
|
|
39
|
+
description: "The URL of the image to display",
|
|
40
|
+
}),
|
|
41
|
+
alt: Prop.string().propertiesPanel({
|
|
42
|
+
label: "Alt text",
|
|
43
|
+
description: "Alternative text for the image (for accessibility)",
|
|
44
|
+
}),
|
|
45
|
+
}),
|
|
46
|
+
styles: tailwindStylesCategory({
|
|
47
|
+
prioritizedTailwindProperties: ["rounded", "object-fit", "object-position"],
|
|
48
|
+
}),
|
|
49
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
50
|
+
onClick: Prop.eventHandler().propertiesPanel({
|
|
51
|
+
label: "onClick",
|
|
52
|
+
description: "Triggered when the image is clicked",
|
|
53
|
+
}),
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Editor Configuration
|
|
58
|
+
const editorConfig: EditorConfig = {
|
|
59
|
+
icon: "image",
|
|
60
|
+
description:
|
|
61
|
+
"Image component that Maintains a consistent aspect ratio for content, useful for responsive images and videos",
|
|
62
|
+
isDroppable: true,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Registration
|
|
66
|
+
registerComponent(Image, propertiesDefinition).editorConfig(editorConfig);
|
|
67
|
+
|
|
68
|
+
export { Image };
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { registerComponent } from "@superblocksteam/library";
|
|
4
|
+
import {
|
|
5
|
+
Prop,
|
|
6
|
+
Section,
|
|
7
|
+
PropsCategory,
|
|
8
|
+
type PropertiesPanelDefinition,
|
|
9
|
+
type EditorConfig,
|
|
10
|
+
} from "@superblocksteam/library";
|
|
11
|
+
|
|
12
|
+
import { cn } from "@/lib/utils";
|
|
13
|
+
|
|
14
|
+
// Input Component
|
|
15
|
+
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
16
|
+
return (
|
|
17
|
+
<input
|
|
18
|
+
type={type}
|
|
19
|
+
data-slot="input"
|
|
20
|
+
className={cn(
|
|
21
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
22
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
23
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
24
|
+
className,
|
|
25
|
+
)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type InputProps = React.ComponentProps<typeof Input>;
|
|
32
|
+
|
|
33
|
+
// Input type constants for property visibility
|
|
34
|
+
const AUTO_COMPLETE_INPUT_TYPES = ["text", "email", "password", "url"];
|
|
35
|
+
const TEXT_INPUT_TYPES = ["text", "email", "password", "url"];
|
|
36
|
+
const NUMERIC_INPUT_TYPES = ["number"];
|
|
37
|
+
const STEP_INPUT_TYPES = ["number"];
|
|
38
|
+
|
|
39
|
+
// Properties Definition
|
|
40
|
+
const propertiesDefinition: PropertiesPanelDefinition<InputProps> = {
|
|
41
|
+
general: Section.category(PropsCategory.Content).children({
|
|
42
|
+
value: Prop.string().propertiesPanel({
|
|
43
|
+
label: "Value",
|
|
44
|
+
controlType: "INPUT_TEXT",
|
|
45
|
+
description: "The controlled value of the input",
|
|
46
|
+
isRemovable: true,
|
|
47
|
+
visibility: "SHOW_NAME",
|
|
48
|
+
}),
|
|
49
|
+
defaultValue: Prop.string().propertiesPanel({
|
|
50
|
+
label: "Default value",
|
|
51
|
+
controlType: "INPUT_TEXT",
|
|
52
|
+
description: "The default value of the input",
|
|
53
|
+
}),
|
|
54
|
+
placeholder: Prop.string().propertiesPanel({
|
|
55
|
+
label: "Placeholder",
|
|
56
|
+
controlType: "INPUT_TEXT",
|
|
57
|
+
description: "Placeholder text shown when input is empty",
|
|
58
|
+
}),
|
|
59
|
+
type: Prop.string<
|
|
60
|
+
"text" | "email" | "password" | "number" | "url"
|
|
61
|
+
>().propertiesPanel({
|
|
62
|
+
label: "Type",
|
|
63
|
+
controlType: "DROP_DOWN",
|
|
64
|
+
description: "The type of input",
|
|
65
|
+
options: [
|
|
66
|
+
{ label: "Text", value: "text" },
|
|
67
|
+
{ label: "Email", value: "email" },
|
|
68
|
+
{ label: "Password", value: "password" },
|
|
69
|
+
{ label: "Number", value: "number" },
|
|
70
|
+
{ label: "URL", value: "url" },
|
|
71
|
+
],
|
|
72
|
+
}),
|
|
73
|
+
}),
|
|
74
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
75
|
+
autoComplete: Prop.string().propertiesPanel({
|
|
76
|
+
label: "Auto complete",
|
|
77
|
+
controlType: "DROP_DOWN",
|
|
78
|
+
description: "Hint for form autofill feature",
|
|
79
|
+
options: [
|
|
80
|
+
{ label: "Off", value: "off" },
|
|
81
|
+
{ label: "On", value: "on" },
|
|
82
|
+
{ label: "Name", value: "name" },
|
|
83
|
+
{ label: "Email", value: "email" },
|
|
84
|
+
{ label: "Username", value: "username" },
|
|
85
|
+
{ label: "Current password", value: "current-password" },
|
|
86
|
+
{ label: "New password", value: "new-password" },
|
|
87
|
+
{ label: "URL", value: "url" },
|
|
88
|
+
],
|
|
89
|
+
isRemovable: true,
|
|
90
|
+
visibility: "SHOW_NAME",
|
|
91
|
+
defaultOnAdd: "off",
|
|
92
|
+
isVisible: function (this: { type?: string }) {
|
|
93
|
+
return AUTO_COMPLETE_INPUT_TYPES.includes(this.type ?? "text");
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
}),
|
|
97
|
+
|
|
98
|
+
interaction: Section.category(PropsCategory.Interaction)
|
|
99
|
+
.children({
|
|
100
|
+
disabled: Prop.boolean().propertiesPanel({
|
|
101
|
+
label: "Disabled",
|
|
102
|
+
controlType: "SWITCH",
|
|
103
|
+
description: "Whether the input is disabled",
|
|
104
|
+
}),
|
|
105
|
+
readOnly: Prop.boolean().propertiesPanel({
|
|
106
|
+
label: "Read only",
|
|
107
|
+
controlType: "SWITCH",
|
|
108
|
+
description: "Whether the input is read only",
|
|
109
|
+
}),
|
|
110
|
+
autoFocus: Prop.boolean().propertiesPanel({
|
|
111
|
+
label: "Auto focus",
|
|
112
|
+
controlType: "SWITCH",
|
|
113
|
+
description: "Whether the input should auto focus on page load",
|
|
114
|
+
}),
|
|
115
|
+
})
|
|
116
|
+
.add({
|
|
117
|
+
minLength: Prop.number().propertiesPanel({
|
|
118
|
+
label: "Min length",
|
|
119
|
+
controlType: "INPUT_TEXT",
|
|
120
|
+
description: "Minimum number of characters required",
|
|
121
|
+
isRemovable: true,
|
|
122
|
+
visibility: "SHOW_NAME",
|
|
123
|
+
defaultOnAdd: 0,
|
|
124
|
+
isVisible: function (this: { type?: string }) {
|
|
125
|
+
return TEXT_INPUT_TYPES.includes(this.type ?? "text");
|
|
126
|
+
},
|
|
127
|
+
}),
|
|
128
|
+
maxLength: Prop.number().propertiesPanel({
|
|
129
|
+
label: "Max length",
|
|
130
|
+
controlType: "INPUT_TEXT",
|
|
131
|
+
description: "Maximum number of characters allowed",
|
|
132
|
+
isRemovable: true,
|
|
133
|
+
visibility: "SHOW_NAME",
|
|
134
|
+
defaultOnAdd: 100,
|
|
135
|
+
isVisible: function (this: { type?: string }) {
|
|
136
|
+
return TEXT_INPUT_TYPES.includes(this.type ?? "text");
|
|
137
|
+
},
|
|
138
|
+
}),
|
|
139
|
+
})
|
|
140
|
+
.add({
|
|
141
|
+
min: Prop.number().propertiesPanel({
|
|
142
|
+
label: "Min value",
|
|
143
|
+
controlType: "INPUT_TEXT",
|
|
144
|
+
description: "Minimum value for number inputs",
|
|
145
|
+
isRemovable: true,
|
|
146
|
+
visibility: "SHOW_NAME",
|
|
147
|
+
defaultOnAdd: 0,
|
|
148
|
+
isVisible: function (this: { type?: string }) {
|
|
149
|
+
return NUMERIC_INPUT_TYPES.includes(this.type ?? "text");
|
|
150
|
+
},
|
|
151
|
+
}),
|
|
152
|
+
max: Prop.number().propertiesPanel({
|
|
153
|
+
label: "Max value",
|
|
154
|
+
controlType: "INPUT_TEXT",
|
|
155
|
+
description: "Maximum value for number inputs",
|
|
156
|
+
isRemovable: true,
|
|
157
|
+
visibility: "SHOW_NAME",
|
|
158
|
+
defaultOnAdd: 100,
|
|
159
|
+
isVisible: function (this: { type?: string }) {
|
|
160
|
+
return NUMERIC_INPUT_TYPES.includes(this.type ?? "text");
|
|
161
|
+
},
|
|
162
|
+
}),
|
|
163
|
+
step: Prop.number().propertiesPanel({
|
|
164
|
+
label: "Step",
|
|
165
|
+
controlType: "INPUT_TEXT",
|
|
166
|
+
description: "Step value for number inputs",
|
|
167
|
+
isRemovable: true,
|
|
168
|
+
visibility: "SHOW_NAME",
|
|
169
|
+
defaultOnAdd: 1,
|
|
170
|
+
isVisible: function (this: { type?: string }) {
|
|
171
|
+
return STEP_INPUT_TYPES.includes(this.type ?? "text");
|
|
172
|
+
},
|
|
173
|
+
}),
|
|
174
|
+
}),
|
|
175
|
+
|
|
176
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
177
|
+
onChange: Prop.eventHandler().propertiesPanel({
|
|
178
|
+
label: "On change",
|
|
179
|
+
description: "Triggered when the input value changes",
|
|
180
|
+
computedArgs: [
|
|
181
|
+
{
|
|
182
|
+
name: "event",
|
|
183
|
+
type: "object",
|
|
184
|
+
description: "The event object",
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
}),
|
|
188
|
+
onFocus: Prop.eventHandler().propertiesPanel({
|
|
189
|
+
label: "On focus",
|
|
190
|
+
description: "Triggered when the input receives focus",
|
|
191
|
+
}),
|
|
192
|
+
onBlur: Prop.eventHandler().propertiesPanel({
|
|
193
|
+
label: "On blur",
|
|
194
|
+
description: "Triggered when the input loses focus",
|
|
195
|
+
}),
|
|
196
|
+
onKeyDown: Prop.eventHandler().propertiesPanel({
|
|
197
|
+
label: "On key down",
|
|
198
|
+
description: "Triggered when a key is pressed down",
|
|
199
|
+
computedArgs: [
|
|
200
|
+
{
|
|
201
|
+
name: "event",
|
|
202
|
+
type: "object",
|
|
203
|
+
description: "The event object",
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
}),
|
|
207
|
+
}),
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
// Editor Configuration
|
|
211
|
+
const editorConfig: EditorConfig = {
|
|
212
|
+
icon: "input",
|
|
213
|
+
description: "A versatile input component for collecting user data",
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// Registration
|
|
217
|
+
registerComponent(Input, propertiesDefinition).editorConfig(editorConfig);
|
|
218
|
+
|
|
219
|
+
export { Input };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
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
|
+
// Label Component
|
|
16
|
+
function Label({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
20
|
+
return (
|
|
21
|
+
<LabelPrimitive.Root
|
|
22
|
+
data-slot="label"
|
|
23
|
+
className={cn(
|
|
24
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
25
|
+
className,
|
|
26
|
+
)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type LabelProps = React.ComponentProps<typeof Label>;
|
|
33
|
+
|
|
34
|
+
// Properties Definition
|
|
35
|
+
const propertiesDefinition: PropertiesPanelDefinition<LabelProps> = {
|
|
36
|
+
general: Section.category(PropsCategory.Content).children({
|
|
37
|
+
children: Prop.jsx().propertiesPanel({
|
|
38
|
+
label: "Text",
|
|
39
|
+
controlType: "INPUT_TEXT",
|
|
40
|
+
}),
|
|
41
|
+
htmlFor: Prop.string(),
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Editor Template
|
|
46
|
+
// Editor Config
|
|
47
|
+
const editorConfig: EditorConfig = {
|
|
48
|
+
icon: "button",
|
|
49
|
+
description: "A label component for forms and inputs",
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Register Component
|
|
53
|
+
registerComponent(Label, propertiesDefinition).editorConfig(editorConfig);
|
|
54
|
+
|
|
55
|
+
export { Label };
|