@beehexa/mermaid-tokens 2611.3.4 → 2611.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,6 +24,68 @@ fonts/CSS while preserving topology, definition state styles and unrelated layou
24
24
  directives. Embedded SVG CSS includes opaque edge-label roles and source `"cv05",
25
25
  "cv08"` features alongside complete font shorthands.
26
26
 
27
+ For native compact worker flows, keep the native `compactFlowMermaid` output and
28
+ `flowStylesheet()` from `@beehexa/hexasync-template-model`. Make that public sheet
29
+ available **before Mermaid measures labels**, and include it in the resulting SVG
30
+ for standalone export. Add `hx-flow` to the SVG root and apply
31
+ `workerFlowSvgStyle(theme)` as its inline style. The native sheet supplies card
32
+ geometry, family masks and typed run-state line-work; this adapter supplies literal
33
+ source paint, neutral category tile/glyph pairs and the canonical tile radius.
34
+ Do not copy its emitter, mutate label DOM, or infer execution from missing evidence.
35
+
36
+ `mermaidEvidenceStyles(log, edges, { dark, locale })` consumes actual compact node
37
+ IDs and edge indices. Reached and unfinished log cues remain separate from typed
38
+ failure. It emits literal Source colours: Mermaid 12 rejects CSS functions in this
39
+ DSL, and an `!important` suffix corrupts the native coloured-marker attributes.
40
+ After native rendering/sanitization, call `preserveMermaidDefinitionPaint(svg)`:
41
+ it promotes the actual native edge declarations and coloured-marker attributes
42
+ above the worker sheet's important neutral rule, without changing IDs or geometry.
43
+
44
+ Graph controls float **inside** `.bh-diagram-viewport`, default lower-left, as
45
+ `.bh-diagram-dock` on a real native Space with `bh-control-group`
46
+ `data-bh-variant="dock"`. No external toolbar row. The viewport uses the same
47
+ `diagram.canvas`/`grid` and18px/1.2px native grid geometry as Data Flow.
48
+ Bind camera x/y/scale through `--bh-canvas-grid-x`, `--bh-canvas-grid-y`,
49
+ `--bh-canvas-grid-scale`; keep the dock outside the transformed drawing and
50
+ captured SVG host. Source CSS keeps the live SVG transparent, and the default
51
+ `diagram.group-fill` keeps native stage bodies from hiding the grid. Export
52
+ retains its snapshotted opaque Source canvas and native evidence paint.
53
+
54
+ The installed native compact-label API does not expose a rich-label callback.
55
+ Its wrapped title/subtitle cannot be independently styled in full: the native
56
+ sheet uses `p::first-line`. Full rich-title parity therefore requires an upstream
57
+ public anatomy/label capability; a downstream first-line workaround is not one.
58
+
59
+ For interactive preview nodes, add `bh-mermaid-interactive-node` to the actual SVG
60
+ node group and bind real selection via `aria-selected` (supported selectable roles)
61
+ or `aria-pressed` (toggle buttons). The embedded stylesheet supplies
62
+ pointer affordance and an independent source outline on hover, keyboard focus and
63
+ selection, without replacing definition-owned fill/stroke. Preserve role, tabindex,
64
+ keyboard handlers and disclosure/selection distinctions. `bh-mermaid-category-glyph`
65
+ on an authored icon path supplies the neutral glyph stroke, source 1px width and
66
+ round joins/caps; applications retain the path and transform geometry.
67
+
68
+ Import `@beehexa/mermaid-tokens/css` once for outer HTML evidence/viewport roles.
69
+ `data-bh-diagram="canvas|code|key|value|description|badge"` binds the matching
70
+ diagram roles; badge includes the neutral repeat-count frame and 4px label radius.
71
+ Typography and structural layout stay separate. Embedded `foreignObject` text
72
+ uses `-webkit-text-fill-color: currentcolor` so PNG cloning preserves resolved
73
+ node-label colour instead of inheriting a competing host text-fill.
74
+ `bh-diagram-viewport` enables real pan gesture affordances (grab, touch-action,
75
+ user-select); bind `data-bh-dragging="true"` only while dragging. Rich interactive
76
+ nodes with separately decorated ring geometry use `data-bh-clickable="true"` and
77
+ `data-bh-ring="hover"` on that ring. The embedded CSS owns hover visibility; the
78
+ application retains selection/disclosure state and the actual SVG ring geometry.
79
+ Ordinal evidence-navigation buttons use `data-bh-diagram="occurrence"` and
80
+ `aria-current="true"` for the current occurrence underline, preserving native
81
+ button keyboard focus and action semantics.
82
+
83
+ SVG node/cluster/actor/note rectangles, rich cards, category tiles and small label
84
+ surfaces use `radius.100` (8 px) in live drawings and exports. True circles,
85
+ diamonds and paths keep graph geometry. Custom inspector cards and viewport
86
+ controls/toolbars use `--bh-radius-100`; dialogs/drawers use `radius.150` (12 px).
87
+ The complete source Radius rule owns the role scale; `radius.200` has no current component role.
88
+
27
89
  Resolve context on each render and re-render on theme/locale changes. A completed
