@miragon/wardley-renderer 0.15.0 → 0.16.1

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.
package/README.md CHANGED
@@ -35,26 +35,13 @@ const { svg } = await viewer.saveSVG();
35
35
 
36
36
  Swap `NavigatedViewer` for `Modeler` to get the editable map (palette, context pad, undo/redo).
37
37
 
38
- For a host without the Miragon modeler shell, the `Modeler`'s palette is the toolbar of the Miragon
39
- design guide: a glass island at the top centre of the container (opaque in high contrast), in the
40
- second row, 64px from the top, in a container at most 760px wide, and ahead of the canvas in the
41
- tab order, with one tab stop that the arrow keys, Home and End move. Its tooltip names the entry
42
- and its key 8px below the palette, centred on the entry and at least 12px from the container's
43
- sides; it shows after 300ms of hover, at once on keyboard focus or for a neighbour, never for a
44
- tap, and hides on a press, on Escape and when the pointer or the focus leaves. Where the palette
45
- scrolls sideways, the tooltip moves with its entry and hides once the entry has left the view. The
46
- palette lies before the canvas `<svg>` in the container, so a host finds the canvas with
47
- `canvas.getContainer().querySelector(":scope > svg")`, not as the first `svg`. A palette a chrome
48
- skins (`data-chrome="palette"`) is left to that chrome.
49
-
50
- The lasso is pressed (`aria-pressed="true"`) only while it is armed, in every host: Enter or Space
51
- on the armed lasso puts it down, as Escape does, and so does arming the draw tool; a pointer's click
52
- on the lasso arms it again. One tool is armed at a time: arming the lasso (a click, Enter or Space
53
- on its entry, or L) puts the armed draw tool down, and a click, Enter or Space on the lasso's entry
54
- saves a line the draw tool holds, as Escape does; L does nothing while it holds one. While the
55
- read-only lock shows (below), the palette without the shell marks every entry but the lasso
56
- `aria-disabled="true"` and mutes it (guide §13.5): it stays focusable, and a click, drag, Enter or
57
- Space on it does nothing from the lock on.
38
+ Without the Miragon modeler shell, the `Modeler`'s palette is the design guide's toolbar: a glass
39
+ island at the top centre, ahead of the canvas in the tab order (one tab stop; arrows, Home and End
40
+ move), with tooltips. It lies before the canvas `<svg>` in the container, so find the canvas with
41
+ `canvas.getContainer().querySelector(":scope > svg")`. A palette a chrome skins
42
+ (`data-chrome="palette"`) is left to that chrome. One tool is armed at a time; the lasso is
43
+ `aria-pressed="true"` only while armed. Under the read-only lock the palette marks every entry but
44
+ the lasso `aria-disabled="true"`.
58
45
 
59
46
  ## API
60
47
 
@@ -75,18 +62,13 @@ Space on it does nothing from the lock on.
75
62
  `setEvolutionLabels` turns an empty stage into its default label and `->` into `→`, so the labels
76
63
  always write a valid `evolution` line; the default set is stored as `undefined`.
77
64
 
78
- An import validates the whole map first: a map that is not importable rejects before the canvas
79
- changes, and a rendering failure puts the previous map back. It then fits the view to the plot with
80
- its axis margins, centred in the free area and never above 100 %. Without a `freeArea` the pan
81
- constraint may still move a map smaller than the view, to keep its margins around it.
65
+ An import validates the whole map first: an invalid map rejects before the canvas changes, and a
66
+ rendering failure restores the previous map. It then fits the plot into the view (never above 100 %).
82
67
 
