@cardenelabs/cdl 0.39.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/react.d.cts CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'react';
2
- export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-B1ArenZ7.cjs';
2
+ export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-UGswDfAh.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-B1ArenZ7.js';
2
+ export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-UGswDfAh.js';
package/dist/react.js CHANGED
@@ -9527,7 +9527,8 @@ var DRAW_KINDS = /* @__PURE__ */ new Set([
9527
9527
  "funnel-stages",
9528
9528
  "chart-gauge",
9529
9529
  "chart-radial",
9530
- "chart-stacked-bar"
9530
+ "chart-stacked-bar",
9531
+ "chart-waffle"
9531
9532
  ]);
9532
9533
  var KINDS = new Set(NODE_KINDS);
9533
9534
  var ENG_BANNED = /\b(FUNCTION|STORAGE|EVENT LOG|BALANCES MAPPING|READ|WRITE|EMIT|CALL)\b/;
@@ -12761,7 +12762,9 @@ function \u5370\u306E\u5272\u4ED8(\u5024) {
12761
12762
  function ChartWaffleNode({
12762
12763
  node,
12763
12764
  active,
12764
- stateValues = {}
12765
+ stateValues = {},
12766
+ drawing = false,
12767
+ progress = 1
12765
12768
  }) {
12766
12769
  const x0 = node.cx - node.w / 2;
12767
12770
  const y0 = node.cy - node.h / 2;
@@ -12790,6 +12793,7 @@ function ChartWaffleNode({
12790
12793
  \u914D\u5206.forEach((n, idx) => {
12791
12794
  for (let k = 0; k < n; k++) \u6301\u3061\u4E3B.push(idx);
12792
12795
  });
12796
+ const \u57CB\u307E\u3063\u305F = Math.round(\u9032\u307F\u3092\u7573\u3080(drawing, progress) * WAFFLE_TOTAL);
12793
12797
  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;
12794
12798
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
12795
12799
  /* @__PURE__ */ jsx(
@@ -12810,6 +12814,7 @@ function ChartWaffleNode({
12810
12814
  const \u884C = Math.floor(k / WAFFLE_COLS);
12811
12815
  const \u5217 = k % WAFFLE_COLS;
12812
12816
  const owner = \u6301\u3061\u4E3B[k];
12817
+ const \u57CB\u307E\u3063\u3066\u3044\u308B = owner !== void 0 && k < \u57CB\u307E\u3063\u305F;
12813
12818
  return /* @__PURE__ */ jsx(
12814
12819
  "rect",
12815
12820
  {
@@ -12820,8 +12825,8 @@ function ChartWaffleNode({
12820
12825
  width: \u5370,
12821
12826
  height: \u5370,
12822
12827
  rx: 2,
12823
- fill: owner === void 0 ? "var(--cdl-divider, #d4d4d8)" : \u5370\u306E\u82722(data[owner].tone, owner),
12824
- fillOpacity: owner === void 0 ? 0.35 : 1
12828
+ fill: \u57CB\u307E\u3063\u3066\u3044\u308B ? \u5370\u306E\u82722(data[owner].tone, owner) : "var(--cdl-divider, #d4d4d8)",
12829
+ fillOpacity: \u57CB\u307E\u3063\u3066\u3044\u308B ? 1 : 0.35
12825
12830
  },
12826
12831
  `cell-${k}`
12827
12832
  );
@@ -17969,7 +17974,16 @@ function CdlNodeView({
17969
17974
  }
17970
17975
  );
17971
17976
  case "chart-waffle":
17972
- return /* @__PURE__ */ jsx(ChartWaffleNode, { node: resolvedNode, active, stateValues });
17977
+ return /* @__PURE__ */ jsx(
17978
+ ChartWaffleNode,
17979
+ {
17980
+ node: resolvedNode,
17981
+ active,
17982
+ stateValues,
17983
+ drawing,
17984
+ progress
17985
+ }
17986
+ );
17973
17987
  case "chart-stat":
17974
17988
  return /* @__PURE__ */ jsx(ChartStatNode, { node: resolvedNode, active, stateValues });
17975
17989
  case "chart-radial":