@dexhq/canvas 0.13.0 → 0.14.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 (159) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +16 -15
  3. package/app/canvas/frame-node.tsx +34 -17
  4. package/app/canvas/tool-cursors.ts +16 -16
  5. package/app/i18n/locales/en/messages.po +26 -4
  6. package/app/i18n/locales/en/messages.ts +1 -1
  7. package/app/i18n/locales/pseudo/messages.po +26 -4
  8. package/app/i18n/locales/pseudo/messages.ts +1 -1
  9. package/app/icons/{sets/lucide.tsx → glyphs.tsx} +3 -5
  10. package/app/icons/index.tsx +3 -3
  11. package/app/icons/types.ts +3 -10
  12. package/app/index.html +3 -3
  13. package/app/pages/canvas-settings.tsx +35 -0
  14. package/app/shell/about.tsx +5 -4
  15. package/app/shell/feedback-details.ts +0 -3
  16. package/app/shell/instructions-editor.tsx +1 -1
  17. package/app/shell/presence-style.ts +59 -0
  18. package/app/shell/presence.tsx +6 -3
  19. package/app/shell/settings-sections.ts +12 -0
  20. package/app/shell/sidebar.tsx +1 -1
  21. package/app/studio-ui.d.ts +0 -9
  22. package/app/ui/prompt-editor.tsx +1 -1
  23. package/dist/cli/commands/create.d.mts +26 -14
  24. package/dist/cli/commands/create.mjs +13 -7
  25. package/dist/cli/commands/dev.mjs +2 -3
  26. package/dist/cli/commands/init.d.mts +11 -6
  27. package/dist/cli/help.d.mts +1 -1
  28. package/dist/cli/help.mjs +3 -3
  29. package/dist/cli/main.d.mts +22 -12
  30. package/dist/config/index.d.mts +6 -5
  31. package/dist/config/project-files.d.mts +0 -3
  32. package/dist/config/project-files.mjs +0 -3
  33. package/dist/config/schema.d.mts +0 -5
  34. package/dist/config/schema.mjs +0 -5
  35. package/dist/content/content.mjs +0 -3
  36. package/dist/content/snapshot-client.mjs +1 -1
  37. package/dist/paste/paste.mjs +1 -1
  38. package/dist/server/brief.mjs +3 -3
  39. package/dist/server/channel.d.mts +6 -0
  40. package/dist/server/channel.mjs +16 -1
  41. package/dist/server/claimed-presence.d.mts +17 -0
  42. package/dist/server/claimed-presence.mjs +50 -0
  43. package/dist/server/dev-server.mjs +9 -0
  44. package/dist/server/file-errors.d.mts +7 -2
  45. package/dist/server/file-errors.mjs +31 -8
  46. package/dist/server/requests.mjs +1 -1
  47. package/dist/server/studio-for.mjs +1 -1
  48. package/dist/server/vite.mjs +26 -29
  49. package/dist/server/web-app.mjs +3 -3
  50. package/dist/setup/apply.mjs +8 -14
  51. package/dist/setup/create.mjs +51 -19
  52. package/dist/setup/desktop-app.mjs +1 -1
  53. package/dist/setup/detect.d.mts +14 -5
  54. package/dist/setup/detect.mjs +56 -8
  55. package/dist/setup/doctor.mjs +1 -3
  56. package/dist/setup/existing-setup.d.mts +1 -3
  57. package/dist/setup/existing-setup.mjs +10 -11
  58. package/dist/setup/own-app.d.mts +1 -2
  59. package/dist/setup/own-app.mjs +4 -5
  60. package/dist/setup/plan.d.mts +8 -6
  61. package/dist/setup/plan.mjs +64 -48
  62. package/dist/setup/project.d.mts +0 -16
  63. package/dist/setup/project.mjs +8 -52
  64. package/dist/setup/prompts.d.mts +5 -5
  65. package/dist/setup/prompts.mjs +28 -61
  66. package/dist/setup/questions.d.mts +12 -4
  67. package/dist/setup/questions.mjs +10 -25
  68. package/dist/setup/starters.mjs +19 -8
  69. package/dist/setup/workspace-setup.d.mts +1 -2
  70. package/dist/setup/workspace-setup.mjs +4 -6
  71. package/dist/setup/write.d.mts +15 -5
  72. package/dist/setup/write.mjs +35 -9
  73. package/dist/shared/server-page.mjs +6 -0
  74. package/extension/dist/feedback.js +1 -1
  75. package/extension/dist/manifest.json +1 -1
  76. package/package.json +2 -19
  77. package/src/cli/commands/create.ts +17 -9
  78. package/src/cli/commands/dev.ts +0 -3
  79. package/src/cli/help.ts +3 -3
  80. package/src/config/index.ts +6 -5
  81. package/src/config/project-files.ts +0 -5
  82. package/src/config/schema.ts +0 -1
  83. package/src/content/content.ts +0 -3
  84. package/src/content/snapshot-client.ts +1 -1
  85. package/src/server/brief.ts +8 -3
  86. package/src/server/channel.ts +27 -0
  87. package/src/server/claimed-presence.ts +77 -0
  88. package/src/server/dev-server.ts +13 -0
  89. package/src/server/file-errors.ts +47 -13
  90. package/src/server/studio-for.ts +1 -1
  91. package/src/server/vite.ts +37 -40
  92. package/src/server/web-app.ts +3 -3
  93. package/src/setup/apply.ts +10 -16
  94. package/src/setup/create.ts +52 -20
  95. package/src/setup/desktop-app.ts +1 -1
  96. package/src/setup/detect.ts +56 -10
  97. package/src/setup/doctor.ts +4 -4
  98. package/src/setup/existing-setup.ts +10 -12
  99. package/src/setup/own-app.ts +2 -5
  100. package/src/setup/plan.ts +93 -84
  101. package/src/setup/project.ts +16 -110
  102. package/src/setup/prompts.ts +44 -127
  103. package/src/setup/questions.ts +27 -29
  104. package/src/setup/starters.ts +27 -9
  105. package/src/setup/workspace-setup.ts +8 -18
  106. package/src/setup/write.ts +52 -9
  107. package/src/shared/server-page.ts +9 -0
  108. package/templates/methods/review.md +2 -2
  109. package/templates/rules/canvas-frames.md +104 -0
  110. package/templates/rules/canvas.md +8 -142
  111. package/templates/rules/prototypes.md +1 -1
  112. package/templates/rules/snapshots.md +52 -0
  113. package/templates/starters/standalone/README.md +7 -7
  114. package/templates/starters/standalone/components.json +1 -1
  115. package/templates/starters/standalone/package.json +1 -2
  116. package/templates/starters/turborepo/README.md +6 -6
  117. package/templates/starters/turborepo/apps/web/components.json +1 -1
  118. package/templates/starters/turborepo/apps/web/package.json +1 -2
  119. package/templates/starters/turborepo/apps/web/src/app.tsx +4 -5
  120. package/templates/starters/turborepo/packages/ui/components.json +1 -1
  121. package/templates/starters/turborepo/packages/ui/package.json +1 -2
  122. package/templates/starters/vite/README.md +7 -6
  123. package/templates/starters/vite/components.json +1 -1
  124. package/templates/starters/vite/package.json +1 -2
  125. package/templates/starters/vite/src/app.tsx +3 -4
  126. package/templates/starters/vite/src/components/ui/accordion.tsx +71 -0
  127. package/templates/starters/vite/src/components/ui/attachment.tsx +1 -1
  128. package/templates/starters/vite/src/components/ui/badge.tsx +2 -2
  129. package/templates/starters/vite/src/components/ui/button.tsx +17 -12
  130. package/templates/starters/vite/src/components/ui/card.tsx +1 -1
  131. package/templates/starters/vite/src/components/ui/checkbox.tsx +28 -0
  132. package/templates/starters/vite/src/components/ui/dialog.tsx +5 -5
  133. package/templates/starters/vite/src/components/ui/dropdown-menu.tsx +17 -14
  134. package/templates/starters/vite/src/components/ui/field.tsx +3 -1
  135. package/templates/starters/vite/src/components/ui/input-group.tsx +5 -3
  136. package/templates/starters/vite/src/components/ui/input.tsx +1 -1
  137. package/templates/starters/vite/src/components/ui/label.tsx +2 -0
  138. package/templates/starters/vite/src/components/ui/native-select.tsx +3 -4
  139. package/templates/starters/vite/src/components/ui/popover.tsx +1 -1
  140. package/templates/starters/vite/src/components/ui/separator.tsx +2 -0
  141. package/templates/starters/vite/src/components/ui/spinner.tsx +3 -7
  142. package/templates/starters/vite/src/components/ui/switch.tsx +1 -1
  143. package/templates/starters/vite/src/components/ui/textarea.tsx +1 -1
  144. package/templates/starters/vite/src/components/ui/toggle.tsx +4 -2
  145. package/templates/starters/vite/src/index.css +533 -111
  146. package/app/icons/sets/hugeicons.tsx +0 -259
  147. package/app/icons/sets/phosphor.tsx +0 -251
  148. package/dist/server/icon-set.d.mts +0 -15
  149. package/dist/server/icon-set.mjs +0 -31
  150. package/dist/shared/icon-sets.d.mts +0 -9
  151. package/dist/shared/icon-sets.mjs +0 -21
  152. package/src/server/icon-set.ts +0 -56
  153. package/src/shared/icon-sets.ts +0 -23
  154. /package/app/public/{sudio-192.png → dex-192.png} +0 -0
  155. /package/app/public/{sudio-512.png → dex-512.png} +0 -0
  156. /package/app/public/{apple-touch-icon.png → dex-apple-touch-icon.png} +0 -0
  157. /package/app/public/{favicon-32.png → dex-icon-32.png} +0 -0
  158. /package/app/public/{favicon.svg → dex-icon.svg} +0 -0
  159. /package/app/public/{sudio-maskable-512.png → dex-maskable-512.png} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @dexhq/canvas
