@cardenelabs/cdl 0.37.0 → 0.39.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-B1ArenZ7.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-B1ArenZ7.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-B1ArenZ7.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-B1ArenZ7.js';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
package/dist/index.js CHANGED
@@ -14156,6 +14156,8 @@ var Timeline = class {
14156
14156
  rafHandle = null;
14157
14157
  phaseIndex = 0;
14158
14158
  phaseProgress = 0;
14159
+ /** 曲線を通す前の進み (cdl#711)。 経過時間そのものの割合で、 描く動きが読む */
14160
+ phaseLinearProgress = 0;
14159
14161
  phaseStartedAt = 0;
14160
14162
  status = "idle";
14161
14163
  /**
@@ -14184,12 +14186,12 @@ var Timeline = class {
14184
14186
  const initial = options.initialPhaseIndex;
14185
14187
  if (initial != null && initial > 0 && initial < phases.length) {
14186
14188
  this.phaseIndex = initial;
14187
- this.phaseProgress = 1;
14189
+ this.setProgress(1);
14188
14190
  this.status = initial === phases.length - 1 ? "settled" : "paused";
14189
14191
  }
14190
14192
  this.initialState = {
14191
14193
  phaseIndex: this.phaseIndex,
14192
- phaseProgress: this.phaseProgress,
14194
+ phaseLinearProgress: this.phaseLinearProgress,
14193
14195
  status: this.status
14194
14196
  };
14195
14197
  }
@@ -14211,13 +14213,14 @@ var Timeline = class {
14211
14213
  }
14212
14214
  snapshot() {
14213
14215
  const cached = this.cachedSnapshot;
14214
- if (cached && cached.status === this.status && cached.phaseIndex === this.phaseIndex && cached.phaseProgress === this.phaseProgress && cached.totalPhases === this.phases.length) {
14216
+ if (cached && cached.status === this.status && cached.phaseIndex === this.phaseIndex && cached.phaseProgress === this.phaseProgress && cached.phaseLinearProgress === this.phaseLinearProgress && cached.totalPhases === this.phases.length) {
14215
14217
  return cached;
14216
14218
  }
14217
14219
  const next = {
14218
14220
  status: this.status,
14219
14221
  phaseIndex: this.phaseIndex,
14220
14222
  phaseProgress: this.phaseProgress,
14223
+ phaseLinearProgress: this.phaseLinearProgress,
14221
14224
  totalPhases: this.phases.length
14222
14225
  };
14223
14226
  this.cachedSnapshot = next;
@@ -14240,7 +14243,7 @@ var Timeline = class {
14240
14243
  const clamped = Math.max(0, Math.min(this.phases.length - 1, index));
14241
14244
  this.cancelRaf();
14242
14245
  this.phaseIndex = clamped;
14243
- this.phaseProgress = 1;
14246
+ this.setProgress(1);
14244
14247
  this.status = clamped === this.phases.length - 1 ? "settled" : "paused";
14245
14248
  this.emit();
14246
14249
  }
@@ -14280,14 +14283,14 @@ var Timeline = class {
14280
14283
  if (this.phaseIndex <= 0) return;
14281
14284
  this.cancelRaf();
14282
14285
  this.phaseIndex -= 1;
14283
- this.phaseProgress = 1;
14286
+ this.setProgress(1);
14284
14287
  this.status = "paused";
14285
14288
  this.emit();
14286
14289
  }
14287
14290
  reset() {
14288
14291
  this.cancelRaf();
14289
14292
  this.phaseIndex = 0;
14290
- this.phaseProgress = 0;
14293
+ this.setProgress(0);
14291
14294
  this.status = "idle";
14292
14295
  this.emit();
14293
14296
  }
@@ -14308,7 +14311,7 @@ var Timeline = class {
14308
14311
  this.subscribers.clear();
14309
14312
  this.status = this.initialState.status;
14310
14313
  this.phaseIndex = this.initialState.phaseIndex;
14311
- this.phaseProgress = this.initialState.phaseProgress;
14314
+ this.setProgress(this.initialState.phaseLinearProgress);
14312
14315
  }
14313
14316
  // ─── internals ───────────────────────────────────────────────
14314
14317
  advancePhase() {
@@ -14344,20 +14347,20 @@ var Timeline = class {
14344
14347
  }, ms);
14345
14348
  }
14346
14349
  beginPhaseTransition() {
14347
- this.phaseProgress = 0;
14350
+ this.setProgress(0);
14348
14351
  this.phaseStartedAt = performance.now();
14349
14352
  this.cancelRaf();
14350
14353
  const step = (now) => {
14351
14354
  const duration = this.autoAdvanceMsOverride ?? this.getPhase().durationMs ?? 600;
14352
14355
  const elapsed = now - this.phaseStartedAt;
14353
14356
  const linearT = clamp01(elapsed / duration);
14354
- this.phaseProgress = this.easing(linearT);
14357
+ this.setProgress(linearT);
14355
14358
  this.emit();
14356
14359
  if (linearT < 1) {
14357
14360
  this.rafHandle = requestAnimationFrame(step);
14358
14361
  return;
14359
14362
  }
14360
- this.phaseProgress = 1;
14363
+ this.setProgress(1);
14361
14364
  this.emit();
14362
14365
  if (this.status === "playing") {
14363
14366
  if (this.phaseIndex < this.phases.length - 1) {
@@ -14372,6 +14375,19 @@ var Timeline = class {
14372
14375
  };
14373
14376
  this.rafHandle = requestAnimationFrame(step);
14374
14377
  }
14378
+ /**
14379
+ * 段の進みを 2 つ同時に置く (cdl#711)。
14380
+ *
14381
+ * **代入する場所を 1 つに閉じる**。 曲げた進みと曲げる前の進みを別々に書くと、
14382
+ * どちらかを更新し忘れた経路が「前の段の値のまま」 で残る。
14383
+ *
14384
+ * 両端 (0 と 1) は曲線を通さず、 そのまま置く。 曲線は差し替えられる欄なので、
14385
+ * `easing(1)` が 1 を返す保証がない。 段の始まりと終わりの値は曲線に委ねない。
14386
+ */
14387
+ setProgress(linear2) {
14388
+ this.phaseLinearProgress = linear2;
14389
+ this.phaseProgress = linear2 <= 0 ? 0 : linear2 >= 1 ? 1 : this.easing(linear2);
14390
+ }
14375
14391
  cancelRaf() {
14376
14392
  if (this.rafHandle != null) {
14377
14393
  cancelAnimationFrame(this.rafHandle);
@@ -20790,7 +20806,10 @@ var DRAW_KINDS = /* @__PURE__ */ new Set([
20790
20806
  "mind-map",
20791
20807
  "tree-hierarchy",
20792
20808
  "gantt-timeline",
20793
- "funnel-stages"
20809
+ "funnel-stages",
20810
+ "chart-gauge",
20811
+ "chart-radial",
20812
+ "chart-stacked-bar"
20794
20813
  ]);
20795
20814
  var KINDS = new Set(NODE_KINDS);
20796
20815
  var ENG_BANNED = /\b(FUNCTION|STORAGE|EVENT LOG|BALANCES MAPPING|READ|WRITE|EMIT|CALL)\b/;
@@ -24336,6 +24355,15 @@ function interpolateColor(template, stateValues, fallback) {
24336
24355
  if (!template) return fallback;
24337
24356
  return interpolate(template, stateValues);
24338
24357
  }
24358
+ function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D, \u8D77\u70B9 = -Math.PI / 2, \u5168\u5468 = Math.PI * 2) {
24359
+ if (\u958B\u304D <= 0) return null;
24360
+ if (\u958B\u304D >= 1 && \u5168\u5468 >= Math.PI * 2) return /* @__PURE__ */ jsx("circle", { cx, cy, r });
24361
+ const a0 = \u8D77\u70B9;
24362
+ const a1 = a0 + Math.min(1, \u958B\u304D) * \u5168\u5468;
24363
+ const large = a1 - a0 > Math.PI ? 1 : 0;
24364
+ 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`;
24365
+ return /* @__PURE__ */ jsx("path", { d });
24366
+ }
24339
24367
 
24340
24368
  // src/kinds/chart-number.ts
24341
24369
  function \u5B9F\u5024\u8868\u8A18(v) {
@@ -24783,15 +24811,6 @@ function \u8F2A\u306E\u9053(cx, cy, R, r, a0, a1) {
24783
24811
  const large = a1 - a0 > Math.PI ? 1 : 0;
24784
24812
  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`;
24785
24813
  }
24786
- function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D) {
24787
- if (\u958B\u304D <= 0) return null;
24788
- if (\u958B\u304D >= 1) return /* @__PURE__ */ jsx("circle", { cx, cy, r });
24789
- const a0 = -Math.PI / 2;
24790
- const a1 = a0 + \u958B\u304D * Math.PI * 2;
24791
- const large = \u958B\u304D > 0.5 ? 1 : 0;
24792
- 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`;
24793
- return /* @__PURE__ */ jsx("path", { d });
24794
- }
24795
24814
  function sliceColor(tone, idx) {
24796
24815
  if (tone) return TONE[tone];
24797
24816
  return chartSeriesColor(idx);
@@ -24799,7 +24818,9 @@ function sliceColor(tone, idx) {
24799
24818
  function ChartGaugeNode({
24800
24819
  node,
24801
24820
  active,
24802
- stateValues = {}
24821
+ stateValues = {},
24822
+ drawing = false,
24823
+ progress = 1
24803
24824
  }) {
24804
24825
  const x0 = node.cx - node.w / 2;
24805
24826
  const y0 = node.cy - node.h / 2;
@@ -24844,6 +24865,21 @@ function ChartGaugeNode({
24844
24865
  const \u898B\u51FA\u3057\u306E\u7D1A = Math.max(9, Math.round(\u5408\u8A08\u306E\u7D1A * 0.38));
24845
24866
  const \u5185\u8A33\u306E\u5E45 = \u4F7F\u3048\u308B\u5E452 / Math.max(data.length, 1);
24846
24867
  const \u5185\u8A33\u306Ey = cy + \u5F27\u3068\u5185\u8A33\u306E\u9593;
24868
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
24869
+ const \u5207\u308A\u629C\u304Did = `cdl-gauge-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
24870
+ const \u5F27\u305F\u3061 = slices.map((s, idx) => /* @__PURE__ */ jsx(
24871
+ "path",
24872
+ {
24873
+ "data-cdl-role": "chart-gauge-arc",
24874
+ "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
24875
+ d: s.path,
24876
+ fill: arcColor(s.d.tone, idx),
24877
+ stroke: "var(--cdl-node-fill, #ffffff)",
24878
+ strokeWidth: 3,
24879
+ strokeLinejoin: "round"
24880
+ },
24881
+ `arc-${idx}`
24882
+ ));
24847
24883
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
24848
24884
  /* @__PURE__ */ jsx(
24849
24885
  "rect",
@@ -24859,19 +24895,8 @@ function ChartGaugeNode({
24859
24895
  strokeWidth: active ? 3 : 1.25
24860
24896
  }
24861
24897
  ),
24862
- slices.map((s, idx) => /* @__PURE__ */ jsx(
24863
- "path",
24864
- {
24865
- "data-cdl-role": "chart-gauge-arc",
24866
- "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
24867
- d: s.path,
24868
- fill: arcColor(s.d.tone, idx),
24869
- stroke: "var(--cdl-node-fill, #ffffff)",
24870
- strokeWidth: 3,
24871
- strokeLinejoin: "round"
24872
- },
24873
- `arc-${idx}`
24874
- )),
24898
+ 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) }) }),
24899
+ drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u5F27\u305F\u3061 }) : \u5F27\u305F\u3061,
24875
24900
  /* @__PURE__ */ jsx(
24876
24901
  "text",
24877
24902
  {
@@ -24936,7 +24961,9 @@ function arcColor(tone, idx) {
24936
24961
  function ChartRadialNode({
24937
24962
  node,
24938
24963
  active,
24939
- stateValues = {}
24964
+ stateValues = {},
24965
+ drawing = false,
24966
+ progress = 1
24940
24967
  }) {
24941
24968
  const x0 = node.cx - node.w / 2;
24942
24969
  const y0 = node.cy - node.h / 2;
@@ -24975,6 +25002,20 @@ function ChartRadialNode({
24975
25002
  };
24976
25003
  });
24977
25004
  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;
25005
+ const \u958B\u304D = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
25006
+ const \u5207\u308A\u629C\u304Did = `cdl-radial-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
25007
+ const \u53D6\u308A\u5206\u305F\u3061 = rings.map(
25008
+ (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsx(
25009
+ "path",
25010
+ {
25011
+ "data-cdl-role": "chart-radial-arc",
25012
+ "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
25013
+ d: r.\u53D6\u308A\u5206,
25014
+ fill: arcColor2(r.d.tone, idx)
25015
+ },
25016
+ `arc-${idx}`
25017
+ )
25018
+ );
24978
25019
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
24979
25020
  /* @__PURE__ */ jsx(
24980
25021
  "rect",
@@ -25000,18 +25041,8 @@ function ChartRadialNode({
25000
25041
  },
25001
25042
  `track-${idx}`
25002
25043
  )),
25003
- rings.map(
25004
- (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsx(
25005
- "path",
25006
- {
25007
- "data-cdl-role": "chart-radial-arc",
25008
- "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
25009
- d: r.\u53D6\u308A\u5206,
25010
- fill: arcColor2(r.d.tone, idx)
25011
- },
25012
- `arc-${idx}`
25013
- )
25014
- ),
25044
+ 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) }) }),
25045
+ drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u53D6\u308A\u5206\u305F\u3061 }) : \u53D6\u308A\u5206\u305F\u3061,
25015
25046
  data.map((d, idx) => {
25016
25047
  const y = \u4E00\u89A7\u306E\u59CB\u307E\u308A + \u884C\u306E\u9AD8\u3055 * idx;
25017
25048
  return /* @__PURE__ */ jsxs("g", { "data-cdl-role": "chart-radial-item", children: [
@@ -25334,7 +25365,9 @@ var SLICE_MIN_W_FOR_VALUE = 84;
25334
25365
  function ChartStackedBarNode({
25335
25366
  node,
25336
25367
  active,
25337
- stateValues = {}
25368
+ stateValues = {},
25369
+ drawing = false,
25370
+ progress = 1
25338
25371
  }) {
25339
25372
  const x0 = node.cx - node.w / 2;
25340
25373
  const y0 = node.cy - node.h / 2;
@@ -25352,6 +25385,8 @@ function ChartStackedBarNode({
25352
25385
  const \u4E00\u89A7\u306E\u9AD8\u3055 = 26;
25353
25386
  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;
25354
25387
  const \u4E0A\u7AEF = Math.max(PAD, (node.h - \u5168\u4F53\u306E\u9AD8\u3055) / 2);
25388
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
25389
+ const \u5207\u308A\u629C\u304Did = `cdl-stacked-bar-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
25355
25390
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
25356
25391
  /* @__PURE__ */ jsx(
25357
25392
  "rect",
@@ -25367,6 +25402,7 @@ function ChartStackedBarNode({
25367
25402
  strokeWidth: active ? 3 : 1.25
25368
25403
  }
25369
25404
  ),
25405
+ 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 }) }) }),
25370
25406
  \u5E2F\u305F\u3061.map((\u5E2F, \u6BB5) => {
25371
25407
  const y = \u4E0A\u7AEF + \u6BB5 * (\u5E2F\u306E\u9AD8\u3055 + \u5E2F\u306E\u9593);
25372
25408
  let \u5DE6 = \u5E2F\u306E\u5DE6;
@@ -25383,68 +25419,62 @@ function ChartStackedBarNode({
25383
25419
  children: \u5E2F.\u540D\u524D
25384
25420
  }
25385
25421
  ),
25386
- \u5E2F.\u533A\u753B.map((s, idx) => {
25387
- const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
25388
- const x = \u5DE6;
25389
- \u5DE6 += w;
25390
- const \u8272 = \u5370\u306E\u82723(s.tone, idx);
25391
- return /* @__PURE__ */ jsxs("g", { children: [
25392
- /* @__PURE__ */ jsx(
25393
- "rect",
25394
- {
25395
- "data-cdl-role": "chart-stacked-bar-slice",
25396
- "data-cdl-unresolved": s.unresolved ? "true" : void 0,
25397
- x,
25398
- y,
25399
- width: Math.max(0, w),
25400
- height: \u5E2F\u306E\u9AD8\u3055,
25401
- fill: \u8272
25402
- }
25403
- ),
25404
- w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsx(
25405
- "text",
25406
- {
25407
- "data-cdl-role": "chart-stacked-bar-slice-text",
25408
- x: x + w / 2,
25409
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
25410
- fontSize: \u533A\u753B\u306E\u7D1A,
25411
- fontWeight: 700,
25412
- textAnchor: "middle",
25413
- fill: "#ffffff",
25414
- children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
25415
- }
25416
- ),
25417
- w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsx(
25418
- "text",
25419
- {
25420
- "data-cdl-role": "chart-stacked-bar-slice-value",
25421
- x: x + w / 2,
25422
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
25423
- fontSize: \u533A\u753B\u306E\u7D1A - 1,
25424
- textAnchor: "middle",
25425
- fill: "#ffffff",
25426
- fillOpacity: 0.85,
25427
- children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
25428
- }
25429
- )
25430
- ] }, `slice-${idx}`);
25431
- })
25422
+ (() => {
25423
+ const \u533A\u753B\u305F\u3061 = \u5E2F.\u533A\u753B.map((s, idx) => {
25424
+ const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
25425
+ const x = \u5DE6;
25426
+ \u5DE6 += w;
25427
+ const \u8272 = \u5370\u306E\u82723(s.tone, idx);
25428
+ return /* @__PURE__ */ jsxs("g", { children: [
25429
+ /* @__PURE__ */ jsx(
25430
+ "rect",
25431
+ {
25432
+ "data-cdl-role": "chart-stacked-bar-slice",
25433
+ "data-cdl-unresolved": s.unresolved ? "true" : void 0,
25434
+ x,
25435
+ y,
25436
+ width: Math.max(0, w),
25437
+ height: \u5E2F\u306E\u9AD8\u3055,
25438
+ fill: \u8272
25439
+ }
25440
+ ),
25441
+ w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsx(
25442
+ "text",
25443
+ {
25444
+ "data-cdl-role": "chart-stacked-bar-slice-text",
25445
+ x: x + w / 2,
25446
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
25447
+ fontSize: \u533A\u753B\u306E\u7D1A,
25448
+ fontWeight: 700,
25449
+ textAnchor: "middle",
25450
+ fill: "#ffffff",
25451
+ children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
25452
+ }
25453
+ ),
25454
+ w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsx(
25455
+ "text",
25456
+ {
25457
+ "data-cdl-role": "chart-stacked-bar-slice-value",
25458
+ x: x + w / 2,
25459
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
25460
+ fontSize: \u533A\u753B\u306E\u7D1A - 1,
25461
+ textAnchor: "middle",
25462
+ fill: "#ffffff",
25463
+ fillOpacity: 0.85,
25464
+ children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
25465
+ }
25466
+ )
25467
+ ] }, `slice-${idx}`);
25468
+ });
25469
+ return drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u533A\u753B\u305F\u3061 }) : \u533A\u753B\u305F\u3061;
25470
+ })()
25432
25471
  ] }, `bar-${\u6BB5}`);
