@dexhq/canvas 0.13.0 → 0.15.0

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 (341) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +21 -18
  3. package/app/canvas/activity.tsx +8 -15
  4. package/app/canvas/anchoring.ts +3 -5
  5. package/app/canvas/canvas-input.ts +151 -14
  6. package/app/canvas/canvas-keys.ts +9 -0
  7. package/app/canvas/canvas-model.ts +5 -42
  8. package/app/canvas/canvas-panels.ts +1 -17
  9. package/app/canvas/canvas-scene.ts +7 -3
  10. package/app/canvas/canvas-ui.ts +2 -1
  11. package/app/canvas/canvas.css +61 -26
  12. package/app/canvas/change-notice.tsx +10 -1
  13. package/app/canvas/comment-layer.tsx +2 -1
  14. package/app/canvas/comments.tsx +204 -82
  15. package/app/canvas/element-picker.ts +200 -27
  16. package/app/canvas/engine/canvas-gestures.ts +72 -17
  17. package/app/canvas/engine/canvas-store.ts +17 -1
  18. package/app/canvas/engine/engine.css +6 -3
  19. package/app/canvas/find-bar.tsx +817 -0
  20. package/app/canvas/find-model.ts +135 -0
  21. package/app/canvas/flow-canvas.tsx +18 -2
  22. package/app/canvas/follow-pin.ts +26 -6
  23. package/app/canvas/frame-node.tsx +43 -26
  24. package/app/canvas/imported-reviews.tsx +12 -22
  25. package/app/canvas/layout.ts +27 -0
  26. package/app/canvas/live-page.ts +142 -19
  27. package/app/canvas/page-find.ts +220 -0
  28. package/app/canvas/page-style.ts +23 -0
  29. package/app/canvas/section-node.tsx +2 -0
  30. package/app/canvas/spec-threads.ts +24 -23
  31. package/app/canvas/thread-focus.tsx +14 -12
  32. package/app/canvas/tool-cursors.ts +16 -16
  33. package/app/canvas/use-activity.ts +0 -8
  34. package/app/canvas/use-agent-changes.tsx +34 -40
  35. package/app/canvas/use-canvas-clipboard.tsx +11 -14
  36. package/app/canvas/xray.ts +3 -12
  37. package/app/frame.tsx +5 -0
  38. package/app/i18n/locales/en/messages.po +114 -12
  39. package/app/i18n/locales/en/messages.ts +1 -1
  40. package/app/i18n/locales/pseudo/messages.po +114 -12
  41. package/app/i18n/locales/pseudo/messages.ts +1 -1
  42. package/app/icons/{sets/lucide.tsx → glyphs.tsx} +7 -5
  43. package/app/icons/index.tsx +3 -3
  44. package/app/icons/types.ts +3 -10
  45. package/app/index.html +3 -3
  46. package/app/main.tsx +3 -0
  47. package/app/pages/canvas-settings.tsx +35 -0
  48. package/app/pages/canvas.tsx +27 -8
  49. package/app/pages/commands-settings.tsx +16 -2
  50. package/app/shell/about.tsx +5 -4
  51. package/app/shell/feedback-details.ts +0 -3
  52. package/app/shell/feedback-form.tsx +10 -21
  53. package/app/shell/feedback-link.tsx +2 -1
  54. package/app/shell/instructions-editor.tsx +1 -1
  55. package/app/shell/presence-style.ts +59 -0
  56. package/app/shell/presence.tsx +6 -3
  57. package/app/shell/scaled-frame.tsx +21 -9
  58. package/app/shell/settings-sections.ts +12 -0
  59. package/app/shell/sidebar.tsx +1 -1
  60. package/app/studio-ui.d.ts +0 -9
  61. package/app/types.ts +21 -205
  62. package/app/ui/file-drop.ts +128 -0
  63. package/app/ui/prompt-editor.tsx +1 -1
  64. package/app/ui/shadcn/input-group.tsx +2 -2
  65. package/dist/cli/banner.d.mts +4 -2
  66. package/dist/cli/banner.mjs +34 -11
  67. package/dist/cli/commands/app.mjs +19 -11
  68. package/dist/cli/commands/create.d.mts +26 -14
  69. package/dist/cli/commands/create.mjs +13 -7
  70. package/dist/cli/commands/dev.mjs +2 -3
  71. package/dist/cli/commands/hook.mjs +2 -1
  72. package/dist/cli/commands/init.d.mts +11 -6
  73. package/dist/cli/help.d.mts +1 -1
  74. package/dist/cli/help.mjs +3 -3
  75. package/dist/cli/main.d.mts +22 -12
  76. package/dist/config/index.d.mts +6 -5
  77. package/dist/config/project-files.d.mts +6 -3
  78. package/dist/config/project-files.mjs +14 -5
  79. package/dist/config/renamed.d.mts +0 -2
  80. package/dist/config/renamed.mjs +1 -3
  81. package/dist/config/schema.d.mts +0 -5
  82. package/dist/config/schema.mjs +0 -5
  83. package/dist/content/capture.d.mts +2 -2
  84. package/dist/content/capture.mjs +2 -2
  85. package/dist/content/content.d.mts +3 -141
  86. package/dist/content/content.mjs +7 -65
  87. package/dist/content/flow-specs.mjs +1 -1
  88. package/dist/content/prototype-summary.d.mts +3 -39
  89. package/dist/content/prototype-summary.mjs +2 -3
  90. package/dist/content/prototypes.mjs +1 -1
  91. package/dist/content/snapshot-client.mjs +1 -1
  92. package/dist/content/text-replace.d.mts +30 -0
  93. package/dist/content/text-replace.mjs +309 -0
  94. package/dist/content/thread-module.mjs +1 -1
  95. package/dist/content/threads.mjs +1 -1
  96. package/dist/paths.d.mts +0 -2
  97. package/dist/paths.mjs +1 -3
  98. package/dist/server/agent-env.d.mts +5 -1
  99. package/dist/server/agent-env.mjs +7 -2
  100. package/dist/server/agent-session.d.mts +14 -1
  101. package/dist/server/agent-session.mjs +84 -19
  102. package/dist/server/brief.mjs +3 -3
  103. package/dist/server/build-pictures.mjs +1 -1
  104. package/dist/server/channel.d.mts +19 -24
  105. package/dist/server/channel.mjs +70 -37
  106. package/dist/server/claimed-presence.d.mts +18 -0
  107. package/dist/server/claimed-presence.mjs +58 -0
  108. package/dist/server/close-check.mjs +2 -2
  109. package/dist/server/comments/actions.d.mts +153 -0
  110. package/dist/server/comments/actions.mjs +154 -0
  111. package/dist/server/comments/routes.d.mts +25 -0
  112. package/dist/server/comments/routes.mjs +88 -0
  113. package/dist/server/comments/tools.d.mts +6 -0
  114. package/dist/server/comments/tools.mjs +154 -0
  115. package/dist/server/dev-server.mjs +36 -13
  116. package/dist/server/file-errors.d.mts +7 -2
  117. package/dist/server/file-errors.mjs +31 -8
  118. package/dist/server/file-lock.d.mts +2 -2
  119. package/dist/server/file-lock.mjs +130 -36
  120. package/dist/server/mcp.d.mts +0 -2
  121. package/dist/server/mcp.mjs +7 -8
  122. package/dist/server/me.d.mts +1 -1
  123. package/dist/server/open-page.d.mts +22 -0
  124. package/dist/server/open-page.mjs +20 -2
  125. package/dist/server/outcome.d.mts +22 -0
  126. package/dist/server/outcome.mjs +8 -0
  127. package/dist/server/own-copies.mjs +2 -2
  128. package/dist/server/people.d.mts +1 -1
  129. package/dist/server/port.d.mts +12 -0
  130. package/dist/server/port.mjs +66 -14
  131. package/dist/server/presence.d.mts +4 -1
  132. package/dist/server/presence.mjs +2 -2
  133. package/dist/server/requests.d.mts +5 -1
  134. package/dist/server/requests.mjs +32 -47
  135. package/dist/server/studio-for.d.mts +5 -0
  136. package/dist/server/studio-for.mjs +18 -4
  137. package/dist/server/sync-install.d.mts +8 -12
  138. package/dist/server/sync-install.mjs +12 -30
  139. package/dist/server/thread-source.mjs +2 -2
  140. package/dist/server/tools/describe.d.mts +1 -1
  141. package/dist/server/tools/describe.mjs +1 -1
  142. package/dist/server/tools/feedback.d.mts +1 -1
  143. package/dist/server/tools/reading.mjs +13 -4
  144. package/dist/server/tools/show.d.mts +1 -1
  145. package/dist/server/tools/snapshot.d.mts +1 -1
  146. package/dist/server/tools/thread-list.mjs +1 -1
  147. package/dist/server/tools/watch.mjs +5 -3
  148. package/dist/server/vite.mjs +28 -31
  149. package/dist/server/web-app.mjs +7 -10
  150. package/dist/server/work-groups.mjs +1 -1
  151. package/dist/setup/apply.mjs +8 -14
  152. package/dist/setup/create.d.mts +4 -2
  153. package/dist/setup/create.mjs +118 -36
  154. package/dist/setup/design-system-checks.mjs +3 -12
  155. package/dist/setup/desktop-app-script.mjs +4 -3
  156. package/dist/setup/desktop-app-start.d.mts +8 -2
  157. package/dist/setup/desktop-app-start.mjs +64 -29
  158. package/dist/setup/desktop-app.d.mts +8 -0
  159. package/dist/setup/desktop-app.mjs +20 -4
  160. package/dist/setup/detect.d.mts +14 -7
  161. package/dist/setup/detect.mjs +56 -10
  162. package/dist/setup/doctor.mjs +2 -4
  163. package/dist/setup/existing-setup.d.mts +1 -3
  164. package/dist/setup/existing-setup.mjs +10 -11
  165. package/dist/setup/migrate/row-titles.mjs +1 -1
  166. package/dist/setup/own-app.d.mts +1 -2
  167. package/dist/setup/own-app.mjs +4 -5
  168. package/dist/setup/plan.d.mts +8 -6
  169. package/dist/setup/plan.mjs +64 -48
  170. package/dist/setup/project.d.mts +6 -17
  171. package/dist/setup/project.mjs +17 -61
  172. package/dist/setup/prompts.d.mts +5 -5
  173. package/dist/setup/prompts.mjs +28 -61
  174. package/dist/setup/questions.d.mts +12 -4
  175. package/dist/setup/questions.mjs +10 -25
  176. package/dist/setup/starters.d.mts +2 -0
  177. package/dist/setup/starters.mjs +26 -9
  178. package/dist/setup/workspace-setup.d.mts +1 -2
  179. package/dist/setup/workspace-setup.mjs +4 -6
  180. package/dist/setup/write.d.mts +15 -5
  181. package/dist/setup/write.mjs +35 -9
  182. package/dist/shared/annotations-core.mjs +1 -1
  183. package/dist/shared/canvas-core.mjs +1 -1
  184. package/dist/shared/canvas-file.d.mts +201 -0
  185. package/dist/shared/canvas-file.mjs +1 -0
  186. package/dist/shared/comments/routes.d.mts +53 -0
  187. package/dist/shared/comments/routes.mjs +37 -0
  188. package/dist/shared/feedback.d.mts +8 -0
  189. package/dist/shared/feedback.mjs +10 -2
  190. package/dist/shared/page-review.d.mts +2 -11
  191. package/dist/shared/page-review.mjs +4 -13
  192. package/dist/shared/presence-core.d.mts +11 -0
  193. package/dist/shared/presence-core.mjs +11 -2
  194. package/dist/shared/review-file.d.mts +5 -0
  195. package/dist/shared/review-file.mjs +23 -13
  196. package/dist/shared/server-page.mjs +7 -1
  197. package/dist/shared/signup.d.mts +2 -5
  198. package/dist/shared/signup.mjs +2 -35
  199. package/dist/shared/studio-events.d.mts +0 -6
  200. package/dist/shared/studio-events.mjs +1 -5
  201. package/dist/shared/studio-files.d.mts +12 -0
  202. package/dist/shared/studio-files.mjs +6 -1
  203. package/dist/shared/studio-routes.d.mts +16 -62
  204. package/dist/shared/studio-routes.mjs +1 -69
  205. package/dist/shared/threads-core.d.mts +2 -2
  206. package/dist/shared/threads-core.mjs +1 -1
  207. package/extension/dist/feedback.js +148 -138
  208. package/extension/dist/manifest.json +1 -1
  209. package/extension/dist/picker.js +146 -136
  210. package/package.json +3 -20
  211. package/src/cli/banner.ts +45 -11
  212. package/src/cli/commands/app.ts +23 -8
  213. package/src/cli/commands/create.ts +17 -9
  214. package/src/cli/commands/dev.ts +0 -3
  215. package/src/cli/commands/hook.ts +4 -1
  216. package/src/cli/help.ts +3 -3
  217. package/src/config/index.ts +6 -5
  218. package/src/config/project-files.ts +21 -11
  219. package/src/config/renamed.ts +0 -3
  220. package/src/config/schema.ts +0 -1
  221. package/src/content/capture.ts +6 -12
  222. package/src/content/content.ts +7 -244
  223. package/src/content/flow-specs.ts +2 -1
  224. package/src/content/prototype-summary.ts +4 -44
  225. package/src/content/review-pages.ts +2 -1
  226. package/src/content/snapshot-client.ts +1 -1
  227. package/src/content/text-replace.ts +449 -0
  228. package/src/paths.ts +0 -8
  229. package/src/server/agent-env.ts +12 -2
  230. package/src/server/agent-session.ts +124 -34
  231. package/src/server/brief.ts +8 -3
  232. package/src/server/channel.ts +121 -52
  233. package/src/server/claimed-presence.ts +93 -0
  234. package/src/server/comments/actions.ts +352 -0
  235. package/src/server/comments/routes.ts +176 -0
  236. package/src/server/comments/tools.ts +317 -0
  237. package/src/server/dev-server.ts +49 -15
  238. package/src/server/file-errors.ts +47 -13
  239. package/src/server/file-lock.ts +205 -54
  240. package/src/server/mcp.ts +13 -14
  241. package/src/server/me.ts +2 -5
  242. package/src/server/open-page.ts +54 -4
  243. package/src/server/outcome.ts +26 -0
  244. package/src/server/people.ts +2 -1
  245. package/src/server/port.ts +94 -20
  246. package/src/server/presence.ts +11 -3
  247. package/src/server/requests.ts +60 -70
  248. package/src/server/studio-for.ts +27 -3
  249. package/src/server/sync-install.ts +35 -26
  250. package/src/server/thread-place.ts +2 -4
  251. package/src/server/tools/reading.ts +16 -3
  252. package/src/server/tools/watch.ts +7 -7
  253. package/src/server/vite.ts +37 -40
  254. package/src/server/web-app.ts +14 -12
  255. package/src/setup/apply.ts +10 -16
  256. package/src/setup/create.ts +143 -37
  257. package/src/setup/design-system-checks.ts +7 -15
  258. package/src/setup/desktop-app-script.ts +4 -3
  259. package/src/setup/desktop-app-start.ts +94 -26
  260. package/src/setup/desktop-app.ts +24 -3
  261. package/src/setup/detect.ts +56 -14
  262. package/src/setup/doctor.ts +4 -4
  263. package/src/setup/existing-setup.ts +10 -12
  264. package/src/setup/own-app.ts +2 -5
  265. package/src/setup/plan.ts +93 -84
  266. package/src/setup/project.ts +25 -118
  267. package/src/setup/prompts.ts +44 -127
  268. package/src/setup/questions.ts +27 -29
  269. package/src/setup/starters.ts +35 -10
  270. package/src/setup/workspace-setup.ts +8 -18
  271. package/src/setup/write.ts +52 -9
  272. package/src/shared/canvas-file.ts +205 -0
  273. package/src/shared/comments/routes.ts +79 -0
  274. package/src/shared/feedback.ts +14 -4
  275. package/src/shared/page-review.ts +11 -16
  276. package/src/shared/presence-core.ts +16 -2
  277. package/src/shared/review-file.ts +28 -12
  278. package/src/shared/server-page.ts +11 -1
  279. package/src/shared/signup.ts +4 -28
  280. package/src/shared/studio-events.ts +0 -13
  281. package/src/shared/studio-files.ts +14 -0
  282. package/src/shared/studio-routes.ts +21 -64
  283. package/src/shared/threads-core.ts +2 -2
  284. package/templates/methods/review.md +2 -2
  285. package/templates/rules/canvas-frames.md +104 -0
  286. package/templates/rules/canvas.md +8 -142
  287. package/templates/rules/prototypes.md +1 -1
  288. package/templates/rules/snapshots.md +52 -0
  289. package/templates/starters/standalone/README.md +7 -7
  290. package/templates/starters/standalone/components.json +1 -1
  291. package/templates/starters/standalone/package.json +1 -2
  292. package/templates/starters/turborepo/README.md +6 -6
  293. package/templates/starters/turborepo/apps/web/components.json +1 -1
  294. package/templates/starters/turborepo/apps/web/package.json +1 -2
  295. package/templates/starters/turborepo/apps/web/src/app.tsx +4 -5
  296. package/templates/starters/turborepo/packages/ui/components.json +1 -1
  297. package/templates/starters/turborepo/packages/ui/package.json +1 -2
  298. package/templates/starters/vite/README.md +7 -6
  299. package/templates/starters/vite/components.json +1 -1
  300. package/templates/starters/vite/package.json +1 -2
  301. package/templates/starters/vite/src/app.tsx +3 -4
  302. package/templates/starters/vite/src/components/ui/accordion.tsx +71 -0
  303. package/templates/starters/vite/src/components/ui/attachment.tsx +1 -1
  304. package/templates/starters/vite/src/components/ui/badge.tsx +2 -2
  305. package/templates/starters/vite/src/components/ui/button.tsx +17 -12
  306. package/templates/starters/vite/src/components/ui/card.tsx +1 -1
  307. package/templates/starters/vite/src/components/ui/checkbox.tsx +28 -0
  308. package/templates/starters/vite/src/components/ui/dialog.tsx +5 -5
  309. package/templates/starters/vite/src/components/ui/dropdown-menu.tsx +17 -14
  310. package/templates/starters/vite/src/components/ui/field.tsx +3 -1
  311. package/templates/starters/vite/src/components/ui/input-group.tsx +5 -3
  312. package/templates/starters/vite/src/components/ui/input.tsx +1 -1
  313. package/templates/starters/vite/src/components/ui/label.tsx +2 -0
  314. package/templates/starters/vite/src/components/ui/native-select.tsx +3 -4
  315. package/templates/starters/vite/src/components/ui/popover.tsx +1 -1
  316. package/templates/starters/vite/src/components/ui/separator.tsx +2 -0
  317. package/templates/starters/vite/src/components/ui/spinner.tsx +3 -7
  318. package/templates/starters/vite/src/components/ui/switch.tsx +1 -1
  319. package/templates/starters/vite/src/components/ui/textarea.tsx +1 -1
  320. package/templates/starters/vite/src/components/ui/toggle.tsx +4 -2
  321. package/templates/starters/vite/src/index.css +533 -111
  322. package/app/icons/sets/hugeicons.tsx +0 -259
  323. package/app/icons/sets/phosphor.tsx +0 -251
  324. package/dist/server/icon-set.d.mts +0 -15
  325. package/dist/server/icon-set.mjs +0 -31
  326. package/dist/server/tools/close-reply.d.mts +0 -6
  327. package/dist/server/tools/close-reply.mjs +0 -138
  328. package/dist/server/tools/comment.d.mts +0 -6
  329. package/dist/server/tools/comment.mjs +0 -49
  330. package/dist/shared/icon-sets.d.mts +0 -9
  331. package/dist/shared/icon-sets.mjs +0 -21
  332. package/src/server/icon-set.ts +0 -56
  333. package/src/server/tools/close-reply.ts +0 -271
  334. package/src/server/tools/comment.ts +0 -96
  335. package/src/shared/icon-sets.ts +0 -23
  336. /package/app/public/{sudio-192.png → dex-192.png} +0 -0
  337. /package/app/public/{sudio-512.png → dex-512.png} +0 -0
  338. /package/app/public/{apple-touch-icon.png → dex-apple-touch-icon.png} +0 -0
  339. /package/app/public/{favicon-32.png → dex-icon-32.png} +0 -0
  340. /package/app/public/{favicon.svg → dex-icon.svg} +0 -0
  341. /package/app/public/{sudio-maskable-512.png → dex-maskable-512.png} +0 -0
