@cardenelabs/cdl 0.68.0 → 0.69.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/index.js CHANGED
@@ -27032,6 +27032,27 @@ function GanttNode({
27032
27032
  const \u884C\u306E\u4F38\u3073 = (row) => \u6BB5\u306E\u4F38\u3073(\u4F38\u3073, row + 1, rowCount);
27033
27033
  const taskById = new Map(\u6574\u3048\u305F.map((t) => [t.id, t]));
27034
27034
  const rowOf = new Map(\u6574\u3048\u305F.map((t, i) => [t.id, i]));
27035
+ const \u7DDA\u306E\u53D6\u308A\u5206 = 0.35;
27036
+ const \u533A\u5207\u308B = (v) => Math.min(1, Math.max(0, v));
27037
+ const \u4E0A\u304B\u3089\u6765\u308B\u7DDA = (row) => {
27038
+ const t = \u6574\u3048\u305F[row];
27039
+ if (t === void 0 || t.dependsOn === void 0) return false;
27040
+ const \u89AA = taskById.get(t.dependsOn);
27041
+ if (\u89AA === void 0) return false;
27042
+ const \u89AA\u306E\u884C = rowOf.get(\u89AA.id);
27043
+ return \u89AA\u306E\u884C !== void 0 && \u89AA\u306E\u884C < row;
27044
+ };
27045
+ const \u5E2F\u306E\u4F38\u3073 = (row) => {
27046
+ const r = \u884C\u306E\u4F38\u3073(row);
27047
+ return \u4E0A\u304B\u3089\u6765\u308B\u7DDA(row) ? \u533A\u5207\u308B((r - \u7DDA\u306E\u53D6\u308A\u5206) / (1 - \u7DDA\u306E\u53D6\u308A\u5206)) : r;
27048
+ };
27049
+ const \u7DDA\u306E\u4F38\u3073 = (\u89AA\u306E\u884C, \u5B50\u306E\u884C) => {
27050
+ if (!drawing) return 1;
27051
+ if (\u89AA\u306E\u884C >= \u5B50\u306E\u884C) {
27052
+ return \u884C\u306E\u4F38\u3073(\u89AA\u306E\u884C) >= 1 && \u884C\u306E\u4F38\u3073(\u5B50\u306E\u884C) >= 1 ? 1 : 0;
27053
+ }
27054
+ return \u533A\u5207\u308B(\u884C\u306E\u4F38\u3073(\u5B50\u306E\u884C) / \u7DDA\u306E\u53D6\u308A\u5206);
27055
+ };
27035
27056
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
27036
27057
  /* @__PURE__ */ jsx(
27037
27058
  "rect",
@@ -27140,7 +27161,7 @@ function GanttNode({
27140
27161
  const bx = \u5E2F\u306E\u5DE6(t.startIdx);
27141
27162
  const by = \u5E2F\u306E\u4E0A(row);
27142
27163
  const bw = Math.max(0, \u5E2F\u306E\u53F3(t.endIdx) - bx);
27143
- const \u3053\u306E\u884C = \u884C\u306E\u4F38\u3073(row);
27164
+ const \u3053\u306E\u884C = \u5E2F\u306E\u4F38\u3073(row);
27144
27165
  const \u4ECA\u306E\u5E45 = drawing ? bw * \u3053\u306E\u884C : bw;
27145
27166
  return /* @__PURE__ */ jsxs("g", { children: [
27146
27167
  /* @__PURE__ */ jsx(
@@ -27194,7 +27215,8 @@ function GanttNode({
27194
27215
  const \u624B = Math.max(6, (\u7E26\u306E\u7D42\u308F\u308AY - \u51FA\u767AY) * 0.55);
27195
27216
  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}`;
27196
27217
  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`;
27197
- return drawing && !(\u884C\u306E\u4F38\u3073(parentRow) >= 1 && \u884C\u306E\u4F38\u3073(childRow) >= 1) ? null : /* @__PURE__ */ jsxs("g", { "data-cdl-role": "gantt-arrow", children: [
27218
+ const \u5F15\u3051\u305F = \u7DDA\u306E\u4F38\u3073(parentRow, childRow);
27219
+ return \u5F15\u3051\u305F <= 0 ? null : /* @__PURE__ */ jsxs("g", { "data-cdl-role": "gantt-arrow", children: [
27198
27220
  /* @__PURE__ */ jsx(
27199
27221
  "path",
27200
27222
  {
@@ -27203,10 +27225,11 @@ function GanttNode({
27203
27225
  stroke: "var(--cdl-text-mute, #8a8678)",
27204
27226
  strokeWidth: 2.4,
27205
27227
  strokeLinejoin: "round",
27206
- strokeLinecap: "round"
27228
+ strokeLinecap: "round",
27229
+ ...\u4F38\u3070\u3059dash(drawing, \u5F15\u3051\u305F)
27207
27230
  }
27208
27231
  ),
27209
- /* @__PURE__ */ jsx(
27232
+ \u5F15\u3051\u305F < 1 ? null : /* @__PURE__ */ jsx(
27210
27233
  "path",
27211
27234
  {
27212
27235
  d: arrowHeadPath,