@cardenelabs/cdl 0.36.0 → 0.37.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-R7v2bfyz.cjs';
2
+ export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-BYdmSviQ.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-R7v2bfyz.js';
2
+ export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-BYdmSviQ.js';
package/dist/react.js CHANGED
@@ -13026,7 +13026,12 @@ function ChartSlopeNode({
13026
13026
  const \u4E0A\u7AEF = PAD + (\u524D\u3042\u308A ? \u6642\u70B9\u306E\u7D1A + 12 : 0) + 6;
13027
13027
  const \u4E0B\u7AEF = Math.max(\u4E0A\u7AEF + 10, node.h - PAD - 6);
13028
13028
  const y\u3092\u53D6\u308B = (v) => \u5C3A\u306E\u5E45 > 0 ? \u4E0B\u7AEF - (v - \u6700\u5C0F) / \u5C3A\u306E\u5E45 * (\u4E0B\u7AEF - \u4E0A\u7AEF) : (\u4E0A\u7AEF + \u4E0B\u7AEF) / 2;
13029
- const \u5F62 = \u524D\u3042\u308A && node.chartSlopeForm === "delta" ? "delta" : "values";
13029
+ const \u66F8\u3044\u305F\u5F62 = node.chartSlopeForm;
13030
+ const \u5F62 = \u524D\u3042\u308A && (\u66F8\u3044\u305F\u5F62 === "delta" || \u66F8\u3044\u305F\u5F62 === "rank") ? \u66F8\u3044\u305F\u5F62 : "values";
13031
+ const \u9806\u4F4D\u3092\u53D6\u308B = (v, \u5168\u90E8) => \u5168\u90E8.filter((x) => x > v).length + 1;
13032
+ const \u524D\u306E\u9806\u4F4D = \u7CFB\u5217\u305F\u3061.map((s) => \u9806\u4F4D\u3092\u53D6\u308B(s.\u524D, \u7CFB\u5217\u305F\u3061.map((x) => x.\u524D)));
13033
+ const \u4ECA\u306E\u9806\u4F4D = \u7CFB\u5217\u305F\u3061.map((s) => \u9806\u4F4D\u3092\u53D6\u308B(s.\u4ECA, \u7CFB\u5217\u305F\u3061.map((x) => x.\u4ECA)));
13034
+ const \u6BB5\u306Ey\u3092\u53D6\u308B = (\u9806\u4F4D) => \u7CFB\u5217\u305F\u3061.length > 1 ? \u4E0A\u7AEF + (\u9806\u4F4D - 1) / (\u7CFB\u5217\u305F\u3061.length - 1) * (\u4E0B\u7AEF - \u4E0A\u7AEF) : (\u4E0A\u7AEF + \u4E0B\u7AEF) / 2;
13030
13035
  const \u5897\u6E1B\u8868\u8A18 = (\u524D, \u4ECA) => {
13031
13036
  const \u5DEE = \u4ECA - \u524D;
13032
13037
  return \u5DEE > 0 ? `+${\u5B9F\u5024\u8868\u8A18(\u5DEE)}` : \u5B9F\u5024\u8868\u8A18(\u5DEE);
@@ -13109,8 +13114,8 @@ function ChartSlopeNode({
13109
13114
  )
13110
13115
  ] }),
13111
13116
  \u7CFB\u5217\u305F\u3061.map((s, i) => {
13112
- const \u5DE6y = y\u3092\u53D6\u308B(s.\u524D);
13113
- const \u53F3y = y\u3092\u53D6\u308B(s.\u4ECA);
13117
+ const \u5DE6y = \u5F62 === "rank" ? \u6BB5\u306Ey\u3092\u53D6\u308B(\u524D\u306E\u9806\u4F4D[i]) : y\u3092\u53D6\u308B(s.\u524D);
13118
+ const \u53F3y = \u5F62 === "rank" ? \u6BB5\u306Ey\u3092\u53D6\u308B(\u4ECA\u306E\u9806\u4F4D[i]) : y\u3092\u53D6\u308B(s.\u4ECA);
13114
13119
  const \u672A\u89E3\u6C7A = s.\u672A\u89E3\u6C7A ? "true" : void 0;
13115
13120
  return /* @__PURE__ */ jsxs("g", { children: [
13116
13121
  \u524D\u3042\u308A && /* @__PURE__ */ jsx(