83
- An open inline editor (name, note, link annotation, flow value, link address) stays open with its
84
- typed text across a view change, a scroll, a zoom or a host's fit, and moves with its element;
85
- Enter, leaving the field, or a click or drag on the canvas saves it. Shift+Enter breaks the line in
86
- a name (a note's Enter breaks it, and Cmd/Ctrl+Enter saves); the editor of a name is a `<textarea>`
87
- that grows with its lines, `textarea.wardley-label-input`. A name's line breaks are drawn as lines
88
- of the label and written to the DSL as a literal `\n` (`@miragon/wardley-dsl`). A backslash typed
89
- before an `n` in a name is saved as `∖` (U+2216), because the DSL would read `\n` back as a break.
68
+ An open inline editor (name, note, link annotation, flow value, link address) survives view changes
69
+ and moves with its element; Enter, blur or a click on the canvas saves it. Names are a
70
+ `textarea.wardley-label-input`; Shift+Enter breaks the line (in notes Enter breaks and Cmd/Ctrl+Enter
71
+ saves), written to the DSL as a literal `\n`. A typed backslash before `n` is saved as `∖` (U+2216).
90
72
 
91
73
  Options (the names of the `@miragon/modeler-api` 1.2 factory options):
92
74
 
@@ -99,48 +81,35 @@ Options (the names of the `@miragon/modeler-api` 1.2 factory options):
99
81
  - `fitOnImport: false` leaves the view after an import to the host, whose chrome fits it.
100
82
  - `additionalModules` adds diagram-js modules; every Wardley feature module is exported for custom
101
83
  editors.
84
+ - `openRelativeLink: (address) => …` follows a link without a scheme (`details/payment.wmap`) from
85
+ the context pad: only the host knows where the map's file lies, so it resolves the address or says
86
+ why it can't. Without this option the pad offers no "Open link" on such an address. No scheme but
87
+ http(s) and `mailto:` ever opens.
88
+ - `openExternalLink: (address) => …` opens an http(s) or `mailto:` address from the context pad;
89
+ without it a new browser tab opens. A host whose page can't open windows, such as a VS Code
90
+ webview, hands the address to its own opener.
91
+ - `chooseLinkTarget: () => Promise<string | undefined>` adds "Link to map…" to the context pad of a
92
+ component or submap: the host lets the user choose another map and resolves with its address
93
+ relative to the current map (`undefined` when the user cancels), which becomes the element's link
94
+ in one undoable step.
95
+
96
+ A component or submap whose link the editor can open carries a small link mark (Lucide `link`,
97
+ `--cd-ui-link`) at its lower left; the viewer and exports show none.
102
98
 
103
99
  The `wardleyReadOnly` service (`modeler.get<WardleyReadOnly>('wardleyReadOnly').setReadOnly(true)`)
104
- locks the canvas while its host cannot save an edit, e.g. while the document is invalid: every edit
105
- rule is vetoed, an open editor, popup or drag ends without saving, the handles hide, and selection,
106
- zoom, pan, select all and export stay. `setReadOnly(true, { delayMs: 800 })` locks at once but marks
107
- the palette only once the delay has passed without `setReadOnly(false)`, so typing an invalid file
108
- in an editor beside the canvas does not flicker (guide §13.5); a call while the delay runs keeps
109
- its timer, `setReadOnly(false)` takes the marks off at once, and `isReadOnlyShown()` tells whether
110
- they show. It fires `wardley.readOnly.changed` with `{ readOnly, shown }` when the lock changes and
111
- once more when delayed marks show.
112
-
113
- The canvas's keys (undo and redo, delete, copy, paste and duplicate, select all, the arrows, Escape
114
- and the single-key tools C, U, N, P, L and A) act only while the canvas `<svg>` has the focus, as
115
- diagram-js' own keyboard does: a key aimed at a host's button or text field, or at a page with
116
- nothing focused, stays with the host. A pointer click on the canvas, a palette entry or a
117
- context-pad action that opens no editor or popup hands the focus to the canvas. From the keyboard,
118
- Enter and Space on a palette tool (lasso, draw) leave the focus on the entry; on a create entry
119
- they place the element and hand the focus to the canvas, or to the new element's name editor; on a
120
- context-pad action they keep the focus in the pad, and an action that closes or redraws the pad
121
- (delete, line style, remove evolve) returns it to the canvas. A host that hides the canvas without
122
- destroying it makes the container `inert` or hides it with `display: none` or `visibility: hidden`,
123
- not only transparent: the browser moves the focus off the canvas at its next rendering update. A
124
- key that reaches the canvas or the map's own chrome before then stays with the page, for each way
125
- of hiding: the canvas acts on no key, the palette triggers no entry and moves no focus, a line the
126
- draw tool holds stays as it is, the context pad, the name, annotation and link editors, the colour
127
- picker and the map menu's popovers take no key, Enter on one of their buttons included, and the
128
- element settings menu picks no entry: nothing is saved or closed, and the focus stays where it is.
129
-
130
- Escape on the canvas ends every drag without a change, as it ends a diagram-js drag: also a label
131
- drag, the point drag of a drawing (the drawing stays selected) and the drag of a component's red
132
- evolve target. These drags and the colour picker take only an Escape aimed at the canvas (the
133
- picker also one on its swatches); one aimed at the palette, the context pad, a name editor or a
134
- host's field, menu, dialog or overlay, inside the canvas container or next to it, stays with that
135
- control. While the draw tool holds the points of a line, the single-key tools and Cmd/Ctrl+V (the
136
- paste attaches to the pointer) do nothing until the line is finished or cancelled, and the canvas
137
- takes them with `preventDefault()`. Enter and Space on the Draw entry save the line, as Enter on
138
- the canvas does. While a point of a drawing is dragged,
139
- the keys that would change the drawing under the drag or start a second gesture next to it do
140
- nothing until the release, and the canvas takes them with `preventDefault()`: the single-key tools,
141
- the arrow keys, paste and duplicate. Delete still removes the drawing, which ends the drag without a
142
- commit. An undo, a redo or any other command before the release ends the drag without a commit too,
143
- and the drawing stays selected, as after Escape.
100
+ locks the canvas while the host cannot save, e.g. while the document is invalid: edits are vetoed,
101
+ open editors and drags end without saving; selection, zoom, pan and export stay.
102
+ `setReadOnly(true, { delayMs: 800 })` locks at once but shows the marks only after the delay
103
+ (no flicker while typing); `isReadOnlyShown()` tells whether they show. It fires
104
+ `wardley.readOnly.changed` with `{ readOnly, shown }`.
105
+
106
+ Keyboard: the canvas's keys (undo/redo, delete, copy/paste/duplicate, select all, arrows, Escape and
107
+ the tools C, U, N, P, L, A) act only while the canvas `<svg>` has the focus, so keys aimed at a
108
+ host's controls stay with the host. A click on the canvas, a palette entry or a context-pad action
109
+ hands it the focus. A host that hides the canvas without destroying it should use `inert`,
110
+ `display: none` or `visibility: hidden`. Escape ends every drag without a change. While the draw
111
+ tool holds a line or a drawing's point is dragged, keys that would start another gesture do
112
+ nothing; an undo or other command ends such a drag without a commit.
144
113
 
