@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/react.cjs CHANGED
@@ -848,6 +848,18 @@ function \u4E2D\u8EAB\u304B\u3089\u51FA\u3059\u9AD8\u3055(kind, \u6E80\u8F09h, \
848
848
  return Math.max(MIN_BOX_H, \u6E80\u8F09h - \u5F15\u304F);
849
849
  }
850
850
  var MIN_BOX_H = 44;
851
+ var CLOUD_CIRCLES = [
852
+ { cx: -0.8, cy: -0.05 + 0.08, r: 0.32 },
853
+ { cx: -0.4, cy: -0.05 - 0.05, r: 0.4 },
854
+ { cx: 0, cy: -0.05 - 0.1, r: 0.46 },
855
+ { cx: 0.4, cy: -0.05 - 0.05, r: 0.4 },
856
+ { cx: 0.8, cy: -0.05 + 0.08, r: 0.32 }
857
+ ];
858
+ var CLOUD_ART_CENTER_RISE = (() => {
859
+ const \u4E0A = Math.min(...CLOUD_CIRCLES.map((c) => c.cy - c.r));
860
+ const \u4E0B = Math.max(...CLOUD_CIRCLES.map((c) => c.cy + c.r));
861
+ return -(\u4E0A + \u4E0B) / 2;
862
+ })();
851
863
 
852
864
  // src/layout/footer-shape.ts
853
865
  var SHAPE_DRAW_UP_EXTENT = {
@@ -6855,21 +6867,12 @@ function GenericNode({
6855
6867
  if (shape === "cloud") {
6856
6868
  const cx = w / 2;
6857
6869
  const cy = h / 2;
6858
- const cloudCenterY = cy - h * 0.05;
6859
- const usableW = w * 0.85;
6860
- const halfW = usableW / 2;
6861
- const circles = [
6862
- { cx: cx - halfW * 0.8, cy: cloudCenterY + h * 0.08, r: h * 0.32 },
6863
- // 左端
6864
- { cx: cx - halfW * 0.4, cy: cloudCenterY - h * 0.05, r: h * 0.4 },
6865
- // 左
6866
- { cx, cy: cloudCenterY - h * 0.1, r: h * 0.46 },
6867
- // 中央 (最大)
6868
- { cx: cx + halfW * 0.4, cy: cloudCenterY - h * 0.05, r: h * 0.4 },
6869
- // 右
6870
- { cx: cx + halfW * 0.8, cy: cloudCenterY + h * 0.08, r: h * 0.32 }
6871
- // 右端
6872
- ];
6870
+ const halfW = w * 0.85 / 2;
6871
+ const circles = CLOUD_CIRCLES.map((c) => ({
6872
+ cx: cx + halfW * c.cx,
6873
+ cy: cy + h * c.cy,
6874
+ r: h * c.r
6875
+ }));
6873
6876
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
6874
6877
  circles.map((c, i) => /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: c.cx, cy: c.cy, r: c.r, fill: "var(--cdl-node-fill, #ffffff)" }, `fill-${i}`)),
6875
6878
  circles.map((c, i) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -6908,11 +6911,12 @@ function GenericNode({
6908
6911
  const textX = centered ? w / 2 : 20;
6909
6912
  const cylinderShift = genericTextShift(node.kind);
6910
6913
  const \u7E70\u308A\u4E0A\u3052 = node.eyebrow || centered ? 0 : \u76EE\u5370\u306A\u3057\u306E\u7E70\u308A\u4E0A\u3052(node.kind, hasRows);
6911
- const eyebrowY = centered ? h / 2 - 26 : 32 + cylinderShift;
6912
- const titleY = genericTitleBaselineY(node.kind, h, hasRows) - \u7E70\u308A\u4E0A\u3052;
6913
- const subtitleY = centered ? h / 2 + 28 : 96 + cylinderShift - \u7E70\u308A\u4E0A\u3052;
6914
+ const \u7D75\u306E\u82AF = centered && STYLES[node.kind]?.shape === "cloud" ? h * CLOUD_ART_CENTER_RISE : 0;
6915
+ const eyebrowY = centered ? h / 2 - 26 - \u7D75\u306E\u82AF : 32 + cylinderShift;
6916
+ const titleY = genericTitleBaselineY(node.kind, h, hasRows) - \u7E70\u308A\u4E0A\u3052 - \u7D75\u306E\u82AF;
6917
+ const subtitleY = centered ? h / 2 + 28 - \u7D75\u306E\u82AF : 96 + cylinderShift - \u7E70\u308A\u4E0A\u3052;
6914
6918
  const iconX = centered ? w / 2 + 40 : w - 48;
6915
- const iconY = centered ? h / 2 - 44 : 18 + cylinderShift;
6919
+ const iconY = centered ? h / 2 - 44 - \u7D75\u306E\u82AF : 18 + cylinderShift;
6916
6920
  const dominantBaseline = centered ? "middle" : void 0;
6917
6921
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `translate(${x} ${y})`, "data-cdl-role": "node-body", children: [
6918
6922
  shapeEl,