@miragon/wardley-renderer 0.7.0 → 0.9.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 (92) hide show
  1. package/README.md +133 -16
  2. package/dist/Modeler.d.ts.map +1 -1
  3. package/dist/NavigatedViewer.d.ts.map +1 -1
  4. package/dist/WardleyBaseViewer.d.ts +44 -9
  5. package/dist/WardleyBaseViewer.d.ts.map +1 -1
  6. package/dist/collaborative/CollaborativeWardley.d.ts +35 -0
  7. package/dist/collaborative/CollaborativeWardley.d.ts.map +1 -0
  8. package/dist/collaborative/index.d.ts +2 -0
  9. package/dist/collaborative/index.d.ts.map +1 -0
  10. package/dist/color-picker/WardleyColorPicker.d.ts +3 -1
  11. package/dist/color-picker/WardleyColorPicker.d.ts.map +1 -1
  12. package/dist/context-pad/WardleyContextPadProvider.d.ts.map +1 -1
  13. package/dist/draw/deprecated-icons.d.ts +35 -0
  14. package/dist/draw/deprecated-icons.d.ts.map +1 -0
  15. package/dist/draw/icons.d.ts +0 -24
  16. package/dist/draw/icons.d.ts.map +1 -1
  17. package/dist/draw/palette-icons.d.ts.map +1 -1
  18. package/dist/draw/styles.d.ts.map +1 -1
  19. package/dist/draw-tool/WardleyDrawTool.d.ts +3 -1
  20. package/dist/draw-tool/WardleyDrawTool.d.ts.map +1 -1
  21. package/dist/draw-tool/WardleyDrawingHandles.d.ts +3 -1
  22. package/dist/draw-tool/WardleyDrawingHandles.d.ts.map +1 -1
  23. package/dist/editor-state.d.ts +12 -2
  24. package/dist/editor-state.d.ts.map +1 -1
  25. package/dist/evolve/WardleyEvolveDragging.d.ts +3 -1
  26. package/dist/evolve/WardleyEvolveDragging.d.ts.map +1 -1
  27. package/dist/free-rect/FreeRect.d.ts +41 -0
  28. package/dist/free-rect/FreeRect.d.ts.map +1 -0
  29. package/dist/free-rect/index.d.ts +6 -0
  30. package/dist/free-rect/index.d.ts.map +1 -0
  31. package/dist/index.d.ts +10 -3
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2301 -1205
  34. package/dist/index.js.map +1 -1
  35. package/dist/io/WardleyImporter.d.ts +15 -1
  36. package/dist/io/WardleyImporter.d.ts.map +1 -1
  37. package/dist/io/fitViewbox.d.ts +21 -0
  38. package/dist/io/fitViewbox.d.ts.map +1 -0
  39. package/dist/io/saveSvg.d.ts.map +1 -1
  40. package/dist/keyboard/WardleyKeyboard.d.ts +7 -4
  41. package/dist/keyboard/WardleyKeyboard.d.ts.map +1 -1
  42. package/dist/label-drag/WardleyLabelDragging.d.ts +3 -1
  43. package/dist/label-drag/WardleyLabelDragging.d.ts.map +1 -1
  44. package/dist/label-editing/WardleyLabelEditing.d.ts +4 -0
  45. package/dist/label-editing/WardleyLabelEditing.d.ts.map +1 -1
  46. package/dist/link-editing/WardleyLinkEditing.d.ts +6 -1
  47. package/dist/link-editing/WardleyLinkEditing.d.ts.map +1 -1
  48. package/dist/live-preview/LivePreview.d.ts +36 -0
  49. package/dist/live-preview/LivePreview.d.ts.map +1 -0
  50. package/dist/live-preview/index.d.ts +5 -0
  51. package/dist/live-preview/index.d.ts.map +1 -0
  52. package/dist/map-menu/AxisLabelsPopover.d.ts +10 -0
  53. package/dist/map-menu/AxisLabelsPopover.d.ts.map +1 -0
  54. package/dist/map-menu/MapSizePopover.d.ts +10 -0
  55. package/dist/map-menu/MapSizePopover.d.ts.map +1 -0
  56. package/dist/map-menu/ShortcutsDialog.d.ts +14 -0
  57. package/dist/map-menu/ShortcutsDialog.d.ts.map +1 -0
  58. package/dist/map-menu/TitleDialog.d.ts +12 -0
  59. package/dist/map-menu/TitleDialog.d.ts.map +1 -0
  60. package/dist/map-menu/dialog.d.ts +41 -0
  61. package/dist/map-menu/dialog.d.ts.map +1 -0
  62. package/dist/map-menu/dom.d.ts +9 -0
  63. package/dist/map-menu/dom.d.ts.map +1 -0
  64. package/dist/map-menu/index.d.ts +14 -0
  65. package/dist/map-menu/index.d.ts.map +1 -0
  66. package/dist/map-menu/menu.d.ts +68 -0
  67. package/dist/map-menu/menu.d.ts.map +1 -0
  68. package/dist/map-menu/popover.d.ts +52 -0
  69. package/dist/map-menu/popover.d.ts.map +1 -0
  70. package/dist/map-menu/shortcuts.d.ts +48 -0
  71. package/dist/map-menu/shortcuts.d.ts.map +1 -0
  72. package/dist/map-resize/MapProjection.d.ts +12 -2
  73. package/dist/map-resize/MapProjection.d.ts.map +1 -1
  74. package/dist/map-resize/MapResizeHandles.d.ts +4 -1
  75. package/dist/map-resize/MapResizeHandles.d.ts.map +1 -1
  76. package/dist/map-resize/index.d.ts.map +1 -1
  77. package/dist/palette/WardleyPaletteKeyboard.d.ts +4 -2
  78. package/dist/palette/WardleyPaletteKeyboard.d.ts.map +1 -1
  79. package/dist/palette/WardleyPaletteProvider.d.ts +10 -6
  80. package/dist/palette/WardleyPaletteProvider.d.ts.map +1 -1
  81. package/dist/pan-constraint/PanConstraint.d.ts +22 -6
  82. package/dist/pan-constraint/PanConstraint.d.ts.map +1 -1
  83. package/dist/read-only/WardleyReadOnly.d.ts +27 -0
  84. package/dist/read-only/WardleyReadOnly.d.ts.map +1 -0
  85. package/dist/read-only/index.d.ts +7 -0
  86. package/dist/read-only/index.d.ts.map +1 -0
  87. package/dist/theme/index.d.ts +1 -1
  88. package/dist/theme/index.d.ts.map +1 -1
  89. package/dist/theme/palette.d.ts +22 -36
  90. package/dist/theme/palette.d.ts.map +1 -1
  91. package/dist/wardley.css +1 -1
  92. package/package.json +6 -5