145
114
  ## Collaborative hosts
146
115
 
@@ -158,122 +127,56 @@ await modeler.importText(documentText);
158
127
  modeler.onContentChanged(() => save(modeler.exportText()));
159
128
  ```
160
129
 
161
- An import is silent (no content change is reported back), keeps the selection and an open label
162
- editor and fits the view (unless `fitOnImport: false`); a host's view change (`setViewState`, a fit)
163
- never saves an open editor either. A gesture that runs during an import ends first, so its release
164
- changes nothing. A diagram-js drag is cancelled as Escape cancels it: a move, resize, connect or
165
- lasso drag, a create from the palette, the context pad or a quick-create key (`C`, `U`, `N`, `P`
166
- with the pointer over the canvas), a connect started with `A`, the evolve drag the context pad
167
- starts and the plot-corner drag. A label drag, the point drag of a drawing and the drag of a
168
- component's red evolve target end when the import removes their element. A line the draw tool holds
169
- ends without a drawing, and the draw tool with it. A tool that only waits for the user's next press
170
- stays armed: the lasso from the palette or `L`, and the draw tool before its first point. An
171
- `importText` called while a user's action runs (a host that echoes its own change back through its
172
- store imports from the action's change listener) waits until the action has finished, then imports,
173
- and its Promise settles after that import; imports that wait keep their call order. A drop has
174
- finished once it has ended and the steps it defers to the next task have run (the name editor of a
175
- create or an append with the pointer). Any other command, undo or redo has finished once the code
176
- that ran it has returned, so an import from any listener it calls waits too: a create without a
177
- pointer (C, U, N, P, a palette entry with Enter or Space, the context pad's append with Enter), the
178
- save of a name editor (Enter, leaving the field), the save a press on the map or the palette
179
- makes, and a delete, an undo or a redo that deselects what it removes. The import keeps what the
180
- action left, as any import does: a create keeps its new element selected and its name editor open
181
- on it, with what was typed, and a saved name keeps its element selected. A drag that a press started
182
- after it saved a name ends with the import, as an accepted import ends a running gesture and a press
183
- below the drag threshold (L1, 1.5;
130
+ An import is silent (no change is reported back), keeps the selection and an open label editor,
131
+ and fits the view unless `fitOnImport: false`. It ends a running gesture first, without a change;
132
+ an armed tool that only waits for the next press stays armed. An `importText` called while a user
133
+ action runs (e.g. from a change listener) waits until the action has finished; waiting imports keep
134
+ their order. A `destroy()` from any listener tears the map down once the current input handler has
135
+ returned, without errors, and no listener hears anything afterwards; a pending import then rejects
136
+ with "The modeler was destroyed." (details:
184
137
  [#285](https://github.com/Miragon/modeler-suite/issues/285),
185
- [#305](https://github.com/Miragon/modeler-suite/issues/305)). The start of a diagram-js drag is an
186
- action too, until diagram-js has activated the drag: the start clears the selection, so an import
187
- from the selection listener at the start of a move, a resize, a connect, the evolve placement or a
188
- create from the palette, the context pad or a quick-create key runs right after it and then ends
189
- that drag, without an error and without a change
190
- ([#336](https://github.com/Miragon/modeler-suite/issues/336)). A `destroy()` from the selection
191
- listener there, or from `interaction.onChange` as the drag starts, throws nothing either, also at
192
- the start of the renderer's own drags (a label, a point of a drawing, the evolve target): the map is
193
- torn down once the code that started the drag has returned, and no listener of the host hears
194
- anything after `destroy()`, also not the selection the cancelled drag brings back
195
- ([#346](https://github.com/Miragon/modeler-suite/issues/346)). The same holds for a `destroy()`
196
- from any listener at a drop or at Escape, the renderer's own drags included, at a create from the
197
- palette or the keyboard and at a paste placed with a click: the map is torn down once the handler
198
- of that input has returned, and the name editor a create opens a task later stays closed. No
199
- delivery calls a listener that an earlier listener of the same delivery unsubscribed
200
- ([#380](https://github.com/Miragon/modeler-suite/issues/380),
201
- [#373](https://github.com/Miragon/modeler-suite/issues/373)). So does a `destroy()` from a listener
202
- that a host's own call reaches: the selection listener of `elements.reveal`, or the interaction and
203
- selection listeners of an import, which ends a held gesture, empties the selection as it clears the
204
- canvas and selects again what was selected before it. The map is torn down once that call has
205
- returned. The import still draws its map, which `exportText()` then returns
206
- ([#415](https://github.com/Miragon/modeler-suite/issues/415)), and its Promise rejects with "The
207
- modeler was destroyed.", as an import does that waits when the modeler is destroyed.
208
- `exportText()` is the committed document, never a live preview: while the plot corner, an evolve target (its red circle
209
- or the evolve placement of the context pad) or a label is dragged, or the size or axis-label popover
210
- previews a change, it returns the document as it was before, and the change event of the commit
211
- brings the new one ([#347](https://github.com/Miragon/modeler-suite/issues/347)). A command during a
212
- size preview (an undo pressed mid-drag, a title the host sets) puts the preview back first, and a
213
- drag then ends without resizing, so the history stays in step with the document. A drawing's point
214
- drag, the drag of an evolve target and a label drag end the same way, without a commit, when a
215
- command runs before their release (an undo pressed mid-drag, or an arrow-key nudge during the other
216
- two, since a point drag leaves the arrow keys without effect).
217
- `elements` names components, anchors, pipelines, submaps and accelerators by the id the document
218
- gives them (`cmp_kettle`), also right after a canvas edit, and `elements.bounds(id)` gives an
219
- element's live box in diagram coordinates; `getViewState` and `setViewState` carry the viewbox.
220
- `contentBounds()` (contract 1.3) gives the box a host fits the view to, in diagram coordinates and
221
- without padding: the plot with its axes and everything drawn beyond it (a long label at the
222
- commodity edge, a note in the margin), the box the pan constraint keeps in view. It follows every
223
- edit at once and stays the same across zoom and scroll. A map without elements still has its plot,
224
- so it is never `undefined` while the modeler lives (before the first import it is the default plot);
225
- tell an empty map by its elements. `diagram` is the wrapped `Modeler` or `NavigatedViewer` for
226
- host-specific wiring. Both factories take the options above (`additionalModules`, `freeArea`,
227
- `fitOnImport` and `undoRedoKeys`); the viewer never edits and ignores the undo keys. Both pass the
228
- contract's conformance kit (1.3) without skips.
229
-
230
- `interaction` (contract 1.5) tells a host whether the user holds a gesture, so it can defer a remote
231
- re-import until the gesture ends: `active()` is true from the moment a move, resize, connect or
232
- lasso drag, a label drag, the point drag of a drawing, the drag of an evolve target, the evolve or
233
- plot-corner drag, a create from the palette, the context pad or a quick-create key with the pointer
234
- over the canvas (also while its preview is over the palette) or a connect started with `A` starts,
235
- until its drop or cancel. It stays false while the lasso or the draw tool only waits for the next
236
- press, during a pan and on the viewer. `onChange(callback)` reports each change once, and may run
237
- inside `importText` (its cancel of a gesture), so a host queues its re-import instead of importing
238
- from the callback. A callback that throws is reported as an uncaught error a microtask later; the
239
- gesture and the other callbacks go on as if it had returned.
240
-
241
- `appearance` (contract 1.5) takes a host's mode: `themes` is `WARDLEY_THEMES`, `["light"]` until the
242
- Miragon modelers turn dark together, and `set({ theme, contrast })` writes `data-cd-theme` (the theme
243
- when `themes` lists it, else `themes[0]`) and, for `contrast: "high"`, `data-cd-kontrast="hoch"` on
244
- the map's container, so the design tokens resolve there and not from the page: on a dark page the
245
- map stays light, and the contrast the host asks for holds. It is view state: no change event, the
246
- same text and SVG export, and the history, view, selection and an open editor are left as they are.
247
- Until the first `set` the map takes its mode from the page, as before. `WARDLEY_THEMES` is also
248
- `@miragon/wardley-renderer/themes`, which loads no DOM code, for hosts outside the browser (the VS
249
- Code extension's theme bridge).
138
+ [#336](https://github.com/Miragon/modeler-suite/issues/336),
139
+ [#346](https://github.com/Miragon/modeler-suite/issues/346),
140
+ [#415](https://github.com/Miragon/modeler-suite/issues/415)).
141
+
142
+ `exportText()` is the committed document, never a live preview: during a plot-corner, evolve or
143
+ label drag or a size or axis-label preview it returns the previous text, and the commit's change
144
+ event brings the new one ([#347](https://github.com/Miragon/modeler-suite/issues/347)).
145
+
146
+ `elements` names components, anchors, pipelines, submaps and accelerators by their document id
147
+ (`cmp_kettle`); `elements.bounds(id)` gives an element's live box. `getViewState` / `setViewState`
148
+ carry the viewbox. `contentBounds()` (contract 1.3) gives the box to fit: the plot with its axes and
149
+ everything drawn beyond it; never `undefined` while the modeler lives. `diagram` is the wrapped
150
+ `Modeler` or `NavigatedViewer`. Both factories take the options above; the viewer ignores the undo
151
+ keys and link handlers. Both pass the contract's conformance kit without skips.
152
+
153
+ `interaction` (contract 1.5): `active()` is true while the user holds a gesture (a drag, a create,
154
+ a connect), so a host can defer a remote re-import; false while a tool only waits, during a pan and
155
+ on the viewer. `onChange(callback)` reports each change once and may run inside `importText`, so
156
+ queue a re-import instead of importing from it.
157
+
158
+ `appearance` (contract 1.5): `themes` is `WARDLEY_THEMES` (`["light"]` for now);
159
+ `set({ theme, contrast })` writes `data-cd-theme` and, for `contrast: "high"`,
160
+ `data-cd-kontrast="hoch"` on the map's container. It is view state: no change event, same exports.
161
+ `@miragon/wardley-renderer/themes` exports `WARDLEY_THEMES` without DOM code.
250
162
 
251
163
  ### Menu entries and dialogs for a host's chrome
252
164
 
253
- The map's entries of a chrome menu (Model: "Map title…" where the host passes `mapTitle`, "Map
254
- size…" and "X-axis labels…"; Export; Help) come from `mapMenu(actions)`, in the shape the menu
255
- groups of [`@miragon/modeler-shell`](https://www.npmjs.com/package/@miragon/modeler-shell) take.
256
- `createMapSizePopover(chrome, modeler)` and `createAxisLabelsPopover(chrome, modeler)` build the two
257
- popovers (a live preview, one undo step when done; an Escape that closes one keeps a tool armed from
258
- the palette, as the shell's own layers do), `createTitleDialog(chrome, modeler)` the "Map
259
- title…" dialog (one undo step on Apply, nothing for an unchanged title),
260
- `mapShortcuts(chrome, options)` the groups of its "Keyboard shortcuts…" dialog as data. A web app
261
- that binds Cmd/Ctrl+O, Cmd/Ctrl+S, Cmd/Ctrl+V on the canvas and `?` itself passes
262
- `{ fileKeys: true, shortcutsKey: '?' }`, so the dialog lists them too, and
263
- `mapMenu({ …, shortcutsKey: '?' })` shows the key's chip on "Keyboard shortcuts…". The shell opens
264
- the dialog: `shell.showShortcutsDialog(mapShortcuts(shell, options))`, or, in a host without a
265
- mounted shell, `showShortcutsDialog(mapShortcuts(chrome, options), { container })` of
266
- `@miragon/modeler-shell`.
267
- `createMapDialog(chrome, parts)` is the modal dialog all of them share (guide §8: header with Close,
268
- scrolling body, footer), for a host's own dialogs in the same look; `dialogButton(label, variant)`
269
- gives its buttons. `chrome` is the shell handle or anything of the same shape; the renderer never
270
- imports the shell itself.
165
+ `mapMenu(actions)` gives the map's entries of a chrome menu (Model: "Map title…" when `mapTitle` is
166
+ passed, "Map size…", "X-axis labels…"; Export; Help) in the shape of
167
+ [`@miragon/modeler-shell`](https://www.npmjs.com/package/@miragon/modeler-shell)'s menu groups.
168
+ `createMapSizePopover(chrome, modeler)`, `createAxisLabelsPopover(chrome, modeler)` and
169
+ `createTitleDialog(chrome, modeler)` build the popovers and the title dialog (one undo step each).
170
+ `mapShortcuts(chrome, options)` returns the "Keyboard shortcuts…" groups as data; pass
171
+ `{ fileKeys: true, shortcutsKey: '?' }` if the host binds Cmd/Ctrl+O/S/V and `?`, and open it with
172
+ `shell.showShortcutsDialog(…)` (or `showShortcutsDialog(…, { container })` without a mounted shell).
173
+ `createMapDialog(chrome, parts)` and `dialogButton(label, variant)` build dialogs in the same look.
174
+ `chrome` is the shell handle or anything of its shape; the renderer never imports the shell.
271
175
 
272
176
  ### PNG export
273
177
 
274
- The package draws no PNG itself: `svgToPng` of `@miragon/modeler-shell/export` rasterizes the SVG of
275
- `saveSVG()`, embeds Geist, loads the SVG as a data: URL and fills the background the caller names. A
276
- map has a plot, so its PNG lies on `--cd-ui-plot` (guide §10.7), which is `COLORS.plotBackground`:
178
+ `svgToPng` of `@miragon/modeler-shell/export` rasterizes `saveSVG()` and embeds Geist. A map's PNG
179
+ lies on `COLORS.plotBackground`:
277
180
 
278
181
  ```ts
