@open-feishu-card/renderer 0.2.4 → 0.2.5
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/all.css +3 -0
- package/dist/index.cjs +6 -5
- package/dist/index.js +6 -5
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/dist/all.css
CHANGED
|
@@ -324,6 +324,9 @@
|
|
|
324
324
|
/* ---- 布局:column_set / column ---- */
|
|
325
325
|
.universal-card-column-set { display: flex; }
|
|
326
326
|
.universal-card-column { box-sizing: border-box; overflow-wrap: anywhere; }
|
|
327
|
+
/* 真机:有背景才挂 --bg。column_set 额外 4px 内边距;column 只圆角、不加默认 padding。 */
|
|
328
|
+
.universal-card-column-set--bg { padding: 4px; border-radius: 6px; }
|
|
329
|
+
.universal-card-column--bg { border-radius: 6px; }
|
|
327
330
|
/* 列内纵向间距唯一来源是 column 组件输出的 flex row-gap(默认 8px,可被 vertical_spacing 覆盖)。
|
|
328
331
|
这里不再给相邻子元素设 margin-top——否则与 row-gap 叠加,间距翻倍。 */
|
|
329
332
|
|
package/dist/index.cjs
CHANGED
|
@@ -1140,6 +1140,9 @@ var BASE_STYLES_CSS = `/**
|
|
|
1140
1140
|
/* ---- \u5E03\u5C40\uFF1Acolumn_set / column ---- */
|
|
1141
1141
|
.universal-card-column-set { display: flex; }
|
|
1142
1142
|
.universal-card-column { box-sizing: border-box; overflow-wrap: anywhere; }
|
|
1143
|
+
/* \u771F\u673A\uFF1A\u6709\u80CC\u666F\u624D\u6302 --bg\u3002column_set \u989D\u5916 4px \u5185\u8FB9\u8DDD\uFF1Bcolumn \u53EA\u5706\u89D2\u3001\u4E0D\u52A0\u9ED8\u8BA4 padding\u3002 */
|
|
1144
|
+
.universal-card-column-set--bg { padding: 4px; border-radius: 6px; }
|
|
1145
|
+
.universal-card-column--bg { border-radius: 6px; }
|
|
1143
1146
|
/* \u5217\u5185\u7EB5\u5411\u95F4\u8DDD\u552F\u4E00\u6765\u6E90\u662F column \u7EC4\u4EF6\u8F93\u51FA\u7684 flex row-gap\uFF08\u9ED8\u8BA4 8px\uFF0C\u53EF\u88AB vertical_spacing \u8986\u76D6\uFF09\u3002
|
|
1144
1147
|
\u8FD9\u91CC\u4E0D\u518D\u7ED9\u76F8\u90BB\u5B50\u5143\u7D20\u8BBE margin-top\u2014\u2014\u5426\u5219\u4E0E row-gap \u53E0\u52A0\uFF0C\u95F4\u8DDD\u7FFB\u500D\u3002 */
|
|
1145
1148
|
|
|
@@ -5493,15 +5496,13 @@ function registerBuiltins() {
|
|
|
5493
5496
|
const vGap = p.verticalSpacingValue?.value ?? p.vertical_spacing;
|
|
5494
5497
|
style.rowGap = (vGap != null ? spacingToPx(vGap) : 8) + "px";
|
|
5495
5498
|
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5496
|
-
if (bg)
|
|
5497
|
-
style.background = bg;
|
|
5498
|
-
style.borderRadius = "6px";
|
|
5499
|
-
}
|
|
5499
|
+
if (bg) style.background = bg;
|
|
5500
5500
|
const pad = boxToStyle(p.padding);
|
|
5501
5501
|
if (pad) style.padding = pad;
|
|
5502
5502
|
const mg = boxToStyle(p.margin);
|
|
5503
5503
|
if (mg) style.margin = mg;
|
|
5504
|
-
|
|
5504
|
+
const cls = `${CLS}-column` + (bg ? ` ${CLS}-column--bg` : "");
|
|
5505
|
+
return h("div", { className: cls, style }, renderElements(p.elements, ctx));
|
|
5505
5506
|
});
|
|
5506
5507
|
registerComponent("img", (el, ctx) => {
|
|
5507
5508
|
const p = el.property || {};
|
package/dist/index.js
CHANGED
|
@@ -1139,6 +1139,9 @@ var BASE_STYLES_CSS = `/**
|
|
|
1139
1139
|
/* ---- \u5E03\u5C40\uFF1Acolumn_set / column ---- */
|
|
1140
1140
|
.universal-card-column-set { display: flex; }
|
|
1141
1141
|
.universal-card-column { box-sizing: border-box; overflow-wrap: anywhere; }
|
|
1142
|
+
/* \u771F\u673A\uFF1A\u6709\u80CC\u666F\u624D\u6302 --bg\u3002column_set \u989D\u5916 4px \u5185\u8FB9\u8DDD\uFF1Bcolumn \u53EA\u5706\u89D2\u3001\u4E0D\u52A0\u9ED8\u8BA4 padding\u3002 */
|
|
1143
|
+
.universal-card-column-set--bg { padding: 4px; border-radius: 6px; }
|
|
1144
|
+
.universal-card-column--bg { border-radius: 6px; }
|
|
1142
1145
|
/* \u5217\u5185\u7EB5\u5411\u95F4\u8DDD\u552F\u4E00\u6765\u6E90\u662F column \u7EC4\u4EF6\u8F93\u51FA\u7684 flex row-gap\uFF08\u9ED8\u8BA4 8px\uFF0C\u53EF\u88AB vertical_spacing \u8986\u76D6\uFF09\u3002
|
|
1143
1146
|
\u8FD9\u91CC\u4E0D\u518D\u7ED9\u76F8\u90BB\u5B50\u5143\u7D20\u8BBE margin-top\u2014\u2014\u5426\u5219\u4E0E row-gap \u53E0\u52A0\uFF0C\u95F4\u8DDD\u7FFB\u500D\u3002 */
|
|
1144
1147
|
|
|
@@ -5492,15 +5495,13 @@ function registerBuiltins() {
|
|
|
5492
5495
|
const vGap = p.verticalSpacingValue?.value ?? p.vertical_spacing;
|
|
5493
5496
|
style.rowGap = (vGap != null ? spacingToPx(vGap) : 8) + "px";
|
|
5494
5497
|
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5495
|
-
if (bg)
|
|
5496
|
-
style.background = bg;
|
|
5497
|
-
style.borderRadius = "6px";
|
|
5498
|
-
}
|
|
5498
|
+
if (bg) style.background = bg;
|
|
5499
5499
|
const pad = boxToStyle(p.padding);
|
|
5500
5500
|
if (pad) style.padding = pad;
|
|
5501
5501
|
const mg = boxToStyle(p.margin);
|
|
5502
5502
|
if (mg) style.margin = mg;
|
|
5503
|
-
|
|
5503
|
+
const cls = `${CLS}-column` + (bg ? ` ${CLS}-column--bg` : "");
|
|
5504
|
+
return h("div", { className: cls, style }, renderElements(p.elements, ctx));
|
|
5504
5505
|
});
|
|
5505
5506
|
registerComponent("img", (el, ctx) => {
|
|
5506
5507
|
const p = el.property || {};
|
package/dist/styles.css
CHANGED
|
@@ -324,6 +324,9 @@
|
|
|
324
324
|
/* ---- 布局:column_set / column ---- */
|
|
325
325
|
.universal-card-column-set { display: flex; }
|
|
326
326
|
.universal-card-column { box-sizing: border-box; overflow-wrap: anywhere; }
|
|
327
|
+
/* 真机:有背景才挂 --bg。column_set 额外 4px 内边距;column 只圆角、不加默认 padding。 */
|
|
328
|
+
.universal-card-column-set--bg { padding: 4px; border-radius: 6px; }
|
|
329
|
+
.universal-card-column--bg { border-radius: 6px; }
|
|
327
330
|
/* 列内纵向间距唯一来源是 column 组件输出的 flex row-gap(默认 8px,可被 vertical_spacing 覆盖)。
|
|
328
331
|
这里不再给相邻子元素设 margin-top——否则与 row-gap 叠加,间距翻倍。 */
|
|
329
332
|
|