@cardenelabs/cdl 0.23.0 → 0.25.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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeHead, f as EdgeHeadFill, g as CdlState, h as CdlEventTarget, i as Computed, j as CdlDerivedValue, k as CdlScrollTrigger, L as LaidDiagram, l as CdlDiagramViewProps, m as LaidEdge, n as LaidNode, o as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Czv0tUon.cjs';
2
- export { p as CdlDiagramView, q as CdlEventBinding, r as CdlEventKind, s as CdlFormula, t as CdlPhase, u as EDGE_HEADS, v as EDGE_HEAD_DEFAULT, w as EDGE_HEAD_FILLS, x as EDGE_HEAD_FILL_DEFAULT, y as EDGE_REVEALS, z as EDGE_REVEAL_DEFAULT, A as EDGE_STYLES, D as EdgeReveal, I as InteractiveHandlerMap, F as InteractiveSignalsAccessor, G as LaidLane, H as NODE_KINDS, K as ScrollProgressHandle, M as TONES, O as computeEventBindingKey, P as computeFormulaKey, U as computeInputSignalKey, V as computeScrollTriggerKey, W as computed, X as createInteractiveSignalsAccessor, Y as createScrollProgressHandle, Z as createScrollProgressSignals, _ as hasInteractivePrimitives, $ as sequenceBoardMetrics, a0 as sequenceStepId, a1 as signal } from './render-Czv0tUon.cjs';
1
+ import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as Computed, k as CdlDerivedValue, l as CdlScrollTrigger, L as LaidDiagram, m as CdlDiagramViewProps, n as LaidEdge, o as LaidNode, p as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-ViWKnlu1.cjs';
2
+ export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as EDGE_HEADS, w as EDGE_HEAD_DEFAULT, x as EDGE_HEAD_FILLS, y as EDGE_HEAD_FILL_DEFAULT, z as EDGE_REVEALS, A as EDGE_REVEAL_DEFAULT, D as EDGE_STYLES, F as EdgeReveal, I as InteractiveHandlerMap, G as InteractiveSignalsAccessor, H as LaidLane, K as NODE_KINDS, M as ScrollProgressHandle, O as TONES, P as computeEventBindingKey, U as computeFormulaKey, V as computeInputSignalKey, W as computeScrollTriggerKey, X as computed, Y as createInteractiveSignalsAccessor, Z as createScrollProgressHandle, _ as createScrollProgressSignals, $ as hasInteractivePrimitives, a0 as sequenceBoardMetrics, a1 as sequenceStepId, a2 as signal } from './render-ViWKnlu1.cjs';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1030,6 +1030,10 @@ type DiagramBuilder = {
1030
1030
  tone?: Tone;
1031
1031
  side?: Side;
1032
1032
  style?: EdgeStyle;
1033
+ /** 辺の役目 (#618)。 `main` を書いた辺だけ「いま」 の色で引く */
1034
+ role?: EdgeRole;
1035
+ /** 名前の下地を敷くか (#618)。 書かなければ敷く */
1036
+ labelPlate?: boolean;
1033
1037
  /** 端の形 (#560)、 既定は塗った三角。 線の種類とは別の軸 */
1034
1038
  head?: EdgeHead;
1035
1039
  /** 端の印の塗り (#578)。 書かなければ形ごとの既定 */
@@ -1202,6 +1206,10 @@ declare function diagram(id: string, options: {
1202
1206
  * `"exclude"` を付ける。 詳細は `CdlDiagram.structuredData` の doc 参照。
1203
1207
  */
1204
1208
  structuredData?: "extract" | "exclude";
1209
+ /**
1210
+ * この図をどの配色で描くか (#1553)。 詳細は `CdlDiagram.palette` の doc 参照。
1211
+ */
1212
+ palette?: string;
1205
1213
  }): DiagramBuilder;
1206
1214
 
1207
1215
  /**
@@ -3065,6 +3073,22 @@ type ErPreset = {
3065
3073
  * 広げるため、 狭く宣言すると宣言座標と実座標がずれる)。
3066
3074
  */
3067
3075
  entityWidth?: number;
3076
+ /**
3077
+ * 行に 1 行おきの縞を敷くか (#1553、 既定 = 敷く)。
3078
+ *
3079
+ * ER 図は小さい字が密に並ぶので、行を横に追う時の目印が無い。
3080
+ * 色を増やさずに面を 1 行おきに変えて追えるようにする。
3081
+ *
3082
+ * 設計の形 (`columns` を書いた実体) だけが対象。 `rows` を直接書いた古い形は
3083
+ * 行頭の印を持たないので敷かない。
3084
+ */
3085
+ rowStripe?: boolean;
3086
+ /**
3087
+ * この図をどの配色で描くか (#1553)。 書かない図は消費側の既定で描かれる。
3088
+ *
3089
+ * cdl は色の値を持たない。 名前を markup に出すだけで、実際の値は消費側が決める。
3090
+ */
3091
+ palette?: string;
3068
3092
  };