279
182
  import { COLORS } from "@miragon/wardley-renderer";
@@ -284,9 +187,6 @@ const png = await svgToPng(svg, { background: COLORS.plotBackground }); // 2×
284
187
  const forSlides = await svgToPng(svg, { background: "transparent", scale: 4 });
285
188
  ```
286
189
 
287
- `blobToBase64(png)` gives the picture as Base64 without the data-URL prefix, e.g. to post it to a VS
288
- Code extension host.
289
-
290
190
  ## Events
291
191
 
292
192
  | Event | Payload | Notes |
@@ -298,17 +198,9 @@ Code extension host.
298
198
 
299
199
  ### Fonts
300
200
 
301
- The package ships no fonts and uses no CDN. The canvas typeface is **Geist** (Miragon corporate
302
- identity); provide it yourself, preferably self-hosted via [`@fontsource`](https://fontsource.org/)
303
- (one variable file covers all weights):
304
-
305
- ```ts
306
- import "@fontsource-variable/geist/wght.css";
307
- ```
308
-
309
- That package registers the family as `'Geist Variable'`; the renderer's font stack starts with
310
- `'Geist Variable', 'Geist', …` so it matches either that package or a locally installed Geist. Use
311
- `'Geist Variable'` in your own CSS too: `'Geist'` alone never matches the self-hosted face.
201
+ No fonts ship and nothing loads from a CDN. Provide Geist, e.g.
202
+ `import "@fontsource-variable/geist/wght.css"`; the font stack starts with
203
+ `'Geist Variable', 'Geist', …`.
312
204
 
313
205
  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).
314
206
 
@@ -319,8 +211,8 @@ MIT
319
211
  The tool icons of the palette (`square-dashed-mouse-pointer`, and for Draw `spline` with a
320
212
  straight segment), the Close icon of the dialogs (`x`) and the icons of the context pad (`pencil`,
321
213
  `trash`, `circle-plus`, `arrow-right`, `chevrons-right`, `sliders-horizontal`, `line-style`,
322
- `palette`, `link`, `external-link`, and for Remove evolve `chevrons-right` with the corner `x` of
323
- `calendar-x-2`) are copied from [Lucide](https://lucide.dev) (`lucide-static` 1.59.0):
214
+ `palette`, `link`, `map`, `external-link`, and for Remove evolve `chevrons-right` with the corner
215
+ `x` of `calendar-x-2`) are copied from [Lucide](https://lucide.dev) (`lucide-static` 1.59.0):
324
216
 
325
217
  > ISC License
326
218
  >
@@ -337,8 +229,8 @@ straight segment), the Close icon of the dialogs (`x`) and the icons of the cont
337
229
  > NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
338
230
  > PERFORMANCE OF THIS SOFTWARE.
339
231
 
340
- `arrow-right`, `chevrons-right`, `circle-plus`, `external-link`, `link`, `trash` and `x` are derived
341
- from [Feather](https://feathericons.com):
232
+ `arrow-right`, `chevrons-right`, `circle-plus`, `external-link`, `link`, `map`, `trash` and `x` are
233
+ derived from [Feather](https://feathericons.com):
342
234
 
343
235
  > The MIT License (MIT)
344
236
  >
@@ -28,6 +28,25 @@ export interface WardleyViewerOptions {
28
28
  * `false` leaves them to the host (e.g. VS Code, which owns the document's undo stack).
29
29
  */
30
30
  undoRedoKeys?: boolean | undefined;
31
+ /**
32
+ * Follows a link without a scheme (`details/payment.wmap`) from the context pad. Only the host
33
+ * knows where the map's file lies, so it resolves the address or says why it can't. Without this
34
+ * option the pad offers no "Open link" on such an address; http(s) and `mailto:` addresses open
35
+ * in a new tab either way.
36
+ */
37
+ openRelativeLink?: ((address: string) => void) | undefined;
38
+ /**
39
+ * Opens an http(s) or `mailto:` address from the context pad. Default: a new browser tab. A host
40
+ * whose page can't open windows (a VS Code webview) hands the address to its own opener.
41
+ */
42
+ openExternalLink?: ((address: string) => void) | undefined;
43
+ /**
44
+ * Lets the user choose another map as the link of a component or submap, from the context pad's
45
+ * "Link to map…": resolves with its address relative to the current map, or `undefined` when the
46
+ * user cancels. Only the host knows the files around the map; without this option the pad offers
47
+ * no "Link to map…".
48
+ */
49
+ chooseLinkTarget?: (() => Promise<string | undefined>) | undefined;
31
50
  }
32
51
  export type EventCallback<T = unknown> = (event: T) => void;
33
52
  /** The plot size as drawn, plus whether the map writes it explicitly (`size [w, h]`). */
@@ -1 +1 @@
1
- {"version":3,"file":"WardleyBaseViewer.d.ts","sourceRoot":"","sources":["../src/WardleyBaseViewer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAM9C,OAAO,EAOL,KAAK,SAAS,EAEd,KAAK,eAAe,EACpB,KAAK,UAAU,EAChB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAW,KAAK,aAAa,EAA2B,MAAM,eAAe,CAAC;AASrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMrD,MAAM,WAAW,oBAAoB;IACnC,kGAAkG;IAClG,SAAS,CAAC,EAAE,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I;IAO7B;;;;;;;;;;;OAWG;IACH,kBAAkB,CAChB,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACxC,OAAO,GAAE,yBAA8B,GACtC,IAAI;IA6BP;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAa5B,mEAAmE;IACnE,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,mBAAmB;IAI3B,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAKzC,yFAAyF;IACzF,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAKnC,4EAA4E;IAC5E,MAAM,IAAI,IAAI;IAId,KAAK,IAAI,IAAI;IAIb,OAAO,IAAI,IAAI;IAQf,IAAI,SAAS,IAAI,WAAW,CAE3B;CACF"}
@@ -6,11 +6,18 @@ import { NavigatedViewer } from '../NavigatedViewer.js';
6
6
  export declare const WARDLEY_NOTATION = "wardley";
7
7
  /**
8
8
  * The contract's factory options (`freeArea`, `fitOnImport`, `undoRedoKeys`, see
9
- * `WardleyViewerOptions`) plus the renderer's own. The viewer ignores `undoRedoKeys`.
9
+ * `WardleyViewerOptions`) plus the renderer's own. The viewer ignores `undoRedoKeys` and the link
10
+ * handlers, as it has no context pad.
10
11
  */
11
12
  export interface CollaborativeWardleyOptions extends CollaborativeModelerOptions {
12
13
  /** Appended to the renderer's own modules (e.g. a host's chrome module). */
13
14
  additionalModules?: ModuleDeclaration[] | undefined;
15
+ /** Follows a link without a scheme, see `WardleyViewerOptions`. */
16
+ openRelativeLink?: ((address: string) => void) | undefined;
17
+ /** Opens an http(s) or `mailto:` link, see `WardleyViewerOptions`. */
18
+ openExternalLink?: ((address: string) => void) | undefined;
19
+ /** Chooses another map as a link, see `WardleyViewerOptions`. */
20
+ chooseLinkTarget?: (() => Promise<string | undefined>) | undefined;
14
21
  }
15
22
  /** The contract's element surface, with the optional `bounds` of contract 1.2 always present. */
16
23
  export interface WardleyElementsSurface extends ElementsSurface {
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborativeWardley.d.ts","sourceRoot":"","sources":["../../src/collaborative/CollaborativeWardley.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,aAAa,EAElB,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EAExB,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;AAaxD,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;CACrD;AAED,iGAAiG;AACjG,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CAC/C;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC;IAC5C,aAAa,IAAI,aAAa,GAAG,SAAS,CAAC;CAC5C;AA2BD,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,2BAAgC,GACxC,2BAA2B,CAQ7B;AAED,+FAA+F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C;IAC1C,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC;IAC5C,aAAa,IAAI,aAAa,GAAG,SAAS,CAAC;CAC5C;AA2BD,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,2BAAgC,GACxC,2BAA2B,CAW7B;AAED,+FAA+F;AAC/F,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,2BAAgC,GACxC,2BAA2B,CAE7B"}
@@ -13,6 +13,7 @@ import { default as WardleyLabelEditing } from '../label-editing/WardleyLabelEdi
13
13
  import { default as WardleyEvolveDragging } from '../evolve/WardleyEvolveDragging.js';
14
14
  import { default as WardleyElementFactory } from '../model/WardleyElementFactory.js';
15
15
  import { default as WardleyColorPicker } from '../color-picker/WardleyColorPicker.js';
16
+ import { WardleyLinksConfig } from '../link-editing/index.js';
16
17
  /** Context actions per element (concept doc §5.5). */
17
18
  export default class WardleyContextPadProvider implements ContextPadProvider {
18
19
  private readonly contextPad;
@@ -27,10 +28,11 @@ export default class WardleyContextPadProvider implements ContextPadProvider {
27
28
  private readonly colorPicker;
28
29
  private readonly canvas;
29
30
  private readonly injector;
31
+ private readonly linksConfig;
30
32
  static $inject: string[];
31
33
  /** Synthetic clicks created for Enter/Space, so actions can pick a pointer-free variant. */
32
34
  private readonly keyboardEvents;
33
- constructor(contextPad: ContextPad, modeling: Modeling, connect: Connect, create: Create, popupMenu: PopupMenu, wardleyModeling: WardleyModeling, labelEditing: WardleyLabelEditing, evolveDragging: WardleyEvolveDragging, factory: WardleyElementFactory, colorPicker: WardleyColorPicker, eventBus: EventBus, canvas: Canvas, injector: Injector);
35
+ constructor(contextPad: ContextPad, modeling: Modeling, connect: Connect, create: Create, popupMenu: PopupMenu, wardleyModeling: WardleyModeling, labelEditing: WardleyLabelEditing, evolveDragging: WardleyEvolveDragging, factory: WardleyElementFactory, colorPicker: WardleyColorPicker, eventBus: EventBus, canvas: Canvas, injector: Injector, linksConfig: WardleyLinksConfig | undefined);
34
36
  getContextPadEntries(element: Element): ContextPadEntries;
35
37
  /** Connections: edit the annotation (or the flow value of an imported flow link) + delete. */
36
38
  private connectionEntries;
@@ -38,6 +40,13 @@ export default class WardleyContextPadProvider implements ContextPadProvider {
38
40
  private addPrimaryEntries;
39
41
  /** Row 2: settings, line style, colour, link. */
40
42
  private addPropertyEntries;
43
+ /**
44
+ * Links the element to the map the user chooses in the host. While the host's picker is open, an
45
+ * import may replace the element or lock the canvas, so the element is looked up again after it.
46
+ * The link re-renders the pad, which takes a focused entry with it: as after a synchronous
47
+ * action (`onPadKeydown`), the canvas then takes the focus instead of `<body>`.
48
+ */
49
+ private linkChosenMap;
41
50
  /**
42
51
  * For an entry that opens no editor or popup: after a pointer click or drag it hands the focus to
43
52
  * the canvas (guide §5.8), whose keys act only while it has the focus. The clicked entry took the
@@ -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,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IACH,OAAO,CAAC,cAAc;IAOtB,wEAAwE;IACxE,OAAO,CAAC,YAAY;IAuCpB,OAAO,CAAC,cAAc;IAiBtB;;;OAGG;IACH,OAAO,CAAC,WAAW;CAuBpB"}
@@ -3,6 +3,7 @@ import { default as EventBus } from 'diagram-js/lib/core/EventBus';
3
3
  import { ElementLike, ShapeLike, ConnectionLike } from 'diagram-js/lib/model/Types';
4
4
  import { default as ElementRegistry } from 'diagram-js/lib/core/ElementRegistry';
5
5
  import { default as EvolutionGrid } from '../evolution-grid/EvolutionGrid.js';
6
+ import { Injector } from 'didi';
6
7
  /** Primary name text of a node (contract shared with other modules and consumers' CSS). */
7
8
  export declare const NAME_LABEL_CLASS = "wardley-name-label";
8
9
  /** Groups every evolve visual so tools (e.g. the context pad) can tell the node from its movement. */
@@ -14,8 +15,9 @@ export declare const LABEL_ROLE_ATTRIBUTE = "data-label-role";
14
15
  export default class WardleyRenderer extends BaseRenderer {
15
16
  private readonly grid;
16
17
  private readonly elementRegistry;
18
+ private readonly injector;
17
19
  static $inject: string[];
18
- constructor(eventBus: EventBus, grid: EvolutionGrid, elementRegistry: ElementRegistry);
20
+ constructor(eventBus: EventBus, grid: EvolutionGrid, elementRegistry: ElementRegistry, injector: Injector);
19
21
  canRender(element: ElementLike): boolean;
20
22
  drawShape(visuals: SVGElement, element: ShapeLike): SVGElement;
21
23
  /** Freeform drawing: polyline/polygon from relative points (see WardleyDrawTool). */
@@ -33,5 +35,11 @@ export default class WardleyRenderer extends BaseRenderer {
33
35
  private drawAnnotation;
34
36
  private drawAccelerator;
35
37
  private drawSubmap;
38
+ /**
39
+ * Marks the element at its lower left, where neither its name, its inertia nor its evolve sits,
40
+ * when the editor can open its link. Only the editing mount has the link opener: the viewer opens
41
+ * no links, so it shows no mark.
42
+ */
43
+ private drawLinkBadge;
36
44
  }
37
45
  //# sourceMappingURL=WardleyRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WardleyRenderer.d.ts","sourceRoot":"","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OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,GAAG,UAAU;IAkDxE,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAKtC,iBAAiB,CAAC,UAAU,EAAE,cAAc,GAAG,MAAM;IAM9D,OAAO,CAAC,aAAa;IAwCrB,kFAAkF;IAClF,OAAO,CAAC,YAAY;IAmFpB,OAAO,CAAC,UAAU;IA0BlB,OAAO,CAAC,YAAY;IAyDpB,OAAO,CAAC,QAAQ;IAuBhB,OAAO,CAAC,YAAY;IAuCpB,OAAO,CAAC,cAAc;IAmCtB,OAAO,CAAC,eAAe;IA6BvB,OAAO,CAAC,UAAU;IAgDlB;;;;OAIG;IACH,OAAO,CAAC,aAAa;CAmBtB"}
@@ -1,6 +1,6 @@
1
1
  /*! @miragon/wardley-renderer icon geometry: the context pad icons. Lucide (lucide-static 1.59.0)
2
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
3
+ * arrow-right, chevrons-right, circle-plus, external-link, link, map and trash derive from Feather
4
4
  * @license MIT, Copyright (c) 2013-present Cole Bemis
5
5
  * Full notices: README.md of @miragon/wardley-renderer */
6
6
  /**
@@ -20,6 +20,7 @@ export declare const LUCIDE: {
20
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
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
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
+ readonly map: "<path d=\"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z\"/><path d=\"M15 5.764v15\"/><path d=\"M9 3.236v15\"/>";
23
24
  };
24
25
  export type LucideIconName = keyof typeof LUCIDE;
25
26
  /**
@@ -1 +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"}
1
+ {"version":3,"file":"lucide.d.ts","sourceRoot":"","sources":["../../src/draw/lucide.ts"],"names":[],"mappings":"AAAA;;;;0DAI0D;AAE1D;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAwBT,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,MAAM,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAEvD"}
@@ -16,6 +16,13 @@ export { PLOT_MIN } from '@miragon/wardley-schema-model';
16
16
  export declare const NODE_SIZE = 34;
17
17
  export declare const COMPONENT_RADIUS = 15;
18
18
  export declare const COMPONENT_INNER_RADIUS = 12;
19
+ /**
20
+ * The mark on an element whose link the editor opens (its context pad's "Open link"): editor
21
+ * chrome in the `--cd-ui-*` roles of `wardley.css`, which the export leaves out.
22
+ */
23
+ export declare const LINK_BADGE_CLASS = "wardley-link-badge";
24
+ export declare const LINK_BADGE_RADIUS = 8;
25
+ export declare const LINK_BADGE_ICON_SIZE = 11;
19
26
  export declare const ANCHOR_ICON_SIZE = 26;
20
27
  export declare const PIPELINE_HEIGHT = 30;
21
28
  export declare const PIPELINE_ANCHOR_SIZE = 16;
@@ -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,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAQ7F;AAiBD;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAwBT,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYd,CAAC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