@open-feishu-card/renderer 0.2.32 → 0.3.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.cjs +12 -0
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6046,6 +6046,18 @@ function registerBuiltins() {
|
|
|
6046
6046
|
if (borderColor) style.border = `1px solid ${borderColor}`;
|
|
6047
6047
|
const radius = resolveCornerRadius(p);
|
|
6048
6048
|
if (radius != null) style.borderRadius = radius;
|
|
6049
|
+
const horizontalDir = p.direction === "horizontal";
|
|
6050
|
+
if (horizontalDir) style.flexDirection = "row";
|
|
6051
|
+
const hAlign = p.horizontal_align ?? p.horizontalAlign;
|
|
6052
|
+
const vAlign = p.vertical_align ?? p.verticalAlign;
|
|
6053
|
+
const H_ALIGN = { left: "flex-start", center: "center", right: "flex-end" };
|
|
6054
|
+
const V_ALIGN = { top: "flex-start", center: "center", bottom: "flex-end" };
|
|
6055
|
+
const justify = horizontalDir ? H_ALIGN[hAlign] : V_ALIGN[vAlign];
|
|
6056
|
+
const align = horizontalDir ? V_ALIGN[vAlign] : H_ALIGN[hAlign];
|
|
6057
|
+
if (justify) style.justifyContent = justify;
|
|
6058
|
+
if (align) style.alignItems = align;
|
|
6059
|
+
const hGap = p.horizontalSpacingValue?.value ?? p.horizontal_spacing ?? p.horizontalSpacing;
|
|
6060
|
+
if (hGap != null) style.columnGap = horizontalSpacingToPx(hGap) + "px";
|
|
6049
6061
|
const vGap = p.verticalSpacingValue?.value ?? p.vertical_spacing;
|
|
6050
6062
|
if (vGap != null) style.rowGap = verticalSpacingToPx(vGap) + "px";
|
|
6051
6063
|
const icWv = p.widthValue;
|
package/dist/index.js
CHANGED
|
@@ -6045,6 +6045,18 @@ function registerBuiltins() {
|
|
|
6045
6045
|
if (borderColor) style.border = `1px solid ${borderColor}`;
|
|
6046
6046
|
const radius = resolveCornerRadius(p);
|
|
6047
6047
|
if (radius != null) style.borderRadius = radius;
|
|
6048
|
+
const horizontalDir = p.direction === "horizontal";
|
|
6049
|
+
if (horizontalDir) style.flexDirection = "row";
|
|
6050
|
+
const hAlign = p.horizontal_align ?? p.horizontalAlign;
|
|
6051
|
+
const vAlign = p.vertical_align ?? p.verticalAlign;
|
|
6052
|
+
const H_ALIGN = { left: "flex-start", center: "center", right: "flex-end" };
|
|
6053
|
+
const V_ALIGN = { top: "flex-start", center: "center", bottom: "flex-end" };
|
|
6054
|
+
const justify = horizontalDir ? H_ALIGN[hAlign] : V_ALIGN[vAlign];
|
|
6055
|
+
const align = horizontalDir ? V_ALIGN[vAlign] : H_ALIGN[hAlign];
|
|
6056
|
+
if (justify) style.justifyContent = justify;
|
|
6057
|
+
if (align) style.alignItems = align;
|
|
6058
|
+
const hGap = p.horizontalSpacingValue?.value ?? p.horizontal_spacing ?? p.horizontalSpacing;
|
|
6059
|
+
if (hGap != null) style.columnGap = horizontalSpacingToPx(hGap) + "px";
|
|
6048
6060
|
const vGap = p.verticalSpacingValue?.value ?? p.vertical_spacing;
|
|
6049
6061
|
if (vGap != null) style.rowGap = verticalSpacingToPx(vGap) + "px";
|
|
6050
6062
|
const icWv = p.widthValue;
|