@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,97 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
|
+
import { CheckIcon } from "lucide-react";
|
|
3
|
+
import type * 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
|
+
// Base Checkbox Component
|
|
17
|
+
function Checkbox({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
21
|
+
return (
|
|
22
|
+
<CheckboxPrimitive.Root
|
|
23
|
+
data-slot="checkbox"
|
|
24
|
+
{...props}
|
|
25
|
+
className={cn(
|
|
26
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
<CheckboxPrimitive.Indicator
|
|
31
|
+
data-slot="checkbox-indicator"
|
|
32
|
+
className="flex items-center justify-center text-current transition-none"
|
|
33
|
+
>
|
|
34
|
+
<CheckIcon className="size-3.5" />
|
|
35
|
+
</CheckboxPrimitive.Indicator>
|
|
36
|
+
</CheckboxPrimitive.Root>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Checkbox Props
|
|
41
|
+
type CheckboxProps = React.ComponentProps<typeof CheckboxPrimitive.Root> & {
|
|
42
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
43
|
+
defaultChecked?: boolean;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Properties Definition
|
|
47
|
+
const propertiesDefinition: PropertiesPanelDefinition<CheckboxProps> = {
|
|
48
|
+
general: Section.category(PropsCategory.Content).children({
|
|
49
|
+
checked: Prop.boolean().propertiesPanel({
|
|
50
|
+
label: "Checked",
|
|
51
|
+
controlType: "SWITCH",
|
|
52
|
+
description:
|
|
53
|
+
"The controlled state of the checkbox. Must be used in conjunction with `onCheckedChange`",
|
|
54
|
+
isRemovable: true,
|
|
55
|
+
visibility: "SHOW_NAME",
|
|
56
|
+
}),
|
|
57
|
+
defaultChecked: Prop.boolean().propertiesPanel({
|
|
58
|
+
label: "Default checked",
|
|
59
|
+
controlType: "SWITCH",
|
|
60
|
+
description: "Whether the checkbox is checked by default",
|
|
61
|
+
}),
|
|
62
|
+
}),
|
|
63
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
64
|
+
disabled: Prop.boolean().propertiesPanel({
|
|
65
|
+
label: "Disabled",
|
|
66
|
+
controlType: "SWITCH",
|
|
67
|
+
description: "Whether the checkbox is disabled",
|
|
68
|
+
}),
|
|
69
|
+
}),
|
|
70
|
+
|
|
71
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
72
|
+
onCheckedChange: Prop.eventHandler().propertiesPanel({
|
|
73
|
+
label: "onChange",
|
|
74
|
+
description: "Triggered when the checkbox state changes",
|
|
75
|
+
computedArgs: [
|
|
76
|
+
{
|
|
77
|
+
name: "checked",
|
|
78
|
+
type: "boolean",
|
|
79
|
+
description: "Whether the checkbox is checked",
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
}),
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// Editor Template
|
|
87
|
+
// Editor Config
|
|
88
|
+
const editorConfig: EditorConfig = {
|
|
89
|
+
icon: "checkbox",
|
|
90
|
+
description:
|
|
91
|
+
"A control that allows the user to toggle between checked and not checked",
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// Register Component
|
|
95
|
+
registerComponent(Checkbox, propertiesDefinition).editorConfig(editorConfig);
|
|
96
|
+
|
|
97
|
+
export { Checkbox };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
4
|
+
import {
|
|
5
|
+
oneDark,
|
|
6
|
+
oneLight,
|
|
7
|
+
} from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
8
|
+
|
|
9
|
+
interface CodeBlockContentProps {
|
|
10
|
+
code: string;
|
|
11
|
+
language: string;
|
|
12
|
+
showLineNumbers: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const CodeBlockContent = ({
|
|
16
|
+
code,
|
|
17
|
+
language,
|
|
18
|
+
showLineNumbers,
|
|
19
|
+
}: CodeBlockContentProps) => {
|
|
20
|
+
const commonCodeTagProps = {
|
|
21
|
+
className: "font-mono text-sm",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const commonCustomStyle = {
|
|
25
|
+
margin: 0,
|
|
26
|
+
padding: "1rem",
|
|
27
|
+
fontSize: "0.875rem",
|
|
28
|
+
background: "hsl(var(--background))",
|
|
29
|
+
color: "hsl(var(--foreground))",
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const commonLineNumberStyle = {
|
|
33
|
+
color: "hsl(var(--muted-foreground))",
|
|
34
|
+
paddingRight: "1rem",
|
|
35
|
+
minWidth: "2.5rem",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<>
|
|
40
|
+
<SyntaxHighlighter
|
|
41
|
+
className="overflow-hidden dark:hidden"
|
|
42
|
+
codeTagProps={commonCodeTagProps}
|
|
43
|
+
customStyle={commonCustomStyle}
|
|
44
|
+
language={language}
|
|
45
|
+
lineNumberStyle={commonLineNumberStyle}
|
|
46
|
+
showLineNumbers={showLineNumbers}
|
|
47
|
+
style={oneLight}
|
|
48
|
+
>
|
|
49
|
+
{code}
|
|
50
|
+
</SyntaxHighlighter>
|
|
51
|
+
<SyntaxHighlighter
|
|
52
|
+
className="hidden overflow-hidden dark:block"
|
|
53
|
+
codeTagProps={commonCodeTagProps}
|
|
54
|
+
customStyle={commonCustomStyle}
|
|
55
|
+
language={language}
|
|
56
|
+
lineNumberStyle={commonLineNumberStyle}
|
|
57
|
+
showLineNumbers={showLineNumbers}
|
|
58
|
+
style={oneDark}
|
|
59
|
+
>
|
|
60
|
+
{code}
|
|
61
|
+
</SyntaxHighlighter>
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export default CodeBlockContent;
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { format } from "date-fns";
|
|
2
|
+
import { ChevronDownIcon, CalendarIcon } from "lucide-react";
|
|
3
|
+
import { useMemo, useState, useEffect } from "react";
|
|
4
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
5
|
+
import type { DropdownProps, Matcher, DateRange } from "react-day-picker";
|
|
6
|
+
|
|
7
|
+
import { registerComponent } from "@superblocksteam/library";
|
|
8
|
+
import {
|
|
9
|
+
Prop,
|
|
10
|
+
Section,
|
|
11
|
+
PropsCategory,
|
|
12
|
+
type PropertiesPanelDefinition,
|
|
13
|
+
type EditorConfig,
|
|
14
|
+
} from "@superblocksteam/library";
|
|
15
|
+
|
|
16
|
+
import { Button } from "@/components/ui/button";
|
|
17
|
+
import { Calendar } from "@/components/ui/calendar";
|
|
18
|
+
import {
|
|
19
|
+
Popover,
|
|
20
|
+
PopoverContent,
|
|
21
|
+
PopoverTrigger,
|
|
22
|
+
} from "@/components/ui/popover";
|
|
23
|
+
import {
|
|
24
|
+
Select,
|
|
25
|
+
SelectItem,
|
|
26
|
+
SelectTrigger,
|
|
27
|
+
SelectContent,
|
|
28
|
+
SelectValue,
|
|
29
|
+
} from "@/components/ui/select";
|
|
30
|
+
import { cn } from "@/lib/utils";
|
|
31
|
+
|
|
32
|
+
// Date Output Formats
|
|
33
|
+
const DATE_OUTPUT_FORMATS: {
|
|
34
|
+
label: string;
|
|
35
|
+
value: string | undefined;
|
|
36
|
+
}[] = [
|
|
37
|
+
{
|
|
38
|
+
label: "MM-dd-yyyy",
|
|
39
|
+
value: "MM-dd-yyyy",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "yyyy-MM-dd",
|
|
43
|
+
value: "yyyy-MM-dd",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: "dd-MM-yyyy",
|
|
47
|
+
value: "dd-MM-yyyy",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: "do MMM yyyy",
|
|
51
|
+
value: "do MMM yyyy",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: "MM/dd/yyyy",
|
|
55
|
+
value: "MM/dd/yyyy",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: "yyyy/MM/dd",
|
|
59
|
+
value: "yyyy/MM/dd",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: "dd/MM/yyyy",
|
|
63
|
+
value: "dd/MM/yyyy",
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
// Component Props
|
|
68
|
+
type ComponentProps = ComponentPropsWithoutRef<typeof Popover> & {
|
|
69
|
+
value?: { from?: string; to?: string };
|
|
70
|
+
onValueChange?: (value: { from: string; to: string }) => void;
|
|
71
|
+
minDate?: string;
|
|
72
|
+
maxDate?: string;
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
displayFormat?: string;
|
|
75
|
+
buttonVariant?:
|
|
76
|
+
| "default"
|
|
77
|
+
| "outline"
|
|
78
|
+
| "secondary"
|
|
79
|
+
| "ghost"
|
|
80
|
+
| "link"
|
|
81
|
+
| "destructive";
|
|
82
|
+
captionLayout?: "label" | "dropdown" | "dropdown-months" | "dropdown-years";
|
|
83
|
+
numberOfMonths?: number;
|
|
84
|
+
placeholder?: string;
|
|
85
|
+
className?: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const CustomCalendarDropdown = ({
|
|
89
|
+
options,
|
|
90
|
+
value,
|
|
91
|
+
onChange,
|
|
92
|
+
}: DropdownProps) => {
|
|
93
|
+
const handleValueChange = (newValue: string) => {
|
|
94
|
+
if (onChange) {
|
|
95
|
+
const syntheticEvent = {
|
|
96
|
+
target: {
|
|
97
|
+
value: newValue,
|
|
98
|
+
},
|
|
99
|
+
} as React.ChangeEvent<HTMLSelectElement>;
|
|
100
|
+
onChange(syntheticEvent);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
return (
|
|
104
|
+
<Select value={value?.toString()} onValueChange={handleValueChange}>
|
|
105
|
+
<SelectTrigger className={"rdp-dropdown"}>
|
|
106
|
+
<SelectValue />
|
|
107
|
+
</SelectTrigger>
|
|
108
|
+
<SelectContent className="max-h-[200px]">
|
|
109
|
+
{options?.map((option) => (
|
|
110
|
+
<SelectItem
|
|
111
|
+
key={option.value}
|
|
112
|
+
value={option.value.toString()}
|
|
113
|
+
disabled={option.disabled}
|
|
114
|
+
>
|
|
115
|
+
{option.label}
|
|
116
|
+
</SelectItem>
|
|
117
|
+
))}
|
|
118
|
+
</SelectContent>
|
|
119
|
+
</Select>
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const DateRangePicker = (props: ComponentProps) => {
|
|
124
|
+
const {
|
|
125
|
+
value,
|
|
126
|
+
onValueChange,
|
|
127
|
+
minDate,
|
|
128
|
+
maxDate,
|
|
129
|
+
disabled,
|
|
130
|
+
displayFormat = "MM/dd/yyyy",
|
|
131
|
+
buttonVariant,
|
|
132
|
+
captionLayout,
|
|
133
|
+
numberOfMonths,
|
|
134
|
+
placeholder,
|
|
135
|
+
className,
|
|
136
|
+
...rest
|
|
137
|
+
} = props;
|
|
138
|
+
const [open, setOpen] = useState(false);
|
|
139
|
+
|
|
140
|
+
const dateRange = useMemo(() => {
|
|
141
|
+
const range: {
|
|
142
|
+
from?: Date;
|
|
143
|
+
to?: Date;
|
|
144
|
+
} = {};
|
|
145
|
+
if (minDate) {
|
|
146
|
+
range.from = new Date(minDate);
|
|
147
|
+
}
|
|
148
|
+
if (maxDate) {
|
|
149
|
+
range.to = new Date(maxDate);
|
|
150
|
+
}
|
|
151
|
+
return Object.keys(range).length > 0 ? range : undefined;
|
|
152
|
+
}, [minDate, maxDate]);
|
|
153
|
+
|
|
154
|
+
const disabledMatcher = useMemo(() => {
|
|
155
|
+
const matchers: any[] = [];
|
|
156
|
+
if (dateRange?.from) {
|
|
157
|
+
matchers.push({
|
|
158
|
+
before: dateRange?.from,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
if (dateRange?.to) {
|
|
162
|
+
matchers.push({
|
|
163
|
+
after: dateRange?.to,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return matchers.length > 0 ? matchers : undefined;
|
|
167
|
+
}, [dateRange]);
|
|
168
|
+
|
|
169
|
+
const selectedRange: DateRange | undefined = useMemo(() => {
|
|
170
|
+
return {
|
|
171
|
+
from: value?.from ? new Date(value.from) : undefined,
|
|
172
|
+
to: value?.to ? new Date(value.to) : undefined,
|
|
173
|
+
};
|
|
174
|
+
}, [value]);
|
|
175
|
+
|
|
176
|
+
const handleRangeSelect = (range: DateRange | undefined) => {
|
|
177
|
+
const newFromValue = range?.from?.toISOString() || "";
|
|
178
|
+
const newToValue = range?.to?.toISOString() || "";
|
|
179
|
+
void onValueChange?.({
|
|
180
|
+
from: newFromValue,
|
|
181
|
+
to: newToValue,
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const getDisplayText = () => {
|
|
186
|
+
if (!selectedRange?.from && !selectedRange?.to) {
|
|
187
|
+
return placeholder;
|
|
188
|
+
}
|
|
189
|
+
if (selectedRange?.from && selectedRange?.to) {
|
|
190
|
+
return `${format(selectedRange.from, displayFormat)} - ${format(selectedRange.to, displayFormat)}`;
|
|
191
|
+
}
|
|
192
|
+
if (selectedRange?.from) {
|
|
193
|
+
return `${format(selectedRange.from, displayFormat)} - ...`;
|
|
194
|
+
}
|
|
195
|
+
return placeholder;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
useEffect(() => {
|
|
199
|
+
const handleEscape = (e: KeyboardEvent) => {
|
|
200
|
+
if (e.key === "Escape") {
|
|
201
|
+
setOpen(false);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
document.addEventListener("keydown", handleEscape);
|
|
205
|
+
return () => {
|
|
206
|
+
document.removeEventListener("keydown", handleEscape);
|
|
207
|
+
};
|
|
208
|
+
}, []);
|
|
209
|
+
|
|
210
|
+
return (
|
|
211
|
+
<div className={className} {...rest}>
|
|
212
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
213
|
+
<PopoverTrigger className="w-full" asChild>
|
|
214
|
+
<div>
|
|
215
|
+
<Button
|
|
216
|
+
variant="outline"
|
|
217
|
+
disabled={disabled}
|
|
218
|
+
className={cn(
|
|
219
|
+
"w-full justify-between font-normal",
|
|
220
|
+
!selectedRange?.from &&
|
|
221
|
+
!selectedRange?.to &&
|
|
222
|
+
"text-muted-foreground",
|
|
223
|
+
)}
|
|
224
|
+
>
|
|
225
|
+
<div className="flex items-center gap-2">
|
|
226
|
+
<CalendarIcon className="h-4 w-4" />
|
|
227
|
+
{getDisplayText()}
|
|
228
|
+
</div>
|
|
229
|
+
<ChevronDownIcon className="h-4 w-4" />
|
|
230
|
+
</Button>
|
|
231
|
+
</div>
|
|
232
|
+
</PopoverTrigger>
|
|
233
|
+
<PopoverContent className="w-auto overflow-hidden p-0" align="start">
|
|
234
|
+
<Calendar
|
|
235
|
+
showOutsideDays={false}
|
|
236
|
+
buttonVariant={buttonVariant}
|
|
237
|
+
captionLayout={captionLayout}
|
|
238
|
+
disabled={disabled ? true : (disabledMatcher as Matcher[])}
|
|
239
|
+
mode="range"
|
|
240
|
+
selected={selectedRange}
|
|
241
|
+
onSelect={handleRangeSelect}
|
|
242
|
+
numberOfMonths={numberOfMonths}
|
|
243
|
+
components={{
|
|
244
|
+
Dropdown: CustomCalendarDropdown,
|
|
245
|
+
}}
|
|
246
|
+
/>
|
|
247
|
+
</PopoverContent>
|
|
248
|
+
</Popover>
|
|
249
|
+
</div>
|
|
250
|
+
);
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// Properties Definition
|
|
254
|
+
const propertiesDefinition: PropertiesPanelDefinition<ComponentProps> = {
|
|
255
|
+
general: Section.category(PropsCategory.Content).children({
|
|
256
|
+
value: Prop.any<{ from?: string; to?: string }>().propertiesPanel({
|
|
257
|
+
label: "Value",
|
|
258
|
+
controlType: "INPUT_TEXT",
|
|
259
|
+
description: "The controlled value of the date range picker",
|
|
260
|
+
isRemovable: true,
|
|
261
|
+
visibility: "SHOW_NAME",
|
|
262
|
+
}),
|
|
263
|
+
defaultFromValue: Prop.string().propertiesPanel({
|
|
264
|
+
controlType: "INPUT_TEXT",
|
|
265
|
+
defaultOnAdd: function (this: { valueFormat: string }) {
|
|
266
|
+
const today = new Date();
|
|
267
|
+
return today.toISOString();
|
|
268
|
+
},
|
|
269
|
+
description:
|
|
270
|
+
"Sets the default start date of the component. The date is updated if the default date changes",
|
|
271
|
+
isRemovable: true,
|
|
272
|
+
label: "Default from date",
|
|
273
|
+
placeholder: "Enter default from date",
|
|
274
|
+
visibility: "SHOW_NAME",
|
|
275
|
+
}),
|
|
276
|
+
defaultToValue: Prop.string().propertiesPanel({
|
|
277
|
+
controlType: "INPUT_TEXT",
|
|
278
|
+
defaultOnAdd: function (this: { valueFormat: string }) {
|
|
279
|
+
const weekFromNow = new Date();
|
|
280
|
+
weekFromNow.setDate(weekFromNow.getDate() + 7);
|
|
281
|
+
return weekFromNow.toISOString();
|
|
282
|
+
},
|
|
283
|
+
description:
|
|
284
|
+
"Sets the default end date of the component. The date is updated if the default date changes",
|
|
285
|
+
isRemovable: true,
|
|
286
|
+
label: "Default to date",
|
|
287
|
+
placeholder: "Enter default to date",
|
|
288
|
+
visibility: "SHOW_NAME",
|
|
289
|
+
}),
|
|
290
|
+
displayFormat: Prop.string().propertiesPanel({
|
|
291
|
+
label: "Display format",
|
|
292
|
+
description: "The format of the date to display",
|
|
293
|
+
placeholder: "Enter display format",
|
|
294
|
+
isRemovable: true,
|
|
295
|
+
controlType: "DROP_DOWN",
|
|
296
|
+
options: DATE_OUTPUT_FORMATS,
|
|
297
|
+
}),
|
|
298
|
+
minDate: Prop.string().propertiesPanel({
|
|
299
|
+
label: "Min date",
|
|
300
|
+
description: "The minimum date of the date range picker",
|
|
301
|
+
placeholder: "Enter min date",
|
|
302
|
+
defaultOnAdd: function (this: { valueFormat: string }) {
|
|
303
|
+
return new Date().toISOString();
|
|
304
|
+
},
|
|
305
|
+
visibility: "SHOW_NAME",
|
|
306
|
+
isRemovable: true,
|
|
307
|
+
}),
|
|
308
|
+
maxDate: Prop.string().propertiesPanel({
|
|
309
|
+
label: "Max date",
|
|
310
|
+
description: "The maximum date of the date range picker",
|
|
311
|
+
placeholder: "Enter max date",
|
|
312
|
+
defaultOnAdd: function (this: { valueFormat: string }) {
|
|
313
|
+
const nextYear = new Date();
|
|
314
|
+
nextYear.setFullYear(nextYear.getFullYear() + 1);
|
|
315
|
+
return nextYear.toISOString();
|
|
316
|
+
},
|
|
317
|
+
visibility: "SHOW_NAME",
|
|
318
|
+
isRemovable: true,
|
|
319
|
+
}),
|
|
320
|
+
placeholder: Prop.string().propertiesPanel({
|
|
321
|
+
label: "Placeholder",
|
|
322
|
+
description: "Placeholder text when no dates are selected",
|
|
323
|
+
placeholder: "Enter placeholder text",
|
|
324
|
+
isRemovable: true,
|
|
325
|
+
}),
|
|
326
|
+
}),
|
|
327
|
+
appearance: Section.category(PropsCategory.Appearance).children({
|
|
328
|
+
buttonVariant: Prop.string<
|
|
329
|
+
"ghost" | "outline" | "default" | "secondary" | "destructive"
|
|
330
|
+
>().propertiesPanel({
|
|
331
|
+
label: "Button variant",
|
|
332
|
+
description: "The variant of the button",
|
|
333
|
+
controlType: "DROP_DOWN",
|
|
334
|
+
options: [
|
|
335
|
+
{ label: "Ghost", value: "ghost" },
|
|
336
|
+
{ label: "Outline", value: "outline" },
|
|
337
|
+
{ label: "Default", value: "default" },
|
|
338
|
+
{ label: "Secondary", value: "secondary" },
|
|
339
|
+
{ label: "Destructive", value: "destructive" },
|
|
340
|
+
],
|
|
341
|
+
}),
|
|
342
|
+
captionLayout: Prop.string<"dropdown" | "label">().propertiesPanel({
|
|
343
|
+
label: "Caption layout",
|
|
344
|
+
description: "The layout of the caption",
|
|
345
|
+
controlType: "DROP_DOWN",
|
|
346
|
+
options: [
|
|
347
|
+
{ label: "Dropdown", value: "dropdown" },
|
|
348
|
+
{ label: "Label", value: "label" },
|
|
349
|
+
],
|
|
350
|
+
}),
|
|
351
|
+
numberOfMonths: Prop.number().propertiesPanel({
|
|
352
|
+
label: "Number of months",
|
|
353
|
+
description: "Number of months to display in the calendar",
|
|
354
|
+
}),
|
|
355
|
+
}),
|
|
356
|
+
interaction: Section.category(PropsCategory.Interaction).children({
|
|
357
|
+
disabled: Prop.boolean().propertiesPanel({
|
|
358
|
+
label: "Disabled",
|
|
359
|
+
description: "Disables user interaction with this component",
|
|
360
|
+
controlType: "SWITCH",
|
|
361
|
+
}),
|
|
362
|
+
}),
|
|
363
|
+
events: Section.category(PropsCategory.EventHandlers).children({
|
|
364
|
+
onValueChange: Prop.eventHandler().propertiesPanel({
|
|
365
|
+
label: "onValueChange",
|
|
366
|
+
description: "Event handler called when the date range changes",
|
|
367
|
+
computedArgs: [
|
|
368
|
+
[
|
|
369
|
+
{
|
|
370
|
+
type: "string",
|
|
371
|
+
name: "from",
|
|
372
|
+
description: "The start date of the date range",
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
type: "string",
|
|
376
|
+
name: "to",
|
|
377
|
+
description: "The end date of the date range",
|
|
378
|
+
},
|
|
379
|
+
],
|
|
380
|
+
],
|
|
381
|
+
}),
|
|
382
|
+
}),
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
// Editor Template
|
|
386
|
+
// Editor Config
|
|
387
|
+
const editorConfig: EditorConfig = {
|
|
388
|
+
icon: "date-picker",
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// Register Component
|
|
392
|
+
registerComponent(DateRangePicker, propertiesDefinition).editorConfig(
|
|
393
|
+
editorConfig,
|
|
394
|
+
);
|
|
395
|
+
|
|
396
|
+
export { DateRangePicker };
|