@miragon/value-chain-renderer 0.0.0-stage → 0.0.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 +66 -2
- package/dist/Modeler.d.ts +11 -0
- package/dist/Modeler.d.ts.map +1 -0
- package/dist/NavigatedViewer.d.ts +7 -0
- package/dist/NavigatedViewer.d.ts.map +1 -0
- package/dist/VcBaseViewer.d.ts +45 -0
- package/dist/VcBaseViewer.d.ts.map +1 -0
- package/dist/Viewer.d.ts +7 -0
- package/dist/Viewer.d.ts.map +1 -0
- package/dist/append/VcAppend.d.ts +25 -0
- package/dist/append/VcAppend.d.ts.map +1 -0
- package/dist/append/VcAutoPlaceBehavior.d.ts +24 -0
- package/dist/append/VcAutoPlaceBehavior.d.ts.map +1 -0
- package/dist/append/VcCreatePreviewBehavior.d.ts +9 -0
- package/dist/append/VcCreatePreviewBehavior.d.ts.map +1 -0
- package/dist/append/index.d.ts +4 -0
- package/dist/append/index.d.ts.map +1 -0
- package/dist/connect/VcConnect.d.ts +17 -0
- package/dist/connect/VcConnect.d.ts.map +1 -0
- package/dist/connect/index.d.ts +4 -0
- package/dist/connect/index.d.ts.map +1 -0
- package/dist/context-pad/VcContextPadProvider.d.ts +28 -0
- package/dist/context-pad/VcContextPadProvider.d.ts.map +1 -0
- package/dist/context-pad/index.d.ts +4 -0
- package/dist/context-pad/index.d.ts.map +1 -0
- package/dist/copy-paste/VcCopyPasteBehavior.d.ts +10 -0
- package/dist/copy-paste/VcCopyPasteBehavior.d.ts.map +1 -0
- package/dist/copy-paste/index.d.ts +4 -0
- package/dist/copy-paste/index.d.ts.map +1 -0
- package/dist/draw/VcRenderer.d.ts +17 -0
- package/dist/draw/VcRenderer.d.ts.map +1 -0
- package/dist/draw/geometry.d.ts +18 -0
- package/dist/draw/geometry.d.ts.map +1 -0
- package/dist/draw/icons.d.ts +24 -0
- package/dist/draw/icons.d.ts.map +1 -0
- package/dist/draw/index.d.ts +7 -0
- package/dist/draw/index.d.ts.map +1 -0
- package/dist/draw/styles.d.ts +21 -0
- package/dist/draw/styles.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1432 -0
- package/dist/index.js.map +1 -0
- package/dist/io/VcExporter.d.ts +16 -0
- package/dist/io/VcExporter.d.ts.map +1 -0
- package/dist/io/VcImporter.d.ts +25 -0
- package/dist/io/VcImporter.d.ts.map +1 -0
- package/dist/io/index.d.ts +8 -0
- package/dist/io/index.d.ts.map +1 -0
- package/dist/io/saveSvg.d.ts +11 -0
- package/dist/io/saveSvg.d.ts.map +1 -0
- package/dist/io/types.d.ts +10 -0
- package/dist/io/types.d.ts.map +1 -0
- package/dist/keyboard/VcEditorActions.d.ts +8 -0
- package/dist/keyboard/VcEditorActions.d.ts.map +1 -0
- package/dist/keyboard/VcKeyboardBindings.d.ts +11 -0
- package/dist/keyboard/VcKeyboardBindings.d.ts.map +1 -0
- package/dist/keyboard/index.d.ts +6 -0
- package/dist/keyboard/index.d.ts.map +1 -0
- package/dist/label-editing/VcLabelEditingProvider.d.ts +38 -0
- package/dist/label-editing/VcLabelEditingProvider.d.ts.map +1 -0
- package/dist/label-editing/index.d.ts +4 -0
- package/dist/label-editing/index.d.ts.map +1 -0
- package/dist/model/VcDiagramElementFactory.d.ts +20 -0
- package/dist/model/VcDiagramElementFactory.d.ts.map +1 -0
- package/dist/model/VcElementFactory.d.ts +23 -0
- package/dist/model/VcElementFactory.d.ts.map +1 -0
- package/dist/model/di-types.d.ts +29 -0
- package/dist/model/di-types.d.ts.map +1 -0
- package/dist/model/index.d.ts +10 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/modeling/VcConnectionTypeBehavior.d.ts +13 -0
- package/dist/modeling/VcConnectionTypeBehavior.d.ts.map +1 -0
- package/dist/modeling/VcHierarchyRelayoutBehavior.d.ts +18 -0
- package/dist/modeling/VcHierarchyRelayoutBehavior.d.ts.map +1 -0
- package/dist/modeling/VcLayouter.d.ts +66 -0
- package/dist/modeling/VcLayouter.d.ts.map +1 -0
- package/dist/modeling/VcModeling.d.ts +16 -0
- package/dist/modeling/VcModeling.d.ts.map +1 -0
- package/dist/modeling/cmd/UpdatePropertiesHandler.d.ts +15 -0
- package/dist/modeling/cmd/UpdatePropertiesHandler.d.ts.map +1 -0
- package/dist/modeling/index.d.ts +11 -0
- package/dist/modeling/index.d.ts.map +1 -0
- package/dist/ordering/VcOrderingProvider.d.ts +13 -0
- package/dist/ordering/VcOrderingProvider.d.ts.map +1 -0
- package/dist/ordering/index.d.ts +4 -0
- package/dist/ordering/index.d.ts.map +1 -0
- package/dist/palette/VcPaletteProvider.d.ts +32 -0
- package/dist/palette/VcPaletteProvider.d.ts.map +1 -0
- package/dist/palette/index.d.ts +4 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/popup/VcAlignMenuProvider.d.ts +21 -0
- package/dist/popup/VcAlignMenuProvider.d.ts.map +1 -0
- package/dist/popup/VcColorPickerProvider.d.ts +18 -0
- package/dist/popup/VcColorPickerProvider.d.ts.map +1 -0
- package/dist/popup/index.d.ts +6 -0
- package/dist/popup/index.d.ts.map +1 -0
- package/dist/resize/VcResizeBehavior.d.ts +7 -0
- package/dist/resize/VcResizeBehavior.d.ts.map +1 -0
- package/dist/resize/index.d.ts +4 -0
- package/dist/resize/index.d.ts.map +1 -0
- package/dist/rules/VcRules.d.ts +15 -0
- package/dist/rules/VcRules.d.ts.map +1 -0
- package/dist/rules/index.d.ts +4 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/value-chain.css +2 -0
- package/package.json +60 -4
package/README.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @miragon/value-chain-renderer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@miragon/value-chain-renderer)
|
|
4
|
+
[](https://github.com/Miragon/value-chain-modeler/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
Viewer and editor for value chain diagrams (ARIS-style _Wertschöpfungskettendiagramme_), built on
|
|
7
|
+
[diagram-js](https://github.com/bpmn-io/diagram-js) with the look & feel of
|
|
8
|
+
[bpmn.io](https://bpmn.io/). Framework-agnostic: mount it into any element. The
|
|
9
|
+
[Value Chain Modeler](https://github.com/Miragon/value-chain-modeler) web app and VS Code extension
|
|
10
|
+
both wrap this package.
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @miragon/value-chain-renderer @miragon/value-chain-schema-model
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM only, for browsers and bundlers.
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { Modeler } from '@miragon/value-chain-renderer';
|
|
26
|
+
import '@miragon/value-chain-renderer/assets/value-chain.css';
|
|
27
|
+
import { createEmptyDocument } from '@miragon/value-chain-schema-model';
|
|
28
|
+
|
|
29
|
+
const modeler = new Modeler({ container: document.querySelector('#canvas')! });
|
|
30
|
+
modeler.importDocument(createEmptyDocument('My value chain'));
|
|
31
|
+
|
|
32
|
+
modeler.on('commandStack.changed', () => {
|
|
33
|
+
const doc = modeler.exportDocument(); // ValueChainDocument
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const { svg } = modeler.saveSVG(); // standalone SVG
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The stylesheet is required: it includes diagram-js' own CSS and styles the palette, context pad and
|
|
40
|
+
label editor.
|
|
41
|
+
|
|
42
|
+
## Entry points
|
|
43
|
+
|
|
44
|
+
| Class | Use it for |
|
|
45
|
+
| ----------------- | ------------------------------------------------------------------- |
|
|
46
|
+
| `Viewer` | Read-only rendering. |
|
|
47
|
+
| `NavigatedViewer` | Read-only plus zoom and pan. |
|
|
48
|
+
| `Modeler` | The full editor, plus `undo()` / `redo()` on top of the shared API. |
|
|
49
|
+
|
|
50
|
+
All three take `{ container?, width?, height?, additionalModules? }` and share `importDocument`,
|
|
51
|
+
`exportDocument`, `saveSVG`, `fitViewport`, `clear`, `attachTo`, `detach`, `destroy`, `on`/`off`
|
|
52
|
+
and `get` (DI lookup). `additionalModules` extends the DI container as in bpmn-js; the feature
|
|
53
|
+
modules (`vcDrawModule`, `vcRulesModule`, `vcPaletteModule`, …) are exported to build custom
|
|
54
|
+
setups.
|
|
55
|
+
|
|
56
|
+
## Notation
|
|
57
|
+
|
|
58
|
+
- **Step**: right-pointing chevron.
|
|
59
|
+
- **Organizational unit**: ellipse, assigned to a step.
|
|
60
|
+
- **is predecessor of** (`sequence`): dashed edge with an arrowhead.
|
|
61
|
+
- **is process-oriented superior** (`hierarchy`): solid edge with an arrowhead, routed as vertical
|
|
62
|
+
drops for a row of sub-steps or as the ARIS rake for a column.
|
|
63
|
+
- **assignment**: plain solid edge between an organizational unit and a step.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
[MIT](https://github.com/Miragon/value-chain-modeler/blob/main/LICENSE)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
import { NavigatedViewer } from './NavigatedViewer.js';
|
|
3
|
+
/** The full value chain editor. */
|
|
4
|
+
export declare class Modeler extends NavigatedViewer {
|
|
5
|
+
protected _getModules(): ModuleDeclaration[];
|
|
6
|
+
undo(): void;
|
|
7
|
+
redo(): void;
|
|
8
|
+
canUndo(): boolean;
|
|
9
|
+
canRedo(): boolean;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Modeler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modeler.d.ts","sourceRoot":"","sources":["../src/Modeler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAW9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAcvD,mCAAmC;AACnC,qBAAa,OAAQ,SAAQ,eAAe;cACvB,WAAW,IAAI,iBAAiB,EAAE;IA8BrD,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,OAAO;CAGnB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
import { Viewer } from './Viewer.js';
|
|
3
|
+
/** Viewer plus canvas navigation (zoom, pan, selection). */
|
|
4
|
+
export declare class NavigatedViewer extends Viewer {
|
|
5
|
+
protected _getModules(): ModuleDeclaration[];
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=NavigatedViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigatedViewer.d.ts","sourceRoot":"","sources":["../src/NavigatedViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,4DAA4D;AAC5D,qBAAa,eAAgB,SAAQ,MAAM;cACtB,WAAW,IAAI,iBAAiB,EAAE;CAGtD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
import { EventBusEventCallback } from 'diagram-js/lib/core/EventBus';
|
|
3
|
+
import { ValueChainDocument } from '@miragon/value-chain-schema-model';
|
|
4
|
+
import { ImportWarning } from './io/types.js';
|
|
5
|
+
export interface VcViewerOptions {
|
|
6
|
+
/** Host element. If missing, a detached <div> is created (attach later via attachTo). */
|
|
7
|
+
container?: HTMLElement;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
height?: number | string;
|
|
10
|
+
/** Concatenated to the end of the module list (extension point). */
|
|
11
|
+
additionalModules?: ModuleDeclaration[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* DI bootstrap and lifecycle shared by Viewer/NavigatedViewer/Modeler. The diagram is
|
|
15
|
+
* created lazily on first access; `_getModules()` is a method (not a class field) to
|
|
16
|
+
* avoid subclass field-initialization-order problems.
|
|
17
|
+
*/
|
|
18
|
+
export declare abstract class VcBaseViewer {
|
|
19
|
+
protected abstract _getModules(): ModuleDeclaration[];
|
|
20
|
+
private _diagram;
|
|
21
|
+
private readonly _container;
|
|
22
|
+
private readonly _options;
|
|
23
|
+
constructor(options?: VcViewerOptions);
|
|
24
|
+
get container(): HTMLElement;
|
|
25
|
+
get<T>(name: string): T;
|
|
26
|
+
/** Like get(), but returns null instead of throwing when the service is absent. */
|
|
27
|
+
getOptional<T>(name: string): T | null;
|
|
28
|
+
on<T = unknown>(event: string, callback: EventBusEventCallback<T>, priority?: number): void;
|
|
29
|
+
off<T = unknown>(event: string, callback: EventBusEventCallback<T>): void;
|
|
30
|
+
/** Replaces the current diagram contents; clears the undo history. */
|
|
31
|
+
importDocument(document: ValueChainDocument): ImportWarning[];
|
|
32
|
+
exportDocument(): ValueChainDocument;
|
|
33
|
+
saveSVG(): {
|
|
34
|
+
svg: string;
|
|
35
|
+
};
|
|
36
|
+
/** Zooms to fit the diagram, never above 100%. */
|
|
37
|
+
fitViewport(): void;
|
|
38
|
+
clear(): void;
|
|
39
|
+
attachTo(target: HTMLElement): void;
|
|
40
|
+
detach(): void;
|
|
41
|
+
destroy(): void;
|
|
42
|
+
private _createContainer;
|
|
43
|
+
private _ensureDiagram;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=VcBaseViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcBaseViewer.d.ts","sourceRoot":"","sources":["../src/VcBaseViewer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAI5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,MAAM,WAAW,eAAe;IAC9B,yFAAyF;IACzF,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAMD;;;;GAIG;AACH,8BAAsB,YAAY;IAChC,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,iBAAiB,EAAE;IAErD,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;gBAE/B,OAAO,GAAE,eAAoB;IAKzC,IAAI,SAAS,IAAI,WAAW,CAE3B;IAED,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IAIvB,mFAAmF;IACnF,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAItC,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,QAAQ,SAAO,GAAG,IAAI;IAIzF,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI;IAIzE,sEAAsE;IACtE,cAAc,CAAC,QAAQ,EAAE,kBAAkB,GAAG,aAAa,EAAE;IAU7D,cAAc,IAAI,kBAAkB;IAIpC,OAAO,IAAI;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;IAI1B,kDAAkD;IAClD,WAAW,IAAI,IAAI;IAYnB,KAAK,IAAI,IAAI;IAKb,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAMnC,MAAM,IAAI,IAAI;IAId,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,cAAc;CAOvB"}
|
package/dist/Viewer.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
import { VcBaseViewer } from './VcBaseViewer.js';
|
|
3
|
+
/** Read-only rendering of value chain documents. */
|
|
4
|
+
export declare class Viewer extends VcBaseViewer {
|
|
5
|
+
protected _getModules(): ModuleDeclaration[];
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Viewer.d.ts","sourceRoot":"","sources":["../src/Viewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKjD,oDAAoD;AACpD,qBAAa,MAAO,SAAQ,YAAY;IACtC,SAAS,CAAC,WAAW,IAAI,iBAAiB,EAAE;CAG7C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as AutoPlace } from 'diagram-js/lib/features/auto-place/AutoPlace';
|
|
2
|
+
import { default as Create } from 'diagram-js/lib/features/create/Create';
|
|
3
|
+
import { Shape } from 'diagram-js/lib/model/Types';
|
|
4
|
+
import { ConnectionType } from '@miragon/value-chain-schema-model';
|
|
5
|
+
import { default as VcElementFactory } from '../model/VcElementFactory.js';
|
|
6
|
+
import { default as VcConnect } from '../connect/VcConnect.js';
|
|
7
|
+
import { VcShape } from '../model/di-types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Append interactions à la bpmn.io: click places the new element automatically
|
|
10
|
+
* (auto-place, label editing opens via the label-editing provider); dragging places
|
|
11
|
+
* it manually with a live connection preview. `assignment` appends an organizational
|
|
12
|
+
* unit; the other types append a step.
|
|
13
|
+
*/
|
|
14
|
+
export default class VcAppend {
|
|
15
|
+
private readonly autoPlace;
|
|
16
|
+
private readonly create;
|
|
17
|
+
private readonly factory;
|
|
18
|
+
private readonly vcConnect;
|
|
19
|
+
static $inject: string[];
|
|
20
|
+
constructor(autoPlace: AutoPlace, create: Create, factory: VcElementFactory, vcConnect: VcConnect);
|
|
21
|
+
append(source: VcShape, type: ConnectionType): Shape;
|
|
22
|
+
startAppendDrag(event: Event, source: VcShape, type: ConnectionType): void;
|
|
23
|
+
private createShape;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=VcAppend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcAppend.d.ts","sourceRoot":"","sources":["../../src/append/VcAppend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,QAAQ;IAIzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAN5B,MAAM,CAAC,OAAO,WAA4D;gBAGvD,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,SAAS;IAGvC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,KAAK;IASpD,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IAO1E,OAAO,CAAC,WAAW;CAGpB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as ElementRegistry } from 'diagram-js/lib/core/ElementRegistry';
|
|
2
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
3
|
+
import { default as VcConnect } from '../connect/VcConnect.js';
|
|
4
|
+
/**
|
|
5
|
+
* Placement of appended steps:
|
|
6
|
+
* - sequence: to the right of the source (reading direction),
|
|
7
|
+
* - hierarchy: follows the existing arrangement of the parent's sub-steps — a
|
|
8
|
+
* horizontal row keeps growing to the right, a vertical column (ARIS rake,
|
|
9
|
+
* the default) keeps growing downwards.
|
|
10
|
+
* All placements nudge downwards until the spot is free of other steps.
|
|
11
|
+
*/
|
|
12
|
+
export default class VcAutoPlaceBehavior {
|
|
13
|
+
static $inject: string[];
|
|
14
|
+
constructor(eventBus: EventBus, vcConnect: VcConnect, elementRegistry: ElementRegistry);
|
|
15
|
+
private readonly elementRegistry;
|
|
16
|
+
private desiredPosition;
|
|
17
|
+
private sequencePosition;
|
|
18
|
+
/** Organizational units sit centered below their step (Wikipedia notation). */
|
|
19
|
+
private assignmentPosition;
|
|
20
|
+
private hierarchyPosition;
|
|
21
|
+
/** Nudges the position downwards until the new shape overlaps no existing step. */
|
|
22
|
+
private deconflict;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=VcAutoPlaceBehavior.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcAutoPlaceBehavior.d.ts","sourceRoot":"","sources":["../../src/append/VcAutoPlaceBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAKzD,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AAarD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC,MAAM,CAAC,OAAO,WAAgD;gBAElD,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe;IAkBtF,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAElD,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,gBAAgB;IAOxB,+EAA+E;IAC/E,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,iBAAiB;IAwBzB,mFAAmF;IACnF,OAAO,CAAC,UAAU;CAwBnB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
2
|
+
/** Drag-append UX: live connection preview from the source while dragging a new step. */
|
|
3
|
+
export default class VcCreatePreviewBehavior {
|
|
4
|
+
static $inject: string[];
|
|
5
|
+
constructor(injector: {
|
|
6
|
+
get<T>(name: string, strict: boolean): T | null;
|
|
7
|
+
}, eventBus: EventBus);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=VcCreatePreviewBehavior.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcCreatePreviewBehavior.d.ts","sourceRoot":"","sources":["../../src/append/VcCreatePreviewBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAmBzD,yFAAyF;AACzF,MAAM,CAAC,OAAO,OAAO,uBAAuB;IAC1C,MAAM,CAAC,OAAO,WAA4B;gBAE9B,QAAQ,EAAE;QAAE,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,CAAC,GAAG,IAAI,CAAA;KAAE,EAAE,QAAQ,EAAE,QAAQ;CA4B9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/append/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAQ9C,eAAO,MAAM,cAAc,EAAE,iBAM5B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as Connect } from 'diagram-js/lib/features/connect/Connect';
|
|
2
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
3
|
+
import { ConnectionType } from '@miragon/value-chain-schema-model';
|
|
4
|
+
import { VcShape } from '../model/di-types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Typed wrapper around the diagram-js connect interaction. The rule provider reads
|
|
7
|
+
* `pendingType` while a connect/create drag is running to stamp the right connection
|
|
8
|
+
* type; it resets to the default once the interaction is over.
|
|
9
|
+
*/
|
|
10
|
+
export default class VcConnect {
|
|
11
|
+
private readonly connect;
|
|
12
|
+
static $inject: string[];
|
|
13
|
+
pendingType: ConnectionType;
|
|
14
|
+
constructor(connect: Connect, eventBus: EventBus);
|
|
15
|
+
start(event: MouseEvent | Event, source: VcShape, type: ConnectionType): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=VcConnect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcConnect.d.ts","sourceRoot":"","sources":["../../src/connect/VcConnect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAM1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAL1B,MAAM,CAAC,OAAO,WAA2B;IAEzC,WAAW,EAAE,cAAc,CAAc;gBAGtB,OAAO,EAAE,OAAO,EACjC,QAAQ,EAAE,QAAQ;IAOpB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI;CAI9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,eAAO,MAAM,eAAe,EAAE,iBAI7B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as ContextPad } from 'diagram-js/lib/features/context-pad/ContextPad';
|
|
2
|
+
import { default as Modeling } from 'diagram-js/lib/features/modeling/Modeling';
|
|
3
|
+
import { default as PopupMenu } from 'diagram-js/lib/features/popup-menu/PopupMenu';
|
|
4
|
+
import { Element } from 'diagram-js/lib/model/Types';
|
|
5
|
+
import { default as VcAppend } from '../append/VcAppend.js';
|
|
6
|
+
import { default as VcConnect } from '../connect/VcConnect.js';
|
|
7
|
+
import { default as VcModeling } from '../modeling/VcModeling.js';
|
|
8
|
+
interface ContextPadEntry {
|
|
9
|
+
group: string;
|
|
10
|
+
html?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
action: Record<string, (event: Event, element?: Element) => void>;
|
|
13
|
+
}
|
|
14
|
+
type Entries = Record<string, ContextPadEntry>;
|
|
15
|
+
export default class VcContextPadProvider {
|
|
16
|
+
private readonly modeling;
|
|
17
|
+
private readonly popupMenu;
|
|
18
|
+
private readonly vcAppend;
|
|
19
|
+
private readonly vcConnect;
|
|
20
|
+
private readonly vcModeling;
|
|
21
|
+
static $inject: string[];
|
|
22
|
+
constructor(contextPad: ContextPad, modeling: Modeling, popupMenu: PopupMenu, vcAppend: VcAppend, vcConnect: VcConnect, vcModeling: VcModeling);
|
|
23
|
+
getContextPadEntries(element: Element): Entries;
|
|
24
|
+
getMultiElementContextPadEntries(elements: Element[]): Entries;
|
|
25
|
+
private addStepEntries;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=VcContextPadProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcContextPadProvider.d.ts","sourceRoot":"","sources":["../../src/context-pad/VcContextPadProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAE7E,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AACtE,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAa1D,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AAExD,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC;CACnE;AAED,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAE/C,MAAM,CAAC,OAAO,OAAO,oBAAoB;IAKrC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAR7B,MAAM,CAAC,OAAO,WAAkF;gBAG9F,UAAU,EAAE,UAAU,EACL,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU;IAKzC,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IA2D/C,gCAAgC,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO;IA8B9D,OAAO,CAAC,cAAc;CAsDvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context-pad/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAK9C,eAAO,MAAM,kBAAkB,EAAE,iBAIhC,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
2
|
+
/**
|
|
3
|
+
* Copy/paste support: diagram-js turns copy descriptors into element attrs on paste,
|
|
4
|
+
* so carrying the flat domain properties across is all that is needed.
|
|
5
|
+
*/
|
|
6
|
+
export default class VcCopyPasteBehavior {
|
|
7
|
+
static $inject: string[];
|
|
8
|
+
constructor(eventBus: EventBus);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=VcCopyPasteBehavior.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcCopyPasteBehavior.d.ts","sourceRoot":"","sources":["../../src/copy-paste/VcCopyPasteBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAQzD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC,MAAM,CAAC,OAAO,WAAgB;gBAElB,QAAQ,EAAE,QAAQ;CAiB/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/copy-paste/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,eAAO,MAAM,iBAAiB,EAAE,iBAI/B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as BaseRenderer } from 'diagram-js/lib/draw/BaseRenderer';
|
|
2
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
3
|
+
import { Connection, Element, Shape } from 'diagram-js/lib/model/Types';
|
|
4
|
+
export default class VcRenderer extends BaseRenderer {
|
|
5
|
+
static $inject: string[];
|
|
6
|
+
private readonly textUtil;
|
|
7
|
+
/** Unique per instance so marker ids never collide across diagrams on one page. */
|
|
8
|
+
private readonly markerSuffix;
|
|
9
|
+
constructor(eventBus: EventBus);
|
|
10
|
+
canRender(element: Element): boolean;
|
|
11
|
+
drawShape(visuals: SVGElement, element: Shape): SVGElement;
|
|
12
|
+
drawConnection(visuals: SVGElement, element: Connection): SVGElement;
|
|
13
|
+
getShapePath(shape: Shape): string;
|
|
14
|
+
getConnectionPath(connection: Connection): string;
|
|
15
|
+
private arrowMarker;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=VcRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcRenderer.d.ts","sourceRoot":"","sources":["../../src/draw/VcRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,kCAAkC,CAAC;AAG5D,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAoB7E,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,MAAM,CAAC,OAAO,WAAgB;IAE9B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAOtB;IAEH,mFAAmF;IACnF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiC;gBAElD,QAAQ,EAAE,QAAQ;IAIrB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAIpC,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,GAAG,UAAU;IAqC1D,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU;IA2BpE,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAOlC,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM;IAQ1D,OAAO,CAAC,WAAW;CA+BpB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chevron ("Blockpfeil") geometry of a value chain step: flat top/bottom, a point on the
|
|
3
|
+
* right and a matching notch cut into the left edge. Point/notch depth is half the height
|
|
4
|
+
* (45° edges, the canonical ARIS/PowerPoint look), clamped so narrow steps don't degenerate.
|
|
5
|
+
*/
|
|
6
|
+
export declare function notchDepth(width: number, height: number): number;
|
|
7
|
+
/** Shape-local chevron path for a step of the given size. */
|
|
8
|
+
export declare function chevronPath(width: number, height: number): string;
|
|
9
|
+
/**
|
|
10
|
+
* Horizontal label inset. Less than the full notch depth: lines sit around the vertical
|
|
11
|
+
* middle where the 45° notch/point edges leave `fontSize`-dependent extra room.
|
|
12
|
+
*/
|
|
13
|
+
export declare function labelInset(width: number, height: number): number;
|
|
14
|
+
/** Absolute chevron path, as consumed by diagram-js outline/cropping via getShapePath. */
|
|
15
|
+
export declare function chevronPathAt(x: number, y: number, width: number, height: number): string;
|
|
16
|
+
/** Ellipse path (organizational unit), arc-based so cropping intersects exactly. */
|
|
17
|
+
export declare function ellipsePathAt(x: number, y: number, width: number, height: number): string;
|
|
18
|
+
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/draw/geometry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAYzF;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAUzF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline SVG icons for palette (28px) and context pad (24px) entries. All icons use
|
|
3
|
+
* `currentColor`, so the diagram-js palette/context-pad hover colors apply.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ICONS: {
|
|
6
|
+
readonly handTool: string;
|
|
7
|
+
readonly lassoTool: string;
|
|
8
|
+
readonly spaceTool: string;
|
|
9
|
+
readonly globalConnect: string;
|
|
10
|
+
readonly createStep: string;
|
|
11
|
+
readonly appendStep: string;
|
|
12
|
+
readonly appendSubStep: string;
|
|
13
|
+
readonly connectSequence: string;
|
|
14
|
+
readonly connectHierarchy: string;
|
|
15
|
+
readonly createOrgUnit: string;
|
|
16
|
+
readonly appendOrgUnit: string;
|
|
17
|
+
readonly toggleType: string;
|
|
18
|
+
readonly align: string;
|
|
19
|
+
readonly color: string;
|
|
20
|
+
readonly trash: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function paletteEntryHtml(iconSvg: string, title: string, draggable?: boolean): string;
|
|
23
|
+
export declare function contextPadEntryHtml(iconSvg: string, title: string, draggable?: boolean): string;
|
|
24
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/draw/icons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;CAkDR,CAAC;AAEX,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,MAAM,CAK1F;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,MAAM,CAK7F"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
/** SVG rendering of value chain steps and connections (BaseRenderer subclass). */
|
|
3
|
+
export declare const vcDrawModule: ModuleDeclaration;
|
|
4
|
+
export { default as VcRenderer } from './VcRenderer.js';
|
|
5
|
+
export { chevronPath, chevronPathAt, ellipsePathAt, notchDepth } from './geometry.js';
|
|
6
|
+
export { COLORS, COLOR_OPTIONS, FONT } from './styles.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/draw/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAG9C,kFAAkF;AAClF,eAAO,MAAM,YAAY,EAAE,iBAG1B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of visual constants, matching the bpmn.io design language:
|
|
3
|
+
* near-black ink strokes (2px, round joins) on white fills, Arial 12px labels.
|
|
4
|
+
*/
|
|
5
|
+
export declare const COLORS: {
|
|
6
|
+
readonly ink: "hsl(225, 10%, 15%)";
|
|
7
|
+
readonly fill: "white";
|
|
8
|
+
};
|
|
9
|
+
export declare const FONT: {
|
|
10
|
+
readonly family: "Arial, sans-serif";
|
|
11
|
+
readonly size: 12;
|
|
12
|
+
readonly lineHeight: 1.2;
|
|
13
|
+
};
|
|
14
|
+
export declare const STROKE_WIDTH = 2;
|
|
15
|
+
export declare const LABEL_PADDING = 7;
|
|
16
|
+
/** Accent colors offered by the color picker (stroke + label tint; fill stays white). */
|
|
17
|
+
export declare const COLOR_OPTIONS: ReadonlyArray<{
|
|
18
|
+
label: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/draw/styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,MAAM;;;CAGT,CAAC;AAEX,eAAO,MAAM,IAAI;;;;CAIP,CAAC;AAEX,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,yFAAyF;AACzF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAO1E,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { VcBaseViewer, type VcViewerOptions } from './VcBaseViewer.js';
|
|
2
|
+
export { Viewer } from './Viewer.js';
|
|
3
|
+
export { NavigatedViewer } from './NavigatedViewer.js';
|
|
4
|
+
export { Modeler } from './Modeler.js';
|
|
5
|
+
export { isOrgUnit, isStep, isVcConnection, isVcElement, isVcShape, type VcConnection, type VcShape, type VcShapeType, } from './model/di-types.js';
|
|
6
|
+
export { vcModelModule, VcElementFactory, VcDiagramElementFactory } from './model/index.js';
|
|
7
|
+
export { vcDrawModule, VcRenderer, chevronPath, chevronPathAt, ellipsePathAt, notchDepth, COLORS, COLOR_OPTIONS, FONT, } from './draw/index.js';
|
|
8
|
+
export { ioModule, VcImporter, VcExporter, saveSVG, ROOT_ID } from './io/index.js';
|
|
9
|
+
export type { ImportWarning, RootBusinessObject } from './io/index.js';
|
|
10
|
+
export { vcModelingModule, VcModeling, VcLayouter, VcConnectionTypeBehavior, } from './modeling/index.js';
|
|
11
|
+
export { vcRulesModule, VcRules } from './rules/index.js';
|
|
12
|
+
export { vcConnectModule, VcConnect } from './connect/index.js';
|
|
13
|
+
export { vcAppendModule, VcAppend } from './append/index.js';
|
|
14
|
+
export { vcPaletteModule, VcPaletteProvider } from './palette/index.js';
|
|
15
|
+
export { vcContextPadModule, VcContextPadProvider } from './context-pad/index.js';
|
|
16
|
+
export { vcLabelEditingModule, VcLabelEditingProvider } from './label-editing/index.js';
|
|
17
|
+
export { vcColorPickerModule, vcAlignMenuModule, VcColorPickerProvider, VcAlignMenuProvider, COLOR_PICKER_PROVIDER_ID, ALIGN_MENU_PROVIDER_ID, } from './popup/index.js';
|
|
18
|
+
export { vcKeyboardModule, VcKeyboardBindings, VcEditorActions } from './keyboard/index.js';
|
|
19
|
+
export { vcOrderingModule, VcOrderingProvider } from './ordering/index.js';
|
|
20
|
+
export { vcCopyPasteModule, VcCopyPasteBehavior } from './copy-paste/index.js';
|
|
21
|
+
export { vcResizeModule, VcResizeBehavior } from './resize/index.js';
|
|
22
|
+
export { ICONS } from './draw/icons.js';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EACL,SAAS,EACT,MAAM,EACN,cAAc,EACd,WAAW,EACX,SAAS,EACT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,WAAW,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACnF,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC"}
|