@cardenelabs/cdl 0.68.0 → 0.70.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
@@ -12453,9 +12453,9 @@ function renderRect(shape, x, y, w, h, stateValues, fillColor, strokeColor, opac
12453
12453
  /* @__PURE__ */ jsxRuntime.jsxs(
12454
12454
  "text",
12455
12455
  {
12456
- x: x + w / 2,
12456
+ x: x + w,
12457
12457
  y: y - 6,
12458
- textAnchor: "middle",
12458
+ textAnchor: "end",
12459
12459
  fontSize: 11,
12460
12460
  fontFamily: "monospace",
12461
12461
  fill: "var(--cdl-text-dim, #5a6270)",
@@ -14496,6 +14496,27 @@ function GanttNode({
14496
14496
  const \u884C\u306E\u4F38\u3073 = (row) => \u6BB5\u306E\u4F38\u3073(\u4F38\u3073, row + 1, rowCount);
14497
14497
  const taskById = new Map(\u6574\u3048\u305F.map((t) => [t.id, t]));
14498
14498
  const rowOf = new Map(\u6574\u3048\u305F.map((t, i) => [t.id, i]));
14499
+ const \u7DDA\u306E\u53D6\u308A\u5206 = 0.35;
14500
+ const \u533A\u5207\u308B = (v) => Math.min(1, Math.max(0, v));
14501
+ const \u4E0A\u304B\u3089\u6765\u308B\u7DDA = (row) => {
14502
+ const t = \u6574\u3048\u305F[row];
14503
+ if (t === void 0 || t.dependsOn === void 0) return false;
14504
+ const \u89AA = taskById.get(t.dependsOn);
14505
+ if (\u89AA === void 0) return false;
14506
+ const \u89AA\u306E\u884C = rowOf.get(\u89AA.id);
14507
+ return \u89AA\u306E\u884C !== void 0 && \u89AA\u306E\u884C < row;
14508
+ };
14509
+ const \u5E2F\u306E\u4F38\u3073 = (row) => {
14510
+ const r = \u884C\u306E\u4F38\u3073(row);
14511
+ return \u4E0A\u304B\u3089\u6765\u308B\u7DDA(row) ? \u533A\u5207\u308B((r - \u7DDA\u306E\u53D6\u308A\u5206) / (1 - \u7DDA\u306E\u53D6\u308A\u5206)) : r;
14512
+ };
14513
+ const \u7DDA\u306E\u4F38\u3073 = (\u89AA\u306E\u884C, \u5B50\u306E\u884C) => {
14514
+ if (!drawing) return 1;
14515
+ if (\u89AA\u306E\u884C >= \u5B50\u306E\u884C) {
14516
+ return \u884C\u306E\u4F38\u3073(\u89AA\u306E\u884C) >= 1 && \u884C\u306E\u4F38\u3073(\u5B50\u306E\u884C) >= 1 ? 1 : 0;
14517
+ }
14518
+ return \u533A\u5207\u308B(\u884C\u306E\u4F38\u3073(\u5B50\u306E\u884C) / \u7DDA\u306E\u53D6\u308A\u5206);
14519
+ };
14499
14520
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
14500
14521
  /* @__PURE__ */ jsxRuntime.jsx(
14501
14522
  "rect",
@@ -14604,7 +14625,7 @@ function GanttNode({
14604
14625
  const bx = \u5E2F\u306E\u5DE6(t.startIdx);
14605
14626
  const by = \u5E2F\u306E\u4E0A(row);
14606
14627
  const bw = Math.max(0, \u5E2F\u306E\u53F3(t.endIdx) - bx);
14607
- const \u3053\u306E\u884C = \u884C\u306E\u4F38\u3073(row);
14628
+ const \u3053\u306E\u884C = \u5E2F\u306E\u4F38\u3073(row);
14608
14629
  const \u4ECA\u306E\u5E45 = drawing ? bw * \u3053\u306E\u884C : bw;
14609
14630
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
14610
14631
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -14658,7 +14679,8 @@ function GanttNode({
14658
14679
  const \u624B = Math.max(6, (\u7E26\u306E\u7D42\u308F\u308AY - \u51FA\u767AY) * 0.55);
14659
14680
  const path = `M ${\u51FA\u767AX} ${\u51FA\u767AY} C ${\u51FA\u767AX} ${\u51FA\u767AY + \u624B}, ${\u7740\u5730X} ${\u7E26\u306E\u7D42\u308F\u308AY - \u624B}, ${\u7740\u5730X} ${\u7E26\u306E\u7D42\u308F\u308AY}`;
14660
14681
  const arrowHeadPath = `M ${\u7740\u5730X} ${\u7740\u5730Y} L ${\u7740\u5730X - \u77E2\u3058\u308A\u306E\u5E45 / 2} ${\u7E26\u306E\u7D42\u308F\u308AY} L ${\u7740\u5730X + \u77E2\u3058\u308A\u306E\u5E45 / 2} ${\u7E26\u306E\u7D42\u308F\u308AY} Z`;
14661
- return drawing && !(\u884C\u306E\u4F38\u3073(parentRow) >= 1 && \u884C\u306E\u4F38\u3073(childRow) >= 1) ? null : /* @__PURE__ */ jsxRuntime.jsxs("g", { "data-cdl-role": "gantt-arrow", children: [
14682
+ const \u5F15\u3051\u305F = \u7DDA\u306E\u4F38\u3073(parentRow, childRow);
14683
+ return \u5F15\u3051\u305F <= 0 ? null : /* @__PURE__ */ jsxRuntime.jsxs("g", { "data-cdl-role": "gantt-arrow", children: [
14662
14684
  /* @__PURE__ */ jsxRuntime.jsx(
14663
14685
  "path",
14664
14686
  {
@@ -14667,10 +14689,11 @@ function GanttNode({
14667
14689
  stroke: "var(--cdl-text-mute, #8a8678)",
14668
14690
  strokeWidth: 2.4,
14669
14691
  strokeLinejoin: "round",
14670
- strokeLinecap: "round"
14692
+ strokeLinecap: "round",
14693
+ ...\u4F38\u3070\u3059dash(drawing, \u5F15\u3051\u305F)
14671
14694
  }
14672
14695
  ),
14673
- /* @__PURE__ */ jsxRuntime.jsx(
14696
+ \u5F15\u3051\u305F < 1 ? null : /* @__PURE__ */ jsxRuntime.jsx(
14674
14697
  "path",
14675
14698
  {
14676
14699
  d: arrowHeadPath,