@miragon/wardley-renderer 0.12.0 → 0.14.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 +144 -24
- package/dist/Modeler.d.ts.map +1 -1
- package/dist/WardleyBaseViewer.d.ts +6 -1
- package/dist/WardleyBaseViewer.d.ts.map +1 -1
- package/dist/a11y/canvasFocus.d.ts +28 -0
- package/dist/a11y/canvasFocus.d.ts.map +1 -1
- package/dist/a11y/index.d.ts +1 -1
- package/dist/a11y/index.d.ts.map +1 -1
- package/dist/appearance/index.d.ts +10 -0
- package/dist/appearance/index.d.ts.map +1 -0
- package/dist/appearance/index.js +5 -0
- package/dist/appearance/index.js.map +1 -0
- package/dist/append/WardleyAppendBehavior.d.ts.map +1 -1
- package/dist/collaborative/CollaborativeWardley.d.ts +5 -3
- package/dist/collaborative/CollaborativeWardley.d.ts.map +1 -1
- package/dist/color-picker/WardleyColorPicker.d.ts.map +1 -1
- package/dist/draw/WardleyRenderer.d.ts.map +1 -1
- package/dist/draw/index.d.ts +1 -1
- package/dist/draw/index.d.ts.map +1 -1
- package/dist/draw/label-layout.d.ts +21 -0
- package/dist/draw/label-layout.d.ts.map +1 -1
- package/dist/draw-tool/WardleyDrawTool.d.ts +16 -4
- package/dist/draw-tool/WardleyDrawTool.d.ts.map +1 -1
- package/dist/draw-tool/WardleyDrawingHandles.d.ts +23 -2
- package/dist/draw-tool/WardleyDrawingHandles.d.ts.map +1 -1
- package/dist/draw-tool/index.d.ts.map +1 -1
- package/dist/evolution-grid/EvolutionConstraintBehavior.d.ts.map +1 -1
- package/dist/evolve/WardleyEvolveDragging.d.ts +10 -3
- package/dist/evolve/WardleyEvolveDragging.d.ts.map +1 -1
- package/dist/evolve/index.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1998 -1491
- package/dist/index.js.map +1 -1
- package/dist/interaction/WardleyInteraction.d.ts +92 -0
- package/dist/interaction/WardleyInteraction.d.ts.map +1 -0
- package/dist/interaction/index.d.ts +5 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/io/WardleyExporter.d.ts +12 -2
- package/dist/io/WardleyExporter.d.ts.map +1 -1
- package/dist/io/rasterize.d.ts +6 -0
- package/dist/io/rasterize.d.ts.map +1 -1
- package/dist/keyboard/WardleyKeyboard.d.ts +18 -1
- package/dist/keyboard/WardleyKeyboard.d.ts.map +1 -1
- package/dist/label-drag/WardleyLabelDragging.d.ts +9 -3
- package/dist/label-drag/WardleyLabelDragging.d.ts.map +1 -1
- package/dist/label-drag/index.d.ts.map +1 -1
- package/dist/label-editing/WardleyLabelEditing.d.ts +10 -5
- package/dist/label-editing/WardleyLabelEditing.d.ts.map +1 -1
- package/dist/label-editing/fieldError.d.ts +6 -0
- package/dist/label-editing/fieldError.d.ts.map +1 -1
- package/dist/label-editing/imeComposition.d.ts +7 -0
- package/dist/label-editing/imeComposition.d.ts.map +1 -0
- package/dist/label-editing/index.d.ts +2 -1
- package/dist/label-editing/index.d.ts.map +1 -1
- package/dist/link-editing/WardleyLinkEditing.d.ts.map +1 -1
- package/dist/live-preview/LivePreview.d.ts +18 -3
- package/dist/live-preview/LivePreview.d.ts.map +1 -1
- package/dist/live-preview/index.d.ts +1 -1
- package/dist/live-preview/index.d.ts.map +1 -1
- package/dist/map-menu/AxisLabelsPopover.d.ts.map +1 -1
- package/dist/map-menu/MapSizePopover.d.ts.map +1 -1
- package/dist/map-menu/ShortcutsDialog.d.ts +11 -1
- package/dist/map-menu/ShortcutsDialog.d.ts.map +1 -1
- package/dist/map-menu/TitleDialog.d.ts.map +1 -1
- package/dist/map-menu/popover.d.ts.map +1 -1
- package/dist/map-menu/shortcuts.d.ts.map +1 -1
- package/dist/palette/WardleyHoverTooltipTeardown.d.ts +17 -0
- package/dist/palette/WardleyHoverTooltipTeardown.d.ts.map +1 -0
- package/dist/palette/WardleyPaletteArmedTool.d.ts +19 -0
- package/dist/palette/WardleyPaletteArmedTool.d.ts.map +1 -0
- package/dist/palette/WardleyPaletteKeyboard.d.ts.map +1 -1
- package/dist/palette/WardleyPaletteTooltip.d.ts +28 -0
- package/dist/palette/WardleyPaletteTooltip.d.ts.map +1 -0
- package/dist/palette/index.d.ts +7 -1
- package/dist/palette/index.d.ts.map +1 -1
- package/dist/popup/WardleyElementSettingsProvider.d.ts.map +1 -1
- package/dist/theme/palette.d.ts +1 -1
- package/dist/wardley.css +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
2
|
+
import { Injector } from 'didi';
|
|
3
|
+
/** Fired as `{ active }` each time a gesture starts or ends (`InteractionChangedEvent`). */
|
|
4
|
+
export declare const INTERACTION_CHANGED = "wardley.interaction.changed";
|
|
5
|
+
export interface InteractionChangedEvent {
|
|
6
|
+
active: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The drags of a palette tool that only waits for its next press (the lasso from the palette or
|
|
10
|
+
* `L`): no gesture yet. They hold no element of the map, so an import leaves such a tool armed, and
|
|
11
|
+
* the user's next press still draws a lasso instead of panning or moving the element under the
|
|
12
|
+
* pointer.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ARMED_TOOL_PREFIXES: ReadonlySet<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Ahead of every other listener of a drag or a command, so that what a drop or a command runs finds
|
|
17
|
+
* the user's action marked.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ACTION_MARK_PRIORITY = 100000;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the user holds a gesture on the canvas, the `interaction` of `@miragon/modeler-api`: a
|
|
22
|
+
* diagram-js drag past its threshold (a move, resize, connect, lasso, evolve or plot-corner drag, a
|
|
23
|
+
* create from the palette or the context pad, also while its preview is over the palette) or one of
|
|
24
|
+
* this renderer's own drags (a label, a point of a drawing, the evolve target), from its start until
|
|
25
|
+
* its drop or cancel. A tool that only waits for its next press is none, and neither is a pan.
|
|
26
|
+
*
|
|
27
|
+
* It also marks the user's actions, and `afterUserAction()` lets an import wait until the running
|
|
28
|
+
* one has finished, so that no step of it finds the map replaced under it (#248, #285, #305, #336):
|
|
29
|
+
* - a drop, from the release until the drop has ended and the follow-ups it deferred to a later task
|
|
30
|
+
* (the name editor of a create or an append with the pointer) have run;
|
|
31
|
+
* - every other command, an undo or a redo, from its start until the code that ran it has returned:
|
|
32
|
+
* a create without a pointer, the context pad's append with Enter, the save of a name editor, also
|
|
33
|
+
* the one a press on the canvas makes, a delete, an undo or a redo that deselects what it removes.
|
|
34
|
+
* Such an action defers no step: the next microtask ends it;
|
|
35
|
+
* - the activation of a diagram-js drag (a move, a connect or the evolve placement of the context pad
|
|
36
|
+
* past its threshold; a resize, a create from the palette, the context pad or a key, and a connect
|
|
37
|
+
* with the key A at once), from its start until diagram-js's `Dragging.move` has returned: it
|
|
38
|
+
* clears the selection after the start and goes on with the drag, so an import from the selection
|
|
39
|
+
* listener there would cancel the drag under it. The import then ends the drag, as it ends any
|
|
40
|
+
* running gesture. The next microtask ends this action too.
|
|
41
|
+
*/
|
|
42
|
+
export default class WardleyInteraction {
|
|
43
|
+
private readonly eventBus;
|
|
44
|
+
static $inject: string[];
|
|
45
|
+
private gesture;
|
|
46
|
+
private dropsRunning;
|
|
47
|
+
private settling;
|
|
48
|
+
private handlerRunning;
|
|
49
|
+
/** From one of `HANDLER_GOES_ON_EVENTS` or a gesture's start or end until its handler returned. */
|
|
50
|
+
private handlerGoesOn;
|
|
51
|
+
private readonly waiting;
|
|
52
|
+
constructor(eventBus: EventBus, injector: Injector);
|
|
53
|
+
/** True from a gesture's start until its drop or cancel. */
|
|
54
|
+
isActive(): boolean;
|
|
55
|
+
/** One of the renderer's own drags passed its threshold. */
|
|
56
|
+
begin(gesture: object): void;
|
|
57
|
+
/** The gesture ended without a drop: Escape, or its element was removed. */
|
|
58
|
+
end(gesture: object): void;
|
|
59
|
+
/** The gesture's release: runs its drop, then ends it. */
|
|
60
|
+
drop(gesture: object, run: () => void): void;
|
|
61
|
+
/**
|
|
62
|
+
* Resolves once the user's running action has finished: a drop with the follow-ups it deferred to
|
|
63
|
+
* a later task, and the code that ran a command or activated a drag; `undefined` while no action
|
|
64
|
+
* runs.
|
|
65
|
+
*/
|
|
66
|
+
afterUserAction(): Promise<void> | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Runs `teardown` (the modeler's destroy) at once, or, while the handler of the user's input goes
|
|
69
|
+
* on with the map, once that handler has returned. A host may destroy the modeler from any
|
|
70
|
+
* listener, and these handlers read the canvas after one: diagram-js's `Dragging.move` clears
|
|
71
|
+
* the selection after a drag's start and reads the drag again (#346), a drop's command runs
|
|
72
|
+
* inside `Dragging.end`, whose `SelectionBehavior` then selects the new shape and whose cleanup
|
|
73
|
+
* reads the canvas, a cancel cleans the drag up after the listeners of its `drag.cleanup` (#380),
|
|
74
|
+
* a create without a pointer selects its element and opens its name editor (#373), and the
|
|
75
|
+
* palette focuses the canvas after it started a create. The renderer's own drags (a label, a
|
|
76
|
+
* point of a drawing, the evolve target) read the canvas after they reported their start or end
|
|
77
|
+
* in the same way. The rest of the handler runs on the live map, which the teardown then takes
|
|
78
|
+
* down, together with a drag that still runs.
|
|
79
|
+
*/
|
|
80
|
+
tearDownAfterHandler(teardown: () => void): void;
|
|
81
|
+
private actionRunning;
|
|
82
|
+
private followDragging;
|
|
83
|
+
private noteHandlerGoesOn;
|
|
84
|
+
private dropStarts;
|
|
85
|
+
private handlerRuns;
|
|
86
|
+
private endDrop;
|
|
87
|
+
private dropEnds;
|
|
88
|
+
private settleWhenIdle;
|
|
89
|
+
private settled;
|
|
90
|
+
private changed;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=WardleyInteraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WardleyInteraction.d.ts","sourceRoot":"","sources":["../../src/interaction/WardleyInteraction.ts"],"names":[],"mappings":"AAAA,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cAAc;IA8CtB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,OAAO;IAUf,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,OAAO;CAIhB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
/** Whether the user holds a gesture on the canvas, and when the user's action has finished. */
|
|
3
|
+
export declare const wardleyInteractionModule: ModuleDeclaration;
|
|
4
|
+
export { default as WardleyInteraction, ACTION_MARK_PRIORITY, ARMED_TOOL_PREFIXES, INTERACTION_CHANGED, type InteractionChangedEvent, } from './WardleyInteraction.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAG9C,+FAA+F;AAC/F,eAAO,MAAM,wBAAwB,EAAE,iBAGtC,CAAC;AAEF,OAAO,EACL,OAAO,IAAI,kBAAkB,EAC7B,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { default as Canvas } from 'diagram-js/lib/core/Canvas';
|
|
2
2
|
import { default as ElementRegistry } from 'diagram-js/lib/core/ElementRegistry';
|
|
3
|
-
import { WardleyMap } from '@miragon/wardley-schema-model';
|
|
3
|
+
import { LabelOffset, Movement, WardleyMap } from '@miragon/wardley-schema-model';
|
|
4
|
+
import { WardleyShape } from '../model/di-types.js';
|
|
4
5
|
import { default as EvolutionGrid } from '../evolution-grid/EvolutionGrid.js';
|
|
5
6
|
import { default as WardleySourceOrder } from './WardleySourceOrder.js';
|
|
7
|
+
/** A shape's evolve target and label offset as the document has them. */
|
|
8
|
+
export interface CommittedShapeFields {
|
|
9
|
+
readonly movement: Movement | undefined;
|
|
10
|
+
readonly labelOffset: LabelOffset | undefined;
|
|
11
|
+
}
|
|
6
12
|
/**
|
|
7
13
|
* Reconstructs a WardleyMap from the diagram-js runtime model. The source of truth for positions are
|
|
8
14
|
* the DI properties `evolution`/`visibility`; editable fields (label, decorators, movement,
|
|
@@ -16,7 +22,11 @@ export default class WardleyExporter {
|
|
|
16
22
|
private readonly sourceOrder;
|
|
17
23
|
static $inject: string[];
|
|
18
24
|
constructor(elementRegistry: ElementRegistry, canvas: Canvas, grid: EvolutionGrid, sourceOrder: WardleySourceOrder);
|
|
19
|
-
|
|
25
|
+
/**
|
|
26
|
+
* `committed` gives the evolve target and label offset the document has for each shape a drag
|
|
27
|
+
* previews on; the map takes them instead of the ones the canvas shows.
|
|
28
|
+
*/
|
|
29
|
+
export(committed?: ReadonlyMap<WardleyShape, CommittedShapeFields>): WardleyMap;
|
|
20
30
|
/** Builds a MapElement from the DI properties (common types) or the businessObject (the rest). */
|
|
21
31
|
private buildElement;
|
|
22
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WardleyExporter.d.ts","sourceRoot":"","sources":["../../src/io/WardleyExporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAEvE,OAAO,
|
|
1
|
+
{"version":3,"file":"WardleyExporter.d.ts","sourceRoot":"","sources":["../../src/io/WardleyExporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAEvE,OAAO,EAQL,KAAK,WAAW,EAIhB,KAAK,QAAQ,EAIb,KAAK,UAAU,EAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAuC,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,KAAK,aAAa,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAC;AAS9D,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;CAC/C;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAIhC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAN9B,MAAM,CAAC,OAAO,WAAwE;gBAGnE,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,aAAa,EACnB,WAAW,EAAE,kBAAkB;IAGlD;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,YAAY,EAAE,oBAAoB,CAAC,GAAG,UAAU;IA2D/E,kGAAkG;IAClG,OAAO,CAAC,YAAY;CA+HrB"}
|
package/dist/io/rasterize.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @deprecated Since 0.14.0, removed in 0.15.0 (#258), with `svgToPng`. */
|
|
1
2
|
export interface SvgToPngOptions {
|
|
2
3
|
/**
|
|
3
4
|
* Pixel density factor relative to the SVG's own size (default 2). Lowered automatically where
|
|
@@ -10,6 +11,11 @@ export interface SvgToPngOptions {
|
|
|
10
11
|
/**
|
|
11
12
|
* Rasterizes a standalone SVG (e.g. from `saveSVG()`) into a PNG picture. Browser-only: needs
|
|
12
13
|
* `Image`, `<canvas>` and object URLs. The PNG carries no embedded map source.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated Since 0.14.0, removed in 0.15.0 (#258). Use `svgToPng` of
|
|
16
|
+
* `@miragon/modeler-shell/export`: it embeds Geist, loads a data: URL (a blob: URL is refused under
|
|
17
|
+
* some content security policies) and fills the background the caller names, `--cd-ui-plot` for a
|
|
18
|
+
* map (guide §10.7), where this one fills `COLORS.paper`.
|
|
13
19
|
*/
|
|
14
20
|
export declare function svgToPng(svg: string, options?: SvgToPngOptions): Promise<Blob>;
|
|
15
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rasterize.d.ts","sourceRoot":"","sources":["../../src/io/rasterize.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,mGAAmG;IACnG,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAYD
|
|
1
|
+
{"version":3,"file":"rasterize.d.ts","sourceRoot":"","sources":["../../src/io/rasterize.ts"],"names":[],"mappings":"AAEA,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,mGAAmG;IACnG,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAYD;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCxF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAWnC;AAED,sGAAsG;AACtG,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAOxD"}
|
|
@@ -22,7 +22,10 @@ export interface WardleyKeyboardConfig {
|
|
|
22
22
|
* Keyboard binding: undo/redo, delete, copy/paste/duplicate, arrow-key nudge, Escape (deselect),
|
|
23
23
|
* Cmd/Ctrl+A (select all), the single-key tools C (component), U (user), N (note), P (pipeline),
|
|
24
24
|
* L (lasso) and A (connect from the selected node), all only while the canvas has the focus.
|
|
25
|
-
* Deliberately a DOM listener (no diagram-js keyboard-service binding needed).
|
|
25
|
+
* Deliberately a DOM listener (no diagram-js keyboard-service binding needed). While the draw tool
|
|
26
|
+
* holds the points of a line, the single-key tools do nothing, and the canvas takes them. While a
|
|
27
|
+
* point of a drawing is dragged, the arrow keys, paste, duplicate and the single-key tools do
|
|
28
|
+
* nothing, and the canvas takes them; Escape ends that drag and Delete removes the drawing.
|
|
26
29
|
*/
|
|
27
30
|
export default class WardleyKeyboard {
|
|
28
31
|
private readonly canvas;
|
|
@@ -37,6 +40,8 @@ export default class WardleyKeyboard {
|
|
|
37
40
|
private readonly labelEditing;
|
|
38
41
|
private readonly grid;
|
|
39
42
|
private readonly freeRect;
|
|
43
|
+
private readonly drawingHandles;
|
|
44
|
+
private readonly drawTool;
|
|
40
45
|
constructor(canvas: Canvas, commandStack: CommandStack, selection: Selection, modeling: Modeling, copyPaste: WardleyCopyPaste, factory: WardleyElementFactory, create: Create, mouse: Mouse, lassoTool: LassoTool, eventBus: EventBus, elementRegistry: ElementRegistry, injector: Injector, config: WardleyKeyboardConfig | undefined);
|
|
41
46
|
/**
|
|
42
47
|
* With the pointer over the canvas the new node attaches to it (like palette create; placing it
|
|
@@ -48,6 +53,18 @@ export default class WardleyKeyboard {
|
|
|
48
53
|
private visiblePlotCenter;
|
|
49
54
|
private freeSpotNear;
|
|
50
55
|
private singleSelectedShape;
|
|
56
|
+
/**
|
|
57
|
+
* A point drag owns Escape, and the keys that would act on its drawing or start a second gesture
|
|
58
|
+
* (#375): a nudge or a duplicate is a command, which ends the drag, and a paste or a tool would
|
|
59
|
+
* start a gesture that ends with the drag's release.
|
|
60
|
+
*/
|
|
61
|
+
private pointDragged;
|
|
62
|
+
/**
|
|
63
|
+
* A line the draw tool holds and a point drag run on the canvas, which has the focus, so the
|
|
64
|
+
* single-key tools pressed meanwhile are the canvas's and go no further, though they start
|
|
65
|
+
* nothing (#404).
|
|
66
|
+
*/
|
|
67
|
+
private takenByGesture;
|
|
51
68
|
/** The real pointer event, or a synthetic one at `canvasPoint` when the pointer is elsewhere. */
|
|
52
69
|
private pointerEventOr;
|
|
53
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WardleyKeyboard.d.ts","sourceRoot":"","sources":["../../src/keyboard/WardleyKeyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAEzD,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAEhE,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,KAAK,MAAM,qCAAqC,CAAC;AAG7D,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AACzE,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AAEtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,KAAK,gBAAgB,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"WardleyKeyboard.d.ts","sourceRoot":"","sources":["../../src/keyboard/WardleyKeyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,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EAAE,gBAAgB,EACV,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EAC7B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EACD,eAAe,EAAE,eAAe,EACjD,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,qBAAqB,GAAG,SAAS;IAgK3C;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,mBAAmB;IAK3B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAOtB,iGAAiG;IACjG,OAAO,CAAC,cAAc;CAUvB"}
|
|
@@ -6,12 +6,15 @@ import { default as Selection } from 'diagram-js/lib/features/selection/Selectio
|
|
|
6
6
|
import { default as EvolutionGrid } from '../evolution-grid/EvolutionGrid.js';
|
|
7
7
|
import { default as WardleyModeling } from '../modeling/WardleyModeling.js';
|
|
8
8
|
import { WardleyShape } from '../model/di-types.js';
|
|
9
|
+
import { WardleyInteraction } from '../interaction/index.js';
|
|
10
|
+
import { LivePreview } from '../live-preview/index.js';
|
|
9
11
|
/** Which offset a label writes: the node's own `label [dx, dy]` or its evolve line's. */
|
|
10
12
|
export type LabelRole = "name" | "movement";
|
|
11
13
|
/**
|
|
12
14
|
* OWM-style draggable labels: drag a component/anchor name or an evolve target name to store an
|
|
13
|
-
* OWM `label [dx, dy]` offset (integers, clamped to ±200px) as ONE undoable command
|
|
14
|
-
*
|
|
15
|
+
* OWM `label [dx, dy]` offset (integers, clamped to ±200px) as ONE undoable command; the export holds
|
|
16
|
+
* back the preview until then (`LivePreview`). A press without movement selects the owner;
|
|
17
|
+
* double-click still edits the name.
|
|
15
18
|
*
|
|
16
19
|
* Reset paths: Alt+double-click on a label, dropping it back onto its default slot, or
|
|
17
20
|
* `resetLabelOffset(shape, role)`.
|
|
@@ -24,14 +27,17 @@ export default class WardleyLabelDragging {
|
|
|
24
27
|
private readonly selection;
|
|
25
28
|
private readonly grid;
|
|
26
29
|
private readonly injector;
|
|
30
|
+
private readonly interaction;
|
|
31
|
+
private readonly livePreview;
|
|
27
32
|
static $inject: string[];
|
|
28
33
|
private active;
|
|
29
|
-
constructor(eventBus: EventBus, canvas: Canvas, elementRegistry: ElementRegistry, modeling: WardleyModeling, selection: Selection, grid: EvolutionGrid, injector: Injector);
|
|
34
|
+
constructor(eventBus: EventBus, canvas: Canvas, elementRegistry: ElementRegistry, modeling: WardleyModeling, selection: Selection, grid: EvolutionGrid, injector: Injector, interaction: WardleyInteraction, livePreview: LivePreview);
|
|
30
35
|
/** Puts a label back into its default slot (undoable). */
|
|
31
36
|
resetLabelOffset(shape: WardleyShape, role?: LabelRole): void;
|
|
32
37
|
private readonly onMouseDown;
|
|
33
38
|
private readonly onMouseMove;
|
|
34
39
|
private readonly onMouseUp;
|
|
40
|
+
private dropLabel;
|
|
35
41
|
/** The click that ends a drag would toggle the owner's selection off again. */
|
|
36
42
|
private suppressNextClick;
|
|
37
43
|
private readonly onKeyDown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WardleyLabelDragging.d.ts","sourceRoot":"","sources":["../../src/label-drag/WardleyLabelDragging.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,qCAAqC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AAEzE,OAAO,KAAK,aAAa,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|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eAAe,EACzB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,aAAa,EACnB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,kBAAkB,EAC/B,WAAW,EAAE,WAAW;IAyB3C,0DAA0D;IAC1D,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,GAAE,SAAkB,GAAG,IAAI;IAQrE,OAAO,CAAC,QAAQ,CAAC,WAAW,CA8B1B;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAgB1B;IAEF,OAAO,CAAC,QAAQ,CAAC,SAAS,CASxB;IAEF,OAAO,CAAC,SAAS;IAcjB,+EAA+E;IAC/E,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAIxB;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAO5B;IAEF,OAAO,CAAC,MAAM;IAOd,gGAAgG;IAChG,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,oBAAoB;IAS5B;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAUtB,6EAA6E;IAC7E,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,WAAW;IAiBnB,+FAA+F;IAC/F,OAAO,CAAC,cAAc;CAIvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/label-drag/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/label-drag/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAK9C,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,EAAE,iBAIpC,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as Canvas } from 'diagram-js/lib/core/Canvas';
|
|
2
|
+
import { default as ElementRegistry } from 'diagram-js/lib/core/ElementRegistry';
|
|
2
3
|
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
3
4
|
import { Injector } from 'didi';
|
|
4
5
|
import { WardleyConnection, WardleyShape } from '../model/di-types.js';
|
|
@@ -41,13 +42,14 @@ export declare function duplicateNameMessage(name: string): string;
|
|
|
41
42
|
* Custom inline label editing as an HTML overlay (deliberately not diagram-js direct-editing, §8.5).
|
|
42
43
|
* The field sits exactly over the label it replaces (which is hidden meanwhile), scales with the
|
|
43
44
|
* zoom and grows with its content. Commit goes through `wardleyModeling.updateLabel` ->
|
|
44
|
-
* commandStack (undo, P4). Notes are edited in a `<textarea>` over the note itself (
|
|
45
|
-
*
|
|
46
|
-
* (Enter = save). Escape always discards.
|
|
45
|
+
* commandStack (undo, P4). Notes are edited in a `<textarea>` over the note itself (Enter = line
|
|
46
|
+
* break, Cmd/Ctrl+Enter or click outside = save); every other name in a `<textarea>` over its label
|
|
47
|
+
* (Enter = save, Shift+Enter = line break). Escape always discards.
|
|
47
48
|
*/
|
|
48
49
|
export default class WardleyLabelEditing {
|
|
49
50
|
private readonly eventBus;
|
|
50
51
|
private readonly canvas;
|
|
52
|
+
private readonly elementRegistry;
|
|
51
53
|
private readonly modeling;
|
|
52
54
|
private readonly factory;
|
|
53
55
|
static $inject: string[];
|
|
@@ -56,8 +58,11 @@ export default class WardleyLabelEditing {
|
|
|
56
58
|
private readonly contextPad;
|
|
57
59
|
private readonly selection;
|
|
58
60
|
private readonly locked;
|
|
59
|
-
constructor(eventBus: EventBus, canvas: Canvas, modeling: WardleyModeling, factory: WardleyElementFactory, injector: Injector);
|
|
60
|
-
/**
|
|
61
|
+
constructor(eventBus: EventBus, canvas: Canvas, elementRegistry: ElementRegistry, modeling: WardleyModeling, factory: WardleyElementFactory, injector: Injector);
|
|
62
|
+
/**
|
|
63
|
+
* Opens the in-place name editor for `element` (no-op for regions and drawings, and for an
|
|
64
|
+
* element an import has replaced).
|
|
65
|
+
*/
|
|
61
66
|
activate(element: WardleyShape, options?: ActivateOptions): void;
|
|
62
67
|
/**
|
|
63
68
|
* Inline editing for connections: a flow edits its value (`+'value'>`), a dependency its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WardleyLabelEditing.d.ts","sourceRoot":"","sources":["../../src/label-editing/WardleyLabelEditing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"WardleyLabelEditing.d.ts","sourceRoot":"","sources":["../../src/label-editing/WardleyLabelEditing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAC;AA4B3E,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IAC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E,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,qBAAqB,EAC/C,QAAQ,EAAE,QAAQ;IAkCpB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,GAAE,eAAoB,GAAG,IAAI;IAkKpE;;;OAGG;IACH,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,GAAE,eAAoB,GAAG,IAAI;IAmFhF,sDAAsD;IACtD,MAAM,IAAI,IAAI;IAId,wGAAwG;IACxG,OAAO,CAAC,uBAAuB;IAS/B;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAIxB,4FAA4F;IAC5F,aAAa,IAAI,eAAe,GAAG,IAAI;IAWvC;;;OAGG;IACH,OAAO,CAAC,cAAc;IActB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,aAAa;CAuDtB"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screen px from an inline editor's field to the first caption under it. The field's focus ring
|
|
3
|
+
* reaches 4px below it (5px in high contrast), and a caption at the same layer would cover it; the
|
|
4
|
+
* guide keeps the label editor's suggestions 8px from the field too.
|
|
5
|
+
*/
|
|
6
|
+
export declare const FIELD_TO_CAPTION_GAP = 8;
|
|
1
7
|
/**
|
|
2
8
|
* A refused value in an inline editor: the field turns red and a caption under it says why. One look
|
|
3
9
|
* and one accessible pattern (role=alert, aria-describedby) for every editor, also for keyboard and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldError.d.ts","sourceRoot":"","sources":["../../src/label-editing/fieldError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,IAAI,IAAI,CAAC;IACd,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,gBAAgB,GAAG,mBAAmB,EAC7C,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GACpC,UAAU,CA6BZ"}
|
|
1
|
+
{"version":3,"file":"fieldError.d.ts","sourceRoot":"","sources":["../../src/label-editing/fieldError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,IAAI,IAAI,CAAC;IACd,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,gBAAgB,GAAG,mBAAmB,EAC7C,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GACpC,UAAU,CA6BZ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enter and Escape that confirm or cancel an IME candidate belong to the composition. `isComposing`
|
|
3
|
+
* alone misses Safari: it sends the confirming Enter after `compositionend`, with `isComposing`
|
|
4
|
+
* false and the `keyCode` 229 that every engine gives a key the IME took.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isImeCompositionKey(event: KeyboardEvent): boolean;
|
|
7
|
+
//# sourceMappingURL=imeComposition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imeComposition.d.ts","sourceRoot":"","sources":["../../src/label-editing/imeComposition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEjE"}
|
|
@@ -2,6 +2,7 @@ import { ModuleDeclaration } from 'didi';
|
|
|
2
2
|
/** Custom inline label editing (HTML overlay). */
|
|
3
3
|
export declare const labelEditingModule: ModuleDeclaration;
|
|
4
4
|
export { default as WardleyLabelEditing } from './WardleyLabelEditing.js';
|
|
5
|
-
export { createFieldError, type FieldError } from './fieldError.js';
|
|
5
|
+
export { createFieldError, FIELD_TO_CAPTION_GAP, type FieldError } from './fieldError.js';
|
|
6
6
|
export { focusField, type FieldSelection } from './WardleyLabelEditing.js';
|
|
7
|
+
export { isImeCompositionKey } from './imeComposition.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/label-editing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAG9C,kDAAkD;AAClD,eAAO,MAAM,kBAAkB,EAAE,iBAGhC,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/label-editing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAG9C,kDAAkD;AAClD,eAAO,MAAM,kBAAkB,EAAE,iBAGhC,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WardleyLinkEditing.d.ts","sourceRoot":"","sources":["../../src/link-editing/WardleyLinkEditing.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;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,
|
|
1
|
+
{"version":3,"file":"WardleyLinkEditing.d.ts","sourceRoot":"","sources":["../../src/link-editing/WardleyLinkEditing.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;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAqBnC,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAExD;AAED,sGAAsG;AACtG,wBAAgB,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAM9D;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAQnC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAT3B,MAAM,CAAC,OAAO,WAAyD;IAEvE,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,eAAe,CAAS;gBAG9B,QAAQ,EAAE,QAAQ,EACD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,QAAQ;IAerC;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;IA0BjE;;;OAGG;IACH,QAAQ,CACN,KAAK,EAAE,YAAY,EACnB,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,cAAc,CAAA;KAAO,GAC3D,IAAI;IAyFP,MAAM,IAAI,IAAI;IAId,wGAAwG;IACxG,OAAO,CAAC,uBAAuB;IAS/B,uGAAuG;IACvG,gBAAgB,IAAI,IAAI;IAIxB,aAAa,IAAI;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,cAAc,CAAA;KAAE,GAAG,IAAI;CASxF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
2
2
|
import { WardleyMap } from '@miragon/wardley-schema-model';
|
|
3
|
-
import { default as WardleyExporter } from '../io/WardleyExporter.js';
|
|
3
|
+
import { default as WardleyExporter, CommittedShapeFields } from '../io/WardleyExporter.js';
|
|
4
|
+
import { WardleyShape } from '../model/di-types.js';
|
|
4
5
|
/** The config fields a live preview changes: the plot size, the X-axis stage labels. */
|
|
5
6
|
export type PreviewedField = "size" | "evolutionLabels";
|
|
6
7
|
/**
|
|
@@ -12,14 +13,17 @@ export declare const COMMAND_START_EVENTS: string[];
|
|
|
12
13
|
export declare const PUT_BACK_PRIORITY = 10000;
|
|
13
14
|
/**
|
|
14
15
|
* The document as it was committed while a live preview (a plot-resize drag, the size or the axis
|
|
15
|
-
* labels being typed into a popover
|
|
16
|
-
* export at any moment, also mid-drag, and must store the
|
|
16
|
+
* labels being typed into a popover, the drag of an evolve target or a label) shows something else
|
|
17
|
+
* on the canvas. A host autosaves the export at any moment, also mid-drag, and must store the
|
|
18
|
+
* document, never the preview.
|
|
17
19
|
*/
|
|
18
20
|
export default class LivePreview {
|
|
21
|
+
private readonly eventBus;
|
|
19
22
|
private readonly exporter;
|
|
20
23
|
static $inject: string[];
|
|
21
24
|
private committed;
|
|
22
25
|
private readonly previewed;
|
|
26
|
+
private readonly committedShapes;
|
|
23
27
|
constructor(eventBus: EventBus, exporter: WardleyExporter);
|
|
24
28
|
/** Before a preview changes `field` on the canvas: keeps the document as it is now. */
|
|
25
29
|
begin(field: PreviewedField): void;
|
|
@@ -28,8 +32,19 @@ export default class LivePreview {
|
|
|
28
32
|
* committed). The preview of the other field may still be open and keeps its committed value.
|
|
29
33
|
*/
|
|
30
34
|
end(field: PreviewedField): void;
|
|
35
|
+
/**
|
|
36
|
+
* Before a drag previews an evolve target or a label offset on `shape`: keeps both as the
|
|
37
|
+
* document has them, from the first preview until `putBackShape`. Returns the kept ones, which
|
|
38
|
+
* the preview builds on.
|
|
39
|
+
*/
|
|
40
|
+
beginShape(shape: WardleyShape): CommittedShapeFields;
|
|
41
|
+
/** Whether a drag previews on `shape`. */
|
|
42
|
+
previewsShape(shape: WardleyShape): boolean;
|
|
43
|
+
/** Shows `shape` as the document has it again, if a drag previews on it. */
|
|
44
|
+
putBackShape(shape: WardleyShape): void;
|
|
31
45
|
/** The committed document while a preview is open, `undefined` while none is. */
|
|
32
46
|
committedMap(): WardleyMap | undefined;
|
|
47
|
+
private exportCommitted;
|
|
33
48
|
private endAll;
|
|
34
49
|
private withCommittedFields;
|
|
35
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LivePreview.d.ts","sourceRoot":"","sources":["../../src/live-preview/LivePreview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAa,UAAU,EAAE,MAAM,+BAA+B,CAAC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AG,IAAI;IAWvC,iFAAiF;IACjF,YAAY,IAAI,UAAU,GAAG,SAAS;IAKtC,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,mBAAmB;CAS5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleDeclaration } from 'didi';
|
|
2
|
-
/** The committed document behind a live preview (map size, axis labels). */
|
|
2
|
+
/** The committed document behind a live preview (map size, axis labels, evolve targets, labels). */
|
|
3
3
|
export declare const livePreviewModule: ModuleDeclaration;
|
|
4
4
|
export { default as LivePreview, COMMAND_START_EVENTS, PUT_BACK_PRIORITY } from './LivePreview.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/live-preview/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAG9C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/live-preview/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAG9C,oGAAoG;AACpG,eAAO,MAAM,iBAAiB,EAAE,iBAE/B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AxisLabelsPopover.d.ts","sourceRoot":"","sources":["../../src/map-menu/AxisLabelsPopover.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AxisLabelsPopover.d.ts","sourceRoot":"","sources":["../../src/map-menu/AxisLabelsPopover.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAWtB;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,aAAa,CA2F9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapSizePopover.d.ts","sourceRoot":"","sources":["../../src/map-menu/MapSizePopover.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MapSizePopover.d.ts","sourceRoot":"","sources":["../../src/map-menu/MapSizePopover.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAiBtB;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,aAAa,CAkG3F"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { DialogChrome, MapDialog } from './dialog.js';
|
|
2
2
|
import { MapShortcutOptions, ShortcutsChrome } from './shortcuts.js';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* What the dialog needs of the chrome around the map; a `@miragon/modeler-shell` handle fits.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Since 0.14.0, removed in 0.15.0 (#258), with `createShortcutsDialog`.
|
|
7
|
+
*/
|
|
4
8
|
export interface ShortcutsDialogChrome extends ShortcutsChrome, DialogChrome {
|
|
5
9
|
readonly messages: ShortcutsChrome["messages"] & DialogChrome["messages"];
|
|
6
10
|
}
|
|
11
|
+
/** @deprecated Since 0.14.0, removed in 0.15.0 (#258), with `createShortcutsDialog`. */
|
|
7
12
|
export type ShortcutsDialog = MapDialog;
|
|
8
13
|
/**
|
|
9
14
|
* The "Keyboard shortcuts…" dialog of the Help group (guide §5.4, §8): one table per group, the
|
|
10
15
|
* keys as chips like the chrome tooltip's. A web app that binds keys of its own (Open…, the map
|
|
11
16
|
* file's export, `?`) passes them in `options`, so the dialog lists them as well.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Since 0.14.0, removed in 0.15.0 (#258). The shell opens the same dialog with the
|
|
19
|
+
* groups as data: `shell.showShortcutsDialog(mapShortcuts(shell, options))` on a mounted shell,
|
|
20
|
+
* `showShortcutsDialog(mapShortcuts(chrome, options), { container })` of `@miragon/modeler-shell`
|
|
21
|
+
* in a host without one.
|
|
12
22
|
*/
|
|
13
23
|
export declare function createShortcutsDialog(chrome: ShortcutsDialogChrome, options?: MapShortcutOptions): ShortcutsDialog;
|
|
14
24
|
//# sourceMappingURL=ShortcutsDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShortcutsDialog.d.ts","sourceRoot":"","sources":["../../src/map-menu/ShortcutsDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAEjF,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAIxB
|
|
1
|
+
{"version":3,"file":"ShortcutsDialog.d.ts","sourceRoot":"","sources":["../../src/map-menu/ShortcutsDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAEjF,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAIxB;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe,EAAE,YAAY;IAC1E,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;CAC3E;AAED,wFAAwF;AACxF,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AAqBxC;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,OAAO,GAAE,kBAAuB,GAC/B,eAAe,CAejB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleDialog.d.ts","sourceRoot":"","sources":["../../src/map-menu/TitleDialog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"TitleDialog.d.ts","sourceRoot":"","sources":["../../src/map-menu/TitleDialog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAiC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAG/F,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC7C,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC;AAMpC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,GAAG,WAAW,CAiE1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/map-menu/popover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/map-menu/popover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAM7C,iGAAiG;AACjG,MAAM,WAAW,aAAa;IAC5B,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;KAAE,CAAC;CAClD;AAED,gGAAgG;AAChG,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,QA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B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;CACvC;AAwDD;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,kBAAuB,GAC/B,aAAa,EAAE,CAwEjB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ModuleDeclaration } from 'didi';
|
|
2
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
3
|
+
import { default as HoverTooltip } from 'diagram-js/lib/features/hover-tooltip/HoverTooltip';
|
|
4
|
+
/**
|
|
5
|
+
* diagram-js's hover tooltip (checked up to 15.28.1) shows a palette entry's tooltip 300ms after
|
|
6
|
+
* the pointer enters the entry and cancels that only when the pointer leaves, never on
|
|
7
|
+
* `diagram.destroy`: the timer then renders into the destroyed canvas and throws a TypeError in the
|
|
8
|
+
* host's page. HoverTooltip has no public way to cancel a show, so this clears its timer and the
|
|
9
|
+
* content it would render. A host that replaced the service with `null` has nothing to cancel.
|
|
10
|
+
*/
|
|
11
|
+
export default class WardleyHoverTooltipTeardown {
|
|
12
|
+
static $inject: string[];
|
|
13
|
+
constructor(eventBus: EventBus, hoverTooltip: HoverTooltip | null);
|
|
14
|
+
}
|
|
15
|
+
/** Cancels the palette tooltip that waits to show when the modeler is destroyed. */
|
|
16
|
+
export declare const wardleyHoverTooltipTeardownModule: ModuleDeclaration;
|
|
17
|
+
//# sourceMappingURL=WardleyHoverTooltipTeardown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WardleyHoverTooltipTeardown.d.ts","sourceRoot":"","sources":["../../src/palette/WardleyHoverTooltipTeardown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAEzD,OAAO,KAAK,YAAY,MAAM,oDAAoD,CAAC;AAWnF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,2BAA2B;IAC9C,MAAM,CAAC,OAAO,WAAgC;gBAElC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI;CASlE;AAED,oFAAoF;AACpF,eAAO,MAAM,iCAAiC,EAAE,iBAI/C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as EventBus } from 'diagram-js/lib/core/EventBus';
|
|
2
|
+
import { Injector } from 'didi';
|
|
3
|
+
/**
|
|
4
|
+
* `aria-pressed` on the tools of the renderer's own palette (lasso, draw), `"true"` on the armed one
|
|
5
|
+
* (guide §5.5, §5.14), for a host without the Miragon modeler shell, whose palette skin does the
|
|
6
|
+
* same. diagram-js marks the armed tool with its `highlighted-entry` class only, and after it rebuilt
|
|
7
|
+
* the entries that class no longer reaches them: diagram-js keeps the tools group it found first. So
|
|
8
|
+
* the armed tool comes from `tool-manager.update`, and every rebuild (`palette.changed`) gets the
|
|
9
|
+
* state again; `wardley.css` keys the armed ring on it. A palette any chrome skins
|
|
10
|
+
* (`data-chrome="palette"`) is left to that chrome.
|
|
11
|
+
*/
|
|
12
|
+
export default class WardleyPaletteArmedTool {
|
|
13
|
+
static $inject: string[];
|
|
14
|
+
private container;
|
|
15
|
+
private armedTool;
|
|
16
|
+
constructor(eventBus: EventBus, injector: Injector);
|
|
17
|
+
private apply;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=WardleyPaletteArmedTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WardleyPaletteArmedTool.d.ts","sourceRoot":"","sources":["../../src/palette/WardleyPaletteArmedTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAKrC;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAuB;IAC1C,MAAM,CAAC,OAAO,WAA4B;IAE1C,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,SAAS,CAAuB;gBAE5B,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IAYlD,OAAO,CAAC,KAAK;CAUd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WardleyPaletteKeyboard.d.ts","sourceRoot":"","sources":["../../src/palette/WardleyPaletteKeyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"WardleyPaletteKeyboard.d.ts","sourceRoot":"","sources":["../../src/palette/WardleyPaletteKeyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAQtE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAQvC,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAR3B,MAAM,CAAC,OAAO,WAAiE;IAE/E,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,YAAY,CAAqB;gBAGvC,QAAQ,EAAE,QAAQ,EACD,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,sBAAsB,EACjD,QAAQ,EAAE,QAAQ;IAapB,OAAO,CAAC,MAAM;IAkBd,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,SAAS;IA+BjB,OAAO,CAAC,QAAQ;CAYjB"}
|