@miragon/context-maps-renderer 0.1.0 → 0.3.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.
Files changed (94) hide show
  1. package/README.md +97 -25
  2. package/dist/CmBaseViewer.d.ts +55 -8
  3. package/dist/CmBaseViewer.d.ts.map +1 -1
  4. package/dist/Modeler.d.ts +4 -2
  5. package/dist/Modeler.d.ts.map +1 -1
  6. package/dist/NavigatedViewer.d.ts +1 -1
  7. package/dist/NavigatedViewer.d.ts.map +1 -1
  8. package/dist/behaviors/CmFlatModelBehavior.d.ts.map +1 -1
  9. package/dist/chrome/ShortcutsDialog.d.ts +13 -0
  10. package/dist/chrome/ShortcutsDialog.d.ts.map +1 -0
  11. package/dist/chrome/TitleDialog.d.ts +15 -0
  12. package/dist/chrome/TitleDialog.d.ts.map +1 -0
  13. package/dist/chrome/dialog.d.ts +39 -0
  14. package/dist/chrome/dialog.d.ts.map +1 -0
  15. package/dist/chrome/index.d.ts +10 -0
  16. package/dist/chrome/index.d.ts.map +1 -0
  17. package/dist/chrome/menu.d.ts +50 -0
  18. package/dist/chrome/menu.d.ts.map +1 -0
  19. package/dist/chrome/shortcuts.d.ts +41 -0
  20. package/dist/chrome/shortcuts.d.ts.map +1 -0
  21. package/dist/collaborative/CollaborativeContextMaps.d.ts +28 -0
  22. package/dist/collaborative/CollaborativeContextMaps.d.ts.map +1 -0
  23. package/dist/collaborative/index.d.ts +2 -0
  24. package/dist/collaborative/index.d.ts.map +1 -0
  25. package/dist/connect-handles/CmConnectHandles.d.ts +3 -1
  26. package/dist/connect-handles/CmConnectHandles.d.ts.map +1 -1
  27. package/dist/connect-handles/index.d.ts.map +1 -1
  28. package/dist/context-maps.css +1 -1
  29. package/dist/context-pad/CmContextPadProvider.d.ts +100 -0
  30. package/dist/context-pad/CmContextPadProvider.d.ts.map +1 -0
  31. package/dist/context-pad/index.d.ts +4 -0
  32. package/dist/context-pad/index.d.ts.map +1 -0
  33. package/dist/draw/ContextMapsRenderer.d.ts +4 -0
  34. package/dist/draw/ContextMapsRenderer.d.ts.map +1 -1
  35. package/dist/draw/lucide.d.ts +29 -0
  36. package/dist/draw/lucide.d.ts.map +1 -0
  37. package/dist/draw/palette-icons.d.ts +8 -3
  38. package/dist/draw/palette-icons.d.ts.map +1 -1
  39. package/dist/draw/styles.d.ts +11 -0
  40. package/dist/draw/styles.d.ts.map +1 -1
  41. package/dist/hover-tooltip/CmHoverTooltip.d.ts +16 -0
  42. package/dist/hover-tooltip/CmHoverTooltip.d.ts.map +1 -0
  43. package/dist/hover-tooltip/index.d.ts +5 -0
  44. package/dist/hover-tooltip/index.d.ts.map +1 -0
  45. package/dist/index.d.ts +13 -2
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +1852 -553
  48. package/dist/index.js.map +1 -1
  49. package/dist/io/CmExporter.d.ts +1 -3
  50. package/dist/io/CmExporter.d.ts.map +1 -1
  51. package/dist/io/CmImporter.d.ts +13 -1
  52. package/dist/io/CmImporter.d.ts.map +1 -1
  53. package/dist/io/saveSvg.d.ts.map +1 -1
  54. package/dist/io/types.d.ts +10 -1
  55. package/dist/io/types.d.ts.map +1 -1
  56. package/dist/keyboard/CmKeyboard.d.ts +11 -1
  57. package/dist/keyboard/CmKeyboard.d.ts.map +1 -1
  58. package/dist/keyboard/index.d.ts +2 -1
  59. package/dist/keyboard/index.d.ts.map +1 -1
  60. package/dist/label-editing/CmLabelEditing.d.ts +66 -3
  61. package/dist/label-editing/CmLabelEditing.d.ts.map +1 -1
  62. package/dist/label-editing/index.d.ts +1 -1
  63. package/dist/label-editing/index.d.ts.map +1 -1
  64. package/dist/legend/CmLegend.d.ts +15 -0
  65. package/dist/legend/CmLegend.d.ts.map +1 -0
  66. package/dist/legend/index.d.ts +10 -0
  67. package/dist/legend/index.d.ts.map +1 -0
  68. package/dist/legend/legendContent.d.ts +38 -0
  69. package/dist/legend/legendContent.d.ts.map +1 -0
  70. package/dist/model/CmElementFactory.d.ts +2 -1
  71. package/dist/model/CmElementFactory.d.ts.map +1 -1
  72. package/dist/model/di-types.d.ts +4 -0
  73. package/dist/model/di-types.d.ts.map +1 -1
  74. package/dist/modeling/CmModeling.d.ts +2 -0
  75. package/dist/modeling/CmModeling.d.ts.map +1 -1
  76. package/dist/modeling/cmd/UpdateTitleHandler.d.ts +17 -0
  77. package/dist/modeling/cmd/UpdateTitleHandler.d.ts.map +1 -0
  78. package/dist/palette/CmPaletteProvider.d.ts +29 -2
  79. package/dist/palette/CmPaletteProvider.d.ts.map +1 -1
  80. package/dist/palette/index.d.ts +2 -1
  81. package/dist/palette/index.d.ts.map +1 -1
  82. package/dist/read-only/CmReadOnly.d.ts +20 -0
  83. package/dist/read-only/CmReadOnly.d.ts.map +1 -0
  84. package/dist/read-only/index.d.ts +5 -0
  85. package/dist/read-only/index.d.ts.map +1 -0
  86. package/dist/rules/CmRules.d.ts.map +1 -1
  87. package/dist/rules/index.d.ts +1 -1
  88. package/dist/rules/index.d.ts.map +1 -1
  89. package/dist/theme/palette.d.ts +26 -22
  90. package/dist/theme/palette.d.ts.map +1 -1
  91. package/dist/validation/CmValidationMarkers.d.ts.map +1 -1
  92. package/package.json +15 -6
  93. package/dist/draw/icons.d.ts +0 -10
  94. package/dist/draw/icons.d.ts.map +0 -1