28
90
  step is neutral evidence, not a verified successful outcome; failure, never-reached,
29
91
  not-taken, repetition and selection retain separate semantics and non-colour cues.
@@ -36,6 +98,6 @@ Build with the producer's adapter build orchestration. Until release approval,
36
98
  consume through explicit local package references only; registry-only consumer CI
37
99
  must never build a sibling checkout. Release managers stamp actual versions.
38
100
 
39
- `build-adapters.mjs` checks strict NodeNext source; packed-consumer checks cover
101
+ `build-runtime-packages.mjs` checks strict NodeNext source; packed-consumer checks cover
40
102
  typed exports with strict TypeScript and `skipLibCheck` at the Mermaid vendor
41
103
  declaration boundary. Compilation does not prove actual render/export behavior.
package/dist/css.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // CSS is imported for side effects only.
2
+ export {};
package/dist/index.d.ts CHANGED
@@ -5,11 +5,24 @@ export interface MermaidThemeOptions {
5
5
  locale?: 'en' | 'vi';
6
6
  }
7
7
  /** Descriptive execution and inspector roles, authored in tokens/diagram.json. */
8
- export declare const CANVAS_COLOR_ROLES: readonly ["canvas", "node-fill", "node-border", "node-title", "node-desc", "tile-bg", "tile-glyph", "state-ran-ok", "ran-ok-fill", "fail-stroke", "fail-fill", "fail-title", "fail-desc", "unreached-fill", "unreached-stroke", "unreached-title", "unreached-desc", "nottaken-stroke", "nottaken-fill", "nottaken-title", "nottaken-desc", "badge-bg", "badge-text", "badge-border", "edge", "edge-label-text", "edge-label-bg", "panel-bg", "panel-border", "code-bg", "code-key", "code-value"];
8
+ export declare const CANVAS_COLOR_ROLES: readonly ["canvas", "grid", "group-fill", "node-fill", "node-border", "node-title", "node-desc", "tile-bg", "tile-glyph", "state-ran-ok", "ran-ok-fill", "log-reached", "log-unfinished", "fail-stroke", "fail-fill", "fail-title", "fail-desc", "unreached-fill", "unreached-stroke", "unreached-title", "unreached-desc", "nottaken-stroke", "nottaken-fill", "nottaken-title", "nottaken-desc", "badge-bg", "badge-text", "badge-border", "edge", "edge-label-text", "edge-label-bg", "panel-bg", "panel-border", "code-bg", "code-key", "code-value"];
9
9
  export type CanvasColorRole = (typeof CANVAS_COLOR_ROLES)[number];
10
10
  export type CanvasColorKey = CanvasColorRole | `${CanvasColorRole}-dark`;
11
11
  /** A literal colour for definition/SVG APIs that cannot resolve CSS variables. */
