@cardenelabs/cdl 0.38.0 → 0.40.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 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-BYdmSviQ.cjs';
2
- export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as ScrollProgressHandle, U as TONES, V as computeEventBindingKey, W as computeFormulaKey, X as computeInputSignalKey, Y as computeScrollTriggerKey, Z as computed, _ as createInteractiveSignalsAccessor, $ as createScrollProgressHandle, a0 as createScrollProgressSignals, a1 as hasInteractivePrimitives, a2 as sequenceBoardMetrics, a3 as sequenceStepId, a4 as signal } from './render-BYdmSviQ.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-UGswDfAh.cjs';
2
+ export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as ScrollProgressHandle, U as TONES, V as computeEventBindingKey, W as computeFormulaKey, X as computeInputSignalKey, Y as computeScrollTriggerKey, Z as computed, _ as createInteractiveSignalsAccessor, $ as createScrollProgressHandle, a0 as createScrollProgressSignals, a1 as hasInteractivePrimitives, a2 as sequenceBoardMetrics, a3 as sequenceStepId, a4 as signal } from './render-UGswDfAh.cjs';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
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 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-BYdmSviQ.js';
2
- export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as ScrollProgressHandle, U as TONES, V as computeEventBindingKey, W as computeFormulaKey, X as computeInputSignalKey, Y as computeScrollTriggerKey, Z as computed, _ as createInteractiveSignalsAccessor, $ as createScrollProgressHandle, a0 as createScrollProgressSignals, a1 as hasInteractivePrimitives, a2 as sequenceBoardMetrics, a3 as sequenceStepId, a4 as signal } from './render-BYdmSviQ.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-UGswDfAh.js';
2
+ export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as ScrollProgressHandle, U as TONES, V as computeEventBindingKey, W as computeFormulaKey, X as computeInputSignalKey, Y as computeScrollTriggerKey, Z as computed, _ as createInteractiveSignalsAccessor, $ as createScrollProgressHandle, a0 as createScrollProgressSignals, a1 as hasInteractivePrimitives, a2 as sequenceBoardMetrics, a3 as sequenceStepId, a4 as signal } from './render-UGswDfAh.js';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
package/dist/index.js CHANGED
@@ -20806,7 +20806,11 @@ var DRAW_KINDS = /* @__PURE__ */ new Set([
20806
20806
  "mind-map",
20807
20807
  "tree-hierarchy",
20808
20808
  "gantt-timeline",
20809
- "funnel-stages"
20809
+ "funnel-stages",
20810
+ "chart-gauge",
20811
+ "chart-radial",
20812
+ "chart-stacked-bar",
20813
+ "chart-waffle"
20810
20814
  ]);
20811
20815
  var KINDS = new Set(NODE_KINDS);
20812
20816
  var ENG_BANNED = /\b(FUNCTION|STORAGE|EVENT LOG|BALANCES MAPPING|READ|WRITE|EMIT|CALL)\b/;
@@ -24352,6 +24356,15 @@ function interpolateColor(template, stateValues, fallback) {
24352
24356
  if (!template) return fallback;
24353
24357
  return interpolate(template, stateValues);
24354
24358
  }
24359
+ function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D, \u8D77\u70B9 = -Math.PI / 2, \u5168\u5468 = Math.PI * 2) {
24360
+ if (\u958B\u304D <= 0) return null;
24361
+ if (\u958B\u304D >= 1 && \u5168\u5468 >= Math.PI * 2) return /* @__PURE__ */ jsx("circle", { cx, cy, r });
24362
+ const a0 = \u8D77\u70B9;
24363
+ const a1 = a0 + Math.min(1, \u958B\u304D) * \u5168\u5468;
24364
+ const large = a1 - a0 > Math.PI ? 1 : 0;
24365
+ const d = `M ${cx} ${cy} L ${cx + r * Math.cos(a0)} ${cy + r * Math.sin(a0)} A ${r} ${r} 0 ${large} 1 ${cx + r * Math.cos(a1)} ${cy + r * Math.sin(a1)} Z`;
24366
+ return /* @__PURE__ */ jsx("path", { d });
24367
+ }
24355
24368
 
