@cardenelabs/cdl 0.21.1 → 0.21.2

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
@@ -12024,6 +12024,18 @@ function \u4E2D\u8EAB\u304B\u3089\u51FA\u3059\u9AD8\u3055(kind, \u6E80\u8F09h, \
12024
12024
  return Math.max(MIN_BOX_H, \u6E80\u8F09h - \u5F15\u304F);
12025
12025
  }
12026
12026
  var MIN_BOX_H = 44;
12027
+ var CLOUD_CIRCLES = [
12028
+ { cx: -0.8, cy: -0.05 + 0.08, r: 0.32 },
12029
+ { cx: -0.4, cy: -0.05 - 0.05, r: 0.4 },
12030
+ { cx: 0, cy: -0.05 - 0.1, r: 0.46 },
12031
+ { cx: 0.4, cy: -0.05 - 0.05, r: 0.4 },
12032
+ { cx: 0.8, cy: -0.05 + 0.08, r: 0.32 }
12033
+ ];
12034
+ var CLOUD_ART_CENTER_RISE = (() => {
12035
+ const \u4E0A = Math.min(...CLOUD_CIRCLES.map((c) => c.cy - c.r));
12036
+ const \u4E0B = Math.max(...CLOUD_CIRCLES.map((c) => c.cy + c.r));
12037
+ return -(\u4E0A + \u4E0B) / 2;
12038
+ })();
12027
12039
 
12028
12040
  // src/layout/footer-shape.ts
12029
12041
  var SHAPE_DRAW_UP_EXTENT = {
@@ -22502,21 +22514,12 @@ function GenericNode({
22502
22514
  if (shape === "cloud") {
22503
22515
  const cx = w / 2;
22504
22516
  const cy = h / 2;
22505
- const cloudCenterY = cy - h * 0.05;
22506
- const usableW = w * 0.85;
22507
- const halfW = usableW / 2;
22508
- const circles = [
22509
- { cx: cx - halfW * 0.8, cy: cloudCenterY + h * 0.08, r: h * 0.32 },
22510
- // 左端
22511
- { cx: cx - halfW * 0.4, cy: cloudCenterY - h * 0.05, r: h * 0.4 },
22512
- // 左
22513
- { cx, cy: cloudCenterY - h * 0.1, r: h * 0.46 },
22514
- // 中央 (最大)
22515
- { cx: cx + halfW * 0.4, cy: cloudCenterY - h * 0.05, r: h * 0.4 },
22516
- // 右
22517
- { cx: cx + halfW * 0.8, cy: cloudCenterY + h * 0.08, r: h * 0.32 }
22518
- // 右端
22519
- ];
22517
+ const halfW = w * 0.85 / 2;
22518
+ const circles = CLOUD_CIRCLES.map((c) => ({
22519
+ cx: cx + halfW * c.cx,
22520
+ cy: cy + h * c.cy,
22521
+ r: h * c.r
22522
+ }));
22520
22523
  return /* @__PURE__ */ jsxs("g", { children: [
22521
22524
  circles.map((c, i) => /* @__PURE__ */ jsx("circle", { cx: c.cx, cy: c.cy, r: c.r, fill: "var(--cdl-node-fill, #ffffff)" }, `fill-${i}`)),
22522
22525
  circles.map((c, i) => /* @__PURE__ */ jsx(
@@ -22555,11 +22558,12 @@ function GenericNode({
22555
22558
  const textX = centered ? w / 2 : 20;
22556
22559
  const cylinderShift = genericTextShift(node.kind);
22557
22560
  const \u7E70\u308A\u4E0A\u3052 = node.eyebrow || centered ? 0 : \u76EE\u5370\u306A\u3057\u306E\u7E70\u308A\u4E0A\u3052(node.kind, hasRows);
22558
- const eyebrowY = centered ? h / 2 - 26 : 32 + cylinderShift;
22559
- const titleY = genericTitleBaselineY(node.kind, h, hasRows) - \u7E70\u308A\u4E0A\u3052;
22560
- const subtitleY = centered ? h / 2 + 28 : 96 + cylinderShift - \u7E70\u308A\u4E0A\u3052;
22561
+ const \u7D75\u306E\u82AF = centered && STYLES[node.kind]?.shape === "cloud" ? h * CLOUD_ART_CENTER_RISE : 0;
22562
+ const eyebrowY = centered ? h / 2 - 26 - \u7D75\u306E\u82AF : 32 + cylinderShift;
22563
+ const titleY = genericTitleBaselineY(node.kind, h, hasRows) - \u7E70\u308A\u4E0A\u3052 - \u7D75\u306E\u82AF;
22564
+ const subtitleY = centered ? h / 2 + 28 - \u7D75\u306E\u82AF : 96 + cylinderShift - \u7E70\u308A\u4E0A\u3052;
22561
22565
  const iconX = centered ? w / 2 + 40 : w - 48;
22562
- const iconY = centered ? h / 2 - 44 : 18 + cylinderShift;
22566
+ const iconY = centered ? h / 2 - 44 - \u7D75\u306E\u82AF : 18 + cylinderShift;
22563
22567
  const dominantBaseline = centered ? "middle" : void 0;
22564
22568
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x} ${y})`, "data-cdl-role": "node-body", children: [
22565
22569
  shapeEl,