3069
3093
  type ErBuilder = {
3070
3094
  entity: (e: ErEntity) => ErBuilder;
@@ -3210,6 +3234,10 @@ type InfraConnection = {
3210
3234
  sub?: string;
3211
3235
  tone?: Tone;
3212
3236
  style?: EdgeStyle;
3237
+ /** 辺の役目 (#618)。 `main` を書いた辺だけ「いま」 の色で引く */
3238
+ role?: EdgeRole;
3239
+ /** 名前の下地を敷くか (#618)。 書かなければ敷く */
3240
+ labelPlate?: boolean;
3213
3241
  /** label の水平方向 fine offset (default 0)、 preset 交互 ±60 を override */
3214
3242
  labelOffsetX?: number;
3215
3243
  /** label の垂直方向 fine offset (default 0、 preset 交互 ±60 を override) */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeHead, f as EdgeHeadFill, g as CdlState, h as CdlEventTarget, i as Computed, j as CdlDerivedValue, k as CdlScrollTrigger, L as LaidDiagram, l as CdlDiagramViewProps, m as LaidEdge, n as LaidNode, o as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Czv0tUon.js';
2
- export { p as CdlDiagramView, q as CdlEventBinding, r as CdlEventKind, s as CdlFormula, t as CdlPhase, u as EDGE_HEADS, v as EDGE_HEAD_DEFAULT, w as EDGE_HEAD_FILLS, x as EDGE_HEAD_FILL_DEFAULT, y as EDGE_REVEALS, z as EDGE_REVEAL_DEFAULT, A as EDGE_STYLES, D as EdgeReveal, I as InteractiveHandlerMap, F as InteractiveSignalsAccessor, G as LaidLane, H as NODE_KINDS, K as ScrollProgressHandle, M as TONES, O as computeEventBindingKey, P as computeFormulaKey, U as computeInputSignalKey, V as computeScrollTriggerKey, W as computed, X as createInteractiveSignalsAccessor, Y as createScrollProgressHandle, Z as createScrollProgressSignals, _ as hasInteractivePrimitives, $ as sequenceBoardMetrics, a0 as sequenceStepId, a1 as signal } from './render-Czv0tUon.js';
1
+ import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as Computed, k as CdlDerivedValue, l as CdlScrollTrigger, L as LaidDiagram, m as CdlDiagramViewProps, n as LaidEdge, o as LaidNode, p as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-ViWKnlu1.js';
2
+ export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as EDGE_HEADS, w as EDGE_HEAD_DEFAULT, x as EDGE_HEAD_FILLS, y as EDGE_HEAD_FILL_DEFAULT, z as EDGE_REVEALS, A as EDGE_REVEAL_DEFAULT, D as EDGE_STYLES, F as EdgeReveal, I as InteractiveHandlerMap, G as InteractiveSignalsAccessor, H as LaidLane, K as NODE_KINDS, M as ScrollProgressHandle, O as TONES, P as computeEventBindingKey, U as computeFormulaKey, V as computeInputSignalKey, W as computeScrollTriggerKey, X as computed, Y as createInteractiveSignalsAccessor, Z as createScrollProgressHandle, _ as createScrollProgressSignals, $ as hasInteractivePrimitives, a0 as sequenceBoardMetrics, a1 as sequenceStepId, a2 as signal } from './render-ViWKnlu1.js';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1030,6 +1030,10 @@ type DiagramBuilder = {
1030
1030
  tone?: Tone;
1031
1031
  side?: Side;
1032
1032
  style?: EdgeStyle;
1033
+ /** 辺の役目 (#618)。 `main` を書いた辺だけ「いま」 の色で引く */
1034
+ role?: EdgeRole;
1035
+ /** 名前の下地を敷くか (#618)。 書かなければ敷く */
1036
+ labelPlate?: boolean;
1033
1037
  /** 端の形 (#560)、 既定は塗った三角。 線の種類とは別の軸 */
1034
1038
  head?: EdgeHead;
1035
1039
  /** 端の印の塗り (#578)。 書かなければ形ごとの既定 */
@@ -1202,6 +1206,10 @@ declare function diagram(id: string, options: {
1202
1206
  * `"exclude"` を付ける。 詳細は `CdlDiagram.structuredData` の doc 参照。
1203
1207
  */
1204
1208
  structuredData?: "extract" | "exclude";
1209
+ /**
1210
+ * この図をどの配色で描くか (#1553)。 詳細は `CdlDiagram.palette` の doc 参照。
1211
+ */
1212
+ palette?: string;
1205
1213
  }): DiagramBuilder;
1206
1214
 
1207
1215
  /**
@@ -3065,6 +3073,22 @@ type ErPreset = {
3065
3073
  * 広げるため、 狭く宣言すると宣言座標と実座標がずれる)。
3066
3074
  */
3067
3075
  entityWidth?: number;
3076
+ /**
3077
+ * 行に 1 行おきの縞を敷くか (#1553、 既定 = 敷く)。
3078
+ *
3079
+ * ER 図は小さい字が密に並ぶので、行を横に追う時の目印が無い。
3080
+ * 色を増やさずに面を 1 行おきに変えて追えるようにする。
3081
+ *
3082
+ * 設計の形 (`columns` を書いた実体) だけが対象。 `rows` を直接書いた古い形は
3083
+ * 行頭の印を持たないので敷かない。
3084
+ */
3085
+ rowStripe?: boolean;
3086
+ /**
3087
+ * この図をどの配色で描くか (#1553)。 書かない図は消費側の既定で描かれる。
3088
+ *
3089
+ * cdl は色の値を持たない。 名前を markup に出すだけで、実際の値は消費側が決める。
3090
+ */
3091
+ palette?: string;
3068
3092
  };
3069
3093
  type ErBuilder = {
3070
3094
  entity: (e: ErEntity) => ErBuilder;
@@ -3210,6 +3234,10 @@ type InfraConnection = {
3210
3234
  sub?: string;
3211
3235
  tone?: Tone;
3212
3236
  style?: EdgeStyle;
3237
+ /** 辺の役目 (#618)。 `main` を書いた辺だけ「いま」 の色で引く */
3238
+ role?: EdgeRole;
3239
+ /** 名前の下地を敷くか (#618)。 書かなければ敷く */
3240
+ labelPlate?: boolean;
3213
3241
  /** label の水平方向 fine offset (default 0)、 preset 交互 ±60 を override */
3214
3242
  labelOffsetX?: number;
3215
3243
  /** label の垂直方向 fine offset (default 0、 preset 交互 ±60 を override) */
package/dist/index.js CHANGED
@@ -9491,6 +9491,8 @@ function diagram(id, options) {
9491
9491
  tone: opts.tone ?? "accent",
9492
9492
  side: opts.side,
9493
9493
  style: opts.style,
9494
+ role: opts.role,
9495
+ labelPlate: opts.labelPlate,
9494
9496
  head: opts.head,
9495
9497
  headFill: opts.headFill,
9496
9498
  tailHead: opts.tailHead,
@@ -11480,6 +11482,8 @@ function diagram(id, options) {
11480
11482
  topic: options.topic,
11481
11483
  // 既定 (extract) は省略して JSON 形状を変えない。 exclude を明示した図だけ持たせる。
11482
11484
  ...options.structuredData === "exclude" ? { structuredData: "exclude" } : {},
11485
+ // 配色の名前は素通しする。 空文字の遮断は `layout` が持つ (後段が必ず通るため)
11486
+ ...options.palette !== void 0 ? { palette: options.palette } : {},
11483
11487
  // inputs / formulas / scrollTriggers / eventBindings は空なら省略 (static diagram の JSON 形状維持)
11484
11488
  ...inputs.length > 0 ? { inputs: [...inputs] } : {},
11485
11489
  ...formulas.length > 0 ? { formulas: [...formulas] } : {},
@@ -11790,6 +11794,12 @@ function rowBaselineY(kind, index) {
11790
11794
  if (!rendersRows(kind)) return null;
11791
11795
  return kind === "storage" ? ROW_TOP_STORAGE + index * ROW_PITCH_STORAGE : ROW_TOP_GENERIC + genericTextShift(kind) + index * ROW_PITCH_GENERIC;
11792
11796
  }
11797
+ function rowStripeBand(kind, index, shift) {
11798
+ const baseline = rowBaselineY(kind, index);
11799
+ if (baseline === null) return null;
11800
+ const pitch = ROW_PITCH_STORAGE ;
11801
+ return { y: baseline + shift - pitch / 2, h: pitch };
11802
+ }
11793
11803
  function genericTextShift(kind) {
11794
11804
  return KINDS_SHAPE_CYLINDER.has(kind ?? "") ? GENERIC_TEXT_SHIFT_CYLINDER : 0;
11795
11805
  }
@@ -20254,6 +20264,12 @@ function layout(diag) {
20254
20264
  ...diag.derived ? { derived: diag.derived } : {},
20255
20265
  // 矢印をいつ出すか (#582)。 描き手が読む欄なので、そのまま持ち越す
20256
20266
  ...diag.edgeReveal ? { edgeReveal: diag.edgeReveal } : {},
20267
+ // どの配色で描くか (#1553)。 空文字は書かなかった扱いにする = 空の目印を出すと、
20268
+ // 消費側の `[data-cdl-palette]` が配色を書いていない図にも当たる。
20269
+ //
20270
+ // **遮断はここだけに置く**。 描画は必ず組み立てを通り、組み立て API も `er` も
20271
+ // 素通しにしてある。 上流にも置くと、どの入力でも通らない分岐が残る
20272
+ ...diag.palette ? { palette: diag.palette } : {},
20257
20273
  bboxes,
20258
20274
  collisions,
20259
20275
  nearCollisions,
@@ -21977,6 +21993,12 @@ function edgeHeadPaint(head, fill, color) {
21977
21993
  }
21978
21994
  return { fill: color, stroke: "none" };
21979
21995
  }
21996
+ function defaultEdgeWidth(active) {
21997
+ return active ? 2.5 : 1.25;
21998
+ }
21999
+ function edgeColor(edge) {
22000
+ return edge.role === "main" ? "var(--cdl-now, #c0421f)" : toneColor(edge.tone);
22001
+ }
21980
22002
  function opacityAttr(opacity) {
21981
22003
  return opacity < 1 ? opacity : void 0;
21982
22004
  }
@@ -21990,7 +22012,7 @@ function CdlEdgeView({
21990
22012
  progress,
21991
22013
  stateValues
21992
22014
  }) {
21993
- const color = toneColor(edge.tone);
22015
+ const color = edgeColor(edge);
21994
22016
  const \u7AEF\u306E\u540D\u524D = (h, f) => {
21995
22017
  const \u5F62 = h ?? EDGE_HEAD_DEFAULT;
21996
22018
  if (\u5F62 === "none") return void 0;
@@ -22080,7 +22102,7 @@ function SolidEdgePath({
22080
22102
  stateValues
22081
22103
  }) {
22082
22104
  const visibleD = drawing ? pathSubpath(edge.d, progress) : edge.d;
22083
- const defaultWidth = active ? 5 : 2.5;
22105
+ const defaultWidth = defaultEdgeWidth(active);
22084
22106
  const boundWidth = edge.widthBind && stateValues ? resolveNumericAttr(edge.widthBind, stateValues, defaultWidth) : defaultWidth;
22085
22107
  const boundStroke = edge.strokeBind && stateValues ? interpolate(edge.strokeBind, stateValues) : color;
22086
22108
  const boundDashOffset = edge.dashOffsetBind && stateValues ? resolveNumericAttr(edge.dashOffsetBind, stateValues, 0) : void 0;
@@ -22157,7 +22179,7 @@ function CdlEdgeGlowView({
22157
22179
  active
22158
22180
  }) {
22159
22181
  if (!active) return null;
22160
- const color = toneColor(edge.tone);
22182
+ const color = edgeColor(edge);
22161
22183
  return /* @__PURE__ */ jsx(EdgeGlowCircles, { color, edgeId: edge.id });
22162
22184
  }
22163
22185
  function CdlEdgeLabelView({
@@ -22165,7 +22187,7 @@ function CdlEdgeLabelView({
22165
22187
  active
22166
22188
  }) {
22167
22189
  if (!hasRenderedLabel(edge)) return null;
22168
- const color = toneColor(edge.tone);
22190
+ const color = edgeColor(edge);
22169
22191
  const bbox = computeLabelBBoxWorld(edge);
22170
22192
  const boxW = bbox.w;
22171
22193
  const boxH = bbox.h;
@@ -22183,7 +22205,7 @@ function CdlEdgeLabelView({
22183
22205
  "data-cdl-edge-label-text": edge.label,
22184
22206
  "data-cdl-edge-sub-text": edge.sub ?? "",
22185
22207
  children: [
22186
- /* @__PURE__ */ jsx(
22208
+ edge.labelPlate !== false && /* @__PURE__ */ jsx(
22187
22209
  "rect",
22188
22210
  {
22189
22211
  "data-cdl-role": "edge-label-bg",
@@ -22799,6 +22821,25 @@ function StorageNode({
22799
22821
  strokeWidth: active ? 3 : 1.25
22800
22822
  }
22801
22823
  ),
22824
+ node.rowStripe && rows.map((_, idx) => {
22825
+ if (idx % 2 !== 0) return null;
22826
+ const \u5E2F = rowStripeBand("storage", idx, \u884C\u306E\u4E0B\u3052);
22827
+ if (!\u5E2F) return null;
22828
+ if (\u5E2F.y + \u5E2F.h > node.h) return null;
22829
+ return /* @__PURE__ */ jsx(
22830
+ "rect",
22831
+ {
22832
+ "data-cdl-role": "node-row-stripe",
22833
+ "data-cdl-row-index": idx,
22834
+ x: 1,
22835
+ y: \u5E2F.y,
22836
+ width: node.w - 2,
22837
+ height: \u5E2F.h,
22838
+ fill: "var(--cdl-row-stripe, var(--cdl-label-bg, #f3f4f6))"
22839
+ },
22840
+ `stripe-${idx}`
22841
+ );
22842
+ }),
22802
22843
  node.eyebrow && /* @__PURE__ */ jsx("text", { x: 26, y: 38, fontSize: 18, fontWeight: 700, letterSpacing: 2, fill: accent, children: node.eyebrow }),
22803
22844
  \u5370\u3067\u5206\u3051\u308B && node.subtitle && // 呼び名は **印で分ける箱でだけ** 出す (#578)。 従来の箱は題の下に区切り線が来るので
22804
22845
  // 置き場が無い
@@ -22906,9 +22947,29 @@ function StorageNode({
22906
22947
  })
22907
22948
  ] });
22908
22949
  }
22950
+ var TINT_FILL = "color-mix(in srgb, var(--cdl-text, #1a1f2a) 6%, transparent)";
22951
+ function lookPaint(look, accent, active) {
22952
+ const \u65E2\u5B9A\u67A0 = active ? accent : "var(--cdl-divider, #d4d4d8)";
22953
+ const \u65E2\u5B9A\u592A\u3055 = active ? 3 : 1.25;
22954
+ switch (look) {
22955
+ case "outline":
22956
+ return { fill: "none", stroke: \u65E2\u5B9A\u67A0, strokeWidth: \u65E2\u5B9A\u592A\u3055, onSolid: false };
22957
+ case "tint":
22958
+ return { fill: TINT_FILL, stroke: \u65E2\u5B9A\u67A0, strokeWidth: \u65E2\u5B9A\u592A\u3055, onSolid: false };
22959
+ case "solid":
22960
+ return { fill: "var(--cdl-text, #1a1f2a)", stroke: \u65E2\u5B9A\u67A0, strokeWidth: \u65E2\u5B9A\u592A\u3055, onSolid: true };
22961
+ case "ledger":
22962
+ return { fill: "var(--cdl-node-fill, #ffffff)", stroke: \u65E2\u5B9A\u67A0, strokeWidth: \u65E2\u5B9A\u592A\u3055, onSolid: false };
22963
+ case "dashed":
22964
+ return { fill: "none", stroke: \u65E2\u5B9A\u67A0, strokeWidth: \u65E2\u5B9A\u592A\u3055, dash: "6 4", onSolid: false };
22965
+ default:
22966
+ return { fill: "var(--cdl-node-fill, #ffffff)", stroke: \u65E2\u5B9A\u67A0, strokeWidth: \u65E2\u5B9A\u592A\u3055, onSolid: false };
22967
+ }
22968
+ }
22909
22969
  var STYLES = {
22910
22970
  // 人系
22911
22971
  person: {
22972
+ look: "outline",
22912
22973
  accent: "var(--cdl-tone-accent, #2d6a8f)",
22913
22974
  eyebrowColor: "var(--cdl-tone-accent, #2d6a8f)",
22914
22975
  icon: "M12 12c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0 2c-2.7 0-8 1.3-8 4v2h16v-2c0-2.7-5.3-4-8-4z"
@@ -22941,11 +23002,13 @@ var STYLES = {
22941
23002
  shape: "cylinder"
22942
23003
  },
22943
23004
  cache: {
23005
+ look: "dashed",
22944
23006
  accent: "var(--cdl-tone-warning, #a67a2e)",
22945
23007
  eyebrowColor: "var(--cdl-tone-warning, #a67a2e)",
22946
23008
  icon: "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"
22947
23009
  },
22948
23010
  queue: {
23011
+ look: "ledger",
22949
23012
  accent: "var(--cdl-tone-warning, #a67a2e)",
22950
23013
  eyebrowColor: "var(--cdl-tone-warning, #a67a2e)",
22951
23014
  icon: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z"
@@ -22962,12 +23025,14 @@ var STYLES = {
22962
23025
  shape: "cloud"
22963
23026
  },
22964
23027
  cdn: {
23028
+ look: "tint",
22965
23029
  accent: "var(--cdl-tone-info, #5a8ec1)",
22966
23030
  eyebrowColor: "var(--cdl-tone-info, #5a8ec1)",
22967
23031
  icon: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"
22968
23032
  },
22969
23033
  // アプリ系
22970
23034
  service: {
23035
+ look: "solid",
22971
23036
  accent: "var(--cdl-tone-teal, #2f8770)",
22972
23037
  eyebrowColor: "var(--cdl-tone-teal, #2f8770)",
22973
23038
  icon: "M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"
@@ -23039,6 +23104,7 @@ function GenericNode({
23039
23104
  const w = node.w;
23040
23105
  const h = node.h;
23041
23106
  const shape = style.shape ?? "rect";
23107
+ const paint = lookPaint(style.look, style.accent, active);
23042
23108
  const shapeEl = (() => {
23043
23109
  if (shape === "cylinder") {
23044
23110
  const rx = w / 2;
@@ -23096,19 +23162,23 @@ function GenericNode({
23096
23162
  circles.map((c, i) => /* @__PURE__ */ jsx("circle", { cx: c.cx, cy: c.cy, r: c.r - (active ? 1.5 : 0.75), fill: "var(--cdl-node-fill, #ffffff)" }, `mask-${i}`))
23097
23163
  ] });
23098
23164
  }
23099
- return /* @__PURE__ */ jsx(
23100
- "rect",
23101
- {
23102
- x: 0,
23103
- y: 0,
23104
- width: w,
23105
- height: h,
23106
- rx: 18,
23107
- fill: "var(--cdl-node-fill, #ffffff)",
23108
- stroke: active ? style.accent : "var(--cdl-divider, #d4d4d8)",
23109
- strokeWidth: active ? 3 : 1.25
23110
- }
23111
- );
23165
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
23166
+ /* @__PURE__ */ jsx(
23167
+ "rect",
23168
+ {
23169
+ x: 0,
23170
+ y: 0,
23171
+ width: w,
23172
+ height: h,
23173
+ rx: 18,
23174
+ fill: paint.fill,
23175
+ stroke: paint.stroke,
23176
+ strokeWidth: paint.strokeWidth,
23177
+ strokeDasharray: paint.dash
23178
+ }
23179
+ ),
23180
+ style.look === "ledger" && /* @__PURE__ */ jsx("line", { x1: 1, y1: h - 7, x2: w - 1, y2: h - 7, stroke: paint.stroke, strokeWidth: 1 })
23181
+ ] });
23112
23182
  })();
23113
23183
  const resolvedValue = value !== void 0 ? interpolate(value, stateValues) : void 0;
23114
23184
  const hasRows = (node.rows?.length ?? 0) > 0;
@@ -23131,56 +23201,64 @@ function GenericNode({
23131
23201
  const iconX = centered ? w / 2 + 40 : w - 48;
23132
23202
  const iconY = centered ? h / 2 - 44 - \u7D75\u306E\u82AF : 18 + cylinderShift;
23133
23203
  const dominantBaseline = centered ? "middle" : void 0;
23134
- return /* @__PURE__ */ jsxs("g", { transform: `translate(${x} ${y})`, "data-cdl-role": "node-body", children: [
23135
- shapeEl,
23136
- /* @__PURE__ */ jsxs("g", { transform: `translate(${iconX} ${iconY}) scale(1)`, "data-cdl-role": "node-kind-icon", children: [
23137
- /* @__PURE__ */ jsx("rect", { width: 24, height: 24, fill: "transparent" }),
23138
- /* @__PURE__ */ jsx("path", { d: style.icon, fill: style.eyebrowColor, opacity: 0.7, transform: "scale(1)" })
23139
- ] }),
23140
- node.eyebrow && /* @__PURE__ */ jsx("text", { x: textX, y: eyebrowY, fontSize: 17, fontWeight: 700, letterSpacing: 1.5, fill: style.eyebrowColor, textAnchor, dominantBaseline, children: node.eyebrow }),
23141
- /* @__PURE__ */ jsx("text", { "data-cdl-role": "node-label", x: textX, y: titleY, fontSize: 20, fontWeight: 700, fill: "var(--cdl-text, #1a1f2a)", textAnchor, dominantBaseline, style: node.kind === "function" || node.kind === "api" ? { fontFamily: "'JetBrains Mono', monospace" } : void 0, children: node.title }),
23142
- node.subtitle && /* @__PURE__ */ jsx("text", { x: textX, y: subtitleY, fontSize: 17, fill: "var(--cdl-text-dim, #5a6270)", textAnchor, dominantBaseline, style: { fontFamily: "'JetBrains Mono', monospace" }, children: node.subtitle }),
23143
- resolvedValue && /* @__PURE__ */ jsx(
23144
- "text",
23145
- {
23146
- x: w - 20,
23147
- y: h - 24,
23148
- fontSize: 32,
23149
- fontWeight: 700,
23150
- textAnchor: "end",
23151
- fill: "var(--cdl-text, #1a1f2a)",
23152
- style: { fontFamily: "'JetBrains Mono', monospace" },
23153
- children: resolvedValue
23154
- }
23155
- ),
23156
- node.rows && node.rows.length > 0 && (() => {
23157
- const resolved = node.rows.map((row) => interpolate(row, stateValues));
23158
- const splits = resolved.map(splitRow);
23159
- const leftMaxWidth = splits.reduce(
23160
- (m, s) => Math.max(m, rowColumnWidth(s.left, GENERIC_ROW_LEFT_SIZE_PX, false)),
23161
- 0
23162
- );
23163
- const rightColX = ROW_PAD_X_PX + leftMaxWidth + ROW_COL_GAP_PX;
23164
- return /* @__PURE__ */ jsx("g", { children: splits.map((s, i) => /* @__PURE__ */ jsxs("g", { transform: `translate(0 ${rowBaselineY(node.kind, i)})`, children: [
23165
- /* @__PURE__ */ jsx("text", { "data-cdl-role": "node-row", "data-cdl-row-index": i, x: ROW_PAD_X_PX, y: 0, fontSize: 18, fill: "var(--cdl-text-dim, #5a6270)", children: s.left }),
23166
- /* @__PURE__ */ jsx(
23204
+ return /* @__PURE__ */ jsxs(
23205
+ "g",
23206
+ {
23207
+ transform: `translate(${x} ${y})`,
23208
+ "data-cdl-role": "node-body",
23209
+ "data-cdl-look": style.look,
23210
+ children: [
23211
+ shapeEl,
23212
+ /* @__PURE__ */ jsxs("g", { transform: `translate(${iconX} ${iconY}) scale(1)`, "data-cdl-role": "node-kind-icon", children: [
23213
+ /* @__PURE__ */ jsx("rect", { width: 24, height: 24, fill: "transparent" }),
23214
+ /* @__PURE__ */ jsx("path", { d: style.icon, fill: style.eyebrowColor, opacity: 0.7, transform: "scale(1)" })
23215
+ ] }),
23216
+ node.eyebrow && /* @__PURE__ */ jsx("text", { x: textX, y: eyebrowY, fontSize: 17, fontWeight: 700, letterSpacing: 1.5, fill: paint.onSolid ? "var(--cdl-node-fill, #ffffff)" : style.eyebrowColor, textAnchor, dominantBaseline, children: node.eyebrow }),
23217
+ /* @__PURE__ */ jsx("text", { "data-cdl-role": "node-label", x: textX, y: titleY, fontSize: 20, fontWeight: 700, fill: paint.onSolid ? "var(--cdl-node-fill, #ffffff)" : "var(--cdl-text, #1a1f2a)", textAnchor, dominantBaseline, style: node.kind === "function" || node.kind === "api" ? { fontFamily: "'JetBrains Mono', monospace" } : void 0, children: node.title }),
23218
+ node.subtitle && /* @__PURE__ */ jsx("text", { x: textX, y: subtitleY, fontSize: 17, fill: paint.onSolid ? "var(--cdl-node-fill, #ffffff)" : "var(--cdl-text-dim, #5a6270)", textAnchor, dominantBaseline, style: { fontFamily: "'JetBrains Mono', monospace" }, children: node.subtitle }),
23219
+ resolvedValue && /* @__PURE__ */ jsx(
23167
23220
  "text",
23168
23221
  {
23169
- "data-cdl-role": "node-row",
23170
- "data-cdl-row-index": i,
23171
- x: rightColX,
23172
- y: 0,
23173
- fontSize: 21,
23222
+ x: w - 20,
23223
+ y: h - 24,
23224
+ fontSize: 32,
23174
23225
  fontWeight: 700,
23175
- textAnchor: "start",
23226
+ textAnchor: "end",
23176
23227
  fill: "var(--cdl-text, #1a1f2a)",
23177
23228
  style: { fontFamily: "'JetBrains Mono', monospace" },
23178
- children: s.right
23229
+ children: resolvedValue
23179
23230
  }
23180
- )
23181
- ] }, i)) });
23182
- })()
23183
- ] });
23231
+ ),
23232
+ node.rows && node.rows.length > 0 && (() => {
23233
+ const resolved = node.rows.map((row) => interpolate(row, stateValues));
23234
+ const splits = resolved.map(splitRow);
23235
+ const leftMaxWidth = splits.reduce(
23236
+ (m, s) => Math.max(m, rowColumnWidth(s.left, GENERIC_ROW_LEFT_SIZE_PX, false)),
23237
+ 0
23238
+ );
23239
+ const rightColX = ROW_PAD_X_PX + leftMaxWidth + ROW_COL_GAP_PX;
23240
+ return /* @__PURE__ */ jsx("g", { children: splits.map((s, i) => /* @__PURE__ */ jsxs("g", { transform: `translate(0 ${rowBaselineY(node.kind, i)})`, children: [
23241
+ /* @__PURE__ */ jsx("text", { "data-cdl-role": "node-row", "data-cdl-row-index": i, x: ROW_PAD_X_PX, y: 0, fontSize: 18, fill: "var(--cdl-text-dim, #5a6270)", children: s.left }),
23242
+ /* @__PURE__ */ jsx(
23243
+ "text",
23244
+ {
23245
+ "data-cdl-role": "node-row",
23246
+ "data-cdl-row-index": i,
23247
+ x: rightColX,
23248
+ y: 0,
23249
+ fontSize: 21,
23250
+ fontWeight: 700,
23251
+ textAnchor: "start",
23252
+ fill: "var(--cdl-text, #1a1f2a)",
23253
+ style: { fontFamily: "'JetBrains Mono', monospace" },
23254
+ children: s.right
23255
+ }
23256
+ )
23257
+ ] }, i)) });
23258
+ })()
23259
+ ]
23260
+ }
23261
+ );
23184
23262
  }
23185
23263
  var MARK_INNER_RATIO = 0.56;
23186
23264
  var RING_WIDTH_ACTIVE = 6;
@@ -29609,6 +29687,7 @@ function CdlStage({
29609
29687
  "aria-label": buildDiagramAltText(laid.topic, currentPhase),
29610
29688
  "data-cdl-stage": "",
29611
29689
  "data-cdl-scale": diagramScale === 1 ? void 0 : diagramScale,
29690
+ "data-cdl-palette": laid.palette,
29612
29691
  children: [
29613
29692
  /* @__PURE__ */ jsxs("defs", { children: [
29614
29693
  Object.entries(TONE).flatMap(
@@ -30482,7 +30561,8 @@ var ER_CARDINALITY_HEAD = {
30482
30561
  function er(preset) {
30483
30562
  const entityW = resolveStorageBoxW(preset.entityWidth, "er", "entityWidth");
30484
30563
  const tone = preset.defaultTone ?? "info";
30485
- const b = diagram(preset.id, { topic: preset.topic });
30564
+ const \u7E1E\u3092\u6577\u304F = preset.rowStripe ?? true;
30565
+ const b = diagram(preset.id, { topic: preset.topic, palette: preset.palette });
30486
30566
  const entities = [];
30487
30567
  const phaseActivate = [];
30488
30568
  let relIdx = 0;
@@ -30518,7 +30598,10 @@ function er(preset) {
30518
30598
  ...\u8A2D\u8A08\u306E\u5F62 ? {} : { eyebrow: "\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3" },
30519
30599
  ...\u8A2D\u8A08\u306E\u5F62 && e.subtitle ? { subtitle: e.subtitle } : {},
30520
30600
  rows,
30521
- ...\u8A2D\u8A08\u306E\u5F62 ? { rowMarks: \u5370 } : {}
30601
+ ...\u8A2D\u8A08\u306E\u5F62 ? { rowMarks: \u5370 } : {},
30602
+ // 縞は設計の形だけに敷く (#1553)。 `rows` を直接書いた古い形は行頭の印を持たず、
30603
+ // 群の区切りも線で表しているので、縞を足すと手掛かりが 3 つになる
30604
+ ...\u8A2D\u8A08\u306E\u5F62 && \u7E1E\u3092\u6577\u304F ? { rowStripe: true } : {}
30522
30605
  });
30523
30606
  entities.push(e.id);
30524
30607
  phaseActivate.push(e.id);
@@ -30709,6 +30792,8 @@ function infrastructure(preset) {
30709
30792
  ...c.sub ? { sub: c.sub } : {},
30710
30793
  tone: c.tone ?? tone,
30711
30794
  style: c.style ?? style,
30795
+ ...c.role ? { role: c.role } : {},
30796
+ ...c.labelPlate === void 0 ? {} : { labelPlate: c.labelPlate },
30712
30797
  labelOffsetX: c.labelOffsetX ?? 0,
30713
30798
  labelOffsetY: c.labelOffsetY ?? 0
30714
30799
  });