@miragon/wardley-renderer 0.9.1 → 0.11.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 (52) hide show
  1. package/README.md +43 -22
  2. package/dist/collaborative/CollaborativeWardley.d.ts +5 -1
  3. package/dist/collaborative/CollaborativeWardley.d.ts.map +1 -1
  4. package/dist/color-picker/WardleyColorPicker.d.ts.map +1 -1
  5. package/dist/context-pad/WardleyContextPadProvider.d.ts +7 -0
  6. package/dist/context-pad/WardleyContextPadProvider.d.ts.map +1 -1
  7. package/dist/draw/icons.d.ts +6 -41
  8. package/dist/draw/icons.d.ts.map +1 -1
  9. package/dist/draw/label-layout.d.ts +2 -2
  10. package/dist/draw/lucide.d.ts +30 -0
  11. package/dist/draw/lucide.d.ts.map +1 -0
  12. package/dist/draw/styles.d.ts +1 -1
  13. package/dist/draw/styles.d.ts.map +1 -1
  14. package/dist/draw-tool/WardleyDrawTool.d.ts +7 -0
  15. package/dist/draw-tool/WardleyDrawTool.d.ts.map +1 -1
  16. package/dist/draw-tool/WardleyDrawingHandles.d.ts.map +1 -1
  17. package/dist/editor-state.d.ts +4 -3
  18. package/dist/editor-state.d.ts.map +1 -1
  19. package/dist/index.js +936 -952
  20. package/dist/index.js.map +1 -1
  21. package/dist/io/WardleySourceOrder.d.ts +1 -1
  22. package/dist/keyboard/WardleyKeyboard.d.ts +2 -11
  23. package/dist/keyboard/WardleyKeyboard.d.ts.map +1 -1
  24. package/dist/keyboard/index.d.ts +1 -1
  25. package/dist/keyboard/index.d.ts.map +1 -1
  26. package/dist/label-drag/WardleyLabelDragging.d.ts +1 -1
  27. package/dist/label-editing/WardleyLabelEditing.d.ts +6 -1
  28. package/dist/label-editing/WardleyLabelEditing.d.ts.map +1 -1
  29. package/dist/label-editing/index.d.ts +1 -0
  30. package/dist/label-editing/index.d.ts.map +1 -1
  31. package/dist/link-editing/WardleyLinkEditing.d.ts +7 -1
  32. package/dist/link-editing/WardleyLinkEditing.d.ts.map +1 -1
  33. package/dist/live-preview/LivePreview.d.ts +1 -1
  34. package/dist/map-menu/ShortcutsDialog.d.ts +1 -1
  35. package/dist/map-menu/dialog.d.ts +1 -1
  36. package/dist/map-menu/menu.d.ts +5 -3
  37. package/dist/map-menu/menu.d.ts.map +1 -1
  38. package/dist/map-menu/popover.d.ts +1 -1
  39. package/dist/map-menu/shortcuts.d.ts +1 -1
  40. package/dist/map-resize/MapResizeHandles.d.ts +1 -1
  41. package/dist/map-resize/MapResizeHandles.d.ts.map +1 -1
  42. package/dist/map-resize/ResizeAwareAutoScroll.d.ts +1 -1
  43. package/dist/model/WardleyElementFactory.d.ts +2 -2
  44. package/dist/model/di-types.d.ts +2 -2
  45. package/dist/modeling/WardleyModeling.d.ts +1 -1
  46. package/dist/modeling/cmd/UpdateConfigHandler.d.ts +1 -1
  47. package/dist/palette/WardleyPaletteProvider.d.ts +6 -0
  48. package/dist/palette/WardleyPaletteProvider.d.ts.map +1 -1
  49. package/dist/popup/WardleyElementSettingsProvider.d.ts.map +1 -1
  50. package/dist/theme/palette.d.ts +5 -1
  51. package/dist/theme/palette.d.ts.map +1 -1
  52. package/package.json +7 -7
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @miragon/wardley-renderer
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@miragon/wardley-renderer)](https://www.npmjs.com/package/@miragon/wardley-renderer)
4
- [![License: MIT](https://img.shields.io/github/license/Miragon/wardley-maps-modeler)](https://github.com/Miragon/wardley-maps-modeler/blob/main/LICENSE)
4
+ [![License: MIT](https://img.shields.io/github/license/Miragon/modeler-suite)](https://github.com/Miragon/modeler-suite/blob/main/modelers/wardley-maps/LICENSE)
5
5
 
6
6
  [diagram-js](https://github.com/bpmn-io/diagram-js)-based renderer for
7
7
  [Wardley Maps](https://learnwardleymapping.com/): `Viewer`, `NavigatedViewer`, and a full editable
@@ -16,10 +16,10 @@ npm install @miragon/wardley-renderer
16
16
  ## Usage
17
17
 
18
18
  ```ts
19
- import { NavigatedViewer } from '@miragon/wardley-renderer';
20
- import '@miragon/wardley-renderer/assets/wardley.css';
19
+ import { NavigatedViewer } from "@miragon/wardley-renderer";
20
+ import "@miragon/wardley-renderer/assets/wardley.css";
21
21
 
22
- const viewer = new NavigatedViewer({ container: document.querySelector('#canvas')! });
22
+ const viewer = new NavigatedViewer({ container: document.querySelector("#canvas")! });
23
23
 
24
24
  await viewer.importDSL(`title Tea Shop
25
25
  anchor Business [0.95, 0.63]
@@ -82,6 +82,18 @@ locks the canvas while its host cannot save an edit, e.g. while the document is
82
82
  rule is vetoed, an open editor, popup or drag ends without saving, the handles hide, and selection,
83
83
  zoom, pan, select all and export stay. It fires `wardley.readOnly.changed`.
84
84
 
85
+ The canvas's keys (undo and redo, delete, copy, paste and duplicate, select all, the arrows, Escape
86
+ and the single-key tools C, U, N, P, L and A) act only while the canvas `<svg>` has the focus, as
87
+ diagram-js' own keyboard does: a key aimed at a host's button or text field, or at a page with
88
+ nothing focused, stays with the host. A pointer click on the canvas, a palette entry or a
89
+ context-pad action that opens no editor or popup hands the focus to the canvas. From the keyboard,
90
+ Enter and Space on a palette tool (lasso, draw) leave the focus on the entry; on a create entry
91
+ they place the element and hand the focus to the canvas, or to the new element's name editor; on a
92
+ context-pad action they keep the focus in the pad, and an action that closes or redraws the pad
93
+ (delete, line style, remove evolve) returns it to the canvas. A host that hides the canvas without
94
+ destroying it makes the container `inert`, so the hidden canvas can neither keep the focus nor act
95
+ on a key.
96
+
85
97
  ## Collaborative hosts
86
98
 
87
99
  `createCollaborativeModeler()` and `createCollaborativeViewer()` implement the
@@ -89,11 +101,11 @@ zoom, pan, select all and export stay. It fires `wardley.readOnly.changed`.
89
101
  contract (notation `wardley`), for hosts that keep the map text in a shared document:
90
102
 
91
103
  ```ts
92
- import { createCollaborativeModeler } from '@miragon/wardley-renderer';
93
- import '@miragon/wardley-renderer/assets/wardley.css';
104
+ import { createCollaborativeModeler } from "@miragon/wardley-renderer";
105
+ import "@miragon/wardley-renderer/assets/wardley.css";
94
106
 
95
107
  const modeler = createCollaborativeModeler();
96
- modeler.attachTo(document.querySelector('#canvas')!);
108
+ modeler.attachTo(document.querySelector("#canvas")!);
97
109
  await modeler.importText(documentText);
98
110
  modeler.onContentChanged(() => save(modeler.exportText()));
99
111
  ```
@@ -107,11 +119,16 @@ size preview (an undo pressed mid-drag, a title the host sets) puts the preview
107
119
  drag then ends without resizing, so the history stays in step with the document. `elements` names
108
120
  components, anchors, pipelines, submaps and accelerators by the id the document gives them
109
121
  (`cmp_kettle`), also right after a canvas edit, and `elements.bounds(id)` gives an element's live
110
- box in diagram coordinates; `getViewState` and `setViewState` carry the viewbox. `diagram` is the
111
- wrapped `Modeler` or `NavigatedViewer` for host-specific wiring. Both factories take the options
112
- above (`additionalModules`, `freeArea`, `fitOnImport`, `undoRedoKeys` and the deprecated aliases);
113
- the viewer never edits and ignores the undo keys. Both pass the contract's conformance kit (1.2)
114
- without skips.
122
+ box in diagram coordinates; `getViewState` and `setViewState` carry the viewbox. `contentBounds()`
123
+ (contract 1.3) gives the box a host fits the view to, in diagram coordinates and without padding:
124
+ the plot with its axes and everything drawn beyond it (a long label at the commodity edge, a note in
125
+ the margin), the box the pan constraint keeps in view. It follows every edit at once and stays the
126
+ same across zoom and scroll. A map without elements still has its plot, so it is never `undefined`
127
+ while the modeler lives (before the first import it is the default plot); tell an empty map by its
128
+ elements. `diagram` is the wrapped `Modeler` or `NavigatedViewer` for host-specific wiring. Both
129
+ factories take the options above (`additionalModules`, `freeArea`, `fitOnImport`, `undoRedoKeys`
130
+ and the deprecated aliases); the viewer never edits and ignores the undo keys. Both pass the
131
+ contract's conformance kit (1.3) without skips.
115
132
 
116
133
  ### Menu entries and dialogs for a host's chrome
117
134
 
@@ -124,7 +141,7 @@ title…" dialog (one undo step on Apply, nothing for an unchanged title),
124
141
  `createShortcutsDialog(chrome, options)` the "Keyboard shortcuts…" dialog and
125
142
  `mapShortcuts(chrome, options)` its table. A web app that binds Cmd/Ctrl+O, Cmd/Ctrl+S, Cmd/Ctrl+V
126
143
  on the canvas and `?` itself passes `{ fileKeys: true, shortcutsKey: '?' }`, so the dialog lists
127
- them too.
144
+ them too, and `mapMenu({ …, shortcutsKey: '?' })` shows the key's chip on "Keyboard shortcuts…".
128
145
  `createMapDialog(chrome, parts)` is the modal dialog all of them share (guide §8: header with Close,
129
146
  scrolling body, footer), for a host's own dialogs in the same look; `dialogButton(label, variant)`
130
147
  gives its buttons. `chrome` is the shell handle or anything of the same shape; the renderer never
@@ -142,26 +159,28 @@ imports the shell itself.
142
159
  ### Fonts
143
160
 
144
161
  The package ships no fonts and uses no CDN. The canvas typeface is **Geist** (Miragon corporate
145
- identity); provide it yourself — recommended self-hosted via [`@fontsource`](https://fontsource.org/)
162
+ identity); provide it yourself, preferably self-hosted via [`@fontsource`](https://fontsource.org/)
146
163
  (one variable file covers all weights):
147
164
 
148
165
  ```ts
149
- import '@fontsource-variable/geist/wght.css';
166
+ import "@fontsource-variable/geist/wght.css";
150
167
  ```
151
168
 
152
169
  That package registers the family as `'Geist Variable'`; the renderer's font stack starts with
153
170
  `'Geist Variable', 'Geist', …` so it matches either that package or a locally installed Geist. Use
154
- `'Geist Variable'` in your own CSS too — `'Geist'` alone never matches the self-hosted face.
171
+ `'Geist Variable'` in your own CSS too: `'Geist'` alone never matches the self-hosted face.
155
172
 
156
- Part of the [Wardley Maps](https://github.com/Miragon/wardley-maps-modeler) monorepo.
173
+ Part of the [Wardley Maps Modeler](https://github.com/Miragon/modeler-suite/tree/main/modelers/wardley-maps) in the [Miragon modeler suite](https://github.com/Miragon/modeler-suite).
157
174
 
158
175
  ## License
159
176
 
160
177
  MIT
161
178
 
162
179
  The tool icons of the palette (`square-dashed-mouse-pointer`, and for Draw `spline` with a
163
- straight segment) and the Close icon of the dialogs (`x`) are copied from
164
- [Lucide](https://lucide.dev) (`lucide-static` 1.59.0):
180
+ straight segment), the Close icon of the dialogs (`x`) and the icons of the context pad (`pencil`,
181
+ `trash`, `circle-plus`, `arrow-right`, `chevrons-right`, `sliders-horizontal`, `line-style`,
182
+ `palette`, `link`, `external-link`, and for Remove evolve `chevrons-right` with the corner `x` of
183
+ `calendar-x-2`) are copied from [Lucide](https://lucide.dev) (`lucide-static` 1.59.0):
165
184
 
166
185
  > ISC License
167
186
  >
@@ -178,7 +197,8 @@ straight segment) and the Close icon of the dialogs (`x`) are copied from
178
197
  > NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
179
198
  > PERFORMANCE OF THIS SOFTWARE.
180
199
 
181
- `x` is derived from [Feather](https://feathericons.com):
200
+ `arrow-right`, `chevrons-right`, `circle-plus`, `external-link`, `link`, `trash` and `x` are derived
201
+ from [Feather](https://feathericons.com):
182
202
 
183
203
  > The MIT License (MIT)
184
204
  >
@@ -199,6 +219,7 @@ straight segment) and the Close icon of the dialogs (`x`) are copied from
199
219
  > DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
200
220
  > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
201
221
 
202
- The other icons (the context pad, and the `ICON_*` exports with `iconMarkup`, which are deprecated
203
- since the chrome's icons come from `@miragon/modeler-shell` and go in a later minor) are
222
+ The other icons (the anchor, accelerator and deaccelerator glyphs of the canvas and the palette,
223
+ and the `ICON_*` exports with `iconMarkup`, which are deprecated since the chrome's icons come from
224
+ `@miragon/modeler-shell` and go in a later minor) are
204
225
  [Material Icons](https://fonts.google.com/icons) by Google, under the Apache License 2.0.
@@ -23,10 +23,14 @@ export interface CollaborativeWardleyOptions extends CollaborativeModelerOptions
23
23
  export interface WardleyElementsSurface extends ElementsSurface {
24
24
  bounds(id: string): ElementBounds | undefined;
25
25
  }
26
- /** The contract surface plus the wrapped diagram for host-specific wiring. */
26
+ /**
27
+ * The contract surface, with the optional `contentBounds` of contract 1.3 always present, plus the
28
+ * wrapped diagram for host-specific wiring.
29
+ */
27
30
  export interface CollaborativeWardleyModeler extends CollaborativeModeler {
28
31
  readonly elements: WardleyElementsSurface;
29
32
  readonly diagram: Modeler | NavigatedViewer;
33
+ contentBounds(): ElementBounds | undefined;
30
34
  }
31
35
  /** The editing mount (`meta.editable: true`) of the collaborative-modeler contract. */
32
36
  export declare function createCollaborativeModeler(options?: CollaborativeWardleyOptions): CollaborativeWardleyModeler;
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborativeWardley.d.ts","sourceRoot":"","sources":["../../src/collaborative/CollaborativeWardley.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,aAAa,EAElB,KAAK,eAAe,EAGrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAM9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,2BAA2B;IAC9E,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IACpD,4FAA4F;IAC5F,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9C,oGAAoG;IACpG,cAAc,CAAC,EAAE,CAAC,MAAM,cAAc,CAAC,GAAG,SAAS,CAAC;CACrD;AAED,iGAAiG;AACjG,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CAC/C;AAED,8E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CAAC,aAAa;CAkBtB"}
@@ -38,6 +38,13 @@ export default class WardleyContextPadProvider implements ContextPadProvider {
38
38
  private addPrimaryEntries;
39
39
  /** Row 2: settings, line style, colour, link. */
40
40
  private addPropertyEntries;
41
+ /**
42
+ * For an entry that opens no editor or popup: after a pointer click or drag it hands the focus to
43
+ * the canvas (guide §5.8), whose keys act only while it has the focus. The clicked entry took the
44
+ * focus and goes away when the pad re-renders or closes, which would leave it on `<body>`. Enter
45
+ * and Space keep it in the pad (`onPadKeydown`).
46
+ */
47
+ private focusingCanvas;
41
48
  /** Enter/Space on a focused entry = a click at the element's centre. */
42
49
  private onPadKeydown;
43
50
  private clientCenterOf;
@@ -1 +1 @@
1
- {"version":3,"file":"WardleyContextPadProvider.d.ts","sourceRoot":"","sources":["../../src/context-pad/WardleyContextPadProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,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,EAAS,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAOrC,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,mBAAmB,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,qBAAqB,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAC;A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C,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAhC3B,MAAM,CAAC,OAAO,WAcZ;IAEF,4FAA4F;IAC5F,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;gBAGpC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,mBAAmB,EACjC,cAAc,EAAE,qBAAqB,EACrC,OAAO,EAAE,qBAAqB,EAC9B,WAAW,EAAE,kBAAkB,EAChD,QAAQ,EAAE,QAAQ,EACD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ;IAUrC,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB;IAsBzD,8FAA8F;IAC9F,OAAO,CAAC,iBAAiB;IAuBzB,kDAAkD;IAClD,OAAO,CAAC,iBAAiB;IA8EzB,iDAAiD;IACjD,OAAO,CAAC,kBAAkB;IAgF1B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAOtB,wEAAwE;IACxE,OAAO,CAAC,YAAY;IAuCpB,OAAO,CAAC,cAAc;IAiBtB;;;OAGG;IACH,OAAO,CAAC,WAAW;CAuBpB"}
@@ -1,55 +1,20 @@
1
1
  /**
2
- * Embedded icon paths from Google Material Icons (Apache-2.0, © Google).
3
- * 24x24-viewBox paths. `drawIcon` renders them as SVG (renderer), `iconMarkup` as an HTML string
4
- * (palette/context pad/buttons) with `fill: currentColor` (color controllable via CSS).
2
+ * Embedded icon paths from Google Material Icons (Apache-2.0, © Google), 24x24-viewBox paths:
3
+ * the notation glyphs the canvas and the palette draw (anchor, accelerator, deaccelerator; guide
4
+ * §3.6 keeps them until the modelers' dark mode) and the paths behind the deprecated `ICON_*`
5
+ * exports. `drawIcon` renders them as SVG, `iconMarkup` as an HTML string with
6
+ * `fill: currentColor`. The context pad draws Lucide icons (`lucide.ts`).
5
7
  * Source: https://github.com/google/material-design-icons (Apache License 2.0).
6
8
  */
7
9
  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_GROUP = "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z";
9
- /** radio_button_unchecked — ring (component / event). */
10
- export declare const ICON_CIRCLE = "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z";
11
- export declare const ICON_ARROW_FORWARD = "M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z";
12
- /** double_arrow — evolve. */
13
- export declare const ICON_DOUBLE_ARROW = "M15.5 5H11l5 7-5 7h4.5l5-7zM8.5 5H4l5 7-5 7h4.5l5-7z";
14
- /** block — inertia (resistance to change). */
15
- export declare const ICON_BLOCK = "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z";
16
10
  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";
17
11
  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";
18
- /** description — note. */
19
- export declare const ICON_NOTE = "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 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z";
20
- /** storefront — market decorator. */
21
- export declare const ICON_STOREFRONT = "M21.9 8.89l-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89zM13 5h1.96l.54 3.52c.09.62-.39 1.18-.99 1.18-.65 0-1.18-.55-1.18-1.18V5zm-5.5 0h1.5v3.52C9 9.32 8.45 10 7.7 10c-.62 0-1.13-.49-1.21-1.13L7.5 5zm-3 .49C5.42 5.36 5.53 5 5.89 5H7.5l-.5 3.69c-.08.6-.59 1.06-1.19 1.06-.66 0-1.18-.56-1.18-1.18l.07-.6L4.5 5.49zM19 19H5v-6.03c.08.01.15.03.23.03.85 0 1.62-.35 2.19-.91.58.57 1.36.91 2.24.91.85 0 1.61-.35 2.18-.89.58.55 1.36.89 2.24.89.81 0 1.59-.34 2.17-.9.58.56 1.35.9 2.2.9.08 0 .15-.02.23-.03V19z";
22
- /** public — ecosystem decorator. */
23
- export declare const ICON_PUBLIC = "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z";
24
- /** settings — gear (element settings / popup). */
25
- export declare const ICON_SETTINGS = "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z";
26
- /** palette — note color. */
27
- 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";
28
- /** place — annotation (marker). */
29
- export declare const ICON_PLACE = "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z";
30
12
  /** fast_forward — Accelerator. */
31
13
  export declare const ICON_FAST_FORWARD = "M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z";
32
14
  /** fast_rewind — Deaccelerator. */
33
15
  export declare const ICON_FAST_REWIND = "M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z";
34
- /** swap_horiz — toggle connection type (dependency <-> flow). */
35
- export declare const ICON_SWAP_HORIZ = "M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z";
36
- /** crop_landscape — attitude band (PST). */
37
- export declare const ICON_CROP_LANDSCAPE = "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z";
38
- /** layers — submap (nested map). */
39
- export declare const ICON_LAYERS = "M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z";
40
- /** autorenew — cycle procurement method (build/buy/outsource). */
41
- 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";
42
- /** open_in_new — open the element's link in a new tab. */
43
- export declare const ICON_OPEN_IN_NEW = "M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z";
44
- /** link — set the element's link (url). */
45
- export declare const ICON_LINK = "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z";
46
16
  /** Draws a 24x24 icon as an SVG group centered on (cx, cy), scaled to `size`. */
47
17
  export declare function drawIcon(path: string, cx: number, cy: number, size: number, fill: string): SVGElement;
48
- /**
49
- * Like `iconMarkup`, but crossed out by a diagonal stroke (e.g. "remove evolve" = struck double
50
- * arrow). The mask cuts a gap around the stroke so it stays legible over the filled glyph.
51
- */
52
- export declare function struckIconMarkup(path: string, size?: number): string;
53
- /** Returns an icon as an HTML SVG string (for palette/context pad/buttons), color = currentColor. */
18
+ /** Returns an icon as an HTML SVG string, color = currentColor (behind the deprecated export). */
54
19
  export declare function iconMarkup(path: string, size?: number): string;
55
20
  //# sourceMappingURL=icons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","source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AM,EACZ,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,UAAU,CAUZ;AAeD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,CAUhE;AAED,qGAAqG;AACrG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,CAE1D"}
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/draw/icons.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,eAAO,MAAM,WAAW,kHACyF,CAAC;AAClH,eAAO,MAAM,SAAS,0JACmI,CAAC;AAC1J,eAAO,MAAM,WAAW,kFACyD,CAAC;AAClF,kCAAkC;AAClC,eAAO,MAAM,iBAAiB,4CAA4C,CAAC;AAC3E,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,gDAAgD,CAAC;AAE9E,iFAAiF;AACjF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,UAAU,CAUZ;AAWD,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,CAE1D"}
@@ -18,14 +18,14 @@ export declare const LABEL_BASELINE_SHIFT = -4;
18
18
  /** Second line (sourcing method) below a name label. */
19
19
  export declare const LABEL_METHOD_LINE_SHIFT = 15;
20
20
  export declare const LABEL_OFFSET_LIMIT = 200;
21
- export type TextAnchor = 'start' | 'middle' | 'end';
21
+ export type TextAnchor = "start" | "middle" | "end";
22
22
  export interface LabelPlacement {
23
23
  x: number;
24
24
  y: number;
25
25
  anchor: TextAnchor;
26
26
  }
27
27
  /** px from a component to its evolve target along the evolution axis (undefined without evolve). */
28
- export declare function movementDeltaX(shape: WardleyShape, grid: Pick<EvolutionGrid, 'toCanvas'>): number | undefined;
28
+ export declare function movementDeltaX(shape: WardleyShape, grid: Pick<EvolutionGrid, "toCanvas">): number | undefined;
29
29
  export declare function estimatedLabelWidth(text: string): number;
30
30
  /** The canonical OWM slot of a component name — the origin of its `label [dx, dy]`. */
31
31
  export declare function componentLabelSlot(): {
@@ -0,0 +1,30 @@
1
+ /*! @miragon/wardley-renderer icon geometry: the context pad icons. Lucide (lucide-static 1.59.0)
2
+ * @license ISC Copyright (c) 2026 Lucide Icons and Contributors
3
+ * arrow-right, chevrons-right, circle-plus, external-link, link and trash derive from Feather
4
+ * @license MIT, Copyright (c) 2013-present Cole Bemis
5
+ * Full notices: README.md of @miragon/wardley-renderer */
6
+ /**
7
+ * The Lucide icons of the context pad (guide §5.14), inlined so the renderer has no icon runtime
8
+ * dependency. Copied unchanged from lucide-static 1.59.0 (`icon-nodes.json`), except
9
+ * `chevrons-right-x`.
10
+ */
11
+ export declare const LUCIDE: {
12
+ readonly pencil: "<path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\"/><path d=\"m15 5 4 4\"/>";
13
+ readonly trash: "<path d=\"M10 11v6\"/><path d=\"M14 11v6\"/><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\"/><path d=\"M3 6h18\"/><path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/>";
14
+ readonly "circle-plus": "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 12h8\"/><path d=\"M12 8v8\"/>";
15
+ readonly "arrow-right": "<path d=\"M5 12h14\"/><path d=\"m12 5 7 7-7 7\"/>";
16
+ readonly "chevrons-right": "<path d=\"m6 17 5-5-5-5\"/><path d=\"m13 17 5-5-5-5\"/>";
17
+ readonly "chevrons-right-x": "<path d=\"m4 16 5-5-5-5\"/><path d=\"m11 16 5-5-5-5\"/><path d=\"m17 16 5 5\"/><path d=\"m17 21 5-5\"/>";
18
+ readonly "sliders-horizontal": "<path d=\"M10 5H3\"/><path d=\"M12 19H3\"/><path d=\"M14 3v4\"/><path d=\"M16 17v4\"/><path d=\"M21 12h-9\"/><path d=\"M21 19h-5\"/><path d=\"M21 5h-7\"/><path d=\"M8 10v4\"/><path d=\"M8 12H3\"/>";
19
+ readonly "line-style": "<path d=\"M11 5h2\"/><path d=\"M15 12h6\"/><path d=\"M19 5h2\"/><path d=\"M3 12h6\"/><path d=\"M3 19h18\"/><path d=\"M3 5h2\"/>";
20
+ readonly palette: "<path d=\"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z\"/><circle cx=\"13.5\" cy=\"6.5\" r=\".5\" fill=\"currentColor\"/><circle cx=\"17.5\" cy=\"10.5\" r=\".5\" fill=\"currentColor\"/><circle cx=\"6.5\" cy=\"12.5\" r=\".5\" fill=\"currentColor\"/><circle cx=\"8.5\" cy=\"7.5\" r=\".5\" fill=\"currentColor\"/>";
21
+ readonly link: "<path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/>";
22
+ readonly "external-link": "<path d=\"M15 3h6v6\"/><path d=\"M10 14 21 3\"/><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"/>";
23
+ };
24
+ export type LucideIconName = keyof typeof LUCIDE;
25
+ /**
26
+ * A chrome icon (guide §5.14, §11): 16px with stroke 2.5 on the 24 grid, so the stroke matches the
27
+ * shell's chrome icons; `currentColor`, so the surrounding role decides the colour.
28
+ */
29
+ export declare function chromeIcon(name: LucideIconName): string;
30
+ //# sourceMappingURL=lucide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lucide.d.ts","sourceRoot":"","sources":["../../src/draw/lucide.ts"],"names":[],"mappings":"AAAA;;;;0DAI0D;AAE1D;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;CAuBT,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,MAAM,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAEvD"}
@@ -54,7 +54,7 @@ export declare const COLORS: {
54
54
  readonly inertia: "#1D1D1D";
55
55
  readonly noteText: "#6B6666";
56
56
  readonly pipeline: "#1D1D1D";
57
- readonly annotationFill: "#FBF3E0";
57
+ readonly annotationFill: "#FFFFFF";
58
58
  readonly plotBackground: "#FFFFFF";
59
59
  readonly accelerator: "#0B7A55";
60
60
  readonly deaccelerator: "#C92A2A";
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/draw/styles.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAK/F;;;GAGG;AACH,eAAO,MAAM,IAAI;;;;;;;CAOP,CAAC;AAEX,gGAAgG;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAKnC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAA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;;;;;;;;;;CAwBT,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYd,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAO5E,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIlD,CAAC;AAEF,eAAO,MAAM,IAAI;IACf;;;;;;OAMG;;;;;CAMK,CAAC"}
@@ -54,6 +54,13 @@ export default class WardleyDrawTool {
54
54
  private readonly onMouseDown;
55
55
  private readonly onDblClick;
56
56
  private readonly onMouseMove;
57
+ /**
58
+ * Enter and Escape end the drawing only when aimed at the modeler: the canvas, or the palette,
59
+ * where a tool started with Enter leaves the focus (guide §5.5). A capture listener on the
60
+ * document would otherwise take them from a text field or editor, a host's button and its menus
61
+ * and dialogs.
62
+ */
63
+ private ownsKey;
57
64
  private readonly onKeyDown;
58
65
  private renderPreview;
59
66
  private clearPreview;
@@ -1 +1 @@
1
- {"version":3,"file":"WardleyDrawTool.d.ts","sourceRoot":"","sources":["../../src/draw-tool/WardleyDrawTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAQrC,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AACtE,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AAGzE,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAC;AAC3E,OAAO,KAAK,aAAa,MAAM,oCAAoC,CAAC;AAWpE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAiBhC,OAAO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AO,CAAC,MAAM;IAsBd,OAAO,CAAC,SAAS;IAyBjB,8FAA8F;IAC9F,OAAO,CAAC,MAAM;IAkBd,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,KAAK;IAQb,4FAA4F;IAC5F,OAAO,CAAC,aAAa;CAWtB"}
@@ -10,19 +10,20 @@ interface ConnectionKey {
10
10
  wardleyType: string;
11
11
  }
12
12
  type OpenEdit = {
13
- kind: 'name';
13
+ kind: "name";
14
14
  elementId: string;
15
15
  value: string;
16
16
  selection?: FieldSelection;
17
17
  } | {
18
- kind: 'connection';
18
+ kind: "connection";
19
19
  key: ConnectionKey;
20
20
  value: string;
21
21
  selection?: FieldSelection;
22
22
  } | {
23
- kind: 'link';
23
+ kind: "link";
24
24
  elementId: string;
25
25
  value: string;
26
+ selection?: FieldSelection;
26
27
  };
27
28
  /**
28
29
  * What the user had selected and was typing, put aside across a re-import. Element ids are the
@@ -1 +1 @@
1
- {"version":3,"file":"editor-state.d.ts","sourceRoot":"","sources":["../src/editor-state.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAM7E;;;GAGG;AACH,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,QAAQ,GACT;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,cAAc,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,cAAc,CAAA;CAAE,GACrF;IAAE,IAA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