@dexhq/canvas 0.17.0 → 0.18.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 (174) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/app/canvas/canvas-commands.ts +2 -10
  3. package/app/canvas/canvas-context.tsx +11 -2
  4. package/app/canvas/canvas-document.ts +5 -1
  5. package/app/canvas/canvas-keys.ts +1 -1
  6. package/app/canvas/canvas-model.ts +195 -20
  7. package/app/canvas/canvas-scene.ts +176 -171
  8. package/app/canvas/canvas-ui.ts +4 -11
  9. package/app/canvas/canvas.css +159 -179
  10. package/app/canvas/change-pictures.tsx +156 -0
  11. package/app/canvas/comment-drafts.ts +31 -0
  12. package/app/canvas/comment-layer.tsx +125 -71
  13. package/app/canvas/comments.tsx +38 -2
  14. package/app/canvas/element-picker.ts +20 -0
  15. package/app/canvas/engine/canvas-gestures.ts +15 -3
  16. package/app/canvas/engine/canvas-store.ts +5 -0
  17. package/app/canvas/engine/canvas-view.tsx +22 -5
  18. package/app/canvas/find-bar.tsx +57 -41
  19. package/app/canvas/flow-canvas.tsx +147 -272
  20. package/app/canvas/frame-copies.ts +14 -17
  21. package/app/canvas/frame-drops.ts +15 -7
  22. package/app/canvas/frame-inspector.ts +192 -41
  23. package/app/canvas/frame-node.tsx +123 -75
  24. package/app/canvas/frame-resize.tsx +321 -83
  25. package/app/canvas/insert-hint.tsx +5 -15
  26. package/app/canvas/inspect-layer.tsx +73 -19
  27. package/app/canvas/label-action.tsx +13 -2
  28. package/app/canvas/layout.ts +233 -98
  29. package/app/canvas/live-page.ts +5 -0
  30. package/app/canvas/new-frame.ts +10 -25
  31. package/app/canvas/note-placing.ts +55 -84
  32. package/app/canvas/picked-box.tsx +5 -0
  33. package/app/canvas/picks-menu.tsx +3 -9
  34. package/app/canvas/readable-colour.ts +52 -0
  35. package/app/canvas/request-node.tsx +19 -10
  36. package/app/canvas/scrolling-page.ts +45 -0
  37. package/app/canvas/section-node.tsx +36 -53
  38. package/app/canvas/settle.ts +21 -0
  39. package/app/canvas/snapping.ts +96 -8
  40. package/app/canvas/spec-frame.tsx +8 -5
  41. package/app/canvas/spot-pins.tsx +15 -3
  42. package/app/canvas/stack-frame.tsx +13 -57
  43. package/app/canvas/stack-model.ts +5 -0
  44. package/app/canvas/stack-toggle.tsx +89 -0
  45. package/app/canvas/styles-layer.tsx +23 -43
  46. package/app/canvas/text-layer.tsx +26 -10
  47. package/app/canvas/thread-focus.tsx +18 -1
  48. package/app/canvas/tool-cursors.ts +2 -2
  49. package/app/canvas/toolbar-parts.tsx +48 -8
  50. package/app/canvas/toolbar.tsx +12 -10
  51. package/app/canvas/use-canvas-clipboard.tsx +13 -5
  52. package/app/canvas/use-reveal.ts +86 -0
  53. package/app/editor/extensions.ts +2 -0
  54. package/app/editor/line-break-caret.ts +57 -0
  55. package/app/git/branch-panel.tsx +61 -20
  56. package/app/i18n/locales/en/messages.po +64 -17
  57. package/app/i18n/locales/en/messages.ts +1 -1
  58. package/app/i18n/locales/pseudo/messages.po +64 -17
  59. package/app/i18n/locales/pseudo/messages.ts +1 -1
  60. package/app/icons/glyphs.tsx +2 -0
  61. package/app/live/studio-live.ts +29 -9
  62. package/app/pages/canvas.tsx +1 -1
  63. package/app/pages/commands-settings.tsx +70 -76
  64. package/app/pages/play-bar.tsx +6 -11
  65. package/app/pages/play.tsx +52 -33
  66. package/app/shell/feedback-form.tsx +29 -5
  67. package/app/ui/prompt-editor.tsx +2 -0
  68. package/app/ui/use-field-list.ts +90 -0
  69. package/dist/cli/commands/mcp.mjs +6 -4
  70. package/dist/cli/mcp-relay.mjs +10 -6
  71. package/dist/content/content.d.mts +26 -9
  72. package/dist/content/content.mjs +65 -8
  73. package/dist/content/screenshot.d.mts +2 -0
  74. package/dist/content/screenshot.mjs +3 -0
  75. package/dist/content/snapshot-client.d.mts +2 -0
  76. package/dist/content/snapshot-client.mjs +12 -1
  77. package/dist/inspector.js +96 -19
  78. package/dist/paste/paste.d.mts +5 -0
  79. package/dist/paste/paste.mjs +7 -2
  80. package/dist/server/agent-tools.d.mts +1 -0
  81. package/dist/server/agent-tools.mjs +4 -3
  82. package/dist/server/change-picture-store.d.mts +13 -0
  83. package/dist/server/change-picture-store.mjs +42 -0
  84. package/dist/server/change-pictures.d.mts +25 -0
  85. package/dist/server/change-pictures.mjs +104 -0
  86. package/dist/server/close-check.d.mts +11 -0
  87. package/dist/server/close-check.mjs +37 -5
  88. package/dist/server/comments/agent-actions.d.mts +8 -4
  89. package/dist/server/comments/agent-actions.mjs +16 -7
  90. package/dist/server/comments/close-tools.mjs +7 -5
  91. package/dist/server/comments/files.d.mts +5 -1
  92. package/dist/server/comments/hand-out.d.mts +1 -1
  93. package/dist/server/comments/hand-out.mjs +4 -1
  94. package/dist/server/comments/push.d.mts +19 -10
  95. package/dist/server/comments/push.mjs +45 -30
  96. package/dist/server/comments/studio-files.d.mts +14 -1
  97. package/dist/server/comments/studio-files.mjs +44 -31
  98. package/dist/server/comments/tools.d.mts +1 -1
  99. package/dist/server/comments/workspace.mjs +1 -0
  100. package/dist/server/dev-server.mjs +34 -0
  101. package/dist/server/own-copies.mjs +4 -23
  102. package/dist/server/requests.mjs +57 -3
  103. package/dist/server/response-budget.d.mts +2 -1
  104. package/dist/server/response-budget.mjs +4 -3
  105. package/dist/server/roster.d.mts +19 -8
  106. package/dist/server/roster.mjs +50 -22
  107. package/dist/server/studio-for.d.mts +7 -0
  108. package/dist/server/studio-for.mjs +23 -7
  109. package/dist/server/thread-forms.d.mts +3 -0
  110. package/dist/server/thread-forms.mjs +21 -1
  111. package/dist/server/tools/place-frame.d.mts +1 -0
  112. package/dist/server/tools/place-frame.mjs +33 -9
  113. package/dist/server/tools/result.mjs +2 -2
  114. package/dist/server/tools/snapshot.d.mts +1 -1
  115. package/dist/server/tools/snapshot.mjs +2 -1
  116. package/dist/server/tools/studio-context.d.mts +2 -1
  117. package/dist/server/tools/studio-context.mjs +2 -1
  118. package/dist/server/tools/watch.mjs +29 -12
  119. package/dist/server/work-groups.mjs +1 -1
  120. package/dist/shared/canvas-core.d.mts +39 -5
  121. package/dist/shared/canvas-core.mjs +60 -15
  122. package/dist/shared/canvas-file.d.mts +7 -4
  123. package/dist/shared/change-pictures-core.d.mts +6 -0
  124. package/dist/shared/change-pictures-core.mjs +5 -0
  125. package/dist/shared/page-looks.d.mts +12 -0
  126. package/dist/shared/page-looks.mjs +49 -0
  127. package/dist/shared/snapshot-clipboard.d.mts +6 -0
  128. package/dist/shared/studio-routes.d.mts +11 -0
  129. package/extension/dist/manifest.json +1 -1
  130. package/extension/dist/picker.js +114 -108
  131. package/package.json +4 -3
  132. package/src/cli/commands/mcp.ts +18 -8
  133. package/src/cli/mcp-relay.ts +13 -6
  134. package/src/content/content.ts +90 -16
  135. package/src/content/screenshot.ts +9 -1
  136. package/src/content/snapshot-client.ts +17 -0
  137. package/src/paste/paste.ts +18 -1
  138. package/src/server/agent-tools.ts +5 -4
  139. package/src/server/change-picture-store.ts +71 -0
  140. package/src/server/change-pictures.ts +244 -0
  141. package/src/server/close-check.ts +69 -6
  142. package/src/server/comments/agent-actions.ts +51 -12
  143. package/src/server/comments/close-tools.ts +20 -10
  144. package/src/server/comments/files.ts +10 -2
  145. package/src/server/comments/hand-out.ts +2 -2
  146. package/src/server/comments/push.ts +94 -46
  147. package/src/server/comments/studio-files.ts +77 -46
  148. package/src/server/comments/workspace.ts +1 -0
  149. package/src/server/dev-server.ts +70 -0
  150. package/src/server/own-copies.ts +5 -33
  151. package/src/server/requests.ts +84 -4
  152. package/src/server/response-budget.ts +5 -3
  153. package/src/server/roster.ts +78 -28
  154. package/src/server/studio-for.ts +32 -7
  155. package/src/server/thread-forms.ts +41 -1
  156. package/src/server/tools/place-frame.ts +71 -14
  157. package/src/server/tools/result.ts +2 -2
  158. package/src/server/tools/snapshot.ts +2 -1
  159. package/src/server/tools/studio-context.ts +24 -14
  160. package/src/server/tools/watch.ts +38 -13
  161. package/src/server/work-groups.ts +1 -1
  162. package/src/shared/canvas-core.ts +119 -27
  163. package/src/shared/canvas-file.ts +7 -4
  164. package/src/shared/change-pictures-core.ts +8 -0
  165. package/src/shared/page-looks.ts +133 -0
  166. package/src/shared/snapshot-clipboard.ts +6 -0
  167. package/src/shared/studio-routes.ts +7 -1
  168. package/templates/agents/dex-worker.md +9 -7
  169. package/templates/feedback-workflow.md +1 -1
  170. package/templates/methods/review.md +7 -6
  171. package/templates/rules/canvas-frames.md +8 -7
  172. package/templates/rules/canvas.md +10 -8
  173. package/templates/rules/prototypes.md +5 -3
  174. package/app/canvas/stack-node.tsx +0 -100
