@miragon/wardley-renderer 0.9.1 → 0.10.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.
- package/README.md +11 -6
- package/dist/collaborative/CollaborativeWardley.d.ts +5 -1
- package/dist/collaborative/CollaborativeWardley.d.ts.map +1 -1
- package/dist/index.js +367 -356
- package/dist/index.js.map +1 -1
- package/dist/map-menu/menu.d.ts +2 -0
- package/dist/map-menu/menu.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -107,11 +107,16 @@ size preview (an undo pressed mid-drag, a title the host sets) puts the preview
|
|
|
107
107
|
drag then ends without resizing, so the history stays in step with the document. `elements` names
|
|
108
108
|
components, anchors, pipelines, submaps and accelerators by the id the document gives them
|
|
109
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. `
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
the
|
|
114
|
-
without
|
|
110
|
+
box in diagram coordinates; `getViewState` and `setViewState` carry the viewbox. `contentBounds()`
|
|
111
|
+
(contract 1.3) gives the box a host fits the view to, in diagram coordinates and without padding:
|
|
112
|
+
the plot with its axes and everything drawn beyond it (a long label at the commodity edge, a note in
|
|
113
|
+
the margin), the box the pan constraint keeps in view. It follows every edit at once and stays the
|
|
114
|
+
same across zoom and scroll. A map without elements still has its plot, so it is never `undefined`
|
|
115
|
+
while the modeler lives (before the first import it is the default plot); tell an empty map by its
|
|
116
|
+
elements. `diagram` is the wrapped `Modeler` or `NavigatedViewer` for host-specific wiring. Both
|
|
117
|
+
factories take the options above (`additionalModules`, `freeArea`, `fitOnImport`, `undoRedoKeys`
|
|
118
|
+
and the deprecated aliases); the viewer never edits and ignores the undo keys. Both pass the
|
|
119
|
+
contract's conformance kit (1.3) without skips.
|
|
115
120
|
|
|
116
121
|
### Menu entries and dialogs for a host's chrome
|
|
117
122
|
|
|
@@ -124,7 +129,7 @@ title…" dialog (one undo step on Apply, nothing for an unchanged title),
|
|
|
124
129
|
`createShortcutsDialog(chrome, options)` the "Keyboard shortcuts…" dialog and
|
|
125
130
|
`mapShortcuts(chrome, options)` its table. A web app that binds Cmd/Ctrl+O, Cmd/Ctrl+S, Cmd/Ctrl+V
|
|
126
131
|
on the canvas and `?` itself passes `{ fileKeys: true, shortcutsKey: '?' }`, so the dialog lists
|
|
127
|
-
them too.
|
|
132
|
+
them too, and `mapMenu({ …, shortcutsKey: '?' })` shows the key's chip on "Keyboard shortcuts…".
|
|
128
133
|
`createMapDialog(chrome, parts)` is the modal dialog all of them share (guide §8: header with Close,
|
|
129
134
|
scrolling body, footer), for a host's own dialogs in the same look; `dialogButton(label, variant)`
|
|
130
135
|
gives its buttons. `chrome` is the shell handle or anything of the same shape; the renderer never
|
|
@@ -23,10 +23,14 @@ export interface CollaborativeWardleyOptions extends CollaborativeModelerOptions
|
|
|
23
23
|
export interface WardleyElementsSurface extends ElementsSurface {
|
|
24
24
|
bounds(id: string): ElementBounds | undefined;
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* The contract surface, with the optional `contentBounds` of contract 1.3 always present, plus the
|
|
28
|
+
* wrapped diagram for host-specific wiring.
|
|
29
|
+
*/
|
|
27
30
|
export interface CollaborativeWardleyModeler extends CollaborativeModeler {
|
|
28
31
|
readonly elements: WardleyElementsSurface;
|
|
29
32
|
readonly diagram: Modeler | NavigatedViewer;
|
|
33
|
+
contentBounds(): ElementBounds | undefined;
|
|
30
34
|
}
|
|
31
35
|
/** The editing mount (`meta.editable: true`) of the collaborative-modeler contract. */
|
|
32
36
|
export declare function createCollaborativeModeler(options?: CollaborativeWardleyOptions): CollaborativeWardleyModeler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollaborativeWardley.d.ts","sourceRoot":"","sources":["../../src/collaborative/CollaborativeWardley.ts"],"names":[],"mappings":"AAAA,OAAO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