@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,229 @@
|
|
|
1
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import { registerComponent } from "@superblocksteam/library";
|
|
6
|
+
import {
|
|
7
|
+
Prop,
|
|
8
|
+
Section,
|
|
9
|
+
PropsCategory,
|
|
10
|
+
type PropertiesPanelDefinition,
|
|
11
|
+
type EditorConfig,
|
|
12
|
+
} from "@superblocksteam/library";
|
|
13
|
+
|
|
14
|
+
import { cn } from "@/lib/utils";
|
|
15
|
+
|
|
16
|
+
// Primitive Components
|
|
17
|
+
const Select = SelectPrimitive.Root;
|
|
18
|
+
const SelectGroup = SelectPrimitive.Group;
|
|
19
|
+
const SelectValue = SelectPrimitive.Value;
|
|
20
|
+
|
|
21
|
+
const SelectTrigger = React.forwardRef<
|
|
22
|
+
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
|
24
|
+
>(({ className, children, style, ...props }, ref) => {
|
|
25
|
+
return (
|
|
26
|
+
<SelectPrimitive.Trigger
|
|
27
|
+
ref={ref}
|
|
28
|
+
style={style}
|
|
29
|
+
className={cn(
|
|
30
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
>
|
|
35
|
+
{children}
|
|
36
|
+
<SelectPrimitive.Icon asChild>
|
|
37
|
+
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
38
|
+
</SelectPrimitive.Icon>
|
|
39
|
+
</SelectPrimitive.Trigger>
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
43
|
+
|
|
44
|
+
const SelectScrollUpButton = React.forwardRef<
|
|
45
|
+
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
46
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
47
|
+
>(({ className, ...props }, ref) => (
|
|
48
|
+
<SelectPrimitive.ScrollUpButton
|
|
49
|
+
ref={ref}
|
|
50
|
+
className={cn(
|
|
51
|
+
"flex cursor-default items-center justify-center py-1",
|
|
52
|
+
className,
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
<ChevronUp className="h-4 w-4" />
|
|
57
|
+
</SelectPrimitive.ScrollUpButton>
|
|
58
|
+
));
|
|
59
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
60
|
+
|
|
61
|
+
const SelectScrollDownButton = React.forwardRef<
|
|
62
|
+
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
63
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
|
64
|
+
>(({ className, ...props }, ref) => (
|
|
65
|
+
<SelectPrimitive.ScrollDownButton
|
|
66
|
+
ref={ref}
|
|
67
|
+
className={cn(
|
|
68
|
+
"flex cursor-default items-center justify-center py-1",
|
|
69
|
+
className,
|
|
70
|
+
)}
|
|
71
|
+
{...props}
|
|
72
|
+
>
|
|
73
|
+
<ChevronDown className="h-4 w-4" />
|
|
74
|
+
</SelectPrimitive.ScrollDownButton>
|
|
75
|
+
));
|
|
76
|
+
SelectScrollDownButton.displayName =
|
|
77
|
+
SelectPrimitive.ScrollDownButton.displayName;
|
|
78
|
+
|
|
79
|
+
const SelectContent = React.forwardRef<
|
|
80
|
+
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
81
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
82
|
+
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
83
|
+
<SelectPrimitive.Portal>
|
|
84
|
+
<SelectPrimitive.Content
|
|
85
|
+
ref={ref}
|
|
86
|
+
className={cn(
|
|
87
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg 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",
|
|
88
|
+
position === "popper" &&
|
|
89
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
90
|
+
className,
|
|
91
|
+
)}
|
|
92
|
+
position={position}
|
|
93
|
+
{...props}
|
|
94
|
+
>
|
|
95
|
+
<SelectScrollUpButton />
|
|
96
|
+
<SelectPrimitive.Viewport
|
|
97
|
+
className={cn(
|
|
98
|
+
"p-1",
|
|
99
|
+
position === "popper" &&
|
|
100
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
101
|
+
)}
|
|
102
|
+
>
|
|
103
|
+
{children}
|
|
104
|
+
</SelectPrimitive.Viewport>
|
|
105
|
+
<SelectScrollDownButton />
|
|
106
|
+
</SelectPrimitive.Content>
|
|
107
|
+
</SelectPrimitive.Portal>
|
|
108
|
+
));
|
|
109
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
110
|
+
|
|
111
|
+
const SelectLabel = React.forwardRef<
|
|
112
|
+
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
113
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
114
|
+
>(({ className, ...props }, ref) => (
|
|
115
|
+
<SelectPrimitive.Label
|
|
116
|
+
ref={ref}
|
|
117
|
+
className={cn("px-2 py-1.5 text-sm font-semibold", className)}
|
|
118
|
+
{...props}
|
|
119
|
+
/>
|
|
120
|
+
));
|
|
121
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
122
|
+
|
|
123
|
+
const SelectItem = React.forwardRef<
|
|
124
|
+
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
125
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
126
|
+
>(({ className, children, ...props }, ref) => (
|
|
127
|
+
<SelectPrimitive.Item
|
|
128
|
+
ref={ref}
|
|
129
|
+
className={cn(
|
|
130
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
131
|
+
className,
|
|
132
|
+
)}
|
|
133
|
+
{...props}
|
|
134
|
+
>
|
|
135
|
+
<span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
136
|
+
<SelectPrimitive.ItemIndicator>
|
|
137
|
+
<Check className="h-4 w-4" />
|
|
138
|
+
</SelectPrimitive.ItemIndicator>
|
|
139
|
+
</span>
|
|
140
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
141
|
+
</SelectPrimitive.Item>
|
|
142
|
+
));
|
|
143
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
144
|
+
|
|
145
|
+
const SelectSeparator = React.forwardRef<
|
|
146
|
+
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
147
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
148
|
+
>(({ className, ...props }, ref) => (
|
|
149
|
+
<SelectPrimitive.Separator
|
|
150
|
+
ref={ref}
|
|
151
|
+
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
));
|
|
155
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
156
|
+
|
|
157
|
+
// Main Component
|
|
158
|
+
type SelectProps = React.ComponentPropsWithoutRef<typeof Select>;
|
|
159
|
+
|
|
160
|
+
// Properties Definition
|
|
161
|
+
const propertiesDefinition: PropertiesPanelDefinition<SelectProps> = {
|
|
162
|
+
general: Section.category(PropsCategory.Content).children({
|
|
163
|
+
value: Prop.string().propertiesPanel({
|
|
164
|
+
label: "Value",
|
|
165
|
+
description:
|
|
166
|
+
"The controlled value of the select. Should be used in conjunction with `onValueChange`",
|
|
167
|
+
}),
|
|
168
|
+
defaultValue: Prop.string().propertiesPanel({
|
|
169
|
+
label: "Default value",
|
|
170
|
+
description: "The default selected value",
|
|
171
|
+
}),
|
|
172
|
+
}),
|
|
173
|
+
|
|
174
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
175
|
+
disabled: Prop.boolean().propertiesPanel({
|
|
176
|
+
label: "Disabled",
|
|
177
|
+
description: "Whether the select is disabled",
|
|
178
|
+
}),
|
|
179
|
+
}),
|
|
180
|
+
|
|
181
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
182
|
+
onValueChange: Prop.eventHandler().propertiesPanel({
|
|
183
|
+
label: "onValueChange",
|
|
184
|
+
description: "Triggered when the selected value changes",
|
|
185
|
+
computedArgs: [
|
|
186
|
+
{
|
|
187
|
+
name: "value",
|
|
188
|
+
type: "string",
|
|
189
|
+
description: "The selected value",
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
}),
|
|
193
|
+
onOpenChange: Prop.eventHandler().propertiesPanel({
|
|
194
|
+
label: "onOpenChange",
|
|
195
|
+
description: "Triggered when the dropdown opens or closes",
|
|
196
|
+
computedArgs: [
|
|
197
|
+
{
|
|
198
|
+
name: "open",
|
|
199
|
+
type: "boolean",
|
|
200
|
+
description: "Whether the dropdown is open",
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
}),
|
|
204
|
+
}),
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
// Editor Configuration
|
|
208
|
+
const editorConfig: EditorConfig = {
|
|
209
|
+
icon: "dropdown",
|
|
210
|
+
description:
|
|
211
|
+
"Displays a list of options for the user to pick from—triggered by a button",
|
|
212
|
+
hasExtendedClickArea: true,
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Registration
|
|
216
|
+
registerComponent(Select, propertiesDefinition).editorConfig(editorConfig);
|
|
217
|
+
|
|
218
|
+
export {
|
|
219
|
+
Select,
|
|
220
|
+
SelectGroup,
|
|
221
|
+
SelectValue,
|
|
222
|
+
SelectTrigger,
|
|
223
|
+
SelectContent,
|
|
224
|
+
SelectLabel,
|
|
225
|
+
SelectItem,
|
|
226
|
+
SelectSeparator,
|
|
227
|
+
SelectScrollUpButton,
|
|
228
|
+
SelectScrollDownButton,
|
|
229
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { registerComponent } from "@superblocksteam/library";
|
|
5
|
+
import {
|
|
6
|
+
Prop,
|
|
7
|
+
Section,
|
|
8
|
+
PropsCategory,
|
|
9
|
+
type PropertiesPanelDefinition,
|
|
10
|
+
type EditorConfig,
|
|
11
|
+
} from "@superblocksteam/library";
|
|
12
|
+
|
|
13
|
+
import { cn } from "@/lib/utils";
|
|
14
|
+
|
|
15
|
+
// Main Component
|
|
16
|
+
function Separator({
|
|
17
|
+
className,
|
|
18
|
+
orientation = "horizontal",
|
|
19
|
+
decorative = true,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
22
|
+
return (
|
|
23
|
+
<SeparatorPrimitive.Root
|
|
24
|
+
data-slot="separator"
|
|
25
|
+
decorative={decorative}
|
|
26
|
+
orientation={orientation}
|
|
27
|
+
className={cn(
|
|
28
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Types
|
|
37
|
+
// Properties Definition
|
|
38
|
+
const propertiesDefinition: PropertiesPanelDefinition<
|
|
39
|
+
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
40
|
+
> = {
|
|
41
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
42
|
+
orientation: Prop.string<"horizontal" | "vertical">().propertiesPanel({
|
|
43
|
+
label: "Orientation",
|
|
44
|
+
controlType: "DROP_DOWN",
|
|
45
|
+
options: [
|
|
46
|
+
{ label: "Horizontal", value: "horizontal" },
|
|
47
|
+
{ label: "Vertical", value: "vertical" },
|
|
48
|
+
],
|
|
49
|
+
}),
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Editor Configuration
|
|
54
|
+
const editorConfig: EditorConfig = {
|
|
55
|
+
description: "A visual separator for dividing content",
|
|
56
|
+
hasExtendedClickArea: true,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// Registration
|
|
60
|
+
registerComponent(Separator, propertiesDefinition).editorConfig(editorConfig);
|
|
61
|
+
|
|
62
|
+
export { Separator };
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import { XIcon } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Prop,
|
|
7
|
+
PropsCategory,
|
|
8
|
+
registerComponent,
|
|
9
|
+
Section,
|
|
10
|
+
type PropertiesPanelDefinition,
|
|
11
|
+
type EditorConfig,
|
|
12
|
+
} from "@superblocksteam/library";
|
|
13
|
+
|
|
14
|
+
import { cn } from "@/lib/utils";
|
|
15
|
+
|
|
16
|
+
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
17
|
+
return <SheetPrimitive.Root data-slot="sheet" {...props} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function SheetTrigger({
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
|
|
23
|
+
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function SheetClose({
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<typeof SheetPrimitive.Close>) {
|
|
29
|
+
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function SheetPortal({
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof SheetPrimitive.Portal>) {
|
|
35
|
+
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function SheetOverlay({
|
|
39
|
+
className,
|
|
40
|
+
...props
|
|
41
|
+
}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
|
|
42
|
+
return (
|
|
43
|
+
<SheetPrimitive.Overlay
|
|
44
|
+
data-slot="sheet-overlay"
|
|
45
|
+
className={cn(
|
|
46
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
47
|
+
className,
|
|
48
|
+
)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function SheetContent({
|
|
55
|
+
className,
|
|
56
|
+
children,
|
|
57
|
+
side = "right",
|
|
58
|
+
...props
|
|
59
|
+
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
60
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
61
|
+
}) {
|
|
62
|
+
return (
|
|
63
|
+
<SheetPortal>
|
|
64
|
+
<SheetOverlay />
|
|
65
|
+
<SheetPrimitive.Content
|
|
66
|
+
data-slot="sheet-content"
|
|
67
|
+
className={cn(
|
|
68
|
+
"p-4 bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
69
|
+
side === "right" &&
|
|
70
|
+
"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
71
|
+
side === "left" &&
|
|
72
|
+
"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
73
|
+
side === "top" &&
|
|
74
|
+
"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
75
|
+
side === "bottom" &&
|
|
76
|
+
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
77
|
+
className,
|
|
78
|
+
)}
|
|
79
|
+
{...props}
|
|
80
|
+
>
|
|
81
|
+
{children}
|
|
82
|
+
<SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
|
|
83
|
+
<XIcon className="size-4" />
|
|
84
|
+
<span className="sr-only">Close</span>
|
|
85
|
+
</SheetPrimitive.Close>
|
|
86
|
+
</SheetPrimitive.Content>
|
|
87
|
+
</SheetPortal>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
92
|
+
return (
|
|
93
|
+
<div
|
|
94
|
+
data-slot="sheet-header"
|
|
95
|
+
className={cn("flex flex-col gap-1.5", className)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
102
|
+
return (
|
|
103
|
+
<div
|
|
104
|
+
data-slot="sheet-footer"
|
|
105
|
+
className={cn("mt-auto flex flex-col gap-2", className)}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function SheetTitle({
|
|
112
|
+
className,
|
|
113
|
+
...props
|
|
114
|
+
}: React.ComponentProps<typeof SheetPrimitive.Title>) {
|
|
115
|
+
return (
|
|
116
|
+
<SheetPrimitive.Title
|
|
117
|
+
data-slot="sheet-title"
|
|
118
|
+
className={cn("text-foreground font-semibold", className)}
|
|
119
|
+
{...props}
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function SheetDescription({
|
|
125
|
+
className,
|
|
126
|
+
...props
|
|
127
|
+
}: React.ComponentProps<typeof SheetPrimitive.Description>) {
|
|
128
|
+
return (
|
|
129
|
+
<SheetPrimitive.Description
|
|
130
|
+
data-slot="sheet-description"
|
|
131
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export {
|
|
138
|
+
Sheet,
|
|
139
|
+
SheetTrigger,
|
|
140
|
+
SheetClose,
|
|
141
|
+
SheetContent,
|
|
142
|
+
SheetHeader,
|
|
143
|
+
SheetFooter,
|
|
144
|
+
SheetTitle,
|
|
145
|
+
SheetDescription,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
// Properties Definition
|
|
149
|
+
const propertiesDefinition: PropertiesPanelDefinition<
|
|
150
|
+
React.ComponentPropsWithoutRef<typeof Sheet>
|
|
151
|
+
> = {
|
|
152
|
+
general: Section.category(PropsCategory.Content).children({
|
|
153
|
+
open: Prop.boolean().propertiesPanel({
|
|
154
|
+
label: "Open",
|
|
155
|
+
controlType: "SWITCH",
|
|
156
|
+
description: "Whether the component is currently open and visible",
|
|
157
|
+
isRemovable: true,
|
|
158
|
+
visibility: "SHOW_NAME",
|
|
159
|
+
}),
|
|
160
|
+
children: Prop.jsx(),
|
|
161
|
+
}),
|
|
162
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
163
|
+
defaultOpen: Prop.boolean().propertiesPanel({
|
|
164
|
+
label: "Default is open",
|
|
165
|
+
description: "Whether the component is open by default",
|
|
166
|
+
}),
|
|
167
|
+
modal: Prop.boolean()
|
|
168
|
+
.propertiesPanel({
|
|
169
|
+
label: "Modal",
|
|
170
|
+
description: "Prevent clicking outside from closing the dialog",
|
|
171
|
+
})
|
|
172
|
+
.docs({
|
|
173
|
+
description:
|
|
174
|
+
"When true, interaction with outside elements will be disabled",
|
|
175
|
+
}),
|
|
176
|
+
}),
|
|
177
|
+
|
|
178
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
179
|
+
onOpenChange: Prop.eventHandler().propertiesPanel({
|
|
180
|
+
label: "onOpenChange",
|
|
181
|
+
computedArgs: [
|
|
182
|
+
{
|
|
183
|
+
name: "open",
|
|
184
|
+
type: "boolean",
|
|
185
|
+
description: "Whether the sheet is open",
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
}),
|
|
189
|
+
}),
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// Editor Configuration
|
|
193
|
+
const editorConfig: EditorConfig = {
|
|
194
|
+
icon: "slideout",
|
|
195
|
+
isDetached: true,
|
|
196
|
+
isDraggable: false,
|
|
197
|
+
description:
|
|
198
|
+
"A sheet component that complements the main content of the screen",
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
const childrenPropertiesDefinition = {
|
|
202
|
+
general: Section.category(PropsCategory.Content).children({
|
|
203
|
+
children: Prop.jsx(),
|
|
204
|
+
}),
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const sheetContentPropertiesDefinition: PropertiesPanelDefinition<
|
|
208
|
+
React.ComponentPropsWithoutRef<typeof SheetContent>
|
|
209
|
+
> = {
|
|
210
|
+
general: Section.category(PropsCategory.Content).children({
|
|
211
|
+
children: Prop.jsx(),
|
|
212
|
+
}),
|
|
213
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
214
|
+
side: Prop.string<"top" | "right" | "bottom" | "left">().propertiesPanel({
|
|
215
|
+
label: "Side",
|
|
216
|
+
controlType: "DROP_DOWN",
|
|
217
|
+
description: "Which side of the screen the sheet appears from",
|
|
218
|
+
options: [
|
|
219
|
+
{ label: "Right", value: "right" },
|
|
220
|
+
{ label: "Left", value: "left" },
|
|
221
|
+
{ label: "Top", value: "top" },
|
|
222
|
+
{ label: "Bottom", value: "bottom" },
|
|
223
|
+
],
|
|
224
|
+
}),
|
|
225
|
+
}),
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
// Registration
|
|
229
|
+
registerComponent(Sheet, propertiesDefinition).editorConfig(editorConfig);
|
|
230
|
+
registerComponent(SheetContent, sheetContentPropertiesDefinition);
|
|
231
|
+
registerComponent(SheetHeader, childrenPropertiesDefinition);
|
|
232
|
+
registerComponent(SheetFooter, childrenPropertiesDefinition);
|
|
233
|
+
registerComponent(SheetTitle, childrenPropertiesDefinition);
|
|
234
|
+
registerComponent(SheetDescription, childrenPropertiesDefinition);
|