@meltemi/diagrams-editor 1.9.0 → 1.10.17

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 (154) hide show
  1. package/dist/add-icons.d.ts +44 -0
  2. package/dist/add-icons.d.ts.map +1 -0
  3. package/dist/add-icons.js +178 -0
  4. package/dist/add-icons.js.map +1 -0
  5. package/dist/arrange.d.ts +54 -1
  6. package/dist/arrange.d.ts.map +1 -1
  7. package/dist/arrange.js +209 -8
  8. package/dist/arrange.js.map +1 -1
  9. package/dist/asset-files.d.ts +46 -0
  10. package/dist/asset-files.d.ts.map +1 -0
  11. package/dist/asset-files.js +79 -0
  12. package/dist/asset-files.js.map +1 -0
  13. package/dist/c4.d.ts +91 -1
  14. package/dist/c4.d.ts.map +1 -1
  15. package/dist/c4.js +358 -9
  16. package/dist/c4.js.map +1 -1
  17. package/dist/canvas/index.d.ts +1 -0
  18. package/dist/canvas/index.d.ts.map +1 -1
  19. package/dist/canvas/index.js +1 -0
  20. package/dist/canvas/index.js.map +1 -1
  21. package/dist/canvas/keyboard.d.ts +23 -2
  22. package/dist/canvas/keyboard.d.ts.map +1 -1
  23. package/dist/canvas/keyboard.js +23 -0
  24. package/dist/canvas/keyboard.js.map +1 -1
  25. package/dist/canvas/palette.d.ts +48 -6
  26. package/dist/canvas/palette.d.ts.map +1 -1
  27. package/dist/canvas/palette.js +55 -9
  28. package/dist/canvas/palette.js.map +1 -1
  29. package/dist/canvas/pens.d.ts +10 -0
  30. package/dist/canvas/pens.d.ts.map +1 -0
  31. package/dist/canvas/pens.js +29 -0
  32. package/dist/canvas/pens.js.map +1 -0
  33. package/dist/canvas/protocol.d.ts +580 -21
  34. package/dist/canvas/protocol.d.ts.map +1 -1
  35. package/dist/canvas/protocol.js +140 -3
  36. package/dist/canvas/protocol.js.map +1 -1
  37. package/dist/canvas/routes.d.ts +17 -0
  38. package/dist/canvas/routes.d.ts.map +1 -1
  39. package/dist/canvas/routes.js +37 -0
  40. package/dist/canvas/routes.js.map +1 -1
  41. package/dist/canvas/turning.d.ts +7 -0
  42. package/dist/canvas/turning.d.ts.map +1 -1
  43. package/dist/canvas/turning.js +17 -3
  44. package/dist/canvas/turning.js.map +1 -1
  45. package/dist/catalog.d.ts +5 -0
  46. package/dist/catalog.d.ts.map +1 -1
  47. package/dist/catalog.js +1 -1
  48. package/dist/catalog.js.map +1 -1
  49. package/dist/clipboard.d.ts.map +1 -1
  50. package/dist/clipboard.js +98 -9
  51. package/dist/clipboard.js.map +1 -1
  52. package/dist/effects.d.ts +5 -0
  53. package/dist/effects.d.ts.map +1 -1
  54. package/dist/effects.js +31 -22
  55. package/dist/effects.js.map +1 -1
  56. package/dist/exports.d.ts +25 -11
  57. package/dist/exports.d.ts.map +1 -1
  58. package/dist/exports.js +65 -28
  59. package/dist/exports.js.map +1 -1
  60. package/dist/fonts.d.ts +63 -0
  61. package/dist/fonts.d.ts.map +1 -0
  62. package/dist/fonts.js +175 -0
  63. package/dist/fonts.js.map +1 -0
  64. package/dist/icons.d.ts +2 -0
  65. package/dist/icons.d.ts.map +1 -1
  66. package/dist/icons.js +39 -6
  67. package/dist/icons.js.map +1 -1
  68. package/dist/index.d.ts +6 -3
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +4 -1
  71. package/dist/index.js.map +1 -1
  72. package/dist/inspector.d.ts.map +1 -1
  73. package/dist/inspector.js +545 -141
  74. package/dist/inspector.js.map +1 -1
  75. package/dist/layouts.d.ts +3 -2
  76. package/dist/layouts.d.ts.map +1 -1
  77. package/dist/layouts.js +4 -2
  78. package/dist/layouts.js.map +1 -1
  79. package/dist/messages/en.d.ts +106 -20
  80. package/dist/messages/en.d.ts.map +1 -1
  81. package/dist/messages/en.js +110 -26
  82. package/dist/messages/en.js.map +1 -1
  83. package/dist/messages/es.d.ts.map +1 -1
  84. package/dist/messages/es.js +80 -43
  85. package/dist/messages/es.js.map +1 -1
  86. package/dist/messages/index.d.ts +76 -17
  87. package/dist/messages/index.d.ts.map +1 -1
  88. package/dist/messages/keys.d.ts.map +1 -1
  89. package/dist/messages/keys.js +26 -0
  90. package/dist/messages/keys.js.map +1 -1
  91. package/dist/messages/services.d.ts +130 -1
  92. package/dist/messages/services.d.ts.map +1 -1
  93. package/dist/messages/services.js +150 -18
  94. package/dist/messages/services.js.map +1 -1
  95. package/dist/move-file.d.ts +32 -0
  96. package/dist/move-file.d.ts.map +1 -0
  97. package/dist/move-file.js +58 -0
  98. package/dist/move-file.js.map +1 -0
  99. package/dist/node.d.ts +1 -1
  100. package/dist/node.d.ts.map +1 -1
  101. package/dist/node.js.map +1 -1
  102. package/dist/projects.d.ts +65 -1
  103. package/dist/projects.d.ts.map +1 -1
  104. package/dist/projects.js +349 -1
  105. package/dist/projects.js.map +1 -1
  106. package/dist/render.d.ts +5 -0
  107. package/dist/render.d.ts.map +1 -1
  108. package/dist/render.js +4 -2
  109. package/dist/render.js.map +1 -1
  110. package/dist/sequence.d.ts +37 -8
  111. package/dist/sequence.d.ts.map +1 -1
  112. package/dist/sequence.js +409 -38
  113. package/dist/sequence.js.map +1 -1
  114. package/dist/services/actions.d.ts.map +1 -1
  115. package/dist/services/actions.js +65 -1
  116. package/dist/services/actions.js.map +1 -1
  117. package/dist/services/completion.d.ts.map +1 -1
  118. package/dist/services/completion.js +146 -16
  119. package/dist/services/completion.js.map +1 -1
  120. package/dist/services/docs.d.ts +5 -0
  121. package/dist/services/docs.d.ts.map +1 -1
  122. package/dist/services/docs.js +7 -0
  123. package/dist/services/docs.js.map +1 -1
  124. package/dist/services/hover.d.ts +5 -0
  125. package/dist/services/hover.d.ts.map +1 -1
  126. package/dist/services/hover.js +154 -21
  127. package/dist/services/hover.js.map +1 -1
  128. package/dist/services/navigation.d.ts +1 -1
  129. package/dist/services/navigation.d.ts.map +1 -1
  130. package/dist/services/navigation.js +8 -4
  131. package/dist/services/navigation.js.map +1 -1
  132. package/dist/services/stories.d.ts.map +1 -1
  133. package/dist/services/stories.js +31 -3
  134. package/dist/services/stories.js.map +1 -1
  135. package/dist/session.d.ts +121 -13
  136. package/dist/session.d.ts.map +1 -1
  137. package/dist/session.js +1349 -80
  138. package/dist/session.js.map +1 -1
  139. package/dist/syntax.d.ts.map +1 -1
  140. package/dist/syntax.js +3 -0
  141. package/dist/syntax.js.map +1 -1
  142. package/dist/targets.d.ts +25 -4
  143. package/dist/targets.d.ts.map +1 -1
  144. package/dist/targets.js +103 -7
  145. package/dist/targets.js.map +1 -1
  146. package/dist/text-places.d.ts +15 -3
  147. package/dist/text-places.d.ts.map +1 -1
  148. package/dist/text-places.js +187 -12
  149. package/dist/text-places.js.map +1 -1
  150. package/dist/themes.d.ts +0 -2
  151. package/dist/themes.d.ts.map +1 -1
  152. package/dist/themes.js +27 -13
  153. package/dist/themes.js.map +1 -1
  154. package/package.json +16 -16
