@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/react.d.cts CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'react';
2
- export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-BYdmSviQ.cjs';
2
+ export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-B1ArenZ7.cjs';
package/dist/react.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'react';
2
- export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-BYdmSviQ.js';
2
+ export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-B1ArenZ7.js';
package/dist/react.js CHANGED
@@ -64,6 +64,8 @@ var Timeline = class {
64
64
  rafHandle = null;
65
65
  phaseIndex = 0;
66
66
  phaseProgress = 0;
67
+ /** 曲線を通す前の進み (cdl#711)。 経過時間そのものの割合で、 描く動きが読む */
68
+ phaseLinearProgress = 0;
67
69
  phaseStartedAt = 0;
68
70
  status = "idle";
69
71
  /**
@@ -92,12 +94,12 @@ var Timeline = class {
92
94
  const initial = options.initialPhaseIndex;
93
95
  if (initial != null && initial > 0 && initial < phases.length) {
94
96
  this.phaseIndex = initial;
95
- this.phaseProgress = 1;
97
+ this.setProgress(1);
96
98
  this.status = initial === phases.length - 1 ? "settled" : "paused";
97
99
  }
98
100
  this.initialState = {
99
101
  phaseIndex: this.phaseIndex,
100
- phaseProgress: this.phaseProgress,
102
+ phaseLinearProgress: this.phaseLinearProgress,
101
103
  status: this.status
102
104
  };
103
105
  }
@@ -119,13 +121,14 @@ var Timeline = class {
119
121
  }
120
122
  snapshot() {
121
123
  const cached = this.cachedSnapshot;
122
- if (cached && cached.status === this.status && cached.phaseIndex === this.phaseIndex && cached.phaseProgress === this.phaseProgress && cached.totalPhases === this.phases.length) {
124
+ if (cached && cached.status === this.status && cached.phaseIndex === this.phaseIndex && cached.phaseProgress === this.phaseProgress && cached.phaseLinearProgress === this.phaseLinearProgress && cached.totalPhases === this.phases.length) {
123
125
  return cached;
124
126
  }
125
127
  const next = {
126
128
  status: this.status,
127
129
  phaseIndex: this.phaseIndex,
128
130
  phaseProgress: this.phaseProgress,
131
+ phaseLinearProgress: this.phaseLinearProgress,
129
132
  totalPhases: this.phases.length
130
133
  };
131
134
  this.cachedSnapshot = next;
@@ -148,7 +151,7 @@ var Timeline = class {
148
151
  const clamped = Math.max(0, Math.min(this.phases.length - 1, index));
149
152
  this.cancelRaf();
150
153
  this.phaseIndex = clamped;
151
- this.phaseProgress = 1;
154
+ this.setProgress(1);
152
155
  this.status = clamped === this.phases.length - 1 ? "settled" : "paused";
153
156
  this.emit();
154
157
  }
@@ -188,14 +191,14 @@ var Timeline = class {
188
191
  if (this.phaseIndex <= 0) return;
189
192
  this.cancelRaf();
190
193
  this.phaseIndex -= 1;
191
- this.phaseProgress = 1;
194
+ this.setProgress(1);
192
195
  this.status = "paused";
193
196
  this.emit();
194
197
  }
195
198
  reset() {
196
199
  this.cancelRaf();
197
200
  this.phaseIndex = 0;
198
- this.phaseProgress = 0;
201
+ this.setProgress(0);
199
202
  this.status = "idle";
200
203
  this.emit();
201
204
  }
@@ -216,7 +219,7 @@ var Timeline = class {
216
219
  this.subscribers.clear();
217
220
  this.status = this.initialState.status;
218
221
  this.phaseIndex = this.initialState.phaseIndex;
219
- this.phaseProgress = this.initialState.phaseProgress;
222
+ this.setProgress(this.initialState.phaseLinearProgress);
220
223
  }
221
224
  // ─── internals ───────────────────────────────────────────────
222
225
  advancePhase() {
@@ -252,20 +255,20 @@ var Timeline = class {
252
255
  }, ms);
253
256
  }
254
257
  beginPhaseTransition() {
255
- this.phaseProgress = 0;
258
+ this.setProgress(0);
256
259
  this.phaseStartedAt = performance.now();
257
260
  this.cancelRaf();
258
261
  const step = (now) => {
259
262
  const duration = this.autoAdvanceMsOverride ?? this.getPhase().durationMs ?? 600;
260
263
  const elapsed = now - this.phaseStartedAt;
261
264
  const linearT = clamp01(elapsed / duration);
262
- this.phaseProgress = this.easing(linearT);
265
+ this.setProgress(linearT);
263
266
  this.emit();
264
267
  if (linearT < 1) {
265
268
  this.rafHandle = requestAnimationFrame(step);
266
269
  return;
267
270
  }
268
- this.phaseProgress = 1;
271
+ this.setProgress(1);
269
272
  this.emit();
270
273
  if (this.status === "playing") {
271
274
  if (this.phaseIndex < this.phases.length - 1) {
@@ -280,6 +283,19 @@ var Timeline = class {
280
283
  };
281
284
  this.rafHandle = requestAnimationFrame(step);
282
285
  }
286
+ /**
287
+ * 段の進みを 2 つ同時に置く (cdl#711)。
288
+ *
289
+ * **代入する場所を 1 つに閉じる**。 曲げた進みと曲げる前の進みを別々に書くと、
290
+ * どちらかを更新し忘れた経路が「前の段の値のまま」 で残る。
291
+ *
292
+ * 両端 (0 と 1) は曲線を通さず、 そのまま置く。 曲線は差し替えられる欄なので、
293
+ * `easing(1)` が 1 を返す保証がない。 段の始まりと終わりの値は曲線に委ねない。
294
+ */
295
+ setProgress(linear2) {
296
+ this.phaseLinearProgress = linear2;
297
+ this.phaseProgress = linear2 <= 0 ? 0 : linear2 >= 1 ? 1 : this.easing(linear2);
298
+ }
283
299
  cancelRaf() {
284
300
  if (this.rafHandle != null) {
285
301
  cancelAnimationFrame(this.rafHandle);
@@ -9508,7 +9524,10 @@ var DRAW_KINDS = /* @__PURE__ */ new Set([
9508
9524
  "mind-map",
9509
9525
  "tree-hierarchy",
9510
9526
  "gantt-timeline",
9511
- "funnel-stages"
9527
+ "funnel-stages",
9528
+ "chart-gauge",
9529
+ "chart-radial",
9530
+ "chart-stacked-bar"
9512
9531
  ]);
9513
9532
  var KINDS = new Set(NODE_KINDS);
9514
9533
  var ENG_BANNED = /\b(FUNCTION|STORAGE|EVENT LOG|BALANCES MAPPING|READ|WRITE|EMIT|CALL)\b/;
@@ -11837,6 +11856,15 @@ function interpolateColor(template, stateValues, fallback) {
11837
11856
  if (!template) return fallback;
11838
11857
  return interpolate(template, stateValues);
11839
11858
  }
11859
+ function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D, \u8D77\u70B9 = -Math.PI / 2, \u5168\u5468 = Math.PI * 2) {
11860
+ if (\u958B\u304D <= 0) return null;
11861
+ if (\u958B\u304D >= 1 && \u5168\u5468 >= Math.PI * 2) return /* @__PURE__ */ jsx("circle", { cx, cy, r });
11862
+ const a0 = \u8D77\u70B9;
11863
+ const a1 = a0 + Math.min(1, \u958B\u304D) * \u5168\u5468;
11864
+ const large = a1 - a0 > Math.PI ? 1 : 0;
11865
+ 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`;
11866
+ return /* @__PURE__ */ jsx("path", { d });
11867
+ }
11840
11868
 
11841
11869
  // src/kinds/chart-number.ts
11842
11870
  function \u5B9F\u5024\u8868\u8A18(v) {
@@ -12284,15 +12312,6 @@ function \u8F2A\u306E\u9053(cx, cy, R, r, a0, a1) {
12284
12312
  const large = a1 - a0 > Math.PI ? 1 : 0;
12285
12313
  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`;
12286
12314
  }
12287
- function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D) {
12288
- if (\u958B\u304D <= 0) return null;
12289
- if (\u958B\u304D >= 1) return /* @__PURE__ */ jsx("circle", { cx, cy, r });
12290
- const a0 = -Math.PI / 2;
12291
- const a1 = a0 + \u958B\u304D * Math.PI * 2;
12292
- const large = \u958B\u304D > 0.5 ? 1 : 0;
12293
- 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`;
12294
- return /* @__PURE__ */ jsx("path", { d });
12295
- }
12296
12315
  function sliceColor(tone, idx) {
12297
12316
  if (tone) return TONE[tone];
12298
12317
  return chartSeriesColor(idx);
@@ -12300,7 +12319,9 @@ function sliceColor(tone, idx) {
12300
12319
  function ChartGaugeNode({
12301
12320
  node,
12302
12321
  active,
12303
- stateValues = {}
12322
+ stateValues = {},
12323
+ drawing = false,
12324
+ progress = 1
12304
12325
  }) {
12305
12326
  const x0 = node.cx - node.w / 2;
12306
12327
  const y0 = node.cy - node.h / 2;
@@ -12345,6 +12366,21 @@ function ChartGaugeNode({
12345
12366
  const \u898B\u51FA\u3057\u306E\u7D1A = Math.max(9, Math.round(\u5408\u8A08\u306E\u7D1A * 0.38));
12346
12367
  const \u5185\u8A33\u306E\u5E45 = \u4F7F\u3048\u308B\u5E452 / Math.max(data.length, 1);
12347
12368
  const \u5185\u8A33\u306Ey = cy + \u5F27\u3068\u5185\u8A33\u306E\u9593;
12369
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
12370
+ const \u5207\u308A\u629C\u304Did = `cdl-gauge-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
12371
+ const \u5F27\u305F\u3061 = slices.map((s, idx) => /* @__PURE__ */ jsx(
12372
+ "path",
12373
+ {
12374
+ "data-cdl-role": "chart-gauge-arc",
12375
+ "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
12376
+ d: s.path,
12377
+ fill: arcColor(s.d.tone, idx),
12378
+ stroke: "var(--cdl-node-fill, #ffffff)",
12379
+ strokeWidth: 3,
12380
+ strokeLinejoin: "round"
12381
+ },
12382
+ `arc-${idx}`
12383
+ ));
12348
12384
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
12349
12385
  /* @__PURE__ */ jsx(
12350
12386
  "rect",
@@ -12360,19 +12396,8 @@ function ChartGaugeNode({
12360
12396
  strokeWidth: active ? 3 : 1.25
12361
12397
  }
12362
12398
  ),
12363
- slices.map((s, idx) => /* @__PURE__ */ jsx(
12364
- "path",
12365
- {
12366
- "data-cdl-role": "chart-gauge-arc",
12367
- "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
12368
- d: s.path,
12369
- fill: arcColor(s.d.tone, idx),
12370
- stroke: "var(--cdl-node-fill, #ffffff)",
12371
- strokeWidth: 3,
12372
- strokeLinejoin: "round"
12373
- },
12374
- `arc-${idx}`
12375
- )),
12399
+ 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) }) }),
12400
+ drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u5F27\u305F\u3061 }) : \u5F27\u305F\u3061,
12376
12401
  /* @__PURE__ */ jsx(
12377
12402
  "text",
12378
12403
  {
@@ -12437,7 +12462,9 @@ function arcColor(tone, idx) {
12437
12462
  function ChartRadialNode({
12438
12463
  node,
12439
12464
  active,
12440
- stateValues = {}
12465
+ stateValues = {},
12466
+ drawing = false,
12467
+ progress = 1
12441
12468
  }) {
12442
12469
  const x0 = node.cx - node.w / 2;
12443
12470
  const y0 = node.cy - node.h / 2;
@@ -12476,6 +12503,20 @@ function ChartRadialNode({
12476
12503
  };
12477
12504
  });
12478
12505
  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;
12506
+ const \u958B\u304D = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
12507
+ const \u5207\u308A\u629C\u304Did = `cdl-radial-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
12508
+ const \u53D6\u308A\u5206\u305F\u3061 = rings.map(
12509
+ (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsx(
12510
+ "path",
12511
+ {
12512
+ "data-cdl-role": "chart-radial-arc",
12513
+ "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
12514
+ d: r.\u53D6\u308A\u5206,
12515
+ fill: arcColor2(r.d.tone, idx)
12516
+ },
12517
+ `arc-${idx}`
12518
+ )
12519
+ );
12479
12520
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
12480
12521
  /* @__PURE__ */ jsx(
12481
12522
  "rect",
@@ -12501,18 +12542,8 @@ function ChartRadialNode({
12501
12542
  },
12502
12543
  `track-${idx}`
12503
12544
  )),
12504
- rings.map(
12505
- (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsx(
12506
- "path",
12507
- {
12508
- "data-cdl-role": "chart-radial-arc",
12509
- "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
12510
- d: r.\u53D6\u308A\u5206,
12511
- fill: arcColor2(r.d.tone, idx)
12512
- },
12513
- `arc-${idx}`
12514
- )
12515
- ),
12545
+ 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) }) }),
12546
+ drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u53D6\u308A\u5206\u305F\u3061 }) : \u53D6\u308A\u5206\u305F\u3061,
12516
12547
  data.map((d, idx) => {
12517
12548
  const y = \u4E00\u89A7\u306E\u59CB\u307E\u308A + \u884C\u306E\u9AD8\u3055 * idx;
12518
12549
  return /* @__PURE__ */ jsxs("g", { "data-cdl-role": "chart-radial-item", children: [
@@ -12835,7 +12866,9 @@ var SLICE_MIN_W_FOR_VALUE = 84;
12835
12866
  function ChartStackedBarNode({
12836
12867
  node,
12837
12868
  active,
12838
- stateValues = {}
12869
+ stateValues = {},
12870
+ drawing = false,
12871
+ progress = 1
12839
12872
  }) {
12840
12873
  const x0 = node.cx - node.w / 2;
12841
12874
  const y0 = node.cy - node.h / 2;
@@ -12853,6 +12886,8 @@ function ChartStackedBarNode({
12853
12886
  const \u4E00\u89A7\u306E\u9AD8\u3055 = 26;
12854
12887
  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;
12855
12888
  const \u4E0A\u7AEF = Math.max(PAD, (node.h - \u5168\u4F53\u306E\u9AD8\u3055) / 2);
12889
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
12890
+ const \u5207\u308A\u629C\u304Did = `cdl-stacked-bar-draw-${useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
12856
12891
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
12857
12892
  /* @__PURE__ */ jsx(
12858
12893
  "rect",
@@ -12868,6 +12903,7 @@ function ChartStackedBarNode({
12868
12903
  strokeWidth: active ? 3 : 1.25
12869
12904
  }
12870
12905
  ),
12906
+ 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 }) }) }),
12871
12907
  \u5E2F\u305F\u3061.map((\u5E2F, \u6BB5) => {
12872
12908
  const y = \u4E0A\u7AEF + \u6BB5 * (\u5E2F\u306E\u9AD8\u3055 + \u5E2F\u306E\u9593);
12873
12909
  let \u5DE6 = \u5E2F\u306E\u5DE6;
@@ -12884,68 +12920,62 @@ function ChartStackedBarNode({
12884
12920
  children: \u5E2F.\u540D\u524D
12885
12921
  }
12886
12922
  ),
12887
- \u5E2F.\u533A\u753B.map((s, idx) => {
12888
- const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
12889
- const x = \u5DE6;
12890
- \u5DE6 += w;
12891
- const \u8272 = \u5370\u306E\u82723(s.tone, idx);
12892
- return /* @__PURE__ */ jsxs("g", { children: [
12893
- /* @__PURE__ */ jsx(
12894
- "rect",
12895
- {
12896
- "data-cdl-role": "chart-stacked-bar-slice",
12897
- "data-cdl-unresolved": s.unresolved ? "true" : void 0,
12898
- x,
12899
- y,
12900
- width: Math.max(0, w),
12901
- height: \u5E2F\u306E\u9AD8\u3055,
12902
- fill: \u8272
12903
- }
12904
- ),
12905
- w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsx(
12906
- "text",
12907
- {
12908
- "data-cdl-role": "chart-stacked-bar-slice-text",
12909
- x: x + w / 2,
12910
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
12911
- fontSize: \u533A\u753B\u306E\u7D1A,
12912
- fontWeight: 700,
12913
- textAnchor: "middle",
12914
- fill: "#ffffff",
12915
- children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
12916
- }
12917
- ),
12918
- w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsx(
12919
- "text",
12920
- {
12921
- "data-cdl-role": "chart-stacked-bar-slice-value",
12922
- x: x + w / 2,
12923
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
12924
- fontSize: \u533A\u753B\u306E\u7D1A - 1,
12925
- textAnchor: "middle",
12926
- fill: "#ffffff",
12927
- fillOpacity: 0.85,
12928
- children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
12929
- }
12930
- )
12931
- ] }, `slice-${idx}`);
12932
- })
12923
+ (() => {
12924
+ const \u533A\u753B\u305F\u3061 = \u5E2F.\u533A\u753B.map((s, idx) => {
12925
+ const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
12926
+ const x = \u5DE6;
12927
+ \u5DE6 += w;
12928
+ const \u8272 = \u5370\u306E\u82723(s.tone, idx);
12929
+ return /* @__PURE__ */ jsxs("g", { children: [
12930
+ /* @__PURE__ */ jsx(
12931
+ "rect",
12932
+ {
12933
+ "data-cdl-role": "chart-stacked-bar-slice",
12934
+ "data-cdl-unresolved": s.unresolved ? "true" : void 0,
12935
+ x,
12936
+ y,
12937
+ width: Math.max(0, w),
12938
+ height: \u5E2F\u306E\u9AD8\u3055,
12939
+ fill: \u8272
12940
+ }
12941
+ ),
12942
+ w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsx(
12943
+ "text",
12944
+ {
12945
+ "data-cdl-role": "chart-stacked-bar-slice-text",
12946
+ x: x + w / 2,
12947
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
12948
+ fontSize: \u533A\u753B\u306E\u7D1A,
12949
+ fontWeight: 700,
12950
+ textAnchor: "middle",
12951
+ fill: "#ffffff",
12952
+ children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
12953
+ }
12954
+ ),
12955
+ w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsx(
12956
+ "text",
12957
+ {
12958
+ "data-cdl-role": "chart-stacked-bar-slice-value",
12959
+ x: x + w / 2,
12960
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
12961
+ fontSize: \u533A\u753B\u306E\u7D1A - 1,
12962
+ textAnchor: "middle",
12963
+ fill: "#ffffff",
12964
+ fillOpacity: 0.85,
12965
+ children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
12966
+ }
12967
+ )
12968
+ ] }, `slice-${idx}`);
12969
+ });
12970
+ return drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u533A\u753B\u305F\u3061 }) : \u533A\u753B\u305F\u3061;
12971
+ })()
12933
12972
  ] }, `bar-${\u6BB5}`);
