@miragon/team-topologies-renderer 0.11.2 → 0.13.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 +35 -8
- package/dist/TtBaseViewer.d.ts +15 -2
- package/dist/TtBaseViewer.d.ts.map +1 -1
- package/dist/collaborative/CollaborativeTeamTopologies.d.ts +20 -12
- package/dist/collaborative/CollaborativeTeamTopologies.d.ts.map +1 -1
- package/dist/collaborative/index.d.ts +1 -1
- package/dist/collaborative/index.d.ts.map +1 -1
- package/dist/draw/label-layout.d.ts +7 -0
- package/dist/draw/label-layout.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +431 -370
- package/dist/index.js.map +1 -1
- package/dist/io/TtViewport.d.ts +19 -2
- package/dist/io/TtViewport.d.ts.map +1 -1
- package/dist/label-editing/TtLabelEditing.d.ts +2 -2
- package/dist/label-editing/TtLabelEditing.d.ts.map +1 -1
- package/dist/palette/TtPaletteProvider.d.ts +8 -2
- package/dist/palette/TtPaletteProvider.d.ts.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -51,8 +51,13 @@ them together with the zoom panel.
|
|
|
51
51
|
|
|
52
52
|
**Palette from the keyboard.** A host chrome that makes the palette a toolbar (the modeler shell)
|
|
53
53
|
triggers an entry with a click whose `detail` is 0. On a creating entry that click places the
|
|
54
|
-
element in the centre of the free part of the canvas (`
|
|
55
|
-
|
|
54
|
+
element in the centre of the free part of the canvas (`freeArea`, else the centre of the view), 24px
|
|
55
|
+
further diagonally while that spot is taken, selects it and opens its label editor.
|
|
56
|
+
|
|
57
|
+
**Label editor and the view.** A change of the view (a host's `setViewState` or fit, a wheel zoom or
|
|
58
|
+
scroll) never commits an open label editor: it stays open with what was typed and moves with its
|
|
59
|
+
element. Enter, a click or drag on the canvas and leaving the field commit; Escape discards (law L5
|
|
60
|
+
of `@miragon/modeler-api` 1.2).
|
|
56
61
|
|
|
57
62
|
**Read-only lock.** `modeler.get("ttReadOnly").setReadOnly(true)` locks the canvas while the
|
|
58
63
|
document behind it cannot be saved from it (an invalid file in an IDE host): no move, resize,
|
|
@@ -109,7 +114,9 @@ new Modeler({
|
|
|
109
114
|
height?: number | string, // canvas height (default "100%", or "600px" with no container)
|
|
110
115
|
additionalModules?: ModuleDeclaration[], // extra diagram-js modules
|
|
111
116
|
undoRedoKeys?: boolean, // bind Cmd/Ctrl+Z, Shift+Z, Y (default true; false: the host owns the history)
|
|
112
|
-
|
|
117
|
+
freeArea?: { insets: () => FreeAreaInsets } | { center: () => Point | undefined },
|
|
118
|
+
// the canvas part no chrome covers; keyboard creation lands in its centre
|
|
119
|
+
freeRectCenter?: () => Point | undefined, // deprecated since 0.12: freeArea: { center }
|
|
113
120
|
});
|
|
114
121
|
```
|
|
115
122
|
|
|
@@ -132,9 +139,27 @@ await modeler.importText(text); // silent, fitted; rejects without a trace for a
|
|
|
132
139
|
modeler.onContentChanged(() => save(modeler.exportText()));
|
|
133
140
|
```
|
|
134
141
|
|
|
135
|
-
Options:
|
|
136
|
-
|
|
137
|
-
|
|
142
|
+
Options: the contract's `CollaborativeModelerOptions` (1.2) and `additionalModules`:
|
|
143
|
+
|
|
144
|
+
- `freeArea`: the part of the canvas no host chrome covers, `{ insets: () => shell.fitInsets() }`
|
|
145
|
+
(px from the container's edges) or `{ center: () => viewport.freeRectCenter() }` (diagram
|
|
146
|
+
coordinates); keyboard creation lands in its centre. Default: the whole view.
|
|
147
|
+
- `fitOnImport` (default true): a fit of at most 100 % that keeps the palette's strip free after
|
|
148
|
+
every import; a host whose chrome fits the diagram itself passes false.
|
|
149
|
+
- `undoRedoKeys` (default true): false when the host owns the history (VS Code).
|
|
150
|
+
- `freeRectCenter`: deprecated since 0.12, the old name of `freeArea: { center }`; given both,
|
|
151
|
+
`freeArea` wins. It goes in a later minor release.
|
|
152
|
+
|
|
153
|
+
The viewer takes the same options and ignores `freeArea` and `undoRedoKeys`. `modeler.diagram` is
|
|
154
|
+
the wrapped `Modeler`. `elements.bounds(id)` (contract 1.2) returns a team's, interaction's, flow's
|
|
155
|
+
or annotation's box in diagram coordinates from the live canvas, `undefined` for any other id.
|
|
156
|
+
`contentBounds()` (contract 1.3, modeler and viewer) returns the tight box around every element and
|
|
157
|
+
its label text, in diagram coordinates from the live canvas and the same at every zoom and scroll, or
|
|
158
|
+
`undefined` while the diagram has no element. Label text counts where it reaches past its shape (a
|
|
159
|
+
word longer than a line, more lines than the shape holds); like the label wrapping, its width is
|
|
160
|
+
estimated from the characters rather than measured. A host that fits the view itself
|
|
161
|
+
(`fitOnImport: false`) fits to it and adds its own margins; the modeler shell's
|
|
162
|
+
`connectDiagramJs(shell, diagram, { modeler })` does so by default.
|
|
138
163
|
|
|
139
164
|
### Shared methods (`Viewer` / `NavigatedViewer` / `Modeler`)
|
|
140
165
|
|
|
@@ -142,6 +167,7 @@ itself passes false). `modeler.diagram` is the wrapped `Modeler`.
|
|
|
142
167
|
| ---------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
143
168
|
| `importDocument(doc, { fit? })` | `{ warnings: ImportWarning[] }` | Replace canvas content, reset undo history; fit unless `fit: false`. Throws, before anything changes, for ids that would collide. |
|
|
144
169
|
| `fitToView()` | `void` | Deprecated: fit every element, keeping the strip under the palette free. |
|
|
170
|
+
| `contentBounds()` | `ElementBounds \| undefined` | The tight box around every element and its label text in diagram coordinates (contract 1.3), `undefined` without elements. |
|
|
145
171
|
| `exportDocument()` | `TtDocument` | Rebuild the canonical model from the live canvas. |
|
|
146
172
|
| `saveSVG()` | `{ svg: string }` | Self-contained SVG snapshot (fitted viewBox). |
|
|
147
173
|
| `setMeta(partial)` / `getMeta()` | — / `RootBusinessObject` | Read/write diagram-level metadata (`title`); `setMeta` is deprecated, rename with `get("ttModeling").setTitle(title)` (one undo step). |
|
|
@@ -174,8 +200,9 @@ itself passes false). `modeler.diagram` is the wrapped `Modeler`.
|
|
|
174
200
|
from two `data:` URLs (`GEIST_UNICODE_RANGES` holds their subsets), and `embedSvgStyles(svg, css)`
|
|
175
201
|
puts CSS at the top of a `saveSVG()` result, so a rasterised PNG keeps the canvas typeface.
|
|
176
202
|
- **Other:** `TtViewerOptions`, `ImportOptions`, `ImportWarning`, `RootBusinessObject`, `ROOT_ID`,
|
|
177
|
-
`saveSVG`, `TtReadOnly` and `READ_ONLY_CHANGED_EVENT` (the lock, DI name `ttReadOnly`), and
|
|
178
|
-
|
|
203
|
+
`saveSVG`, `TtReadOnly` and `READ_ONLY_CHANGED_EVENT` (the lock, DI name `ttReadOnly`), and
|
|
204
|
+
`TtViewport` (DI name `ttViewport`: `contentBounds()` and the deprecated palette-aware fit behind
|
|
205
|
+
`fitToView()`).
|
|
179
206
|
|
|
180
207
|
## How it's built
|
|
181
208
|
|
package/dist/TtBaseViewer.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
import { ElementBounds, FreeArea } from '@miragon/modeler-api';
|
|
2
3
|
import { TtDocument } from '@miragon/team-topologies-schema-model';
|
|
3
4
|
import { ImportWarning, RootBusinessObject } from './io/types.js';
|
|
4
5
|
import { Point } from './palette/TtPaletteProvider.js';
|
|
@@ -16,8 +17,14 @@ export interface TtViewerOptions {
|
|
|
16
17
|
undoRedoKeys?: boolean | undefined;
|
|
17
18
|
/**
|
|
18
19
|
* Where Enter or Space on a creating palette entry places the element (guide §5.5): the centre
|
|
19
|
-
* of the part of the canvas no chrome covers,
|
|
20
|
-
*
|
|
20
|
+
* of the part of the canvas no chrome covers, given as its insets in px from the container's
|
|
21
|
+
* edges (`{ insets }`) or as that centre in diagram coordinates (`{ center }`). Without it, the
|
|
22
|
+
* centre of the visible canvas.
|
|
23
|
+
*/
|
|
24
|
+
freeArea?: FreeArea | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Since 0.12, the `@miragon/modeler-api` 1.2 name is `freeArea: { center }`; given
|
|
27
|
+
* both, `freeArea` wins. Accepted for one more minor release.
|
|
21
28
|
*/
|
|
22
29
|
freeRectCenter?: (() => Point | undefined) | undefined;
|
|
23
30
|
}
|
|
@@ -63,6 +70,12 @@ export declare abstract class TtBaseViewer {
|
|
|
63
70
|
*/
|
|
64
71
|
fitToView(): void;
|
|
65
72
|
private _fit;
|
|
73
|
+
/**
|
|
74
|
+
* The tight box around the diagram's content in diagram coordinates (`contentBounds()` of
|
|
75
|
+
* `@miragon/modeler-api` 1.3), or `undefined` while the canvas shows no element. A host's fit
|
|
76
|
+
* adds its own margins; zoom and scroll leave the box alone.
|
|
77
|
+
*/
|
|
78
|
+
contentBounds(): ElementBounds | undefined;
|
|
66
79
|
/** Current canvas state as a canonical document. */
|
|
67
80
|
exportDocument(): TtDocument;
|
|
68
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TtBaseViewer.d.ts","sourceRoot":"","sources":["../src/TtBaseViewer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAM9C,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAK5F,OAAO,EAAW,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAQ5D,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC
|
|
1
|
+
{"version":3,"file":"TtBaseViewer.d.ts","sour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ementBounds, ElementsSurface } from '@miragon/modeler-api';
|
|
2
2
|
import { TtDocument } from '@miragon/team-topologies-schema-model';
|
|
3
3
|
import { ModuleDeclaration } from 'didi';
|
|
4
4
|
import { Modeler } from '../Modeler.js';
|
|
@@ -6,28 +6,36 @@ import { NavigatedViewer } from '../NavigatedViewer.js';
|
|
|
6
6
|
import { Point } from '../palette/TtPaletteProvider.js';
|
|
7
7
|
/** Stable notation id in `meta.notation` of the collaborative-modeler contract. */
|
|
8
8
|
export declare const TEAM_TOPOLOGIES_NOTATION = "team-topologies";
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The contract's factory options (`freeArea`, `fitOnImport`, `undoRedoKeys`; the viewer ignores
|
|
11
|
+
* `freeArea` and `undoRedoKeys`) plus the renderer's own.
|
|
12
|
+
*/
|
|
13
|
+
export interface CollaborativeTeamTopologiesOptions extends CollaborativeModelerOptions {
|
|
10
14
|
/** Appended to the renderer's own modules (e.g. a host's chrome module). */
|
|
11
15
|
additionalModules?: ModuleDeclaration[] | undefined;
|
|
12
|
-
/** See `TtViewerOptions.undoRedoKeys` (default true). */
|
|
13
|
-
undoRedoKeys?: boolean | undefined;
|
|
14
|
-
/** See `TtViewerOptions.freeRectCenter`. */
|
|
15
|
-
freeRectCenter?: (() => Point | undefined) | undefined;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* @deprecated Since 0.12, the contract's name is `freeArea: { center }`; given both, `freeArea`
|
|
18
|
+
* wins. Accepted for one more minor release.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
freeRectCenter?: (() => Point | undefined) | undefined;
|
|
21
21
|
}
|
|
22
|
-
/** The
|
|
22
|
+
/** The elements surface with the optional `bounds` of contract 1.2, which this renderer has. */
|
|
23
|
+
export interface TtElementsSurface extends ElementsSurface {
|
|
24
|
+
bounds(id: string): ElementBounds | undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The contract surface, with the optional `contentBounds` of contract 1.3, which this renderer
|
|
28
|
+
* has, plus the wrapped diagram for host-specific wiring.
|
|
29
|
+
*/
|
|
23
30
|
export interface CollaborativeTeamTopologiesModeler extends CollaborativeModeler {
|
|
24
|
-
readonly elements:
|
|
31
|
+
readonly elements: TtElementsSurface;
|
|
25
32
|
readonly diagram: Modeler | NavigatedViewer;
|
|
33
|
+
contentBounds(): ElementBounds | undefined;
|
|
26
34
|
}
|
|
27
35
|
/** The editing mount (`meta.editable: true`) of the collaborative-modeler contract. */
|
|
28
36
|
export declare function createCollaborativeModeler(options?: CollaborativeTeamTopologiesOptions): CollaborativeTeamTopologiesModeler;
|
|
29
37
|
/** The read-only mount (`meta.editable: false`): imports, exports and reveals, never edits. */
|
|
30
|
-
export declare function createCollaborativeViewer(options?:
|
|
38
|
+
export declare function createCollaborativeViewer(options?: CollaborativeTeamTopologiesOptions): CollaborativeTeamTopologiesModeler;
|
|
31
39
|
/**
|
|
32
40
|
* The document text as the contract reads it: blank text is a new, empty diagram (a file just
|
|
33
41
|
* created in an editor), anything else must be a valid document.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollaborativeTeamTopologies.d.ts","sourceRoot":"","sources":["../../src/collaborative/CollaborativeTeamTopologies.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CollaborativeTeamTopologies.d.ts","sourceRoot":"","sources":["../../src/collaborative/CollaborativeTeamTopologies.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,aAAa,EAElB,KAAK,eAAe,EAGrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAK9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAE7D,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,kCAAmC,SAAQ,2BAA2B;IACrF,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IACpD;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;CACxD;AAED,gGAAgG;AAChG,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CAC/C;AAED;;;GAGG;AACH,MAAM,WAAW,kCAAmC,SAAQ,oBAAoB;IAC9E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC;IAC5C,aAAa,IAAI,aAAa,GAAG,SAAS,CAAC;CAC5C;AASD,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,kCAAuC,GAC/C,kCAAkC,CAWpC;AAED,+FAA+F;AAC/F,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,kCAAuC,GAC/C,kCAAkC,CAMpC;AAMD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAI1D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TEAM_TOPOLOGIES_NOTATION, createCollaborativeModeler, createCollaborativeViewer, parseDocumentText, type CollaborativeTeamTopologiesModeler, type CollaborativeTeamTopologiesOptions, } from './CollaborativeTeamTopologies.js';
|
|
1
|
+
export { TEAM_TOPOLOGIES_NOTATION, createCollaborativeModeler, createCollaborativeViewer, parseDocumentText, type CollaborativeTeamTopologiesModeler, type CollaborativeTeamTopologiesOptions, type TtElementsSurface, } from './CollaborativeTeamTopologies.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/collaborative/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/collaborative/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACvC,KAAK,iBAAiB,GACvB,MAAM,kCAAkC,CAAC"}
|
|
@@ -30,4 +30,11 @@ export declare function labelLayout(element: TtElement): LabelLayout;
|
|
|
30
30
|
* result is identical on every platform and exported SVGs stay stable.
|
|
31
31
|
*/
|
|
32
32
|
export declare function wrapLabel(text: string, maxWidth: number, fontSize: number): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Where the element's wrapped label is drawn, relative to the element's top-left corner, or
|
|
35
|
+
* `undefined` without text. A word longer than a line, or more lines than the shape holds, reach
|
|
36
|
+
* past the shape, and the editor does not grow it. Estimated from the characters like the wrapping
|
|
37
|
+
* rather than measured, so it is the same at every zoom.
|
|
38
|
+
*/
|
|
39
|
+
export declare function labelTextBox(element: TtElement): LabelBox | undefined;
|
|
33
40
|
//# sourceMappingURL=label-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-layout.d.ts","sourceRoot":"","sources":["../../src/draw/label-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAIL,KAAK,SAAS,EAGf,MAAM,sBAAsB,CAAC;AAO9B,eAAO,MAAM,WAAW,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"label-layout.d.ts","sourceRoot":"","sources":["../../src/draw/label-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAIL,KAAK,SAAS,EAGf,MAAM,sBAAsB,CAAC;AAO9B,eAAO,MAAM,WAAW,MAAM,CAAC;AAI/B,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,mFAAmF;IACnF,GAAG,EAAE,QAAQ,CAAC;IACd,qGAAqG;IACrG,KAAK,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAsCD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,MAAM,CASpE;AAWD,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,GAAG,WAAW,CAsC3D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBpF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAcrE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { Modeler } from './Modeler.js';
|
|
|
4
4
|
export { TtBaseViewer } from './TtBaseViewer.js';
|
|
5
5
|
export type { TtViewerOptions, ImportOptions, EventCallback } from './TtBaseViewer.js';
|
|
6
6
|
export { TEAM_TOPOLOGIES_NOTATION, createCollaborativeModeler, createCollaborativeViewer, parseDocumentText, } from './collaborative/index.js';
|
|
7
|
-
export type { CollaborativeTeamTopologiesModeler, CollaborativeTeamTopologiesOptions, } from './collaborative/index.js';
|
|
7
|
+
export type { CollaborativeTeamTopologiesModeler, CollaborativeTeamTopologiesOptions, TtElementsSurface, } from './collaborative/index.js';
|
|
8
8
|
export { ttModelModule, TtElementFactory } from './model/index.js';
|
|
9
9
|
export { ttDrawModule, TeamTopologiesRenderer } from './draw/index.js';
|
|
10
10
|
export { ioModule, TtImporter, TtExporter, TtViewport, saveSVG, ROOT_ID } from './io/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvF,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,kCAAkC,EAClC,kCAAkC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE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