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