12934
12973
  }),
12935
12974
  \u4E00\u89A7\u306E\u4E26\u3073(data, \u5E2F\u306E\u5DE6, node.w - PAD, \u540D\u524D\u306E\u7D1A).map(({ d, idx, x, \u884C }) => {
12936
12975
  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;
12937
12976
  return /* @__PURE__ */ jsxs("g", { "data-cdl-role": "chart-stacked-bar-legend", children: [
12938
12977
  /* @__PURE__ */ jsx("rect", { x, y: y - 5, width: 10, height: 10, rx: 2, fill: \u5370\u306E\u82723(d.tone, idx) }),
12939
- /* @__PURE__ */ jsx(
12940
- "text",
12941
- {
12942
- x: x + 16,
12943
- y: y + 4,
12944
- fontSize: \u540D\u524D\u306E\u7D1A,
12945
- fill: "var(--cdl-text, #1a1f2a)",
12946
- children: d.label
12947
- }
12948
- )
12978
+ /* @__PURE__ */ jsx("text", { x: x + 16, y: y + 4, fontSize: \u540D\u524D\u306E\u7D1A, fill: "var(--cdl-text, #1a1f2a)", children: d.label })
12949
12979
  ] }, `legend-${idx}`);
12950
12980
  })
12951
12981
  ] });