12
12
  export declare function canvasRoleColor(role: CanvasColorRole, options?: MermaidThemeOptions): string;
13
+ /** A log proves reachability or an unfinished interval, not a typed execution outcome. */
14
+ export type MermaidLogReading = 'reached' | 'unfinished';
15
+ /** A failed edge cue requires typed failure evidence, never an unfinished log interval. */
16
+ export type MermaidEdgeReading = MermaidLogReading | 'failed';
17
+ /** Native Mermaid statements keyed by public compact identity, with explicit literal theme paint. */
18
+ export declare function mermaidEvidenceStyles(nodes: ReadonlyMap<string, MermaidLogReading>, edges: ReadonlyMap<number, MermaidEdgeReading>, options?: MermaidThemeOptions): string;
19
+ /**
20
+ * Preserve native definition paint against the worker sheet's neutral !important rules.
21
+ * Mermaid 12 clones coloured arrowheads from the literal edge stroke; an !important
22
+ * suffix in its DSL becomes an invalid marker colour attribute. Promote only the
23
+ * actual rendered declarations/attributes, without rebuilding IDs, markers or geometry.
24
+ */
25
+ export declare function preserveMermaidDefinitionPaint(svg: SVGSVGElement): void;
13
26
  /** Immutable source-backed light/dark pairs for non-reactive definition boundaries. */
