@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.
Files changed (414) hide show
  1. package/commandpalette.config.json +109 -24
  2. package/dist/storyboard-ui.css +1 -1
  3. package/dist/storyboard-ui.js +17379 -28568
  4. package/dist/storyboard-ui.js.map +1 -1
  5. package/dist/tailwind.css +1 -1
  6. package/package.json +5 -2
  7. package/scaffold/agents/prompt-agent.agent.md +181 -0
  8. package/scaffold/agents/terminal-agent.agent.md +351 -0
  9. package/scaffold/codex/config.toml +246 -0
  10. package/scaffold/manifest.json +5 -0
  11. package/scaffold/skills/canvas/SKILL.md +5 -4
  12. package/scaffold/skills/ship/SKILL.md +1 -1
  13. package/scaffold/storyboard.config.json +14 -1
  14. package/scaffold/toolbar.config.json +1 -1
  15. package/src/ActionMenuButton.jsx +100 -0
  16. package/src/AutosyncMenuButton.css +67 -0
  17. package/src/AutosyncMenuButton.jsx +241 -0
  18. package/src/BranchSelect.jsx +29 -0
  19. package/src/BranchSelect.module.css +30 -0
  20. package/src/CanvasAgentsMenu.jsx +87 -0
  21. package/src/CanvasCreateMenu.jsx +609 -0
  22. package/src/CanvasSnap.css +27 -0
  23. package/src/CanvasSnap.jsx +51 -0
  24. package/src/CanvasUndoRedo.css +36 -0
  25. package/src/CanvasUndoRedo.jsx +62 -0
  26. package/src/CanvasZoomControl.css +53 -0
  27. package/src/CanvasZoomControl.jsx +49 -0
  28. package/src/CanvasZoomToFit.css +18 -0
  29. package/src/CanvasZoomToFit.jsx +26 -0
  30. package/src/CommandMenu.css +8 -0
  31. package/src/CommandMenu.jsx +286 -0
  32. package/src/CommandPalette.jsx +35 -0
  33. package/src/CommandPaletteTrigger.jsx +25 -0
  34. package/src/CommentsMenuButton.jsx +38 -0
  35. package/src/CoreUIBar.css +47 -0
  36. package/src/CoreUIBar.jsx +855 -0
  37. package/src/CreateMenuButton.jsx +116 -0
  38. package/src/HideChromeTrigger.jsx +40 -0
  39. package/src/InspectorPanel.css +109 -0
  40. package/src/InspectorPanel.jsx +629 -0
  41. package/src/PwaInstallBanner.css +42 -0
  42. package/src/PwaInstallBanner.jsx +124 -0
  43. package/src/SidePanel.jsx +260 -0
  44. package/src/ThemeMenuButton.jsx +136 -0
  45. package/src/autosync/server.js +202 -5
  46. package/src/autosync/server.test.js +112 -0
  47. package/src/canvas/__tests__/agent-integration.test.js +593 -0
  48. package/src/canvas/__tests__/helpers/browser.js +95 -0
  49. package/src/canvas/__tests__/helpers/canvas-api.js +129 -0
  50. package/src/canvas/__tests__/helpers/perf.js +118 -0
  51. package/src/canvas/__tests__/helpers/setup.js +176 -0
  52. package/src/canvas/__tests__/helpers/tmux.js +130 -0
  53. package/src/canvas/__tests__/helpers/transcript.js +129 -0
  54. package/src/canvas/__tests__/terminal-integration.test.js +175 -0
  55. package/src/canvas/hot-pool.js +757 -0
  56. package/src/canvas/materializer.js +31 -0
  57. package/src/canvas/materializer.test.js +56 -0
  58. package/src/canvas/selectedWidgets.js +65 -7
  59. package/src/canvas/server.js +1801 -22
  60. package/src/canvas/server.test.js +239 -0
  61. package/src/canvas/terminal-config.js +331 -0
  62. package/src/canvas/terminal-registry.js +38 -0
  63. package/src/canvas/terminal-server.js +1037 -29
  64. package/src/canvas/writeGuard.js +51 -3
  65. package/src/canvasConfig.js +67 -1
  66. package/src/canvasConfig.test.js +79 -1
  67. package/src/cli/agent.js +85 -0
  68. package/src/cli/branch.js +232 -0
  69. package/src/cli/canvasAdd.js +59 -12
  70. package/src/cli/canvasBatch.js +98 -0
  71. package/src/cli/canvasBounds.js +1 -1
  72. package/src/cli/canvasRead.js +1 -1
  73. package/src/cli/canvasUpdate.js +179 -0
  74. package/src/cli/create.js +38 -14
  75. package/src/cli/dev.js +157 -83
  76. package/src/cli/exit.js +23 -24
  77. package/src/cli/index.js +55 -2
  78. package/src/cli/proxy.js +96 -37
  79. package/src/cli/schemas.js +22 -4
  80. package/src/cli/server.js +148 -25
  81. package/src/cli/serverUrl.js +8 -3
  82. package/src/cli/sessions.js +131 -5
  83. package/src/cli/setup.js +109 -11
  84. package/src/cli/terminal-commands.js +16 -8
  85. package/src/cli/terminal-messaging.js +231 -0
  86. package/src/cli/terminal-welcome.js +365 -33
  87. package/src/commandActions.js +1 -0
  88. package/src/commandPaletteConfig.js +9 -0
  89. package/src/comments/auth.js +2 -1
  90. package/src/comments/ui/AuthModal.jsx +114 -0
  91. package/src/comments/ui/CommentWindow.jsx +329 -0
  92. package/src/comments/ui/CommentsDrawer.jsx +102 -0
  93. package/src/comments/ui/Composer.jsx +64 -0
  94. package/src/comments/ui/authModal.test.js +1 -1
  95. package/src/comments/ui/commentWindow.js +16 -17
  96. package/src/comments/ui/commentsDrawer.js +25 -26
  97. package/src/comments/ui/composer.js +23 -24
  98. package/src/comments/ui/index.js +2 -3
  99. package/src/configSchema.js +59 -1
  100. package/src/configStore.js +161 -0
  101. package/src/core-ui-colors.css +12 -0
  102. package/src/devtools.js +17 -19
  103. package/src/devtools.test.js +18 -9
  104. package/src/featureFlags.js +12 -5
  105. package/src/fuzzySearch.test.js +10 -0
  106. package/src/index.js +14 -2
  107. package/src/lib/components/ui/alert/alert-action.jsx +11 -0
  108. package/src/lib/components/ui/alert/alert-description.jsx +11 -0
  109. package/src/lib/components/ui/alert/alert-title.jsx +11 -0
  110. package/src/lib/components/ui/alert/alert.jsx +25 -0
  111. package/src/lib/components/ui/alert/index.js +15 -15
  112. package/src/lib/components/ui/avatar/avatar-badge.jsx +22 -0
  113. package/src/lib/components/ui/avatar/avatar-fallback.jsx +18 -0
  114. package/src/lib/components/ui/avatar/avatar-group-count.jsx +19 -0
  115. package/src/lib/components/ui/avatar/avatar-group.jsx +19 -0
  116. package/src/lib/components/ui/avatar/avatar-image.jsx +15 -0
  117. package/src/lib/components/ui/avatar/avatar.jsx +19 -0
  118. package/src/lib/components/ui/avatar/index.js +20 -20
  119. package/src/lib/components/ui/badge/badge.jsx +31 -0
  120. package/src/lib/components/ui/badge/index.js +2 -2
  121. package/src/lib/components/ui/button/button.jsx +100 -0
  122. package/src/lib/components/ui/button/index.js +9 -9
  123. package/src/lib/components/ui/card/card-action.jsx +11 -0
  124. package/src/lib/components/ui/card/card-content.jsx +11 -0
  125. package/src/lib/components/ui/card/card-description.jsx +11 -0
  126. package/src/lib/components/ui/card/card-footer.jsx +11 -0
  127. package/src/lib/components/ui/card/card-header.jsx +19 -0
  128. package/src/lib/components/ui/card/card-title.jsx +11 -0
  129. package/src/lib/components/ui/card/card.jsx +17 -0
  130. package/src/lib/components/ui/card/index.js +23 -23
  131. package/src/lib/components/ui/checkbox/checkbox.jsx +29 -0
  132. package/src/lib/components/ui/checkbox/index.js +5 -5
  133. package/src/lib/components/ui/collapsible/collapsible-content.jsx +7 -0
  134. package/src/lib/components/ui/collapsible/collapsible-trigger.jsx +7 -0
  135. package/src/lib/components/ui/collapsible/collapsible.jsx +7 -0
  136. package/src/lib/components/ui/collapsible/index.js +11 -11
  137. package/src/lib/components/ui/dialog/dialog-close.jsx +7 -0
  138. package/src/lib/components/ui/dialog/dialog-content.jsx +34 -0
  139. package/src/lib/components/ui/dialog/dialog-description.jsx +15 -0
  140. package/src/lib/components/ui/dialog/dialog-footer.jsx +23 -0
  141. package/src/lib/components/ui/dialog/dialog-header.jsx +11 -0
  142. package/src/lib/components/ui/dialog/dialog-overlay.jsx +15 -0
  143. package/src/lib/components/ui/dialog/dialog-portal.jsx +4 -0
  144. package/src/lib/components/ui/dialog/dialog-title.jsx +15 -0
  145. package/src/lib/components/ui/dialog/dialog-trigger.jsx +7 -0
  146. package/src/lib/components/ui/dialog/dialog.jsx +4 -0
  147. package/src/lib/components/ui/dialog/index.js +32 -32
  148. package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-group.jsx +8 -0
  149. package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.jsx +30 -0
  150. package/src/lib/components/ui/dropdown-menu/dropdown-menu-content.jsx +22 -0
  151. package/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.jsx +16 -0
  152. package/src/lib/components/ui/dropdown-menu/dropdown-menu-group.jsx +7 -0
  153. package/src/lib/components/ui/dropdown-menu/dropdown-menu-item.jsx +20 -0
  154. package/src/lib/components/ui/dropdown-menu/dropdown-menu-label.jsx +17 -0
  155. package/src/lib/components/ui/dropdown-menu/dropdown-menu-portal.jsx +4 -0
  156. package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.jsx +7 -0
  157. package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.jsx +29 -0
  158. package/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.jsx +15 -0
  159. package/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.jsx +16 -0
  160. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.jsx +15 -0
  161. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.jsx +23 -0
  162. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub.jsx +4 -0
  163. package/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.jsx +7 -0
  164. package/src/lib/components/ui/dropdown-menu/dropdown-menu.jsx +4 -0
  165. package/src/lib/components/ui/dropdown-menu/index.js +52 -52
  166. package/src/lib/components/ui/input/index.js +5 -5
  167. package/src/lib/components/ui/input/input.jsx +19 -0
  168. package/src/lib/components/ui/label/index.js +5 -5
  169. package/src/lib/components/ui/label/label.jsx +19 -0
  170. package/src/lib/components/ui/panel/index.js +21 -21
  171. package/src/lib/components/ui/panel/panel-body.jsx +11 -0
  172. package/src/lib/components/ui/panel/panel-close.jsx +16 -0
  173. package/src/lib/components/ui/panel/panel-content.jsx +29 -0
  174. package/src/lib/components/ui/panel/panel-footer.jsx +11 -0
  175. package/src/lib/components/ui/panel/panel-header.jsx +11 -0
  176. package/src/lib/components/ui/panel/panel-title.jsx +12 -0
  177. package/src/lib/components/ui/panel/panel.jsx +4 -0
  178. package/src/lib/components/ui/popover/index.js +26 -26
  179. package/src/lib/components/ui/popover/popover-close.jsx +7 -0
  180. package/src/lib/components/ui/popover/popover-content.jsx +22 -0
  181. package/src/lib/components/ui/popover/popover-description.jsx +11 -0
  182. package/src/lib/components/ui/popover/popover-header.jsx +11 -0
  183. package/src/lib/components/ui/popover/popover-portal.jsx +4 -0
  184. package/src/lib/components/ui/popover/popover-title.jsx +11 -0
  185. package/src/lib/components/ui/popover/popover-trigger.jsx +8 -0
  186. package/src/lib/components/ui/popover/popover.jsx +4 -0
  187. package/src/lib/components/ui/searchable-list.jsx +159 -0
  188. package/src/lib/components/ui/select/index.js +35 -35
  189. package/src/lib/components/ui/select/select-content.jsx +30 -0
  190. package/src/lib/components/ui/select/select-group-heading.jsx +17 -0
  191. package/src/lib/components/ui/select/select-group.jsx +15 -0
  192. package/src/lib/components/ui/select/select-item.jsx +26 -0
  193. package/src/lib/components/ui/select/select-label.jsx +11 -0
  194. package/src/lib/components/ui/select/select-portal.jsx +4 -0
  195. package/src/lib/components/ui/select/select-scroll-down-button.jsx +18 -0
  196. package/src/lib/components/ui/select/select-scroll-up-button.jsx +18 -0
  197. package/src/lib/components/ui/select/select-separator.jsx +15 -0
  198. package/src/lib/components/ui/select/select-trigger.jsx +25 -0
  199. package/src/lib/components/ui/select/select.jsx +4 -0
  200. package/src/lib/components/ui/separator/index.js +5 -5
  201. package/src/lib/components/ui/separator/separator.jsx +22 -0
  202. package/src/lib/components/ui/sheet/index.js +32 -32
  203. package/src/lib/components/ui/sheet/sheet-close.jsx +7 -0
  204. package/src/lib/components/ui/sheet/sheet-content.jsx +35 -0
  205. package/src/lib/components/ui/sheet/sheet-description.jsx +15 -0
  206. package/src/lib/components/ui/sheet/sheet-footer.jsx +11 -0
  207. package/src/lib/components/ui/sheet/sheet-header.jsx +11 -0
  208. package/src/lib/components/ui/sheet/sheet-overlay.jsx +15 -0
  209. package/src/lib/components/ui/sheet/sheet-portal.jsx +4 -0
  210. package/src/lib/components/ui/sheet/sheet-title.jsx +15 -0
  211. package/src/lib/components/ui/sheet/sheet-trigger.jsx +7 -0
  212. package/src/lib/components/ui/sheet/sheet.jsx +4 -0
  213. package/src/lib/components/ui/textarea/index.js +5 -5
  214. package/src/lib/components/ui/textarea/textarea.jsx +18 -0
  215. package/src/lib/components/ui/toggle/index.js +6 -9
  216. package/src/lib/components/ui/toggle/toggle.jsx +36 -0
  217. package/src/lib/components/ui/toggle-group/index.js +8 -8
  218. package/src/lib/components/ui/toggle-group/toggle-group-item.jsx +29 -0
  219. package/src/lib/components/ui/toggle-group/toggle-group.jsx +43 -0
  220. package/src/lib/components/ui/tooltip/index.js +3 -3
  221. package/src/lib/components/ui/tooltip/tooltip-content.jsx +21 -0
  222. package/src/lib/components/ui/tooltip/tooltip-trigger.jsx +23 -0
  223. package/src/lib/components/ui/tooltip/tooltip.jsx +11 -0
  224. package/src/lib/components/ui/trigger-button/index.js +3 -3
  225. package/src/lib/components/ui/trigger-button/trigger-button.css +38 -0
  226. package/src/lib/components/ui/trigger-button/trigger-button.jsx +63 -0
  227. package/src/logger/devLogger.js +238 -0
  228. package/src/logger/devLogger.test.js +193 -0
  229. package/src/modes.test.js +4 -4
  230. package/src/mountStoryboardCore.js +123 -27
  231. package/src/paletteProviders.js +3 -0
  232. package/src/paletteProviders.test.js +2 -2
  233. package/src/server/index.js +98 -36
  234. package/src/sidepanel.css +214 -0
  235. package/src/styles/tailwind.css +1 -1
  236. package/src/svelte-plugin-ui/__tests__/ModeSwitch.test.ts +8 -8
  237. package/src/svelte-plugin-ui/__tests__/ToolbarShell.test.ts +11 -10
  238. package/src/svelte-plugin-ui/components/Icon.css +11 -0
  239. package/src/svelte-plugin-ui/components/Icon.jsx +281 -0
  240. package/src/svelte-plugin-ui/components/ModeSwitch.css +90 -0
  241. package/src/svelte-plugin-ui/components/ModeSwitch.jsx +47 -0
  242. package/src/svelte-plugin-ui/components/ToolbarShell.css +80 -0
  243. package/src/svelte-plugin-ui/components/ToolbarShell.jsx +84 -0
  244. package/src/svelte-plugin-ui/components/Viewfinder.css +412 -0
  245. package/src/svelte-plugin-ui/components/Viewfinder.jsx +512 -0
  246. package/src/svelte-plugin-ui/mount.ts +12 -16
  247. package/src/toolRegistry.js +4 -4
  248. package/src/toolbarConfigStore.js +30 -0
  249. package/src/tools/handlers/autosync.js +1 -1
  250. package/src/tools/handlers/canvasAddWidget.js +1 -1
  251. package/src/tools/handlers/canvasAgents.js +19 -0
  252. package/src/tools/handlers/canvasToolbar.js +8 -8
  253. package/src/tools/handlers/commandPalette.js +9 -0
  254. package/src/tools/handlers/comments.js +1 -1
  255. package/src/tools/handlers/create.js +1 -1
  256. package/src/tools/handlers/devtools.js +16 -0
  257. package/src/tools/handlers/devtools.test.js +38 -0
  258. package/src/tools/handlers/flows.js +1 -1
  259. package/src/tools/handlers/hideChrome.js +9 -0
  260. package/src/tools/handlers/paletteTheme.js +35 -0
  261. package/src/tools/handlers/theme.js +1 -1
  262. package/src/tools/registry.js +4 -1
  263. package/src/tools/surfaces/commandList.js +3 -3
  264. package/src/tools/surfaces/mainToolbar.js +3 -3
  265. package/src/tools/surfaces/registry.js +4 -4
  266. package/src/ui/design-modes.ts +2 -2
  267. package/src/ui/viewfinder.ts +1 -1
  268. package/src/vite/server-plugin.js +242 -60
  269. package/src/workshop/features/createCanvas/CreateCanvasForm.jsx +260 -0
  270. package/src/workshop/features/createCanvas/index.js +1 -1
  271. package/src/workshop/features/createFlow/CreateFlowForm.jsx +334 -0
  272. package/src/workshop/features/createFlow/index.js +1 -1
  273. package/src/workshop/features/createPage/CreatePageForm.jsx +304 -0
  274. package/src/workshop/features/createPage/index.js +1 -1
  275. package/src/workshop/features/createPrototype/CreatePrototypeForm.jsx +289 -0
  276. package/src/workshop/features/createPrototype/index.js +1 -1
  277. package/src/workshop/features/createPrototype/server.js +98 -0
  278. package/src/workshop/features/createStory/CreateStoryForm.jsx +208 -0
  279. package/src/workshop/features/createStory/index.js +1 -1
  280. package/src/workshop/ui/WorkshopPanel.jsx +98 -0
  281. package/src/workshop/ui/mount.ts +1 -1
  282. package/src/worktree/port.js +48 -0
  283. package/src/worktree/serverRegistry.js +120 -0
  284. package/toolbar.config.json +93 -42
  285. package/widgets.config.json +580 -12
  286. package/src/ActionMenuButton.svelte +0 -119
  287. package/src/AutosyncMenuButton.svelte +0 -397
  288. package/src/CanvasCreateMenu.svelte +0 -295
  289. package/src/CanvasSnap.svelte +0 -87
  290. package/src/CanvasUndoRedo.svelte +0 -108
  291. package/src/CanvasZoomControl.svelte +0 -111
  292. package/src/CanvasZoomToFit.svelte +0 -52
  293. package/src/CommandMenu.svelte +0 -249
  294. package/src/CommandPalette.svelte +0 -33
  295. package/src/CommentsMenuButton.svelte +0 -53
  296. package/src/CoreUIBar.svelte +0 -847
  297. package/src/CreateMenuButton.svelte +0 -133
  298. package/src/DocPanel.svelte +0 -299
  299. package/src/InspectorPanel.svelte +0 -745
  300. package/src/PwaInstallBanner.svelte +0 -124
  301. package/src/SidePanel.svelte +0 -480
  302. package/src/ThemeMenuButton.svelte +0 -132
  303. package/src/comments/ui/AuthModal.svelte +0 -108
  304. package/src/comments/ui/CommentWindow.svelte +0 -333
  305. package/src/comments/ui/CommentsDrawer.svelte +0 -96
  306. package/src/comments/ui/Composer.svelte +0 -65
  307. package/src/lib/components/ui/alert/alert-action.svelte +0 -19
  308. package/src/lib/components/ui/alert/alert-description.svelte +0 -22
  309. package/src/lib/components/ui/alert/alert-title.svelte +0 -22
  310. package/src/lib/components/ui/alert/alert.svelte +0 -38
  311. package/src/lib/components/ui/avatar/avatar-badge.svelte +0 -25
  312. package/src/lib/components/ui/avatar/avatar-fallback.svelte +0 -20
  313. package/src/lib/components/ui/avatar/avatar-group-count.svelte +0 -22
  314. package/src/lib/components/ui/avatar/avatar-group.svelte +0 -22
  315. package/src/lib/components/ui/avatar/avatar-image.svelte +0 -17
  316. package/src/lib/components/ui/avatar/avatar.svelte +0 -24
  317. package/src/lib/components/ui/badge/badge.svelte +0 -44
  318. package/src/lib/components/ui/button/button.svelte +0 -108
  319. package/src/lib/components/ui/card/card-action.svelte +0 -21
  320. package/src/lib/components/ui/card/card-content.svelte +0 -19
  321. package/src/lib/components/ui/card/card-description.svelte +0 -19
  322. package/src/lib/components/ui/card/card-footer.svelte +0 -18
  323. package/src/lib/components/ui/card/card-header.svelte +0 -21
  324. package/src/lib/components/ui/card/card-title.svelte +0 -14
  325. package/src/lib/components/ui/card/card.svelte +0 -21
  326. package/src/lib/components/ui/checkbox/checkbox.svelte +0 -39
  327. package/src/lib/components/ui/collapsible/collapsible-content.svelte +0 -7
  328. package/src/lib/components/ui/collapsible/collapsible-trigger.svelte +0 -7
  329. package/src/lib/components/ui/collapsible/collapsible.svelte +0 -11
  330. package/src/lib/components/ui/dialog/dialog-close.svelte +0 -11
  331. package/src/lib/components/ui/dialog/dialog-content.svelte +0 -42
  332. package/src/lib/components/ui/dialog/dialog-description.svelte +0 -17
  333. package/src/lib/components/ui/dialog/dialog-footer.svelte +0 -29
  334. package/src/lib/components/ui/dialog/dialog-header.svelte +0 -19
  335. package/src/lib/components/ui/dialog/dialog-overlay.svelte +0 -17
  336. package/src/lib/components/ui/dialog/dialog-portal.svelte +0 -7
  337. package/src/lib/components/ui/dialog/dialog-title.svelte +0 -17
  338. package/src/lib/components/ui/dialog/dialog-trigger.svelte +0 -11
  339. package/src/lib/components/ui/dialog/dialog.svelte +0 -7
  340. package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +0 -16
  341. package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +0 -40
  342. package/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte +0 -27
  343. package/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +0 -18
  344. package/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte +0 -7
  345. package/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte +0 -24
  346. package/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte +0 -20
  347. package/src/lib/components/ui/dropdown-menu/dropdown-menu-portal.svelte +0 -7
  348. package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +0 -16
  349. package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +0 -34
  350. package/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte +0 -17
  351. package/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +0 -19
  352. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +0 -17
  353. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +0 -27
  354. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub.svelte +0 -7
  355. package/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +0 -7
  356. package/src/lib/components/ui/dropdown-menu/dropdown-menu.svelte +0 -7
  357. package/src/lib/components/ui/input/input.svelte +0 -40
  358. package/src/lib/components/ui/label/label.svelte +0 -20
  359. package/src/lib/components/ui/panel/panel-body.svelte +0 -13
  360. package/src/lib/components/ui/panel/panel-close.svelte +0 -16
  361. package/src/lib/components/ui/panel/panel-content.svelte +0 -33
  362. package/src/lib/components/ui/panel/panel-footer.svelte +0 -13
  363. package/src/lib/components/ui/panel/panel-header.svelte +0 -16
  364. package/src/lib/components/ui/panel/panel-title.svelte +0 -14
  365. package/src/lib/components/ui/panel/panel.svelte +0 -15
  366. package/src/lib/components/ui/popover/popover-close.svelte +0 -7
  367. package/src/lib/components/ui/popover/popover-content.svelte +0 -27
  368. package/src/lib/components/ui/popover/popover-description.svelte +0 -19
  369. package/src/lib/components/ui/popover/popover-header.svelte +0 -19
  370. package/src/lib/components/ui/popover/popover-portal.svelte +0 -7
  371. package/src/lib/components/ui/popover/popover-title.svelte +0 -19
  372. package/src/lib/components/ui/popover/popover-trigger.svelte +0 -17
  373. package/src/lib/components/ui/popover/popover.svelte +0 -7
  374. package/src/lib/components/ui/select/select-content.svelte +0 -40
  375. package/src/lib/components/ui/select/select-group-heading.svelte +0 -19
  376. package/src/lib/components/ui/select/select-group.svelte +0 -17
  377. package/src/lib/components/ui/select/select-item.svelte +0 -38
  378. package/src/lib/components/ui/select/select-label.svelte +0 -18
  379. package/src/lib/components/ui/select/select-portal.svelte +0 -7
  380. package/src/lib/components/ui/select/select-scroll-down-button.svelte +0 -20
  381. package/src/lib/components/ui/select/select-scroll-up-button.svelte +0 -20
  382. package/src/lib/components/ui/select/select-separator.svelte +0 -17
  383. package/src/lib/components/ui/select/select-trigger.svelte +0 -27
  384. package/src/lib/components/ui/select/select.svelte +0 -11
  385. package/src/lib/components/ui/separator/separator.svelte +0 -23
  386. package/src/lib/components/ui/sheet/sheet-close.svelte +0 -7
  387. package/src/lib/components/ui/sheet/sheet-content.svelte +0 -43
  388. package/src/lib/components/ui/sheet/sheet-description.svelte +0 -17
  389. package/src/lib/components/ui/sheet/sheet-footer.svelte +0 -18
  390. package/src/lib/components/ui/sheet/sheet-header.svelte +0 -19
  391. package/src/lib/components/ui/sheet/sheet-overlay.svelte +0 -17
  392. package/src/lib/components/ui/sheet/sheet-portal.svelte +0 -7
  393. package/src/lib/components/ui/sheet/sheet-title.svelte +0 -17
  394. package/src/lib/components/ui/sheet/sheet-trigger.svelte +0 -7
  395. package/src/lib/components/ui/sheet/sheet.svelte +0 -7
  396. package/src/lib/components/ui/textarea/textarea.svelte +0 -21
  397. package/src/lib/components/ui/toggle/toggle.svelte +0 -45
  398. package/src/lib/components/ui/toggle-group/toggle-group-item.svelte +0 -35
  399. package/src/lib/components/ui/toggle-group/toggle-group.svelte +0 -63
  400. package/src/lib/components/ui/tooltip/tooltip-content.svelte +0 -24
  401. package/src/lib/components/ui/tooltip/tooltip-trigger.svelte +0 -27
  402. package/src/lib/components/ui/tooltip/tooltip.svelte +0 -9
  403. package/src/lib/components/ui/trigger-button/trigger-button.svelte +0 -106
  404. package/src/svelte-plugin-ui/components/Icon.svelte +0 -181
  405. package/src/svelte-plugin-ui/components/ModeSwitch.svelte +0 -121
  406. package/src/svelte-plugin-ui/components/ToolbarShell.svelte +0 -150
  407. package/src/svelte-plugin-ui/components/Viewfinder.svelte +0 -1001
  408. package/src/tools/handlers/docs.js +0 -11
  409. package/src/workshop/features/createCanvas/CreateCanvasForm.svelte +0 -139
  410. package/src/workshop/features/createFlow/CreateFlowForm.svelte +0 -314
  411. package/src/workshop/features/createPage/CreatePageForm.svelte +0 -249
  412. package/src/workshop/features/createPrototype/CreatePrototypeForm.svelte +0 -287
  413. package/src/workshop/features/createStory/CreateStoryForm.svelte +0 -161
  414. package/src/workshop/ui/WorkshopPanel.svelte +0 -97
