@dfosco/storyboard-core 4.2.0-beta.2 → 4.2.0-beta.21
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/commandpalette.config.json +109 -24
- package/dist/storyboard-ui.css +1 -1
- package/dist/storyboard-ui.js +17379 -28568
- package/dist/storyboard-ui.js.map +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +5 -2
- package/scaffold/agents/prompt-agent.agent.md +181 -0
- package/scaffold/agents/terminal-agent.agent.md +351 -0
- package/scaffold/codex/config.toml +246 -0
- package/scaffold/manifest.json +5 -0
- package/scaffold/skills/canvas/SKILL.md +5 -4
- package/scaffold/skills/ship/SKILL.md +1 -1
- package/scaffold/storyboard.config.json +14 -1
- package/scaffold/toolbar.config.json +1 -1
- package/src/ActionMenuButton.jsx +100 -0
- package/src/AutosyncMenuButton.css +67 -0
- package/src/AutosyncMenuButton.jsx +241 -0
- package/src/BranchSelect.jsx +29 -0
- package/src/BranchSelect.module.css +30 -0
- package/src/CanvasAgentsMenu.jsx +87 -0
- package/src/CanvasCreateMenu.jsx +609 -0
- package/src/CanvasSnap.css +27 -0
- package/src/CanvasSnap.jsx +51 -0
- package/src/CanvasUndoRedo.css +36 -0
- package/src/CanvasUndoRedo.jsx +62 -0
- package/src/CanvasZoomControl.css +53 -0
- package/src/CanvasZoomControl.jsx +49 -0
- package/src/CanvasZoomToFit.css +18 -0
- package/src/CanvasZoomToFit.jsx +26 -0
- package/src/CommandMenu.css +8 -0
- package/src/CommandMenu.jsx +286 -0
- package/src/CommandPalette.jsx +35 -0
- package/src/CommandPaletteTrigger.jsx +25 -0
- package/src/CommentsMenuButton.jsx +38 -0
- package/src/CoreUIBar.css +47 -0
- package/src/CoreUIBar.jsx +855 -0
- package/src/CreateMenuButton.jsx +116 -0
- package/src/HideChromeTrigger.jsx +40 -0
- package/src/InspectorPanel.css +109 -0
- package/src/InspectorPanel.jsx +629 -0
- package/src/PwaInstallBanner.css +42 -0
- package/src/PwaInstallBanner.jsx +124 -0
- package/src/SidePanel.jsx +260 -0
- package/src/ThemeMenuButton.jsx +136 -0
- package/src/autosync/server.js +202 -5
- package/src/autosync/server.test.js +112 -0
- package/src/canvas/__tests__/agent-integration.test.js +593 -0
- package/src/canvas/__tests__/helpers/browser.js +95 -0
- package/src/canvas/__tests__/helpers/canvas-api.js +129 -0
- package/src/canvas/__tests__/helpers/perf.js +118 -0
- package/src/canvas/__tests__/helpers/setup.js +176 -0
- package/src/canvas/__tests__/helpers/tmux.js +130 -0
- package/src/canvas/__tests__/helpers/transcript.js +129 -0
- package/src/canvas/__tests__/terminal-integration.test.js +175 -0
- package/src/canvas/hot-pool.js +757 -0
- package/src/canvas/materializer.js +31 -0
- package/src/canvas/materializer.test.js +56 -0
- package/src/canvas/selectedWidgets.js +65 -7
- package/src/canvas/server.js +1801 -22
- package/src/canvas/server.test.js +239 -0
- package/src/canvas/terminal-config.js +331 -0
- package/src/canvas/terminal-registry.js +38 -0
- package/src/canvas/terminal-server.js +1037 -29
- package/src/canvas/writeGuard.js +51 -3
- package/src/canvasConfig.js +67 -1
- package/src/canvasConfig.test.js +79 -1
- package/src/cli/agent.js +85 -0
- package/src/cli/branch.js +232 -0
- package/src/cli/canvasAdd.js +59 -12
- package/src/cli/canvasBatch.js +98 -0
- package/src/cli/canvasBounds.js +1 -1
- package/src/cli/canvasRead.js +1 -1
- package/src/cli/canvasUpdate.js +179 -0
- package/src/cli/create.js +38 -14
- package/src/cli/dev.js +157 -83
- package/src/cli/exit.js +23 -24
- package/src/cli/index.js +55 -2
- package/src/cli/proxy.js +96 -37
- package/src/cli/schemas.js +22 -4
- package/src/cli/server.js +148 -25
- package/src/cli/serverUrl.js +8 -3
- package/src/cli/sessions.js +131 -5
- package/src/cli/setup.js +109 -11
- package/src/cli/terminal-commands.js +16 -8
- package/src/cli/terminal-messaging.js +231 -0
- package/src/cli/terminal-welcome.js +365 -33
- package/src/commandActions.js +1 -0
- package/src/commandPaletteConfig.js +9 -0
- package/src/comments/auth.js +2 -1
- package/src/comments/ui/AuthModal.jsx +114 -0
- package/src/comments/ui/CommentWindow.jsx +329 -0
- package/src/comments/ui/CommentsDrawer.jsx +102 -0
- package/src/comments/ui/Composer.jsx +64 -0
- package/src/comments/ui/authModal.test.js +1 -1
- package/src/comments/ui/commentWindow.js +16 -17
- package/src/comments/ui/commentsDrawer.js +25 -26
- package/src/comments/ui/composer.js +23 -24
- package/src/comments/ui/index.js +2 -3
- package/src/configSchema.js +59 -1
- package/src/configStore.js +161 -0
- package/src/core-ui-colors.css +12 -0
- package/src/devtools.js +17 -19
- package/src/devtools.test.js +18 -9
- package/src/featureFlags.js +12 -5
- package/src/fuzzySearch.test.js +10 -0
- package/src/index.js +14 -2
- package/src/lib/components/ui/alert/alert-action.jsx +11 -0
- package/src/lib/components/ui/alert/alert-description.jsx +11 -0
- package/src/lib/components/ui/alert/alert-title.jsx +11 -0
- package/src/lib/components/ui/alert/alert.jsx +25 -0
- package/src/lib/components/ui/alert/index.js +15 -15
- package/src/lib/components/ui/avatar/avatar-badge.jsx +22 -0
- package/src/lib/components/ui/avatar/avatar-fallback.jsx +18 -0
- package/src/lib/components/ui/avatar/avatar-group-count.jsx +19 -0
- package/src/lib/components/ui/avatar/avatar-group.jsx +19 -0
- package/src/lib/components/ui/avatar/avatar-image.jsx +15 -0
- package/src/lib/components/ui/avatar/avatar.jsx +19 -0
- package/src/lib/components/ui/avatar/index.js +20 -20
- package/src/lib/components/ui/badge/badge.jsx +31 -0
- package/src/lib/components/ui/badge/index.js +2 -2
- package/src/lib/components/ui/button/button.jsx +100 -0
- package/src/lib/components/ui/button/index.js +9 -9
- package/src/lib/components/ui/card/card-action.jsx +11 -0
- package/src/lib/components/ui/card/card-content.jsx +11 -0
- package/src/lib/components/ui/card/card-description.jsx +11 -0
- package/src/lib/components/ui/card/card-footer.jsx +11 -0
- package/src/lib/components/ui/card/card-header.jsx +19 -0
- package/src/lib/components/ui/card/card-title.jsx +11 -0
- package/src/lib/components/ui/card/card.jsx +17 -0
- package/src/lib/components/ui/card/index.js +23 -23
- package/src/lib/components/ui/checkbox/checkbox.jsx +29 -0
- package/src/lib/components/ui/checkbox/index.js +5 -5
- package/src/lib/components/ui/collapsible/collapsible-content.jsx +7 -0
- package/src/lib/components/ui/collapsible/collapsible-trigger.jsx +7 -0
- package/src/lib/components/ui/collapsible/collapsible.jsx +7 -0
- package/src/lib/components/ui/collapsible/index.js +11 -11
- package/src/lib/components/ui/dialog/dialog-close.jsx +7 -0
- package/src/lib/components/ui/dialog/dialog-content.jsx +34 -0
- package/src/lib/components/ui/dialog/dialog-description.jsx +15 -0
- package/src/lib/components/ui/dialog/dialog-footer.jsx +23 -0
- package/src/lib/components/ui/dialog/dialog-header.jsx +11 -0
- package/src/lib/components/ui/dialog/dialog-overlay.jsx +15 -0
- package/src/lib/components/ui/dialog/dialog-portal.jsx +4 -0
- package/src/lib/components/ui/dialog/dialog-title.jsx +15 -0
- package/src/lib/components/ui/dialog/dialog-trigger.jsx +7 -0
- package/src/lib/components/ui/dialog/dialog.jsx +4 -0
- package/src/lib/components/ui/dialog/index.js +32 -32
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-group.jsx +8 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.jsx +30 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-content.jsx +22 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.jsx +16 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group.jsx +7 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-item.jsx +20 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-label.jsx +17 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-portal.jsx +4 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.jsx +7 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.jsx +29 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.jsx +15 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.jsx +16 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.jsx +15 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.jsx +23 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub.jsx +4 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.jsx +7 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu.jsx +4 -0
- package/src/lib/components/ui/dropdown-menu/index.js +52 -52
- package/src/lib/components/ui/input/index.js +5 -5
- package/src/lib/components/ui/input/input.jsx +19 -0
- package/src/lib/components/ui/label/index.js +5 -5
- package/src/lib/components/ui/label/label.jsx +19 -0
- package/src/lib/components/ui/panel/index.js +21 -21
- package/src/lib/components/ui/panel/panel-body.jsx +11 -0
- package/src/lib/components/ui/panel/panel-close.jsx +16 -0
- package/src/lib/components/ui/panel/panel-content.jsx +29 -0
- package/src/lib/components/ui/panel/panel-footer.jsx +11 -0
- package/src/lib/components/ui/panel/panel-header.jsx +11 -0
- package/src/lib/components/ui/panel/panel-title.jsx +12 -0
- package/src/lib/components/ui/panel/panel.jsx +4 -0
- package/src/lib/components/ui/popover/index.js +26 -26
- package/src/lib/components/ui/popover/popover-close.jsx +7 -0
- package/src/lib/components/ui/popover/popover-content.jsx +22 -0
- package/src/lib/components/ui/popover/popover-description.jsx +11 -0
- package/src/lib/components/ui/popover/popover-header.jsx +11 -0
- package/src/lib/components/ui/popover/popover-portal.jsx +4 -0
- package/src/lib/components/ui/popover/popover-title.jsx +11 -0
- package/src/lib/components/ui/popover/popover-trigger.jsx +8 -0
- package/src/lib/components/ui/popover/popover.jsx +4 -0
- package/src/lib/components/ui/searchable-list.jsx +159 -0
- package/src/lib/components/ui/select/index.js +35 -35
- package/src/lib/components/ui/select/select-content.jsx +30 -0
- package/src/lib/components/ui/select/select-group-heading.jsx +17 -0
- package/src/lib/components/ui/select/select-group.jsx +15 -0
- package/src/lib/components/ui/select/select-item.jsx +26 -0
- package/src/lib/components/ui/select/select-label.jsx +11 -0
- package/src/lib/components/ui/select/select-portal.jsx +4 -0
- package/src/lib/components/ui/select/select-scroll-down-button.jsx +18 -0
- package/src/lib/components/ui/select/select-scroll-up-button.jsx +18 -0
- package/src/lib/components/ui/select/select-separator.jsx +15 -0
- package/src/lib/components/ui/select/select-trigger.jsx +25 -0
- package/src/lib/components/ui/select/select.jsx +4 -0
- package/src/lib/components/ui/separator/index.js +5 -5
- package/src/lib/components/ui/separator/separator.jsx +22 -0
- package/src/lib/components/ui/sheet/index.js +32 -32
- package/src/lib/components/ui/sheet/sheet-close.jsx +7 -0
- package/src/lib/components/ui/sheet/sheet-content.jsx +35 -0
- package/src/lib/components/ui/sheet/sheet-description.jsx +15 -0
- package/src/lib/components/ui/sheet/sheet-footer.jsx +11 -0
- package/src/lib/components/ui/sheet/sheet-header.jsx +11 -0
- package/src/lib/components/ui/sheet/sheet-overlay.jsx +15 -0
- package/src/lib/components/ui/sheet/sheet-portal.jsx +4 -0
- package/src/lib/components/ui/sheet/sheet-title.jsx +15 -0
- package/src/lib/components/ui/sheet/sheet-trigger.jsx +7 -0
- package/src/lib/components/ui/sheet/sheet.jsx +4 -0
- package/src/lib/components/ui/textarea/index.js +5 -5
- package/src/lib/components/ui/textarea/textarea.jsx +18 -0
- package/src/lib/components/ui/toggle/index.js +6 -9
- package/src/lib/components/ui/toggle/toggle.jsx +36 -0
- package/src/lib/components/ui/toggle-group/index.js +8 -8
- package/src/lib/components/ui/toggle-group/toggle-group-item.jsx +29 -0
- package/src/lib/components/ui/toggle-group/toggle-group.jsx +43 -0
- package/src/lib/components/ui/tooltip/index.js +3 -3
- package/src/lib/components/ui/tooltip/tooltip-content.jsx +21 -0
- package/src/lib/components/ui/tooltip/tooltip-trigger.jsx +23 -0
- package/src/lib/components/ui/tooltip/tooltip.jsx +11 -0
- package/src/lib/components/ui/trigger-button/index.js +3 -3
- package/src/lib/components/ui/trigger-button/trigger-button.css +38 -0
- package/src/lib/components/ui/trigger-button/trigger-button.jsx +63 -0
- package/src/logger/devLogger.js +238 -0
- package/src/logger/devLogger.test.js +193 -0
- package/src/modes.test.js +4 -4
- package/src/mountStoryboardCore.js +123 -27
- package/src/paletteProviders.js +3 -0
- package/src/paletteProviders.test.js +2 -2
- package/src/server/index.js +98 -36
- package/src/sidepanel.css +214 -0
- package/src/styles/tailwind.css +1 -1
- package/src/svelte-plugin-ui/__tests__/ModeSwitch.test.ts +8 -8
- package/src/svelte-plugin-ui/__tests__/ToolbarShell.test.ts +11 -10
- package/src/svelte-plugin-ui/components/Icon.css +11 -0
- package/src/svelte-plugin-ui/components/Icon.jsx +281 -0
- package/src/svelte-plugin-ui/components/ModeSwitch.css +90 -0
- package/src/svelte-plugin-ui/components/ModeSwitch.jsx +47 -0
- package/src/svelte-plugin-ui/components/ToolbarShell.css +80 -0
- package/src/svelte-plugin-ui/components/ToolbarShell.jsx +84 -0
- package/src/svelte-plugin-ui/components/Viewfinder.css +412 -0
- package/src/svelte-plugin-ui/components/Viewfinder.jsx +512 -0
- package/src/svelte-plugin-ui/mount.ts +12 -16
- package/src/toolRegistry.js +4 -4
- package/src/toolbarConfigStore.js +30 -0
- package/src/tools/handlers/autosync.js +1 -1
- package/src/tools/handlers/canvasAddWidget.js +1 -1
- package/src/tools/handlers/canvasAgents.js +19 -0
- package/src/tools/handlers/canvasToolbar.js +8 -8
- package/src/tools/handlers/commandPalette.js +9 -0
- package/src/tools/handlers/comments.js +1 -1
- package/src/tools/handlers/create.js +1 -1
- package/src/tools/handlers/devtools.js +16 -0
- package/src/tools/handlers/devtools.test.js +38 -0
- package/src/tools/handlers/flows.js +1 -1
- package/src/tools/handlers/hideChrome.js +9 -0
- package/src/tools/handlers/paletteTheme.js +35 -0
- package/src/tools/handlers/theme.js +1 -1
- package/src/tools/registry.js +4 -1
- package/src/tools/surfaces/commandList.js +3 -3
- package/src/tools/surfaces/mainToolbar.js +3 -3
- package/src/tools/surfaces/registry.js +4 -4
- package/src/ui/design-modes.ts +2 -2
- package/src/ui/viewfinder.ts +1 -1
- package/src/vite/server-plugin.js +242 -60
- package/src/workshop/features/createCanvas/CreateCanvasForm.jsx +260 -0
- package/src/workshop/features/createCanvas/index.js +1 -1
- package/src/workshop/features/createFlow/CreateFlowForm.jsx +334 -0
- package/src/workshop/features/createFlow/index.js +1 -1
- package/src/workshop/features/createPage/CreatePageForm.jsx +304 -0
- package/src/workshop/features/createPage/index.js +1 -1
- package/src/workshop/features/createPrototype/CreatePrototypeForm.jsx +289 -0
- package/src/workshop/features/createPrototype/index.js +1 -1
- package/src/workshop/features/createPrototype/server.js +98 -0
- package/src/workshop/features/createStory/CreateStoryForm.jsx +208 -0
- package/src/workshop/features/createStory/index.js +1 -1
- package/src/workshop/ui/WorkshopPanel.jsx +98 -0
- package/src/workshop/ui/mount.ts +1 -1
- package/src/worktree/port.js +48 -0
- package/src/worktree/serverRegistry.js +120 -0
- package/toolbar.config.json +93 -42
- package/widgets.config.json +580 -12
- package/src/ActionMenuButton.svelte +0 -119
- package/src/AutosyncMenuButton.svelte +0 -397
- package/src/CanvasCreateMenu.svelte +0 -295
- package/src/CanvasSnap.svelte +0 -87
- package/src/CanvasUndoRedo.svelte +0 -108
- package/src/CanvasZoomControl.svelte +0 -111
- package/src/CanvasZoomToFit.svelte +0 -52
- package/src/CommandMenu.svelte +0 -249
- package/src/CommandPalette.svelte +0 -33
- package/src/CommentsMenuButton.svelte +0 -53
- package/src/CoreUIBar.svelte +0 -847
- package/src/CreateMenuButton.svelte +0 -133
- package/src/DocPanel.svelte +0 -299
- package/src/InspectorPanel.svelte +0 -745
- package/src/PwaInstallBanner.svelte +0 -124
- package/src/SidePanel.svelte +0 -480
- package/src/ThemeMenuButton.svelte +0 -132
- package/src/comments/ui/AuthModal.svelte +0 -108
- package/src/comments/ui/CommentWindow.svelte +0 -333
- package/src/comments/ui/CommentsDrawer.svelte +0 -96
- package/src/comments/ui/Composer.svelte +0 -65
- package/src/lib/components/ui/alert/alert-action.svelte +0 -19
- package/src/lib/components/ui/alert/alert-description.svelte +0 -22
- package/src/lib/components/ui/alert/alert-title.svelte +0 -22
- package/src/lib/components/ui/alert/alert.svelte +0 -38
- package/src/lib/components/ui/avatar/avatar-badge.svelte +0 -25
- package/src/lib/components/ui/avatar/avatar-fallback.svelte +0 -20
- package/src/lib/components/ui/avatar/avatar-group-count.svelte +0 -22
- package/src/lib/components/ui/avatar/avatar-group.svelte +0 -22
- package/src/lib/components/ui/avatar/avatar-image.svelte +0 -17
- package/src/lib/components/ui/avatar/avatar.svelte +0 -24
- package/src/lib/components/ui/badge/badge.svelte +0 -44
- package/src/lib/components/ui/button/button.svelte +0 -108
- package/src/lib/components/ui/card/card-action.svelte +0 -21
- package/src/lib/components/ui/card/card-content.svelte +0 -19
- package/src/lib/components/ui/card/card-description.svelte +0 -19
- package/src/lib/components/ui/card/card-footer.svelte +0 -18
- package/src/lib/components/ui/card/card-header.svelte +0 -21
- package/src/lib/components/ui/card/card-title.svelte +0 -14
- package/src/lib/components/ui/card/card.svelte +0 -21
- package/src/lib/components/ui/checkbox/checkbox.svelte +0 -39
- package/src/lib/components/ui/collapsible/collapsible-content.svelte +0 -7
- package/src/lib/components/ui/collapsible/collapsible-trigger.svelte +0 -7
- package/src/lib/components/ui/collapsible/collapsible.svelte +0 -11
- package/src/lib/components/ui/dialog/dialog-close.svelte +0 -11
- package/src/lib/components/ui/dialog/dialog-content.svelte +0 -42
- package/src/lib/components/ui/dialog/dialog-description.svelte +0 -17
- package/src/lib/components/ui/dialog/dialog-footer.svelte +0 -29
- package/src/lib/components/ui/dialog/dialog-header.svelte +0 -19
- package/src/lib/components/ui/dialog/dialog-overlay.svelte +0 -17
- package/src/lib/components/ui/dialog/dialog-portal.svelte +0 -7
- package/src/lib/components/ui/dialog/dialog-title.svelte +0 -17
- package/src/lib/components/ui/dialog/dialog-trigger.svelte +0 -11
- package/src/lib/components/ui/dialog/dialog.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +0 -16
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +0 -40
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte +0 -27
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +0 -18
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte +0 -24
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte +0 -20
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-portal.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +0 -16
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +0 -34
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte +0 -17
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +0 -19
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +0 -17
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +0 -27
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu.svelte +0 -7
- package/src/lib/components/ui/input/input.svelte +0 -40
- package/src/lib/components/ui/label/label.svelte +0 -20
- package/src/lib/components/ui/panel/panel-body.svelte +0 -13
- package/src/lib/components/ui/panel/panel-close.svelte +0 -16
- package/src/lib/components/ui/panel/panel-content.svelte +0 -33
- package/src/lib/components/ui/panel/panel-footer.svelte +0 -13
- package/src/lib/components/ui/panel/panel-header.svelte +0 -16
- package/src/lib/components/ui/panel/panel-title.svelte +0 -14
- package/src/lib/components/ui/panel/panel.svelte +0 -15
- package/src/lib/components/ui/popover/popover-close.svelte +0 -7
- package/src/lib/components/ui/popover/popover-content.svelte +0 -27
- package/src/lib/components/ui/popover/popover-description.svelte +0 -19
- package/src/lib/components/ui/popover/popover-header.svelte +0 -19
- package/src/lib/components/ui/popover/popover-portal.svelte +0 -7
- package/src/lib/components/ui/popover/popover-title.svelte +0 -19
- package/src/lib/components/ui/popover/popover-trigger.svelte +0 -17
- package/src/lib/components/ui/popover/popover.svelte +0 -7
- package/src/lib/components/ui/select/select-content.svelte +0 -40
- package/src/lib/components/ui/select/select-group-heading.svelte +0 -19
- package/src/lib/components/ui/select/select-group.svelte +0 -17
- package/src/lib/components/ui/select/select-item.svelte +0 -38
- package/src/lib/components/ui/select/select-label.svelte +0 -18
- package/src/lib/components/ui/select/select-portal.svelte +0 -7
- package/src/lib/components/ui/select/select-scroll-down-button.svelte +0 -20
- package/src/lib/components/ui/select/select-scroll-up-button.svelte +0 -20
- package/src/lib/components/ui/select/select-separator.svelte +0 -17
- package/src/lib/components/ui/select/select-trigger.svelte +0 -27
- package/src/lib/components/ui/select/select.svelte +0 -11
- package/src/lib/components/ui/separator/separator.svelte +0 -23
- package/src/lib/components/ui/sheet/sheet-close.svelte +0 -7
- package/src/lib/components/ui/sheet/sheet-content.svelte +0 -43
- package/src/lib/components/ui/sheet/sheet-description.svelte +0 -17
- package/src/lib/components/ui/sheet/sheet-footer.svelte +0 -18
- package/src/lib/components/ui/sheet/sheet-header.svelte +0 -19
- package/src/lib/components/ui/sheet/sheet-overlay.svelte +0 -17
- package/src/lib/components/ui/sheet/sheet-portal.svelte +0 -7
- package/src/lib/components/ui/sheet/sheet-title.svelte +0 -17
- package/src/lib/components/ui/sheet/sheet-trigger.svelte +0 -7
- package/src/lib/components/ui/sheet/sheet.svelte +0 -7
- package/src/lib/components/ui/textarea/textarea.svelte +0 -21
- package/src/lib/components/ui/toggle/toggle.svelte +0 -45
- package/src/lib/components/ui/toggle-group/toggle-group-item.svelte +0 -35
- package/src/lib/components/ui/toggle-group/toggle-group.svelte +0 -63
- package/src/lib/components/ui/tooltip/tooltip-content.svelte +0 -24
- package/src/lib/components/ui/tooltip/tooltip-trigger.svelte +0 -27
- package/src/lib/components/ui/tooltip/tooltip.svelte +0 -9
- package/src/lib/components/ui/trigger-button/trigger-button.svelte +0 -106
- package/src/svelte-plugin-ui/components/Icon.svelte +0 -181
- package/src/svelte-plugin-ui/components/ModeSwitch.svelte +0 -121
- package/src/svelte-plugin-ui/components/ToolbarShell.svelte +0 -150
- package/src/svelte-plugin-ui/components/Viewfinder.svelte +0 -1001
- package/src/tools/handlers/docs.js +0 -11
- package/src/workshop/features/createCanvas/CreateCanvasForm.svelte +0 -139
- package/src/workshop/features/createFlow/CreateFlowForm.svelte +0 -314
- package/src/workshop/features/createPage/CreatePageForm.svelte +0 -249
- package/src/workshop/features/createPrototype/CreatePrototypeForm.svelte +0 -287
- package/src/workshop/features/createStory/CreateStoryForm.svelte +0 -161
- package/src/workshop/ui/WorkshopPanel.svelte +0 -97
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Composer — inline comment textarea at click position.
|
|
3
|
-
Uses shadcn Textarea, Button, Avatar.
|
|
4
|
-
-->
|
|
5
|
-
|
|
6
|
-
<script lang="ts">
|
|
7
|
-
import { Button } from '../../lib/components/ui/button/index.js'
|
|
8
|
-
import { Textarea } from '../../lib/components/ui/textarea/index.js'
|
|
9
|
-
import * as Avatar from '../../lib/components/ui/avatar/index.js'
|
|
10
|
-
import { saveDraft, getDraft, clearDraft, composerDraftKey } from '../commentDrafts.js'
|
|
11
|
-
|
|
12
|
-
interface Props {
|
|
13
|
-
user?: { login: string; avatarUrl: string } | null
|
|
14
|
-
route?: string
|
|
15
|
-
onCancel?: () => void
|
|
16
|
-
onSubmit?: (text: string) => void
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
let { user = null, route = '', onCancel, onSubmit }: Props = $props()
|
|
20
|
-
const draftKey = $derived(composerDraftKey(route))
|
|
21
|
-
// svelte-ignore state_referenced_locally
|
|
22
|
-
let text = $state(getDraft(draftKey)?.text ?? '')
|
|
23
|
-
|
|
24
|
-
function submit() {
|
|
25
|
-
const val = text.trim()
|
|
26
|
-
if (!val) return
|
|
27
|
-
onSubmit?.(val)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function cancel() {
|
|
31
|
-
onCancel?.()
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function handleBlur() {
|
|
35
|
-
if (text.trim()) {
|
|
36
|
-
saveDraft(draftKey, { type: 'comment', text })
|
|
37
|
-
} else {
|
|
38
|
-
clearDraft(draftKey)
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function handleKeydown(e: KeyboardEvent) {
|
|
43
|
-
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); submit() }
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
48
|
-
<div class="flex flex-col font-sans" onkeydown={handleKeydown}>
|
|
49
|
-
{#if user}
|
|
50
|
-
<div class="flex items-center px-3 pt-2 gap-2">
|
|
51
|
-
<Avatar.Root class="h-5 w-5">
|
|
52
|
-
<Avatar.Image src={user.avatarUrl} alt={user.login} />
|
|
53
|
-
<Avatar.Fallback class="text-[10px]">{user.login[0]?.toUpperCase()}</Avatar.Fallback>
|
|
54
|
-
</Avatar.Root>
|
|
55
|
-
<span class="text-xs text-muted-foreground font-medium">{user.login}</span>
|
|
56
|
-
</div>
|
|
57
|
-
{/if}
|
|
58
|
-
<div class="px-3 pt-3">
|
|
59
|
-
<Textarea class="min-h-[60px] max-h-[160px] resize-y text-sm" placeholder="Leave a comment…" bind:value={text} onblur={handleBlur} />
|
|
60
|
-
</div>
|
|
61
|
-
<div class="flex items-center justify-end p-3 gap-1">
|
|
62
|
-
<Button variant="outline" size="sm" class="border border-input text-foreground" onclick={cancel}>Cancel</Button>
|
|
63
|
-
<Button size="sm" onclick={submit}>Comment</Button>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="alert-action"
|
|
15
|
-
class={cn("absolute top-2 right-2", className)}
|
|
16
|
-
{...restProps}
|
|
17
|
-
>
|
|
18
|
-
{@render children?.()}
|
|
19
|
-
</div>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="alert-description"
|
|
15
|
-
class={cn(
|
|
16
|
-
"text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...restProps}
|
|
20
|
-
>
|
|
21
|
-
{@render children?.()}
|
|
22
|
-
</div>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="alert-title"
|
|
15
|
-
class={cn(
|
|
16
|
-
"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...restProps}
|
|
20
|
-
>
|
|
21
|
-
{@render children?.()}
|
|
22
|
-
</div>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { tv } from "tailwind-variants";
|
|
3
|
-
|
|
4
|
-
export const alertVariants = tv({
|
|
5
|
-
base: "grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full",
|
|
6
|
-
variants: {
|
|
7
|
-
variant: {
|
|
8
|
-
default: "bg-card text-card-foreground",
|
|
9
|
-
destructive: "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
defaultVariants: {
|
|
13
|
-
variant: "default",
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import { cn } from "../../../utils/index.js";
|
|
20
|
-
|
|
21
|
-
let {
|
|
22
|
-
ref = $bindable(null),
|
|
23
|
-
class: className,
|
|
24
|
-
variant = "default",
|
|
25
|
-
children,
|
|
26
|
-
...restProps
|
|
27
|
-
} = $props();
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<div
|
|
31
|
-
bind:this={ref}
|
|
32
|
-
data-slot="alert"
|
|
33
|
-
role="alert"
|
|
34
|
-
class={cn(alertVariants({ variant }), className)}
|
|
35
|
-
{...restProps}
|
|
36
|
-
>
|
|
37
|
-
{@render children?.()}
|
|
38
|
-
</div>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<span
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="avatar-badge"
|
|
15
|
-
class={cn(
|
|
16
|
-
"bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none",
|
|
17
|
-
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
18
|
-
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
19
|
-
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
{...restProps}
|
|
23
|
-
>
|
|
24
|
-
{@render children?.()}
|
|
25
|
-
</span>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Avatar as AvatarPrimitive } from "bits-ui";
|
|
3
|
-
import { cn } from "../../../utils/index.js";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<AvatarPrimitive.Fallback
|
|
13
|
-
bind:ref
|
|
14
|
-
data-slot="avatar-fallback"
|
|
15
|
-
class={cn(
|
|
16
|
-
"bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...restProps}
|
|
20
|
-
/>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="avatar-group-count"
|
|
15
|
-
class={cn(
|
|
16
|
-
"bg-muted text-muted-foreground size-8 rounded-full text-sm group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 ring-background relative flex shrink-0 items-center justify-center ring-2",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...restProps}
|
|
20
|
-
>
|
|
21
|
-
{@render children?.()}
|
|
22
|
-
</div>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="avatar-group"
|
|
15
|
-
class={cn(
|
|
16
|
-
"cn-avatar-group *:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...restProps}
|
|
20
|
-
>
|
|
21
|
-
{@render children?.()}
|
|
22
|
-
</div>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Avatar as AvatarPrimitive } from "bits-ui";
|
|
3
|
-
import { cn } from "../../../utils/index.js";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<AvatarPrimitive.Image
|
|
13
|
-
bind:ref
|
|
14
|
-
data-slot="avatar-image"
|
|
15
|
-
class={cn("rounded-full aspect-square size-full object-cover", className)}
|
|
16
|
-
{...restProps}
|
|
17
|
-
/>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Avatar as AvatarPrimitive } from "bits-ui";
|
|
3
|
-
import { cn } from "../../../utils/index.js";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
loadingStatus = $bindable("loading"),
|
|
8
|
-
size = "default",
|
|
9
|
-
class: className,
|
|
10
|
-
...restProps
|
|
11
|
-
} = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<AvatarPrimitive.Root
|
|
15
|
-
bind:ref
|
|
16
|
-
bind:loadingStatus
|
|
17
|
-
data-slot="avatar"
|
|
18
|
-
data-size={size}
|
|
19
|
-
class={cn(
|
|
20
|
-
"size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6 after:border-border group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:border after:mix-blend-darken dark:after:mix-blend-lighten",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...restProps}
|
|
24
|
-
/>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { tv } from "tailwind-variants";
|
|
3
|
-
|
|
4
|
-
export const badgeVariants = tv({
|
|
5
|
-
base: "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none",
|
|
6
|
-
variants: {
|
|
7
|
-
variant: {
|
|
8
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
9
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
10
|
-
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
|
|
11
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
12
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
13
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: "default",
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import { cn } from "../../../utils/index.js";
|
|
24
|
-
|
|
25
|
-
let {
|
|
26
|
-
ref = $bindable(null),
|
|
27
|
-
href,
|
|
28
|
-
class: className,
|
|
29
|
-
variant = "default",
|
|
30
|
-
children,
|
|
31
|
-
...restProps
|
|
32
|
-
} = $props();
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<svelte:element
|
|
36
|
-
this={href ? "a" : "span"}
|
|
37
|
-
bind:this={ref}
|
|
38
|
-
data-slot="badge"
|
|
39
|
-
{href}
|
|
40
|
-
class={cn(badgeVariants({ variant }), className)}
|
|
41
|
-
{...restProps}
|
|
42
|
-
>
|
|
43
|
-
{@render children?.()}
|
|
44
|
-
</svelte:element>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
import { tv } from "tailwind-variants";
|
|
4
|
-
|
|
5
|
-
export const buttonVariants = tv({
|
|
6
|
-
base: "focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 rounded-lg font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex size-full shrink-0 items-center justify-center whitespace-nowrap transition-colors outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
10
|
-
outline: "bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
11
|
-
trigger: "focus-visible:ring-0",
|
|
12
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
13
|
-
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
14
|
-
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive dark:hover:bg-destructive/30",
|
|
15
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
default: "text-sm gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
19
|
-
xs: "text-xs gap-1 rounded-[min(var(--sb--radius-md),10px)] px-2 in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
20
|
-
sm: "text-[0.8rem] gap-1 rounded-[min(var(--sb--radius-md),12px)] px-2.5 in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
21
|
-
lg: "text-sm gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
22
|
-
xl: "text-base gap-2 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-5",
|
|
23
|
-
"2xl": "text-lg gap-2.5 px-5 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4 [&_svg:not([class*='size-'])]:size-6",
|
|
24
|
-
icon: "text-sm",
|
|
25
|
-
"icon-xs": "text-xs rounded-[min(var(--sb--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
26
|
-
"icon-sm": "text-[0.8rem] rounded-[min(var(--sb--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
27
|
-
"icon-lg": "text-sm",
|
|
28
|
-
"icon-xl": "text-base [&_svg:not([class*='size-'])]:size-5",
|
|
29
|
-
"icon-2xl": "text-lg [&_svg:not([class*='size-'])]:size-6",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
variant: "default",
|
|
34
|
-
size: "default",
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export const wrapperVariants = tv({
|
|
39
|
-
base: "inline-flex shrink-0 transition-transform",
|
|
40
|
-
variants: {
|
|
41
|
-
size: {
|
|
42
|
-
default: "h-8",
|
|
43
|
-
xs: "h-6 rounded-[min(var(--sb--radius-md),10px)] in-data-[slot=button-group]:rounded-lg",
|
|
44
|
-
sm: "h-7 rounded-[min(var(--sb--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
45
|
-
lg: "h-9",
|
|
46
|
-
xl: "h-11",
|
|
47
|
-
"2xl": "h-14",
|
|
48
|
-
icon: "size-8",
|
|
49
|
-
"icon-xs": "size-6 rounded-[min(var(--sb--radius-md),10px)] in-data-[slot=button-group]:rounded-lg",
|
|
50
|
-
"icon-sm": "size-7 rounded-[min(var(--sb--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
51
|
-
"icon-lg": "size-9",
|
|
52
|
-
"icon-xl": "size-11",
|
|
53
|
-
"icon-2xl": "size-14",
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
defaultVariants: {
|
|
57
|
-
size: "default",
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<script>
|
|
64
|
-
let {
|
|
65
|
-
class: className,
|
|
66
|
-
wrapperClass = "",
|
|
67
|
-
variant = "default",
|
|
68
|
-
size = "default",
|
|
69
|
-
ref = $bindable(null),
|
|
70
|
-
href = undefined,
|
|
71
|
-
type = "button",
|
|
72
|
-
disabled,
|
|
73
|
-
children,
|
|
74
|
-
...restProps
|
|
75
|
-
} = $props();
|
|
76
|
-
</script>
|
|
77
|
-
|
|
78
|
-
<span
|
|
79
|
-
data-slot="button-wrapper"
|
|
80
|
-
class={cn(wrapperVariants({ size }), wrapperClass)}
|
|
81
|
-
style="background: var(--sb--sc-border-color, transparent); padding: var(--sb--sc-border-width, 0px);"
|
|
82
|
-
>
|
|
83
|
-
{#if href}
|
|
84
|
-
<a
|
|
85
|
-
bind:this={ref}
|
|
86
|
-
class={cn(buttonVariants({ variant, size }), className)}
|
|
87
|
-
href={disabled ? undefined : href}
|
|
88
|
-
aria-disabled={disabled}
|
|
89
|
-
role={disabled ? "link" : undefined}
|
|
90
|
-
tabindex={disabled ? -1 : undefined}
|
|
91
|
-
{...restProps}
|
|
92
|
-
data-slot="button"
|
|
93
|
-
>
|
|
94
|
-
{@render children?.()}
|
|
95
|
-
</a>
|
|
96
|
-
{:else}
|
|
97
|
-
<button
|
|
98
|
-
bind:this={ref}
|
|
99
|
-
class={cn(buttonVariants({ variant, size }), className)}
|
|
100
|
-
{type}
|
|
101
|
-
{disabled}
|
|
102
|
-
{...restProps}
|
|
103
|
-
data-slot="button"
|
|
104
|
-
>
|
|
105
|
-
{@render children?.()}
|
|
106
|
-
</button>
|
|
107
|
-
{/if}
|
|
108
|
-
</span>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
let {
|
|
4
|
-
ref = $bindable(null),
|
|
5
|
-
class: className,
|
|
6
|
-
children,
|
|
7
|
-
...restProps
|
|
8
|
-
} = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
bind:this={ref}
|
|
13
|
-
data-slot="card-action"
|
|
14
|
-
class={cn(
|
|
15
|
-
"cn-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...restProps}
|
|
19
|
-
>
|
|
20
|
-
{@render children?.()}
|
|
21
|
-
</div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="card-content"
|
|
15
|
-
class={cn("px-4 group-data-[size=sm]/card:px-3", className)}
|
|
16
|
-
{...restProps}
|
|
17
|
-
>
|
|
18
|
-
{@render children?.()}
|
|
19
|
-
</div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<p
|
|
13
|
-
bind:this={ref}
|
|
14
|
-
data-slot="card-description"
|
|
15
|
-
class={cn("text-muted-foreground text-sm", className)}
|
|
16
|
-
{...restProps}
|
|
17
|
-
>
|
|
18
|
-
{@render children?.()}
|
|
19
|
-
</p>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
let {
|
|
4
|
-
ref = $bindable(null),
|
|
5
|
-
class: className,
|
|
6
|
-
children,
|
|
7
|
-
...restProps
|
|
8
|
-
} = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
bind:this={ref}
|
|
13
|
-
data-slot="card-footer"
|
|
14
|
-
class={cn("bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center", className)}
|
|
15
|
-
{...restProps}
|
|
16
|
-
>
|
|
17
|
-
{@render children?.()}
|
|
18
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
let {
|
|
4
|
-
ref = $bindable(null),
|
|
5
|
-
class: className,
|
|
6
|
-
children,
|
|
7
|
-
...restProps
|
|
8
|
-
} = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
bind:this={ref}
|
|
13
|
-
data-slot="card-header"
|
|
14
|
-
class={cn(
|
|
15
|
-
"gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...restProps}
|
|
19
|
-
>
|
|
20
|
-
{@render children?.()}
|
|
21
|
-
</div>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
...restProps
|
|
9
|
-
} = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div bind:this={ref} data-slot="card-title" class={cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className)} {...restProps}>
|
|
13
|
-
{@render children?.()}
|
|
14
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { cn } from "../../../utils/index.js";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
class: className,
|
|
7
|
-
children,
|
|
8
|
-
size = "default",
|
|
9
|
-
...restProps
|
|
10
|
-
} = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<div
|
|
14
|
-
bind:this={ref}
|
|
15
|
-
data-slot="card"
|
|
16
|
-
data-size={size}
|
|
17
|
-
class={cn("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", className)}
|
|
18
|
-
{...restProps}
|
|
19
|
-
>
|
|
20
|
-
{@render children?.()}
|
|
21
|
-
</div>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Checkbox as CheckboxPrimitive } from "bits-ui";
|
|
3
|
-
import { cn } from "../../../utils/index.js";
|
|
4
|
-
import CheckIcon from '@lucide/svelte/icons/check';
|
|
5
|
-
import MinusIcon from '@lucide/svelte/icons/minus';
|
|
6
|
-
|
|
7
|
-
let {
|
|
8
|
-
ref = $bindable(null),
|
|
9
|
-
checked = $bindable(false),
|
|
10
|
-
indeterminate = $bindable(false),
|
|
11
|
-
class: className,
|
|
12
|
-
...restProps
|
|
13
|
-
} = $props();
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<CheckboxPrimitive.Root
|
|
17
|
-
bind:ref
|
|
18
|
-
data-slot="checkbox"
|
|
19
|
-
class={cn(
|
|
20
|
-
"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
bind:checked
|
|
24
|
-
bind:indeterminate
|
|
25
|
-
{...restProps}
|
|
26
|
-
>
|
|
27
|
-
{#snippet children({ checked, indeterminate })}
|
|
28
|
-
<div
|
|
29
|
-
data-slot="checkbox-indicator"
|
|
30
|
-
class="[&>svg]:size-3.5 grid place-content-center text-current transition-none"
|
|
31
|
-
>
|
|
32
|
-
{#if checked}
|
|
33
|
-
<CheckIcon />
|
|
34
|
-
{:else if indeterminate}
|
|
35
|
-
<MinusIcon />
|
|
36
|
-
{/if}
|
|
37
|
-
</div>
|
|
38
|
-
{/snippet}
|
|
39
|
-
</CheckboxPrimitive.Root>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Collapsible as CollapsiblePrimitive } from "bits-ui";
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
ref = $bindable(null),
|
|
6
|
-
open = $bindable(false),
|
|
7
|
-
...restProps
|
|
8
|
-
} = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<CollapsiblePrimitive.Root bind:ref bind:open data-slot="collapsible" {...restProps} />
|