@open-feishu-card/renderer 0.2.12 → 0.2.14

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 CHANGED
@@ -20,7 +20,8 @@
20
20
  background-color: #fff;
21
21
  position: relative;
22
22
  border-radius: 8px;
23
- /* 真机 root 默认无边框;showCardBorder 时才 outline(见 --has-border) */
23
+ /* 对齐飞书网页版 --line-border-card: var(--N300);独立渲染器无消息气泡外包层,边框在 root */
24
+ border: 1px solid var(--N300);
24
25
  overflow: hidden;
25
26
  width: 100%;
26
27
  max-width: 605px;
@@ -189,7 +190,6 @@
189
190
  /* 真机 light:--bg-float-overlay: var(--N50)。column_set background_style=grey 走此 token */
190
191
  --bg-float-overlay: var(--N50);
191
192
  }
192
- .universal-card-root--has-border { outline: 1px solid #dee0e3; }
193
193
  .universal-card-root *,
194
194
  .universal-card-root *::before,
195
195
  .universal-card-root *::after { box-sizing: border-box; }
package/dist/index.cjs CHANGED
@@ -857,7 +857,8 @@ var BASE_STYLES_CSS = `/**
857
857
  background-color: #fff;
858
858
  position: relative;
859
859
  border-radius: 8px;
860
- /* \u771F\u673A root \u9ED8\u8BA4\u65E0\u8FB9\u6846\uFF1BshowCardBorder \u65F6\u624D outline\uFF08\u89C1 --has-border\uFF09 */
860
+ /* \u5BF9\u9F50\u98DE\u4E66\u7F51\u9875\u7248 --line-border-card: var(--N300)\uFF1B\u72EC\u7ACB\u6E32\u67D3\u5668\u65E0\u6D88\u606F\u6C14\u6CE1\u5916\u5305\u5C42\uFF0C\u8FB9\u6846\u5728 root */
861
+ border: 1px solid var(--N300);
861
862
  overflow: hidden;
862
863
  width: 100%;
863
864
  max-width: 605px;
@@ -1026,7 +1027,6 @@ var BASE_STYLES_CSS = `/**
1026
1027
  /* \u771F\u673A light\uFF1A--bg-float-overlay: var(--N50)\u3002column_set background_style=grey \u8D70\u6B64 token */
1027
1028
  --bg-float-overlay: var(--N50);
1028
1029
  }
1029
- .universal-card-root--has-border { outline: 1px solid #dee0e3; }
1030
1030
  .universal-card-root *,
1031
1031
  .universal-card-root *::before,
1032
1032
  .universal-card-root *::after { box-sizing: border-box; }
@@ -5740,7 +5740,9 @@ function registerBuiltins() {
5740
5740
  const expanded = p.expanded !== false;
5741
5741
  const style = { width: "100%" };
5742
5742
  const bgRaw = p.background_color ?? p.backgroundColor;
5743
- if (bgRaw === "bg-white") style.background = "#fff";
5743
+ const bgCustom = propertyBackgroundColor(p);
5744
+ if (bgCustom) style.background = bgCustom;
5745
+ else if (bgRaw === "bg-white") style.background = "#fff";
5744
5746
  else {
5745
5747
  const bg = bgStyleToColor(bgRaw);
5746
5748
  if (bg) style.background = bg;
package/dist/index.js CHANGED
@@ -856,7 +856,8 @@ var BASE_STYLES_CSS = `/**
856
856
  background-color: #fff;
857
857
  position: relative;
858
858
  border-radius: 8px;
859
- /* \u771F\u673A root \u9ED8\u8BA4\u65E0\u8FB9\u6846\uFF1BshowCardBorder \u65F6\u624D outline\uFF08\u89C1 --has-border\uFF09 */
859
+ /* \u5BF9\u9F50\u98DE\u4E66\u7F51\u9875\u7248 --line-border-card: var(--N300)\uFF1B\u72EC\u7ACB\u6E32\u67D3\u5668\u65E0\u6D88\u606F\u6C14\u6CE1\u5916\u5305\u5C42\uFF0C\u8FB9\u6846\u5728 root */
860
+ border: 1px solid var(--N300);
860
861
  overflow: hidden;
861
862
  width: 100%;
862
863
  max-width: 605px;
@@ -1025,7 +1026,6 @@ var BASE_STYLES_CSS = `/**
1025
1026
  /* \u771F\u673A light\uFF1A--bg-float-overlay: var(--N50)\u3002column_set background_style=grey \u8D70\u6B64 token */
1026
1027
  --bg-float-overlay: var(--N50);
1027
1028
  }
1028
- .universal-card-root--has-border { outline: 1px solid #dee0e3; }
1029
1029
  .universal-card-root *,
1030
1030
  .universal-card-root *::before,
1031
1031
  .universal-card-root *::after { box-sizing: border-box; }
@@ -5739,7 +5739,9 @@ function registerBuiltins() {
5739
5739
  const expanded = p.expanded !== false;
5740
5740
  const style = { width: "100%" };
5741
5741
  const bgRaw = p.background_color ?? p.backgroundColor;
5742
- if (bgRaw === "bg-white") style.background = "#fff";
5742
+ const bgCustom = propertyBackgroundColor(p);
5743
+ if (bgCustom) style.background = bgCustom;
5744
+ else if (bgRaw === "bg-white") style.background = "#fff";
5743
5745
  else {
5744
5746
  const bg = bgStyleToColor(bgRaw);
5745
5747
  if (bg) style.background = bg;
package/dist/styles.css CHANGED
@@ -20,7 +20,8 @@
20
20
  background-color: #fff;
21
21
  position: relative;
22
22
  border-radius: 8px;
23
- /* 真机 root 默认无边框;showCardBorder 时才 outline(见 --has-border) */
23
+ /* 对齐飞书网页版 --line-border-card: var(--N300);独立渲染器无消息气泡外包层,边框在 root */
24
+ border: 1px solid var(--N300);
24
25
  overflow: hidden;
25
26
  width: 100%;
26
27
  max-width: 605px;
@@ -189,7 +190,6 @@
189
190
  /* 真机 light:--bg-float-overlay: var(--N50)。column_set background_style=grey 走此 token */
190
191
  --bg-float-overlay: var(--N50);
191
192
  }
192
- .universal-card-root--has-border { outline: 1px solid #dee0e3; }
193
193
  .universal-card-root *,
194
194
  .universal-card-root *::before,
195
195
  .universal-card-root *::after { box-sizing: border-box; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-feishu-card/renderer",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "零框架依赖的飞书卡片渲染引擎:Web / DOM / SSR,输入 RAW 或公开 DSL,输出真实 DOM 或 HTML 字符串",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -28,7 +28,7 @@
28
28
  "./dist/*.cjs"
29
29
  ],
30
30
  "dependencies": {
31
- "@open-feishu-card/adapter": "0.3.8"
31
+ "@open-feishu-card/adapter": "0.3.10"
32
32
  },
33
33
  "devDependencies": {
34
34
  "tsup": "^8.3.5",