@miragon/event-storming-renderer 0.2.2 → 0.3.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 (66) hide show
  1. package/README.md +141 -0
  2. package/dist/EventStormingBaseViewer.d.ts +13 -3
  3. package/dist/EventStormingBaseViewer.d.ts.map +1 -1
  4. package/dist/Modeler.d.ts +1 -1
  5. package/dist/Modeler.d.ts.map +1 -1
  6. package/dist/board-bounds/BoardBounds.d.ts +3 -0
  7. package/dist/board-bounds/BoardBounds.d.ts.map +1 -1
  8. package/dist/board-menu/ShortcutsDialog.d.ts +27 -0
  9. package/dist/board-menu/ShortcutsDialog.d.ts.map +1 -0
  10. package/dist/board-menu/index.d.ts +7 -0
  11. package/dist/board-menu/index.d.ts.map +1 -0
  12. package/dist/board-menu/menu.d.ts +85 -0
  13. package/dist/board-menu/menu.d.ts.map +1 -0
  14. package/dist/board-menu/shortcuts.d.ts +43 -0
  15. package/dist/board-menu/shortcuts.d.ts.map +1 -0
  16. package/dist/collaborative/CollaborativeEventStorming.d.ts +25 -0
  17. package/dist/collaborative/CollaborativeEventStorming.d.ts.map +1 -0
  18. package/dist/collaborative/index.d.ts +2 -0
  19. package/dist/collaborative/index.d.ts.map +1 -0
  20. package/dist/context-pad/EventStormingContextPadProvider.d.ts +4 -1
  21. package/dist/context-pad/EventStormingContextPadProvider.d.ts.map +1 -1
  22. package/dist/draw/EventStormingRenderer.d.ts.map +1 -1
  23. package/dist/draw/icons.d.ts +20 -19
  24. package/dist/draw/icons.d.ts.map +1 -1
  25. package/dist/draw/lucide.d.ts +31 -0
  26. package/dist/draw/lucide.d.ts.map +1 -0
  27. package/dist/draw/palette-icons.d.ts.map +1 -1
  28. package/dist/draw/styles.d.ts +10 -9
  29. package/dist/draw/styles.d.ts.map +1 -1
  30. package/dist/draw-tool/EventStormingDrawTool.d.ts.map +1 -1
  31. package/dist/draw-tool/EventStormingDrawingHandles.d.ts +3 -1
  32. package/dist/draw-tool/EventStormingDrawingHandles.d.ts.map +1 -1
  33. package/dist/event-storming.css +1 -1
  34. package/dist/index.d.ts +8 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1221 -630
  37. package/dist/index.js.map +1 -1
  38. package/dist/io/EventStormingExporter.d.ts +1 -3
  39. package/dist/io/EventStormingExporter.d.ts.map +1 -1
  40. package/dist/io/EventStormingImporter.d.ts +13 -0
  41. package/dist/io/EventStormingImporter.d.ts.map +1 -1
  42. package/dist/io/index.d.ts +1 -0
  43. package/dist/io/index.d.ts.map +1 -1
  44. package/dist/io/saveSvg.d.ts.map +1 -1
  45. package/dist/io/types.d.ts +5 -0
  46. package/dist/io/types.d.ts.map +1 -1
  47. package/dist/io/warnings.d.ts +7 -0
  48. package/dist/io/warnings.d.ts.map +1 -0
  49. package/dist/keyboard/EventStormingKeyboard.d.ts +14 -4
  50. package/dist/keyboard/EventStormingKeyboard.d.ts.map +1 -1
  51. package/dist/keyboard/index.d.ts +2 -1
  52. package/dist/keyboard/index.d.ts.map +1 -1
  53. package/dist/label-editing/EventStormingLabelEditing.d.ts +27 -1
  54. package/dist/label-editing/EventStormingLabelEditing.d.ts.map +1 -1
  55. package/dist/label-editing/note-editor-dom.d.ts.map +1 -1
  56. package/dist/palette/EventStormingPaletteProvider.d.ts +28 -1
  57. package/dist/palette/EventStormingPaletteProvider.d.ts.map +1 -1
  58. package/dist/read-only/EventStormingReadOnly.d.ts +20 -0
  59. package/dist/read-only/EventStormingReadOnly.d.ts.map +1 -0
  60. package/dist/read-only/index.d.ts +5 -0
  61. package/dist/read-only/index.d.ts.map +1 -0
  62. package/dist/theme/index.d.ts +1 -1
  63. package/dist/theme/index.d.ts.map +1 -1
  64. package/dist/theme/palette.d.ts +27 -31
  65. package/dist/theme/palette.d.ts.map +1 -1
  66. package/package.json +10 -9
package/README.md CHANGED
@@ -38,6 +38,106 @@ arrows, undo/redo). Stickies are colored per kind (`STICKY_STYLES`): domain even
38
38
  actor, aggregate, policy, read model, external system, hotspot — plus free-text notes and
39
39
  freeform drawings on an unbounded canvas.
40
40
 
