@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,119 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
ActionMenuButton — generic config-driven dropdown menu button.
|
|
3
|
-
|
|
4
|
-
Renders a standalone toolbar button whose items come from the
|
|
5
|
-
command action registry (via getActionChildren). This is the
|
|
6
|
-
standalone equivalent of CommandMenu's submenu rendering — any
|
|
7
|
-
menu declared in toolbar.config.json with an "action" reference
|
|
8
|
-
gets rendered by this component.
|
|
9
|
-
|
|
10
|
-
Supports child types: default, toggle, radio.
|
|
11
|
-
Radio groups use RadioGroup/RadioItem with a check indicator.
|
|
12
|
-
-->
|
|
13
|
-
|
|
14
|
-
<script lang="ts">
|
|
15
|
-
import { TriggerButton } from './lib/components/ui/trigger-button/index.js'
|
|
16
|
-
import * as DropdownMenu from './lib/components/ui/dropdown-menu/index.js'
|
|
17
|
-
import Icon from './svelte-plugin-ui/components/Icon.svelte'
|
|
18
|
-
import { getActionChildren, subscribeToCommandActions } from './commandActions.js'
|
|
19
|
-
|
|
20
|
-
interface Props {
|
|
21
|
-
config?: {
|
|
22
|
-
ariaLabel?: string
|
|
23
|
-
icon?: string
|
|
24
|
-
meta?: Record<string, any>
|
|
25
|
-
label?: string
|
|
26
|
-
action?: string
|
|
27
|
-
}
|
|
28
|
-
data?: any
|
|
29
|
-
localOnly?: boolean
|
|
30
|
-
tabindex?: number
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
let { config = {}, data, localOnly, tabindex = -1 }: Props = $props()
|
|
34
|
-
|
|
35
|
-
let menuOpen = $state(false)
|
|
36
|
-
let actionsVersion = $state(0)
|
|
37
|
-
|
|
38
|
-
$effect(() => {
|
|
39
|
-
const unsub = subscribeToCommandActions(() => { actionsVersion++ })
|
|
40
|
-
return unsub
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
const children = $derived.by(() => {
|
|
44
|
-
void actionsVersion
|
|
45
|
-
if (!config.action) return []
|
|
46
|
-
return getActionChildren(config.action)
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
const hasRadio = $derived(children.some((c: any) => c.type === 'radio'))
|
|
50
|
-
const activeValue = $derived(children.find((c: any) => c.type === 'radio' && c.active)?.id || '')
|
|
51
|
-
|
|
52
|
-
function handleOpenChange(open: boolean) {
|
|
53
|
-
if (open) actionsVersion++
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
{#if children.length > 0}
|
|
58
|
-
<DropdownMenu.Root bind:open={menuOpen} onOpenChange={handleOpenChange}>
|
|
59
|
-
<DropdownMenu.Trigger>
|
|
60
|
-
{#snippet child({ props })}
|
|
61
|
-
<TriggerButton
|
|
62
|
-
active={menuOpen}
|
|
63
|
-
size="icon-xl"
|
|
64
|
-
aria-label={config.ariaLabel || config.label || 'Menu'}
|
|
65
|
-
{tabindex}
|
|
66
|
-
{...props}
|
|
67
|
-
>
|
|
68
|
-
<Icon name={config.icon || 'primer/gear'} size={16} {...(config.meta || {})} />
|
|
69
|
-
</TriggerButton>
|
|
70
|
-
{/snippet}
|
|
71
|
-
</DropdownMenu.Trigger>
|
|
72
|
-
|
|
73
|
-
<DropdownMenu.Content side="top" align="end" sideOffset={16} style={config.menuWidth ? `min-width: ${config.menuWidth}` : undefined} class={config.menuWidth ? '' : 'min-w-[200px]'}>
|
|
74
|
-
{#if config.label}
|
|
75
|
-
<DropdownMenu.Label>{config.label}</DropdownMenu.Label>
|
|
76
|
-
{/if}
|
|
77
|
-
|
|
78
|
-
{#if hasRadio}
|
|
79
|
-
<DropdownMenu.RadioGroup value={activeValue}>
|
|
80
|
-
{#each children as child (child.id || child.label)}
|
|
81
|
-
{#if child.type === 'radio'}
|
|
82
|
-
<DropdownMenu.RadioItem
|
|
83
|
-
value={child.id}
|
|
84
|
-
onclick={(e) => {
|
|
85
|
-
if (child.href && (e.metaKey || e.ctrlKey)) {
|
|
86
|
-
e.preventDefault(); window.open(child.href, '_blank'); menuOpen = false; return
|
|
87
|
-
}
|
|
88
|
-
if (child.execute) child.execute(); menuOpen = false
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
{child.label}
|
|
92
|
-
</DropdownMenu.RadioItem>
|
|
93
|
-
{/if}
|
|
94
|
-
{/each}
|
|
95
|
-
</DropdownMenu.RadioGroup>
|
|
96
|
-
{:else}
|
|
97
|
-
{#each children as child (child.id || child.label)}
|
|
98
|
-
{#if child.type === 'toggle'}
|
|
99
|
-
<DropdownMenu.CheckboxItem
|
|
100
|
-
checked={child.active}
|
|
101
|
-
onSelect={(e) => { e.preventDefault(); if (child.execute) child.execute(); actionsVersion++ }}
|
|
102
|
-
>
|
|
103
|
-
{child.label}
|
|
104
|
-
</DropdownMenu.CheckboxItem>
|
|
105
|
-
{:else}
|
|
106
|
-
<DropdownMenu.Item onclick={(e) => {
|
|
107
|
-
if (child.href && (e.metaKey || e.ctrlKey)) {
|
|
108
|
-
e.preventDefault(); window.open(child.href, '_blank'); menuOpen = false; return
|
|
109
|
-
}
|
|
110
|
-
if (child.execute) child.execute(); menuOpen = false
|
|
111
|
-
}}>
|
|
112
|
-
{child.label}
|
|
113
|
-
</DropdownMenu.Item>
|
|
114
|
-
{/if}
|
|
115
|
-
{/each}
|
|
116
|
-
{/if}
|
|
117
|
-
</DropdownMenu.Content>
|
|
118
|
-
</DropdownMenu.Root>
|
|
119
|
-
{/if}
|
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
AutosyncMenuButton — toolbar dropdown for automatic git sync.
|
|
3
|
-
|
|
4
|
-
Provides branch selection, an enable/disable toggle, and live
|
|
5
|
-
status reporting. All git operations happen server-side via
|
|
6
|
-
/_storyboard/autosync/ API endpoints.
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
<script lang="ts">
|
|
10
|
-
import { onMount, onDestroy } from 'svelte'
|
|
11
|
-
import { TriggerButton } from './lib/components/ui/trigger-button/index.js'
|
|
12
|
-
import * as DropdownMenu from './lib/components/ui/dropdown-menu/index.js'
|
|
13
|
-
import Icon from './svelte-plugin-ui/components/Icon.svelte'
|
|
14
|
-
|
|
15
|
-
interface Props {
|
|
16
|
-
config?: {
|
|
17
|
-
ariaLabel?: string
|
|
18
|
-
icon?: string
|
|
19
|
-
meta?: Record<string, any>
|
|
20
|
-
label?: string
|
|
21
|
-
menuWidth?: string
|
|
22
|
-
}
|
|
23
|
-
basePath?: string
|
|
24
|
-
tabindex?: number
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let { config = {}, basePath = '/', tabindex = -1 }: Props = $props()
|
|
28
|
-
|
|
29
|
-
const apiBase = $derived((basePath === '/' ? '' : basePath.replace(/\/$/, '')) + '/_storyboard/autosync')
|
|
30
|
-
|
|
31
|
-
let menuOpen = $state(false)
|
|
32
|
-
let branches: string[] = $state([])
|
|
33
|
-
let currentBranch = $state('')
|
|
34
|
-
let selectedBranch = $state('')
|
|
35
|
-
let enabledScopes = $state<{ canvas: boolean; prototype: boolean }>({ canvas: false, prototype: false })
|
|
36
|
-
let lastSyncTime: string | null = $state(null)
|
|
37
|
-
let lastError: string | null = $state(null)
|
|
38
|
-
let lastErrorByScope = $state<{ canvas: string | null; prototype: string | null }>({ canvas: null, prototype: null })
|
|
39
|
-
let syncing = $state(false)
|
|
40
|
-
let syncingScope = $state<'canvas' | 'prototype' | null>(null)
|
|
41
|
-
let loading = $state(false)
|
|
42
|
-
|
|
43
|
-
let statusPollInterval: ReturnType<typeof setInterval> | null = null
|
|
44
|
-
|
|
45
|
-
function isProtectedBranch(name: string): boolean {
|
|
46
|
-
const normalized = String(name || '').toLowerCase()
|
|
47
|
-
return normalized === 'main' || normalized === 'master'
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async function fetchBranches() {
|
|
51
|
-
try {
|
|
52
|
-
const res = await fetch(`${apiBase}/branches`)
|
|
53
|
-
const data = await res.json()
|
|
54
|
-
branches = data.branches || []
|
|
55
|
-
currentBranch = data.current || ''
|
|
56
|
-
if (!selectedBranch || isProtectedBranch(selectedBranch) || !branches.includes(selectedBranch)) {
|
|
57
|
-
selectedBranch = branches.includes(currentBranch) ? currentBranch : (branches[0] || '')
|
|
58
|
-
}
|
|
59
|
-
} catch { /* ignore */ }
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function isScopeEnabled(target: 'canvas' | 'prototype') {
|
|
63
|
-
return enabledScopes[target] === true
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function hasEnabledScopes() {
|
|
67
|
-
return enabledScopes.canvas || enabledScopes.prototype
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function applyStatus(data: any) {
|
|
71
|
-
const wasEnabled = hasEnabledScopes()
|
|
72
|
-
const incomingScopes = data.enabledScopes
|
|
73
|
-
if (incomingScopes && typeof incomingScopes === 'object') {
|
|
74
|
-
enabledScopes = {
|
|
75
|
-
canvas: incomingScopes.canvas === true,
|
|
76
|
-
prototype: incomingScopes.prototype === true,
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
enabledScopes = {
|
|
80
|
-
canvas: data.enabled === true && data.scope === 'canvas',
|
|
81
|
-
prototype: data.enabled === true && data.scope === 'prototype',
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
currentBranch = data.branch || currentBranch
|
|
86
|
-
if (data.targetBranch) selectedBranch = data.targetBranch
|
|
87
|
-
lastSyncTime = data.lastSyncTime || null
|
|
88
|
-
lastError = data.lastError || null
|
|
89
|
-
syncing = data.syncing === true
|
|
90
|
-
syncingScope = data.syncingScope === 'prototype' || data.syncingScope === 'canvas'
|
|
91
|
-
? data.syncingScope
|
|
92
|
-
: null
|
|
93
|
-
|
|
94
|
-
const incomingErrorByScope = data.lastErrorByScope
|
|
95
|
-
if (incomingErrorByScope && typeof incomingErrorByScope === 'object') {
|
|
96
|
-
lastErrorByScope = {
|
|
97
|
-
canvas: incomingErrorByScope.canvas || null,
|
|
98
|
-
prototype: incomingErrorByScope.prototype || null,
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Manage polling based on enabled state
|
|
103
|
-
if (hasEnabledScopes() && !statusPollInterval) startPolling()
|
|
104
|
-
if (!hasEnabledScopes() && !menuOpen && wasEnabled) stopPolling()
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
async function fetchStatus() {
|
|
108
|
-
try {
|
|
109
|
-
const res = await fetch(`${apiBase}/status`)
|
|
110
|
-
const data = await res.json()
|
|
111
|
-
applyStatus(data)
|
|
112
|
-
} catch { /* ignore */ }
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async function setAutosyncScope(scope: 'canvas' | 'prototype', shouldEnable: boolean, e: Event) {
|
|
116
|
-
e.preventDefault()
|
|
117
|
-
loading = true
|
|
118
|
-
lastError = null
|
|
119
|
-
|
|
120
|
-
try {
|
|
121
|
-
if (shouldEnable && !selectedBranch) {
|
|
122
|
-
lastError = 'Select a non-main branch first'
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const res = await fetch(
|
|
127
|
-
shouldEnable ? `${apiBase}/enable` : `${apiBase}/disable`,
|
|
128
|
-
{
|
|
129
|
-
method: 'POST',
|
|
130
|
-
headers: { 'Content-Type': 'application/json' },
|
|
131
|
-
body: JSON.stringify(
|
|
132
|
-
shouldEnable
|
|
133
|
-
? { branch: selectedBranch, scope }
|
|
134
|
-
: { scope },
|
|
135
|
-
),
|
|
136
|
-
},
|
|
137
|
-
)
|
|
138
|
-
const data = await res.json()
|
|
139
|
-
if (!res.ok) {
|
|
140
|
-
lastError = data.error || (shouldEnable ? 'Failed to enable' : 'Failed to disable')
|
|
141
|
-
} else {
|
|
142
|
-
applyStatus(data)
|
|
143
|
-
}
|
|
144
|
-
} catch (err: any) {
|
|
145
|
-
lastError = err.message || 'Request failed'
|
|
146
|
-
} finally {
|
|
147
|
-
loading = false
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function handleBranchChange(e: Event) {
|
|
152
|
-
selectedBranch = (e.target as HTMLSelectElement).value
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function startPolling() {
|
|
156
|
-
if (statusPollInterval) return
|
|
157
|
-
statusPollInterval = setInterval(fetchStatus, 5000)
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function stopPolling() {
|
|
161
|
-
if (statusPollInterval) {
|
|
162
|
-
clearInterval(statusPollInterval)
|
|
163
|
-
statusPollInterval = null
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function handleOpenChange(open: boolean) {
|
|
168
|
-
menuOpen = open
|
|
169
|
-
if (open) {
|
|
170
|
-
fetchBranches()
|
|
171
|
-
fetchStatus()
|
|
172
|
-
startPolling()
|
|
173
|
-
} else if (!hasEnabledScopes()) {
|
|
174
|
-
stopPolling()
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function formatSyncTime(iso: string | null): string {
|
|
179
|
-
if (!iso) return ''
|
|
180
|
-
try {
|
|
181
|
-
return new Date(iso).toLocaleTimeString('en-US', {
|
|
182
|
-
hour: 'numeric',
|
|
183
|
-
minute: '2-digit',
|
|
184
|
-
hour12: true,
|
|
185
|
-
})
|
|
186
|
-
} catch {
|
|
187
|
-
return iso
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
onMount(() => {
|
|
192
|
-
fetchStatus()
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
onDestroy(() => {
|
|
196
|
-
stopPolling()
|
|
197
|
-
})
|
|
198
|
-
</script>
|
|
199
|
-
|
|
200
|
-
<DropdownMenu.Root bind:open={menuOpen} onOpenChange={handleOpenChange}>
|
|
201
|
-
<DropdownMenu.Trigger>
|
|
202
|
-
{#snippet child({ props })}
|
|
203
|
-
<TriggerButton
|
|
204
|
-
active={menuOpen || hasEnabledScopes()}
|
|
205
|
-
size="icon-xl"
|
|
206
|
-
aria-label={config.ariaLabel || 'Autosync'}
|
|
207
|
-
{tabindex}
|
|
208
|
-
{...props}
|
|
209
|
-
>
|
|
210
|
-
<Icon name={config.icon || 'primer/sync'} size={16} {...(config.meta || {})} />
|
|
211
|
-
</TriggerButton>
|
|
212
|
-
{/snippet}
|
|
213
|
-
</DropdownMenu.Trigger>
|
|
214
|
-
|
|
215
|
-
<DropdownMenu.Content
|
|
216
|
-
side="top"
|
|
217
|
-
align="end"
|
|
218
|
-
sideOffset={16}
|
|
219
|
-
style={config.menuWidth ? `min-width: ${config.menuWidth}` : undefined}
|
|
220
|
-
class="min-w-[280px]"
|
|
221
|
-
>
|
|
222
|
-
<p class="menuTitle">{config.label || 'Autosync'}</p>
|
|
223
|
-
|
|
224
|
-
<p class="description">
|
|
225
|
-
Automatically commit and push changes every 30s
|
|
226
|
-
</p>
|
|
227
|
-
|
|
228
|
-
<DropdownMenu.Separator />
|
|
229
|
-
|
|
230
|
-
<!-- Branch selector -->
|
|
231
|
-
<div class="branchRow">
|
|
232
|
-
<label class="branchLabel" for="autosync-branch">Branch</label>
|
|
233
|
-
<select
|
|
234
|
-
id="autosync-branch"
|
|
235
|
-
class="branchSelect"
|
|
236
|
-
value={selectedBranch}
|
|
237
|
-
onchange={handleBranchChange}
|
|
238
|
-
disabled={hasEnabledScopes() || loading}
|
|
239
|
-
>
|
|
240
|
-
{#if branches.length === 0}
|
|
241
|
-
<option value="" disabled selected>No non-main branches available</option>
|
|
242
|
-
{/if}
|
|
243
|
-
{#each branches as branch (branch)}
|
|
244
|
-
<option value={branch}>{branch}</option>
|
|
245
|
-
{/each}
|
|
246
|
-
</select>
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
<DropdownMenu.Separator />
|
|
250
|
-
|
|
251
|
-
<!-- Enable options -->
|
|
252
|
-
<DropdownMenu.CheckboxItem
|
|
253
|
-
checked={isScopeEnabled('canvas')}
|
|
254
|
-
onSelect={(e) => setAutosyncScope('canvas', !isScopeEnabled('canvas'), e)}
|
|
255
|
-
disabled={loading || (!isScopeEnabled('canvas') && !selectedBranch)}
|
|
256
|
-
>
|
|
257
|
-
{isScopeEnabled('canvas')
|
|
258
|
-
? 'Disable autosync for canvas changes'
|
|
259
|
-
: 'Enable autosync for canvas changes'}
|
|
260
|
-
</DropdownMenu.CheckboxItem>
|
|
261
|
-
<DropdownMenu.CheckboxItem
|
|
262
|
-
checked={isScopeEnabled('prototype')}
|
|
263
|
-
onSelect={(e) => setAutosyncScope('prototype', !isScopeEnabled('prototype'), e)}
|
|
264
|
-
disabled={loading || (!isScopeEnabled('prototype') && !selectedBranch)}
|
|
265
|
-
>
|
|
266
|
-
{isScopeEnabled('prototype')
|
|
267
|
-
? 'Disable autosync for prototype changes'
|
|
268
|
-
: 'Enable autosync for prototype changes'}
|
|
269
|
-
</DropdownMenu.CheckboxItem>
|
|
270
|
-
|
|
271
|
-
<!-- Status display -->
|
|
272
|
-
{#if hasEnabledScopes() || lastError || lastSyncTime || lastErrorByScope.canvas || lastErrorByScope.prototype}
|
|
273
|
-
<DropdownMenu.Separator />
|
|
274
|
-
<div class="statusRow">
|
|
275
|
-
{#if syncing && syncingScope}
|
|
276
|
-
<p class="scopeHint">Syncing <strong>{syncingScope}</strong> changes</p>
|
|
277
|
-
{/if}
|
|
278
|
-
{#if lastError}
|
|
279
|
-
<span class="statusError">⚠ {lastError}</span>
|
|
280
|
-
{/if}
|
|
281
|
-
{#if lastErrorByScope.canvas}
|
|
282
|
-
<span class="statusError">⚠ Canvas: {lastErrorByScope.canvas}</span>
|
|
283
|
-
{/if}
|
|
284
|
-
{#if lastErrorByScope.prototype}
|
|
285
|
-
<span class="statusError">⚠ Prototype: {lastErrorByScope.prototype}</span>
|
|
286
|
-
{/if}
|
|
287
|
-
{#if !syncing && lastSyncTime}
|
|
288
|
-
<span class="statusOk">Last sync: {formatSyncTime(lastSyncTime)}</span>
|
|
289
|
-
{/if}
|
|
290
|
-
</div>
|
|
291
|
-
{/if}
|
|
292
|
-
|
|
293
|
-
<DropdownMenu.Separator />
|
|
294
|
-
<p class="footer"><span class="footerDot"></span>Only available in dev environment</p>
|
|
295
|
-
</DropdownMenu.Content>
|
|
296
|
-
</DropdownMenu.Root>
|
|
297
|
-
|
|
298
|
-
<style>
|
|
299
|
-
.menuTitle {
|
|
300
|
-
font-size: 13px;
|
|
301
|
-
font-weight: 500;
|
|
302
|
-
color: var(--fgColor-default, #e6edf3);
|
|
303
|
-
padding: 6px 6px 0;
|
|
304
|
-
margin: 0;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.description {
|
|
308
|
-
font-size: 12px;
|
|
309
|
-
color: var(--fgColor-muted, #848d97);
|
|
310
|
-
padding: 0 6px 4px;
|
|
311
|
-
margin: 0;
|
|
312
|
-
line-height: 1.4;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.branchRow {
|
|
316
|
-
display: flex;
|
|
317
|
-
flex-direction: column;
|
|
318
|
-
gap: 6px;
|
|
319
|
-
padding: 6px 6px;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.branchLabel {
|
|
323
|
-
font-size: 13px;
|
|
324
|
-
font-weight: 500;
|
|
325
|
-
color: var(--fgColor-default, #e6edf3);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.branchSelect {
|
|
329
|
-
width: 100%;
|
|
330
|
-
appearance: none;
|
|
331
|
-
background-color: var(--bgColor-default, #0d1117);
|
|
332
|
-
color: var(--fgColor-default, #e6edf3);
|
|
333
|
-
border: 1px solid var(--borderColor-default, #30363d);
|
|
334
|
-
border-radius: 8px;
|
|
335
|
-
padding: 8px 32px 8px 12px;
|
|
336
|
-
font-size: 13px;
|
|
337
|
-
font-family: inherit;
|
|
338
|
-
cursor: pointer;
|
|
339
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23848d97'%3E%3Cpath d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
|
|
340
|
-
background-repeat: no-repeat;
|
|
341
|
-
background-position: right 10px center;
|
|
342
|
-
transition: border-color 0.15s ease;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.branchSelect:hover:not(:disabled) {
|
|
346
|
-
border-color: var(--fgColor-muted, #848d97);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.branchSelect:focus-visible {
|
|
350
|
-
outline: 2px solid var(--borderColor-accent-emphasis, #1f6feb);
|
|
351
|
-
outline-offset: -1px;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.branchSelect:disabled {
|
|
355
|
-
opacity: 0.5;
|
|
356
|
-
cursor: not-allowed;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.statusRow {
|
|
360
|
-
padding: 4px 6px 2px;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.scopeHint {
|
|
364
|
-
font-size: 11px;
|
|
365
|
-
color: var(--fgColor-muted, #848d97);
|
|
366
|
-
padding: 4px 0;
|
|
367
|
-
margin: 0;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.statusError {
|
|
371
|
-
font-size: 11px;
|
|
372
|
-
color: var(--fgColor-danger, #f85149);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.statusOk {
|
|
376
|
-
font-size: 11px;
|
|
377
|
-
color: var(--fgColor-muted, #848d97);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.footer {
|
|
381
|
-
display: flex;
|
|
382
|
-
align-items: center;
|
|
383
|
-
gap: 6px;
|
|
384
|
-
font-size: 12px;
|
|
385
|
-
color: var(--fgColor-muted, #848d97);
|
|
386
|
-
padding: 2px 6px 0;
|
|
387
|
-
margin: 0;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.footerDot {
|
|
391
|
-
width: 8px;
|
|
392
|
-
height: 8px;
|
|
393
|
-
background: hsl(212, 92%, 45%);
|
|
394
|
-
border-radius: 50%;
|
|
395
|
-
flex-shrink: 0;
|
|
396
|
-
}
|
|
397
|
-
</style>
|