2
2
 
3
+ ## 0.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 66fc3c9: `dex create --preset <code> --base <library>` sets shadcn up with the look and library you chose, setup connects the agent that runs it, and pnpm 11 projects install without stopping on esbuild's build script. A view with an import that doesn't resolve no longer reloads in a loop, and app components beside the design system's are styled in views.
8
+ - 25da0f8: A new project from `dex create` starts with the look of Dex's own interface: round controls, a visible focus outline, Inter and Lucide icons, in place of shadcn's Vega with Hugeicons. Setup adds a `dex` script, so Dex starts with `npm run dex`; a project set up before keeps its `studio` script.
9
+ - 2a55803: Dex's interface keeps its own look: it always draws with Lucide (`ui.icons` and `--icons` are gone; `create` takes `ui.icons` out of an older config), and `create` no longer builds the interface from your shadcn components unless you pass `--primitives`. The `/` menu's long descriptions no longer overlap the next command.
10
+ - 7f7c467: Every agent shows at work on the canvas again, not only Claude Code with its hook: an agent that edits a view it holds a comment on is shown there. Settings → Canvas chooses how agents at work show: in blocks, as an edge only, or not at all.
11
+
12
+ ### Patch Changes
13
+
14
+ - edc2fcf: The studio loads again: About no longer reads a homepage the package doesn't have, and links to Dex on npm. Publishing now type-checks the interface too.
15
+ - dd3d324: The tab, home-screen and installed-app icons have new file names (`dex-icon.svg`, `dex-192.png` and the rest), so browsers and installed apps that cached the old icons fetch the Dex mark. The "Dex isn't running" page now shows it in its tab too.
16
+ - 199979a: Canvas: a step's Play stays on its label while its page is used live or resized, and Reset and Pick no longer shift it as they come and change
17
+ - 64bc15b: Agents read less to work on a canvas: `rules/canvas.md` keeps the grid, frames and ownership, and snapshots (`rules/snapshots.md`) and specs, slides, devices, wireframes and Play (`rules/canvas-frames.md`) are read only when the work is about them. The brief names Dex's rules folder once instead of on every entry.
18
+ - d304a48: Canvas tool cursors are back to the system's size: 16 px with 1 px lines, where the comment pin and Select's arrow stood well above the system pointer.
19
+
3
20
  ## 0.13.0