package/README.md CHANGED
@@ -36,26 +36,99 @@ Swap `NavigatedViewer` for `Modeler` to get the editable map (palette, context p
36
36
 
37
37
  ## API
38
38
 
39
- | Member | What it does |
40
- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
41
- | `importDSL(text)` / `importMap(map)` | Loads a map (replaces the content, clears the undo history). Resolves to `{ warnings }`. |
42
- | `exportDSL()` / `exportMap()` / `saveSVG()` | The map as canonical OWM text, as the JSON model, or as a standalone SVG (never shows selection or hover state). |
43
- | `setTitle(title)` | Sets the map title (one undo step in the `Modeler`). |
44
- | `getMapSize()` | The plot size as drawn, whether the map writes it (`size [w, h]`) and the matching preset. |
45
- | `setMapSize(width, height)` / `resetMapSize()` | Changes the plot size (rounded and clamped to 480–5000 × 320–5000). In the `Modeler` one undo step, no re-import. |
46
- | `setEvolutionLabels(labels, { transient })` | Sets the four X-axis stage labels (normalized, see below); `transient` previews without an undo step. |
47
- | `undo()` / `redo()` / `canUndo()` / `canRedo()` | `Modeler` only: the canvas command stack. |
48
- | `commitPendingEdits()` | `Modeler` only: saves an open inline editor, e.g. before a save shortcut. |
49
- | `on(event, callback)` / `off(event, callback)` | diagram-js events, see below. |
50
- | `svgToPng(svg, { scale, transparent })` / `blobToBase64` | Rasterizes an exported SVG (default 2×, paper background). |
51
- | `setAsideEditorState(modeler)` / `restoreEditorState(…)` | Keeps the selection and an open inline editor across a re-import of an externally changed map. |
39
+ | Member | What it does |
40
+ | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
41
+ | `importDSL(text)` / `importMap(map)` | Loads a map (replaces the content, clears the undo history). Resolves to `{ warnings }`. |
42
+ | `exportDSL()` / `exportMap()` / `saveSVG()` | The map as canonical OWM text, as the JSON model, or as a standalone SVG (never shows selection or hover state). |
43
+ | `setTitle(title)` | Sets the map title (one undo step in the `Modeler`). |
44
+ | `getMapSize()` | The plot size as drawn, whether the map writes it (`size [w, h]`) and the matching preset. |
45
+ | `setMapSize(width, height, { transient })` / `resetMapSize({ transient })` | Changes the plot size (rounded and clamped to 480–5000 × 320–5000). In the `Modeler` one undo step, no re-import; `transient` previews without one. |
46
+ | `setEvolutionLabels(labels, { transient })` | Sets the four X-axis stage labels (normalized, see below); `transient` previews without an undo step. |
47
+ | `undo()` / `redo()` / `canUndo()` / `canRedo()` | `Modeler` only: the canvas command stack. |
48
+ | `commitPendingEdits()` | `Modeler` only: saves an open inline editor, e.g. before a save shortcut. |
49
+ | `on(event, callback)` / `off(event, callback)` | diagram-js events, see below. |
50
+ | `svgToPng(svg, { scale, transparent })` / `blobToBase64` | Rasterizes an exported SVG (default 2×, paper background). |
51
+ | `setAsideEditorState(modeler)` / `restoreEditorState(…)` | Keeps the selection and an open inline editor across a re-import of an externally changed map. |
52
52
 
53
53
  `setEvolutionLabels` turns an empty stage into its default label and `->` into `→`, so the labels
54
54
  always write a valid `evolution` line; the default set is stored as `undefined`.
55
55
 
56
- Options: `new Modeler({ container, keyboard: { undoRedo: false } })` leaves Cmd/Ctrl+Z/Y to the
57
- host (VS Code owns its document's undo stack). `additionalModules` adds diagram-js modules; every
58
- Wardley feature module is exported for custom editors.
56
+ An import validates the whole map first: a map that is not importable rejects before the canvas
57
+ changes, and a rendering failure puts the previous map back. It then fits the view to the plot with
58
+ its axis margins, centred in the free area and never above 100 %. Without a `freeArea` the pan
59
+ constraint may still move a map smaller than the view, to keep its margins around it.
60
+
61
+ An open inline editor (name, note, link annotation, flow value, link address) stays open with its
62
+ typed text across a view change, a scroll, a zoom or a host's fit, and moves with its element;
63
+ Enter, leaving the field, or a click or drag on the canvas saves it.
64
+
65
+ Options (the names of the `@miragon/modeler-api` 1.2 factory options):
66
+
67
+ - `undoRedoKeys: false` leaves Cmd/Ctrl+Z, Shift+Z and Y to the host (VS Code owns its document's
68
+ undo stack).
69
+ - `freeArea: { insets: () => ({ top, right, bottom, left }) }` names the canvas edges a host's chrome
70
+ covers: the import fits the plot into the rest, panning keeps the map inside it, a view the host
71
+ fitted into it stays where the host put it, and keyboard creation places elements in its centre.
72
+ `freeArea: { center: () => ({ x, y }) }` gives only that centre, in diagram coordinates.
73
+ - `fitOnImport: false` leaves the view after an import to the host, whose chrome fits it.
74
+ - `additionalModules` adds diagram-js modules; every Wardley feature module is exported for custom
75
+ editors.
76
+
77
+ `keyboard: { undoRedo }` and `freeRectInsets` still work for this minor release, as deprecated
78
+ aliases of `undoRedoKeys` and `freeArea: { insets }`; given both, the aligned name wins.
79
+
80
+ The `wardleyReadOnly` service (`modeler.get<WardleyReadOnly>('wardleyReadOnly').setReadOnly(true)`)
81
+ locks the canvas while its host cannot save an edit, e.g. while the document is invalid: every edit
82
+ rule is vetoed, an open editor, popup or drag ends without saving, the handles hide, and selection,
83
+ zoom, pan, select all and export stay. It fires `wardley.readOnly.changed`.
84
+
85
+ ## Collaborative hosts
86
+
87
+ `createCollaborativeModeler()` and `createCollaborativeViewer()` implement the
88
+ [`@miragon/modeler-api`](https://www.npmjs.com/package/@miragon/modeler-api) collaborative-modeler
89
+ contract (notation `wardley`), for hosts that keep the map text in a shared document:
90
+
91
+ ```ts
92
+ import { createCollaborativeModeler } from '@miragon/wardley-renderer';
93
+ import '@miragon/wardley-renderer/assets/wardley.css';
94
+
95
+ const modeler = createCollaborativeModeler();
96
+ modeler.attachTo(document.querySelector('#canvas')!);
97
+ await modeler.importText(documentText);
98
+ modeler.onContentChanged(() => save(modeler.exportText()));
99
+ ```
100
+
101
+ An import is silent (no content change is reported back), keeps the selection and an open label
102
+ editor and fits the view (unless `fitOnImport: false`); a host's view change (`setViewState`, a fit)
103
+ never saves an open editor either. `exportText()` is the committed document, never a live preview:
104
+ while the plot corner is dragged or the size or axis-label popover previews a change, it returns the
105
+ document as it was before, and the change event of the commit brings the new one. A command during a
106
+ size preview (an undo pressed mid-drag, a title the host sets) puts the preview back first, and a
107
+ drag then ends without resizing, so the history stays in step with the document. `elements` names
108
+ components, anchors, pipelines, submaps and accelerators by the id the document gives them
109
+ (`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.
115
+
116
+ ### Menu entries and dialogs for a host's chrome
117
+
118
+ The map's entries of a chrome menu (Model: "Map title…" where the host passes `mapTitle`, "Map
119
+ size…" and "X-axis labels…"; Export; Help) come from `mapMenu(actions)`, in the shape the menu
120
+ groups of [`@miragon/modeler-shell`](https://www.npmjs.com/package/@miragon/modeler-shell) take.
121
+ `createMapSizePopover(chrome, modeler)` and `createAxisLabelsPopover(chrome, modeler)` build the two
122
+ popovers (a live preview, one undo step when done), `createTitleDialog(chrome, modeler)` the "Map
123
+ title…" dialog (one undo step on Apply, nothing for an unchanged title),
124
+ `createShortcutsDialog(chrome, options)` the "Keyboard shortcuts…" dialog and
125
+ `mapShortcuts(chrome, options)` its table. A web app that binds Cmd/Ctrl+O, Cmd/Ctrl+S, Cmd/Ctrl+V
126
+ on the canvas and `?` itself passes `{ fileKeys: true, shortcutsKey: '?' }`, so the dialog lists
127
+ them too.
128
+ `createMapDialog(chrome, parts)` is the modal dialog all of them share (guide §8: header with Close,
129
+ scrolling body, footer), for a host's own dialogs in the same look; `dialogButton(label, variant)`
130
+ gives its buttons. `chrome` is the shell handle or anything of the same shape; the renderer never
131
+ imports the shell itself.
59
132
 
60
133
  ## Events
61
134
 
@@ -85,3 +158,47 @@ Part of the [Wardley Maps](https://github.com/Miragon/wardley-maps-modeler) mono
85
158
  ## License
86
159
 
87
160
  MIT
161
+
162
+ 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):
165
+
166
+ > ISC License
167
+ >
168
+ > Copyright (c) 2026 Lucide Icons and Contributors
169
+ >
170
+ > Permission to use, copy, modify, and/or distribute this software for any purpose with or without
171
+ > fee is hereby granted, provided that the above copyright notice and this permission notice
172
+ > appear in all copies.
173
+ >
174
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
175
+ > SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
176
+ > AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
177
+ > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
178
+ > NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
179
+ > PERFORMANCE OF THIS SOFTWARE.
180
+
181
+ `x` is derived from [Feather](https://feathericons.com):
182
+
183
+ > The MIT License (MIT)
184
+ >
185
+ > Copyright (c) 2013-present Cole Bemis
186
+ >
187
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
188
+ > associated documentation files (the "Software"), to deal in the Software without restriction,
189
+ > including without limitation the rights to use, copy, modify, merge, publish, distribute,
190
+ > sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
191
+ > furnished to do so, subject to the following conditions:
192
+ >
193
+ > The above copyright notice and this permission notice shall be included in all copies or
194
+ > substantial portions of the Software.
195
+ >
196
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
197
+ > BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
198
+ > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
199
+ > DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
200
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
201
+
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
204
+ [Material Icons](https://fonts.google.com/icons) by Google, under the Apache License 2.0.
@@ -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;AAiB9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA4BvD;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,eAAe;cACvB,WAAW,IAAI,iBAAiB,EAAE;IAyCrD;;;OAGG;IACH,kBAAkB,IAAI,IAAI;IAK1B,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;AAiB9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA6BvD;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,eAAe;cACvB,WAAW,IAAI,iBAAiB,EAAE;IA0CrD;;;OAGG;IACH,kBAAkB,IAAI,IAAI;IAK1B,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,OAAO;CAGnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"NavigatedViewer.d.ts","sourceRoot":"","sources":["../src/NavigatedViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAK9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,MAAM;cACtB,WAAW,IAAI,iBAAiB,EAAE;CAUtD"}
1
+ {"version":3,"file":"NavigatedViewer.d.ts","sourceRoot":"","sources":["../src/NavigatedViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAK9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,MAAM;cACtB,WAAW,IAAI,iBAAiB,EAAE;CAWtD"}
@@ -1,6 +1,8 @@
1
1
  import { ModuleDeclaration } from 'didi';
2
2
  import { MapConfig, MapSizePresetId, WardleyMap } from '@miragon/wardley-schema-model';
3
3
  import { ImportWarning } from './io/types.js';
4
+ import { FreeArea } from '@miragon/modeler-api';
5
+ import { FreeRectInsets } from './free-rect/index.js';
4
6
  export interface WardleyViewerOptions {
5
7
  /** Host element. If missing, a detached <div> is created (can be attached later via attachTo). */
6
8
  container?: HTMLElement;
@@ -9,12 +11,30 @@ export interface WardleyViewerOptions {
9
11
  /** Concatenated to the end of the module list (extension point, §12). */
10
12
  additionalModules?: ModuleDeclaration[];
11
13
  /**
12
- * Modeler keyboard behaviour. `undoRedo: false` leaves Cmd/Ctrl+Z/Y to the host (e.g. VS Code,
13
- * which owns the document's undo stack). Default: the canvas handles undo/redo.
14
+ * The part of the canvas no host chrome covers (`@miragon/modeler-api` `freeArea`), read
15
+ * whenever it is needed. `{ insets }` names what the chrome covers along the container's edges,
16
+ * in px (e.g. `() => shell.fitInsets()` of the Miragon modeler shell): the import fits the plot
17
+ * into the rest, panning keeps the map inside it, and keyboard creation places elements in its
18
+ * centre. `{ center }` gives only that centre, in diagram coordinates. Default: the whole
19
+ * container.
14
20
  */
21
+ freeArea?: FreeArea | undefined;
22
+ /**
23
+ * Fit the plot into the view after every import. Default `true`; `false` when the host's chrome
24
+ * fits the view itself.
25
+ */
26
+ fitOnImport?: boolean | undefined;
27
+ /**
28
+ * Bind Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z and Cmd/Ctrl+Y to the canvas history. Default `true`;
29
+ * `false` leaves them to the host (e.g. VS Code, which owns the document's undo stack).
30
+ */
31
+ undoRedoKeys?: boolean | undefined;
32
+ /** @deprecated Since 0.9, for one minor release: use `undoRedoKeys`, which wins over it. */
15
33
  keyboard?: {
16
34
  undoRedo?: boolean;
17
- };
35
+ } | undefined;
36
+ /** @deprecated Since 0.9, for one minor release: use `freeArea: { insets }`, which wins over it. */
37
+ freeRectInsets?: (() => FreeRectInsets) | undefined;
18
38
  }
19
39
  export type EventCallback<T = unknown> = (event: T) => void;
20
40
  /** The plot size as drawn, plus whether the map writes it explicitly (`size [w, h]`). */
@@ -34,6 +54,10 @@ export interface SetEvolutionLabelsOptions {
34
54
  /** Live preview: applied directly, without an undo step (commit later without this flag). */
35
55
  transient?: boolean;
36
56
  }
57
+ export interface SetMapSizeOptions {
58
+ /** Live preview: drawn at once, without an undo step (commit later without this flag). */
59
+ transient?: boolean;
60
+ }
37
61
  /**
38
62
  * Shared lifecycle & DI bootstrap for all Wardley viewers (analogous to bpmn-js BaseViewer, but OUR
39
63
  * OWN code — no bpmn-js as a dependency, §3.3). Subclasses only override `_getModules()` (a method
@@ -47,18 +71,22 @@ export declare abstract class WardleyBaseViewer {
47
71
  private readonly _options;
48
72
  /** Labels before the first transient preview, so the commit becomes one undo step from there. */
49
73
  private _labelsBeforePreview;
74
+ /** The map before the first transient size preview, put back before the size is committed. */
75
+ private _sizePreview;
50
76
  constructor(options?: WardleyViewerOptions);
51
77
  private _createContainer;
52
78
  private _ensureDiagram;
53
79
  get<T>(name: string): T;
54
80
  on<T = unknown>(event: string, callback: EventCallback<T>, priority?: number): void;
55
81
  off(event: string, callback: EventCallback): void;
56
- /** Load a model into the canvas (replaces existing content). */
82
+ /**
83
+ * Load a model into the canvas (replaces existing content). Rejects a map the canvas cannot
84
+ * hold (invalid, or ids the canvas reserves for itself) before anything changes, so the current
85
+ * map, its rendering and its undo history stay as they were.
86
+ */
57
87
  importMap(map: WardleyMap): Promise<{
58
88
  warnings: ImportWarning[];
59
89
  }>;
60
- /** DSL `style` directive as a CSS class on the container (`wardley-dark` etc., concept §8.1). */
61
- private _applyStyleClass;
62
90
  /** Load OWM DSL text (internally parse -> importMap). Parser findings land in the warnings. */
63
91
  importDSL(text: string): Promise<{
64
92
  warnings: ImportWarning[];
@@ -70,15 +98,21 @@ export declare abstract class WardleyBaseViewer {
70
98
  * PLOT_MIN..PLOT_MAX); non-finite input throws a RangeError before anything changes. In the
71
99
  * Modeler this is one undoable step that re-projects the shapes in place (selection, viewport and
72
100
  * history survive); the read-only viewers re-import. An explicit size line is written even for
73
- * the default size — only `resetMapSize` removes it.
101
+ * the default size — only `resetMapSize` removes it. In the Modeler `{ transient: true }` shows
102
+ * a live preview without an undo step, and the next call without it commits ONE step from the
103
+ * size before the preview (none when the size ends where the preview started), like
104
+ * `setEvolutionLabels`. A command before that call (e.g. `setTitle`) puts the preview back first.
74
105
  */
75
- setMapSize(width: number, height: number): Promise<{
106
+ setMapSize(width: number, height: number, options?: SetMapSizeOptions): Promise<{
76
107
  warnings: ImportWarning[];
77
108
  }>;
78
109
  /** Removes the `size` line: the map is drawn at the default plot size again. */
79
- resetMapSize(): Promise<{
110
+ resetMapSize(options?: SetMapSizeOptions): Promise<{
80
111
  warnings: ImportWarning[];
81
112
  }>;
113
+ private _resizeMap;
114
+ /** Shows the map without the size preview again, if one is open. */
115
+ private _putBackSizePreview;
82
116
  getMapSize(): MapSizeInfo;
83
117
  private _reimportWithSize;
84
118
  /**
@@ -106,6 +140,7 @@ export declare abstract class WardleyBaseViewer {
106
140
  private _applyConfigDirectly;
107
141
  /** The Modeler's command API, or null in the read-only viewers. */
108
142
  private _wardleyModeling;
143
+ private _livePreview;
109
144
  private _root;
110
145
  private _rootBusinessObject;
111
146
  exportDSL(): string;
@@ -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,EAML,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,UAAU,EAChB,MAAM,+BAA+B,CAAC;AAOv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,GAAG,IAAI;IAKnC,4EAA4E;IAC5E,MAAM,IAAI,IAAI;IAId,KAAK,IAAI,IAAI;IAIb,OAAO,IAAI,IAAI;IAQf,IAAI,SAAS,IAAI,WAAW,CAE3B;CACF"}
@@ -0,0 +1,35 @@
1
+ import { CollaborativeModeler, CollaborativeModelerOptions, ElementBounds, 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 '../free-rect/index.js';
6
+ /** Stable notation id in `meta.notation` of the collaborative-modeler contract. */
7
+ export declare const WARDLEY_NOTATION = "wardley";
8
+ /**
9
+ * The contract's factory options (`freeArea`, `fitOnImport`, `undoRedoKeys`, see
10
+ * `WardleyViewerOptions`) plus the renderer's own. The viewer ignores `undoRedoKeys`.
11
+ */
12
+ export interface CollaborativeWardleyOptions extends CollaborativeModelerOptions {
13
+ /** Appended to the renderer's own modules (e.g. a host's chrome module). */
14
+ additionalModules?: ModuleDeclaration[] | undefined;
15
+ /** @deprecated Since 0.9, for one minor release: use `undoRedoKeys`, which wins over it. */
16
+ keyboard?: {
17
+ undoRedo?: boolean;
18
+ } | undefined;
19
+ /** @deprecated Since 0.9, for one minor release: use `freeArea: { insets }`, which wins over it. */
20
+ freeRectInsets?: (() => FreeRectInsets) | undefined;
21
+ }
22
+ /** The contract's element surface, with the optional `bounds` of contract 1.2 always present. */
23
+ export interface WardleyElementsSurface extends ElementsSurface {
24
+ bounds(id: string): ElementBounds | undefined;
25
+ }
26
+ /** The contract surface plus the wrapped diagram for host-specific wiring. */
27
+ export interface CollaborativeWardleyModeler extends CollaborativeModeler {
28
+ readonly elements: WardleyElementsSurface;
29
+ readonly diagram: Modeler | NavigatedViewer;
30
+ }
31
+ /** The editing mount (`meta.editable: true`) of the collaborative-modeler contract. */
32
+ export declare function createCollaborativeModeler(options?: CollaborativeWardleyOptions): CollaborativeWardleyModeler;
33
+ /** The read-only mount (`meta.editable: false`): imports, exports and reveals, never edits. */
34
+ export declare function createCollaborativeViewer(options?: CollaborativeWardleyOptions): CollaborativeWardleyModeler;
35
+ //# sourceMappingURL=CollaborativeWardley.d.ts.map
@@ -0,0 +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,8EAA8E;AAC9E,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC;CAC7C;AA2BD,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,2BAAgC,GACxC,2BAA2B,CAS7B;AAED,+FAA+F;AAC/F,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,2BAAgC,GACxC,2BAA2B,CAE7B"}
@@ -0,0 +1,2 @@
1
+ export { WARDLEY_NOTATION, createCollaborativeModeler, createCollaborativeViewer, type CollaborativeWardleyModeler, type CollaborativeWardleyOptions, type WardleyElementsSurface, } from './CollaborativeWardley.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,gBAAgB,EAChB,0BAA0B,EAC1B,yBAAyB,EACzB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,GAC5B,MAAM,2BAA2B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { default as Canvas } from 'diagram-js/lib/core/Canvas';
2
+ import { Injector } from 'didi';
2
3
  import { default as EventBus } from 'diagram-js/lib/core/EventBus';
3
4
  import { default as WardleyModeling } from '../modeling/WardleyModeling.js';
4
5
  import { WardleyShape } from '../model/di-types.js';
@@ -12,11 +13,12 @@ import { WardleyShape } from '../model/di-types.js';
12
13
  export default class WardleyColorPicker {
13
14
  private readonly canvas;
14
15
  private readonly modeling;
16
+ private readonly injector;
15
17
  static $inject: string[];
16
18
  private popover;
17
19
  private readonly onDocPointer;
18
20
  private readonly onKey;
19
- constructor(canvas: Canvas, eventBus: EventBus, modeling: WardleyModeling);
21
+ constructor(canvas: Canvas, eventBus: EventBus, modeling: WardleyModeling, injector: Injector);
20
22
  /** Opens the swatch grid for `shape` at the click position (viewport coordinates). */
21
23
  open(shape: WardleyShape, clientX: number, clientY: number): void;
22
24
  isOpen(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"WardleyColorPicker.d.ts","sourceRoot":"","sources":["../../src/color-picker/WardleyColorPicker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAazD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAiBnC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAlB3B,MAAM,CAAC,OAAO,WAA6C;IAE3D,OAAO,CAAC,OAAO,CAA0B;IAEzC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAE3B;IACF,OAAO,CAAC,QAAQ,CAAC,KAAK,CAMpB;gBAGiB,MAAM,EAAE,MAAM,EAC/B,QAAQ,EAAE,QAAQ,EACD,QAAQ,EAAE,eAAe;IAM5C,sFAAsF;IACtF,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IA4DjE,MAAM,IAAI,OAAO;IAIjB,KAAK,CAAC,OAAO,GAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,IAAI;IAUrD,OAAO,CAAC,aAAa;CAkBtB"}
1
+ {"version":3,"file":"WardleyColorPicker.d.ts","sourceRoot":"","sources":["../../src/color-picker/WardleyColorPicker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAazD;;;;;;GAMG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rome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
2
+ 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";
3
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
4
+ 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";
5
+ /** data_object — JSON. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
6
+ 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";
7
+ /** code — DSL. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
8
+ 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";
9
+ /** download — Export. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
10
+ export declare const ICON_DOWNLOAD = "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z";
11
+ /** share — share link. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
12
+ 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";
13
+ /** folder_open — open file. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
14
+ 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";
15
+ /** image — PNG/image. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
16
+ 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";
17
+ /** note_add — new / clear. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
18
+ 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";
19
+ /** aspect_ratio — map size. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
20
+ export declare const ICON_ASPECT_RATIO = "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";
21
+ /** menu — hamburger (main menu). @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
22
+ export declare const ICON_MENU = "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z";
23
+ /** add — append component. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
24
+ export declare const ICON_ADD = "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z";
25
+ /** visibility — eye (show example). @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
26
+ export declare const ICON_VISIBILITY = "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";
27
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
28
+ export declare const ICON_PERSON: string;
29
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
30
+ export declare const ICON_EDIT: string;
31
+ /** @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
32
+ export declare const ICON_DELETE: string;
33
+ /** Returns an icon as an HTML SVG string, colour = currentColor. @deprecated Chrome icons come from @miragon/modeler-shell (Lucide, guide §5.14); this export goes in a later minor. */
34
+ export declare function iconMarkup(path: string, size?: number): string;
35
+ //# sourceMappingURL=deprecated-icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-icons.d.ts","sourceRoot":"","sources":["../../src/draw/deprecated-icons.ts"],"names":[],"mappings":"AAaA,0HAA0H;AAC1H,eAAO,MAAM,SAAS,mJAC4H,CAAC;AAEnJ,0HAA0H;AAC1H,eAAO,MAAM,SAAS,oJAC6H,CAAC;AAEpJ,8IAA8I;AAC9I,eAAO,MAAM,gBAAgB,+YACiX,CAAC;AAE/Y,sIAAsI;AACtI,eAAO,MAAM,SAAS,+FACwE,CAAC;AAE/F,6IAA6I;AAC7I,eAAO,MAAM,aAAa,8CAA8C,CAAC;AAEzE,8IAA8I;AAC9I,eAAO,MAAM,UAAU,oWAC4U,CAAC;AAEpW,mJAAmJ;AACnJ,eAAO,MAAM,gBAAgB,gHACkF,CAAC;AAEhH,6IAA6I;AAC7I,eAAO,MAAM,UAAU,6HACqG,CAAC;AAE7H,kJAAkJ;AAClJ,eAAO,MAAM,QAAQ,yIACmH,CAAC;AAEzI,mJAAmJ;AACnJ,eAAO,MAAM,iBAAiB,iJACkH,CAAC;AAEjJ,wJAAwJ;AACxJ,eAAO,MAAM,SAAS,kDAAkD,CAAC;AAEzE,kJAAkJ;AAClJ,eAAO,MAAM,QAAQ,wCAAwC,CAAC;AAE9D,2JAA2J;AAC3J,eAAO,MAAM,eAAe,sNACyL,CAAC;AAEtN,0HAA0H;AAC1H,eAAO,MAAM,WAAW,EAAE,MAAmB,CAAC;AAE9C,0HAA0H;AAC1H,eAAO,MAAM,SAAS,EAAE,MAAiB,CAAC;AAE1C,0HAA0H;AAC1H,eAAO,MAAM,WAAW,EAAE,MAAmB,CAAC;AAE9C,wLAAwL;AACxL,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -17,26 +17,10 @@ export declare const ICON_EDIT = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25
17
17
  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
18
  /** description — note. */
19
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
- 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";
21
- 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";
22
- /** data_object — JSON. */
23
- 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";
24
- /** code — DSL. */
25
- 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";
26
- /** download — Export. */
27
- export declare const ICON_DOWNLOAD = "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z";
28
- /** share — share link. */
29
- 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";
30
20
  /** storefront — market decorator. */
31
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";
32
22
  /** public — ecosystem decorator. */
33
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";
34
- /** folder_open — open file. */
35
- 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";
36
- /** image — PNG/image. */
37
- 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";
38
- /** note_add — new / clear. */
39
- 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";
40
24
  /** settings — gear (element settings / popup). */
41
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";
42
26
  /** palette — note color. */
@@ -55,18 +39,10 @@ export declare const ICON_CROP_LANDSCAPE = "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2
55
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";
56
40
  /** autorenew — cycle procurement method (build/buy/outsource). */
57
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";
58
- /** aspect_ratio — map size. */
59
- export declare const ICON_ASPECT_RATIO = "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";
60
42
  /** open_in_new — open the element's link in a new tab. */
61
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";
62
44
  /** link — set the element's link (url). */
63
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";
64
- /** menu — hamburger (main menu). */
65
- export declare const ICON_MENU = "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z";
66
- /** add — append component. */
67
- export declare const ICON_ADD = "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z";
68
- /** visibility — eye (show example). */
69
- export declare const ICON_VISIBILITY = "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";
70
46
  /** Draws a 24x24 icon as an SVG group centered on (cx, cy), scaled to `size`. */
71
47
  export declare function drawIcon(path: string, cx: number, cy: number, size: number, fill: string): SVGElement;
72
48
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/draw/icons.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,eAAO,MAAM,WAAW,kHACyF,CAAC;AAClH,eAAO,MAAM,UAAU,sSAC8Q,CAAC;AAEtS,yDAAyD;AACzD,eAAO,MAAM,WAAW,iIACwG,CAAC;AACjI,eAAO,MAAM,kBAAkB,8DAA8D,CAAC;AAC9F,6BAA6B;AAC7B,eAAO,MAAM,iBAAiB,yDAAyD,CAAC;AAC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AAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD"}
1
+ {"version":3,"file":"palette-icons.d.ts","sourceRoot":"","sources":["../../src/draw/palette-icons.ts"],"names":[],"mappings":"AAiDA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4ChD,CAAC;AAQF,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD"}
@@ -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;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAuBT,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASd,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,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AAM,CAIlD,CAAC;AAEF,eAAO,MAAM,IAAI;IACf;;;;;;OAMG;;;;;CAMK,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { Injector } from 'didi';
1
2
  import { default as Canvas } from 'diagram-js/lib/core/Canvas';
2
3
  import { default as EventBus } from 'diagram-js/lib/core/EventBus';
3
4
  import { default as Modeling } from 'diagram-js/lib/features/modeling/Modeling';
@@ -17,12 +18,13 @@ export default class WardleyDrawTool {
17
18
  private readonly selection;
18
19
  private readonly factory;
19
20
  private readonly grid;
21
+ private readonly injector;
20
22
  static $inject: string[];
21
23
  private active;
22
24
  private points;
23
25
  private cursor;
24
26
  private layer;
25
- constructor(canvas: Canvas, eventBus: EventBus, modeling: Modeling, selection: Selection, factory: WardleyElementFactory, grid: EvolutionGrid);
27
+ constructor(canvas: Canvas, eventBus: EventBus, modeling: Modeling, selection: Selection, factory: WardleyElementFactory, grid: EvolutionGrid, injector: Injector);
26
28
  isActive(): boolean;
27
29
  toggle(): void;
28
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"WardleyDrawTool.d.ts","sourceRoot":"","sources":["../../src/draw-tool/WardleyDrawTool.ts"],"names":[],"mappings":"AAMA,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;IAgBhC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QA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CAAC,QAAQ,CAAC,UAAU,CAKzB;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAI1B;IAEF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAaxB;IAEF,OAAO,CAAC,aAAa;IAiDrB,OAAO,CAAC,YAAY;CAMrB"}
@@ -1,3 +1,4 @@
1
+ import { Injector } from 'didi';
1
2
  import { default as Canvas } from 'diagram-js/lib/core/Canvas';
2
3
  import { default as EventBus } from 'diagram-js/lib/core/EventBus';
3
4
  import { default as EvolutionGrid } from '../evolution-grid/EvolutionGrid.js';
@@ -12,11 +13,12 @@ export default class WardleyDrawingHandles {
12
13
  private readonly canvas;
13
14
  private readonly modeling;
14
15
  private readonly grid;
16
+ private readonly injector;
15
17
  static $inject: string[];
16
18
  private shape;
17
19
  private group;
18
20
  private dragPreview;
19
- constructor(eventBus: EventBus, canvas: Canvas, modeling: WardleyModeling, grid: EvolutionGrid);
21
+ constructor(eventBus: EventBus, canvas: Canvas, modeling: WardleyModeling, grid: EvolutionGrid, injector: Injector);
20
22
  private attach;
21
23
  private absolutePoints;
22
24
  private render;
@@ -1 +1 @@
1
- {"version":3,"file":"WardleyDrawingHandles.d.ts","sourceRoot":"","sources":["../../src/draw-tool/WardleyDrawingHandles.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,aAAa,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAOlE;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAQtC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAVvB,MAAM,CAAC,OAAO,WAA8D;IAE5E,OAAO,CAAC,K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