@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,225 @@
|
|
|
1
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
registerComponent,
|
|
7
|
+
Prop,
|
|
8
|
+
Section,
|
|
9
|
+
PropsCategory,
|
|
10
|
+
type PropertiesPanelDefinition,
|
|
11
|
+
type EditorConfig,
|
|
12
|
+
} from "@superblocksteam/library";
|
|
13
|
+
|
|
14
|
+
import { toggleVariants } from "@/components/ui/toggle";
|
|
15
|
+
import { cn } from "@/lib/utils";
|
|
16
|
+
|
|
17
|
+
// Context
|
|
18
|
+
const ToggleGroupContext = React.createContext<
|
|
19
|
+
VariantProps<typeof toggleVariants> & {
|
|
20
|
+
spacing?: number;
|
|
21
|
+
}
|
|
22
|
+
>({
|
|
23
|
+
size: "default",
|
|
24
|
+
variant: "default",
|
|
25
|
+
spacing: 0,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// ToggleGroup Component
|
|
29
|
+
function ToggleGroup({
|
|
30
|
+
className,
|
|
31
|
+
variant,
|
|
32
|
+
size,
|
|
33
|
+
spacing = 0,
|
|
34
|
+
children,
|
|
35
|
+
...props
|
|
36
|
+
}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
|
|
37
|
+
VariantProps<typeof toggleVariants> & {
|
|
38
|
+
spacing?: number;
|
|
39
|
+
}) {
|
|
40
|
+
return (
|
|
41
|
+
<ToggleGroupPrimitive.Root
|
|
42
|
+
data-slot="toggle-group"
|
|
43
|
+
data-variant={variant}
|
|
44
|
+
data-size={size}
|
|
45
|
+
data-spacing={spacing}
|
|
46
|
+
style={{ "--gap": spacing } as React.CSSProperties}
|
|
47
|
+
className={cn(
|
|
48
|
+
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
>
|
|
53
|
+
<ToggleGroupContext.Provider value={{ variant, size, spacing }}>
|
|
54
|
+
{children}
|
|
55
|
+
</ToggleGroupContext.Provider>
|
|
56
|
+
</ToggleGroupPrimitive.Root>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ToggleGroupItem Component
|
|
61
|
+
function ToggleGroupItem({
|
|
62
|
+
className,
|
|
63
|
+
children,
|
|
64
|
+
variant,
|
|
65
|
+
size,
|
|
66
|
+
...props
|
|
67
|
+
}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
|
|
68
|
+
VariantProps<typeof toggleVariants>) {
|
|
69
|
+
const context = React.useContext(ToggleGroupContext);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<ToggleGroupPrimitive.Item
|
|
73
|
+
data-slot="toggle-group-item"
|
|
74
|
+
data-variant={context.variant || variant}
|
|
75
|
+
data-size={context.size || size}
|
|
76
|
+
data-spacing={context.spacing}
|
|
77
|
+
className={cn(
|
|
78
|
+
toggleVariants({
|
|
79
|
+
variant: context.variant || variant,
|
|
80
|
+
size: context.size || size,
|
|
81
|
+
}),
|
|
82
|
+
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
83
|
+
className,
|
|
84
|
+
)}
|
|
85
|
+
{...props}
|
|
86
|
+
>
|
|
87
|
+
{children}
|
|
88
|
+
</ToggleGroupPrimitive.Item>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
type ToggleGroupItemProps = React.ComponentProps<typeof ToggleGroupItem>;
|
|
93
|
+
|
|
94
|
+
// Simplified type for properties panel (avoids discriminated union issues)
|
|
95
|
+
interface ToggleGroupPropsForPanel {
|
|
96
|
+
type?: "single" | "multiple";
|
|
97
|
+
value?: string | string[];
|
|
98
|
+
defaultValue?: string | string[];
|
|
99
|
+
children?: React.ReactNode;
|
|
100
|
+
variant?: "default" | "outline";
|
|
101
|
+
size?: "default" | "sm" | "lg";
|
|
102
|
+
disabled?: boolean;
|
|
103
|
+
onValueChange?: (value: string | string[]) => void;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// ToggleGroupItem Properties
|
|
107
|
+
const toggleGroupItemPropertiesDefinition: PropertiesPanelDefinition<ToggleGroupItemProps> =
|
|
108
|
+
{
|
|
109
|
+
general: Section.category(PropsCategory.Content).children({
|
|
110
|
+
children: Prop.jsx().propertiesPanel({
|
|
111
|
+
label: "Children",
|
|
112
|
+
}),
|
|
113
|
+
value: Prop.string().propertiesPanel({
|
|
114
|
+
label: "Value",
|
|
115
|
+
description: "The value of this toggle item",
|
|
116
|
+
controlType: "INPUT_TEXT",
|
|
117
|
+
}),
|
|
118
|
+
}),
|
|
119
|
+
|
|
120
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
121
|
+
disabled: Prop.boolean().propertiesPanel({
|
|
122
|
+
label: "Disabled",
|
|
123
|
+
controlType: "SWITCH",
|
|
124
|
+
description: "Whether this toggle item is disabled",
|
|
125
|
+
}),
|
|
126
|
+
}),
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
registerComponent(
|
|
130
|
+
ToggleGroupItem,
|
|
131
|
+
toggleGroupItemPropertiesDefinition,
|
|
132
|
+
).editorConfig({
|
|
133
|
+
isDroppable: false,
|
|
134
|
+
isDraggable: false,
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// ToggleGroup Properties Definition
|
|
138
|
+
const propertiesDefinition: PropertiesPanelDefinition<ToggleGroupPropsForPanel> =
|
|
139
|
+
{
|
|
140
|
+
general: Section.category(PropsCategory.Content).children({
|
|
141
|
+
value: Prop.any<string | string[]>().propertiesPanel({
|
|
142
|
+
label: "Value",
|
|
143
|
+
controlType: "INPUT_TEXT",
|
|
144
|
+
description: "The controlled value of the pressed item(s)",
|
|
145
|
+
isRemovable: true,
|
|
146
|
+
visibility: "SHOW_NAME",
|
|
147
|
+
}),
|
|
148
|
+
type: Prop.string<"single" | "multiple">().propertiesPanel({
|
|
149
|
+
label: "Type",
|
|
150
|
+
controlType: "RADIO_BUTTON_GROUP",
|
|
151
|
+
description: "Whether single or multiple items can be selected",
|
|
152
|
+
options: [
|
|
153
|
+
{ label: "Single", value: "single" },
|
|
154
|
+
{ label: "Multiple", value: "multiple" },
|
|
155
|
+
],
|
|
156
|
+
}),
|
|
157
|
+
children: Prop.jsx().propertiesPanel({
|
|
158
|
+
label: "Items",
|
|
159
|
+
description: "The toggle group items",
|
|
160
|
+
}),
|
|
161
|
+
defaultValue: Prop.any<string | string[]>().propertiesPanel({
|
|
162
|
+
label: "Default value",
|
|
163
|
+
controlType: "INPUT_TEXT",
|
|
164
|
+
description: "The default selected value(s)",
|
|
165
|
+
isRemovable: true,
|
|
166
|
+
visibility: "SHOW_NAME",
|
|
167
|
+
}),
|
|
168
|
+
}),
|
|
169
|
+
|
|
170
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
171
|
+
variant: Prop.string<"default" | "outline">().propertiesPanel({
|
|
172
|
+
label: "Variant",
|
|
173
|
+
controlType: "DROP_DOWN",
|
|
174
|
+
description: "Visual style variant of the toggle group",
|
|
175
|
+
options: [
|
|
176
|
+
{ label: "Default", value: "default" },
|
|
177
|
+
{ label: "Outline", value: "outline" },
|
|
178
|
+
],
|
|
179
|
+
}),
|
|
180
|
+
size: Prop.string<"default" | "sm" | "lg">().propertiesPanel({
|
|
181
|
+
label: "Size",
|
|
182
|
+
controlType: "DROP_DOWN",
|
|
183
|
+
description: "Size variant of the toggle group",
|
|
184
|
+
options: [
|
|
185
|
+
{ label: "Small", value: "sm" },
|
|
186
|
+
{ label: "Default", value: "default" },
|
|
187
|
+
{ label: "Large", value: "lg" },
|
|
188
|
+
],
|
|
189
|
+
}),
|
|
190
|
+
}),
|
|
191
|
+
|
|
192
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
193
|
+
disabled: Prop.boolean().propertiesPanel({
|
|
194
|
+
label: "Disabled",
|
|
195
|
+
controlType: "SWITCH",
|
|
196
|
+
description: "Whether the toggle group is disabled",
|
|
197
|
+
}),
|
|
198
|
+
}),
|
|
199
|
+
|
|
200
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
201
|
+
onValueChange: Prop.eventHandler().propertiesPanel({
|
|
202
|
+
label: "onValueChange",
|
|
203
|
+
description: "Triggered when the selection changes",
|
|
204
|
+
computedArgs: [
|
|
205
|
+
{
|
|
206
|
+
name: "value",
|
|
207
|
+
type: "string",
|
|
208
|
+
description: "The new value",
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
}),
|
|
212
|
+
}),
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Editor Configuration
|
|
216
|
+
const editorConfig: EditorConfig = {
|
|
217
|
+
icon: "switch",
|
|
218
|
+
description: "A group of toggle buttons for single or multiple selection",
|
|
219
|
+
isDroppable: false,
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Registration
|
|
223
|
+
registerComponent(ToggleGroup, propertiesDefinition).editorConfig(editorConfig);
|
|
224
|
+
|
|
225
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/* eslint-disable react-refresh/only-export-components */
|
|
2
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
registerComponent,
|
|
8
|
+
Prop,
|
|
9
|
+
Section,
|
|
10
|
+
PropsCategory,
|
|
11
|
+
type PropertiesPanelDefinition,
|
|
12
|
+
type EditorConfig,
|
|
13
|
+
} from "@superblocksteam/library";
|
|
14
|
+
|
|
15
|
+
import { cn } from "@/lib/utils";
|
|
16
|
+
|
|
17
|
+
// Variants
|
|
18
|
+
const toggleVariants = cva(
|
|
19
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
20
|
+
{
|
|
21
|
+
variants: {
|
|
22
|
+
variant: {
|
|
23
|
+
default: "bg-transparent",
|
|
24
|
+
outline:
|
|
25
|
+
"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
default: "h-9 px-2 min-w-9",
|
|
29
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
30
|
+
lg: "h-10 px-2.5 min-w-10",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "default",
|
|
35
|
+
size: "default",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
// Toggle Component
|
|
41
|
+
type ToggleProps = React.ComponentProps<typeof TogglePrimitive.Root> &
|
|
42
|
+
VariantProps<typeof toggleVariants>;
|
|
43
|
+
|
|
44
|
+
function Toggle({ className, variant, size, ...props }: ToggleProps) {
|
|
45
|
+
return (
|
|
46
|
+
<TogglePrimitive.Root
|
|
47
|
+
data-slot="toggle"
|
|
48
|
+
className={cn(toggleVariants({ variant, size, className }))}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Properties Definition
|
|
55
|
+
const propertiesDefinition: PropertiesPanelDefinition<ToggleProps> = {
|
|
56
|
+
general: Section.category(PropsCategory.Content).children({
|
|
57
|
+
pressed: Prop.boolean().propertiesPanel({
|
|
58
|
+
label: "Pressed",
|
|
59
|
+
controlType: "SWITCH",
|
|
60
|
+
description:
|
|
61
|
+
"The controlled pressed state of the toggle. Must be used in conjunction with `onPressedChange`",
|
|
62
|
+
isRemovable: true,
|
|
63
|
+
visibility: "SHOW_NAME",
|
|
64
|
+
}),
|
|
65
|
+
children: Prop.jsx().propertiesPanel({
|
|
66
|
+
label: "Text",
|
|
67
|
+
description: "The text content of the toggle button",
|
|
68
|
+
}),
|
|
69
|
+
defaultPressed: Prop.boolean()
|
|
70
|
+
.propertiesPanel({
|
|
71
|
+
label: "Default pressed",
|
|
72
|
+
controlType: "SWITCH",
|
|
73
|
+
description: "Whether the toggle is pressed by default",
|
|
74
|
+
})
|
|
75
|
+
.docs({
|
|
76
|
+
description: "Use when you do not need to control its pressed state",
|
|
77
|
+
}),
|
|
78
|
+
}),
|
|
79
|
+
|
|
80
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
81
|
+
variant: Prop.string<"default" | "outline">().propertiesPanel({
|
|
82
|
+
label: "Variant",
|
|
83
|
+
controlType: "DROP_DOWN",
|
|
84
|
+
description: "Visual style variant of the toggle",
|
|
85
|
+
options: [
|
|
86
|
+
{
|
|
87
|
+
label: "Default",
|
|
88
|
+
value: "default",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: "Outline",
|
|
92
|
+
value: "outline",
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
}),
|
|
96
|
+
size: Prop.string<"default" | "sm" | "lg">().propertiesPanel({
|
|
97
|
+
label: "Size",
|
|
98
|
+
controlType: "DROP_DOWN",
|
|
99
|
+
description: "Size variant of the toggle",
|
|
100
|
+
options: [
|
|
101
|
+
{
|
|
102
|
+
label: "Small",
|
|
103
|
+
value: "sm",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: "Default",
|
|
107
|
+
value: "default",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: "Large",
|
|
111
|
+
value: "lg",
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
}),
|
|
115
|
+
}),
|
|
116
|
+
|
|
117
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
118
|
+
disabled: Prop.boolean().propertiesPanel({
|
|
119
|
+
label: "Disabled",
|
|
120
|
+
controlType: "SWITCH",
|
|
121
|
+
description: "Whether the toggle is disabled",
|
|
122
|
+
}),
|
|
123
|
+
}),
|
|
124
|
+
|
|
125
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
126
|
+
onPressedChange: Prop.eventHandler().propertiesPanel({
|
|
127
|
+
label: "onPressedChange",
|
|
128
|
+
description: "Triggered when the toggle pressed state changes",
|
|
129
|
+
computedArgs: [
|
|
130
|
+
{
|
|
131
|
+
name: "pressed",
|
|
132
|
+
type: "boolean",
|
|
133
|
+
description: "Whether the toggle is pressed",
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
}),
|
|
137
|
+
}),
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// Editor Configuration
|
|
141
|
+
const editorConfig: EditorConfig = {
|
|
142
|
+
icon: "switch",
|
|
143
|
+
description: "A two-state button that can be either on or off",
|
|
144
|
+
isDroppable: false,
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// Registration
|
|
148
|
+
registerComponent(Toggle, propertiesDefinition).editorConfig(editorConfig);
|
|
149
|
+
|
|
150
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
registerComponent,
|
|
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
|
+
function TooltipProvider({
|
|
16
|
+
delayDuration = 0,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
19
|
+
return (
|
|
20
|
+
<TooltipPrimitive.Provider
|
|
21
|
+
data-slot="tooltip-provider"
|
|
22
|
+
delayDuration={delayDuration}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function Tooltip({
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
31
|
+
return (
|
|
32
|
+
<TooltipProvider>
|
|
33
|
+
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
34
|
+
</TooltipProvider>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function TooltipTrigger({
|
|
39
|
+
...props
|
|
40
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
41
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function TooltipContent({
|
|
45
|
+
className,
|
|
46
|
+
sideOffset = 0,
|
|
47
|
+
children,
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
50
|
+
return (
|
|
51
|
+
<TooltipPrimitive.Portal>
|
|
52
|
+
<TooltipPrimitive.Content
|
|
53
|
+
data-slot="tooltip-content"
|
|
54
|
+
sideOffset={sideOffset}
|
|
55
|
+
className={cn(
|
|
56
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
57
|
+
className,
|
|
58
|
+
)}
|
|
59
|
+
{...props}
|
|
60
|
+
>
|
|
61
|
+
{children}
|
|
62
|
+
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
63
|
+
</TooltipPrimitive.Content>
|
|
64
|
+
</TooltipPrimitive.Portal>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
69
|
+
|
|
70
|
+
// Properties Definition for Tooltip (root)
|
|
71
|
+
const tooltipPropertiesDefinition: PropertiesPanelDefinition<
|
|
72
|
+
React.ComponentPropsWithoutRef<typeof Tooltip>
|
|
73
|
+
> = {
|
|
74
|
+
general: Section.category(PropsCategory.Content).children({
|
|
75
|
+
open: Prop.boolean().propertiesPanel({
|
|
76
|
+
label: "Open",
|
|
77
|
+
controlType: "SWITCH",
|
|
78
|
+
description:
|
|
79
|
+
"The controlled open state of the tooltip. Must be used in conjunction with `onOpenChange`.",
|
|
80
|
+
isRemovable: true,
|
|
81
|
+
visibility: "SHOW_NAME",
|
|
82
|
+
}),
|
|
83
|
+
children: Prop.jsx(),
|
|
84
|
+
}),
|
|
85
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
86
|
+
defaultOpen: Prop.boolean().propertiesPanel({
|
|
87
|
+
label: "Default open",
|
|
88
|
+
description: "Whether the tooltip is open by default",
|
|
89
|
+
}),
|
|
90
|
+
delayDuration: Prop.number().propertiesPanel({
|
|
91
|
+
label: "Delay duration",
|
|
92
|
+
description:
|
|
93
|
+
"The duration from when the mouse enters a tooltip trigger until the tooltip opens (in milliseconds)",
|
|
94
|
+
}),
|
|
95
|
+
disableHoverableContent: Prop.boolean().propertiesPanel({
|
|
96
|
+
label: "Disable hoverable content",
|
|
97
|
+
description:
|
|
98
|
+
"When true, trying to hover the content will result in the tooltip closing",
|
|
99
|
+
}),
|
|
100
|
+
}),
|
|
101
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
102
|
+
onOpenChange: Prop.eventHandler().propertiesPanel({
|
|
103
|
+
label: "onOpenChange",
|
|
104
|
+
computedArgs: [
|
|
105
|
+
{
|
|
106
|
+
name: "open",
|
|
107
|
+
type: "boolean",
|
|
108
|
+
description: "Whether the tooltip is open",
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
}),
|
|
112
|
+
}),
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const tooltipEditorConfig: EditorConfig = {
|
|
116
|
+
icon: "modal",
|
|
117
|
+
isDetached: true,
|
|
118
|
+
isDraggable: false,
|
|
119
|
+
description:
|
|
120
|
+
"A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.",
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// Properties Definition for TooltipContent
|
|
124
|
+
const tooltipContentPropertiesDefinition: PropertiesPanelDefinition<
|
|
125
|
+
React.ComponentPropsWithoutRef<typeof TooltipContent>
|
|
126
|
+
> = {
|
|
127
|
+
general: Section.category(PropsCategory.Content).children({
|
|
128
|
+
children: Prop.jsx(),
|
|
129
|
+
}),
|
|
130
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
131
|
+
side: Prop.string<"top" | "right" | "bottom" | "left">().propertiesPanel({
|
|
132
|
+
label: "Side",
|
|
133
|
+
controlType: "DROP_DOWN",
|
|
134
|
+
description: "The preferred side of the trigger to render against",
|
|
135
|
+
options: [
|
|
136
|
+
{ label: "Top", value: "top" },
|
|
137
|
+
{ label: "Right", value: "right" },
|
|
138
|
+
{ label: "Bottom", value: "bottom" },
|
|
139
|
+
{ label: "Left", value: "left" },
|
|
140
|
+
],
|
|
141
|
+
}),
|
|
142
|
+
align: Prop.string<"start" | "center" | "end">().propertiesPanel({
|
|
143
|
+
label: "Align",
|
|
144
|
+
controlType: "DROP_DOWN",
|
|
145
|
+
description: "The preferred alignment against the trigger",
|
|
146
|
+
options: [
|
|
147
|
+
{ label: "Start", value: "start" },
|
|
148
|
+
{ label: "Center", value: "center" },
|
|
149
|
+
{ label: "End", value: "end" },
|
|
150
|
+
],
|
|
151
|
+
}),
|
|
152
|
+
sideOffset: Prop.number().propertiesPanel({
|
|
153
|
+
label: "Side offset",
|
|
154
|
+
description: "The distance in pixels from the trigger",
|
|
155
|
+
}),
|
|
156
|
+
avoidCollisions: Prop.boolean().propertiesPanel({
|
|
157
|
+
label: "Avoid collisions",
|
|
158
|
+
description:
|
|
159
|
+
"Whether the tooltip should avoid collisions with other elements",
|
|
160
|
+
}),
|
|
161
|
+
}),
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const childrenPropertiesDefinition = {
|
|
165
|
+
general: Section.category(PropsCategory.Content).children({
|
|
166
|
+
children: Prop.jsx(),
|
|
167
|
+
}),
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// Register Components
|
|
171
|
+
registerComponent(Tooltip, tooltipPropertiesDefinition).editorConfig(
|
|
172
|
+
tooltipEditorConfig,
|
|
173
|
+
);
|
|
174
|
+
registerComponent(TooltipTrigger, childrenPropertiesDefinition);
|
|
175
|
+
registerComponent(TooltipContent, tooltipContentPropertiesDefinition);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed `useApi` wrapper backed by the app's API registry.
|
|
3
|
+
*
|
|
4
|
+
* This gives compile-time inference for API names, inputs, and outputs based on
|
|
5
|
+
* `server/apis/index.ts`.
|
|
6
|
+
*
|
|
7
|
+
* You generally do not need to modify this file. Add APIs to
|
|
8
|
+
* `server/apis/index.ts` and import `useApi` from here.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { useApi } from "@/hooks/useApi.js";
|
|
13
|
+
*
|
|
14
|
+
* const { run } = useApi("GetUsers");
|
|
15
|
+
* // `run` is inferred from the `GetUsers` entry in `server/apis/index.ts`
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { useTypedApi } from "@superblocksteam/library";
|
|
20
|
+
|
|
21
|
+
import type { ApiRegistry } from "../../server/apis/index.js"; // Type-only import
|
|
22
|
+
|
|
23
|
+
/** Typed `useApi` with inference from `ApiRegistry`. */
|
|
24
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- useTypedApi is a type-only factory (no React hooks are called at runtime)
|
|
25
|
+
export const useApi = useTypedApi<ApiRegistry>();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useTypedApiData } from "@superblocksteam/library";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Typed `useApiData` wrapper backed by the app's API registry.
|
|
5
|
+
*/
|
|
6
|
+
import type { ApiRegistry } from "../../server/apis/index.js";
|
|
7
|
+
|
|
8
|
+
/** Typed `useApiData` with inference from `ApiRegistry`. */
|
|
9
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- useTypedApiData is a type-only factory (no React hooks are called at runtime)
|
|
10
|
+
export const useApiData = useTypedApiData<ApiRegistry>();
|