@@ -1,11 +1,9 @@
1
- import { default as Canvas } from 'diagram-js/lib/core/Canvas';
2
1
  import { default as ElementRegistry } from 'diagram-js/lib/core/ElementRegistry';
3
2
  import { CmDocument } from '@miragon/context-maps-schema-model';
4
3
  export default class CmExporter {
5
4
  private readonly elementRegistry;
6
- private readonly canvas;
7
5
  static $inject: string[];
8
- constructor(elementRegistry: ElementRegistry, canvas: Canvas);
6
+ constructor(elementRegistry: ElementRegistry);
9
7
  export(): CmDocument;
10
8
  }
11
9
  //# sourceMappingURL=CmExporter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CmExporter.d.ts","sourceRoot":"","sources":["../../src/io/CmExporter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAGvE,OAAO,KAAK,EAAgC,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAInG,MAAM,CAAC,OAAO,OAAO,UAAU;IAI3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJzB,MAAM,CAAC,OAAO,WAAiC;gBAG5B,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,MAAM;IAGjC,MAAM,IAAI,UAAU;CAyDrB"}
1
+ {"version":3,"file":"CmExporter.d.ts","sourceRoot":"","sources":["../../src/io/CmExporter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAGvE,OAAO,KAAK,EAAgC,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAInG,MAAM,CAAC,OAAO,OAAO,UAAU;IAGjB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAF5C,MAAM,CAAC,OAAO,WAAuB;gBAER,eAAe,EAAE,eAAe;IAE7D,MAAM,IAAI,UAAU;CAwDrB"}
@@ -13,8 +13,20 @@ export default class CmImporter {
13
13
  private readonly elementRegistry;
14
14
  static $inject: string[];
15
15
  constructor(canvas: Canvas, elementFactory: ElementFactory, factory: CmElementFactory, eventBus: EventBus, elementRegistry: ElementRegistry);
16
+ /**
17
+ * Throws when `doc` cannot be drawn: diagram-js keeps one element per id, so a duplicate or an id
18
+ * of its own roots would throw halfway through the import, after the previous document was
19
+ * cleared. Checked before anything is removed, so a rejected import leaves no trace.
20
+ */
21
+ assertImportable(doc: CmDocument): void;
16
22
  import(doc: CmDocument): ImportWarning[];
17
- /** Removes every element (for re-import). */
23
+ /**
24
+ * The document root, created on the first import. Any other root goes: diagram-js creates an
25
+ * implicit one whenever something asks for the root before the first import (an export, a
26
+ * palette create), and it would stay in the registry next to the document's root.
27
+ */
28
+ private documentRoot;
29
+ /** Removes every element but the roots (removing a root as a shape corrupts the canvas). */
18
30
  clear(): void;
19
31
  }
20
32
  //# sourceMappingURL=CmImporter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CmImporter.d.ts","sourceRoot":"","sources":["../../src/io/CmImporter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,cAAc,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAW,KAAK,aAAa,EAA2B,MAAM,YAAY,CAAC;AA4BlF,MAAM,CAAC,OAAO,OAAO,UAAU;IAI3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAPlC,MAAM,CAAC,OAAO,WAAmF;gBAG9E,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe;IAGnD,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,aAAa,EAAE;IAmDxC,6CAA6C;IAC7C,KAAK,IAAI,IAAI;CAWd"}
1
+ {"version":3,"file":"CmImporter.d.ts","sourceRoot":"","sources":["../../src/io/CmImporter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK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Root":"","sources":["../../src/io/saveSvg.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAQvE,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CA4CzF"}
@@ -1,11 +1,20 @@
1
+ import { Relationship } from '@miragon/context-maps-schema-model';
2
+ export { isReservedId } from '@miragon/context-maps-schema-model';
1
3
  /** ID of the diagram-js root element holding the Context Maps diagram. */
2
4
  export declare const ROOT_ID = "cm-root";
3
5
  export interface ImportWarning {
4
6
  readonly message: string;
5
7
  readonly elementId?: string;
6
8
  }
7
- /** Diagram-level metadata stashed on the root element. */
9
+ /** Diagram-level data stashed on the root element. */
8
10
  export interface RootBusinessObject {
9
11
  title: string;
12
+ /** Keys of the document this version does not know, written back on export. */
13
+ foreign?: Record<string, unknown>;
14
+ /**
15
+ * Relationships whose ends are not both contexts of the map. The canvas cannot draw them, but
16
+ * they stay in the document (and in the Problems view) until the text fixes them.
17
+ */
18
+ unplacedRelationships?: Relationship[];
10
19
  }
11
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/io/types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,eAAO,MAAM,OAAO,YAAY,CAAC;AAEjC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,0DAA0D;AAC1D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/io/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,0EAA0E;AAC1E,eAAO,MAAM,OAAO,YAAkB,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,YAAY,EAAE,CAAC;CACxC"}
@@ -1,9 +1,19 @@
1
1
  import { default as Canvas } from 'diagram-js/lib/core/Canvas';
2
2
  import { default as CommandStack } from 'diagram-js/lib/command/CommandStack';
3
+ import { default as ElementRegistry } from 'diagram-js/lib/core/ElementRegistry';
4
+ import { default as EventBus } from 'diagram-js/lib/core/EventBus';
3
5
  import { default as Selection } from 'diagram-js/lib/features/selection/Selection';
4
6
  import { default as Modeling } from 'diagram-js/lib/features/modeling/Modeling';
7
+ import { default as CmReadOnly } from '../read-only/CmReadOnly.js';
8
+ export interface CmKeyboardConfig {
9
+ /**
10
+ * Bind Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z and Cmd/Ctrl+Y to the canvas command stack (default true).
11
+ * A host that owns the history (the VS Code document) passes false, so the keys reach it.
12
+ */
13
+ undoRedoKeys?: boolean | undefined;
14
+ }
5
15
  export default class CmKeyboard {
6
16
  static $inject: string[];
7
- constructor(canvas: Canvas, commandStack: CommandStack, selection: Selection, modeling: Modeling);
17
+ constructor(config: CmKeyboardConfig | undefined, canvas: Canvas, commandStack: CommandStack, selection: Selection, modeling: Modeling, elementRegistry: ElementRegistry, eventBus: EventBus, readOnly: Pick<CmReadOnly, "isReadOnly">);
8
18
  }
9
19
  //# sourceMappingURL=CmKeyboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CmKeyboard.d.ts","sourceRoot":"","sources":["../../src/keyboard/CmKeyboard.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AACzE,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AActE,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,MAAM,CAAC,OAAO,WAAuD;gBAGnE,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ;CAwBrB"}
1
+ {"version":3,"file":"CmKeyboard.d.ts","sourceRoot":"","sources":["../../src/keyboard/CmKeyboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,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;AACzD,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AACzE,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AAGtE,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACpC;AA6BD,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,MAAM,CAAC,OAAO,WASZ;gBAGA,MAAM,EAAE,gBAAgB,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC;CAyC3C"}
@@ -1,5 +1,6 @@
1
1
  import { ModuleDeclaration } from 'didi';
2
- /** Undo/redo + delete-selection on the canvas container. */
2
+ /** Select all, undo/redo and delete-selection for keys aimed at the canvas. */
3
3
  export declare const cmKeyboardModule: ModuleDeclaration;
4
4
  export { default as CmKeyboard } from './CmKeyboard.js';
5
+ export type { CmKeyboardConfig } from './CmKeyboard.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAG9C,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,EAAE,iBAG9B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,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;AAI9C,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,EAAE,iBAI9B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,14 +1,77 @@
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
- import { CmElement } from '../model/di-types.js';
4
+ import { Element } from 'diagram-js/lib/model/Types';
5
+ import { CmContext, CmElement } from '../model/di-types.js';
4
6
  import { default as CmModeling } from '../modeling/CmModeling.js';
7
+ import { CmReadOnly } from '../read-only/index.js';
8
+ interface DirectEditingContext {
9
+ bounds: {
10
+ x: number;
11
+ y: number;
12
+ width: number;
13
+ height: number;
14
+ };
15
+ text: string;
16
+ style?: Record<string, string | number>;
17
+ options?: {
18
+ centerVertically?: boolean;
19
+ autoResize?: boolean;
20
+ resizable?: boolean;
21
+ };
22
+ }
23
+ interface DirectEditingService {
24
+ registerProvider(provider: {
25
+ activate(element: Element): DirectEditingContext | undefined;
26
+ update(element: Element, newText: string): void;
27
+ }): void;
28
+ activate(element: Element): boolean;
29
+ isActive(element?: Element): boolean;
30
+ cancel(): void;
31
+ complete(): void;
32
+ getValue(): string;
33
+ /** The text box's parent element of the edit open right now. */
34
+ $textbox?: HTMLElement;
35
+ }
5
36
  export default class CmLabelEditing {
6
37
  private readonly canvas;
38
+ private readonly directEditing;
7
39
  private readonly modeling;
40
+ private readonly elementRegistry;
41
+ private readonly readOnly;
8
42
  static $inject: string[];
9
- private active;
10
- constructor(eventBus: EventBus, canvas: Canvas, modeling: CmModeling);
43
+ /** Which property the CURRENT activation edits (set right before activate). */
44
+ private mode;
45
+ private activeMarker?;
46
+ private suspended?;
47
+ private resumeTimer?;
48
+ constructor(eventBus: EventBus, canvas: Canvas, directEditing: DirectEditingService, modeling: CmModeling, elementRegistry: ElementRegistry, readOnly: Pick<CmReadOnly, "isReadOnly">);
49
+ /**
50
+ * Takes an open edit down WITHOUT committing it, for an import that replaces the elements: a
51
+ * commit (the import's viewbox change triggers one) would land on a removed shape and be wiped
52
+ * with the history. `resumeAfterImport` brings the editor back with the typed text.
53
+ */
54
+ suspend(): void;
55
+ /**
56
+ * Reopens a suspended edit on the element with the same id, if the imported document still has
57
+ * it. Deferred to the next task, after the host has restored its viewbox around the import (a
58
+ * viewbox change commits an open editor).
59
+ */
60
+ resumeAfterImport(): void;
61
+ /** The edit open right now (its element and the uncommitted text), for hosts and tests. */
62
+ openEdit(): {
63
+ elementId: string;
64
+ text: string;
65
+ } | undefined;
66
+ private resume;
67
+ /** Start in-place editing of the element's name (context pad, hosts). */
11
68
  activate(element: CmElement): void;
69
+ /** Start in-place editing of the owning-team caption at the box bottom. */
70
+ activateTeam(context: CmContext): void;
12
71
  cancel(): void;
72
+ private isInTeamBand;
73
+ private activationContext;
74
+ private commit;
13
75
  }
76
+ export {};
14
77
  //# sourceMappingURL=CmLabelEditing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CmLabelEditing.d.ts","sourceRoot":"","sources":["../../src/label-editing/CmLabelEditing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AAOxD,MAAM,CAAC,OAAO,OAAO,cAAc;IAO/B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAP3B,MAAM,CAAC,OAAO,WAAwC;IAEtD,OAAO,CAAC,MAAM,CAA2B;gBAGvC,QAAQ,EAAE,QAAQ,EACD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,UAAU;IAWvC,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI;IAuDlC,MAAM,IAAI,IAAI;CAGf"}
1
+ {"version":3,"file":"CmLabelEditing.d.ts","sourceRoot":"","sources":["../../src/label-editing/CmLabelEditing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAa,MAAM,4BAA4B,CAAC;AAErE,OAAO,EAA4B,KAAK,SAAS,EAAE,KAAK,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AAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IArB3B,MAAM,CAAC,OAAO,WAOZ;IAEF,+EAA+E;IAC/E,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,YAAY,CAAC,CAAuC;IAC5D,OAAO,CAAC,SAAS,CAAC,CAAgB;IAClC,OAAO,CAAC,WAAW,CAAC,CAAgC;gBAGlD,QAAQ,EAAE,QAAQ,EACD,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,oBAAoB,EACnC,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC;IAqD3D;;;;OAIG;IACH,OAAO,IAAI,IAAI;IAYf;;;;OAIG;IACH,iBAAiB,IAAI,IAAI;IAUzB,2FAA2F;IAC3F,QAAQ,IAAI;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAM3D,OAAO,CAAC,MAAM;IAYd,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI;IAKlC,2EAA2E;IAC3E,YAAY,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI;IAKtC,MAAM,IAAI,IAAI;IAId,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,iBAAiB;IA6EzB,OAAO,CAAC,MAAM;CAaf"}
@@ -1,5 +1,5 @@
1
1
  import { ModuleDeclaration } from 'didi';
2
- /** Inline label editing (double-click a team to rename). */
2
+ /** In-place name editing (double-click / context pad), bpmn.io style. */
3
3
  export declare const cmLabelEditingModule: ModuleDeclaration;
4
4
  export { default as CmLabelEditing } from './CmLabelEditing.js';
5
5
  //# 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,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,EAAE,iBAGlC,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,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;AAM9C,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,EAAE,iBAIlC,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { default as Canvas } from 'diagram-js/lib/core/Canvas';
2
+ import { default as EventBus } from 'diagram-js/lib/core/EventBus';
3
+ export default class CmLegend {
4
+ static $inject: string[];
5
+ private openState;
6
+ private readonly host;
7
+ constructor(canvas: Canvas, eventBus: EventBus);
8
+ isOpen(): boolean;
9
+ setOpen(open: boolean): void;
10
+ toggle(): void;
11
+ private render;
12
+ private panel;
13
+ private collapsedButton;
14
+ }
15
+ //# sourceMappingURL=CmLegend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CmLegend.d.ts","sourceRoot":"","sources":["../../src/legend/CmLegend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAyCzD,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,MAAM,CAAC,OAAO,WAA0B;IAExC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;gBAEvB,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAO9C,MAAM,IAAI,OAAO;IAIjB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAM5B,MAAM,IAAI,IAAI;IAId,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,KAAK;IA4Bb,OAAO,CAAC,eAAe;CAUxB"}
@@ -0,0 +1,10 @@
1
+ import { ModuleDeclaration } from 'didi';
2
+ /**
3
+ * The legend as a card on the canvas, for hosts without the Miragon modeler shell; with the shell,
4
+ * render `renderLegend` into its legend instead.
5
+ */
6
+ export declare const cmLegendModule: ModuleDeclaration;
7
+ export { default as CmLegend } from './CmLegend.js';
8
+ export { legendGroups, renderLegend } from './legendContent.js';
9
+ export type { LegendGroup, LegendRenderOptions, LegendRow, LegendTooltip, } from './legendContent.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legend/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAG9C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,iBAG5B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,SAAS,EACT,aAAa,GACd,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The notation legend's content — subdomain types, integration roles and relationship patterns —
3
+ * driven entirely by the notation spec, so it can never drift from what the canvas draws. The
4
+ * Miragon modeler shell renders it into its legend card (`legend.render`); the rows use the
5
+ * shell's row classes, so they look like every other modeler's legend.
6
+ */
7
+ export interface LegendRow {
8
+ /** The 24px notation preview, as SVG markup (the palette's and the context pad's). */
9
+ readonly preview: string;
10
+ readonly label: string;
11
+ /** What the notation means, for the row's tooltip. */
12
+ readonly explanation: string;
13
+ }
14
+ export interface LegendGroup {
15
+ readonly label: string;
16
+ readonly rows: readonly LegendRow[];
17
+ }
18
+ /** The legend's groups and rows, in reading order. */
19
+ export declare function legendGroups(): LegendGroup[];
20
+ /**
21
+ * The chrome tooltip of the host (the shell's `shell.tooltip`): shown after the hover delay, on
22
+ * the chrome's tooltip layer above the legend, so a glass card's backdrop filter cannot clip it.
23
+ */
24
+ export interface LegendTooltip {
25
+ attach(control: HTMLElement, content: {
26
+ label: string;
27
+ }): () => void;
28
+ }
29
+ export interface LegendRenderOptions {
30
+ /** Explains each row on hover; without it the explanation is the row's hidden description. */
31
+ readonly tooltip?: LegendTooltip | undefined;
32
+ }
33
+ /**
34
+ * Renders the legend's rows into `body` (the shell's `legend.render`) and returns the function
35
+ * that detaches their tooltips again.
36
+ */
37
+ export declare function renderLegend(body: HTMLElement, options?: LegendRenderOptions): () => void;
38
+ //# sourceMappingURL=legendContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legendContent.d.ts","sourceRoot":"","sources":["../../src/legend/legendContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,WAAW,SAAS;IACxB,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;CACrC;AAaD,sDAAsD;AACtD,wBAAgB,YAAY,IAAI,WAAW,EAAE,CA2B5C;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,IAAI,CAAC;CACtE;AAED,MAAM,WAAW,mBAAmB;IAClC,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,GAAE,mBAAwB,GAAG,MAAM,IAAI,CAqC7F"}
@@ -8,6 +8,7 @@ export default class CmElementFactory {
8
8
  constructor(elementFactory: ElementFactory);
9
9
  createContext(ctx: BoundedContext): CmContext;
10
10
  createRelationship(rel: Relationship, source: CmContext, target: CmContext, waypoints: Point[]): CmRelationship;
11
- createNewContext(subdomainType: SubdomainType, label?: string): CmContext;
11
+ /** No type → an unclassified context (the pad's append action starts blank). */
12
+ createNewContext(subdomainType?: SubdomainType, label?: string): CmContext;
12
13
  }
13
14
  //# sourceMappingURL=CmElementFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CmElementFactory.d.ts","sourceRoot":"","sources":["../../src/model/CmElementFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,cAAc,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,CAAC,OAAO,OAAO,gBAAgB;IAGvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAF3C,MAAM,CAAC,OAAO,WAAsB;gBAEP,cAAc,EAAE,cAAc;IAI3D,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS;IAiB7C,kBAAkB,CAChB,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,KAAK,EAAE,GACjB,cAAc;IAuBjB,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS;CAU1E"}
1
+ {"version":3,"file":"CmElementFactory.d.ts","sourceRoot":"","sources":["../../src/model/CmElementFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,cAAc,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAOvD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAW/D,MAAM,CAAC,OAAO,OAAO,gBAAgB;IAGvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAF3C,MAAM,CAAC,OAAO,WAAsB;gBAEP,cAAc,EAAE,cAAc;IAI3D,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS;IAuB7C,kBAAkB,CAChB,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,KAAK,EAAE,GACjB,cAAc;IAwBjB,gFAAgF;IAChF,gBAAgB,CAAC,aAAa,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS;CAa3E"}
@@ -10,6 +10,8 @@ export interface CmContext extends Shape {
10
10
  description?: string;
11
11
  fill?: string;
12
12
  stroke?: string;
13
+ /** Keys of the document's context this version does not know, written back on export. */
14
+ cmForeign?: Record<string, unknown>;
13
15
  }
14
16
  export interface CmRelationship extends Connection {
15
17
  cmKind: "relationship";
@@ -19,6 +21,8 @@ export interface CmRelationship extends Connection {
19
21
  cmLabel?: string;
20
22
  description?: string;
21
23
  implementationTechnology?: string;
24
+ /** Keys of the document's relationship this version does not know, written back on export. */
25
+ cmForeign?: Record<string, unknown>;
22
26
  }
23
27
  export type CmElement = CmContext | CmRelationship;
24
28
  export declare function isCmElement(el: unknown): el is CmElement;
@@ -1 +1 @@
1
- {"version":3,"file":"di-types.d.ts","sourceRoot":"","sources":["../../src/model/di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E,OAAO,GAAG,EAAE,IAAI,cAAc,CAElE"}
@@ -9,6 +9,8 @@ export default class CmModeling {
9
9
  private readonly graphicsFactory;
10
10
  static $inject: string[];
11
11
  constructor(commandStack: CommandStack, elementRegistry: ElementRegistry, graphicsFactory: GraphicsFactory);
12
+ /** Rename the diagram (undoable). Throws while no document is loaded. */
13
+ setTitle(title: string): void;
12
14
  /**
13
15
  * Force an immediate re-render of an element's graphics. diagram-js'
14
16
  * ChangeSupport only redraws on `elements.changed` when `element.parent` is
@@ -1 +1 @@
1
- {"version":3,"file":"CmModeling.d.ts","sourceRoot":"","sources":["../../src/modeling/CmModeling.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQjF,MAAM,CAAC,OAAO,OAAO,UAAU;IAI3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe;IALlC,MAAM,CAAC,OAAO,WAA0D;gBAGrD,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,eAAe;IAMnD;;;;;OAKG;IACH,OAAO,CAAC,MAAM;IAMd,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,cAAc,GAAG,IAAI;IAO5C,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAK/E,o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,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI;IAI/E,2BAA2B,CAAC,YAAY,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;CAG1F"}
@@ -0,0 +1,17 @@
1
+ import { default as CommandHandler } from 'diagram-js/lib/command/CommandHandler';
2
+ import { default as ElementRegistry } from 'diagram-js/lib/core/ElementRegistry';
3
+ import { Element } from 'diagram-js/lib/model/Types';
4
+ export interface UpdateTitleContext {
5
+ title: string;
6
+ /** set by the handler (for revert). */
7
+ oldTitle?: string;
8
+ }
9
+ export default class UpdateTitleHandler implements CommandHandler {
10
+ private readonly elementRegistry;
11
+ static $inject: string[];
12
+ constructor(elementRegistry: ElementRegistry);
13
+ private root;
14
+ execute(context: UpdateTitleContext): Element[];
15
+ revert(context: UpdateTitleContext): Element[];
16
+ }
17
+ //# sourceMappingURL=UpdateTitleHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateTitleHandler.d.ts","sourceRoot":"","sources":["../../../src/modeling/cmd/UpdateTitleHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,cAAc,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAQ,MAAM,4BAA4B,CAAC;AAGhE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,cAAc;IAGnD,OAAO,CAAC,QAAQ,CAAC,eAAe;IAF5C,MAAM,CAAC,OAAO,WAAuB;gBAER,eAAe,EAAE,eAAe;IAE7D,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,EAAE;IAQ/C,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,EAAE;CAK/C"}
@@ -1,12 +1,39 @@
1
- import { default as Palette } from 'diagram-js/lib/features/palette/Palette';
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 Create } from 'diagram-js/lib/features/create/Create';
4
+ import { default as LassoTool } from 'diagram-js/lib/features/lasso-tool/LassoTool';
5
+ import { default as Modeling } from 'diagram-js/lib/features/modeling/Modeling';
6
+ import { default as Palette } from 'diagram-js/lib/features/palette/Palette';
3
7
  import { PaletteEntries, default as PaletteProvider } from 'diagram-js/lib/features/palette/PaletteProvider';
8
+ import { default as Selection } from 'diagram-js/lib/features/selection/Selection';
9
+ import { FreeRectInsets } from '../CmBaseViewer.js';
10
+ import { default as CmLabelEditing } from '../label-editing/CmLabelEditing.js';
4
11
  import { default as CmElementFactory } from '../model/CmElementFactory.js';
12
+ import { CmReadOnly } from '../read-only/index.js';
13
+ export interface CmPaletteConfig {
14
+ freeRectInsets?: (() => FreeRectInsets) | undefined;
15
+ }
5
16
  export default class CmPaletteProvider implements PaletteProvider {
6
17
  private readonly create;
18
+ private readonly lassoTool;
7
19
  private readonly factory;
20
+ private readonly canvas;
21
+ private readonly modeling;
22
+ private readonly selection;
23
+ private readonly elementRegistry;
24
+ private readonly labelEditing;
25
+ private readonly readOnly;
26
+ private readonly config;
8
27
  static $inject: string[];
9
- constructor(palette: Palette, create: Create, factory: CmElementFactory);
28
+ constructor(palette: Palette, create: Create, lassoTool: LassoTool, factory: CmElementFactory, canvas: Canvas, modeling: Modeling, selection: Selection, elementRegistry: ElementRegistry, labelEditing: CmLabelEditing, readOnly: Pick<CmReadOnly, "isReadOnly">, config: CmPaletteConfig | undefined);
10
29
  getPaletteEntries(): PaletteEntries;
30
+ /**
31
+ * Enter or Space on a creating entry (guide §5.5): a create that follows the pointer never ends
32
+ * without one, so the context goes straight to the centre of the free rectangle (24px down-right
33
+ * while that spot is taken), selected, with the canvas focused and its name editor open.
34
+ */
35
+ private placeInFreeRect;
36
+ /** The centre of the container minus the host's chrome, in diagram coordinates. */
37
+ private freeRectCentre;
11
38
  }
12
39
  //# sourceMappingURL=CmPaletteProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CmPaletteProvider.d.ts","sourceRoot":"","sources":["../../src/palette/CmPaletteProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,KAAK,EACV,cAAc,EACd,OAAO,IAAI,eAAe,EAC3B,MAAM,iDAAiD,CAAC;AAIzD,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AAQjE,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,eAAe;IAK7D,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAL1B,MAAM,CAAC,OAAO,WAA6C;gBAGzD,OAAO,EAAE,OAAO,EACC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB;IAK5C,iBAAiB,IAAI,cAAc;CAmBpC"}
1
+ {"version":3,"file":"CmPaletteProvider.d.ts","sourceRoot":"","sources":["../../src/palette/CmPaletteProvider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AACtE,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,EACV,cAAc,EACd,OAAO,IAAI,eAAe,EAC3B,MAAM,iDAAiD,CAAC;AACzD,OAAO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B"}
@@ -1,5 +1,6 @@
1
1
  import { ModuleDeclaration } from 'didi';
2
- /** Tool palette: drag-to-create contexts. */
2
+ /** Tool palette: lasso tool + create contexts (drag, click or Enter/Space). */
3
3
  export declare const cmPaletteModule: ModuleDeclaration;
4
4
  export { default as CmPaletteProvider } from './CmPaletteProvider.js';
5
+ export type { CmPaletteConfig } from './CmPaletteProvider.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAM9C,6CAA6C;AAC7C,eAAO,MAAM,eAAe,EAAE,iBAI7B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAW9C,+EAA+E;AAC/E,eAAO,MAAM,eAAe,EAAE,iBAa7B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { default as RuleProvider } from 'diagram-js/lib/features/rules/RuleProvider';
2
+ import { default as EventBus } from 'diagram-js/lib/core/EventBus';
3
+ /** Fired with `{ readOnly }` whenever the lock changes. */
4
+ export declare const READ_ONLY_CHANGED_EVENT = "cm.readOnly.changed";
5
+ /**
6
+ * Locks every edit on the canvas while the document behind it cannot be saved from the canvas
7
+ * (an invalid file in an IDE host, guide §13.5): no move, create, connect or delete through the
8
+ * rules, and the keyboard, context pad, connect handles and label editor consult `isReadOnly()`.
9
+ * Selection, zoom, pan and export stay.
10
+ */
11
+ export default class CmReadOnly extends RuleProvider {
12
+ private readonly bus;
13
+ static $inject: string[];
14
+ private readOnly;
15
+ constructor(bus: EventBus);
16
+ init(): void;
17
+ isReadOnly(): boolean;
18
+ setReadOnly(readOnly: boolean): void;
19
+ }
20
+ //# sourceMappingURL=CmReadOnly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CmReadOnly.d.ts","sourceRoot":"","sources":["../../src/read-only/CmReadOnly.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAEzD,2DAA2D;AAC3D,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAmB7D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAKtC,OAAO,CAAC,QAAQ,CAAC,GAAG;IAJhC,OAAgB,OAAO,WAAgB;IAEvC,OAAO,CAAC,QAAQ,CAAS;gBAEI,GAAG,EAAE,QAAQ;IAIjC,IAAI,IAAI,IAAI;IAIrB,UAAU,IAAI,OAAO;IAIrB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;CAKrC"}
@@ -0,0 +1,5 @@
1
+ import { ModuleDeclaration } from 'didi';
2
+ /** The canvas edit lock (an invalid file in an IDE host). */
3
+ export declare const cmReadOnlyModule: ModuleDeclaration;
4
+ export { default as CmReadOnly, READ_ONLY_CHANGED_EVENT } from './CmReadOnly.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/read-only/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,EAAE,iBAI9B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CmRules.d.ts","sourceRoot":"","sources":["../../src/rules/CmRules.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAkBzD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,YAAY;IAC/C,OAAgB,OAAO,WAAgB;gBAE3B,QAAQ,EAAE,QAAQ;IAIrB,IAAI,IAAI,IAAI;CAoBtB"}
1
+ {"version":3,"file":"CmRules.d.ts","sourceRoot":"","sources":["../../src/rules/CmRules.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAkBzD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,YAAY;IAC/C,OAAgB,OAAO,WAAgB;gBAE3B,QAAQ,EAAE,QAAQ;IAIrB,IAAI,IAAI,IAAI;CAqBtB"}
@@ -1,5 +1,5 @@
1
1
  import { ModuleDeclaration } from 'didi';
2
- /** Context Maps editing rules (connect, move, create, resize). */
2
+ /** Context Maps editing rules (connect, move, create — no resize). */
3
3
  export declare const cmRulesModule: ModuleDeclaration;
4
4
  export { default as CmRules } from './CmRules.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,kEAAkE;AAClE,eAAO,MAAM,aAAa,EAAE,iBAI3B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAI9C,sEAAsE;AACtE,eAAO,MAAM,aAAa,EAAE,iBAI3B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -1,21 +1,21 @@
1
1
  /**
2
- * Miragon design tokens — the single source of truth for every non-notation colour in the renderer.
2
+ * Miragon design tokens — the single source of truth for every non-notation colour the renderer
3
+ * draws into SVG.
3
4
  *
4
- * Values mirror the Miragon corporate identity: the `miragon-brand:corporate-design` skill in
5
- * `Miragon/corporate-identity`, whose vendored `cd-tokens.generated.css` (next to this file) defines
6
- * the `--cd-*` custom properties, generated from the brand's `tokens.json`. Re-copy that CSS from the
7
- * corporate-identity repo to update; never fork the hex values by hand. `theme.sync.test.ts` fails if
8
- * this mirror drifts from the vendored CSS.
5
+ * Values mirror the Miragon design system: the `miragon-brand:modeler-tool-design` skill in
6
+ * `Miragon/corporate-identity`, whose files are vendored unchanged next to this module
7
+ * (`cd-tokens.generated.css`, `cd-tokens.generated.json`, `cd-canvas.css`; design system 1.13.0).
8
+ * Re-copy them from the skill to update; never fork the hex values by hand. SVG attributes need
9
+ * literal values (exports carry presentation attributes, never `var()`), so `draw/styles.ts`
10
+ * derives its colours from `MIRAGON`; the in-canvas chrome in `assets/context-maps.css` reads the
11
+ * `--cd-ui-*` roles directly. `test/theme.sync.test.ts` fails if a value here drifts from the
12
+ * vendored files.
9
13
  *
10
- * Pure data — no DOM, no imports — so it can be consumed by the SVG-drawing constants in
11
- * `draw/styles.ts`.
12
- *
13
- * Brand rule: blue leads (`blau` — surfaces, buttons, links, selection), green accents (`gruen` — key
14
- * visual, highlights; a fill, never body text on white). The subdomain-type fills and
15
- * relationship-pattern strokes are the official Context Maps notation and live in
16
- * `schema-model/notation.ts` — they are NOT part of this brand ramp.
14
+ * Pure data — no DOM, no imports. The subdomain-type fills and relationship-pattern strokes are the
15
+ * official Context Maps notation and live in `schema-model/notation.ts`; they are NOT part of this
16
+ * brand ramp. The renderer draws light only (the modelers switch to dark together, guide §13.3).
17
17
  */
18
- /** Raw Miragon brand ramp + functional layer — exact `--cd-*` values. */
18
+ /** Raw Miragon brand ramp and status layer — the `fest` values of `cd-tokens.generated.json`. */
19
19
  export declare const MIRAGON: {
20
20
  /** Primary: surfaces, buttons, links, selection, backgrounds. */
21
21
  readonly blau: "#335DE5";
@@ -30,18 +30,22 @@ export declare const MIRAGON: {
30
30
  /** Text on light; not pure black. */
31
31
  readonly schwarz: "#1D1D1D";
32
32
  readonly weiss: "#FFFFFF";
33
- /** Functional / status layer (own layer beside the brand palette; AA as text on white). */
34
- readonly success: "#0B7A55";
35
- readonly warning: "#92610A";
36
- readonly danger: "#C92A2A";
37
- readonly info: "#2B50D4";
33
+ /** Fixed light neutral for lines and borders on a light stage. */
34
+ readonly linie: "#E6E2E2";
35
+ /**
36
+ * Status layer (guide §3.3): fills, borders, icons and dots; as text on white only `danger` and
37
+ * `info` reach AA.
38
+ */
39
+ readonly success: "#00E676";
40
+ readonly warning: "#FFB000";
41
+ readonly danger: "#CD1839";
42
+ readonly info: "#335DE5";
38
43
  /** Signature brand gradient — brand moments only. Use verbatim. */
39
44
  readonly gradientBrand: "linear-gradient(120deg, #335DE5 30%, #00E676)";
40
45
  };
41
46
  /**
42
- * Every `--cd-*` token this repo depends on, mapped to the value it MUST hold. The drift test parses
43
- * `cd-tokens.generated.css` and asserts each entry matches, so re-copying the vendored CSS with a
44
- * changed value fails CI until this mirror (and `MIRAGON`) is updated too.
47
+ * Every fixed `--cd-*` token this repo mirrors, mapped to the value it MUST hold in the vendored
48
+ * files (`fest` in the JSON, `:root` in the CSS).
45
49
  */
46
50
  export declare const CD_TOKENS: Record<string, string>;
47
51
  //# sourceMappingURL=palette.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/theme/palette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,yEAAyE;AACzE,eAAO,MAAM,OAAO;IAClB,iEAAiE;;IAEjE,sEAAsE;;IAEtE,4FAA4F;;IAE5F,gGAAgG;;IAEhG,kEAAkE;;IAElE,qCAAqC;;;IAGrC,2FAA2F;;;;;IAK3F,mEAAmE;;CAE3D,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAiB5C,CAAC"}
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/theme/palette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,iGAAiG;AACjG,eAAO,MAAM,OAAO;IAClB,iEAAiE;;IAEjE,sEAAsE;;IAEtE,4FAA4F;;IAE5F,gGAAgG;;IAEhG,kEAAkE;;IAElE,qCAAqC;;;IAGrC,kEAAkE;;IAElE;;;OAGG;;;;;IAKH,mEAAmE;;CAE3D,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAc5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CmValidationMarkers.d.ts","sourceRoot":"","sources":["../../src/validation/CmValidationMarkers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AAGtE,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AA6FlD,MAAM,CAAC,OAAO,OAAO,mBAAmB;IAKpC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAN3B,MAAM,CAAC,OAAO,WAA6D;gBAGzE,QAAQ,EAAE,QAAQ,EACD,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,UAAU;IAOvC,OAAO,CAAC,OAAO;CAuChB"}
1
+ {"version":3,"file":"CmValidationMarkers.d.ts","sourceRoot":"","sources":["../../src/validation/CmValidationMarkers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AAGtE,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAuFlD,MAAM,CAAC,OAAO,OAAO,mBAAmB;IAKpC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAN3B,MAAM,CAAC,OAAO,WAA6D;gBAGzE,QAAQ,EAAE,QAAQ,EACD,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,UAAU;IAOvC,OAAO,CAAC,OAAO;CAuChB"}