41
+ ### Options
42
+
43
+ `Viewer`, `NavigatedViewer` and `Modeler` take the same options:
44
+
45
+ | Option | Default | Purpose |
46
+ | ------------------- | ------------------ | ------------------------------------------------------------ |
47
+ | `container` | a detached `<div>` | Host element; without one, mount later with `attachTo(host)` |
48
+ | `width`, `height` | `100%`, `600px` | Container size (`100%` high when a `container` is given) |
49
+ | `additionalModules` | `[]` | diagram-js modules appended after the renderer's own |
50
+ | `undoRedoKeys` | `true` | `Modeler` only: bind Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z and Ctrl+Y |
51
+ | `freeRectInsets` | none | `Modeler` only: `() => ({ top, right, bottom, left })` in px |
52
+
53
+ Pass `undoRedoKeys: false` when the host owns the history, as the VS Code extension does: the keys
54
+ then reach the host untouched and the host undoes the document, while copy, paste, delete, the
55
+ arrow keys and the single-key tools keep working on the canvas.
56
+
57
+ The modeler's keyboard listens on `document`, but only acts on keys aimed at the canvas: the
58
+ target lies inside the canvas container, or nothing is focused (`document.body`). Keys another
59
+ listener already handled (`defaultPrevented`) and keys typed into text fields are left alone, and
60
+ the canvas container gets no `tabindex` of its own. Cmd/Ctrl+A selects the whole board. An import
61
+ erases the undo history without firing `commandStack.changed`, and fires `import.parse.start`,
62
+ `import.render.start` and `import.done` in that order. It frames the content centred at the
63
+ largest zoom that shows all of it, never above 100%; an empty board shows at 100%. A label being
64
+ typed when an import arrives is reopened on the same element afterwards, with the typed text.
65
+
66
+ Enter or Space on a creating palette entry (a click without a pointer, `detail` 0) places the
67
+ element in the centre of the container minus `freeRectInsets` (the margins a host's chrome covers),
68
+ 24px down and right while that spot is taken, selects it and opens its label editor.
69
+
70
+ `eventStormingReadOnly` locks every edit while a host cannot save from the canvas (an invalid file
71
+ in an IDE): `diagram.get('eventStormingReadOnly').setReadOnly(true)` vetoes moves, resizes,
72
+ creates, connections and deletes through the diagram-js rules, and the keyboard, context pad, label
73
+ editor and drawing handles stop editing. Selection, zoom, pan, copy and export stay.
74
+
75
+ The DSL's `style dark` directive stays in the board config, so the text round-trips, but the
76
+ renderer paints nothing for it: the page's design-system mode decides light or dark, never the
77
+ file. The chrome reads the `--cd-ui-*` roles of the vendored Miragon tokens only, and the canvas
78
+ drawing keeps literal light colours in its SVG attributes, so exports look the same everywhere.
79
+
80
+ ### Collaborative hosts
81
+
82
+ The package implements the collaborative-modeler contract of
83
+ [`@miragon/modeler-api`](https://www.npmjs.com/package/@miragon/modeler-api) (notation
84
+ `event-storming`) and runs its conformance kit in CI:
85
+
86
+ ```ts
87
+ import {
88
+ createCollaborativeModeler,
89
+ createCollaborativeViewer,
90
+ } from '@miragon/event-storming-renderer';
91
+
92
+ const modeler = createCollaborativeModeler(); // meta.editable: true
93
+ modeler.attachTo(host); // in the document, with a size
94
+ await modeler.importText(text); // silent, history erased, view fitted
95
+ const off = modeler.onContentChanged(() => save(modeler.exportText()));
96
+
97
+ const viewer = createCollaborativeViewer(); // meta.editable: false, never changes content
98
+ ```
99
+
100
+ - `importText` resolves for every `.storm` text: the DSL keeps every line it cannot read in
101
+ `rawPassthrough` (with a diagnostic, returned as a `warning`), gives a sticky that claims a
102
+ reserved id (`event-storming-root`, `__implicitroot…`) a fresh one, and reads a coordinate or
103
+ size beyond ±1e38 (more than the canvas's SVG transforms hold) as an unreadable line. A board
104
+ passed to `diagram.importMap` that uses a reserved id rejects before the canvas changes.
105
+ - `onContentChanged` fires for every command-stack change, undo and redo included (also the
106
+ workshop level), never for imports, view options (type captions) or the viewport.
107
+ - `getViewState()` / `setViewState()` read and set the diagram-js viewbox (`x`, `y`, `width`,
108
+ `height`); an import fits the board, never above 100% and never below 0.1% (a board too wide to
109
+ show whole at 0.1% is centred there instead).
110
+ - `elements` lists the stickies with their ids and labels, reveals (selects and scrolls to) one
111
+ and reports the selection. Sticky ids survive a save and a re-open: the DSL writes `(id …)`
112
+ back for every sticky whose id the parser would not derive again from its label at that line (one
113
+ created on the canvas, a renamed one). Notes, drawings and arrows have no id in the text yet (theirs
114
+ derive from their text or position), so they are not addressable.
115
+ - New sticky ids are not collision-free across peers: a sticky created on the canvas takes the
116
+ lowest free `<prefix>_<n>` of its own instance, so two peers that each add one at the same time
117
+ both write `(id event_1)`. When their texts merge, the parser gives the second sticky a fresh id,
118
+ and whatever was linked to it points at the first. Contract 1.1 only recommends collision-free
119
+ ids; the conformance test accepts this as its one advisory.
120
+ - `diagram` is the wrapped `Modeler` or `NavigatedViewer`, for everything outside the contract.
121
+ `createCollaborativeModeler` accepts `additionalModules`, `undoRedoKeys` and `freeRectInsets`.
122
+ - After `destroy()`, `exportText()` returns the last state and `importText()` rejects.
123
+
124
+ #### Migrating a host
125
+
126
+ - **DOM.** `attachTo(host)` appends the diagram's own `.event-storming-container` inside `host`.
127
+ Scope host CSS as a descendant (`.my-host .event-storming-container`), not as a compound selector
128
+ on the host element.
129
+ - **What can go:** an echo latch around imports (they are silent), a command-stack shim for the
130
+ viewer (it has none and needs none), special handling of the renderer's own viewbox change on
131
+ import (the post-import view is the fit), and keeping the viewbox by hand (`getViewState` /
132
+ `setViewState`).
133
+ - **What stays:** presence and view controls that need diagram-js services (canvas, element
134
+ registry) go through `diagram`.
135
+ - **Empty text** imports as a blank board titled `Untitled Board`; a host that treats empty text
136
+ differently keeps its own check.
137
+ - **Ids.** Hosts that derive ids from the text themselves (server-side extraction) read `(id …)`
138
+ first and derive the rest exactly like the parser: `<prefix>_<slug(label)>`, `_2`, `_3`, … in line
139
+ order.
140
+
41
141
  ### Fonts
42
142
 
43
143
  The package ships no fonts and uses no CDN. The canvas typeface is **Geist** (Miragon corporate
@@ -53,3 +153,44 @@ Part of the [Event Storming Modeler](https://github.com/Miragon/event-storming-m
53
153
  ## License
54
154
 
55
155
  MIT
156
+
157
+ The tool icons of the palette (`square-dashed-mouse-pointer`, and for Draw `spline` with a straight segment) and the icons of the
158
+ context pad and the note toolbar (`plus`, `arrow-right`, `replace`, `line-style`, `palette`,
159
+ `pencil`, `trash`, `bold`, `italic`, `list`, `text-align-*`, `align-vertical-justify-*`) are copied
160
+ from [Lucide](https://lucide.dev) (`lucide-static` 1.59.0):
161
+
162
+ > ISC License
163
+ >
164
+ > Copyright (c) 2026 Lucide Icons and Contributors
165
+ >
166
+ > Permission to use, copy, modify, and/or distribute this software for any purpose with or without
167
+ > fee is hereby granted, provided that the above copyright notice and this permission notice
168
+ > appear in all copies.
169
+ >
170
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
171
+ > SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
172
+ > AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
173
+ > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
174
+ > NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
175
+ > PERFORMANCE OF THIS SOFTWARE.
176
+
177
+ `arrow-right`, `italic`, `plus` and `trash` are derived from [Feather](https://feathericons.com):
178
+
179
+ > The MIT License (MIT)
180
+ >
181
+ > Copyright (c) 2013-present Cole Bemis
182
+ >
183
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
184
+ > associated documentation files (the "Software"), to deal in the Software without restriction,
185
+ > including without limitation the rights to use, copy, modify, merge, publish, distribute,
186
+ > sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
187
+ > furnished to do so, subject to the following conditions:
188
+ >
189
+ > The above copyright notice and this permission notice shall be included in all copies or
190
+ > substantial portions of the Software.
191
+ >
192
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
193
+ > BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
194
+ > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
195
+ > DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
196
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,6 +1,7 @@
1
1
  import { ModuleDeclaration } from 'didi';
2
2
  import { EventStormingBoard } from '@miragon/event-storming-schema-model';
3
3
  import { ImportWarning } from './io/types.js';
4
+ import { FreeRectInsets } from './palette/EventStormingPaletteProvider.js';
4
5
  export interface EventStormingViewerOptions {
5
6
  /** Host element. If missing, a detached <div> is created (can be attached later via attachTo). */
6
7
  container?: HTMLElement;
@@ -8,6 +9,17 @@ export interface EventStormingViewerOptions {
8
9
  height?: number | string;
9
10
  /** Concatenated to the end of the module list (extension point). */
10
11
  additionalModules?: ModuleDeclaration[];
12
+ /**
13
+ * Bind Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z and Cmd/Ctrl+Y to the board's undo/redo (default true).
14
+ * Pass false when the host owns the history (the VS Code document), so the keys reach it.
15
+ */
16
+ undoRedoKeys?: boolean | undefined;
17
+ /**
18
+ * The margins of the container that chrome covers (palette row, zoom panel). An element created
19
+ * from the palette with Enter or Space lands in the centre of what is left (guide §5.5); without
20
+ * it, in the centre of the container.
21
+ */
22
+ freeRectInsets?: (() => FreeRectInsets) | undefined;
11
23
  }
12
24
  export type EventCallback<T = unknown> = (event: T) => void;
13
25
  /**
@@ -32,8 +44,6 @@ export declare abstract class EventStormingBaseViewer {
32
44
  importMap(board: EventStormingBoard): Promise<{
33
45
  warnings: ImportWarning[];
34
46
  }>;
35
- /** DSL `style` directive as a CSS class on the container (`event-storming-dark` etc.). */
36
- private _applyStyleClass;
37
47
  /** Load `.storm` DSL text (internally parse -> importMap). Parser findings land in the warnings. */
38
48
  importDSL(text: string): Promise<{
39
49
  warnings: ImportWarning[];
@@ -46,7 +56,7 @@ export declare abstract class EventStormingBaseViewer {
46
56
  svg: string;
47
57
  }>;
48
58
  /** Own implementation (not a diagram-js primitive): attach the container to `target`. */
49
- attachTo(target: HTMLElement): void;
59
+ attachTo(target: Element): void;
50
60
  /** Own implementation: detach the container from the DOM, keeping state. */
51
61
  detach(): void;
52
62
  clear(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"EventStormingBaseViewer.d.ts","sourceRoot":"","sources":["../src/EventStormingBaseViewer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,0BAA0B;IACzC,kGAAkG;IAClG,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;AAM5D;;;;;;GAMG;AACH,8BAAsB,uBAAuB;IAC3C,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,iBAAiB,EAAE;IAErD,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;gBAE1C,OAAO,GAAE,0BAA+B;IAKpD,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,cAAc;IAQtB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC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;IAkBrE,qEAAqE;IACrE,SAAS,IAAI,kBAAkB;IAI/B,SAAS,IAAI,MAAM;IAInB,gFAAgF;IAC1E,OAAO,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAOzC,yFAAyF;IACzF,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAK/B,4EAA4E;IAC5E,MAAM,IAAI,IAAI;IAId,KAAK,IAAI,IAAI;IAIb,OAAO,IAAI,IAAI;IAQf,IAAI,SAAS,IAAI,WAAW,CAE3B;CACF"}
package/dist/Modeler.d.ts CHANGED
@@ -3,7 +3,7 @@ import { NavigatedViewer } from './NavigatedViewer.js';
3
3
  /**
4
4
  * Full Event Storming editor: palette/create, free move with sticky-center snapping, connect
5
5
  * with rules, context pad, inline label editing, undo/redo, pinning of actor/hotspot stickies,
6
- * free resizing of notes.
6
+ * free resizing of notes, and the edit lock for an invalid document (`eventStormingReadOnly`).
7
7
  */
8
8
  export declare class Modeler extends NavigatedViewer {
9
9
  protected _getModules(): ModuleDeclaration[];
@@ -1 +1 @@
1
- {"version":3,"file":"Modeler.d.ts","sourceRoot":"","sources":["../src/Modeler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAa9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAiBvD;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,eAAe;cACvB,WAAW,IAAI,iBAAiB,EAAE;IA8BrD,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,OAAO;CAGnB"}
1
+ {"version":3,"file":"Modeler.d.ts","sourceRoot":"","sources":["../src/Modeler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAa9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAkBvD;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,eAAe;cACvB,WAAW,IAAI,iBAAiB,EAAE;IA+BrD,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,OAAO;CAGnB"}
@@ -19,5 +19,8 @@ export default class BoardBounds {
19
19
  * schema-model default framing so fitView/export behave sensibly before the first sticky.
20
20
  */
21
21
  contentBounds(padding?: number): Bounds;
22
+ /** No element on the board: `contentBounds` is only the default framing then. */
23
+ isEmpty(): boolean;
24
+ private positionedShapes;
22
25
  }
23
26
  //# sourceMappingURL=BoardBounds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BoardBounds.d.ts","sourceRoot":"","sources":["../../src/board-bounds/BoardBounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAIvE,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAwBD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,WAAW;IAGlB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAF5C,MAAM,CAAC,OAAO,WAAuB;gBAER,eAAe,EAAE,eAAe;IAE7D;;;OAGG;IACH,aAAa,CAAC,OAAO,SAAM,GAAG,MAAM;CAerC"}
1
+ {"version":3,"file":"BoardBounds.d.ts","sourceRoot":"","sources":["../../src/board-bounds/BoardBounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAIvE,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAwBD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,WAAW;IAGlB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAF5C,MAAM,CAAC,OAAO,WAAuB;gBAER,eAAe,EAAE,eAAe;IAE7D;;;OAGG;IACH,aAAa,CAAC,OAAO,SAAM,GAAG,MAAM;IAgBpC,iFAAiF;IACjF,OAAO,IAAI,OAAO;IAIlB,OAAO,CAAC,gBAAgB;CAGzB"}
@@ -0,0 +1,27 @@
1
+ import { BoardShortcutOptions, ShortcutsChrome } from './shortcuts.js';
2
+ /** What the dialog needs of the chrome around the board; a `@miragon/modeler-shell` handle fits. */
3
+ export interface ShortcutsDialogChrome extends ShortcutsChrome {
4
+ /** Where the dialog lives (the shell root), so it shares the chrome's mode and fonts. */
5
+ readonly root: HTMLElement;
6
+ readonly messages: ShortcutsChrome['messages'] & {
7
+ readonly close: string;
8
+ };
9
+ /** The control the focus returns to once the dialog closes. */
10
+ readonly menu: {
11
+ readonly trigger: HTMLElement;
12
+ };
13
+ }
14
+ export interface ShortcutsDialog {
15
+ open(): void;
16
+ isOpen(): boolean;
17
+ close(): void;
18
+ destroy(): void;
19
+ }
20
+ /**
21
+ * The "Keyboard shortcuts…" dialog of the Help group (guide §5.4, §8), a native modal <dialog>
22
+ * inside the chrome's root: the browser keeps the focus inside it and closes it on Escape. Built on
23
+ * the first open and kept (closed) afterwards; `destroy()` removes it, the host calls it with the
24
+ * diagram's teardown, since the chrome removes only what it added itself.
25
+ */
26
+ export declare function createShortcutsDialog(chrome: ShortcutsDialogChrome, options?: BoardShortcutOptions): ShortcutsDialog;
27
+ //# sourceMappingURL=ShortcutsDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShortcutsDialog.d.ts","sourceRoot":"","sources":["../../src/board-menu/ShortcutsDialog.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAKxB,oGAAoG;AACpG,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,yFAAyF;IACzF,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,GAAG;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5E,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;KAAE,CAAC;CAClD;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,OAAO,CAAC;IAClB,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,IAAI,CAAC;CACjB;AAuDD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,OAAO,GAAE,oBAAyB,GACjC,eAAe,CAgCjB"}
@@ -0,0 +1,7 @@
1
+ export { boardMenu, BOARD_LEVELS, STORM_EXPORT_LABEL } from './menu.js';
2
+ export type { BoardExport, BoardExports, BoardLevels, BoardMenu, BoardMenuAction, BoardMenuActions, BoardMenuCheckbox, BoardMenuDialog, BoardMenuEntry, BoardMenuIcon, BoardMenuRadioGroup, TypeCaptions, } from './menu.js';
3
+ export { boardShortcuts, commandKeyLabel } from './shortcuts.js';
4
+ export type { BoardShortcutOptions, ShortcutGroup, ShortcutKeyNames, ShortcutPlatform, ShortcutRow, ShortcutsChrome, } from './shortcuts.js';
5
+ export { createShortcutsDialog } from './ShortcutsDialog.js';
6
+ export type { ShortcutsDialog, ShortcutsDialogChrome } from './ShortcutsDialog.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/board-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACxE,YAAY,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { BoardLevel } from '@miragon/event-storming-schema-model';
2
+ /** The icons the guide gives these entries (guide §5.14, the shell's common set). */
3
+ export type BoardMenuIcon = 'file-image' | 'file-code-corner' | 'keyboard';
4
+ interface BoardMenuItem {
5
+ readonly id: string;
6
+ readonly label: string;
7
+ readonly icon?: BoardMenuIcon;
8
+ readonly keepEnabledWhenReadOnly?: boolean;
9
+ }
10
+ export interface BoardMenuAction extends BoardMenuItem {
11
+ readonly kind: 'action';
12
+ readonly shortcut?: string;
13
+ onSelect(): void;
14
+ }
15
+ export interface BoardMenuDialog extends BoardMenuItem {
16
+ readonly kind: 'dialog';
17
+ onSelect(): void;
18
+ }
19
+ export interface BoardMenuCheckbox extends BoardMenuItem {
20
+ readonly kind: 'checkbox';
21
+ checked(): boolean;
22
+ onToggle(checked: boolean): void;
23
+ }
24
+ export interface BoardMenuRadioGroup {
25
+ readonly kind: 'radio';
26
+ readonly id: string;
27
+ readonly label: string;
28
+ readonly options: ReadonlyArray<{
29
+ readonly value: string;
30
+ readonly label: string;
31
+ }>;
32
+ value(): string | undefined;
33
+ onSelect(value: string): void;
34
+ }
35
+ export type BoardMenuEntry = BoardMenuAction | BoardMenuDialog | BoardMenuCheckbox | BoardMenuRadioGroup;
36
+ export interface BoardMenu {
37
+ readonly model: readonly BoardMenuEntry[];
38
+ readonly export: readonly BoardMenuEntry[];
39
+ readonly help: readonly BoardMenuEntry[];
40
+ }
41
+ /** The workshop level of the board (`eventStormingModeling`). */
42
+ export interface BoardLevels {
43
+ getLevel(): BoardLevel;
44
+ setLevel(level: BoardLevel): void;
45
+ }
46
+ /** The type captions on the stickies (`eventStormingViewOptions`). */
47
+ export interface TypeCaptions {
48
+ typeCaptionsVisible(): boolean;
49
+ setTypeCaptionsVisible(visible: boolean): void;
50
+ }
51
+ export interface BoardExport {
52
+ onSelect(): void;
53
+ /** The chip of an app key that runs the same export, e.g. "⌘S". */
54
+ readonly shortcut?: string | undefined;
55
+ }
56
+ /**
57
+ * The exports a host offers, in the guide's order: PNG first (the more frequent target), then
58
+ * SVG, then the variants, then further formats. Both hosts offer PNG, SVG, the transparent PNG and
59
+ * JSON (guide §5.2: one Export group); only the web app adds .storm, which in VS Code is the file.
60
+ */
61
+ export interface BoardExports {
62
+ readonly png: BoardExport;
63
+ readonly svg: BoardExport;
64
+ readonly transparentPng?: BoardExport | undefined;
65
+ readonly json?: BoardExport | undefined;
66
+ readonly storm?: BoardExport | undefined;
67
+ }
68
+ export interface BoardMenuActions {
69
+ readonly levels: BoardLevels;
70
+ readonly typeCaptions: TypeCaptions;
71
+ /** Every toggle of the type captions, so the host can remember the choice. */
72
+ onTypeCaptionsToggled?(visible: boolean): void;
73
+ readonly exports: BoardExports;
74
+ showKeyboardShortcuts(): void;
75
+ }
76
+ /** The web app's native-format export, in the Export group and in the shortcuts dialog. */
77
+ export declare const STORM_EXPORT_LABEL = "Export as .storm";
78
+ export declare const BOARD_LEVELS: ReadonlyArray<{
79
+ readonly value: BoardLevel;
80
+ readonly label: string;
81
+ }>;
82
+ /** The menu groups of the board (guide §5.4): Model, Export with PNG first, Help. */
83
+ export declare function boardMenu(actions: BoardMenuActions): BoardMenu;
84
+ export {};
85
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,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CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,qBAAqB,IAAI,IAAI,CAAC;CAC/B;AAED,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAErD,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAI9F,CAAC;AAyCF,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAqC9D"}
@@ -0,0 +1,43 @@
1
+ export type ShortcutPlatform = 'mac' | 'other';
2
+ export interface ShortcutKeyNames {
3
+ readonly ctrl: string;
4
+ readonly shift: string;
5
+ readonly plus: string;
6
+ readonly minus: string;
7
+ }
8
+ /** What the shortcuts need of the chrome around the board. */
9
+ export interface ShortcutsChrome {
10
+ readonly platform: ShortcutPlatform;
11
+ /** The tool's UI language, for the percentage in "Zoom to 100%". */
12
+ readonly lang: string;
13
+ readonly messages: {
14
+ readonly zoomIn: string;
15
+ readonly zoomOut: string;
16
+ zoomToActual(percent: string): string;
17
+ readonly fit: string;
18
+ /** The File group's "Open…" (the shell's `messages.openFile`); default "Open…". */
19
+ readonly openFile?: string | undefined;
20
+ readonly keyNames: ShortcutKeyNames;
21
+ };
22
+ }
23
+ export interface ShortcutRow {
24
+ readonly action: string;
25
+ /** Alternative key combinations, each shown as its own chip. */
26
+ readonly keys: readonly string[];
27
+ }
28
+ export interface ShortcutGroup {
29
+ readonly title: string;
30
+ readonly rows: readonly ShortcutRow[];
31
+ }
32
+ export interface BoardShortcutOptions {
33
+ /** The web app's file keys: Cmd/Ctrl+O opens a file, Cmd/Ctrl+S exports the .storm file. */
34
+ readonly fileKeys?: boolean | undefined;
35
+ }
36
+ /** "⌘O" on macOS, "Ctrl+O" elsewhere: the chip of a Cmd/Ctrl key the app binds itself. */
37
+ export declare function commandKeyLabel(key: string, platform: ShortcutPlatform, keyNames: Pick<ShortcutKeyNames, 'ctrl'>): string;
38
+ /**
39
+ * Every shortcut of the board, grouped as guide §5.4 asks (View, Edit, the notation's tools),
40
+ * after the web app's File keys where it binds them.
41
+ */
42
+ export declare function boardShortcuts(chrome: ShortcutsChrome, options?: BoardShortcutOptions): ShortcutGroup[];
43
+ //# sourceMappingURL=shortcuts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../src/board-menu/shortcuts.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;QACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,mFAAmF;QACnF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACvC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KACrC,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,oBAAoB;IACnC,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACzC;AAID,0FAA0F;AAC1F,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,GACvC,MAAM,CAER;AAkED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,oBAAyB,GACjC,aAAa,EAAE,CA2CjB"}
@@ -0,0 +1,25 @@
1
+ import { CollaborativeModeler, ElementsSurface } from '@miragon/modeler-api';
2
+ import { ModuleDeclaration } from 'didi';
3
+ import { Modeler } from '../Modeler.js';
4
+ import { NavigatedViewer } from '../NavigatedViewer.js';
5
+ import { FreeRectInsets } from '../palette/EventStormingPaletteProvider.js';
6
+ /** Stable notation id in `meta.notation` of the collaborative-modeler contract. */
7
+ export declare const EVENT_STORMING_NOTATION = "event-storming";
8
+ export interface CollaborativeEventStormingOptions {
9
+ /** Appended to the renderer's own modules (e.g. a host's chrome module). */
10
+ additionalModules?: ModuleDeclaration[] | undefined;
11
+ /** See `EventStormingViewerOptions.undoRedoKeys` (default true). */
12
+ undoRedoKeys?: boolean | undefined;
13
+ /** See `EventStormingViewerOptions.freeRectInsets`. */
14
+ freeRectInsets?: (() => FreeRectInsets) | undefined;
15
+ }
16
+ /** The contract surface plus the wrapped diagram for host-specific wiring. */
17
+ export interface CollaborativeEventStormingModeler extends CollaborativeModeler {
18
+ readonly elements: ElementsSurface;
19
+ readonly diagram: Modeler | NavigatedViewer;
20
+ }
21
+ /** The editing mount (`meta.editable: true`) of the collaborative-modeler contract. */
22
+ export declare function createCollaborativeModeler(options?: CollaborativeEventStormingOptions): CollaborativeEventStormingModeler;
23
+ /** The read-only mount (`meta.editable: false`): imports, exports and reveals, never edits. */
24
+ export declare function createCollaborativeViewer(options?: Omit<CollaborativeEventStormingOptions, 'undoRedoKeys' | 'freeRectInsets'>): CollaborativeEventStormingModeler;
25
+ //# sourceMappingURL=CollaborativeEventStorming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollaborativeEventStorming.d.ts","sourceRoot":"","sources":["../../src/collaborative/CollaborativeEventStorming.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,eAAe,EAGrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAK9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAEjF,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAExD,MAAM,WAAW,iCAAiC;IAChD,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IACpD,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,uDAAuD;IACvD,cAAc,CAAC,EAAE,CAAC,MAAM,cAAc,CAAC,GAAG,SAAS,CAAC;CACrD;AAED,8EAA8E;AAC9E,MAAM,WAAW,iCAAkC,SAAQ,oBAAoB;IAC7E,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC;CAC7C;AAgBD,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,iCAAsC,GAC9C,iCAAiC,CASnC;AAED,+FAA+F;AAC/F,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,IAAI,CAAC,iCAAiC,EAAE,cAAc,GAAG,gBAAgB,CAAM,GACvF,iCAAiC,CAEnC"}
@@ -0,0 +1,2 @@
1
+ export { EVENT_STORMING_NOTATION, createCollaborativeModeler, createCollaborativeViewer, type CollaborativeEventStormingModeler, type CollaborativeEventStormingOptions, } from './CollaborativeEventStorming.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/collaborative/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,GACvC,MAAM,iCAAiC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { default as ContextPad } from 'diagram-js/lib/features/context-pad/ContextPad';
2
+ import { default as EventBus } from 'diagram-js/lib/core/EventBus';
2
3
  import { default as Modeling } from 'diagram-js/lib/features/modeling/Modeling';
3
4
  import { default as Connect } from 'diagram-js/lib/features/connect/Connect';
4
5
  import { default as Create } from 'diagram-js/lib/features/create/Create';
@@ -9,6 +10,7 @@ import { default as EventStormingModeling } from '../modeling/EventStormingModel
9
10
  import { default as EventStormingLabelEditing } from '../label-editing/EventStormingLabelEditing.js';
10
11
  import { default as EventStormingElementFactory } from '../model/EventStormingElementFactory.js';
11
12
  import { default as EventStormingColorPicker } from '../color-picker/EventStormingColorPicker.js';
13
+ import { EventStormingReadOnly } from '../read-only/index.js';
12
14
  /** Context actions per element. */
13
15
  export default class EventStormingContextPadProvider implements ContextPadProvider {
14
16
  private readonly modeling;
@@ -19,8 +21,9 @@ export default class EventStormingContextPadProvider implements ContextPadProvid
19
21
  private readonly labelEditing;
20
22
  private readonly factory;
21
23
  private readonly colorPicker;
24
+ private readonly readOnly?;
22
25
  static $inject: string[];
23
- constructor(contextPad: ContextPad, modeling: Modeling, connect: Connect, create: Create, popupMenu: PopupMenu, eventStormingModeling: EventStormingModeling, labelEditing: EventStormingLabelEditing, factory: EventStormingElementFactory, colorPicker: EventStormingColorPicker);
26
+ constructor(contextPad: ContextPad, modeling: Modeling, connect: Connect, create: Create, popupMenu: PopupMenu, eventStormingModeling: EventStormingModeling, labelEditing: EventStormingLabelEditing, factory: EventStormingElementFactory, colorPicker: EventStormingColorPicker, eventBus?: EventBus, readOnly?: Pick<EventStormingReadOnly, "isReadOnly"> | undefined);
24
27
  getContextPadEntries(element: Element): ContextPadEntries;
25
28
  }
26
29
  //# sourceMappingURL=EventStormingContextPadProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventStormingContextPadProvider.d.ts","sourceRoot":"","sources":["../../src/context-pad/EventStormingContextPadProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AACtE,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,IAAI,kBAAkB,EAC9B,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO1D,OAAO,KAAK,qBAAqB,MAAM,sCAAsC,CAAC;AAC9E,OAAO,KAAK,yBAAyB,MAAM,+CAA+C,CAAC;AAC3F,OAAO,KAAK,2BAA2B,MAAM,yCAAyC,CAAC;AACvF,OAAO,KAAK,wBAAwB,MAAM,6CAA6C,CAAC;AAwBxF,mCAAmC;AACnC,MAAM,CAAC,OAAO,OAAO,+BAAgC,YAAW,kBAAkB;IAe9E,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB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AC,QAAQ,CAAC,WAAW;IAJ9B,MAAM,CAAC,OAAO,WAA4C;gBAGxD,QAAQ,EAAE,QAAQ,EACD,WAAW,EAAE,wBAAwB;IAK/C,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO;IAIxC,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,UAAU;IAMvE,2FAA2F;IAC3F,OAAO,CAAC,WAAW;IAiBnB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IA8DT,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,GAAG,UAAU;IA+BxE,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAKtC,iBAAiB,CAAC,UAAU,EAAE,cAAc,GAAG,MAAM;CAK/D"}
@@ -3,41 +3,42 @@
3
3
  * 24x24-viewBox paths. `iconMarkup` renders them as an HTML string (palette/context pad/buttons)
4
4
  * with `fill: currentColor` (color controllable via CSS).
5
5
  * Source: https://github.com/google/material-design-icons (Apache License 2.0).
6
+ *
7
+ * Nothing in the repo uses them since the chrome moved to the modeler shell; they stay exported
8
+ * until a later minor so a consumer's own buttons keep working.
6
9
  */
10
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
7
11
  export declare const ICON_PERSON = "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z";
8
- export declare const ICON_ARROW_FORWARD = "M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z";
12
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
9
13
  export declare const ICON_EDIT = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z";
14
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
10
15
  export declare const ICON_DELETE = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z";
16
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
11
17
  export declare const ICON_UNDO = "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z";
18
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
12
19
  export declare const ICON_REDO = "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z";
13
- /** data_object — JSON. */
20
+ /** data_object — JSON. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
14
21
  export declare const ICON_DATA_OBJECT = "M4 7v2c0 .55-.45 1-1 1H2v2h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h1v-2H7c-.55 0-1-.45-1-1v-2c0-.84-.35-1.61-.92-2.18L4.85 12l.23-.82C5.65 10.61 6 9.84 6 9V7c0-.55.45-1 1-1h1V4H7C5.35 4 4 5.35 4 7zm16 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-1v2h1c.55 0 1 .45 1 1v2c0 .84.35 1.61.92 2.18l.23.82-.23.82c-.57.57-.92 1.34-.92 2.18v2c0 .55-.45 1-1 1h-1v2h1c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-2h-1z";
15
- /** code — DSL. */
22
+ /** code — DSL. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
16
23
  export declare const ICON_CODE = "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z";
17
- /** download — Export. */
24
+ /** download — Export. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
18
25
  export declare const ICON_DOWNLOAD = "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z";
19
- /** share — share link. */
26
+ /** share — share link. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
20
27
  export declare const ICON_SHARE = "M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z";
21
- /** folder_open — open file. */
28
+ /** folder_open — open file. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
22
29
  export declare const ICON_FOLDER_OPEN = "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z";
23
- /** image — PNG/image. */
30
+ /** image — PNG/image. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
24
31
  export declare const ICON_IMAGE = "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z";
25
- /** note_add — new / clear. */
32
+ /** note_add — new / clear. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
26
33
  export declare const ICON_NEW = "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z";
27
- /** palette — sticky color. */
28
- export declare const ICON_PALETTE = "M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 8 6.5 8 8 8.67 8 9.5 7.33 11 6.5 11zm3-4C8.67 7 8 6.33 8 5.5S8.67 4 9.5 4s1.5.67 1.5 1.5S10.33 7 9.5 7zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 4 14.5 4s1.5.67 1.5 1.5S15.33 7 14.5 7zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 8 17.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z";
29
- /** swap_horiz — cycle the drawing stroke style. */
30
- export declare const ICON_SWAP_HORIZ = "M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z";
31
- /** autorenew — change the sticky kind. */
32
- export declare const ICON_AUTORENEW = "M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z";
33
- /** menu — hamburger (main menu). */
34
+ /** menu — hamburger (main menu). @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
34
35
  export declare const ICON_MENU = "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z";
35
- /** add — append sticky. */
36
+ /** add — append sticky. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
36
37
  export declare const ICON_ADD = "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z";
37
- /** aspect_ratio — fit the board into the viewport. */
38
+ /** aspect_ratio — fit the board into the viewport. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
38
39
  export declare const ICON_FIT = "M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z";
39
- /** remove_red_eye — show example. */
40
+ /** remove_red_eye — show example. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
40
41
  export declare const ICON_EYE = "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z";
41
- /** Returns an icon as an HTML SVG string (for palette/context pad/buttons), color = currentColor. */
42
+ /** Returns an icon as an HTML SVG string (for palette/context pad/buttons), color = currentColor. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
42
43
  export declare function iconMarkup(path: string, size?: number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