4
21
 
5
22
  ### Minor Changes
package/README.md CHANGED
@@ -177,11 +177,12 @@ it plans only what differs from what this version writes, as `storybook
177
177
  automigrate` does. The choices come from `dex.config.ts` first, then flags,
178
178
  then what it finds. Facts the project's files say are dropped from
179
179
  `designSystem`, only where the design system resolves the same without them;
180
- `ui.icons` and `plugins: [next()]` are added; a studio `tsconfig.json` that
181
- copies the project's paths extends its tsconfig instead; a file, an agent's
182
- config or the install an earlier run left out is made; and a `@dexhq/canvas`
183
- range too old for what it writes is raised. The config keeps its other keys,
184
- comments and formatting. What an older setup added to the project's own files
180
+ `plugins: [next()]` is added and `ui.icons`, no longer read, taken out; a
181
+ studio `tsconfig.json` that copies the project's paths extends its tsconfig
182
+ instead; a file, an agent's config or the install an earlier run left out is
183
+ made; and a `@dexhq/canvas` range too old for what it writes is raised. The
184
+ config keeps its other keys, comments and formatting. What an older setup
185
+ added to the project's own files
185
186
  (`.gitignore` lines, the `studio:build` and `studio:claude` scripts) stays,
186
187
  and the plan says so in a `note`; `DESIGN.md`, `provider.tsx`,