24356
24369
  // src/kinds/chart-number.ts
24357
24370
  function \u5B9F\u5024\u8868\u8A18(v) {
@@ -24799,15 +24812,6 @@ function \u8F2A\u306E\u9053(cx, cy, R, r, a0, a1) {
24799
24812
  const large = a1 - a0 > Math.PI ? 1 : 0;
24800
24813
  return `M ${cx + R * Math.cos(a0)} ${cy + R * Math.sin(a0)} A ${R} ${R} 0 ${large} 1 ${cx + R * Math.cos(a1)} ${cy + R * Math.sin(a1)} L ${cx + r * Math.cos(a1)} ${cy + r * Math.sin(a1)} A ${r} ${r} 0 ${large} 0 ${cx + r * Math.cos(a0)} ${cy + r * Math.sin(a0)} Z`;
24801
24814
  }
24802
- function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D) {
24803
- if (\u958B\u304D <= 0) return null;
24804
- if (\u958B\u304D >= 1) return /* @__PURE__ */ jsx("circle", { cx, cy, r });
24805
- const a0 = -Math.PI / 2;
24806
- const a1 = a0 + \u958B\u304D * Math.PI * 2;
24807
- const large = \u958B\u304D > 0.5 ? 1 : 0;
24808
- const d = `M ${cx} ${cy} L ${cx + r * Math.cos(a0)} ${cy + r * Math.sin(a0)} A ${r} ${r} 0 ${large} 1 ${cx + r * Math.cos(a1)} ${cy + r * Math.sin(a1)} Z`;
24809
- return /* @__PURE__ */ jsx("path", { d });
24810
- }
24811
24815
  function sliceColor(tone, idx) {
24812
24816
  if (tone) return TONE[tone];
24813
24817
  return chartSeriesColor(idx);
@@ -24815,7 +24819,9 @@ function sliceColor(tone, idx) {
24815
24819
  function ChartGaugeNode({
24816
24820
  node,
24817
24821
  active,
24818
- stateValues = {}
24822
+ stateValues = {},
24823
+ drawing = false,
24824
+ progress = 1
24819
24825
  }) {
24820
24826
  const x0 = node.cx - node.w / 2;
24821
24827
  const y0 = node.cy - node.h / 2;
@@ -24860,6 +24866,21 @@ function ChartGaugeNode({
24860
24866
  const \u898B\u51FA\u3057\u306E\u7D1A = Math.max(9, Math.round(\u5408\u8A08\u306E\u7D1A * 0.38));
24861
24867
  const \u5185\u8A33\u306E\u5E45 = \u4F7F\u3048\u308B\u5E452 / Math.max(data.length, 1);
24862
24868
  const \u5185\u8A33\u306Ey = cy + \u5F27\u3068\u5185\u8A33\u306E\u9593;
24869
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
24870
+ const \u5207\u308A\u629C\u304Did = `cdl-gauge-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
24871
+ const \u5F27\u305F\u3061 = slices.map((s, idx) => /* @__PURE__ */ jsx(
24872
+ "path",
24873
+ {
24874
+ "data-cdl-role": "chart-gauge-arc",
24875
+ "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
24876
+ d: s.path,
24877
+ fill: arcColor(s.d.tone, idx),
24878
+ stroke: "var(--cdl-node-fill, #ffffff)",
24879
+ strokeWidth: 3,
24880
+ strokeLinejoin: "round"
24881
+ },
24882
+ `arc-${idx}`
24883
+ ));
24863
24884
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
24864
24885
  /* @__PURE__ */ jsx(
24865
24886
  "rect",
@@ -24875,19 +24896,8 @@ function ChartGaugeNode({
24875
24896
  strokeWidth: active ? 3 : 1.25
24876
24897
  }
24877
24898
  ),
24878
- slices.map((s, idx) => /* @__PURE__ */ jsx(
24879
- "path",
24880
- {
24881
- "data-cdl-role": "chart-gauge-arc",
24882
- "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
24883
- d: s.path,
24884
- fill: arcColor(s.d.tone, idx),
24885
- stroke: "var(--cdl-node-fill, #ffffff)",
24886
- strokeWidth: 3,
24887
- strokeLinejoin: "round"
24888
- },
24889
- `arc-${idx}`
24890
- )),
24899
+ drawing && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, radius + 2, \u4F38\u3073, Math.PI, Math.PI) }) }),
24900
+ drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u5F27\u305F\u3061 }) : \u5F27\u305F\u3061,
24891
24901
  /* @__PURE__ */ jsx(
24892
24902
  "text",
24893
24903
  {
@@ -24952,7 +24962,9 @@ function arcColor(tone, idx) {
24952
24962
  function ChartRadialNode({
24953
24963
  node,
24954
24964
  active,
24955
- stateValues = {}
24965
+ stateValues = {},
24966
+ drawing = false,
24967
+ progress = 1
24956
24968
  }) {
24957
24969
  const x0 = node.cx - node.w / 2;
24958
24970
  const y0 = node.cy - node.h / 2;
@@ -24991,6 +25003,20 @@ function ChartRadialNode({
24991
25003
  };
24992
25004
  });
24993
25005
  const \u4E00\u89A7\u306E\u59CB\u307E\u308A = PAD + (\u4F7F\u3048\u308B\u9AD8\u3055 - \u884C\u306E\u9AD8\u3055 * data.length) / 2 + \u884C\u306E\u9AD8\u3055 / 2;
25006
+ const \u958B\u304D = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
25007
+ const \u5207\u308A\u629C\u304Did = `cdl-radial-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
25008
+ const \u53D6\u308A\u5206\u305F\u3061 = rings.map(
25009
+ (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsx(
25010
+ "path",
25011
+ {
25012
+ "data-cdl-role": "chart-radial-arc",
25013
+ "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
25014
+ d: r.\u53D6\u308A\u5206,
25015
+ fill: arcColor2(r.d.tone, idx)
25016
+ },
25017
+ `arc-${idx}`
25018
+ )
25019
+ );
24994
25020
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
24995
25021
  /* @__PURE__ */ jsx(
24996
25022
  "rect",
@@ -25016,18 +25042,8 @@ function ChartRadialNode({
25016
25042
  },
25017
25043
  `track-${idx}`
25018
25044
  )),
25019
- rings.map(
25020
- (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsx(
25021
- "path",
25022
- {
25023
- "data-cdl-role": "chart-radial-arc",
25024
- "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
25025
- d: r.\u53D6\u308A\u5206,
25026
- fill: arcColor2(r.d.tone, idx)
25027
- },
25028
- `arc-${idx}`
25029
- )
25030
- ),
25045
+ drawing && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(\u5F27\u306Ecx, cy, \u5916\u534A\u5F84 + \u5E2F\u306E\u5E45, \u958B\u304D) }) }),
25046
+ drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u53D6\u308A\u5206\u305F\u3061 }) : \u53D6\u308A\u5206\u305F\u3061,
25031
25047
  data.map((d, idx) => {
25032
25048
  const y = \u4E00\u89A7\u306E\u59CB\u307E\u308A + \u884C\u306E\u9AD8\u3055 * idx;
25033
25049
  return /* @__PURE__ */ jsxs("g", { "data-cdl-role": "chart-radial-item", children: [
@@ -25245,7 +25261,9 @@ function \u5370\u306E\u5272\u4ED8(\u5024) {
25245
25261
  function ChartWaffleNode({
25246
25262
  node,
25247
25263
  active,
25248
- stateValues = {}
25264
+ stateValues = {},
25265
+ drawing = false,
25266
+ progress = 1
25249
25267
  }) {
25250
25268
  const x0 = node.cx - node.w / 2;
25251
25269
  const y0 = node.cy - node.h / 2;
@@ -25274,6 +25292,7 @@ function ChartWaffleNode({
25274
25292
  \u914D\u5206.forEach((n, idx) => {
25275
25293
  for (let k = 0; k < n; k++) \u6301\u3061\u4E3B.push(idx);
25276
25294
  });
25295
+ const \u57CB\u307E\u3063\u305F = Math.round(\u9032\u307F\u3092\u7573\u3080(drawing, progress) * WAFFLE_TOTAL);
25277
25296
  const \u4E00\u89A7\u306E\u59CB\u307E\u308A = PAD + (\u4F7F\u3048\u308B\u9AD8\u3055 - \u884C\u306E\u9AD8\u3055 * data.length) / 2 + \u884C\u306E\u9AD8\u3055 / 2;
25278
25297
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
25279
25298
  /* @__PURE__ */ jsx(
@@ -25294,6 +25313,7 @@ function ChartWaffleNode({
25294
25313
  const \u884C = Math.floor(k / WAFFLE_COLS);
25295
25314
  const \u5217 = k % WAFFLE_COLS;
25296
25315
  const owner = \u6301\u3061\u4E3B[k];
25316
+ const \u57CB\u307E\u3063\u3066\u3044\u308B = owner !== void 0 && k < \u57CB\u307E\u3063\u305F;
25297
25317
  return /* @__PURE__ */ jsx(
25298
25318
  "rect",
25299
25319
  {
@@ -25304,8 +25324,8 @@ function ChartWaffleNode({
25304
25324
  width: \u5370,
25305
25325
  height: \u5370,
25306
25326
  rx: 2,
25307
- fill: owner === void 0 ? "var(--cdl-divider, #d4d4d8)" : \u5370\u306E\u82722(data[owner].tone, owner),
25308
- fillOpacity: owner === void 0 ? 0.35 : 1
25327
+ fill: \u57CB\u307E\u3063\u3066\u3044\u308B ? \u5370\u306E\u82722(data[owner].tone, owner) : "var(--cdl-divider, #d4d4d8)",
25328
+ fillOpacity: \u57CB\u307E\u3063\u3066\u3044\u308B ? 1 : 0.35
25309
25329
  },
25310
25330
  `cell-${k}`
25311
25331
  );
@@ -25350,7 +25370,9 @@ var SLICE_MIN_W_FOR_VALUE = 84;
25350
25370
  function ChartStackedBarNode({
25351
25371
  node,
25352
25372
  active,
25353
- stateValues = {}
25373
+ stateValues = {},
25374
+ drawing = false,
25375
+ progress = 1
25354
25376
  }) {
25355
25377
  const x0 = node.cx - node.w / 2;
25356
25378
  const y0 = node.cy - node.h / 2;
@@ -25368,6 +25390,8 @@ function ChartStackedBarNode({
25368
25390
  const \u4E00\u89A7\u306E\u9AD8\u3055 = 26;
25369
25391
  const \u5168\u4F53\u306E\u9AD8\u3055 = \u5E2F\u305F\u3061.length * \u5E2F\u306E\u9AD8\u3055 + (\u5E2F\u305F\u3061.length - 1) * \u5E2F\u306E\u9593 + 16 + \u4E00\u89A7\u306E\u9AD8\u3055;
25370
25392
  const \u4E0A\u7AEF = Math.max(PAD, (node.h - \u5168\u4F53\u306E\u9AD8\u3055) / 2);
25393
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
25394
+ const \u5207\u308A\u629C\u304Did = `cdl-stacked-bar-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
25371
25395
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
25372
25396
  /* @__PURE__ */ jsx(
25373
25397
  "rect",
@@ -25383,6 +25407,7 @@ function ChartStackedBarNode({
25383
25407
  strokeWidth: active ? 3 : 1.25
25384
25408
  }
25385
25409
  ),
25410
+ drawing && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: \u5E2F\u306E\u5DE6 + \u5E2F\u306E\u5E45 * \u4F38\u3073, height: node.h }) }) }),
25386
25411
  \u5E2F\u305F\u3061.map((\u5E2F, \u6BB5) => {
25387
25412
  const y = \u4E0A\u7AEF + \u6BB5 * (\u5E2F\u306E\u9AD8\u3055 + \u5E2F\u306E\u9593);
25388
25413
  let \u5DE6 = \u5E2F\u306E\u5DE6;
@@ -25399,68 +25424,62 @@ function ChartStackedBarNode({
25399
25424
  children: \u5E2F.\u540D\u524D
25400
25425
  }
25401
25426
  ),
25402
- \u5E2F.\u533A\u753B.map((s, idx) => {
25403
- const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
25404
- const x = \u5DE6;
25405
- \u5DE6 += w;
25406
- const \u8272 = \u5370\u306E\u82723(s.tone, idx);
25407
- return /* @__PURE__ */ jsxs("g", { children: [
25408
- /* @__PURE__ */ jsx(
25409
- "rect",
25410
- {
25411
- "data-cdl-role": "chart-stacked-bar-slice",
25412
- "data-cdl-unresolved": s.unresolved ? "true" : void 0,
25413
- x,
25414
- y,
25415
- width: Math.max(0, w),
25416
- height: \u5E2F\u306E\u9AD8\u3055,
25417
- fill: \u8272
25418
- }
25419
- ),
25420
- w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsx(
25421
- "text",
25422
- {
25423
- "data-cdl-role": "chart-stacked-bar-slice-text",
25424
- x: x + w / 2,
25425
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
25426
- fontSize: \u533A\u753B\u306E\u7D1A,
25427
- fontWeight: 700,
25428
- textAnchor: "middle",
25429
- fill: "#ffffff",
25430
- children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
25431
- }
25432
- ),
25433
- w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsx(
25434
- "text",
25435
- {
25436
- "data-cdl-role": "chart-stacked-bar-slice-value",
25437
- x: x + w / 2,
25438
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
25439
- fontSize: \u533A\u753B\u306E\u7D1A - 1,
25440
- textAnchor: "middle",
25441
- fill: "#ffffff",
25442
- fillOpacity: 0.85,
25443
- children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
25444
- }
25445
- )
25446
- ] }, `slice-${idx}`);
25447
- })
25427
+ (() => {
25428
+ const \u533A\u753B\u305F\u3061 = \u5E2F.\u533A\u753B.map((s, idx) => {
25429
+ const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
25430
+ const x = \u5DE6;
25431
+ \u5DE6 += w;
25432
+ const \u8272 = \u5370\u306E\u82723(s.tone, idx);
25433
+ return /* @__PURE__ */ jsxs("g", { children: [
25434
+ /* @__PURE__ */ jsx(
25435
+ "rect",
25436
+ {
25437
+ "data-cdl-role": "chart-stacked-bar-slice",
25438
+ "data-cdl-unresolved": s.unresolved ? "true" : void 0,
25439
+ x,
25440
+ y,
25441
+ width: Math.max(0, w),
25442
+ height: \u5E2F\u306E\u9AD8\u3055,
25443
+ fill: \u8272
25444
+ }
25445
+ ),
25446
+ w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsx(
25447
+ "text",
25448
+ {
25449
+ "data-cdl-role": "chart-stacked-bar-slice-text",
25450
+ x: x + w / 2,
25451
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
25452
+ fontSize: \u533A\u753B\u306E\u7D1A,
25453
+ fontWeight: 700,
25454
+ textAnchor: "middle",
25455
+ fill: "#ffffff",
25456
+ children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
25457
+ }
25458
+ ),
25459
+ w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsx(
25460
+ "text",
25461
+ {
25462
+ "data-cdl-role": "chart-stacked-bar-slice-value",
25463
+ x: x + w / 2,
25464
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
25465
+ fontSize: \u533A\u753B\u306E\u7D1A - 1,
25466
+ textAnchor: "middle",
25467
+ fill: "#ffffff",
25468
+ fillOpacity: 0.85,
25469
+ children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
25470
+ }
25471
+ )
25472
+ ] }, `slice-${idx}`);
25473
+ });
25474
+ return drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u533A\u753B\u305F\u3061 }) : \u533A\u753B\u305F\u3061;
25475
+ })()
25448
25476
  ] }, `bar-${\u6BB5}`);
25449
25477
  }),
25450
25478
  \u4E00\u89A7\u306E\u4E26\u3073(data, \u5E2F\u306E\u5DE6, node.w - PAD, \u540D\u524D\u306E\u7D1A).map(({ d, idx, x, \u884C }) => {
25451
25479
  const y = \u4E0A\u7AEF + \u5E2F\u305F\u3061.length * (\u5E2F\u306E\u9AD8\u3055 + \u5E2F\u306E\u9593) - \u5E2F\u306E\u9593 + 16 + \u4E00\u89A7\u306E\u9AD8\u3055 / 2 + \u884C * \u4E00\u89A7\u306E\u9AD8\u3055;
25452
25480
  return /* @__PURE__ */ jsxs("g", { "data-cdl-role": "chart-stacked-bar-legend", children: [
25453
25481
  /* @__PURE__ */ jsx("rect", { x, y: y - 5, width: 10, height: 10, rx: 2, fill: \u5370\u306E\u82723(d.tone, idx) }),
25454
- /* @__PURE__ */ jsx(
25455
- "text",
25456
- {
25457
- x: x + 16,
25458
- y: y + 4,
25459
- fontSize: \u540D\u524D\u306E\u7D1A,
25460
- fill: "var(--cdl-text, #1a1f2a)",
25461
- children: d.label
25462
- }
25463
- )
25482
+ /* @__PURE__ */ jsx("text", { x: x + 16, y: y + 4, fontSize: \u540D\u524D\u306E\u7D1A, fill: "var(--cdl-text, #1a1f2a)", children: d.label })
25464
25483
  ] }, `legend-${idx}`);
25465
25484
  })
25466
25485
  ] });
@@ -30421,9 +30440,27 @@ function CdlNodeView({
30421
30440
  }
30422
30441
  );
30423
30442
  case "chart-gauge":
30424
- return /* @__PURE__ */ jsx(ChartGaugeNode, { node: resolvedNode, active, stateValues });
30443
+ return /* @__PURE__ */ jsx(
30444
+ ChartGaugeNode,
30445
+ {
30446
+ node: resolvedNode,
30447
+ active,
30448
+ stateValues,
30449
+ drawing,
30450
+ progress
30451
+ }
30452
+ );
30425
30453
  case "chart-stacked-bar":
30426
- return /* @__PURE__ */ jsx(ChartStackedBarNode, { node: resolvedNode, active, stateValues });
30454
+ return /* @__PURE__ */ jsx(
30455
+ ChartStackedBarNode,
30456
+ {
30457
+ node: resolvedNode,
30458
+ active,
30459
+ stateValues,
30460
+ drawing,
30461
+ progress
30462
+ }
30463
+ );
30427
30464
  case "chart-slope":
30428
30465
  return /* @__PURE__ */ jsx(
30429
30466
  ChartSlopeNode,
@@ -30436,11 +30473,29 @@ function CdlNodeView({
30436
30473
  }
30437
30474
  );
30438
30475
  case "chart-waffle":
30439
- return /* @__PURE__ */ jsx(ChartWaffleNode, { node: resolvedNode, active, stateValues });
30476
+ return /* @__PURE__ */ jsx(
30477
+ ChartWaffleNode,
30478
+ {
30479
+ node: resolvedNode,
30480
+ active,
30481
+ stateValues,
30482
+ drawing,
30483
+ progress
30484
+ }
30485
+ );
30440
30486
  case "chart-stat":
30441
30487
  return /* @__PURE__ */ jsx(ChartStatNode, { node: resolvedNode, active, stateValues });
30442
30488
  case "chart-radial":
30443
- return /* @__PURE__ */ jsx(ChartRadialNode, { node: resolvedNode, active, stateValues });
30489
+ return /* @__PURE__ */ jsx(
30490
+ ChartRadialNode,
30491
+ {
30492
+ node: resolvedNode,
30493
+ active,
30494
+ stateValues,
30495
+ drawing,
30496
+ progress
30497
+ }
30498
+ );
30444
30499
  case "chart-bar":
30445
30500
  return /* @__PURE__ */ jsx(
30446
30501
  ChartBarNode,