@miragon/value-chain-renderer 0.7.1 → 0.7.2
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 +30 -16
- package/dist/bounds/VcBounds.d.ts +6 -4
- package/dist/bounds/VcBounds.d.ts.map +1 -1
- package/dist/bounds/index.d.ts +1 -1
- package/dist/bounds/index.d.ts.map +1 -1
- package/dist/collaborative/CollaborativeValueChain.d.ts +5 -4
- package/dist/collaborative/CollaborativeValueChain.d.ts.map +1 -1
- package/dist/context-pad/VcContextPadProvider.d.ts +1 -1
- package/dist/diagram-menu/ShortcutsDialog.d.ts +1 -1
- package/dist/diagram-menu/menu.d.ts +3 -3
- package/dist/diagram-menu/shortcuts.d.ts +1 -1
- package/dist/draw/VcRenderer.d.ts +9 -0
- package/dist/draw/VcRenderer.d.ts.map +1 -1
- package/dist/draw/canvas2d.d.ts +3 -0
- package/dist/draw/canvas2d.d.ts.map +1 -0
- package/dist/draw/fill.d.ts +26 -0
- package/dist/draw/fill.d.ts.map +1 -0
- package/dist/draw/geometry.d.ts +15 -0
- package/dist/draw/geometry.d.ts.map +1 -1
- package/dist/draw/labelBox.d.ts +15 -0
- package/dist/draw/labelBox.d.ts.map +1 -0
- package/dist/draw/lucide.d.ts +4 -4
- package/dist/draw/styles.d.ts +21 -3
- package/dist/draw/styles.d.ts.map +1 -1
- package/dist/index.js +712 -487
- package/dist/index.js.map +1 -1
- package/dist/io/saveSvg.d.ts +1 -1
- package/dist/keyboard/VcCanvasKeys.d.ts +19 -0
- package/dist/keyboard/VcCanvasKeys.d.ts.map +1 -0
- package/dist/keyboard/index.d.ts +4 -1
- package/dist/keyboard/index.d.ts.map +1 -1
- package/dist/model/VcDiagramElementFactory.d.ts +4 -4
- package/dist/model/di-types.d.ts +3 -3
- package/dist/popup/VcColorPickerProvider.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/io/saveSvg.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { default as VcBounds } from '../bounds/VcBounds.js';
|
|
|
5
5
|
* strips the pan/zoom transform. Fonts and colours are SVG presentation attributes, so the
|
|
6
6
|
* result renders identically outside the editor and stays light in every mode.
|
|
7
7
|
*/
|
|
8
|
-
export declare function saveSVG(canvas: Canvas, bounds: Pick<VcBounds,
|
|
8
|
+
export declare function saveSVG(canvas: Canvas, bounds: Pick<VcBounds, "contentBounds">): {
|
|
9
9
|
svg: string;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=saveSvg.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as Canvas } from 'diagram-js/lib/core/Canvas';
|
|
2
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
3
|
+
/**
|
|
4
|
+
* Keys stay on the canvas. diagram-js binds the keyboard to the canvas `<svg>`, so a key acts only
|
|
5
|
+
* while the canvas holds the focus; on top of that the canvas leaves alone a key a host has handled
|
|
6
|
+
* already, a key of an input method's composition and an event without a key.
|
|
7
|
+
*
|
|
8
|
+
* A pointer on a palette or context pad entry takes the focus off the canvas, and many actions
|
|
9
|
+
* leave it nowhere (Delete, switching a relation's type, connecting, a palette tool in a host
|
|
10
|
+
* without the shell's chrome). The canvas takes it back before the action runs, so the next key
|
|
11
|
+
* acts without another click, while a label editor or popup the action opens still gets it. Enter
|
|
12
|
+
* or Space on an entry (a click without a pointer) leaves the focus where it is, unless the action
|
|
13
|
+
* left it nowhere.
|
|
14
|
+
*/
|
|
15
|
+
export default class VcCanvasKeys {
|
|
16
|
+
static $inject: string[];
|
|
17
|
+
constructor(eventBus: EventBus, canvas: Canvas);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=VcCanvasKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VcCanvasKeys.d.ts","sourceRoot":"","sources":["../../src/keyboard/VcCanvasKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAOzD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,MAAM,CAAC,OAAO,WAA0B;gBAE5B,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM;CAW/C"}
|
package/dist/keyboard/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ModuleDeclaration } from 'didi';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Overrides the stock `keyboardBindings` with the tool shortcuts and select all, and keeps the keys
|
|
4
|
+
* on the canvas (`vcCanvasKeys`).
|
|
5
|
+
*/
|
|
3
6
|
export declare const vcKeyboardModule: ModuleDeclaration;
|
|
4
7
|
export { default as VcKeyboardBindings, type VcKeyboardConfig } from './VcKeyboardBindings.js';
|
|
5
8
|
export { default as VcEditorActions } from './VcEditorActions.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keyboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keyboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAO9C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,iBAM9B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -11,10 +11,10 @@ export default class VcDiagramElementFactory extends ElementFactory {
|
|
|
11
11
|
private readonly elementRegistry;
|
|
12
12
|
static $inject: string[];
|
|
13
13
|
constructor(elementRegistry: ElementRegistry);
|
|
14
|
-
create(type:
|
|
15
|
-
create(type:
|
|
16
|
-
create(type:
|
|
17
|
-
create(type:
|
|
14
|
+
create(type: "root", attrs?: Partial<Root>): Root;
|
|
15
|
+
create(type: "shape", attrs?: Partial<Shape>): Shape;
|
|
16
|
+
create(type: "connection", attrs?: Partial<Connection>): Connection;
|
|
17
|
+
create(type: "label", attrs?: Partial<Label>): Label;
|
|
18
18
|
private unusedId;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=VcDiagramElementFactory.d.ts.map
|
package/dist/model/di-types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection, Shape } from 'diagram-js/lib/model/Types';
|
|
2
2
|
import { ChainConnection, ConnectionType, DiagramElement } from '@miragon/value-chain-schema-model';
|
|
3
|
-
export type VcShapeType =
|
|
3
|
+
export type VcShapeType = "step" | "orgUnit";
|
|
4
4
|
/**
|
|
5
5
|
* Runtime model: diagram-js elements carry the editable domain truth as flat properties
|
|
6
6
|
* (`vcType`, `vcLabel`, `color`, `link`). The `businessObject` is only an import-time
|
|
@@ -19,10 +19,10 @@ export interface VcConnection extends Connection {
|
|
|
19
19
|
}
|
|
20
20
|
export declare function isVcShape(element: unknown): element is VcShape;
|
|
21
21
|
export declare function isStep(element: unknown): element is VcShape & {
|
|
22
|
-
vcType:
|
|
22
|
+
vcType: "step";
|
|
23
23
|
};
|
|
24
24
|
export declare function isOrgUnit(element: unknown): element is VcShape & {
|
|
25
|
-
vcType:
|
|
25
|
+
vcType: "orgUnit";
|
|
26
26
|
};
|
|
27
27
|
export declare function isVcConnection(element: unknown): element is VcConnection;
|
|
28
28
|
export declare function isVcElement(element: unknown): element is VcShape | VcConnection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VcColorPickerProvider.d.ts","sourceRoot":"","sources":["../../src/popup/VcColorPickerProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"VcColorPickerProvider.d.ts","sourceRoot":"","sources":["../../src/popup/VcColorPickerProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAI1D,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AAExD,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAE1D,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAWD,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAKtC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAJ7B,MAAM,CAAC,OAAO,WAA+B;gBAG3C,SAAS,EAAE,SAAS,EACH,UAAU,EAAE,UAAU;IAKzC,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;CAgBjF"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miragon/value-chain-renderer",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "diagram-js based value chain modeler: renderer, viewer, modeler, import/export, CSS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/Miragon/
|
|
9
|
-
"directory": "packages/renderer"
|
|
8
|
+
"url": "git+https://github.com/Miragon/modeler-suite.git",
|
|
9
|
+
"directory": "modelers/value-chain/packages/renderer"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/Miragon/
|
|
12
|
-
"bugs": "https://github.com/Miragon/
|
|
11
|
+
"homepage": "https://github.com/Miragon/modeler-suite/tree/main/modelers/value-chain/packages/renderer#readme",
|
|
12
|
+
"bugs": "https://github.com/Miragon/modeler-suite/issues",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"value chain",
|
|
15
15
|
"wertschöpfungskette",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test:browser": "npm --prefix ../.. run test:browser"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@miragon/modeler-api": "1.
|
|
49
|
+
"@miragon/modeler-api": "1.4.0",
|
|
50
50
|
"@miragon/value-chain-schema-model": "0.7.1",
|
|
51
51
|
"diagram-js-direct-editing": "3.6.0"
|
|
52
52
|
},
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"diagram-js": "15.28.1",
|
|
61
61
|
"didi": "12.0.0",
|
|
62
|
-
"jsdom": "30.1.
|
|
62
|
+
"jsdom": "30.1.3",
|
|
63
63
|
"tiny-svg": "4.1.4",
|
|
64
64
|
"typescript": "6.0.3",
|
|
65
65
|
"vite": "8.3.4",
|
|
66
66
|
"vite-plugin-dts": "5.1.2",
|
|
67
|
-
"vitest": "5.0.
|
|
67
|
+
"vitest": "5.0.5",
|
|
68
68
|
"zod": "4.6.7"
|
|
69
69
|
}
|
|
70
70
|
}
|