@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
@@ -6,8 +6,11 @@
6
6
  // side fails to type-check on the other.
7
7
  //
8
8
  // Bodies are not declared here, but for git's (StudioBodies): each handler
9
- // checks the fields it relies on.
10
- // Types and one list of names; no I/O, so the browser can use it too.
9
+ // checks the fields it relies on. A feature with a contract of its own
10
+ // declares its requests there, bodies and all, and its types are taken in
11
+ // here: the comments' (comments/routes.ts). The methods each request takes,
12
+ // as a list that runs, are the server's (testing/route-methods.ts).
13
+ // Types only, with no I/O, so the browser can use it too.
11
14
 
12
15
  import type { Authored } from "./annotations-core.ts";
13
16
  import type { AvatarFile } from "./avatar-file.ts";
@@ -17,6 +20,7 @@ import type {
17
20
  CommandSwitch,
18
21
  CommandsAnswer,
19
22
  } from "./commands-core.ts";
23
+ import type { CommentAnswers, CommentBodies } from "./comments/routes.ts";
20
24
  import type { Devices } from "./devices.ts";
21
25
  import type {
22
26
  GitAsk,
@@ -348,7 +352,7 @@ export type GitStepName = GitStepBody["step"];
348
352
  * The bodies the contract declares, by request and method; the rest are
349
353
  * unknown, checked by their handlers.
350
354
  */
351
- export interface StudioBodies {
355
+ export interface StudioBodies extends CommentBodies {
352
356
  "agent-launch": { POST: { agent: LaunchAgentId } };
353
357
  /** An agent's Dex server on an older Dex, by its process. */
354
358
  "agent-stop": { POST: { pid: number } };
@@ -393,7 +397,8 @@ export type StudioBodyOf<
393
397
  * Each request, by name, and its answer to each method it takes. The query
394
398
  * a request needs is in its comment.
395
399
  */
396
- export interface StudioAnswers<Own extends OwnTypes = OwnTypes> {
400
+ export interface StudioAnswers<Own extends OwnTypes = OwnTypes>
401
+ extends CommentAnswers {
397
402
  /**
398
403
  * Open an agent, or a plain terminal, where agents start: in a terminal
399
404
  * window on this Mac (`opened`), else the command to run. Only from this
@@ -536,6 +541,18 @@ export interface StudioAnswers<Own extends OwnTypes = OwnTypes> {
536
541
  GET: RemovedViewList;
537
542
  POST: { dismissed: string[]; views: string[] };
538
543
  };
544
+ /** A find and replace's changes, or what its undo put back. */
545
+ replace: {
546
+ POST:
547
+ | {
548
+ files: string[];
549
+ left?: number;
550
+ replaced: number;
551
+ skipped: number;
552
+ undo?: string;
553
+ }
554
+ | { kept: string[]; restored: string[] };
555
+ };
539
556
  /**
540
557
  * GET: how a restart goes, from this Dex or, while none answers, its
541
558
  * supervisor; POST: the run Dex restarts from.
@@ -555,8 +572,6 @@ export interface StudioAnswers<Own extends OwnTypes = OwnTypes> {
555
572
  "spec-suggestion": { POST: ThreadWithPrototype };
556
573
  /** The file each changed. */
557
574
  text: { POST: { file: string } };
558
- /** ?slug= for one prototype's, or none for every one's. */
559
- threads: { GET: ThreadWithPrototype[]; POST: ThreadWithPrototype };
560
575
  trash: { DELETE: Done };
561
576
  update: {
562
577
  /**
@@ -610,64 +625,6 @@ export type StudioRouteName = keyof StudioAnswers;
610
625
  export type StudioMethodOf<Name extends StudioRouteName> =
611
626
  keyof StudioAnswers[Name] & StudioMethod;
612
627
 
613
- /**
614
- * The requests and the methods each takes, for what has to know them as it
615
- * runs: the server's test that it serves each one as declared.
616
- */
617
- export const STUDIO_ROUTES = {
618
- canvas: ["GET", "PUT"],
619
- annotations: ["GET", "PUT", "DELETE"],
620
- events: ["GET"],
621
- "removed-views": ["GET", "POST"],
622
- reviews: ["POST"],
623
- trash: ["DELETE"],
624
- threads: ["GET", "POST"],
625
- "spec-suggestion": ["POST"],
626
- instructions: ["GET", "PUT"],
627
- focus: ["PUT"],
628
- me: ["GET"],
629
- people: ["GET"],
630
- prototypes: ["POST"],
631
- paste: ["POST"],
632
- frame: ["POST"],
633
- show: ["POST"],
634
- text: ["POST"],
635
- props: ["POST"],
636
- insert: ["POST"],
637
- screenshot: ["POST"],
638
- snapshot: ["POST"],
639
- picture: ["POST"],
640
- agents: ["GET"],
641
- edited: ["GET"],
642
- extension: ["GET"],
643
- "agent-setup": ["GET", "POST"],
644
- "agent-launch": ["POST"],
645
- "agent-stop": ["POST"],
646
- preferences: ["GET", "PUT"],
647
- watch: ["GET", "POST"],
648
- welcome: ["GET", "POST"],
649
- update: ["GET", "POST"],
650
- "machine-update": ["GET", "POST"],
651
- "other-dexes": ["GET", "POST"],
652
- restart: ["GET", "POST"],
653
- "desktop-app": ["GET", "POST"],
654
- devices: ["GET", "PUT"],
655
- git: ["GET", "POST"],
656
- "git-branches": ["GET"],
657
- "git-sync": ["POST"],
658
- "git-pull-base": ["POST"],
659
- "git-saved": ["GET", "POST"],
660
- "git-checks": ["POST"],
661
- "git-settings": ["GET", "PUT"],
662
- "build-settings": ["GET", "PUT"],
663
- commands: ["GET", "POST", "PUT", "DELETE"],
664
- "workspace-settings": ["GET", "PUT"],
665
- "workspace-icon": ["GET", "PUT", "DELETE"],
666
- avatar: ["PUT", "DELETE"],
667
- } as const satisfies {
668
- [Name in StudioRouteName]: readonly StudioMethodOf<Name>[];
669
- };
670
-
671
628
  /** The web app manifest `dex dev` serves. */
672
629
  export const MANIFEST_FILE = "manifest.webmanifest";
673
630
 
@@ -114,8 +114,8 @@ export type ThreadTarget =
114
114
  selector?: string;
115
115
  /**
116
116
  * The start of the element's text, or its label or placeholder when it
117
- * has none, to help find it in code. Its pin shows while it still
118
- * says so.
117
+ * has none, to help find it in code, and on the page when it moves.
118
+ * Its pin stays in its place when the words change.
119
119
  */
120
120
  text?: string;
121
121
  /**
@@ -26,7 +26,7 @@ design changes; you never apply one they have not approved.
26
26
  (section, row, step) where it belongs.
27
27
  - **Wireframes.** People draw boxes for a new view, or over a frame to change
28
28
  it. The thread has a `wireframe` describing each box; build it from the
29
- design system (see `rules/canvas.md`).
29
+ design system (see `rules/canvas-frames.md`).
30
30
  - **A section's spec.** A thread on a section, or on a frame in a section, that has a
31
31
  spec names it, as `flowSpec` (the spec's path; `moreFlowSpecs` names any
32
32
  other specs the section has). Read it before you answer, and follow it: it
@@ -130,7 +130,7 @@ review:
130
130
  the thread (`ask: true`).
131
131
  4. For a request for a new view: build the view in the file's `views/`,
132
132
  then put its frame in the requested cell with `place_frame` and the
133
- thread's id (by hand, see `rules/canvas.md`). A wireframe works the same
133
+ thread's id (by hand, see `rules/canvas-frames.md`). A wireframe works the same
134
134
  way: build what its boxes describe, in that cell or in the frame's view.
135
135
  Close each thread with `close`, a short summary of what changed and
136
136
  `where` it landed: the frame and the selector of the element you changed.
@@ -0,0 +1,104 @@
1
+ ---
2
+ when: A frame that is a doc, spec, note, slide or sketch; devices, grids, picks; dashed-cell requests; wireframes; Play
3
+ ---
4
+
5
+ # Frames that are not views
6
+
7
+ What a frame in `canvas.json` can be besides a view, and the requests people
8
+ make by drawing on the canvas. `rules/canvas.md` has the grid they sit in.
9
+
10
+ - Documents (`doc`) can sit in a row beside the views they discuss. They are
11
+ not steps: its play page skips them.
12
+ - A frame with a `spec` is a spec, edited in place on the canvas: `spec` is
13
+ its markdown file, from the file's folder: one a person placed (D),
14
+ `people/<person>/specs/<name>.md`. Where one is placed is what it is
15
+ for: in a section, it is that section's spec, to follow for work in that section;
16
+ outside any section, it is the file spec, for the whole file. Several outside
17
+ any section are read as a page is, left to right and top to bottom. Change a
18
+ spec of the person you work for by editing its file, and suggest changes
19
+ to anyone else's (`comment` with `spec`, `quote` and `replace`);
20
+ never write a spec frame, which people place. Its file keeps its name for
21
+ good (threads point at it); people rename its title. A paragraph kept
22
+ twice between warning notes ("Two versions of this were written at the
23
+ same time") is two people's at once: leave it for them to choose, unless
24
+ asked.
25
+ Like documents, specs are not steps: Play skips them.
26
+ - A `spec` frame whose file is in `people/<person>/slides/` is a slide: a
27
+ 1920×1080 page (its `size` when resized) that presents part of the file,
28
+ placed with ⇧D. It is not a spec: it is a step of its section, and Play
29
+ presents a section of slides as a deck. Its file is markdown as a spec's
30
+ is. Its first frame embed, `![Pay, declined](dex:frame/<uid>)` on a line
31
+ of its own, fills two thirds of the slide, live, and everything else (a
32
+ heading, a few short points, any other embed) sits in the third beside it.
33
+ `"layout": "centred"` on the frame puts that frame in the middle instead,
34
+ the words under it. A frame someone moved or scaled on the slide keeps its
35
+ place in its embed's title, `![Pay](dex:frame/<uid> "x=96 y=96 w=960")`
36
+ (its top left corner and width in the slide's pixels; its height follows
37
+ the frame's shape). Words someone put on the slide with the Text tool sit
38
+ between `<!-- text x=96 y=96 w=600 -->` and `<!-- /text -->`, each on a
39
+ line of its own (their top left corner and width; their height is their
40
+ words'). Keep those places when you change the slide, and change only the
41
+ words inside a box; leave places out of what you add. Asked to make or
42
+ change a slide of the person you work for, write its file: one frame, a
43
+ heading and a few words, not a page of text. Name a frame by the `uid` `prototype` gives it. As with a
44
+ spec, never write a slide frame yourself; people place them.
45
+ - A `spec` frame whose file is in `people/<person>/notes/` is a note: what
46
+ people wrote on the canvas for each other, placed with the Text tool. It is
47
+ not a request and Dex does not send it to you; read it when it helps you
48
+ understand a section. Leave others' notes as they are.
49
+ - A frame with a `sketch` was drawn on the canvas. `prototype` gives
50
+ its boxes as text (the first of them, for a large one). Leave it as it is,
51
+ and never write or copy one. Any other
52
+ frame with no `view`, `doc` or `spec` is a mistake, and `dex check` names it.
53
+ - People pick the frames they prefer ("Pick" beside a frame's name), each
54
+ person's in their own `people/<person>/annotations.json`. `prototype`
55
+ gives each person's picks in the order they picked them. Read them as the
56
+ directions they favour: build on a pick before the rest. Never write
57
+ anyone's picks.
58
+ - `size` gives a frame a team device's size, one that is no viewport's,
59
+ or any other. The team's devices are
60
+ in `devices.json` at the studio's root (with none, Dex's own: the three
61
+ viewports): each `{ "name", "width", "height", "kind": "touch" | "desktop",
62
+ "guide", "default" }`, one of them the default a new frame starts at. People
63
+ edit them from a frame's Device menu; leave the file alone unless asked.
64
+ - `grids` and `guides` give a frame a grid of its own, shown in place of its
65
+ device's layout guide when the grid is on. A frame's device is the one of
66
+ its size, else the nearest narrower; its `guide` names one of
67
+ `devices.json`'s `guides`, each `{ "id", "name", "grids" }`. A grid is `{ "kind": "columns" | "rows" |
68
+ "grid", "count", "size", "gutter", "offset", "align": "stretch" | "start" |
69
+ "center" | "end", "color" }` in pixels, as Figma's layout grids are; a
70
+ guide is `{ "axis": "x" | "y", "offset" }`. Frames pasted from Figma bring
71
+ theirs. Leave them alone unless asked.
72
+
73
+ ## Requests from the canvas
74
+
75
+ People can click a dashed cell and ask for a new view there. That arrives as a
76
+ thread whose target has `kind: "view"`, with its section id (`section`), row (or none,
77
+ for a new row at the end) and step. While it is open, the cell shows the request.
78
+ Build the view, add a frame for it to `canvas.json` in exactly that cell, then
79
+ resolve the thread (see `methods/review.md`).
80
+
81
+ ## Wireframes
82
+
83
+ People can also draw a wireframe: boxes of kinds of UI (navigation, table,
84
+ button and so on) on a blank page in an empty cell, or over an existing frame.
85
+ It arrives as a thread with a `sketch` (boxes in CSS pixels on the page) and,
86
+ from `threads` and `watch`, a `wireframe`: the same boxes as text,
87
+ in reading order, with boxes inside others indented under them. A box's label
88
+ is its text; commas separate items, such as tabs or table columns.
89
+
90
+ Build what it describes from the design system's components. Boxes give the
91
+ layout and the kind of UI, not exact sizes or styling: follow the design
92
+ system's spacing and type, and never draw grey boxes into the view. On a
93
+ `view` target, build the new view as above; on a `frame` target, change that
94
+ frame's view.
95
+
96
+ ## Playing and sharing a section
97
+
98
+ A section with a view has Play and Share (a link to play it) beside its name,
99
+ and each frame can play from its step: a page
100
+ at `/files/<slug>/play/<section>?row=<row>&step=<n>` that steps
101
+ through one row, filling the screen, as designed (`&size=actual`) or at a
102
+ device's width (`&viewport=mobile`). People send the link to have someone test the
103
+ journey; it works on the deployed Dex. A view's primary action can move the
104
+ section along with `useFlow().next()` from `@studio/kit/use-flow`.
@@ -120,10 +120,6 @@ archive", in the file's menu), put them back or move their own to the trash.
120
120
 
121
121
  - Every frame has an `id` unique within its row, and exactly one of `view`,
122
122
  `doc` or `spec`.
123
- - A `spec` frame whose file is in `people/<person>/notes/` is a note: what
124
- people wrote on the canvas for each other, placed with the Text tool. It is
125
- not a request and Dex does not send it to you; read it when it helps you
126
- understand a section. Leave others' notes as they are.
127
123
  - `step` is the frame's column. Leave it out when the frame simply follows the
128
124
  one before it.
129
125
  - `"under": true` stacks a frame directly below the frame before it in its
@@ -139,12 +135,7 @@ archive", in the file's menu), put them back or move their own to the trash.
139
135
  apart (a state, a device, an option) in its frames' names: "Pay, card
140
136
  declined". `npx dex check` flags a row with one.
141
137
  - `viewport` is `desktop` (1280×800, default), `tablet` (768×1024) or `mobile`
142
- (375×812). `size` (`{ "width", "height" }`) gives a frame a size of its own:
143
- a team device's that is no viewport's, or any other. The team's devices are
144
- in `devices.json` at the studio's root (with none, Dex's own: the three
145
- viewports): each `{ "name", "width", "height", "kind": "touch" | "desktop",
146
- "guide", "default" }`, one of them the default a new frame starts at. People
147
- edit them from a frame's Device menu; leave the file alone unless asked.
138
+ (375×812). `size` (`{ "width", "height" }`) gives a frame a size of its own.
148
139
  - `params` become the view's query string. A view declares the options it
149
140
  offers with `useViewControl` (see `rules/prototypes.md`).
150
141
  - `uid` is which frame it is, for good: picks follow it. Dex gives it.
@@ -152,141 +143,16 @@ archive", in the file's menu), put them back or move their own to the trash.
152
143
  Dex gives it one. Moving a frame, keep its `uid`: a frame written without
153
144
  one is a new frame, and its picks stay behind. Keep a canvas.json's
154
145
  top-level `"frameUids": true` as it is: it says its frames have uids.
155
- - `grids` and `guides` give a frame a grid of its own, shown in place of its
156
- device's layout guide when the grid is on. A frame's device is the one of
157
- its size, else the nearest narrower; its `guide` names one of
158
- `devices.json`'s `guides`, each `{ "id", "name", "grids" }`. A grid is `{ "kind": "columns" | "rows" |
159
- "grid", "count", "size", "gutter", "offset", "align": "stretch" | "start" |
160
- "center" | "end", "color" }` in pixels, as Figma's layout grids are; a
161
- guide is `{ "axis": "x" | "y", "offset" }`. Frames pasted from Figma bring
162
- theirs. Leave them alone unless asked.
163
- - Documents (`doc`) can sit in a row beside the views they discuss. They are
164
- not steps: its play page skips them.
165
- - A frame with a `spec` is a spec, edited in place on the canvas: `spec` is
166
- its markdown file, from the file's folder: one a person placed (D),
167
- `people/<person>/specs/<name>.md`. Where one is placed is what it is
168
- for: in a section, it is that section's spec, to follow for work in that section;
169
- outside any section, it is the file spec, for the whole file. Several outside
170
- any section are read as a page is, left to right and top to bottom. Change a
171
- spec of the person you work for by editing its file, and suggest changes
172
- to anyone else's (`comment` with `spec`, `quote` and `replace`);
173
- never write a spec frame, which people place. Its file keeps its name for
174
- good (threads point at it); people rename its title. A paragraph kept
175
- twice between warning notes ("Two versions of this were written at the
176
- same time") is two people's at once: leave it for them to choose, unless
177
- asked.
178
- Like documents, specs are not steps: Play skips them.
179
- - A `spec` frame whose file is in `people/<person>/slides/` is a slide: a
180
- 1920×1080 page (its `size` when resized) that presents part of the file,
181
- placed with ⇧D. It is not a spec: it is a step of its section, and Play
182
- presents a section of slides as a deck. Its file is markdown as a spec's
183
- is. Its first frame embed, `![Pay, declined](dex:frame/<uid>)` on a line
184
- of its own, fills two thirds of the slide, live, and everything else (a
185
- heading, a few short points, any other embed) sits in the third beside it.
186
- `"layout": "centred"` on the frame puts that frame in the middle instead,
187
- the words under it. A frame someone moved or scaled on the slide keeps its
188
- place in its embed's title, `![Pay](dex:frame/<uid> "x=96 y=96 w=960")`
189
- (its top left corner and width in the slide's pixels; its height follows
190
- the frame's shape). Words someone put on the slide with the Text tool sit
191
- between `<!-- text x=96 y=96 w=600 -->` and `<!-- /text -->`, each on a
192
- line of its own (their top left corner and width; their height is their
193
- words'). Keep those places when you change the slide, and change only the
194
- words inside a box; leave places out of what you add. Asked to make or
195
- change a slide of the person you work for, write its file: one frame, a
196
- heading and a few words, not a page of text. Name a frame by the `uid` `prototype` gives it. As with a
197
- spec, never write a slide frame yourself; people place them.
198
- - A frame with a `sketch` was drawn on the canvas. `prototype` gives
199
- its boxes as text (the first of them, for a large one). Leave it as it is,
200
- and never write or copy one. Any other
201
- frame with no `view`, `doc` or `spec` is a mistake, and `dex check` names it.
202
- - People pick the frames they prefer ("Pick" beside a frame's name), each
203
- person's in their own `people/<person>/annotations.json`. `prototype`
204
- gives each person's picks in the order they picked them. Read them as the
205
- directions they favour: build on a pick before the rest. Never write
206
- anyone's picks.
207
146
  - Older canvases may have `flow`, `x` and `y`. They are ignored; leave them out
208
147
  of anything you write.
209
148
 
210
- ## Requests from the canvas
211
-
212
- People can click a dashed cell and ask for a new view there. That arrives as a
213
- thread whose target has `kind: "view"`, with its section id (`section`), row (or none,
214
- for a new row at the end) and step. While it is open, the cell shows the request.
215
- Build the view, add a frame for it to `canvas.json` in exactly that cell, then
216
- resolve the thread (see `methods/review.md`).
217
-
218
- ## Wireframes
219
-
220
- People can also draw a wireframe: boxes of kinds of UI (navigation, table,
221
- button and so on) on a blank page in an empty cell, or over an existing frame.
222
- It arrives as a thread with a `sketch` (boxes in CSS pixels on the page) and,
223
- from `threads` and `watch`, a `wireframe`: the same boxes as text,
224
- in reading order, with boxes inside others indented under them. A box's label
225
- is its text; commas separate items, such as tabs or table columns.
226
-
227
- Build what it describes from the design system's components. Boxes give the
228
- layout and the kind of UI, not exact sizes or styling: follow the design
229
- system's spacing and type, and never draw grey boxes into the view. On a
230
- `view` target, build the new view as above; on a `frame` target, change that
231
- frame's view.
232
-
233
- ## Snapshots
234
-
235
- People copy elements from other pages (any site, localhost, pages behind a
236
- login) with the Dex Snapshot extension, or frames in Figma, and paste them
237
- onto the canvas. Each becomes a view named
238
- `snapshot-<site>-<what>` with its own CSS file beside it, and a frame sized to
239
- the element, in the cell the person pasted on (else the canvas's Snapshots
240
- section). From a page, its layout keeps the page's own widths (percentages,
241
- auto, grid fractions), so it reflows in a resized frame. From Figma, it keeps
242
- Figma's: fixed sizes in pixels, auto layout as flexbox, so it lays out as the
243
- frame did in Figma. It stands alone: links have no `href`, iframes are empty
244
- boxes and forms are `div`s, so nothing navigates away. Keep it that way when you change
245
- it; add behaviour with React state, not links to other pages. Buttons that
246
- opened part of the page (`aria-expanded`) already do, with an `open` state in
247
- the view; a closed part is `hidden`. Its animations' keyframes are named after
248
- its root class. The frame's `snapshot` says where it came from.
249
-
250
- An image pasted or dropped on the canvas, such as a screenshot, is a snapshot
251
- too: one `<img>` showing its file in `images/`, on a frame the image's size,
252
- whose `snapshot` has no `url`. A snapshot that is one image names its file
253
- as `snapshot.image` (`images/….png`, in the prototype's folder). Its code
254
- holds none of the design, so to rebuild or build from it, read that image.
255
- A screenshot from a Retina screen is twice the size of what it shows: when
256
- its text looks twice the design system's, build at half.
257
-
258
- A snapshot is a reference to iterate on, not built from the design system:
259
-
260
- - Change its markup and CSS directly when asked to try something on it. Keep
261
- its styles in its CSS file, scoped under its root class.
262
- - Never swap in design-system components unless asked. "Rebuild with our
263
- components" (or with a kit of your own) asks for exactly that: build a new
264
- view that matches its layout and content, in a row below it, and leave
265
- the snapshot and its CSS file as they are.
266
- - A rebuild keeps the snapshot's sizes. Where its CSS gives a fixed width or
267
- height (Figma's columns, cards, panels), the rebuild gives the same one;
268
- only what filled its parent or shrank to its content in the snapshot does
269
- so in the rebuild. A row of fixed columns rebuilt as a flex row with a gap
270
- squeezes each column to its text. Compare the rebuild with the snapshot
271
- above it before calling it done.
272
- - Do not tidy its CSS for its own sake; it records how the original looked.
273
- - From Figma, elements that were component instances say which component in
274
- `data-figma-component` (for example `Button (Size=Large)`). When rebuilding,
275
- use the design system's component of that name. Images come with the
276
- paste, fetched from Figma. One it could not fetch stays a link to Figma's
277
- servers, which stops working within days; one Figma's clipboard had no
278
- link for is grey. The paste counts both as missing: copy those again in
279
- Figma and paste, rather than keep a link or a grey box as the design.
280
-
281
- ## Playing and sharing a section
282
-
283
- A section with a view has Play and Share (a link to play it) beside its name,
284
- and each frame can play from its step: a page
285
- at `/files/<slug>/play/<section>?row=<row>&step=<n>` that steps
286
- through one row, filling the screen, as designed (`&size=actual`) or at a
287
- device's width (`&viewport=mobile`). People send the link to have someone test the
288
- journey; it works on the deployed Dex. A view's primary action can move the
289
- section along with `useFlow().next()` from `@studio/kit/use-flow`.
149
+ A frame can be more than a view: a document, a spec, a note, a slide or a
150
+ sketch, and it can carry a device, a grid or people's picks. Read
151
+ `rules/canvas-frames.md` before you change one of those, or when a thread
152
+ asks for a view in a dashed cell or sends a wireframe. A frame with a
153
+ `snapshot` was pasted from elsewhere: read `rules/snapshots.md` before you
154
+ change or rebuild it. Any other frame with no `view`, `doc` or `spec` is a
155
+ mistake, and `dex check` names it.
290
156
 
291
157
  ## How to organise it
292
158
 
@@ -37,7 +37,7 @@ files/<slug>/
37
37
  canvas.json their sections on the canvas (see rules/canvas.md)
38
38
  data.ts their mock data, in the shape production uses
39
39
  views/*.tsx one screen each, default export, no props
40
- specs/*.md specs they placed on the canvas (rules/canvas.md)
40
+ specs/*.md specs they placed on the canvas (rules/canvas-frames.md)
41
41
  docs/*.md critiques, briefs, handoff notes; the first # heading is the title; the team's
42
42
  images/ images views show, named for what they hold
43
43
  ```
@@ -0,0 +1,52 @@
1
+ ---
2
+ when: A snapshot: a view pasted onto the canvas from a page, Figma or an image, or rebuilding one with the design system
3
+ ---
4
+
5
+ # Snapshots
6
+
7
+
8
+ People copy elements from other pages (any site, localhost, pages behind a
9
+ login) with the Dex Snapshot extension, or frames in Figma, and paste them
10
+ onto the canvas. Each becomes a view named
11
+ `snapshot-<site>-<what>` with its own CSS file beside it, and a frame sized to
12
+ the element, in the cell the person pasted on (else the canvas's Snapshots
13
+ section). From a page, its layout keeps the page's own widths (percentages,
14
+ auto, grid fractions), so it reflows in a resized frame. From Figma, it keeps
15
+ Figma's: fixed sizes in pixels, auto layout as flexbox, so it lays out as the
16
+ frame did in Figma. It stands alone: links have no `href`, iframes are empty
17
+ boxes and forms are `div`s, so nothing navigates away. Keep it that way when you change
18
+ it; add behaviour with React state, not links to other pages. Buttons that
19
+ opened part of the page (`aria-expanded`) already do, with an `open` state in
20
+ the view; a closed part is `hidden`. Its animations' keyframes are named after
21
+ its root class. The frame's `snapshot` says where it came from.
22
+
23
+ An image pasted or dropped on the canvas, such as a screenshot, is a snapshot
24
+ too: one `<img>` showing its file in `images/`, on a frame the image's size,
25
+ whose `snapshot` has no `url`. A snapshot that is one image names its file
26
+ as `snapshot.image` (`images/….png`, in the prototype's folder). Its code
27
+ holds none of the design, so to rebuild or build from it, read that image.
28
+ A screenshot from a Retina screen is twice the size of what it shows: when
29
+ its text looks twice the design system's, build at half.
30
+
31
+ A snapshot is a reference to iterate on, not built from the design system:
32
+
33
+ - Change its markup and CSS directly when asked to try something on it. Keep
34
+ its styles in its CSS file, scoped under its root class.
35
+ - Never swap in design-system components unless asked. "Rebuild with our
36
+ components" (or with a kit of your own) asks for exactly that: build a new
37
+ view that matches its layout and content, in a row below it, and leave
38
+ the snapshot and its CSS file as they are.
39
+ - A rebuild keeps the snapshot's sizes. Where its CSS gives a fixed width or
40
+ height (Figma's columns, cards, panels), the rebuild gives the same one;
41
+ only what filled its parent or shrank to its content in the snapshot does
42
+ so in the rebuild. A row of fixed columns rebuilt as a flex row with a gap
43
+ squeezes each column to its text. Compare the rebuild with the snapshot
44
+ above it before calling it done.
45
+ - Do not tidy its CSS for its own sake; it records how the original looked.
46
+ - From Figma, elements that were component instances say which component in
47
+ `data-figma-component` (for example `Button (Size=Large)`). When rebuilding,
48
+ use the design system's component of that name. Images come with the
49
+ paste, fetched from Figma. One it could not fetch stays a link to Figma's
50
+ servers, which stops working within days; one Figma's clipboard had no
51
+ link for is grey. The paste counts both as missing: copy those again in
52
+ Figma and paste, rather than keep a link or a grey box as the design.
@@ -4,15 +4,15 @@ A standalone studio: Dex on its own, with no app beside it, for
4
4
  design teams without an app repository.
5
5
 
6
6
  ```sh
7
- __PM__ run studio # the studio: files on your components
7
+ __PM__ run dex # Dex: files on your components
8
8
  ```
9
9
 
10
- Your components are in `src/components/ui`: shadcn on Base UI, in the Vega
11
- style with Hugeicons, as the shadcn CLI adds them (`components.json`). Add more
12
- with `npx shadcn@latest add <name>`, or replace them with your own. The studio
13
- found them, and its agents build files with them. The studio's own
14
- buttons, menus and dialogs are these components too (`ui.primitives` in
15
- `dex.config.ts`).
10
+ Your components are in `src/components/ui`: shadcn on Base UI in
11
+ the look of Dex's own interface: Inter, Lucide icons, round controls and a visible
12
+ focus outline, with the tokens in `src/index.css`. Add more with
13
+ `npx shadcn@latest add <name>` (`components.json`), or replace them with your own. The studio
14
+ found them, and its agents build files with them. Dex's own interface keeps
15
+ its own buttons, menus and icons, whatever your components look like.
16
16
 
17
17
  If your design system is a published package, install it and point
18
18
  `designSystem` in `dex.config.ts` at it.
@@ -10,7 +10,7 @@
10
10
  "cssVariables": true,
11
11
  "prefix": ""
12
12
  },
13
- "iconLibrary": "hugeicons",
13
+ "iconLibrary": "lucide",
14
14
  "rtl": false,
15
15
  "aliases": {
16
16
  "components": "@/components",
@@ -6,10 +6,9 @@
6
6
  "dependencies": {
7
7
  "@base-ui/react": "^1.9.0",
8
8
  "@fontsource-variable/inter": "^5.3.0",
9
- "@hugeicons/core-free-icons": "^4.3.5",
10
- "@hugeicons/react": "^1.1.10",
11
9
  "class-variance-authority": "^0.7.1",
12
10
  "cn": "^0.4.0",
11
+ "lucide-react": "^0.525.0",
13
12
  "react": "^19.1.0",
14
13
  "react-dom": "^19.1.0",
15
14
  "shadcn": "^4.21.4",
@@ -4,19 +4,19 @@ A Turborepo with Dex: an app, a shared design system package and the
4
4
  studio as an app of its own, the shape most product teams have.
5
5
 
6
6
  ```sh
7
- __PM__ run dev # every app: the web app and the studio
8
- __PM__ run studio # the studio only: files on @workspace/ui
7
+ __PM__ run dev # every app: the web app and Dex
8
+ __PM__ run dex # Dex only: files on @workspace/ui
9
9
  ```
10
10
 
11
11
  | Folder | What |
12
12
  | --- | --- |
13
13
  | `apps/web` | Your product: Vite and React, built from `@workspace/ui`. |
14
- | `packages/ui` | The design system, `@workspace/ui`: shadcn on Base UI, in the Vega style with Hugeicons, with the tokens in `src/styles/globals.css`. |
14
+ | `packages/ui` | The design system, `@workspace/ui`: shadcn on Base UI in the look of Dex's own interface (Inter, Lucide icons), with the tokens in `src/styles/globals.css`. |
15
15
  | `apps/studio` | Dex. It depends on `@workspace/ui` as `apps/web` does, and its agents build files with those components. |
16
16
 
17
17
  Add components to the shared package with `npx shadcn@latest add <name>` from
18
- `apps/web` (its `components.json` sends them to `packages/ui`). The studio's own
19
- buttons, menus and dialogs are these components too (`ui.primitives` in
20
- `apps/studio/dex.config.ts`).
18
+ `apps/web` (its `components.json` sends them to `packages/ui`). Dex's own
19
+ interface keeps its own buttons, menus and icons, whatever your components look
20
+ like.
21
21
 
22
22
  Dex files and guidelines for agents (`DESIGN.md`) are in `apps/studio`.
@@ -10,7 +10,7 @@
10
10
  "cssVariables": true,
11
11
  "prefix": ""
12
12
  },
13
- "iconLibrary": "hugeicons",
13
+ "iconLibrary": "lucide",
14
14
  "rtl": false,
15
15
  "aliases": {
16
16
  "components": "@/components",
@@ -10,9 +10,8 @@
10
10
  "typecheck": "tsc --noEmit"
11
11
  },
12
12
  "dependencies": {
13
- "@hugeicons/core-free-icons": "^4.3.5",
14
- "@hugeicons/react": "^1.1.10",
15
13
  "@workspace/ui": "workspace:*",
14
+ "lucide-react": "^0.525.0",
16
15
  "react": "^19.1.0",
17
16
  "react-dom": "^19.1.0"
18
17
  },
@@ -1,5 +1,3 @@
1
- import { ArrowRight01Icon } from "@hugeicons/core-free-icons";
2
- import { HugeiconsIcon } from "@hugeicons/react";
3
1
  import { Badge } from "@workspace/ui/components/badge";
4
2
  import { Button } from "@workspace/ui/components/button";
5
3
  import {
@@ -10,6 +8,7 @@ import {
10
8
  CardHeader,
11
9
  CardTitle,
12
10
  } from "@workspace/ui/components/card";
11
+ import { ArrowRightIcon } from "lucide-react";
13
12
 
14
13
  export function App() {
15
14
  return (
@@ -28,14 +27,14 @@ export function App() {
28
27
  </CardHeader>
29
28
  <CardContent>
30
29
  <p className="text-muted-foreground">
31
- Prototype it in the studio, apps/studio: run{" "}
32
- <code>__PM__ run studio</code> from the repository's root.
30
+ Prototype it in Dex, apps/studio: run <code>__PM__ run dex</code>{" "}
31
+ from the repository's root.
33
32
  </p>
34
33
  </CardContent>
35
34
  <CardFooter>
36
35
  <Button>
37
36
  Get going
38
- <HugeiconsIcon data-icon="inline-end" icon={ArrowRight01Icon} />
37
+ <ArrowRightIcon data-icon="inline-end" />
39
38
  </Button>
40
39
  </CardFooter>
41
40
  </Card>
@@ -10,7 +10,7 @@
10
10
  "cssVariables": true,
11
11
  "prefix": ""
12
12
  },
13
- "iconLibrary": "hugeicons",
13
+ "iconLibrary": "lucide",
14
14
  "rtl": false,
15
15
  "aliases": {
16
16
  "components": "@workspace/ui/components",