@miragon/team-topologies-renderer 0.5.0 → 0.7.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 CHANGED
@@ -52,8 +52,12 @@ modeler.redo();
52
52
  ```
53
53
 
54
54
  > **The CSS is required.** Import `@miragon/team-topologies-renderer/assets/team-topologies.css`
55
- > (it also pulls in `diagram-js`'s own stylesheet) — without it the palette, context pad and label
56
- > editor are unstyled.
55
+ > (it also pulls in `diagram-js`'s own stylesheet and the Miragon `--cd-*` brand tokens) — without it
56
+ > the palette, context pad and label editor are unstyled.
57
+
58
+ > **Typeface.** The canvas labels are drawn in the Miragon typeface **Geist**. The library does not
59
+ > ship the font; self-host it in the host app (e.g. `@fontsource-variable/geist`) so the on-screen
60
+ > canvas and exported SVG render in Geist. Without it, text falls back to a system sans.
57
61
 
58
62
  ## API
59
63
 
@@ -1 +1 @@
1
- {"version":3,"file":"Modeler.d.ts","sourceRoot":"","sources":["../src/Modeler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAQ9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAUvD;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,eAAe;cACvB,WAAW,IAAI,iBAAiB,EAAE;IAoBrD,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,OAAO;CAGnB"}
1
+ {"version":3,"file":"Modeler.d.ts","sourceRoot":"","sources":["../src/Modeler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAQ9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAWvD;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,eAAe;cACvB,WAAW,IAAI,iBAAiB,EAAE;IAqBrD,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,OAAO;CAGnB"}
@@ -0,0 +1,17 @@
1
+ import { default as CopyPaste } from 'diagram-js/lib/features/copy-paste/CopyPaste.js';
2
+ import { default as Canvas } from 'diagram-js/lib/core/Canvas';
3
+ import { default as Create } from 'diagram-js/lib/features/create/Create';
4
+ import { default as Clipboard } from 'diagram-js/lib/features/clipboard/Clipboard';
5
+ import { default as ElementFactory } from 'diagram-js/lib/core/ElementFactory';
6
+ import { default as EventBus } from 'diagram-js/lib/core/EventBus';
7
+ import { default as Modeling } from 'diagram-js/lib/features/modeling/Modeling';
8
+ import { default as Mouse } from 'diagram-js/lib/features/mouse/Mouse';
9
+ import { default as Rules } from 'diagram-js/lib/features/rules/Rules';
10
+ import { Shape } from 'diagram-js/lib/model/Types';
11
+ export default class TtCopyPaste extends CopyPaste {
12
+ private readonly elementFactory;
13
+ static $inject: string[];
14
+ constructor(canvas: Canvas, create: Create, clipboard: Clipboard, elementFactory: ElementFactory, eventBus: EventBus, modeling: Modeling, mouse: Mouse, rules: Rules);
15
+ createShape(attrs: Record<string, unknown>): Shape;
16
+ }
17
+ //# sourceMappingURL=TtCopyPaste.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TtCopyPaste.d.ts","sourceRoot":"","sources":["../../src/copy-paste/TtCopyPaste.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,SAAS,MAAM,iDAAiD,CAAC;AAGxE,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AACzE,OAAO,KAAK,cAAc,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AACtE,OAAO,KAAK,KAAK,MAAM,qCAAqC,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,qCAAqC,CAAC;AAC7D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAgBxD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAAS;IAgB9C,OAAO,CAAC,QAAQ,CAAC,cAAc;IAfjC,OAAgB,OAAO,WASrB;gBAGA,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACH,cAAc,EAAE,cAAc,EAC/C,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK;IAKL,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK;CAS5D"}
@@ -0,0 +1,6 @@
1
+ import { default as EventBus } from 'diagram-js/lib/core/EventBus';
2
+ export default class TtCopyPasteProps {
3
+ static $inject: string[];
4
+ constructor(eventBus: EventBus);
5
+ }
6
+ //# sourceMappingURL=TtCopyPasteProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TtCopyPasteProps.d.ts","sourceRoot":"","sources":["../../src/copy-paste/TtCopyPasteProps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AAczD,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,MAAM,CAAC,OAAO,WAAgB;gBAElB,QAAQ,EAAE,QAAQ;CAa/B"}
@@ -0,0 +1,9 @@
1
+ import { ModuleDeclaration } from 'didi';
2
+ /**
3
+ * Copy-paste of Team Topologies shapes: the stock diagram-js feature (clipboard,
4
+ * cursor-follow placement) with `copyPaste` overridden to mint model-style ids
5
+ * and a listener that preserves the flat `tt*` props across the round-trip.
6
+ */
7
+ export declare const ttCopyPasteModule: ModuleDeclaration;
8
+ export { default as TtCopyPaste } from './TtCopyPaste.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/copy-paste/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAK9C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC;AAEF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,20 +1,27 @@
1
- /** Shared rendering constants (typography, accent, priorities). */
1
+ /**
2
+ * Shared rendering constants (typography, accent, priorities) — Miragon corporate identity.
3
+ * Colours are derived from the single source of truth in `theme/palette.ts` (`MIRAGON`), which
4
+ * mirrors the vendored `--cd-*` brand tokens.
5
+ */
2
6
  /** BaseRenderer default priority is 1000; 1500 wins the render.shape/connection event. */
3
7
  export declare const TT_RENDER_PRIORITY = 1500;
4
- /** Selection / hover accent (kept in sync with the app theme). */
5
- export declare const ACCENT = "#4f46e5";
6
- export declare const INK = "#1f2430";
7
- export declare const INK_SOFT = "#525a6b";
8
+ /** Selection / hover accent (Miragon blue — kept in sync with the app theme via the shared palette). */
9
+ export declare const ACCENT: "#335DE5";
10
+ export declare const INK: "#1D1D1D";
11
+ export declare const INK_SOFT = "#5B5B5B";
8
12
  export declare const FONT: {
9
13
  /**
10
14
  * Set directly as the `font-family` attribute on every SVG <text> (canvas
11
15
  * labels and therefore the SVG export too) — not inherited from a CSS
12
- * container. Falls back to system sans when the host doesn't provide Inter.
16
+ * container. Prefers the self-hosted Miragon typeface Geist (registered as
17
+ * 'Geist Variable' by @fontsource-variable/geist, with 'Geist' as a fallback
18
+ * name), and falls back to a system sans when the host hasn't loaded it (e.g.
19
+ * an exported SVG opened standalone).
13
20
  */
14
- readonly family: "'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif";
21
+ readonly family: "'Geist Variable', 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif";
15
22
  readonly label: 13.5;
16
23
  readonly small: 11;
17
24
  };
18
25
  /** Paper colour used for the label halo so text stays legible over lines. */
19
- export declare const PAPER = "#ffffff";
26
+ export declare const PAPER: "#FFFFFF";
20
27
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/draw/styles.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,kEAAkE;AAClE,eAAO,MAAM,MAAM,YAAY,CAAC;AAEhC,eAAO,MAAM,GAAG,YAAY,CAAC;AAC7B,eAAO,MAAM,QAAQ,YAAY,CAAC;AAElC,eAAO,MAAM,IAAI;IACf;;;;OAIG;;;;CAIK,CAAC;AAEX,6EAA6E;AAC7E,eAAO,MAAM,KAAK,YAAY,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/draw/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,wGAAwG;AACxG,eAAO,MAAM,MAAM,WAAe,CAAC;AAEnC,eAAO,MAAM,GAAG,WAAkB,CAAC;AACnC,eAAO,MAAM,QAAQ,YAAY,CAAC;AAElC,eAAO,MAAM,IAAI;IACf;;;;;;;OAOG;;;;CAKK,CAAC;AAEX,6EAA6E;AAC7E,eAAO,MAAM,KAAK,WAAgB,CAAC"}