25433
25472
  }),
25434
25473
  \u4E00\u89A7\u306E\u4E26\u3073(data, \u5E2F\u306E\u5DE6, node.w - PAD, \u540D\u524D\u306E\u7D1A).map(({ d, idx, x, \u884C }) => {
25435
25474
  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;
25436
25475
  return /* @__PURE__ */ jsxs("g", { "data-cdl-role": "chart-stacked-bar-legend", children: [
25437
25476
  /* @__PURE__ */ jsx("rect", { x, y: y - 5, width: 10, height: 10, rx: 2, fill: \u5370\u306E\u82723(d.tone, idx) }),
25438
- /* @__PURE__ */ jsx(
25439
- "text",
25440
- {
25441
- x: x + 16,
25442
- y: y + 4,
25443
- fontSize: \u540D\u524D\u306E\u7D1A,
25444
- fill: "var(--cdl-text, #1a1f2a)",
25445
- children: d.label
25446
- }
25447
- )
25477
+ /* @__PURE__ */ jsx("text", { x: x + 16, y: y + 4, fontSize: \u540D\u524D\u306E\u7D1A, fill: "var(--cdl-text, #1a1f2a)", children: d.label })
25448
25478
  ] }, `legend-${idx}`);
25449
25479
  })
25450
25480
  ] });