@@ -209,16 +209,19 @@ const kinded = (frame) => ({
209
209
  /** Whether a frame is a note: a spec frame whose file is a note's. */
210
210
  const isNoteFrame = (frame) => frameKind(frame) === "spec" && isNotePath(frame.spec);
211
211
  /**
212
- * Whether a frame is a section header: a note marked `header`, drawn as a
213
- * band across the canvas (layout.ts).
212
+ * Whether a frame is a section header: a note marked `header`, its words
213
+ * large, placed as any note is and filling what it is in (layout.ts).
214
214
  */
215
215
  const isHeaderFrame = (frame) => frame.header === true && isNoteFrame(frame);
216
216
  /**
217
217
  * A section's one frame, when it stands on its own (`at`) with nothing else:
218
- * where a section header always is.
218
+ * where a section header across the canvas is.
219
219
  */
220
220
  const aloneIn = (section, frames) => placedAt(section) && frames.length === 1 ? frames[0] : void 0;
221
- /** Whether a section is a section header standing on its own. */
221
+ /**
222
+ * Whether a section is a section header standing on its own: a band across
223
+ * the canvas's content, splitting it into parts (layout.ts).
224
+ */
222
225
  const isHeaderSection = (section) => {
223
226
  const frame = aloneIn(section, section.rows.flatMap((row) => row.frames));
224
227
  return frame !== void 0 && isHeaderFrame(frame);
@@ -600,7 +603,8 @@ const stackSectionPiles = (section) => {
600
603
  /**
601
604
  * The cell a request for a new view fills: a step in its row, or in a new
602
605
  * row, right above the row `above` names (a step in a row has no row to go
603
- * above), else at the end of the section.
606
+ * above), else at the end of the section. An agent's may leave the step out
607
+ * (AskedCell).
604
608
  */
605
609
  const requestCell = ({ above, row, section, step }) => {
606
610
  if (row) return {
@@ -617,6 +621,55 @@ const requestCell = ({ above, row, section, step }) => {
617
621
  step
618
622
  };
619
623
  };
624
+ /** A row's frames, or none when the section or row is not there. */
625
+ const rowFrames = (canvas, section, row) => canvas.sections.find((entry) => entry.id === section)?.rows.find((entry) => row !== void 0 && entry.id === row)?.frames ?? [];
626
+ /**
627
+ * The step of a cell an agent asks for: its own, when given; else the step
628
+ * right of `after`, or the free step at the end of its row and of `past`
629
+ * (the row it was asked in, when the frame goes in a row of the person's
630
+ * own below it). A frame for the view already in the row from there on is
631
+ * kept where it is, so asking again finds it. A new row's free step is its
632
+ * first.
633
+ */
634
+ function stepAsked(canvas, cell, view, past) {
635
+ if (cell.step !== void 0) return cell.step;
636
+ const frames = rowFrames(canvas, cell.section, cell.row);
637
+ const steps = stepsOf(frames);
638
+ const from = (cell.after ?? 0) + 1;
639
+ const kept = steps.find((step, index) => {
640
+ const frame = frames[index];
641
+ return step >= from && frame !== void 0 && frameKind(frame) === "view" && frame.view === view;
642
+ });
643
+ if (kept !== void 0) return kept;
644
+ if (cell.after !== void 0) return cell.after + 1;
645
+ const ends = [cell.row, past].map((row) => Math.max(0, ...stepsOf(rowFrames(canvas, cell.section, row))));
646
+ return Math.max(...ends) + 1;
647
+ }
648
+ /** Where the frame with a key is in its row; undefined when none has it. */
649
+ const whereInRow = (canvas, key) => {
650
+ const { section, row, frame } = parseFrameKey(key);
651
+ const frames = rowFrames(canvas, section, row);
652
+ const steps = stepsOf(frames);
653
+ const step = steps[frames.findIndex((entry) => entry.id === frame)];
654
+ if (step === void 0) return;
655
+ const left = Math.max(0, ...frames.flatMap((entry, index) => {
656
+ const at = steps[index] ?? 0;
657
+ return at < step && !isWordsFrame(entry) ? [at] : [];
658
+ }));
659
+ const top = left > 0 ? stackTopIn({ frames }, {
660
+ section,
661
+ row,
662
+ step: left
663
+ }) : void 0;
664
+ return top === void 0 ? { step } : {
665
+ step,
666
+ rightOf: frameKey({
667
+ section,
668
+ row,
669
+ frame: top
670
+ })
671
+ };
672
+ };
620
673
  /**
621
674
  * Put a new row among a section's rows: right above the row `above` names,
622
675
  * as the + on the line between two rows asks, else below the others.
@@ -909,14 +962,6 @@ const placeProblems = (section, where) => {
909
962
  if (size !== void 0 && !(isPositive(size?.width) && isPositive(size?.height))) problems.push(`${where}: "size" needs a width and height in pixels`);
910
963
  return problems;
911
964
  };
912
- /**
913
- * A section header is a band across the whole canvas: it stands on its own,
914
- * the one frame of a section with `at`, never in a section's cells.
915
- */
916
- const headerPlaceProblems = (section, where) => {
917
- const frames = (section?.rows ?? []).flatMap((row) => row?.frames ?? []);
918
- return frames.some((frame) => frame?.header !== void 0) && aloneIn(section ?? {}, frames) === void 0 ? [`${where}: a section header stands on its own, outside any section`] : [];
919
- };
920
965
  /** Check a canvas against the views and docs that exist. */
921
966
  function canvasProblems(canvas, known) {
922
967
  const sections = canvas?.sections;
@@ -928,7 +973,7 @@ function canvasProblems(canvas, known) {
928
973
  if (!isSlug(section?.id) || sectionIds.has(section?.id)) problems.push(`${where}: "id" must be unique and kebab-case`);
929
974
  sectionIds.add(section?.id);
930
975
  if (!isText(section?.title)) problems.push(`${where}: "title" is required`);
931
- problems.push(...placeProblems(section, where), ...headerPlaceProblems(section, where));
976
+ problems.push(...placeProblems(section, where));
932
977
  const rowIds = /* @__PURE__ */ new Set();
933
978
  for (const row of section?.rows ?? []) {
934
979
  if (!isText(row?.id) || rowIds.has(row.id)) problems.push(`${where} › row "${row?.id}": "id" must be unique`);
@@ -997,4 +1042,4 @@ function foldRowTitles(canvas) {
997
1042
  };
998
1043
  }
999
1044
  //#endregion
1000
- export { NOTE_SIZE, OWN_FRAME_TITLE, SLIDE_GRID, SLIDE_LAYOUTS, SLIDE_SIZE, SPEC_SIZE, VIEWPORTS, addRowAbove, appendOwnFrame, appendRow, appendSection, canvasFormProblems, canvasFrames, canvasProblems, emptyRow, foldRowTitles, foldedTitle, frameKey, frameKind, frameTitle, humanise, idFor, insertAt, insertInCell, insertRowBelow, insertUnder, isFrameUid, isHeaderFrame, isHeaderSection, isNoteFrame, isNotePath, isSlideFrame, isSlideLayout, isSlidePath, isSnapshotImage, isSpecPath, isWordsFrame, kinded, legacyFrameUid, madeInNewerDex, newFrameUid, newerKindOf, normaliseRow, parseFrameKey, pinSteps, placeFrameInCell, placeViewInCell, placedAt, requestCell, sameCell, sectionPosition, sizeForCell, sizedView, specName, specSizeOf, stackPiles, stepsOf, uniqueId, unknownReason, viewFramePage, viewOf };
1045
+ export { NOTE_SIZE, OWN_FRAME_TITLE, SLIDE_GRID, SLIDE_LAYOUTS, SLIDE_SIZE, SPEC_SIZE, VIEWPORTS, addRowAbove, appendOwnFrame, appendRow, appendSection, canvasFormProblems, canvasFrames, canvasProblems, emptyRow, foldRowTitles, foldedTitle, frameKey, frameKind, frameTitle, humanise, idFor, insertAt, insertInCell, insertRowBelow, insertUnder, isFrameUid, isHeaderFrame, isHeaderSection, isNoteFrame, isNotePath, isSlideFrame, isSlideLayout, isSlidePath, isSnapshotImage, isSpecPath, isWordsFrame, kinded, legacyFrameUid, madeInNewerDex, newFrameUid, newerKindOf, normaliseRow, parseFrameKey, pinSteps, placeFrameInCell, placeViewInCell, placedAt, requestCell, sameCell, sectionPosition, sizeForCell, sizedView, specName, specSizeOf, stackPiles, stepAsked, stepsOf, uniqueId, unknownReason, viewFramePage, viewOf, whereInRow };
@@ -78,10 +78,13 @@ export interface DocFrame extends FrameBase {
78
78
  export interface SpecFrame extends FrameBase {
79
79
  doc?: undefined;
80
80
  /**
81
- * A note drawn as a section header: a band across the canvas's content,
82
- * its words large, that splits the canvas into parts. Only a note
83
- * (people/<person>/notes/) that stands on its own (a section with `at`)
84
- * has one; an older Dex shows it as the note it is.
81
+ * A note drawn as a section header, its words large. It goes where any
82
+ * note goes: in a section's cells, where it fills the section from its
83
+ * column to the right edge of its frames; or on its own (a section with
84
+ * `at`), a band across the canvas's content that splits it into parts.
85
+ * Its `size.width`, once resized, is its own. Only a note
86
+ * (people/<person>/notes/) has one; an older Dex shows it as the note it
87
+ * is.
85
88
  */
86
89
  header?: true;
87
90
  /**
@@ -0,0 +1,6 @@
1
+ //#region src/shared/change-pictures-core.d.ts
2
+ export declare const MOMENTS: readonly ["before", "after"];
3
+ export type Moment = (typeof MOMENTS)[number];
4
+ export type KeptPictures = Partial<Record<Moment, number>>;
5
+ export declare const isMoment: (value: string | null) => value is Moment;
6
+ //#endregion
@@ -0,0 +1,5 @@
1
+ //#region src/shared/change-pictures-core.ts
2
+ const MOMENTS = ["before", "after"];
3
+ const isMoment = (value) => MOMENTS.some((moment) => moment === value);
4
+ //#endregion
5
+ export { MOMENTS, isMoment };
@@ -0,0 +1,12 @@
1
+ //#region src/shared/page-looks.d.ts
2
+ export interface PageLooks {
3
+ blank: boolean;
4
+ error?: string;
5
+ }
6
+ export interface LooksSelectors {
7
+ brokenViewNote: string;
8
+ viewRoot: string;
9
+ }
10
+ export declare const LOOKS_SELECTORS: LooksSelectors;
11
+ export declare const pageLooks: ({ brokenViewNote, viewRoot }: LooksSelectors) => PageLooks;
12
+ //#endregion
@@ -0,0 +1,49 @@
1
+ import { VIEW_BROKE, VIEW_ROOT } from "./page-messages.mjs";
2
+ //#region src/shared/page-looks.ts
3
+ const LOOKS_SELECTORS = {
4
+ brokenViewNote: `[${VIEW_BROKE}]`,
5
+ viewRoot: `[${VIEW_ROOT}]`
6
+ };
7
+ const pageLooks = ({ brokenViewNote, viewRoot }) => {
8
+ const longestError = 500;
9
+ const textNode = 3;
10
+ const spaces = /\s+/gu;
11
+ const pixels = /px$/u;
12
+ const media = "img, svg, canvas, video, picture, iframe, object, embed, input, textarea, select, button, [role=img]";
13
+ const unpainted = /* @__PURE__ */ new Set([
14
+ "",
15
+ "none",
16
+ "transparent",
17
+ "rgba(0, 0, 0, 0)"
18
+ ]);
19
+ const tidy = (text) => (text ?? "").replaceAll(spaces, " ").trim();
20
+ const note = document.querySelector(brokenViewNote);
21
+ const overlay = document.querySelector("vite-error-overlay");
22
+ const noteLines = note ? [...note.children].flatMap((line) => {
23
+ const text = tidy(line.textContent);
24
+ return text ? [text] : [];
25
+ }).join(" ") : void 0;
26
+ const overlayMessage = overlay ? tidy((overlay.shadowRoot?.querySelector(".message") ?? overlay).textContent) || "Vite's error overlay shows." : void 0;
27
+ const error = noteLines ?? overlayMessage;
28
+ const view = document.querySelector(viewRoot) ?? document.body;
29
+ const pageBackground = getComputedStyle(view).backgroundColor;
30
+ const paintedApart = (element) => {
31
+ const style = getComputedStyle(element);
32
+ const { backgroundColor, backgroundImage, boxShadow } = style;
33
+ return [
34
+ [style.borderTopStyle, style.borderTopWidth],
35
+ [style.borderRightStyle, style.borderRightWidth],
36
+ [style.borderBottomStyle, style.borderBottomWidth],
37
+ [style.borderLeftStyle, style.borderLeftWidth]
38
+ ].some(([lineStyle, width]) => !unpainted.has(lineStyle) && Number(width.replace(pixels, "")) > 0) || !unpainted.has(boxShadow) || !unpainted.has(backgroundImage) || !unpainted.has(backgroundColor) && backgroundColor !== pageBackground;
39
+ };
40
+ return {
41
+ blank: ![view, ...view.querySelectorAll("*")].filter((element) => {
42
+ const { height, width } = element.getBoundingClientRect();
43
+ return height > 0 && width > 0;
44
+ }).some((element) => [...element.childNodes].some((node) => node.nodeType === textNode && tidy(node.textContent) !== "") || element.matches(media) || element.shadowRoot !== null || paintedApart(element)),
45
+ ...error !== void 0 && { error: error.slice(0, longestError) }
46
+ };
47
+ };
48
+ //#endregion
49
+ export { LOOKS_SELECTORS, pageLooks };
@@ -46,6 +46,12 @@ export interface Capture {
46
46
  height: number;
47
47
  width: number;
48
48
  };
49
+ /**
50
+ * How many of its elements the page sized or placed on the element, in
51
+ * pixels, as its scripts do when they lay it out: they keep that size, and
52
+ * don't reflow when the frame is resized.
53
+ */
54
+ sizedByScripts?: number;
49
55
  source?: {
50
56
  title?: string;
51
57
  url?: string;
@@ -8,7 +8,9 @@ import { Devices } from "./devices.mjs";
8
8
  import { AgentLaunch, Launched } from "../harness/src/connect/launched.mjs";
9
9
  import { AvatarFile } from "./avatar-file.mjs";
10
10
  import { BuildSettings } from "./build-settings.mjs";
11
+ import { KeptPictures } from "./change-pictures-core.mjs";
11
12
  import { CommentAnswers, CommentBodies } from "./comments/routes.mjs";
13
+ import { PageLooks } from "./page-looks.mjs";
12
14
  import { RemovedView } from "./removed-views-core.mjs";
13
15
  import { ReviewImport } from "./review-file.mjs";
14
16
  import { ConnectedAgent } from "../harness/src/events/connected-agent.mjs";
@@ -441,6 +443,14 @@ export interface StudioAnswers<Own extends OwnTypes = OwnTypes> extends CommentA
441
443
  large?: true;
442
444
  };
443
445
  };
446
+ "change-picture": {
447
+ GET: Blob;
448
+ PUT: Done;
449
+ DELETE: Done;
450
+ };
451
+ "change-pictures": {
452
+ GET: KeptPictures;
453
+ };
444
454
  /**
445
455
  * Comment commands: Dex's and the team's. POST saves one's file, PUT
446
456
  * turns one on or off in the / menu, DELETE ?name= removes the team's file.
@@ -697,6 +707,7 @@ export interface StudioAnswers<Own extends OwnTypes = OwnTypes> extends CommentA
697
707
  snapshot: {
698
708
  POST: {
699
709
  image: string;
710
+ looks: PageLooks;
700
711
  problems: string[];
701
712
  };
702
713
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Dex Snapshot",
4
- "version": "0.17.0",
4
+ "version": "0.18.0",
5
5
  "description": "Copy any element on a page, with its styles, and paste it on a Dex canvas.",
6
6
  "action": {
7
7
  "default_title": "Copy an element for Dex",