187
188
  `contributors.json` and files are never touched. It asks "Go ahead?" once;
@@ -275,10 +276,10 @@ Every question has a flag, so agents and CI can run it without a terminal:
275
276
  | `[folder]` | Where: the project, or a new one (default: here) |
276
277
  | `--app <name>` \| `--in <package>` | In a workspace: its own app, `apps/<name>`, or inside a package |
277
278
  | `--components <folder>` \| `none`, `--shadcn` | The components; `--shadcn` sets up shadcn first |
279
+ | `--preset <code>`, `--base base` \| `radix` \| `aria` | How `shadcn init` sets it up: a preset's name or the code [ui.shadcn.com/create](https://ui.shadcn.com/create) gives, and the component library. Either one implies `--shadcn` |
278
280
  | `--import <specifier>` | How prototypes import them, when it cannot tell |
279
281
  | `--styles <file>` \| `none` | The global stylesheet |
280
- | `--primitives`, `--no-primitives` | The studio's own interface from your components |
281
- | `--icons lucide\|phosphor\|hugeicons` | The icon set the interface draws with (`ui.icons`, always written). Default: `components.json`'s `iconLibrary`, else the set in your dependencies, else Lucide. Lucide comes with Dex; Phosphor and Hugeicons are optional peers, which setup installs when the project lacks them |
282
+ | `--primitives` | The studio's own interface from your components, when they are shadcn on Base UI (`ui.primitives`). Off by default: the interface keeps Dex's own look. |
282
283
  | `--provider <module>` \| `none` | What wraps every view (`designSystem.provider`): your own module, or none. Default: for Mantine, Chakra UI (its version decides which provider) or Radix Themes, a `provider.tsx` it writes in the studio's folder; otherwise none |
283
284
  | `--design-md draft` \| `none` \| `<path>` \| `<url>` | How `DESIGN.md` starts: a draft (default), empty, a file in the repository linked as the design system's guide, or a file or URL copied in |
284
285
  | `--agent <ids>` \| `none` | The agents: `claude,codex,cursor,copilot,opencode` |