@@ -17906,9 +17936,27 @@ function CdlNodeView({
17906
17936
  }
17907
17937
  );
17908
17938
  case "chart-gauge":
17909
- return /* @__PURE__ */ jsx(ChartGaugeNode, { node: resolvedNode, active, stateValues });
17939
+ return /* @__PURE__ */ jsx(
17940
+ ChartGaugeNode,
17941
+ {
17942
+ node: resolvedNode,
17943
+ active,
17944
+ stateValues,
17945
+ drawing,
17946
+ progress
17947
+ }
17948
+ );
17910
17949
  case "chart-stacked-bar":
17911
- return /* @__PURE__ */ jsx(ChartStackedBarNode, { node: resolvedNode, active, stateValues });
17950
+ return /* @__PURE__ */ jsx(
17951
+ ChartStackedBarNode,
17952
+ {
17953
+ node: resolvedNode,
17954
+ active,
17955
+ stateValues,
17956
+ drawing,
17957
+ progress
17958
+ }
17959
+ );
17912
17960
  case "chart-slope":
17913
17961
  return /* @__PURE__ */ jsx(
17914
17962
  ChartSlopeNode,
@@ -17925,7 +17973,16 @@ function CdlNodeView({
17925
17973
  case "chart-stat":
17926
17974
  return /* @__PURE__ */ jsx(ChartStatNode, { node: resolvedNode, active, stateValues });
17927
17975
  case "chart-radial":
17928
- return /* @__PURE__ */ jsx(ChartRadialNode, { node: resolvedNode, active, stateValues });
17976
+ return /* @__PURE__ */ jsx(
17977
+ ChartRadialNode,
17978
+ {
17979
+ node: resolvedNode,
17980
+ active,
17981
+ stateValues,
17982
+ drawing,
17983
+ progress
17984
+ }
17985
+ );
17929
17986
  case "chart-bar":
17930
17987
  return /* @__PURE__ */ jsx(
17931
17988
  ChartBarNode,
@@ -18146,6 +18203,7 @@ function CdlStage({
18146
18203
  laid,
18147
18204
  currentPhase,
18148
18205
  progress,
18206
+ drawProgress,
18149
18207
  stateValues,
18150
18208
  debug,
18151
18209
  compact = false,
@@ -18203,7 +18261,8 @@ function CdlStage({
18203
18261
  }
18204
18262
  return scales;
18205
18263
  }, [laid]);
18206
- const \u63CF\u304F\u9032\u307F = \u63CF\u304F\u9032\u307F\u306B\u76F4\u3059(progress, currentPhase?.drawRatio);
18264
+ const \u63CF\u304F\u7D20\u306E\u9032\u307F = drawProgress ?? progress;
18265
+ const \u63CF\u304F\u9032\u307F = \u63CF\u304F\u9032\u307F\u306B\u76F4\u3059(\u63CF\u304F\u7D20\u306E\u9032\u307F, currentPhase?.drawRatio);
18207
18266
  const { lifelineStarts, uniformFooterTop } = useMemo(() => {
18208
18267
  const starts = lifelineStartYs(laid.nodes);
18209
18268
  return {
@@ -18382,7 +18441,7 @@ function CdlStage({
18382
18441
  edge,
18383
18442
  active: activeSet.has(edge.id),
18384
18443
  drawing: \u77E2\u5370\u306E\u51FA\u756A.\u4F38\u3070\u3059\u304B(edge.id),
18385
- progress,
18444
+ progress: \u77E2\u5370\u306E\u51FA\u756A.\u4F38\u3070\u3059\u304B(edge.id) ? \u63CF\u304F\u9032\u307F : progress,
18386
18445
  stateValues
18387
18446
  },
18388
18447
  edge.id
@@ -27215,6 +27274,7 @@ function CdlDiagramView({ diagram, laid: laidProp, hideHeader = false, hideMiniP
27215
27274
  const phaseIdx = focusPhaseId ? laid.phases.findIndex((p) => p.id === focusPhaseId) : state.phaseIndex;
27216
27275
  const currentPhase = laid.phases[Math.max(0, phaseIdx)] ?? laid.phases[0];
27217
27276
  const progress = reduced ? 1 : state.phaseProgress;
27277
+ const drawProgress = reduced ? 1 : state.phaseLinearProgress;
27218
27278
  const baseStateValues = computeStateValues(laid, phaseIdx, progress);
27219
27279
  const isInteractive = hasInteractivePrimitives(diagram);
27220
27280
  const interactive = useInteractiveIntegration(
@@ -27256,7 +27316,7 @@ function CdlDiagramView({ diagram, laid: laidProp, hideHeader = false, hideMiniP
27256
27316
  }
27257
27317
  ),
27258
27318
  isInteractive && interactive.panel,
27259
- /* @__PURE__ */ jsx(CdlStage, { laid, currentPhase, progress, stateValues, debug, compact: hideHeader, svgRef: isInteractive ? interactive.svgRef : void 0 }),
27319
+ /* @__PURE__ */ jsx(CdlStage, { laid, currentPhase, progress, drawProgress, stateValues, debug, compact: hideHeader, svgRef: isInteractive ? interactive.svgRef : void 0 }),
27260
27320
  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: [
27261
27321
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
27262
27322
  laid.phases.map((p, i) => /* @__PURE__ */ jsx(