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