@@ -305,7 +306,7 @@ exports, components that aren't React, a Tailwind 3 config.
305
306
  ```json
306
307
  {"step":"detect","key":"components","value":{"folder":"src/components/ui","import":"@/components/ui","count":12},"evidence":"components.json → aliases.ui","confidence":"certain"}
307
308
  {"step":"decide","key":"components","value":{"folder":"src/components/ui","import":"@/components/ui"},"source":"components.json → aliases.ui","flag":"--components"}
308
- {"step":"question","key":"icons","question":"Which icon set should Dex's interface draw with?","choices":[{"value":"phosphor","label":"Phosphor","flags":["--icons","phosphor"]},{"value":"hugeicons","label":"Hugeicons","flags":["--icons","hugeicons"]}],"default":"phosphor","flag":"--icons"}
309
+ {"step":"question","key":"styles","question":"Which stylesheet holds the design system's tokens, fonts and Tailwind?","choices":[{"value":"src/index.css","label":"src/index.css","flags":["--styles","src/index.css"]},{"value":"none","label":"None","flags":["--styles","none"]}],"default":"src/index.css","flag":"--styles"}
309
310
  {"step":"hint","key":"provider","message":"@primer/react exports BaseStyles and ThemeProvider: if its components need them, wrap every view in them with a provider module (designSystem.provider).","evidence":"node_modules/@primer/react/lib/index.d.ts"}
310
311
  {"step":"plan","action":"create","path":"dex.config.ts","detail":"design system acme, scanned from src/components/ui"}
311
312
  {"step":"write","action":"create","path":"dex.config.ts"}
@@ -316,9 +317,9 @@ exports, components that aren't React, a Tailwind 3 config.
316
317
 
317
318
  | `step` | Fields |
318
319
  | --- | --- |
319
- | `detect` | `key` (`studio` where one is set up: `{config, content}`; `workspace`, `components`, `styles`, `primitives`, `icons`, `designMd`, `agents`, `packageManager`, and `provider` when the design system needs one: `{library, component}`), `value`, `evidence`, `confidence` (`certain`, `likely`, `guess`) |
320
+ | `detect` | `key` (`studio` where one is set up: `{config, content}`; `workspace`, `components`, `styles`, `primitives`, `designMd`, `agents`, `packageManager`, and `provider` when the design system needs one: `{library, component}`), `value`, `evidence`, `confidence` (`certain`, `likely`, `guess`) |
320
321
  | `decide` | `key` (those, `dir`, and `placement` in a workspace: `{kind, folder, name}` or `{kind, folder, package}`), `value`, `source` (the flag, or the evidence), `flag`, `warning` for a guess. `designMd`'s value is `{kind: "draft", summary}` (counts of colours, typography, radii, spacing and components, the sections and the stylesheets), `{kind: "link", file}`, `{kind: "import", from, lines, problem}` or `{kind: "none"}`. `provider` (when the design system needs one, or `--provider` names one) is `{kind: "write", file, component}`, `{kind: "module", module}` or `"none"` |
321
- | `question` | A decision it took without being sure: `key` (`components`, `styles`, `icons`, `designMd`, `packageManager` or `placement`), `question` (one sentence), `choices` (what it found, plus `none` where that is an answer: each `{value, label, evidence, flags}`, `flags` the exact arguments that answer with it), `default` (the `value` it takes; left out when no choice is safe, and then a run that writes stops with code 2), `flag` |
322
+ | `question` | A decision it took without being sure: `key` (`components`, `styles`, `designMd`, `packageManager` or `placement`), `question` (one sentence), `choices` (what it found, plus `none` where that is an answer: each `{value, label, evidence, flags}`, `flags` the exact arguments that answer with it), `default` (the `value` it takes; left out when no choice is safe, and then a run that writes stops with code 2), `flag` |
322
323
  | `hint` | For the agent's part, changing nothing setup does: `key` (`provider`: a provider or theme the design system exports; `framework`: components that are Svelte, Vue, Lit or Astro; `tailwind`: a Tailwind 3 config views get; `next`: `next()` written), `message`, `evidence` |
323
324
  | `plan` | `action` (`create`, `edit`, `run`, `ask`, or `note` for what it leaves in your own files), `path` or `command`, `detail`: on a set-up studio, only what differs |
324
325
  | `write` | `action`, `path` |
@@ -490,11 +491,11 @@ run again:
490
491
  shadcn on Base UI (Vega style, Hugeicons), and its theme is plain shadcn
491
492
  neutral with Inter: the studio's own look, never the design system's.
492
493
  `node scripts/interface-components.mjs` brings them back to stock. A
493
- project's own Base UI components replace them with `ui.primitives`.
494
- - Icons (`app/icons`): one vocabulary of names (lucide's, which shadcn uses)
495
- and a set per library in `sets/`, each drawing every name. `ui.icons`
496
- picks the set and only it is bundled. To add an icon, add its name to
497
- `names.ts` and draw it in every set; TypeScript lists any set missing it.
494
+ project's own Base UI components replace them with `ui.primitives`, set
495
+ by hand or with `create --primitives`: off by default, so the interface
496
+ looks like Dex.
497
+ - Icons (`app/icons`): Lucide, by name, in `glyphs.tsx`; the interface
498
+ draws every icon through `<Icon>`. To add one, add it to `glyphs.tsx`.
498
499
  - Languages (`app/i18n`): Lingui. Write interface text with its macros
499
500
  (`<Trans>`, t`…`, msg`…`), then `npm run i18n --workspace dex`
500
501
  to extract and compile the catalogs in `app/i18n/locales` (committed).
@@ -817,6 +817,9 @@ const FrameReset = ({ onReset }: { onReset: () => void }) => {
817
817
  );
818
818
  };
819
819
 
820
+ /** Each of Pick's words, laid over the others in the one grid cell. */
821
+ const PICK_WORD = "col-start-1 row-start-1";
822
+
820
823
  /**
821
824
  * Pick: shown when you reach for the frame, until it is picked; then
822
825
  * "Picked" for good, which offers to unpick on hover. Yours alone: nobody
@@ -844,18 +847,30 @@ const PickToggle = ({
844
847
  shown={picked}
845
848
  >
846
849
  <Icon className="size-3" name="Check" />
847
- {picked ? (
848
- <>
849
- <span className="group-hover/pick:hidden">
850
- <Trans>Picked</Trans>
851
- </span>
852
- <span className="hidden group-hover/pick:inline">
853
- <Trans>Unpick</Trans>
854
- </span>
855
- </>
856
- ) : (
857
- <Trans>Pick</Trans>
858
- )}
850
+ {/* Its three words share one place, as wide as the widest, so Pick
851
+ never changes width and the actions before it never move. */}
852
+ <span className="grid">
853
+ <span className={cn(PICK_WORD, picked && "invisible")}>
854
+ <Trans>Pick</Trans>
855
+ </span>
856
+ <span
857
+ className={cn(
858
+ PICK_WORD,
859
+ picked ? "group-hover/pick:invisible" : "invisible"
860
+ )}
861
+ >
862
+ <Trans>Picked</Trans>
863
+ </span>
864
+ <span
865
+ className={cn(
866
+ PICK_WORD,
867
+ "invisible",
868
+ picked && "group-hover/pick:visible"
869
+ )}
870
+ >
871
+ <Trans>Unpick</Trans>
872
+ </span>
873
+ </span>
859
874
  </LabelAction>
860
875
  );
861
876
  };
@@ -910,7 +925,7 @@ const FrameLabel = ({
910
925
  live: boolean;
911
926
  /** Puts back a page that was used live; Reset shows while there is one. */
912
927
  onReset?: () => void;
913
- /** Whether Play shows (showsPlay). */
928
+ /** Whether Play shows: for a step of a section, always (playsFrom). */
914
929
  playable: boolean;
915
930
  /**
916
931
  * A slide's: a band, as a spec's, joined to the edge round the slide, so a
@@ -984,9 +999,11 @@ const FrameLabel = ({
984
999
  );
985
1000
  };
986
1001
 
987
- /** A step of a section plays from its label, unless it is resized or used live. */
988
- const showsPlay = (frame: Frame, draft: Size | undefined, live: boolean) =>
989
- stepFrame(frame) !== undefined && !(draft || live);
1002
+ /**
1003
+ * A step of a section plays from its label, whether or not it is used live or
1004
+ * resized: Play never comes and goes, so the label's actions keep their places.
1005
+ */
1006
+ const playsFrom = (frame: Frame) => stepFrame(frame) !== undefined;
990
1007
 
991
1008
  /** A frame's size shows under it while selected, live or resized. */
992
1009
  const showsSize = (selected: boolean, draft: Size | undefined, live: boolean) =>
@@ -1429,7 +1446,7 @@ export const FrameNode = memo(
1429
1446
  by={by}
1430
1447
  live={live}
1431
1448
  onReset={onReset}
1432
- playable={showsPlay(frame, draft, live)}
1449
+ playable={playsFrom(frame)}
1433
1450
  selected={Boolean(selected)}
1434
1451
  slide={slide}
1435
1452
  source={source}
@@ -4,8 +4,8 @@ import type { CanvasTool } from "./canvas-context";
4
4
  // around them, decided here: a layer asks for its tool's cursor rather than
5
5
  // choosing one. Each is black with a white halo, as the system's own cursors
6
6
  // are, so it reads on any page and in either theme, and is the system's size:
7
- // drawn on a 32 unit grid, shown at 20 px, the box macOS draws its arrow and
8
- // crosshair in. Its hotspot is where the tool acts, on a whole pixel: the
7
+ // drawn on a 32 unit grid, shown at 16 px, the classic cursor box: at 20 px
8
+ // the pin and arrow stood well above the system's own pointer. Its hotspot is where the tool acts, on a whole pixel: the
9
9
  // arrow's tip, the corner a comment or a spec is pinned by, the middle of a
10
10
  // crosshair. Hand and Text keep the system's hand (engine.css) and I-beam
11
11
  // (text-layer.tsx, over text it can edit), which already say what they do.
@@ -28,11 +28,11 @@ interface Cursor {
28
28
 
29
29
  const GRID = 32;
30
30
  /** The size a cursor is shown at, in CSS px. */
31
- export const CURSOR_SIZE = 20;
31
+ export const CURSOR_SIZE = 16;
32
32
  const SCALE = CURSOR_SIZE / GRID;
33
- /** Lines 1.25 px wide, haloed 1 px either side, once shown at its size. */
34
- const STROKE = 1.25 / SCALE;
35
- const HALO = 3.25 / SCALE;
33
+ /** Lines 1 px wide, haloed 0.8 px either side, once shown at its size. */
34
+ const STROKE = 1 / SCALE;
35
+ const HALO = 2.6 / SCALE;
36
36
  const INK = "#111";
37
37
 
38
38
  const path = (d: string, attributes: string) =>
@@ -48,7 +48,7 @@ const outlined = (d: string, fill?: string) =>
48
48
  path(d, `${LINE} stroke="${INK}" stroke-width="${STROKE}"`),
49
49
  ].join("");
50
50
 
51
- // A shown pixel is 1.6 units, so every hotspot is a multiple of it.
51
+ // A shown pixel is 2 units, so every hotspot is a multiple of it.
52
52
 
53
53
  /** A crosshair on (8, 8), open in the middle, for tools that aim. */
54
54
  const CROSSHAIR = "M8 1v5M8 10v5M1 8h5M10 8h5";
@@ -64,23 +64,23 @@ const aiming = (mark: string) => outlined(`${CROSSHAIR}${mark}`);
64
64
  * point while aiming. Ringed in white.
65
65
  */
66
66
  const PIN =
67
- "M3.2 26.8V15.8A13 13 0 0 1 16.2 2.8A13 13 0 0 1 29.2 15.8A13 13 0 0 1 16.2 28.8H5.2A2 2 0 0 1 3.2 26.8Z";
67
+ "M4 26V16A12 12 0 0 1 16 4A12 12 0 0 1 28 16A12 12 0 0 1 16 28H6A2 2 0 0 1 4 26Z";
68
68
 
69
69
  /** MousePointer2, the toolbar's Select, at the system arrow's size. */
70
- const ARROW = "M3.2 3.2L26.2 11.9L16.2 16.2L11.9 26.2Z";
70
+ const ARROW = "M4 4L27 12.7L17 17L12.7 27Z";
71
71
 
72
72
  /** A page, square at the corner it is pinned by, as the comment cursor is. */
73
- const PAGE = "M3.2 27.2V6.2a3 3 0 0 1 3-3h17a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3Z";
73
+ const PAGE = "M4 28V7a3 3 0 0 1 3-3h17a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3Z";
74
74
 
75
75
  const CURSORS: Record<ToolCursor, Cursor> = {
76
76
  comment: {
77
77
  fallback: "crosshair",
78
- hotspot: [3.2, 28.8],
78
+ hotspot: [4, 28],
79
79
  svg: [
80
80
  path(PIN, `fill="none" stroke="#fff" stroke-width="${HALO}"`),
81
81
  path(PIN, `fill="${INK}"`),
82
82
  path(
83
- "M16.2 10.8v10M11.2 15.8h10",
83
+ "M16 11v10M11 16h10",
84
84
  `stroke="#fff" stroke-width="${STROKE * 1.4}" stroke-linecap="round"`
85
85
  ),
86
86
  ].join(""),
@@ -107,13 +107,13 @@ const CURSORS: Record<ToolCursor, Cursor> = {
107
107
  },
108
108
  select: {
109
109
  fallback: "default",
110
- hotspot: [3.2, 3.2],
110
+ hotspot: [4, 4],
111
111
  svg: outlined(ARROW, ARROW),
112
112
  },
113
113
  spec: {
114
114
  fallback: "copy",
115
- hotspot: [3.2, 27.2],
116
- svg: outlined(`${PAGE}M9.2 11.2h11M9.2 15.7h11M9.2 20.2h7`, PAGE),
115
+ hotspot: [4, 28],
116
+ svg: outlined(`${PAGE}M10 12h11M10 16.5h11M10 21h7`, PAGE),
117
117
  },
118
118
  // ScanSearch: a lens, for reading the styles under it.
119
119
  styles: {
@@ -135,7 +135,7 @@ const CURSORS: Record<ToolCursor, Cursor> = {
135
135
  export const cursorSvg = (name: ToolCursor): string =>
136
136
  `<svg xmlns="http://www.w3.org/2000/svg" width="${CURSOR_SIZE}" height="${CURSOR_SIZE}" viewBox="0 0 ${GRID} ${GRID}">${CURSORS[name].svg}</svg>`;
137
137
 
138
- /** Rounds away floating point's dust: 3.2 × 0.625 is 2.0000000000000004. */
138
+ /** Rounds away floating point's dust, should a hotspot not be a whole unit. */
139
139
  const DUST = 1e6;
140
140
 
141
141
  /** The tool's hotspot, where its click lands, in CSS px from the cursor's corner. */
@@ -338,6 +338,10 @@ msgstr "{PRODUCT} couldn’t save its settings in this project. Check that you c
338
338
  msgid "{PRODUCT} isn’t answering. Start it again in your terminal, then open this again."
339
339
  msgstr "{PRODUCT} isn’t answering. Start it again in your terminal, then open this again."
340
340
 
341
+ #: app/shell/about.tsx
342
+ msgid "{PRODUCT} on npm"
343
+ msgstr "{PRODUCT} on npm"
344
+
341
345
  #: app/shell/welcome.tsx
342
346
  msgid "{PRODUCT}'s team can't take this right now. Try again later."
343
347
  msgstr "{PRODUCT}'s team can't take this right now. Try again later."
@@ -546,6 +550,10 @@ msgstr "Agent replied"
546
550
  msgid "Agents"
547
551
  msgstr "Agents"
548
552
 
553
+ #: app/pages/canvas-settings.tsx
554
+ msgid "Agents at work"
555
+ msgstr "Agents at work"
556
+
549
557
  #: app/canvas/comments.tsx
550
558
  #: app/shell/thread-list.tsx
551
559
  msgid "All"
@@ -707,6 +715,7 @@ msgstr "Back, and caught up."
707
715
  msgid "Base branch"
708
716
  msgstr "Base branch"
709
717
 
718
+ #: app/pages/canvas-settings.tsx
710
719
  #: app/shell/instructions-editor.tsx
711
720
  msgid "Blocks"
712
721
  msgstr "Blocks"
@@ -791,6 +800,7 @@ msgstr "Cancel"
791
800
  #: app/canvas/canvas-context-menu.tsx
792
801
  #: app/canvas/flow-canvas.tsx
793
802
  #: app/shell/page-title.ts
803
+ #: app/shell/settings-sections.ts
794
804
  msgid "Canvas"
795
805
  msgstr "Canvas"
796
806
 
@@ -1579,6 +1589,10 @@ msgstr "Each file gets a branch, merged by pull request."
1579
1589
  msgid "Each Sync merges in what’s new on this branch."
1580
1590
  msgstr "Each Sync merges in what’s new on this branch."
1581
1591
 
1592
+ #: app/pages/canvas-settings.tsx
1593
+ msgid "Edge only"
1594
+ msgstr "Edge only"
1595
+
1582
1596
  #: app/canvas/comments.tsx
1583
1597
  #: app/canvas/review-panel.tsx
1584
1598
  msgid "Edit"
@@ -1944,10 +1958,18 @@ msgstr "Home"
1944
1958
  msgid "Hover"
1945
1959
  msgstr "Hover"
1946
1960
 
1961
+ #: app/pages/canvas-settings.tsx
1962
+ msgid "How a frame an agent is changing shows it: drawn in blocks while it works, an edge round the frame, or nothing."
1963
+ msgstr "How a frame an agent is changing shows it: drawn in blocks while it works, an edge round the frame, or nothing."
1964
+
1947
1965
  #: app/pages/markup-settings.tsx
1948
1966
  msgid "How it works"
1949
1967
  msgstr "How it works"
1950
1968
 
1969
+ #: app/shell/settings-sections.ts
1970
+ msgid "How the canvas shows you what agents are doing. Kept in this browser."
1971
+ msgstr "How the canvas shows you what agents are doing. Kept in this browser."
1972
+
1951
1973
  #: app/pages/workspace-git.tsx
1952
1974
  msgid "How the team shares work from the canvas, the same way for everyone."
1953
1975
  msgstr "How the team shares work from the canvas, the same way for everyone."
@@ -2770,6 +2792,10 @@ msgstr "Notifications, {count} new"
2770
2792
  msgid "Numbered list"
2771
2793
  msgstr "Numbered list"
2772
2794
 
2795
+ #: app/pages/canvas-settings.tsx
2796
+ msgid "Off"
2797
+ msgstr "Off"
2798
+
2773
2799
  #: app/canvas/thread-place.ts
2774
2800
  msgid "On the canvas"
2775
2801
  msgstr "On the canvas"
@@ -3835,10 +3861,6 @@ msgstr "Sort by {current}"
3835
3861
  msgid "Sort: {current}"
3836
3862
  msgstr "Sort: {current}"
3837
3863
 
3838
- #: app/shell/about.tsx
3839
- msgid "Source on GitHub"
3840
- msgstr "Source on GitHub"
3841
-
3842
3864
  #: app/canvas/spec-placing.tsx
3843
3865
  #: app/canvas/toolbar.tsx
3844
3866
  msgid "Spec"