14
27
  export declare const CANVAS_PALETTE: Readonly<{
15
28
  colors: Readonly<Record<CanvasColorKey, string>>;
@@ -35,5 +48,11 @@ export interface CanvasTheme {
35
48
  }
36
49
  /** Resolve a fresh theme for one render/export; no shared mutable Mermaid configuration. */
37
50
  export declare function createCanvasTheme(options?: MermaidThemeOptions): CanvasTheme;
51
+ /**
52
+ * Inline variables for the native compact-flow SVG host. Native flowStylesheet()
53
+ * owns card geometry/icons/state line-work; this adapter owns semantic paint.
54
+ * Inline literals survive standalone SVG export without an application ancestor.
55
+ */
56
+ export declare function workerFlowSvgStyle(theme: CanvasTheme): string;
38
57
  /** Configure every Mermaid rendering surface from the same source roles. */
39
58
  export declare function createMermaidConfig(options?: MermaidThemeOptions): MermaidConfig;
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { tokens } from '@beehexa/design-tokens';
2
2
  /** Descriptive execution and inspector roles, authored in tokens/diagram.json. */
3
3
  export const CANVAS_COLOR_ROLES = Object.freeze([
4
- 'canvas', 'node-fill', 'node-border', 'node-title', 'node-desc', 'tile-bg', 'tile-glyph',
5
- 'state-ran-ok', 'ran-ok-fill', 'fail-stroke', 'fail-fill', 'fail-title', 'fail-desc',
4
+ 'canvas', 'grid', 'group-fill', 'node-fill', 'node-border', 'node-title', 'node-desc', 'tile-bg', 'tile-glyph',
5
+ 'state-ran-ok', 'ran-ok-fill', 'log-reached', 'log-unfinished', 'fail-stroke', 'fail-fill', 'fail-title', 'fail-desc',
6
6
  'unreached-fill', 'unreached-stroke', 'unreached-title', 'unreached-desc',
7
7
  'nottaken-stroke', 'nottaken-fill', 'nottaken-title', 'nottaken-desc',
8
8
  'badge-bg', 'badge-text', 'badge-border', 'edge', 'edge-label-text', 'edge-label-bg',
@@ -24,6 +24,46 @@ function pixels(input) {
24
24
  export function canvasRoleColor(role, options = {}) {
25
25
  return value(`diagram.${role}`, options);
26
26
  }
27
+ /** Native Mermaid statements keyed by public compact identity, with explicit literal theme paint. */
28
+ export function mermaidEvidenceStyles(nodes, edges, options = {}) {
29
+ const reached = [];
30
+ const unfinished = [];
31
+ const lines = [];
32
+ for (const [id, reading] of nodes) {
33
+ (reading === 'unfinished' ? unfinished : reached).push(id);
34
+ }
35
+ if (reached.length)
36
+ lines.push(`class ${reached.join(',')} bh-log-reached`);
37
+ if (unfinished.length)
38
+ lines.push(`class ${unfinished.join(',')} bh-log-unfinished`);
39
+ for (const [index, reading] of edges) {
40
+ const role = reading === 'failed' ? 'fail-stroke' : reading === 'unfinished' ? 'log-unfinished' : 'log-reached';
41
+ const dash = reading === 'unfinished' ? ',stroke-dasharray:4 3' : '';
42
+ lines.push(`linkStyle ${index} stroke:${canvasRoleColor(role, options)},stroke-width:${pixels(value('border.width.focused', options))}${dash}`);
43
+ }
44
+ return lines.join('\n');
45
+ }
46
+ /**
47
+ * Preserve native definition paint against the worker sheet's neutral !important rules.
48
+ * Mermaid 12 clones coloured arrowheads from the literal edge stroke; an !important
49
+ * suffix in its DSL becomes an invalid marker colour attribute. Promote only the
50
+ * actual rendered declarations/attributes, without rebuilding IDs, markers or geometry.
51
+ */
52
+ export function preserveMermaidDefinitionPaint(svg) {
53
+ for (const edge of svg.querySelectorAll('.flowchart-link')) {
54
+ const stroke = edge.style.getPropertyValue('stroke');
55
+ if (stroke)
56
+ edge.style.setProperty('stroke', stroke, 'important');
57
+ }
58
+ const properties = ['stroke', 'fill'];
59
+ for (const marker of svg.querySelectorAll('.marker [stroke], .marker [fill]')) {
60
+ for (const property of properties) {
61
+ const paint = marker.getAttribute(property);
62
+ if (paint)
63
+ marker.style.setProperty(property, paint, 'important');
64
+ }
65
+ }
66
+ }
27
67
  /** Immutable source-backed light/dark pairs for non-reactive definition boundaries. */
28
68
  export const CANVAS_PALETTE = Object.freeze({
29
69
  colors: Object.freeze(Object.fromEntries(CANVAS_COLOR_ROLES.flatMap((role) => [
@@ -59,6 +99,32 @@ export function createCanvasTheme(options = {}) {
59
99
  locale: options.locale ?? 'en'
60
100
  };
61
101
  }
102
+ /**
103
+ * Inline variables for the native compact-flow SVG host. Native flowStylesheet()
104
+ * owns card geometry/icons/state line-work; this adapter owns semantic paint.
105
+ * Inline literals survive standalone SVG export without an application ancestor.
106
+ */
107
+ export function workerFlowSvgStyle(theme) {
108
+ const c = theme.colors;
109
+ return `
110
+ background-color:transparent;
111
+ --hx-node-fill:${c['node-fill']};
112
+ --hx-node-border:${c['node-border']};
113
+ --hx-node-title:${c['node-title']};
114
+ --hx-node-subtitle:${c['node-desc']};
115
+ --hx-node-tile:${c['tile-bg']};
116
+ --hx-node-glyph:${c['tile-glyph']};
117
+ --hx-edge:${c.edge};
118
+ --hx-plate:${c['edge-label-bg']};
119
+ --hx-run-ok:${c['state-ran-ok']};
120
+ --hx-run-failed:${c['fail-stroke']};
121
+ --hx-run-failed-fill:${c['fail-fill']};
122
+ --hx-run-muted:${c['unreached-stroke']};
123
+ --hx-run-declined:${c['nottaken-stroke']};
124
+ --hx-log-reached:${c['log-reached']};
125
+ --hx-log-unfinished:${c['log-unfinished']};
126
+ `;
127
+ }
62
128
  /** Configure every Mermaid rendering surface from the same source roles. */
63
129
  export function createMermaidConfig(options = {}) {
64
130
  const theme = createCanvasTheme(options);
@@ -92,7 +158,7 @@ export function createMermaidConfig(options = {}) {
92
158
  lineColor: c.edge,
93
159
  textColor: c['node-title'],
94
160
  edgeLabelBackground: c['edge-label-bg'],
95
- clusterBkg: c.canvas,
161
+ clusterBkg: c['group-fill'],
96
162
  clusterBorder: c.edge,
97
163
  titleColor: c['node-title'],
98
164
  noteBkgColor: c['panel-bg'],
@@ -111,6 +177,64 @@ export function createMermaidConfig(options = {}) {
111
177
  }
112
178
  /* Mermaid's generic span paint must not erase definition-owned state text. */
113
179
  .nodeLabel * { color: inherit !important; }
180
+ /* HTML-to-image clones may inherit host text-fill paint independently of color. */
181
+ foreignObject * { -webkit-text-fill-color: currentcolor; }
182
+ /* Native compact-flow masks keep native size/path; source roles own paint.
183
+ Native tiles hardcode 9px, so the adapter supplies the canonical 8px role. */
184
+ g.node[class*="ic-"] .nodeLabel::before {
185
+ background: var(--hx-node-tile);
186
+ box-shadow: none;
187
+ border-radius: ${pixels(value('radius.100', options))};
188
+ }
189
+ g.node[class*="ic-"] .nodeLabel::after {
190
+ background: var(--hx-node-glyph);
191
+ }
192
+ /* Log-only readings never assign a typed native run state. */
193
+ .node.bh-log-reached {
194
+ --hx-node-border: var(--hx-log-reached);
195
+ --hx-accent: var(--hx-log-reached);
196
+ }
197
+ .node.bh-log-unfinished {
198
+ --hx-node-border: var(--hx-log-unfinished);
199
+ --hx-node-fill: ${c['node-fill']};
200
+ --hx-node-title: ${c['node-title']};
201
+ --hx-node-subtitle: ${c['node-desc']};
202
+ --hx-accent: var(--hx-log-unfinished);
203
+ }
204
+ g.node:is(.rs-ranOk, .rs-ranFailed, .bh-log-reached, .bh-log-unfinished) > :is(rect, polygon, path),
205
+ g.node:is(.rs-ranOk, .rs-ranFailed, .bh-log-reached, .bh-log-unfinished) > g.label-container path {
206
+ stroke-width: ${pixels(value('border.width.focused', options))} !important;
207
+ }
208
+ g.node.bh-log-unfinished > :is(rect, polygon, path),
209
+ g.node.bh-log-unfinished > g.label-container path { stroke-dasharray: 4 3 !important; }
210
+ .node.rs-ranOk .nodeLabel p::before { content: "\\2713"; }
211
+ .node.rs-ranFailed .nodeLabel p::before { content: "\\26A0"; }
212
+ .node.bh-log-reached .nodeLabel p::before { content: "\\203A"; }
213
+ .node.bh-log-unfinished .nodeLabel p::before { content: "\\2026"; }
214
+ .node:is(.rs-ranOk, .rs-ranFailed, .bh-log-reached, .bh-log-unfinished) .nodeLabel p::before {
215
+ display: inline-block;
216
+ margin-inline-end: ${pixels(value('space.050', options))};
217
+ }
218
+ .node .bh-mermaid-category-glyph,
219
+ .bh-mermaid-category-glyph {
220
+ fill: none;
221
+ stroke: ${c['tile-glyph']};
222
+ stroke-width: ${pixels(value('border.width.default', options))};
223
+ stroke-linecap: round;
224
+ stroke-linejoin: round;
225
+ vector-effect: non-scaling-stroke;
226
+ }
227
+ .bh-mermaid-interactive-node { cursor: pointer; outline: none; }
228
+ .bh-mermaid-interactive-node:hover,
229
+ .bh-mermaid-interactive-node:focus-visible,
230
+ .bh-mermaid-interactive-node[aria-selected='true'],
231
+ .bh-mermaid-interactive-node[aria-pressed='true'] {
232
+ outline: ${pixels(value('border.width.focused', options))} solid ${theme.selectionRing};
233
+ outline-offset: ${pixels(value('state.focus.offset', options))};
234
+ }
235
+ [data-bh-clickable='true'] { cursor: pointer; }
236
+ [data-bh-ring='hover'] { visibility: hidden; }
237
+ [data-bh-clickable='true']:hover [data-bh-ring='hover'] { visibility: visible; }
114
238
  .edgeLabel rect { opacity: 1; }
115
239
  .labelBkg { background-color: ${c['edge-label-bg']}; }
116
240
  .edgeLabel, .edgeLabel p, .edgeLabel span {
@@ -118,32 +242,14 @@ export function createMermaidConfig(options = {}) {
118
242
  color: ${c['edge-label-text']};
119
243
  pointer-events: none;
120
244
  }
121
- .hx-node-card {
122
- width: ${pixels(value('diagram.card-width', options))} !important;
123
- min-width: ${pixels(value('diagram.card-width', options))} !important;
124
- grid-template-columns: ${pixels(value('diagram.tile-size', options))} minmax(0, 1fr) !important;
125
- column-gap: ${pixels(value('space.100', options))} !important;
126
- font: ${theme.font} !important;
127
- font-feature-settings: ${value('font.features', options)} !important;
128
- }
129
- .hx-node-card__title, .hx-node-card__title strong {
130
- font: ${pixels(value('font.heading.xsmall', options))} !important;
131
- font-feature-settings: ${value('font.features', options)} !important;
132
- }
133
- .hx-node-card__subtitle {
134
- font: ${pixels(value('font.body.small', options))} !important;
135
- font-feature-settings: ${value('font.features', options)} !important;
245
+ /* Rectangular nodes/cards and small label surfaces use the 8px role. */
246
+ .node rect, .cluster rect, .actor, .note {
247
+ rx: ${pixels(value('radius.100', options))} !important;
248
+ ry: ${pixels(value('radius.100', options))} !important;
136
249
  }
137
- .hx-node-card__copy { row-gap: ${pixels(value('space.050', options))} !important; }
138
- .hx-node-card__icon {
139
- width: ${pixels(value('diagram.tile-size', options))} !important;
140
- min-height: ${pixels(value('diagram.tile-size', options))} !important;
141
- border-radius: ${pixels(value('radius.100', options))} !important;
142
- background: ${c['tile-bg']} !important;
143
- color: ${c['tile-glyph']} !important;
144
- box-shadow: none !important;
145
- font-size: ${pixels(value('diagram.glyph-size', options))} !important;
146
- line-height: 1 !important;
250
+ .labelBox {
251
+ rx: ${pixels(value('radius.100', options))} !important;
252
+ ry: ${pixels(value('radius.100', options))} !important;
147
253
  }
148
254
  `,
149
255
  flowchart: { htmlLabels: true, curve: 'basis', padding: theme.nodePadding }
@@ -0,0 +1,54 @@
1
+ /* Host/evidence roles complement the literal, export-safe stylesheet embedded in SVG. */
2
+ [data-bh-diagram='canvas'] {
3
+ background: var(--bh-diagram-canvas);
4
+ color: var(--bh-diagram-node-title);
5
+ }
6
+ [data-bh-diagram='code'] {
7
+ background: var(--bh-diagram-code-bg);
8
+ color: var(--bh-diagram-code-value);
9
+ }
10
+ [data-bh-diagram='key'] { color: var(--bh-diagram-code-key); }
11
+ [data-bh-diagram='value'] { color: var(--bh-diagram-code-value); }
12
+ [data-bh-diagram='description'] { color: var(--bh-diagram-node-desc); }
13
+ [data-bh-diagram='badge'] {
14
+ background: var(--bh-diagram-badge-bg);
15
+ color: var(--bh-diagram-badge-text);
16
+ border: var(--bh-border-width-default) solid var(--bh-diagram-badge-border);
17
+ border-radius: var(--bh-radius-050);
18
+ }
19
+
20
+ /* Opt in only on a host with real pan/zoom handlers; structure remains local. */
21
+ .bh-diagram-viewport {
22
+ cursor: grab;
23
+ touch-action: none;
24
+ user-select: none;
25
+ position: relative;
26
+ background-color: var(--bh-diagram-canvas);
27
+ background-image: radial-gradient(circle, var(--bh-diagram-grid) calc(var(--bh-diagram-grid-dot) * var(--bh-canvas-grid-scale, 1)), transparent calc(var(--bh-diagram-grid-dot) * var(--bh-canvas-grid-scale, 1)));
28
+ background-size: calc(var(--bh-diagram-grid-gap) * var(--bh-canvas-grid-scale, 1)) calc(var(--bh-diagram-grid-gap) * var(--bh-canvas-grid-scale, 1));
29
+ background-position: var(--bh-canvas-grid-x, 0px) var(--bh-canvas-grid-y, 0px);
30
+ }
31
+ .bh-diagram-viewport[data-bh-dragging='true'] { cursor: grabbing; }
32
+ .bh-diagram-viewport .bh-control-group { cursor: default; }
33
+
34
+ /* The camera transforms only the drawing. Native controls float inside its viewport. */
35
+ .bh-diagram-viewport > .bh-diagram-dock {
36
+ position: absolute;
37
+ inset-inline-start: var(--bh-space-200);
38
+ inset-block-end: var(--bh-space-200);
39
+ max-inline-size: calc(100% - 2 * var(--bh-space-200));
40
+ z-index: 1;
41
+ flex-wrap: nowrap;
42
+ overflow-x: auto;
43
+ overflow-y: hidden;
44
+ cursor: default;
45
+ touch-action: auto;
46
+ }
47
+ /* Mermaid supplies an opaque root inline background; the viewport owns live grid paint.
48
+ Capture uses the separately snapshotted opaque Source canvas, never this UI dock. */
49
+ .bh-diagram-viewport svg { background-color: transparent !important; }
50
+
51
+ /* Ordinal evidence navigation: current occurrence is not a business status. */
52
+ [data-bh-diagram='occurrence'][aria-current='true'] {
53
+ text-decoration: underline;
54
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beehexa/mermaid-tokens",
3
- "version": "2611.3.4",
3
+ "version": "2611.5.2",
4
4
  "description": "Beehexa source-backed Mermaid configuration and execution diagram roles",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,16 +14,22 @@
14
14
  "dist",
15
15
  "README.md"
16
16
  ],
17
- "sideEffects": false,
17
+ "sideEffects": [
18
+ "**/*.css"
19
+ ],
18
20
  "exports": {
19
21
  ".": {
20
22
  "types": "./dist/index.d.ts",
21
23
  "import": "./dist/index.js"
22
24
  },
25
+ "./css": {
26
+ "types": "./dist/css.d.ts",
27
+ "default": "./dist/styles.css"
28
+ },
23
29
  "./package.json": "./package.json"
24
30
  },
25
31
  "dependencies": {
26
- "@beehexa/design-tokens": "2611.3.4"
32
+ "@beehexa/design-tokens": "2611.5.2"
27
33
  },
28
34
  "peerDependencies": {
29
35
  "mermaid": "^12.0.0"
@@ -32,8 +38,8 @@
32
38
  "access": "public"
33
39
  },
34
40
  "scripts": {
35
- "build": "node ../../scripts/build-adapters.mjs mermaid-tokens",
36
- "check": "node ../../scripts/build-adapters.mjs mermaid-tokens --check",
41
+ "build": "node ../../scripts/build-runtime-packages.mjs mermaid-tokens",
42
+ "check": "node ../../scripts/build-runtime-packages.mjs mermaid-tokens --check",
37
43
  "prepack": "npm run build"
38
44
  },
39
45
  "engines": {