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