@@ -30405,9 +30435,27 @@ function CdlNodeView({
30405
30435
  }
30406
30436
  );
30407
30437
  case "chart-gauge":
30408
- return /* @__PURE__ */ jsx(ChartGaugeNode, { node: resolvedNode, active, stateValues });
30438
+ return /* @__PURE__ */ jsx(
30439
+ ChartGaugeNode,
30440
+ {
30441
+ node: resolvedNode,
30442
+ active,
30443
+ stateValues,
30444
+ drawing,
30445
+ progress
30446
+ }
30447
+ );
30409
30448
  case "chart-stacked-bar":
30410
- return /* @__PURE__ */ jsx(ChartStackedBarNode, { node: resolvedNode, active, stateValues });
30449
+ return /* @__PURE__ */ jsx(
30450
+ ChartStackedBarNode,
30451
+ {
30452
+ node: resolvedNode,
30453
+ active,
30454
+ stateValues,
30455
+ drawing,
30456
+ progress
30457
+ }
30458
+ );
30411
30459
  case "chart-slope":
30412
30460
  return /* @__PURE__ */ jsx(
30413
30461
  ChartSlopeNode,
@@ -30424,7 +30472,16 @@ function CdlNodeView({
30424
30472
  case "chart-stat":
30425
30473
  return /* @__PURE__ */ jsx(ChartStatNode, { node: resolvedNode, active, stateValues });
30426
30474
  case "chart-radial":
30427
- return /* @__PURE__ */ jsx(ChartRadialNode, { node: resolvedNode, active, stateValues });
30475
+ return /* @__PURE__ */ jsx(
30476
+ ChartRadialNode,
30477
+ {
30478
+ node: resolvedNode,
30479
+ active,
30480
+ stateValues,
30481
+ drawing,
30482
+ progress
30483
+ }
30484
+ );
30428
30485
  case "chart-bar":
30429
30486
  return /* @__PURE__ */ jsx(
30430
30487
  ChartBarNode,
@@ -30645,6 +30702,7 @@ function CdlStage({
30645
30702
  laid,
30646
30703
  currentPhase,
30647
30704
  progress,
30705
+ drawProgress,
30648
30706
  stateValues,
30649
30707
  debug,
30650
30708
  compact = false,
@@ -30702,7 +30760,8 @@ function CdlStage({
30702
30760
  }
30703
30761
  return scales;
30704
30762
  }, [laid]);
30705
- const \u63CF\u304F\u9032\u307F = \u63CF\u304F\u9032\u307F\u306B\u76F4\u3059(progress, currentPhase?.drawRatio);
30763
+ const \u63CF\u304F\u7D20\u306E\u9032\u307F = drawProgress ?? progress;
30764
+ const \u63CF\u304F\u9032\u307F = \u63CF\u304F\u9032\u307F\u306B\u76F4\u3059(\u63CF\u304F\u7D20\u306E\u9032\u307F, currentPhase?.drawRatio);
30706
30765
  const { lifelineStarts, uniformFooterTop } = useMemo(() => {
30707
30766
  const starts = lifelineStartYs(laid.nodes);
30708
30767
  return {
@@ -30881,7 +30940,7 @@ function CdlStage({
30881
30940
  edge,
30882
30941
  active: activeSet.has(edge.id),
30883
30942
  drawing: \u77E2\u5370\u306E\u51FA\u756A.\u4F38\u3070\u3059\u304B(edge.id),
30884
- progress,
30943
+ progress: \u77E2\u5370\u306E\u51FA\u756A.\u4F38\u3070\u3059\u304B(edge.id) ? \u63CF\u304F\u9032\u307F : progress,
30885
30944
  stateValues
30886
30945
  },
30887
30946
  edge.id
@@ -31112,6 +31171,7 @@ function CdlDiagramView({ diagram: diagram2, laid: laidProp, hideHeader = false,
31112
31171
  const phaseIdx = focusPhaseId ? laid.phases.findIndex((p) => p.id === focusPhaseId) : state.phaseIndex;
31113
31172
  const currentPhase = laid.phases[Math.max(0, phaseIdx)] ?? laid.phases[0];
31114
31173
  const progress = reduced ? 1 : state.phaseProgress;
31174
+ const drawProgress = reduced ? 1 : state.phaseLinearProgress;
31115
31175
  const baseStateValues = computeStateValues(laid, phaseIdx, progress);
31116
31176
  const isInteractive = hasInteractivePrimitives(diagram2);
31117
31177
  const interactive = useInteractiveIntegration(
@@ -31153,7 +31213,7 @@ function CdlDiagramView({ diagram: diagram2, laid: laidProp, hideHeader = false,
31153
31213
  }
31154
31214
  ),
31155
31215
  isInteractive && interactive.panel,
31156
- /* @__PURE__ */ jsx(CdlStage, { laid, currentPhase, progress, stateValues, debug, compact: hideHeader, svgRef: isInteractive ? interactive.svgRef : void 0 }),
31216
+ /* @__PURE__ */ jsx(CdlStage, { laid, currentPhase, progress, drawProgress, stateValues, debug, compact: hideHeader, svgRef: isInteractive ? interactive.svgRef : void 0 }),
31157
31217
  hideHeader && !hideMiniPhaseIndicator && currentPhase && laid.phases.length > 1 && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 border-t border-[var(--cdl-divider,#d4d4d8)]/40 bg-[var(--cdl-stage-bg,#f1f5f9)]/50 px-3 py-2 text-xs", children: [
31158
31218
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
31159
31219
  laid.phases.map((p, i) => /* @__PURE__ */ jsx(