@cardenelabs/cdl 0.35.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-C2rcAsgk.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-C2rcAsgk.js';
2
+ export { q as CdlDiagramView, m as CdlDiagramViewProps } from './render-BYdmSviQ.js';
package/dist/react.js CHANGED
@@ -13026,8 +13026,20 @@ 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 \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;
13035
+ const \u5897\u6E1B\u8868\u8A18 = (\u524D, \u4ECA) => {
13036
+ const \u5DEE = \u4ECA - \u524D;
13037
+ return \u5DEE > 0 ? `+${\u5B9F\u5024\u8868\u8A18(\u5DEE)}` : \u5B9F\u5024\u8868\u8A18(\u5DEE);
13038
+ };
13029
13039
  const \u5DE6\u306E\u5B57 = \u7CFB\u5217\u305F\u3061.map((s) => \u5B9F\u5024\u8868\u8A18(s.\u524D));
13030
- const \u53F3\u306E\u5B57 = \u7CFB\u5217\u305F\u3061.map((s) => \u5B9F\u5024\u8868\u8A18(s.\u4ECA));
13040
+ const \u53F3\u306E\u5B57 = \u7CFB\u5217\u305F\u3061.map(
13041
+ (s) => \u5F62 === "delta" ? \u5897\u6E1B\u8868\u8A18(s.\u524D, s.\u4ECA) : \u5B9F\u5024\u8868\u8A18(s.\u4ECA)
13042
+ );
13031
13043
  const \u5DE6\u5024\u5E45 = Math.max(0, ...\u5DE6\u306E\u5B57.map((t) => textWidth(t, \u5024\u306E\u7D1A)));
13032
13044
  const \u53F3\u5024\u5E45 = Math.max(0, ...\u53F3\u306E\u5B57.map((t) => textWidth(t, \u5024\u306E\u7D1A)));
13033
13045
  const \u540D\u524D\u306B\u4F7F\u3048\u308B = Math.max(
@@ -13102,8 +13114,8 @@ function ChartSlopeNode({
13102
13114
  )
13103
13115
  ] }),
13104
13116
  \u7CFB\u5217\u305F\u3061.map((s, i) => {
13105
- const \u5DE6y = y\u3092\u53D6\u308B(s.\u524D);
13106
- 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);
13107
13119
  const \u672A\u89E3\u6C7A = s.\u672A\u89E3\u6C7A ? "true" : void 0;
13108
13120
  return /* @__PURE__ */ jsxs("g", { children: [
13109
13121
  \u524D\u3042\u308A && /* @__PURE__ */ jsx(
@@ -13183,7 +13195,7 @@ function ChartSlopeNode({
13183
13195
  /* @__PURE__ */ jsx(
13184
13196
  "text",
13185
13197
  {
13186
- "data-cdl-role": "chart-slope-value",
13198
+ "data-cdl-role": \u5F62 === "delta" ? "chart-slope-delta" : "chart-slope-value",
13187
13199
  x: \u53F3\u8EF8x + \u8EF8\u304B\u3089\u5024\u307E\u3067,
13188
13200
  y: \u53F3y + 5,
13189
13201
  fontSize: \u5024\u306E\u7D1A,