@open-feishu-card/renderer 0.2.2 → 0.2.4
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 +2 -0
- package/dist/index.cjs +11 -3
- package/dist/index.js +11 -3
- package/dist/styles.css +2 -0
- package/package.json +1 -1
package/dist/all.css
CHANGED
|
@@ -186,6 +186,8 @@
|
|
|
186
186
|
--Y800: #573601;
|
|
187
187
|
--Y900: #382201;
|
|
188
188
|
/* END PALETTE VARS */
|
|
189
|
+
/* 真机 light:--bg-float-overlay: var(--N50)。column_set background_style=grey 走此 token */
|
|
190
|
+
--bg-float-overlay: var(--N50);
|
|
189
191
|
}
|
|
190
192
|
.universal-card-root *,
|
|
191
193
|
.universal-card-root *::before,
|
package/dist/index.cjs
CHANGED
|
@@ -720,6 +720,7 @@ function bgStyleToColor(style) {
|
|
|
720
720
|
if (typeof style !== "string") return null;
|
|
721
721
|
const v = style.trim();
|
|
722
722
|
if (!v || v === "default" || v === "none" || v === "transparent") return null;
|
|
723
|
+
if (v === "grey" || v === "gray" || v === "1") return "var(--bg-float-overlay)";
|
|
723
724
|
return resolveColor(v) || null;
|
|
724
725
|
}
|
|
725
726
|
|
|
@@ -1001,6 +1002,8 @@ var BASE_STYLES_CSS = `/**
|
|
|
1001
1002
|
--Y800: #573601;
|
|
1002
1003
|
--Y900: #382201;
|
|
1003
1004
|
/* END PALETTE VARS */
|
|
1005
|
+
/* \u771F\u673A light\uFF1A--bg-float-overlay: var(--N50)\u3002column_set background_style=grey \u8D70\u6B64 token */
|
|
1006
|
+
--bg-float-overlay: var(--N50);
|
|
1004
1007
|
}
|
|
1005
1008
|
.universal-card-root *,
|
|
1006
1009
|
.universal-card-root *::before,
|
|
@@ -5453,7 +5456,12 @@ function registerBuiltins() {
|
|
|
5453
5456
|
}
|
|
5454
5457
|
const mg = boxToStyle(p.margin);
|
|
5455
5458
|
if (mg) style.margin = mg;
|
|
5456
|
-
|
|
5459
|
+
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5460
|
+
if (bg) style.background = bg;
|
|
5461
|
+
const pad = boxToStyle(p.padding);
|
|
5462
|
+
if (pad) style.padding = pad;
|
|
5463
|
+
const cls = `${CLS}-column-set` + (bg ? ` ${CLS}-column-set--bg` : "");
|
|
5464
|
+
return h("div", { className: cls, style }, renderElements(p.columns, ctx));
|
|
5457
5465
|
});
|
|
5458
5466
|
registerComponent("column", (el, ctx) => {
|
|
5459
5467
|
const p = el.property || {};
|
|
@@ -5484,7 +5492,7 @@ function registerBuiltins() {
|
|
|
5484
5492
|
}
|
|
5485
5493
|
const vGap = p.verticalSpacingValue?.value ?? p.vertical_spacing;
|
|
5486
5494
|
style.rowGap = (vGap != null ? spacingToPx(vGap) : 8) + "px";
|
|
5487
|
-
const bg = bgStyleToColor(p.backgroundStyle);
|
|
5495
|
+
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5488
5496
|
if (bg) {
|
|
5489
5497
|
style.background = bg;
|
|
5490
5498
|
style.borderRadius = "6px";
|
|
@@ -5659,7 +5667,7 @@ function registerBuiltins() {
|
|
|
5659
5667
|
const hasBorder = borderColor != null || p.hasBorder === true;
|
|
5660
5668
|
const cls = `${CLS}-interactive-container` + (hasBorder && !borderColor ? ` ${CLS}-interactive-container--bordered` : "") + (disabled ? ` ${CLS}-interactive-container--disabled` : "");
|
|
5661
5669
|
const style = {};
|
|
5662
|
-
const bg = bgStyleToColor(p.backgroundStyle);
|
|
5670
|
+
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5663
5671
|
if (bg) style.background = bg;
|
|
5664
5672
|
const pad = boxToStyle(p.padding);
|
|
5665
5673
|
if (pad) style.padding = pad;
|
package/dist/index.js
CHANGED
|
@@ -719,6 +719,7 @@ function bgStyleToColor(style) {
|
|
|
719
719
|
if (typeof style !== "string") return null;
|
|
720
720
|
const v = style.trim();
|
|
721
721
|
if (!v || v === "default" || v === "none" || v === "transparent") return null;
|
|
722
|
+
if (v === "grey" || v === "gray" || v === "1") return "var(--bg-float-overlay)";
|
|
722
723
|
return resolveColor(v) || null;
|
|
723
724
|
}
|
|
724
725
|
|
|
@@ -1000,6 +1001,8 @@ var BASE_STYLES_CSS = `/**
|
|
|
1000
1001
|
--Y800: #573601;
|
|
1001
1002
|
--Y900: #382201;
|
|
1002
1003
|
/* END PALETTE VARS */
|
|
1004
|
+
/* \u771F\u673A light\uFF1A--bg-float-overlay: var(--N50)\u3002column_set background_style=grey \u8D70\u6B64 token */
|
|
1005
|
+
--bg-float-overlay: var(--N50);
|
|
1003
1006
|
}
|
|
1004
1007
|
.universal-card-root *,
|
|
1005
1008
|
.universal-card-root *::before,
|
|
@@ -5452,7 +5455,12 @@ function registerBuiltins() {
|
|
|
5452
5455
|
}
|
|
5453
5456
|
const mg = boxToStyle(p.margin);
|
|
5454
5457
|
if (mg) style.margin = mg;
|
|
5455
|
-
|
|
5458
|
+
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5459
|
+
if (bg) style.background = bg;
|
|
5460
|
+
const pad = boxToStyle(p.padding);
|
|
5461
|
+
if (pad) style.padding = pad;
|
|
5462
|
+
const cls = `${CLS}-column-set` + (bg ? ` ${CLS}-column-set--bg` : "");
|
|
5463
|
+
return h("div", { className: cls, style }, renderElements(p.columns, ctx));
|
|
5456
5464
|
});
|
|
5457
5465
|
registerComponent("column", (el, ctx) => {
|
|
5458
5466
|
const p = el.property || {};
|
|
@@ -5483,7 +5491,7 @@ function registerBuiltins() {
|
|
|
5483
5491
|
}
|
|
5484
5492
|
const vGap = p.verticalSpacingValue?.value ?? p.vertical_spacing;
|
|
5485
5493
|
style.rowGap = (vGap != null ? spacingToPx(vGap) : 8) + "px";
|
|
5486
|
-
const bg = bgStyleToColor(p.backgroundStyle);
|
|
5494
|
+
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5487
5495
|
if (bg) {
|
|
5488
5496
|
style.background = bg;
|
|
5489
5497
|
style.borderRadius = "6px";
|
|
@@ -5658,7 +5666,7 @@ function registerBuiltins() {
|
|
|
5658
5666
|
const hasBorder = borderColor != null || p.hasBorder === true;
|
|
5659
5667
|
const cls = `${CLS}-interactive-container` + (hasBorder && !borderColor ? ` ${CLS}-interactive-container--bordered` : "") + (disabled ? ` ${CLS}-interactive-container--disabled` : "");
|
|
5660
5668
|
const style = {};
|
|
5661
|
-
const bg = bgStyleToColor(p.backgroundStyle);
|
|
5669
|
+
const bg = bgStyleToColor(p.backgroundStyle ?? p.background_style);
|
|
5662
5670
|
if (bg) style.background = bg;
|
|
5663
5671
|
const pad = boxToStyle(p.padding);
|
|
5664
5672
|
if (pad) style.padding = pad;
|
package/dist/styles.css
CHANGED
|
@@ -186,6 +186,8 @@
|
|
|
186
186
|
--Y800: #573601;
|
|
187
187
|
--Y900: #382201;
|
|
188
188
|
/* END PALETTE VARS */
|
|
189
|
+
/* 真机 light:--bg-float-overlay: var(--N50)。column_set background_style=grey 走此 token */
|
|
190
|
+
--bg-float-overlay: var(--N50);
|
|
189
191
|
}
|
|
190
192
|
.universal-card-root *,
|
|
191
193
|
.universal-card-root *::before,
|