@@ -1,21 +0,0 @@
1
- <script>
2
- import { cn } from "../../../utils/index.js";
3
- let {
4
- ref = $bindable(null),
5
- value = $bindable(),
6
- class: className,
7
- "data-slot": dataSlot = "textarea",
8
- ...restProps
9
- } = $props();
10
- </script>
11
-
12
- <textarea
13
- bind:this={ref}
14
- data-slot={dataSlot}
15
- class={cn(
16
- "border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",
17
- className
18
- )}
19
- bind:value
20
- {...restProps}
21
- ></textarea>
@@ -1,45 +0,0 @@
1
- <script module>
2
- import { tv } from "tailwind-variants";
3
-
4
- export const toggleVariants = tv({
5
- base: "hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
6
- variants: {
7
- variant: {
8
- default: "bg-transparent",
9
- outline: "border-input hover:bg-muted border bg-transparent",
10
- },
11
- size: {
12
- default: "h-8 min-w-8 px-2",
13
- sm: "h-7 min-w-7 rounded-[min(var(--sb--radius-md),12px)] px-1.5 text-[0.8rem]",
14
- lg: "h-9 min-w-9 px-2.5",
15
- },
16
- },
17
- defaultVariants: {
18
- variant: "default",
19
- size: "default",
20
- },
21
- });
22
-
23
- </script>
24
-
25
- <script>
26
- import { Toggle as TogglePrimitive } from "bits-ui";
27
- import { cn } from "../../../utils/index.js";
28
-
29
- let {
30
- ref = $bindable(null),
31
- pressed = $bindable(false),
32
- class: className,
33
- size = "default",
34
- variant = "default",
35
- ...restProps
36
- } = $props();
37
- </script>
38
-
39
- <TogglePrimitive.Root
40
- bind:ref
41
- bind:pressed
42
- data-slot="toggle"
43
- class={cn(toggleVariants({ variant, size }), className)}
44
- {...restProps}
45
- />
@@ -1,35 +0,0 @@
1
- <script>
2
- import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
3
- import { getToggleGroupCtx } from "./toggle-group.svelte";
4
- import { cn } from "../../../utils/index.js";
5
- import { toggleVariants } from "../../../components/ui/toggle/index.js";
6
-
7
- let {
8
- ref = $bindable(null),
9
- value = $bindable(),
10
- class: className,
11
- size,
12
- variant,
13
- ...restProps
14
- } = $props();
15
-
16
- const ctx = getToggleGroupCtx();
17
- </script>
18
-
19
- <ToggleGroupPrimitive.Item
20
- bind:ref
21
- data-slot="toggle-group-item"
22
- data-variant={ctx.variant || variant}
23
- data-size={ctx.size || size}
24
- data-spacing={ctx.spacing}
25
- class={cn(
26
- "group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
27
- toggleVariants({
28
- variant: ctx.variant || variant,
29
- size: ctx.size || size,
30
- }),
31
- className
32
- )}
33
- {value}
34
- {...restProps}
35
- />
@@ -1,63 +0,0 @@
1
- <script module>
2
- import { getContext, setContext } from "svelte";
3
- import { toggleVariants } from "../../../components/ui/toggle/index.js";
4
-
5
- export function setToggleGroupCtx(props) {
6
- setContext("toggleGroup", props);
7
- }
8
-
9
- export function getToggleGroupCtx() {
10
- return getContext("toggleGroup");
11
- }
12
- </script>
13
-
14
- <script>
15
- import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
16
- import { cn } from "../../../utils/index.js";
17
-
18
- let {
19
- ref = $bindable(null),
20
- value = $bindable(),
21
- class: className,
22
- size = "default",
23
- spacing = 0,
24
- orientation = "horizontal",
25
- variant = "default",
26
- ...restProps
27
- } = $props();
28
-
29
- setToggleGroupCtx({
30
- get variant() {
31
- return variant;
32
- },
33
- get size() {
34
- return size;
35
- },
36
- get spacing() {
37
- return spacing;
38
- },
39
- get orientation() {
40
- return orientation;
41
- },
42
- });
43
- </script>
44
-
45
- <!--
46
- Discriminated Unions + Destructing (required for bindable) do not
47
- get along, so we shut typescript up by casting `value` to `never`.
48
- -->
49
- <ToggleGroupPrimitive.Root
50
- bind:value={value}
51
- bind:ref
52
- {orientation}
53
- data-slot="toggle-group"
54
- data-variant={variant}
55
- data-size={size}
56
- data-spacing={spacing}
57
- style={`--sb--gap: ${spacing}`}
58
- class={cn(
59
- "rounded-lg data-[size=sm]:rounded-[min(var(--sb--radius-md),10px)] group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--sb--gap))] data-vertical:flex-col data-vertical:items-stretch",
60
- className
61
- )}
62
- {...restProps}
63
- />
@@ -1,24 +0,0 @@
1
- <script>
2
- import { Tooltip as TooltipPrimitive } from "bits-ui";
3
- import { cn } from "../../../utils/index.js";
4
-
5
- let {
6
- ref = $bindable(null),
7
- sideOffset = 8,
8
- class: className,
9
- ...restProps
10
- } = $props();
11
- </script>
12
-
13
- <TooltipPrimitive.Portal>
14
- <TooltipPrimitive.Content
15
- bind:ref
16
- data-slot="tooltip-content"
17
- {sideOffset}
18
- class={cn(
19
- "font-sans bg-slate-700 text-white text-xs px-2.5 py-1.5 rounded-lg shadow-lg z-[10001] animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
20
- className
21
- )}
22
- {...restProps}
23
- />
24
- </TooltipPrimitive.Portal>
@@ -1,27 +0,0 @@
1
- <script>
2
- import { Tooltip as TooltipPrimitive } from "bits-ui";
3
-
4
- let { child, children, ...restProps } = $props();
5
- </script>
6
-
7
- {#if child}
8
- <TooltipPrimitive.Trigger {...restProps} {child} />
9
- {:else}
10
- <TooltipPrimitive.Trigger {...restProps}>
11
- {#snippet child({ props })}
12
- <!-- inline-flex span: has a box for pointer events (tooltips on hover)
13
- but tabindex=-1 keeps it out of the tab order.
14
- onfocusin relays child focus to the tooltip's onfocus handler. -->
15
- <!-- svelte-ignore a11y_no_noninteractive_tabindex -->
16
- <span
17
- {...props}
18
- tabindex={-1}
19
- onfocusin={props.onfocus}
20
- onfocusout={props.onblur}
21
- style="display: inline-flex"
22
- >
23
- {@render children?.()}
24
- </span>
25
- {/snippet}
26
- </TooltipPrimitive.Trigger>
27
- {/if}
@@ -1,9 +0,0 @@
1
- <script>
2
- import { Tooltip as TooltipPrimitive } from "bits-ui";
3
-
4
- let { ...restProps } = $props();
5
- </script>
6
-
7
- <TooltipPrimitive.Provider delayDuration={50}>
8
- <TooltipPrimitive.Root {...restProps} />
9
- </TooltipPrimitive.Provider>
@@ -1,106 +0,0 @@
1
- <!--
2
- TriggerButton — floating action trigger with smooth superellipse corners.
3
- First component of the core UI kit for floating menus.
4
-
5
- Themable via CSS custom properties (set on any ancestor):
6
- --sb--trigger-bg Background color (default: slate-100)
7
- --sb--trigger-bg-hover Background on hover/active (default: slate-200)
8
- --sb--trigger-text Text / icon color (default: slate-600)
9
- --sb--trigger-border Border color (default: slate-400)
10
- -->
11
-
12
- <script module>
13
- import { cn } from "../../../utils/index.js";
14
-
15
- // Register CSS Houdini paint worklet for superellipse masks.
16
- import { registerSmoothCorners } from '../../../../smoothCorners.js'
17
- registerSmoothCorners()
18
- </script>
19
-
20
- <script>
21
- import { Button } from '../../../components/ui/button/index.js'
22
-
23
- let {
24
- class: className,
25
- wrapperClass = "",
26
- active = false,
27
- inactive = false,
28
- dimmed = false,
29
- localOnly = false,
30
- size = "icon-2xl",
31
- children,
32
- ...restProps
33
- } = $props();
34
-
35
- const borderWidth = $derived(
36
- ['icon-2xl', 'icon-xl', '2xl', 'xl'].includes(size) ? '3px' : '2px'
37
- );
38
- </script>
39
-
40
- <span
41
- data-trigger-button
42
- data-active={active || undefined}
43
- data-inactive={inactive || undefined}
44
- data-dimmed={dimmed || undefined}
45
- data-local-only={localOnly || undefined}
46
- style:--sb--trigger-border-width={borderWidth}
47
- >
48
- <Button
49
- variant="trigger"
50
- {size}
51
- disabled={inactive}
52
- wrapperClass={cn(
53
- "smooth-corners [--sb--smooth-corners:4] hover:rotate-2 focus-visible:rotate-2 transition-transform",
54
- active && !inactive && "rotate-2",
55
- wrapperClass
56
- )}
57
- class={cn(
58
- "smooth-corners leading-none font-semibold",
59
- className
60
- )}
61
- {...restProps}
62
- >
63
- {@render children?.()}
64
- </Button>
65
- </span>
66
-
67
- <style>
68
- [data-trigger-button] {
69
- display: inline-flex;
70
- position: relative;
71
- }
72
- [data-trigger-button] :global([data-slot="button-wrapper"]) {
73
- --sb--sc-border-color: var(--sb--trigger-border, var(--color-slate-400));
74
- --sb--sc-border-width: var(--sb--trigger-border-width, 3px);
75
- }
76
- /* Accent-colored border/gap on focus — follows the superellipse shape */
77
- [data-trigger-button] :global([data-slot="button-wrapper"]:has([data-slot="button"]:focus-visible)) {
78
- --sb--sc-border-color: hsl(212 92% 45%);
79
- }
80
- [data-trigger-button] :global([data-slot="button"]) {
81
- background-color: var(--sb--trigger-bg, var(--color-slate-100));
82
- color: var(--sb--trigger-text, var(--color-slate-600));
83
- }
84
- [data-trigger-button] :global([data-slot="button"]:hover),
85
- [data-trigger-button] :global([data-slot="button"]:focus-visible),
86
- [data-trigger-button] :global([data-slot="button"][aria-expanded="true"]),
87
- [data-trigger-button][data-active] :global([data-slot="button"]) {
88
- background-color: var(--sb--trigger-bg-hover, var(--color-slate-300));
89
- }
90
-
91
- /* Inactive: disabled-looking, no interaction */
92
- [data-trigger-button][data-inactive] {
93
- opacity: 0.45;
94
- pointer-events: none;
95
- }
96
-
97
- /* Dimmed: reduced visibility, interactive on hover/focus */
98
- [data-trigger-button][data-dimmed] {
99
- opacity: 0.3;
100
- transition: opacity 200ms;
101
- }
102
- [data-trigger-button][data-dimmed]:hover,
103
- [data-trigger-button][data-dimmed]:focus-within {
104
- opacity: 1;
105
- }
106
- </style>
@@ -1,181 +0,0 @@
1
- <!--
2
- Icon — renders icons from multiple sources using namespaced names.
3
-
4
- Sources (by namespace prefix):
5
- primer/ → Primer Octicons (fill-based)
6
- feather/ → Feather Icons (stroke-based)
7
- iconoir/ → Iconoir (stroke-based, manually registered)
8
- (no prefix) → Custom overrides (folder, folder-open)
9
-
10
- Usage:
11
- <Icon name="primer/repo" />
12
- <Icon name="folder" color="#54aeff" />
13
- <Icon name="feather/fast-forward" size={16} />
14
- <Icon name="iconoir/square-dashed" size={16} strokeWeight={2} scale={1.05} />
15
- <Icon name="primer/gear" size={16} label="Settings" />
16
- <Icon name="feather/tablet" rotate={90} />
17
- <Icon name="primer/lock" offsetX={1} offsetY={-1} />
18
- <Icon name="feather/arrow-right" flipX />
19
- -->
20
-
21
- <script lang="ts">
22
- import octicons from '@primer/octicons'
23
- import feather from 'feather-icons'
24
-
25
- // Custom SVG paths (fill-based, no namespace prefix).
26
- const customIcons: Record<string, { viewBox: string; path: string }> = {
27
- 'folder': {
28
- viewBox: '0 0 24 24',
29
- path: 'M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h5.175q.4 0 .763.15t.637.425L12 6h8q.825 0 1.413.588T22 8v10q0 .825-.587 1.413T20 20z',
30
- },
31
- 'folder-open': {
32
- viewBox: '0 0 24 24',
33
- path: 'M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h5.175q.4 0 .763.15t.637.425L12 6h9q.425 0 .713.288T22 7t-.288.713T21 8H7.85q-1.55 0-2.7.975T4 11.45V18l1.975-6.575q.2-.65.738-1.037T7.9 10h12.9q1.025 0 1.613.813t.312 1.762l-1.8 6q-.2.65-.737 1.038T19 20z',
34
- },
35
- }
36
-
37
- // Iconoir icons — registered manually from iconoir package.
38
- // To add: copy inner paths from node_modules/iconoir/icons/{regular|solid}/{name}.svg
39
- // Set fill: true for solid/fill-based icons (default: false = stroke-based)
40
- const iconoirIcons: Record<string, { viewBox: string; strokeWidth?: string; content: string; fill?: boolean }> = {
41
- 'square-dashed': {
42
- viewBox: '0 0 24 24',
43
- strokeWidth: '1.5',
44
- content: '<path d="M7 4H4V7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 11V13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M11 4H13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M11 20H13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 11V13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M17 4H20V7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M7 20H4V17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M17 20H20V17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',
45
- },
46
- 'key-command': {
47
- viewBox: '0 0 24 24',
48
- strokeWidth: '1.5',
49
- content: '<path d="M9 6V18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M15 6V18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 6C9 4.34315 7.65685 3 6 3C4.34315 3 3 4.34315 3 6C3 7.65685 4.34315 9 6 9H18C19.6569 9 21 7.65685 21 6C21 4.34315 19.6569 3 18 3C16.3431 3 15 4.34315 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 18C9 19.6569 7.65685 21 6 21C4.34315 21 3 19.6569 3 18C3 16.3431 4.34315 15 6 15H18C19.6569 15 21 16.3431 21 18C21 19.6569 19.6569 21 18 21C16.3431 21 15 19.6569 15 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',
50
- },
51
- 'plus-circle': {
52
- viewBox: '0 0 24 24',
53
- strokeWidth: '1.5',
54
- content: '<path d="M8 12H12M16 12H12M12 12V8M12 12V16" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',
55
- },
56
- 'plus-circle-solid': {
57
- viewBox: '0 0 24 24',
58
- fill: true,
59
- content: '<path fill-rule="evenodd" clip-rule="evenodd" d="M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM12.75 8C12.75 7.58579 12.4142 7.25 12 7.25C11.5858 7.25 11.25 7.58579 11.25 8V11.25H8C7.58579 11.25 7.25 11.5858 7.25 12C7.25 12.4142 7.58579 12.75 8 12.75H11.25V16C11.25 16.4142 11.5858 16.75 12 16.75C12.4142 16.75 12.75 16.4142 12.75 16V12.75H16C16.4142 12.75 16.75 12.4142 16.75 12C16.75 11.5858 16.4142 11.25 16 11.25H12.75V8Z" fill="currentColor"/>',
60
- },
61
- 'grid-plus': {
62
- viewBox: '0 0 24 24',
63
- strokeWidth: '1.5',
64
- content: '<path d="M13.9922 17H16.9922M19.9922 17H16.9922M16.9922 17V14M16.9922 17V20" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 9.4V4.6C4 4.26863 4.26863 4 4.6 4H9.4C9.73137 4 10 4.26863 10 4.6V9.4C10 9.73137 9.73137 10 9.4 10H4.6C4.26863 10 4 9.73137 4 9.4Z" stroke="currentColor" stroke-width="1.5"/><path d="M4 19.4V14.6C4 14.2686 4.26863 14 4.6 14H9.4C9.73137 14 10 14.2686 10 14.6V19.4C10 19.7314 9.73137 20 9.4 20H4.6C4.26863 20 4 19.7314 4 19.4Z" stroke="currentColor" stroke-width="1.5"/><path d="M14 9.4V4.6C14 4.26863 14.2686 4 14.6 4H19.4C19.7314 4 20 4.26863 20 4.6V9.4C20 9.73137 19.7314 10 19.4 10H14.6C14.2686 10 14 9.73137 14 9.4Z" stroke="currentColor" stroke-width="1.5"/>',
65
- },
66
- 'dots-grid-3x3': {
67
- viewBox: '0 0 24 24',
68
- strokeWidth: '1.5',
69
- content: '<path d="M5.5 6C5.77614 6 6 5.77614 6 5.5C6 5.22386 5.77614 5 5.5 5C5.22386 5 5 5.22386 5 5.5C5 5.77614 5.22386 6 5.5 6Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M5.5 12.5C5.77614 12.5 6 12.2761 6 12C6 11.7239 5.77614 11.5 5.5 11.5C5.22386 11.5 5 11.7239 5 12C5 12.2761 5.22386 12.5 5.5 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M5.5 19C5.77614 19 6 18.7761 6 18.5C6 18.2239 5.77614 18 5.5 18C5.22386 18 5 18.2239 5 18.5C5 18.7761 5.22386 19 5.5 19Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 6C12.2761 6 12.5 5.77614 12.5 5.5C12.5 5.22386 12.2761 5 12 5C11.7239 5 11.5 5.22386 11.5 5.5C11.5 5.77614 11.7239 6 12 6Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 19C12.2761 19 12.5 18.7761 12.5 18.5C12.5 18.2239 12.2761 18 12 18C11.7239 18 11.5 18.2239 11.5 18.5C11.5 18.7761 11.7239 19 12 19Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M18.5 6C18.7761 6 19 5.77614 19 5.5C19 5.22386 18.7761 5 18.5 5C18.2239 5 18 5.22386 18 5.5C18 5.77614 18.2239 6 18.5 6Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M18.5 12.5C18.7761 12.5 19 12.2761 19 12C19 11.7239 18.7761 11.5 18.5 11.5C18.2239 11.5 18 11.7239 18 12C18 12.2761 18.2239 12.5 18.5 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M18.5 19C18.7761 19 19 18.7761 19 18.5C19 18.2239 18.7761 18 18.5 18C18.2239 18 18 18.2239 18 18.5C18 18.7761 18.2239 19 18.5 19Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',
70
- },
71
- 'view-grid': {
72
- viewBox: '0 0 24 24',
73
- strokeWidth: '1.5',
74
- content: '<path d="M14 20.4V14.6C14 14.2686 14.2686 14 14.6 14H20.4C20.7314 14 21 14.2686 21 14.6V20.4C21 20.7314 20.7314 21 20.4 21H14.6C14.2686 21 14 20.7314 14 20.4Z" stroke="currentColor" stroke-width="1.5"/><path d="M3 20.4V14.6C3 14.2686 3.26863 14 3.6 14H9.4C9.73137 14 10 14.2686 10 14.6V20.4C10 20.7314 9.73137 21 9.4 21H3.6C3.26863 21 3 20.7314 3 20.4Z" stroke="currentColor" stroke-width="1.5"/><path d="M14 9.4V3.6C14 3.26863 14.2686 3 14.6 3H20.4C20.7314 3 21 3.26863 21 3.6V9.4C21 9.73137 20.7314 10 20.4 10H14.6C14.2686 10 14 9.73137 14 9.4Z" stroke="currentColor" stroke-width="1.5"/><path d="M3 9.4V3.6C3 3.26863 3.26863 3 3.6 3H9.4C9.73137 3 10 3.26863 10 3.6V9.4C10 9.73137 9.73137 10 9.4 10H3.6C3.26863 10 3 9.73137 3 9.4Z" stroke="currentColor" stroke-width="1.5"/>',
75
- },
76
- 'dots-grid-3x3-solid': {
77
- viewBox: '0 0 24 24',
78
- fill: true,
79
- content: '<rect x="2.25" y="2.25" width="19.5" height="19.5" rx="1.35" fill="currentColor"/><circle cx="5.5" cy="5.5" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="5.5" cy="12" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="5.5" cy="18.5" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="12" cy="5.5" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="12" cy="12" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="12" cy="18.5" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="18.5" cy="5.5" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="18.5" cy="12" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/><circle cx="18.5" cy="18.5" r="1.25" fill="var(--sb--trigger-bg, var(--color-slate-100))"/>',
80
- },
81
- 'square-3d-three-points': {
82
- viewBox: '0 0 24 24',
83
- strokeWidth: '1.5',
84
- content: '<path d="M3 21V3.6C3 3.26863 3.26863 3 3.6 3H21" stroke="currentColor"/><path d="M17 21H20.4C20.7314 21 21 20.7314 21 20.4V17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 7V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 12V14" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M7 21H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 21H14" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 4C3.55228 4 4 3.55228 4 3C4 2.44772 3.55228 2 3 2C2.44772 2 2 2.44772 2 3C2 3.55228 2.44772 4 3 4Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 22C3.55228 22 4 21.5523 4 21C4 20.4477 3.55228 20 3 20C2.44772 20 2 20.4477 2 21C2 21.5523 2.44772 22 3 22Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 4C21.5523 4 22 3.55228 22 3C22 2.44772 21.5523 2 21 2C20.4477 2 20 2.44772 20 3C20 3.55228 20.4477 4 21 4Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',
85
- },
86
- }
87
-
88
- interface Props {
89
- name: string
90
- size?: number
91
- label?: string
92
- color?: string
93
- offsetX?: number
94
- offsetY?: number
95
- rotate?: number
96
- flipX?: boolean
97
- flipY?: boolean
98
- strokeWeight?: number
99
- scale?: number
100
- }
101
-
102
- let {
103
- name,
104
- size = 16,
105
- label,
106
- color,
107
- offsetX = 0,
108
- offsetY = 0,
109
- rotate = 0,
110
- flipX = false,
111
- flipY = false,
112
- strokeWeight,
113
- scale = 1,
114
- }: Props = $props()
115
-
116
- const ariaAttrs = $derived(
117
- label ? `aria-label="${label}"` : 'aria-hidden="true"'
118
- )
119
-
120
- // Parse "source/icon-name" — no slash means custom icon
121
- const source = $derived(name.includes('/') ? name.split('/')[0] : null)
122
- const iconName = $derived(name.includes('/') ? name.slice(name.indexOf('/') + 1) : name)
123
-
124
- const custom = $derived(!source ? customIcons[iconName] : null)
125
- const octicon = $derived(source === 'primer' ? octicons[iconName] : null)
126
- const featherIcon = $derived(source === 'feather' ? feather.icons[iconName] : null)
127
- const iconoir = $derived(source === 'iconoir' ? iconoirIcons[iconName] : null)
128
- const isStrokeIcon = $derived(source === 'feather' || (source === 'iconoir' && !iconoir?.fill))
129
-
130
- const svg = $derived(
131
- custom
132
- ? `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="${custom.viewBox}" fill="currentColor" ${ariaAttrs}><path d="${custom.path}"/></svg>`
133
- : octicon?.toSVG({
134
- width: size,
135
- height: size,
136
- ...(label ? { 'aria-label': label } : { 'aria-hidden': 'true' }),
137
- })
138
- ?? featherIcon?.toSvg({
139
- width: size,
140
- height: size,
141
- 'stroke-width': strokeWeight ?? 2,
142
- ...(label ? { 'aria-label': label } : { 'aria-hidden': 'true' }),
143
- })
144
- ?? (iconoir
145
- ? iconoir.fill
146
- ? `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="${iconoir.viewBox}" fill="currentColor" ${ariaAttrs}>${iconoir.content}</svg>`
147
- : `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="${iconoir.viewBox}" fill="none" stroke-width="${strokeWeight ?? iconoir.strokeWidth}" ${ariaAttrs}>${iconoir.content}</svg>`
148
- : '')
149
- )
150
-
151
- const scaleX = $derived((flipX ? -1 : 1) * scale)
152
- const scaleY = $derived((flipY ? -1 : 1) * scale)
153
- const hasScale = $derived(flipX || flipY || scale !== 1)
154
-
155
- const style = $derived(
156
- [
157
- color ? `color: ${color}` : '',
158
- (offsetX || offsetY) ? `translate: ${offsetX}px ${offsetY}px` : '',
159
- rotate ? `rotate: ${rotate}deg` : '',
160
- hasScale ? `scale: ${scaleX} ${scaleY}` : '',
161
- ].filter(Boolean).join('; ') || undefined
162
- )
163
- </script>
164
-
165
- <span class="storyboard-icon" class:stroke-icon={isStrokeIcon} {style}>
166
- {@html svg}
167
- </span>
168
-
169
- <style>
170
- .storyboard-icon {
171
- display: inline-flex;
172
- align-items: center;
173
- vertical-align: middle;
174
- }
175
- .storyboard-icon:not(.stroke-icon) :global(svg) {
176
- fill: currentColor;
177
- }
178
- .storyboard-icon.stroke-icon :global(svg) {
179
- fill: none;
180
- }
181
- </style>
@@ -1,121 +0,0 @@
1
- <!--
2
- ModeSwitch — segmented toggle for switching between design modes.
3
-
4
- Renders as a fixed pill at the bottom-center of the viewport.
5
- Only visible when two or more modes are registered.
6
-
7
- Styled with Tachyons utilities + sb-* custom properties.
8
- -->
9
-
10
- <script lang="ts">
11
- import { modeState, switchMode } from '../stores/modeStore.js'
12
- </script>
13
-
14
- {#if $modeState.switcherVisible && $modeState.modes.length >= 2}
15
- <div class="sb-mode-switch" role="tablist" aria-label="Design mode">
16
- {#each $modeState.modes as m (m.name)}
17
- <button
18
- role="tab"
19
- aria-selected={$modeState.mode === m.name}
20
- class="sb-mode-btn"
21
- class:sb-mode-btn-active={$modeState.mode === m.name}
22
- onclick={() => switchMode(m.name)}
23
- >
24
- {m.label}
25
- </button>
26
- {/each}
27
- </div>
28
- {/if}
29
-
30
- <style>
31
- .sb-mode-switch {
32
- position: fixed;
33
- bottom: 20px;
34
- left: 50%;
35
- transform: translateX(-50%);
36
- z-index: 9999;
37
- display: flex;
38
- align-items: center;
39
- gap: 0;
40
- background: var(--bgColor-muted, #161b22);
41
- border: 1px solid var(--borderColor-default, #30363d);
42
- border-radius: 999px;
43
- padding: 4px;
44
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
45
- font-family: "Hubot Sans", -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
46
- }
47
-
48
- :global(html.storyboard-mode-present) .sb-mode-switch,
49
- :global(html.storyboard-mode-plan) .sb-mode-switch,
50
- :global(html.storyboard-mode-inspect) .sb-mode-switch {
51
- background: color-mix(in srgb, var(--sb--mode-color) 40%, black);
52
- transition: background 0.2s ease;
53
- }
54
-
55
- .sb-mode-btn {
56
- appearance: none;
57
- border: none;
58
- background: transparent;
59
- color: var(--fgColor-muted, #848d97);
60
- font-size: 13px;
61
- font-weight: 500;
62
- padding: 6px 14px;
63
- border-radius: 999px;
64
- cursor: pointer;
65
- transition: background 0.15s ease, color 0.15s ease;
66
- white-space: nowrap;
67
- line-height: 1;
68
- }
69
-
70
- .sb-mode-btn:hover {
71
- color: var(--fgColor-default, #e6edf3);
72
- background: var(--bgColor-neutral-muted, rgba(110, 118, 129, 0.1));
73
- }
74
-
75
- .sb-mode-btn-active {
76
- background: var(--bgColor-accent-muted, rgba(56, 139, 253, 0.15));
77
- color: var(--fgColor-accent, #58a6ff);
78
- }
79
-
80
- .sb-mode-btn-active:hover {
81
- background: var(--bgColor-accent-muted, rgba(56, 139, 253, 0.2));
82
- color: var(--fgColor-accent, #58a6ff);
83
- }
84
-
85
- /* Mode-aware button colors */
86
- :global(html.storyboard-mode-prototype) .sb-mode-btn,
87
- :global(html.storyboard-mode-present) .sb-mode-btn,
88
- :global(html.storyboard-mode-plan) .sb-mode-btn,
89
- :global(html.storyboard-mode-inspect) .sb-mode-btn {
90
- color: rgba(255, 255, 255, 0.7);
91
- }
92
-
93
- :global(html.storyboard-mode-prototype) .sb-mode-btn:hover,
94
- :global(html.storyboard-mode-present) .sb-mode-btn:hover,
95
- :global(html.storyboard-mode-plan) .sb-mode-btn:hover,
96
- :global(html.storyboard-mode-inspect) .sb-mode-btn:hover {
97
- color: #fff;
98
- background: rgba(255, 255, 255, 0.1);
99
- }
100
-
101
- :global(html.storyboard-mode-prototype) .sb-mode-btn-active,
102
- :global(html.storyboard-mode-present) .sb-mode-btn-active,
103
- :global(html.storyboard-mode-plan) .sb-mode-btn-active,
104
- :global(html.storyboard-mode-inspect) .sb-mode-btn-active {
105
- background: rgba(255, 255, 255, 0.85);
106
- color: color-mix(in srgb, var(--sb--mode-color) 70%, black);
107
- }
108
-
109
- :global(html.storyboard-mode-prototype) .sb-mode-btn-active:hover,
110
- :global(html.storyboard-mode-present) .sb-mode-btn-active:hover,
111
- :global(html.storyboard-mode-plan) .sb-mode-btn-active:hover,
112
- :global(html.storyboard-mode-inspect) .sb-mode-btn-active:hover {
113
- background: rgba(255, 255, 255, 0.85);
114
- color: color-mix(in srgb, var(--sb--mode-color) 70%, black);
115
- }
116
-
117
- /* Hide when chrome is toggled off via ⌘ + . */
118
- :global(html.storyboard-chrome-hidden) .sb-mode-switch {
119
- display: none;
120
- }
121
- </style>