package/app/types.ts CHANGED
@@ -3,12 +3,30 @@
3
3
  // threads-core, for the studio and the cloud workspace alike.
4
4
 
5
5
  import type { FrameAnchor } from "../src/shared/annotations-core.ts";
6
- import type { SlideLayout, Viewport } from "../src/shared/canvas-core.ts";
7
- import type { FrameGrid, FrameGuide } from "../src/shared/frame-grids.ts";
8
- import type { Sketch } from "../src/shared/sketch-core.ts";
6
+ import type {
7
+ DocFrame,
8
+ SketchFrame,
9
+ SpecFrame,
10
+ ViewFrame,
11
+ } from "../src/shared/canvas-file.ts";
9
12
 
10
13
  export type { Viewport } from "../src/shared/canvas-core.ts";
14
+ export type {
15
+ Canvas,
16
+ DocFrame,
17
+ Frame,
18
+ Row,
19
+ Section,
20
+ SketchFrame,
21
+ SpecFrame,
22
+ UnknownFrame,
23
+ ViewFrame,
24
+ } from "../src/shared/canvas-file.ts";
11
25
  export type { Sketch, SketchBox } from "../src/shared/sketch-core.ts";
26
+ export type {
27
+ Contributor,
28
+ Discipline,
29
+ } from "../src/shared/studio-files.ts";
12
30
  export type {
13
31
  ClosedStatus,
14
32
  PersonChange,
@@ -21,18 +39,6 @@ export type {
21
39
  ThreadWithPrototype,
22
40
  } from "../src/shared/threads-core.ts";
23
41
 
24
- export type Discipline = "product" | "brand" | "engineering";
25
-
26
- export interface Contributor {
27
- discipline: Discipline;
28
- /** Git user names that identify this person, so the agent knows who it is working for. */
29
- git: string[];
30
- /** Their GitHub username, for their avatar. */
31
- github?: string;
32
- name: string;
33
- slug: string;
34
- }
35
-
36
42
  export type PrototypeStatus =
37
43
  | "exploring"
38
44
  | "in-review"
@@ -56,120 +62,6 @@ export interface PrototypeManifest {
56
62
  was?: string;
57
63
  }
58
64
 
59
- interface FrameBase {
60
- /**
61
- * On a column's first frame: the id of a frame stacked further down a
62
- * column to its left, in its row, for this column to start level with
63
- * rather than at the row's top.
64
- */
65
- beside?: string;
66
- id: string;
67
- /**
68
- * The step this frame shows, counted from 1: its column on the canvas. Leave
69
- * out to follow the previous frame in the row.
70
- */
71
- step?: number;
72
- title?: string;
73
- /**
74
- * Which frame this is, for good: kept when it moves or is renamed, new on
75
- * a copy. Picks follow it. Given to the saver's frames that have none when
76
- * they save.
77
- */
78
- uid?: string;
79
- /**
80
- * Stacked directly below the frame before it in its row, in that frame's
81
- * column, rather than in a column of its own.
82
- */
83
- under?: true;
84
- }
85
-
86
- /** A live, interactive render of one of the prototype's views. */
87
- export interface ViewFrame extends FrameBase {
88
- doc?: undefined;
89
- /** The frame's own grids, shown in place of the canvas's (Figma's, pasted). */
90
- grids?: FrameGrid[];
91
- /** Guide lines on the frame. */
92
- guides?: FrameGuide[];
93
- params?: Record<string, string>;
94
- /** A fixed size in pixels, for a snapshot of one element; else the viewport's. */
95
- size?: { height: number; width: number };
96
- sketch?: undefined;
97
- /**
98
- * Where a snapshot was captured from, and when; and the image it is, when
99
- * it is one, in the prototype's folder: "images/….png".
100
- */
101
- snapshot?: { captured: string; image?: string; url: string };
102
- spec?: undefined;
103
- view: string;
104
- viewport?: Viewport;
105
- }
106
-
107
- /** A markdown document from the prototype's docs folder. */
108
- export interface DocFrame extends FrameBase {
109
- doc: string;
110
- /** A size of its own in pixels, set by resizing it; else 640 by 900. */
111
- size?: { height: number; width: number };
112
- sketch?: undefined;
113
- spec?: undefined;
114
- view?: undefined;
115
- }
116
-
117
- /**
118
- * A spec, edited in place on the canvas: a markdown file in its placer's
119
- * folder. In a section, it is that section's spec; outside any section, it is part
120
- * of the file spec.
121
- */
122
- export interface SpecFrame extends FrameBase {
123
- doc?: undefined;
124
- /**
125
- * A slide's layout: its first frame beside its words (the default), or
126
- * centred above them. Only a slide (people/<person>/slides/) has one.
127
- */
128
- layout?: SlideLayout;
129
- /**
130
- * A width of its own in pixels, set by resizing it; else 520. With a
131
- * height, it is never taller than that, and scrolls; without one, it is
132
- * as tall as its words (never less than 240). A slide's is fixed, both
133
- * ways: 1920 by 1080 until resized.
134
- */
135
- size?: { height?: number; width: number };
136
- sketch?: undefined;
137
- /** Its file, from the file's folder: "people/ana/specs/checkout.md". */
138
- spec: string;
139
- view?: undefined;
140
- }
141
-
142
- export interface SketchFrame extends FrameBase {
143
- doc?: undefined;
144
- sketch: Sketch;
145
- spec?: undefined;
146
- /** Required, as an older Dex names a frame by its title or view. */
147
- title: string;
148
- view?: undefined;
149
- }
150
-
151
- declare const readFromDisk: unique symbol;
152
-
153
- /**
154
- * A frame this Dex cannot show: a kind from a newer Dex, or a mistake.
155
- * Only reading a canvas makes one, so the studio never writes a frame that
156
- * shows nothing.
157
- */
158
- export interface UnknownFrame extends FrameBase {
159
- doc?: undefined;
160
- sketch?: undefined;
161
- spec?: undefined;
162
- view?: undefined;
163
- readonly [readFromDisk]: true;
164
- }
165
-
166
- export type Frame =
167
- | ViewFrame
168
- | DocFrame
169
- | SpecFrame
170
- | SketchFrame
171
- | UnknownFrame;
172
-
173
65
  /**
174
66
  * A frame about to be added. A view or doc frame is named after what it
175
67
  * shows; a sketch shows nothing else to name it by, so it comes with an id.
@@ -179,79 +71,3 @@ export type NewFrame =
179
71
  | Omit<DocFrame, "id">
180
72
  | SpecFrame
181
73
  | SketchFrame;
182
-
183
- /**
184
- * One pass through the section's steps: the main path, an error state, an
185
- * alternative. Its frames are the steps, left to right.
186
- */
187
- export interface Row {
188
- /**
189
- * In a person's copy of someone else's section: the id of their row this one
190
- * is shown under (people-core.ts).
191
- */
192
- after?: string;
193
- /**
194
- * Whose it is, when not its section's: someone's version of a row in
195
- * another person's section. Set when the canvas is read, never written.
196
- */
197
- author?: string;
198
- /** The id of the section in its author's file that keeps it. */
199
- copy?: string;
200
- frames: Frame[];
201
- id: string;
202
- }
203
-
204
- /**
205
- * A section. Rows below the first are iterations of it. With `at`, a frame of
206
- * its own instead: one frame, drawn at that point, with no section around it.
207
- */
208
- export interface Section {
209
- /** Where a frame of its own's top left corner is, in canvas pixels. */
210
- at?: { x: number; y: number };
211
- /**
212
- * Whose it is: the person whose people/<person>/canvas.json it is in. Set
213
- * when the canvas is read, never written; only they change it.
214
- */
215
- author?: string;
216
- /** The id of the section it is a copy of, shown right below it. */
217
- copyOf?: string;
218
- /** When it was added, as an ISO date. */
219
- created?: string;
220
- description?: string;
221
- /** Whose section it was copied from, when it is a copy. */
222
- from?: string;
223
- id: string;
224
- /**
225
- * Where the section's area starts, its top left corner in canvas pixels,
226
- * once someone has drawn it or dragged it there. None stacks it with the
227
- * others, top to bottom.
228
- */
229
- position?: { x: number; y: number };
230
- rows: Row[];
231
- /**
232
- * The least size of a section's area, in canvas pixels, once someone has
233
- * sized it or frames have left it: its frames still grow it, but it never
234
- * shrinks below this.
235
- */
236
- size?: { height: number; width: number };
237
- title: string;
238
- }
239
-
240
- /**
241
- * canvas.json: sections stacked top to bottom, and frames of their own where
242
- * they were drawn. In each section, steps run left to right and iterations
243
- * (states, errors, alternatives) top to bottom.
244
- */
245
- export interface Canvas {
246
- /**
247
- * Whose sections come first, as the canvas was read: each
248
- * person by when they joined. Never saved.
249
- */
250
- people?: readonly string[];
251
- sections: Section[];
252
- /**
253
- * Whose canvas.json has given its frames uids, as the canvas was read: a
254
- * frame of theirs with none is new. Never saved.
255
- */
256
- uidsGiven?: readonly string[];
257
- }
@@ -0,0 +1,128 @@
1
+ import { type DragEvent, useState } from "react";
2
+
3
+ // Files dragged from the desktop: every place that takes them takes them
4
+ // here, and a page refuses the rest. Two rules make a drop land in every
5
+ // browser, and WebKit (Safari, the Dex app) is why both are needed:
6
+ //
7
+ // - A drop zone takes a file drag on dragenter as well as on dragover. Just
8
+ // after the pointer crosses onto an element, WebKit goes by that element's
9
+ // dragenter alone. When it wasn't taken, WebKit fires no drop; or, if the
10
+ // element before took the drag, it opens the file in place of the page (in
11
+ // Preview, from the Dex app). Chromium fires a dragover straight after
12
+ // every dragenter, so only WebKit shows it.
13
+ // - A file drag nothing takes is refused, not left to the browser, which
14
+ // opens the file in place of the page.
15
+ //
16
+ // Dex's (packages/studio/app/ui) and Markup's (packages/markup/src/ui/dex)
17
+ // are one file: Markup's copy-from-dex script writes its copy from Dex's.
18
+
19
+ /** What a drag event carries, the browser's or React's. */
20
+ interface DragEventLike {
21
+ dataTransfer: DataTransfer | null;
22
+ preventDefault: () => void;
23
+ }
24
+
25
+ /** Whether a drag carries files: text and links dragged in are left alone. */
26
+ export const carriesFiles = <Drag extends Pick<DragEventLike, "dataTransfer">>(
27
+ event: Drag
28
+ ): event is Drag & { dataTransfer: DataTransfer } =>
29
+ event.dataTransfer?.types.includes("Files") ?? false;
30
+
31
+ /**
32
+ * Takes a file drag over a drop zone, on dragenter and dragover alike: says
33
+ * the drop is wanted, as a copy (unasked, WebKit offers Finder a move).
34
+ * Returns whether the drag carried files, so a zone can show it takes them.
35
+ */
36
+ export const takeFileDrag = (event: DragEventLike): boolean => {
37
+ if (!carriesFiles(event)) {
38
+ return false;
39
+ }
40
+ event.preventDefault();
41
+ event.dataTransfer.dropEffect = "copy";
42
+ return true;
43
+ };
44
+
45
+ /**
46
+ * A drop zone: `zone` is the handlers to spread on its element, which
47
+ * should cover all of what looks like the zone; `over` is whether files are
48
+ * being dragged over it now. `onFiles` takes what is dropped.
49
+ */
50
+ export const useFileDrop = (onFiles: (files: File[]) => void) => {
51
+ const [over, setOver] = useState(false);
52
+ const take = (event: DragEvent) => {
53
+ if (takeFileDrag(event)) {
54
+ setOver(true);
55
+ }
56
+ };
57
+ const zone = {
58
+ onDragEnter: take,
59
+ onDragLeave: (event: DragEvent) => {
60
+ // Onto a part of the zone, the drag is still over it.
61
+ const onto = event.relatedTarget;
62
+ if (!(onto instanceof Node && event.currentTarget.contains(onto))) {
63
+ setOver(false);
64
+ }
65
+ },
66
+ onDragOver: take,
67
+ onDrop: (event: DragEvent) => {
68
+ if (!carriesFiles(event)) {
69
+ return;
70
+ }
71
+ event.preventDefault();
72
+ setOver(false);
73
+ onFiles([...event.dataTransfer.files]);
74
+ },
75
+ };
76
+ return { over, zone };
77
+ };
78
+
79
+ const DRAG_TYPES = ["dragenter", "dragover", "drop"];
80
+
81
+ const isFileInput = (target: EventTarget | null): boolean =>
82
+ target instanceof HTMLInputElement && target.type === "file";
83
+
84
+ /**
85
+ * Refuses every file drag that reaches `target`, the page's window or the
86
+ * root of a part of it, with nothing taking it, so a file let go anywhere
87
+ * else is never opened in place of the page. It decides last: after every
88
+ * drop zone, and after every listener on `target` itself, even one added
89
+ * later. A file input, which takes a drop of its own, is left to do so.
90
+ * Returns how to stop.
91
+ */
92
+ export const refuseStrayFileDrops = (target: EventTarget): (() => void) => {
93
+ const refuse = (event: Event) => {
94
+ // Only drag events are listened for.
95
+ const drag = event as globalThis.DragEvent;
96
+ if (
97
+ drag.defaultPrevented ||
98
+ !carriesFiles(drag) ||
99
+ isFileInput(drag.target)
100
+ ) {
101
+ return;
102
+ }
103
+ // Cancelled, the drop is never the browser's to open. WebKit still fires
104
+ // one after a refused dragenter when the element before took the drag.
105
+ drag.preventDefault();
106
+ if (drag.type !== "drop") {
107
+ drag.dataTransfer.dropEffect = "none";
108
+ }
109
+ };
110
+ // Each drag reaches `target` twice: first on the way to the element under
111
+ // the pointer (capture), then on the way back (bubble). The first time,
112
+ // the refusal moves to the end of the listeners for the second, so the
113
+ // listeners a page added after it still go first.
114
+ const keepRefusalLast = (event: Event) => {
115
+ target.removeEventListener(event.type, refuse);
116
+ target.addEventListener(event.type, refuse);
117
+ };
118
+ for (const type of DRAG_TYPES) {
119
+ target.addEventListener(type, keepRefusalLast, { capture: true });
120
+ target.addEventListener(type, refuse);
121
+ }
122
+ return () => {
123
+ for (const type of DRAG_TYPES) {
124
+ target.removeEventListener(type, keepRefusalLast, { capture: true });
125
+ target.removeEventListener(type, refuse);
126
+ }
127
+ };
128
+ };
@@ -314,7 +314,7 @@ const TriggerMenu = ({
314
314
  // biome-ignore lint/a11y/useKeyWithClickEvents: the editor's keys choose (arrows, Enter), as focus stays in the text
315
315
  <div
316
316
  aria-selected={index === active}
317
- className="flex min-h-7 cursor-default flex-col justify-center rounded-lg px-2.5 py-1 aria-selected:bg-studio-hover"
317
+ className="flex min-h-7 shrink-0 cursor-default flex-col justify-center rounded-lg px-2.5 py-1 aria-selected:bg-studio-hover"
318
318
  id={`${id}-${index}`}
319
319
  key={choice.id}
320
320
  onClick={() => pick(choice)}
@@ -124,7 +124,7 @@ function InputGroupInput({
124
124
  <Input
125
125
  data-slot="input-group-control"
126
126
  className={cn(
127
- "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
127
+ "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 focus-visible:outline-none aria-invalid:ring-0 dark:bg-transparent",
128
128
  className
129
129
  )}
130
130
  {...props}
@@ -140,7 +140,7 @@ function InputGroupTextarea({
140
140
  <Textarea
141
141
  data-slot="input-group-control"
142
142
  className={cn(
143
- "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
143
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 focus-visible:outline-none aria-invalid:ring-0 dark:bg-transparent",
144
144
  className
145
145
  )}
146
146
  {...props}
@@ -66,10 +66,12 @@ export declare function movedLines(taken: PortTaken | undefined, port: number, l
66
66
  /**
67
67
  * Why `dex dev` did not start: the port is taken, and by what. With
68
68
  * `live`, this project's own Dex is in the way too: it is not in step
69
- * with the cloud workspace, and this one would be.
69
+ * with the cloud workspace, and this one would be. With `ownUrl`, the app
70
+ * says where this project's Dex runs instead.
70
71
  */
71
- export declare function portTakenLines(taken: PortTaken, look: Look, { because, live }?: {
72
+ export declare function portTakenLines(taken: PortTaken, look: Look, { because, live, ownUrl }?: {
72
73
  because?: KeptBecause;
73
74
  live?: boolean;
75
+ ownUrl?: string;
74
76
  }): string[];
75
77
  //#endregion
@@ -1,4 +1,4 @@
1
- import "../server/port.mjs";
1
+ import { OTHER_DEX } from "../server/port.mjs";
2
2
  import { versionsLine } from "../shared/update-core.mjs";
3
3
  import { SYMBOLS, outputMode, paint } from "./ui.mjs";
4
4
  import { stripVTControlCharacters } from "node:util";
@@ -133,28 +133,47 @@ function machineLines(machine, look) {
133
133
  }
134
134
  /** What the supervisor says as it starts the studio again. */
135
135
  const restartingLine = ({ style, terminal }) => terminal ? `${INDENT}${style("dim", "Restarting Dex…")}` : "Restarting Dex…";
136
- /** Who holds the port, as a phrase: "python3 (PID 4321)". */
137
- const holderPhrase = ({ by, pid }, style) => [by && style("bold", by), pid && style("dim", `(PID ${pid})`)].filter(Boolean).join(" ");
136
+ /**
137
+ * Who holds the port, as a phrase: "python3 (PID 4321)", or "another
138
+ * checkout's Dex (PID 57225)" for a Dex that isn't this project's.
139
+ */
140
+ const holderPhrase = ({ by, pid }, style) => [by && style("bold", by === "Dex" ? "another checkout's Dex" : by), pid && style("dim", `(PID ${pid})`)].filter(Boolean).join(" ");
138
141
  /** Why Dex did not move on to a free port, as the refusal says it. */
139
142
  const KEPT_BECAUSE = {
140
- app: () => "Dex keeps to one port, so an installed Dex app still finds it.",
143
+ app: (port) => `The Dex app opens this project on port ${port} only.`,
141
144
  asked: () => "STUDIO_PORT asks for this port, so Dex keeps to it.",
142
145
  full: (port) => `Dex found no free port from ${port} to ${port + 20 - 1}.`
143
146
  };
144
147
  /**
145
148
  * The refusal for a taken port: this project's own Dex, in the way of a
146
149
  * live one (`running` says it is running), or anything else on the port.
150
+ * `ownUrl` is where this project's Dex runs instead, which the app can't
151
+ * open but can be made again from.
147
152
  */
148
- function refusal(taken, running, style, because) {
153
+ function refusal(taken, running, style, { because, ownUrl }) {
149
154
  if (taken.sameProject) return {
150
155
  headline: `${running}, but not live.`,
151
156
  why: `Stop it, then run ${style("bold", "npx dex dev --live")} again.`,
152
157
  ways: []
153
158
  };
154
159
  const who = holderPhrase(taken, style);
160
+ const headline = `Port ${taken.port} is in use${who ? ` by ${who}` : ""}.`;
161
+ const why = KEPT_BECAUSE[because](taken.port);
162
+ if (because === "app" && ownUrl) return {
163
+ headline,
164
+ why,
165
+ lead: "Stop that process, then try again, or open this project's Dex and install the app again from it:",
166
+ ways: [style("cyan", ownUrl)]
167
+ };
168
+ if (because === "app") return {
169
+ headline,
170
+ why,
171
+ lead: "Stop that process, then try again, or move the app to a free port:",
172
+ ways: [`run ${style("bold", "npx dex dev")} in this project, which moves to one, and install the app again from it`]
173
+ };
155
174
  return {
156
- headline: `Port ${taken.port} is in use${who ? ` by ${who}` : ""}.`,
157
- why: KEPT_BECAUSE[because](taken.port),
175
+ headline,
176
+ why,
158
177
  lead: "Stop that process, or give this project its own port:",
159
178
  ways: [`set ${style("bold", "port")} in dex.config`, `or run ${style("bold", `STUDIO_PORT=${taken.port + 1} npx dex dev`)}`]
160
179
  };
@@ -166,15 +185,16 @@ function refusal(taken, running, style, because) {
166
185
  */
167
186
  function movedLines(taken, port, look) {
168
187
  if (!taken) return [];
169
- const who = taken.by === "Dex" ? "another checkout's Dex" : holderPhrase(taken, (_color, text) => text) || "another process";
188
+ const who = taken.by === "Dex" ? OTHER_DEX : holderPhrase(taken, (_color, text) => text) || "another process";
170
189
  return [noteLine("note", `Port ${taken.port} is in use by ${who}, so this Dex is on ${port}.`, look)];
171
190
  }
172
191
  /**
173
192
  * Why `dex dev` did not start: the port is taken, and by what. With
174
193
  * `live`, this project's own Dex is in the way too: it is not in step
175
- * with the cloud workspace, and this one would be.
194
+ * with the cloud workspace, and this one would be. With `ownUrl`, the app
195
+ * says where this project's Dex runs instead.
176
196
  */
177
- function portTakenLines(taken, look, { because = "app", live = false } = {}) {
197
+ function portTakenLines(taken, look, { because = "app", live = false, ownUrl } = {}) {
178
198
  const { style, terminal } = look;
179
199
  const local = style("cyan", `http://localhost:${taken.port}`);
180
200
  const pid = taken.pid ? ` ${style("dim", `(PID ${taken.pid})`)}` : "";
@@ -185,7 +205,10 @@ function portTakenLines(taken, look, { because = "app", live = false } = {}) {
185
205
  `${INDENT}${style("dim", SYMBOLS.note)} Local: ${local}`,
186
206
  ""
187
207
  ] : [`${running}, at ${local}.`];
188
- const { headline, why, lead, ways } = refusal(taken, running, style, because);
208
+ const { headline, why, lead, ways } = refusal(taken, running, style, {
209
+ because,
210
+ ownUrl
211
+ });
189
212
  if (!terminal) return [
190
213
  `${SYMBOLS.fail} ${headline}`,
191
214
  why,
@@ -2,16 +2,12 @@ import { loadProject, print } from "../command.mjs";
2
2
  import { desktopApp, desktopAppUnavailable, installDesktopApp, removeDesktopApp, revealInFinder } from "../../setup/desktop-app.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/cli/commands/app.ts
5
- /** The project's app, on a Mac that can make it. */
6
- async function projectApp() {
5
+ /** The project, on a Mac that can make its app. */
6
+ async function macProject() {
7
7
  const unavailable = desktopAppUnavailable();
8
8
  if (unavailable === "platform") throw new Error("Installing outside the browser is macOS-only for now. Install Dex from your browser instead.");
9
9
  if (unavailable === "hosted") throw new Error("A hosted studio can't install an app.");
10
- const { root, port } = await loadProject();
11
- return desktopApp({
12
- root,
13
- port
14
- });
10
+ return await loadProject();
15
11
  }
16
12
  const install = defineCommand({
17
13
  meta: {
@@ -19,9 +15,17 @@ const install = defineCommand({
19
15
  description: "Make ~/Applications/Dex.app: it starts dex dev when it isn't running, and opens the studio in its own window"
20
16
  },
21
17
  async run() {
22
- const path = await installDesktopApp(await projectApp());
18
+ const project = await macProject();
19
+ const { ownPort, studioFor } = await import("../../server/studio-for.mjs");
20
+ const found = await studioFor(project);
21
+ const app = desktopApp({
22
+ root: project.root,
23
+ port: ownPort(found) ?? project.port
24
+ });
25
+ const path = await installDesktopApp(app);
23
26
  await revealInFinder(path).catch(() => void 0);
24
- print(`Installed ${path}.`);
27
+ print(`Installed ${path}, which opens ${app.url}.`);
28
+ if (found.kind === "elsewhere") print(`Port ${found.port} is in use by ${found.holder}, so the app can start this project only once that stops.`);
25
29
  print("Find it in Launchpad, or drag it to your Dock.");
26
30
  }
27
31
  });
@@ -31,7 +35,11 @@ const remove = defineCommand({
31
35
  description: "Remove the app `dex app install` made for this project"
32
36
  },
33
37
  async run() {
34
- const app = await projectApp();
38
+ const { root, port } = await macProject();
39
+ const app = desktopApp({
40
+ root,
41
+ port
42
+ });
35
43
  await removeDesktopApp(app);
36
44
  print(`Removed ${app.name}.`);
37
45
  }
@@ -83,7 +91,7 @@ const start = defineCommand({
83
91
  process.exitCode = STARTED_EXIT;
84
92
  return;
85
93
  }
86
- const lines = started.state === "gone" ? [started.message] : banner.portTakenLines(started.taken, banner.lookOf());
94
+ const lines = started.state === "gone" ? [started.message] : banner.portTakenLines(started.taken, banner.lookOf(), { ownUrl: started.ownUrl });
87
95
  for (const line of lines) print(line);
88
96
  process.exitCode = 1;
89
97
  }
@@ -30,6 +30,16 @@ export declare const SETUP_ARGS: {
30
30
  readonly type: "boolean";
31
31
  readonly description: "No components yet: set up shadcn first";
32
32
  };
33
+ readonly preset: {
34
+ readonly type: "string";
35
+ readonly valueHint: "code";
36
+ readonly description: "shadcn's look for --shadcn: a preset's name (nova, lyra) or the code ui.shadcn.com/create gives you; implies --shadcn (default: shadcn's, base-nova)";
37
+ };
38
+ readonly base: {
39
+ readonly type: "string";
40
+ readonly valueHint: "library";
41
+ readonly description: "shadcn's component library for --shadcn: base (Base UI), radix or aria; implies --shadcn (default: the preset's)";
42
+ };
33
43
  readonly styles: {
34
44
  readonly type: "string";
35
45
  readonly valueHint: "file";
@@ -37,12 +47,7 @@ export declare const SETUP_ARGS: {
37
47
  };
38
48
  readonly primitives: {
39
49
  readonly type: "boolean";
40
- readonly description: "Build the studio's own buttons, menus and dialogs from your components; --no-primitives keeps its own (default: yes for shadcn on Base UI)";
41
- };
42
- readonly icons: {
43
- readonly type: "string";
44
- readonly valueHint: "set";
45
- readonly description: "The icon set Dex's interface draws with: lucide, phosphor or hugeicons (default: the one your components use, else lucide)";
50
+ readonly description: "Build the studio's own buttons, menus and dialogs from your components, shadcn on Base UI (default: no, Dex's own)";
46
51
  };
47
52
  readonly provider: {
48
53
  readonly type: "string";
@@ -91,15 +96,16 @@ export declare const SETUP_ARGS: {
91
96
  export declare const setupFlags: (args: {
92
97
  agent?: string;
93
98
  app?: string;
99
+ base?: string;
94
100
  in?: string;
95
101
  components?: string;
96
102
  "design-md"?: string;
97
103
  dir?: string;
98
104
  "dry-run"?: boolean;
99
- icons?: string;
100
105
  import?: string;
101
106
  json?: boolean;
102
107
  pm?: string;
108
+ preset?: string;
103
109
  primitives?: boolean;
104
110
  provider?: string;
105
111
  shadcn?: boolean;
@@ -110,15 +116,16 @@ export declare const setupFlags: (args: {
110
116
  }) => {
111
117
  agent: string | undefined;
112
118
  app: string | undefined;
119
+ base: string | undefined;
113
120
  in: string | undefined;
114
121
  components: string | undefined;
115
122
  designMd: string | undefined;
116
123
  dir: string | undefined;
117
124
  dryRun: boolean | undefined;
118
- icons: string | undefined;
119
125
  import: string | undefined;
120
126
  json: boolean | undefined;
121
127
  pm: string | undefined;
128
+ preset: string | undefined;
122
129
  primitives: boolean | undefined;
123
130
  provider: string | undefined;
124
131
  shadcn: boolean | undefined;
@@ -157,6 +164,16 @@ declare const _default: import("citty").CommandDef<{
157
164
  readonly type: "boolean";
158
165
  readonly description: "No components yet: set up shadcn first";
159
166
  };
167
+ readonly preset: {
168
+ readonly type: "string";
169
+ readonly valueHint: "code";
170
+ readonly description: "shadcn's look for --shadcn: a preset's name (nova, lyra) or the code ui.shadcn.com/create gives you; implies --shadcn (default: shadcn's, base-nova)";
171
+ };
172
+ readonly base: {
173
+ readonly type: "string";
174
+ readonly valueHint: "library";
175
+ readonly description: "shadcn's component library for --shadcn: base (Base UI), radix or aria; implies --shadcn (default: the preset's)";
176
+ };
160
177
  readonly styles: {
161
178
  readonly type: "string";
162
179
  readonly valueHint: "file";
@@ -164,12 +181,7 @@ declare const _default: import("citty").CommandDef<{
164
181
  };
165
182
  readonly primitives: {
166
183
  readonly type: "boolean";
167
- readonly description: "Build the studio's own buttons, menus and dialogs from your components; --no-primitives keeps its own (default: yes for shadcn on Base UI)";
168
- };
169
- readonly icons: {
170
- readonly type: "string";
171
- readonly valueHint: "set";
172
- readonly description: "The icon set Dex's interface draws with: lucide, phosphor or hugeicons (default: the one your components use, else lucide)";
184
+ readonly description: "Build the studio's own buttons, menus and dialogs from your components, shadcn on Base UI (default: no, Dex's own)";
173
185
  };
174
186
  readonly provider: {
175
187
  readonly type: "string";