@@ -2,7 +2,7 @@ import type { StoryTimeline, StoryViewData } from "@meltemi/diagrams-motion";
2
2
  import type { AlignEdge } from "./arrange.js";
3
3
  import type { Box, Point } from "./geometry.js";
4
4
  import type { Side } from "./routes.js";
5
- export type ElementKind = "node" | "decision" | "data" | "group" | "note" | "tag" | "box" | "text" | "icon" | "image" | "participant" | "actor" | "boundary" | "control" | "entity" | "database" | "collections" | "queue" | "person" | "system" | "container" | "datastore" | "component";
5
+ export type ElementKind = "node" | "decision" | "data" | "group" | "note" | "tag" | "box" | "text" | "icon" | "image" | "line" | "pen" | "sticky" | "participant" | "actor" | "boundary" | "control" | "entity" | "database" | "collections" | "queue" | "person" | "system" | "container" | "datastore" | "component";
6
6
  /** The profile of a diagram, which sets the palette, the keys and the drags. */
7
7
  export type CanvasProfile = "flow" | "free" | "sequence" | "c4";
8
8
  export type FragmentOperator = "alt" | "opt" | "loop" | "par" | "break" | "critical" | "region";
@@ -52,6 +52,12 @@ export interface TextPlace {
52
52
  /** The CSS font stack. */
53
53
  readonly font: string;
54
54
  readonly size: number;
55
+ /**
56
+ * A sticky note's: the size its words are drawn at before they shrink to fit the card (its
57
+ * `fontSize`, or 1.2 times the theme's label size), which `size` is when they fit. The editor
58
+ * types from it, so a long text shortened is typed at the size the card will draw it.
59
+ */
60
+ readonly fullSize?: number;
55
61
  readonly weight: number;
56
62
  readonly color: string;
57
63
  /** The distance between two lines. */
@@ -63,6 +69,32 @@ export interface TextPlace {
63
69
  * is typed, as it does not cross the drawn label. Absent for the others: they have none.
64
70
  */
65
71
  readonly background?: string;
72
+ /**
73
+ * How the drawing wraps the text in `area`, for an editor that wraps as it does; absent when the
74
+ * drawing does not wrap it. `shrink`: a sticky's text, wrapped at the area's width and shrunk to
75
+ * fit the card (from `fullSize`). `grow`: the label of a sequence message whose participants are
76
+ * pulled closer than their natural distance (`MessageText.wraps`), wrapped at the area's width
77
+ * (the room between its lifelines) at `size`, never shrunk; the block keeps its top (`area.y`,
78
+ * the top of the first line) and grows down by `line` with each line, as the row grows. A
79
+ * message at its natural distance (its label pushes the pair apart) and a self-call have none.
80
+ */
81
+ readonly wrap?: "shrink" | "grow";
82
+ }
83
+ /**
84
+ * A tag of a sequence participant or message (`tag "Text"` in its block), as drawn: a pill of the
85
+ * owner, which a press selects and a drag drags with it.
86
+ */
87
+ export interface TagInfo {
88
+ /** The text written in the tag. */
89
+ readonly text: string;
90
+ /** The pill, in diagram coordinates. */
91
+ readonly box: Box;
92
+ /**
93
+ * Where the pill's text is drawn, for the inline editor of the tag: its mono font, size, weight
94
+ * and colour, centred on the pill, the pill's fill as its background. Absent when the drawing
95
+ * holds no such pill.
96
+ */
97
+ readonly place?: TextPlace;
66
98
  }
67
99
  /** What the canvas knows about an element. */
68
100
  export interface ElementInfo {
@@ -119,6 +151,46 @@ export interface ElementInfo {
119
151
  * it connects to the element, whose connector ends on the square).
120
152
  */
121
153
  readonly labelBox?: Box;
154
+ /**
155
+ * A free `line`: its points in diagram coordinates (`from`, its bends, `to`), the polyline it
156
+ * is drawn with (rounded corners, a curve's samples, heads cut out), and its bends alone. Its
157
+ * `box` is the bounding box of its points; it has no frame, resize, rotation or connection
158
+ * handles, but a handle at each point and at the middle of each stretch.
159
+ */
160
+ readonly line?: {
161
+ readonly points: readonly Point[];
162
+ readonly drawn: readonly Point[];
163
+ readonly via: readonly Point[];
164
+ };
165
+ /**
166
+ * A `pen` stroke: its points where they are drawn, in diagram coordinates (its written points
167
+ * moved by its group's interior origin), the box of the points grown by half its width (its
168
+ * `box` too, which its frame and its resize handles use), and its drawn width. It has no
169
+ * rotation, connection, point or label handles; moving or scaling it writes every point
170
+ * (`setPenPoints`).
171
+ */
172
+ readonly pen?: {
173
+ readonly points: readonly Point[];
174
+ readonly bounds: Box;
175
+ readonly width: number;
176
+ };
177
+ /**
178
+ * A group of a free diagram that arranges its children (`layout column` or `layout row`): its
179
+ * layout, its spacing and its alignment as the layout applies them (defaults filled in), and the
180
+ * children it places in source order, its lines and pens left out. A `move` or a `create` with
181
+ * an `index` counts among these children.
182
+ */
183
+ readonly list?: {
184
+ readonly layout: "column" | "row";
185
+ readonly spacing: number;
186
+ readonly align: "start" | "center" | "end" | "stretch";
187
+ readonly children: readonly string[];
188
+ };
189
+ /**
190
+ * Sequence diagrams: the tags of a participant, in source order, each with its badge as drawn
191
+ * over the head; absent when it has none.
192
+ */
193
+ readonly tags?: readonly TagInfo[];
122
194
  }
123
195
  /** What the canvas knows about a relation. */
124
196
  export interface RelationInfo {
@@ -141,6 +213,20 @@ export interface RelationInfo {
141
213
  readonly layer: string | null;
142
214
  /** Where its label is drawn, or goes: the middle of its line when it has none. */
143
215
  readonly text?: TextPlace;
216
+ /** Sequence diagrams: the key of the call a `return` answers; absent on other messages. */
217
+ readonly returns?: string;
218
+ /**
219
+ * Sequence diagrams: the tags of a message, in source order, each with its pill as drawn on the
220
+ * arrow next to the source end; absent when it has none.
221
+ */
222
+ readonly tags?: readonly TagInfo[];
223
+ /**
224
+ * Sequence diagrams: whether the message's receiver is activated after it: `written` when the
225
+ * next event of its block is `activate <receiver>` (Alt+A and **Activate** remove that pair),
226
+ * `block` when the message is a call whose block activates the receiver (they refuse); absent
227
+ * otherwise.
228
+ */
229
+ readonly activation?: "written" | "block";
144
230
  }
145
231
  /** What the canvas knows about an event of a sequence diagram. */
146
232
  export interface EventInfo {
@@ -150,9 +236,18 @@ export interface EventInfo {
150
236
  /** The row of the event, in diagram coordinates. */
151
237
  readonly y: number;
152
238
  readonly height: number;
153
- /** The frame of a note or a fragment, in diagram coordinates. */
239
+ /**
240
+ * The frame of a note or a fragment, or the bar an `activate` opens (`activate#1`), which a
241
+ * press on it selects and its outline is; in diagram coordinates. Null for the others.
242
+ */
154
243
  readonly box: Box | null;
155
- /** The fragment around the event, or null. */
244
+ /**
245
+ * The other end of an activation: an `activate`'s `deactivate`, a `deactivate`'s `activate`.
246
+ * Null for an `activate` open to the end, a `deactivate` that closes nothing and every other
247
+ * event.
248
+ */
249
+ readonly pair: string | null;
250
+ /** The fragment or the call around the event, or null. */
156
251
  readonly parent: string | null;
157
252
  /** The participant of an activation or a lifecycle event. */
158
253
  readonly participant: string | null;
@@ -204,6 +299,11 @@ export interface CanvasRender {
204
299
  readonly effects: number;
205
300
  /** True while the canvas shows the effects running. */
206
301
  readonly playing: boolean;
302
+ /**
303
+ * The document belongs to a project, whose assets the canvas may add to (the Add icon dialog);
304
+ * absent outside one.
305
+ */
306
+ readonly project?: boolean;
207
307
  /** C4 views: the entities of the model the view may draw and does not. */
208
308
  readonly entities: readonly {
209
309
  readonly path: string;
@@ -213,12 +313,20 @@ export interface CanvasRender {
213
313
  readonly selection: readonly string[];
214
314
  /**
215
315
  * The colours of the canvas's selection and of its guides, from the diagram's theme: its
216
- * `selection` and `guide`, else its `accent`.
316
+ * `selection` and `guide`, else its `accent`; and the `accent` itself, the colour of the Pointer
317
+ * tool's trail when the host names no colour of the person's own.
217
318
  */
218
319
  readonly colors?: {
219
320
  readonly selection: string;
220
321
  readonly guide: string;
322
+ readonly accent: string;
221
323
  };
324
+ /**
325
+ * The colour tokens of the diagram's theme with the colours they resolve to, in the theme's
326
+ * order (the strip's swatches): the pen menu's colour row, and the colour a stroke in progress
327
+ * is drawn in when its colour is a token (`@ink`, `@highlight`).
328
+ */
329
+ readonly swatches?: readonly ColorSwatch[];
222
330
  }
223
331
  export interface CanvasSettings {
224
332
  readonly grid: number;
@@ -234,7 +342,13 @@ export interface CanvasSettings {
234
342
  */
235
343
  readonly readOnly?: boolean;
236
344
  }
237
- export type FieldType = "id" | "text" | "multiline" | "number" | "enum" | "color" | "icon" | "classes" | "ports";
345
+ /**
346
+ * The control of a field. `boolean` is a checkbox whose value is `on` when checked and `off` when
347
+ * not; checking or clearing it sends `setField` with `on` or `off`. `font` is a font stack chosen
348
+ * in the canvas's font picker (`listFonts`): its value is the written stack, its placeholder the
349
+ * family that applies, and its `options` the families the picker lists.
350
+ */
351
+ export type FieldType = "id" | "text" | "multiline" | "number" | "enum" | "color" | "icon" | "classes" | "ports" | "boolean" | "font";
238
352
  /** One editable property in the inspector. */
239
353
  export interface InspectorField {
240
354
  readonly name: string;
@@ -255,6 +369,11 @@ export interface InspectorField {
255
369
  readonly readonly?: boolean;
256
370
  /** Fields of the style strip, which the inspector shows first and draws compactly. */
257
371
  readonly section?: "strip";
372
+ /**
373
+ * Strip fields that belong to a card: the name of the toggle field whose card holds this one
374
+ * (`effect.trace` for `effect.trace.color`), so a canvas groups them without knowing the effects.
375
+ */
376
+ readonly group?: string;
258
377
  /** Colour fields: the effective theme's colour tokens with the colours they resolve to. */
259
378
  readonly swatches?: readonly ColorSwatch[];
260
379
  /** Values offered in one click beside the control, such as a theme's dark counterpart. */
@@ -283,6 +402,11 @@ export interface InspectorField {
283
402
  readonly max: number;
284
403
  readonly step: number;
285
404
  };
405
+ /**
406
+ * Number fields with values offered in a list beside the field, which its − and + buttons step
407
+ * along: the text size's common sizes. Any number in the property's bounds may still be typed.
408
+ */
409
+ readonly list?: readonly number[];
286
410
  /**
287
411
  * Icon fields (`style.icon`, the `source` of an icon object): the icon they show, the written
288
412
  * one or else the one that applies (`placeholder`), with its readable name and a 24 px SVG
@@ -292,19 +416,36 @@ export interface InspectorField {
292
416
  readonly thumbnail?: IconChoiceInfo;
293
417
  /**
294
418
  * A button the canvas draws beside the field, which sends `action`: Convert to container
295
- * beside Inside. Canvases that only show leave it out.
419
+ * beside Inside, **Remove** beside a tag (`removeTag`). Canvases that only show leave it out.
296
420
  */
297
421
  readonly button?: {
298
422
  readonly label: string;
299
423
  readonly action: CanvasAction;
300
424
  };
425
+ /**
426
+ * A sentence the canvas shows under the field, such as why it is read-only: "The block of `pay`
427
+ * activates `api`." under a call's **Activates the receiver**.
428
+ */
429
+ readonly note?: string;
301
430
  }
302
431
  /**
303
432
  * The picture family of a field: see `InspectorField.glyphs`. `iconPosition` pictures the five
304
433
  * places of an icon in its box (`ICON_POSITIONS`), `labelPosition` the four edges a label takes
305
434
  * around a centred icon (`LABEL_POSITIONS`).
306
435
  */
307
- export type FieldGlyphs = "line" | "route" | "corners" | "arrowStart" | "arrowEnd" | "shape" | "iconPosition" | "labelPosition";
436
+ export type FieldGlyphs = "line" | "route" | "corners" | "arrowStart" | "arrowEnd" | "shape" | "iconPosition" | "labelPosition" | "sketch" | "textAlign" | "verticalAlign" | "fontWeight";
437
+ /**
438
+ * A family the font picker lists: its name and group, the weights it has files for, and the
439
+ * `@font-face` rules that draw its row ("<Family> Aa") in its own face, empty while its files are
440
+ * on their way or when it cannot be shown. A restricted project font measures text only.
441
+ */
442
+ export interface FontOption {
443
+ readonly family: string;
444
+ readonly group: "sans" | "serif" | "mono" | "hand" | "project";
445
+ readonly weights: readonly number[];
446
+ readonly faces: readonly string[];
447
+ readonly restricted?: boolean;
448
+ }
308
449
  /** The panel that edits a theme block: its tokens by group, written or inherited. */
309
450
  export interface ThemePanelModel {
310
451
  /** The theme's id in its file. */
@@ -345,8 +486,11 @@ export interface StoryPlaybackInfo {
345
486
  /** `@font-face` rules for the text of the views. */
346
487
  readonly fontFaces: readonly string[];
347
488
  }
348
- /** Actions a scene can run, which **Add to scene** inserts. */
349
- export type SceneActionKind = "reveal" | "hide" | "highlight" | "focus" | "camera" | "trace" | "hold";
489
+ /**
490
+ * Actions a scene can run, which **Add to scene** inserts. `draw` replays pens, free lines and
491
+ * named relations (`story-language`); the edit refuses it on anything else.
492
+ */
493
+ export type SceneActionKind = "reveal" | "hide" | "highlight" | "focus" | "camera" | "trace" | "draw" | "hold";
350
494
  /** Statements that would be removed with an element, listed for confirmation. */
351
495
  export interface DependentInfo {
352
496
  readonly kind: string;
@@ -364,8 +508,9 @@ export interface LibraryInfo {
364
508
  }
365
509
  /**
366
510
  * Another person's selection, drawn over the scene with an outline in `colour` and a tag holding
367
- * `name` (as text). It is never selectable, saved, copied or exported, and nothing of it is sent
368
- * back to the host; ids the diagram does not have are ignored.
511
+ * `name` (as text), and their pointer, drawn as a cursor in `colour` with the name at its tail. It is
512
+ * never selectable, saved, copied or exported, and nothing of it is sent back to the host; ids the
513
+ * diagram does not have are ignored.
369
514
  */
370
515
  export interface PresencePerson {
371
516
  /** Shown verbatim in the tag as a text node, so markup in it shows as its characters. */
@@ -382,7 +527,72 @@ export interface PresencePerson {
382
527
  * several people on one id are stacked in the order of the list.
383
528
  */
384
529
  readonly selection: readonly string[];
530
+ /**
531
+ * Where the person's pointer is over their canvas, in diagram units of the diagram shown: a
532
+ * cursor in `colour` whose tip is at that point at every zoom, keeping its size on screen, and
533
+ * gliding to the next point in 200 ms. Ignored unless it is two finite numbers.
534
+ */
535
+ readonly pointer?: {
536
+ readonly x: number;
537
+ readonly y: number;
538
+ };
539
+ /**
540
+ * The points of the person's Pointer trail since their last batch (`live-collaboration`): `batch`
541
+ * grows by one with each batch of that person, so the canvas draws a batch once, and `points` are
542
+ * at most 64 entries, `x` and `y` in diagram units and `t` the milliseconds since the batch's
543
+ * first point, 0 to 1000. The trail is drawn in `colour`, point by point at its own pace, and
544
+ * fades as the person's own does. A batch that does not fit those bounds is not drawn.
545
+ *
546
+ * A batch with `pen` holds the points of a stroke the person is drawing with the pen or the
547
+ * highlighter (`diagram-canvas` "Strokes of others"): drawn in the pen's width, colour and
548
+ * opacity, the batches of one `stroke` number growing one stroke that does not fade, until the
549
+ * next `render` after its last batch or ten seconds, or at once on its `cancel` batch. A batch
550
+ * whose `pen` does not fit `isPresencePen` is not drawn.
551
+ */
552
+ readonly laser?: {
553
+ readonly batch: number;
554
+ readonly points: readonly {
555
+ readonly x: number;
556
+ readonly y: number;
557
+ readonly t: number;
558
+ }[];
559
+ readonly pen?: PresencePen;
560
+ };
561
+ }
562
+ /**
563
+ * How a stroke being drawn looks, as a laser batch carries it to the others, and which of the
564
+ * person's strokes it is: `width` a whole number of pixels from 1 to 64, `colour` a CSS colour of
565
+ * at most 32 characters (the resolved colour, not a token), `opacity` from 0 to 1, `stroke` an
566
+ * integer from 0 to 2,147,483,647 that the person's canvas increases with each stroke (the batches
567
+ * of one stroke carry the same number, and a stroke is never joined to another), and `cancel`,
568
+ * only ever `true`, on the batch that ends a stroke cancelled with Escape (its points may be none):
569
+ * the others drop that stroke at once.
570
+ */
571
+ export interface PresencePen {
572
+ readonly width: number;
573
+ readonly colour: string;
574
+ readonly opacity: number;
575
+ readonly stroke: number;
576
+ readonly cancel?: true;
385
577
  }
578
+ /** The bounds of `PresencePen`, which the canvas, the page and the room apply alike. */
579
+ export declare const PRESENCE_PEN_LIMITS: {
580
+ readonly width: {
581
+ readonly min: 1;
582
+ readonly max: 64;
583
+ };
584
+ readonly colour: 32;
585
+ readonly opacity: {
586
+ readonly min: 0;
587
+ readonly max: 1;
588
+ };
589
+ readonly stroke: {
590
+ readonly min: 0;
591
+ readonly max: 2147483647;
592
+ };
593
+ };
594
+ /** Whether a value is a `PresencePen` within its bounds (`PRESENCE_PEN_LIMITS`). */
595
+ export declare function isPresencePen(v: unknown): v is PresencePen;
386
596
  /** An element of a library with its thumbnail, null while its pack is still loading. */
387
597
  export interface LibraryItemInfo {
388
598
  readonly library: string;
@@ -422,6 +632,38 @@ export interface IconGroupInfo {
422
632
  readonly title: string;
423
633
  readonly items: readonly IconChoiceInfo[];
424
634
  }
635
+ /** A file the Add icon dialog sends: its own name, the icon name it is to get, and its text. */
636
+ export interface IconFileInput {
637
+ /** The file's name as the person picked it, such as `My Logo.svg`. */
638
+ readonly file: string;
639
+ /** The icon's name in the pack; without one, the session offers one made of the file's name. */
640
+ readonly name?: string;
641
+ readonly svg: string;
642
+ }
643
+ /** What the session says of a file of the Add icon dialog. */
644
+ export interface IconFileCheck {
645
+ readonly file: string;
646
+ /** The name the icon gets: the one asked for, or the one offered. */
647
+ readonly name: string;
648
+ /** Why it cannot be added as it is (an unsafe SVG, a name taken or invalid); absent when it can. */
649
+ readonly problem?: string;
650
+ /** A 48 px preview of the icon as the sanitiser keeps it, or null when it refuses the file. */
651
+ readonly svg: string | null;
652
+ }
653
+ /** What the session says of the prefix of the Add icon dialog. */
654
+ export interface IconPrefixCheck {
655
+ readonly prefix: string;
656
+ /** Why the icons cannot go into a pack of that prefix; absent when they can. */
657
+ readonly problem?: string;
658
+ /** A pack of the project has the prefix already: the icons join it. */
659
+ readonly existing: boolean;
660
+ /** The pack has a licence, so the dialog asks for none. */
661
+ readonly licensed: boolean;
662
+ }
663
+ /** An icon the Add icon dialog wrote, with the file it came from. */
664
+ export interface AddedIconInfo extends IconChoiceInfo {
665
+ readonly file: string;
666
+ }
425
667
  export type HostMessage = ({
426
668
  readonly type: "render";
427
669
  } & CanvasRender) | {
@@ -459,6 +701,14 @@ export type HostMessage = ({
459
701
  readonly width?: number;
460
702
  readonly height?: number;
461
703
  readonly offset?: Point;
704
+ /** For a rotation, the turned element's box in the drawing, in diagram coordinates. */
705
+ readonly box?: Box;
706
+ /**
707
+ * Without a drawing, why the drop would be refused, when the session knows it: the order
708
+ * rule a `moveActivation` breaks ("`b` is not active here."). The canvas says it while the
709
+ * gesture goes on, and its drop writes nothing.
710
+ */
711
+ readonly reason?: string;
462
712
  } | {
463
713
  readonly type: "rejected";
464
714
  readonly code: string;
@@ -469,9 +719,16 @@ export type HostMessage = ({
469
719
  } | {
470
720
  readonly type: "highlight";
471
721
  readonly ids: readonly string[];
472
- } | {
722
+ }
723
+ /**
724
+ * The selection after an edit. One id alone opens the inline editor of what was just created;
725
+ * with `tag`, the editor opens on the pill at that index of the selected participant or
726
+ * message (`TagInfo.place`), the tag that `addTag` just wrote, instead of its label.
727
+ */
728
+ | {
473
729
  readonly type: "select";
474
730
  readonly ids: readonly string[];
731
+ readonly tag?: number;
475
732
  }
476
733
  /**
477
734
  * The other people of a shared project and what each has selected (`live-collaboration`). Each
@@ -483,6 +740,13 @@ export type HostMessage = ({
483
740
  | {
484
741
  readonly type: "presence";
485
742
  readonly people: readonly PresencePerson[];
743
+ /**
744
+ * The colour of the person at this canvas, as the others see them: the Pointer tool's trail
745
+ * and cursor are drawn in it while it is set, and in the theme's accent when it is not.
746
+ */
747
+ readonly me?: {
748
+ readonly colour: string;
749
+ };
486
750
  } | {
487
751
  readonly type: "settings";
488
752
  readonly settings: CanvasSettings;
@@ -498,6 +762,17 @@ export type HostMessage = ({
498
762
  readonly type: "themePanel";
499
763
  readonly panel: ThemePanelModel | null;
500
764
  }
765
+ /**
766
+ * The answer to `listFonts`, with its `token`: the families the font picker lists, bundled ones
767
+ * by group, then the project's. A family whose faces are empty is drawn in the interface's font
768
+ * until a later answer brings them: the canvas asks again when a render arrives while the
769
+ * picker is open.
770
+ */
771
+ | {
772
+ readonly type: "fonts";
773
+ readonly token: number;
774
+ readonly families: readonly FontOption[];
775
+ }
501
776
  /** The element libraries of the document, for the libraries panel. */
502
777
  | {
503
778
  readonly type: "libraries";
@@ -524,6 +799,29 @@ export type HostMessage = ({
524
799
  readonly token: number;
525
800
  readonly groups: readonly IconGroupInfo[];
526
801
  }
802
+ /**
803
+ * The answer to `checkIcons`, with its `token`: the prefix and each file as the Add icon dialog
804
+ * shows them, with a preview, the name offered and what is wrong, if anything.
805
+ */
806
+ | {
807
+ readonly type: "iconsChecked";
808
+ readonly token: number;
809
+ readonly prefix: IconPrefixCheck;
810
+ readonly files: readonly IconFileCheck[];
811
+ }
812
+ /**
813
+ * The answer to `addIcons`, with its `token`: the icons whose files the host is to write (the
814
+ * steps over files of the same result), and the files refused with the reason.
815
+ */
816
+ | {
817
+ readonly type: "iconsAdded";
818
+ readonly token: number;
819
+ readonly added: readonly AddedIconInfo[];
820
+ readonly refused: readonly {
821
+ readonly file: string;
822
+ readonly reason: string;
823
+ }[];
824
+ }
527
825
  /**
528
826
  * The stories of the file for the picker, and the playback of the story the canvas plays, or
529
827
  * null outside story mode.
@@ -539,24 +837,75 @@ export type HostMessage = ({
539
837
  };
540
838
  /** The kinds of diagram the canvas creates: C4 views need a model, written in text. */
541
839
  export type CreatableDiagram = "flow" | "free" | "sequence";
542
- /** Moves elements by a delta in diagram coordinates. */
840
+ /**
841
+ * Moves elements by a delta in diagram coordinates, or into a list group at a position. A child
842
+ * of a list stays where its list puts it: a move by a delta that leaves it in its list (a nudge,
843
+ * an Alt-drag) is refused with a status that says how to move it.
844
+ */
543
845
  export interface MoveAction {
544
846
  readonly kind: "move";
545
847
  readonly ids: readonly string[];
546
- readonly delta: Point;
848
+ /**
849
+ * How far the elements move, in diagram coordinates. Absent only with `index`, whose drop
850
+ * writes no position; a pen or a line moved with it keeps its points.
851
+ */
852
+ readonly delta?: Point;
547
853
  /**
548
854
  * The group the moved elements land in, or null for the diagram's top level: each one whose
549
855
  * parent differs is declared in it, placed where it is dropped (flow and free diagrams).
550
- * Absent, every element keeps its parent, as nudges and Alt-drags do.
856
+ * Absent, every element keeps its parent, as nudges and Alt-drags do. A list group places them
857
+ * itself: they are declared at the end of it, or at `index`, and lose their `place`.
551
858
  */
552
859
  readonly parent?: string | null;
860
+ /**
861
+ * With `parent` a list group: where the elements go among its children (`ElementInfo.list`)
862
+ * once the moved ones are taken out, before the child at that index, after the last when it is
863
+ * the count. Several elements go there one after another in the order of `ids`; moving a child
864
+ * within its own list reorders it. A whole number from 0.
865
+ */
866
+ readonly index?: number;
553
867
  }
554
- /** Gives an element a new box in diagram coordinates. */
868
+ /**
869
+ * Gives an element a new box in diagram coordinates. A child of a list writes its size alone; a
870
+ * pen stroke's points are scaled from its bounds to the box (`scalePenPoints`), its width kept,
871
+ * so its resize handles preview and drop as a box's do.
872
+ */
555
873
  export interface ResizeAction {
556
874
  readonly kind: "resize";
557
875
  readonly id: string;
558
876
  readonly box: Box;
559
877
  }
878
+ /**
879
+ * Sequence diagrams: an end of a written activation bar dragged to the boundary below an event
880
+ * row (a bar handle's drop). `id` is the bar's `activate` (its `deactivate` is taken as its
881
+ * `activate`); `row` is the key of the event whose row the handle snapped below. The session writes
882
+ * it as `moveEvent` with a destination: `start` puts the `activate` right after `row`, or first in
883
+ * the block of `row` when it is a call with a block, so the bar starts at that call's arrow; `end`
884
+ * puts the `deactivate` right after `row`, and on a bar open to the end writes `deactivate
885
+ * <participant>` there. A move the order rules forbid is refused with the rule's reason.
886
+ */
887
+ export interface MoveActivationAction {
888
+ readonly kind: "moveActivation";
889
+ readonly id: string;
890
+ readonly end: "start" | "end";
891
+ readonly row: string;
892
+ }
893
+ /**
894
+ * The styles a new pen stroke writes in its `style` statement; what is absent keeps the default
895
+ * (the theme's `ink`, 3 wide, opaque, no heads).
896
+ */
897
+ export interface PenStyle {
898
+ /** A colour token such as `@highlight`, or a colour such as `#e03131`. */
899
+ readonly stroke?: string;
900
+ /** 1 to 64. */
901
+ readonly width?: number;
902
+ /** 0 to 1. */
903
+ readonly opacity?: number;
904
+ /** A head at the last point, by its name in the language (`triangle`). */
905
+ readonly arrowhead?: string;
906
+ /** A head at the first point. */
907
+ readonly arrowtail?: string;
908
+ }
560
909
  /**
561
910
  * A change requested by the canvas; each becomes one edit plan, but `preview`, which asks for the
562
911
  * drawing of a move or a resize without writing it.
@@ -569,6 +918,50 @@ export type CanvasAction = MoveAction | ResizeAction | {
569
918
  readonly kind: "setVia";
570
919
  readonly relation: string;
571
920
  readonly via: readonly Point[];
921
+ } | {
922
+ /**
923
+ * Draws a free line from `from` to `to`, in diagram coordinates, inside `parent` when given;
924
+ * `line` and `heads` are the armed kind's, which the session writes as styles with the
925
+ * effective theme's head.
926
+ */
927
+ readonly kind: "createLine";
928
+ readonly from: Point;
929
+ readonly to: Point;
930
+ readonly parent?: string;
931
+ readonly line: "solid" | "dashed";
932
+ readonly heads: "end" | "both" | "none";
933
+ } | {
934
+ /** Moves the points of a free line, in diagram coordinates. */
935
+ readonly kind: "setLinePoints";
936
+ readonly element: string;
937
+ readonly from: Point;
938
+ readonly to: Point;
939
+ readonly via: readonly Point[];
940
+ } | {
941
+ /**
942
+ * Draws a pen stroke through `points`, in diagram coordinates as the pointer gave them
943
+ * (simplified, not snapped). `parent` is the innermost group under the first point, where
944
+ * the session starts looking for the stroke's group: from it outwards, the first group that
945
+ * is not a list and whose drawn box holds the whole stroke (its points grown by half its
946
+ * width), else the top level, so that a stroke never grows a list nor moves its cards. The
947
+ * points are written in that group's interior, and a group without `size` gets the size it
948
+ * is drawn with, so that it stays as drawn. `style` holds only what differs from a stroke's
949
+ * defaults (`penStyleFor`). The new pen is not selected and no editor opens, so the next
950
+ * stroke starts at once.
951
+ */
952
+ readonly kind: "createPen";
953
+ readonly points: readonly Point[];
954
+ readonly parent?: string;
955
+ readonly style?: PenStyle;
956
+ } | {
957
+ /**
958
+ * Moves the points of a pen stroke, in diagram coordinates: a drag of its stroke or a scale.
959
+ * A pen in a list goes out to the nearest group around it that is not a list and holds it,
960
+ * else to the top level, as `createPen` chooses.
961
+ */
962
+ readonly kind: "setPenPoints";
963
+ readonly element: string;
964
+ readonly points: readonly Point[];
572
965
  } | {
573
966
  readonly kind: "setEnd";
574
967
  readonly relation: string;
@@ -601,13 +994,45 @@ export type CanvasAction = MoveAction | ResizeAction | {
601
994
  * icon the shape (the picker's **Icon**) and any other shape puts it in a box.
602
995
  */
603
996
  readonly shape?: ShapeName;
997
+ /**
998
+ * A new note attached to an element, written as `on <element>` after its text: the id of an
999
+ * element of the diagram, or the entity path a C4 view draws. With it `at` is the point the
1000
+ * note's centre is put at when the tool was dropped on the element; the session places the
1001
+ * note beside the element instead, at its east edge plus the theme's `groupPadding`, aligned
1002
+ * to its top.
1003
+ */
1004
+ readonly attachedTo?: string;
1005
+ /**
1006
+ * The fill of a new sticky, written as `style <id> { fill … }` in the same edit: a colour
1007
+ * such as `#f8bbd0`, or a colour token as `@sticky`.
1008
+ */
1009
+ readonly fill?: string;
1010
+ /** A new group that is a list (the group menu's Column and Row): `{ layout column }`. */
1011
+ readonly layout?: "column" | "row";
1012
+ /**
1013
+ * With `parent` a list group: where the new element goes among its children
1014
+ * (`ElementInfo.list`), before the child at that index, at the end when it is the count;
1015
+ * the list places it, so it gets no `place`.
1016
+ */
1017
+ readonly index?: number;
1018
+ } | {
1019
+ /**
1020
+ * Writes, changes or removes the `on <element>` clause of a note (the inspector's **Attached
1021
+ * to** field): `element` is an element id (the entity path in a view), null for none.
1022
+ */
1023
+ readonly kind: "attachNote";
1024
+ readonly note: string;
1025
+ readonly element: string | null;
604
1026
  } | {
605
1027
  readonly kind: "connect";
606
1028
  readonly from: string;
607
1029
  readonly to: string;
608
1030
  readonly line: "solid" | "dashed";
609
- /** A head at both ends: `<->`, or `<-->` when dashed. Not in C4 views. */
610
- readonly twoWay?: boolean;
1031
+ /**
1032
+ * `both` for a head at both ends (`<->`, `<-->`), `none` for a line without heads (`--`,
1033
+ * `---`); a head at the end otherwise. Neither in C4 views.
1034
+ */
1035
+ readonly heads?: "none" | "both";
611
1036
  /**
612
1037
  * The ends pinned to a port or a point of a side, each on its own: the start when the line
613
1038
  * was dragged from a border or a handle, the end when it was dropped on the target's border.
@@ -656,6 +1081,18 @@ export type CanvasAction = MoveAction | ResizeAction | {
656
1081
  readonly field: string;
657
1082
  readonly value: string | number | null;
658
1083
  }
1084
+ /**
1085
+ * Several fields of the same targets written in one edit, one undo step: the alignment
1086
+ * picker's `style.textAlign` and `style.verticalAlign` when both change.
1087
+ */
1088
+ | {
1089
+ readonly kind: "setFields";
1090
+ readonly ids: readonly string[];
1091
+ readonly fields: readonly {
1092
+ readonly field: string;
1093
+ readonly value: string | number | null;
1094
+ }[];
1095
+ }
659
1096
  /**
660
1097
  * Writes `style <id> { icon "<icon>" }` on each of `ids` that takes an icon
661
1098
  * (`ElementInfo.takesIcon`), in one edit; the others are left as they are, and the session
@@ -722,6 +1159,58 @@ export type CanvasAction = MoveAction | ResizeAction | {
722
1159
  readonly kind: "toggleActivation";
723
1160
  readonly ids: readonly string[];
724
1161
  }
1162
+ /**
1163
+ * The text size of every item of `ids` that takes `fontSize`, one step of the common sizes up
1164
+ * (1) or down (-1) from what each draws, in one edit; nothing at the ends of the list.
1165
+ */
1166
+ | {
1167
+ readonly kind: "stepTextSize";
1168
+ readonly ids: readonly string[];
1169
+ readonly step: 1 | -1;
1170
+ }
1171
+ /** Sequence diagrams: an end of an activation bar to another event row. */
1172
+ | MoveActivationAction
1173
+ /**
1174
+ * Sequence diagrams: `tag "Tag"` (the word in the interface language, "Tag 2" when the owner has
1175
+ * "Tag" already) added last to the selected message, else to the selected participant; the
1176
+ * session selects the owner and opens the editor on the new pill (`select` with `tag`). Refused
1177
+ * with a reason when neither is selected.
1178
+ */
1179
+ | {
1180
+ readonly kind: "addTag";
1181
+ readonly ids: readonly string[];
1182
+ }
1183
+ /**
1184
+ * Sequence diagrams: the text of the tag at `index` (from 0) of the selected message, else the
1185
+ * selected participant; an empty text removes the tag (`removeTag`).
1186
+ */
1187
+ | {
1188
+ readonly kind: "setTag";
1189
+ readonly ids: readonly string[];
1190
+ readonly index: number;
1191
+ readonly text: string;
1192
+ }
1193
+ /** Sequence diagrams: removes the tag at `index` of the selected message, else participant. */
1194
+ | {
1195
+ readonly kind: "removeTag";
1196
+ readonly ids: readonly string[];
1197
+ readonly index: number;
1198
+ }
1199
+ /** Sequence diagrams: the selected events into the block of the call right before them. */
1200
+ | {
1201
+ readonly kind: "nestInCall";
1202
+ readonly ids: readonly string[];
1203
+ }
1204
+ /** Sequence diagrams: the events of the selected call, or of the call around the selection, out. */
1205
+ | {
1206
+ readonly kind: "unnestCall";
1207
+ readonly ids: readonly string[];
1208
+ }
1209
+ /** Sequence diagrams: a `return` at the end of the selected call, or of the call around it. */
1210
+ | {
1211
+ readonly kind: "addReturn";
1212
+ readonly ids: readonly string[];
1213
+ }
725
1214
  /** Sequence diagrams: a note, divider or delay after the selection, or at the end. */
726
1215
  | {
727
1216
  readonly kind: "insertEvent";
@@ -777,7 +1266,8 @@ export type CanvasAction = MoveAction | ResizeAction | {
777
1266
  /**
778
1267
  * The drawing the move, resize or rotation `action` would give on the drop, while the gesture
779
1268
  * goes on. Nothing is written: no plan, no history, no new revision. The session answers with a
780
- * `preview` host message carrying the same `token` (flow and free diagrams and C4 views).
1269
+ * `preview` host message carrying the same `token` (flow and free diagrams and C4 views; on
1270
+ * sequence diagrams, a bar handle's `moveActivation`, with the reason when it is refused).
781
1271
  */
782
1272
  | {
783
1273
  readonly kind: "preview";
@@ -791,8 +1281,11 @@ export interface RotationAction {
791
1281
  readonly field: "style.rotation";
792
1282
  readonly value: number | null;
793
1283
  }
794
- /** The gestures a canvas previews: moves, resizes and rotations. */
795
- export type PreviewedAction = MoveAction | ResizeAction | RotationAction;
1284
+ /**
1285
+ * The gestures a canvas previews: moves, resizes and rotations, and the end of an activation bar
1286
+ * dragged on a sequence diagram.
1287
+ */
1288
+ export type PreviewedAction = MoveAction | ResizeAction | RotationAction | MoveActivationAction;
796
1289
  export type CanvasMessage = {
797
1290
  readonly type: "ready";
798
1291
  } | {
@@ -859,6 +1352,34 @@ export type CanvasMessage = {
859
1352
  readonly query: string;
860
1353
  readonly token: number;
861
1354
  }
1355
+ /** The font picker's families, answered by a `fonts` message with the same `token`. */
1356
+ | {
1357
+ readonly type: "listFonts";
1358
+ readonly token: number;
1359
+ }
1360
+ /**
1361
+ * The Add icon dialog's files and prefix, checked as they are typed: answered by `iconsChecked`
1362
+ * with the same `token`.
1363
+ */
1364
+ | {
1365
+ readonly type: "checkIcons";
1366
+ readonly token: number;
1367
+ readonly prefix: string;
1368
+ readonly files: readonly IconFileInput[];
1369
+ }
1370
+ /**
1371
+ * Adds icons to the project: each file as `assets/icons/<prefix>/<name>.svg`, the pack's licence
1372
+ * when it has none, the icons in the project's library, and the first icon on `targets`, in one
1373
+ * step; answered by `iconsAdded`.
1374
+ */
1375
+ | {
1376
+ readonly type: "addIcons";
1377
+ readonly token: number;
1378
+ readonly prefix: string;
1379
+ readonly licence?: string;
1380
+ readonly files: readonly IconFileInput[];
1381
+ readonly targets: readonly string[];
1382
+ }
862
1383
  /**
863
1384
  * Creates a theme that extends the diagram's: in the file, used by the diagram, or for the
864
1385
  * project, as its default theme in `themes/<id>.meltemi`.
@@ -878,6 +1399,44 @@ export type CanvasMessage = {
878
1399
  readonly type: "themeToken";
879
1400
  readonly token: string;
880
1401
  readonly value: string | number | null;
1402
+ }
1403
+ /**
1404
+ * Where the person's pointer is over the canvas, in diagram units of the diagram shown
1405
+ * (`diagram`), or `null` once it left the canvas or a story plays: for the host to share as
1406
+ * presence (`live-collaboration`). The canvas sends it only to a host that has sent `presence`,
1407
+ * at most every 50 ms while the pointer moves. It changes nothing of the document.
1408
+ */
1409
+ | {
1410
+ readonly type: "presencePointer";
1411
+ readonly point: Point | null;
1412
+ readonly diagram?: string;
1413
+ }
1414
+ /**
1415
+ * The points a Pointer stroke added since the last batch, for the host to share in the same
1416
+ * presence message as the pointer (`live-collaboration`): `t` is the milliseconds since the
1417
+ * batch's first point, so a batch starts at 0. Sent only to a host that has sent `presence`, at
1418
+ * most every 50 ms while a stroke is drawn. It changes nothing of the document.
1419
+ */
1420
+ | {
1421
+ readonly type: "presenceLaser";
1422
+ readonly points: readonly {
1423
+ readonly x: number;
1424
+ readonly y: number;
1425
+ readonly t: number;
1426
+ }[];
1427
+ readonly diagram?: string;
1428
+ /**
1429
+ * Set while the points are a stroke of the pen or the highlighter, for the others to draw it
1430
+ * as it grows: its width, its resolved colour, its opacity and its number, within
1431
+ * `PRESENCE_PEN_LIMITS`, with `cancel` on the batch (maybe of no points) that ends a stroke
1432
+ * cancelled with Escape. The Pointer's batches carry none.
1433
+ */
1434
+ readonly pen?: PresencePen;
1435
+ };
1436
+ /** How many files the Add icon dialog sends at once, and the longest SVG text it sends. */
1437
+ export declare const ADD_ICON_LIMITS: {
1438
+ readonly files: 50;
1439
+ readonly svg: 300000;
881
1440
  };
882
1441
  /** Whether a value from the webview is a well-formed canvas message. */
883
1442
  export declare function isCanvasMessage(m: unknown): m is CanvasMessage;