@open-feishu-card/renderer 0.2.17 → 0.2.18

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
@@ -535,9 +535,10 @@
535
535
 
536
536
 
537
537
  /* ---- interactive_container 可点击交互容器 ---- */
538
+ /* 真机无默认圆角;圆角只由 DSL/RAW corner_radius 内联输出(见 resolveCornerRadius)。 */
538
539
  .universal-card-interactive-container {
539
540
  display: flex; flex-direction: column; box-sizing: border-box;
540
- border-radius: 6px; padding: 0; text-decoration: none; color: inherit;
541
+ padding: 0; text-decoration: none; color: inherit;
541
542
  row-gap: 4px;
542
543
  transition: background-color .1s;
543
544
  }
package/dist/index.cjs CHANGED
@@ -798,6 +798,11 @@ function resolveImageSize(property) {
798
798
  function resolveCornerRadius(property) {
799
799
  if (!property) return void 0;
800
800
  const direct = property.corner_radius ?? property.cornerRadius;
801
+ if (typeof direct === "string") {
802
+ const t = direct.trim();
803
+ if (!t) return void 0;
804
+ return sizeToPx(t);
805
+ }
801
806
  if (direct != null) return sizeToPx(direct);
802
807
  const echo = property.cornerRadiusValue;
803
808
  if (echo && typeof echo.value === "number") return echo.value + "px";
@@ -1457,9 +1462,10 @@ var BASE_STYLES_CSS = `/**
1457
1462
 
1458
1463
 
1459
1464
  /* ---- interactive_container \u53EF\u70B9\u51FB\u4EA4\u4E92\u5BB9\u5668 ---- */
1465
+ /* \u771F\u673A\u65E0\u9ED8\u8BA4\u5706\u89D2\uFF1B\u5706\u89D2\u53EA\u7531 DSL/RAW corner_radius \u5185\u8054\u8F93\u51FA\uFF08\u89C1 resolveCornerRadius\uFF09\u3002 */
1460
1466
  .universal-card-interactive-container {
1461
1467
  display: flex; flex-direction: column; box-sizing: border-box;
1462
- border-radius: 6px; padding: 0; text-decoration: none; color: inherit;
1468
+ padding: 0; text-decoration: none; color: inherit;
1463
1469
  row-gap: 4px;
1464
1470
  transition: background-color .1s;
1465
1471
  }
package/dist/index.js CHANGED
@@ -797,6 +797,11 @@ function resolveImageSize(property) {
797
797
  function resolveCornerRadius(property) {
798
798
  if (!property) return void 0;
799
799
  const direct = property.corner_radius ?? property.cornerRadius;
800
+ if (typeof direct === "string") {
801
+ const t = direct.trim();
802
+ if (!t) return void 0;
803
+ return sizeToPx(t);
804
+ }
800
805
  if (direct != null) return sizeToPx(direct);
801
806
  const echo = property.cornerRadiusValue;
802
807
  if (echo && typeof echo.value === "number") return echo.value + "px";
@@ -1456,9 +1461,10 @@ var BASE_STYLES_CSS = `/**
1456
1461
 
1457
1462
 
1458
1463
  /* ---- interactive_container \u53EF\u70B9\u51FB\u4EA4\u4E92\u5BB9\u5668 ---- */
1464
+ /* \u771F\u673A\u65E0\u9ED8\u8BA4\u5706\u89D2\uFF1B\u5706\u89D2\u53EA\u7531 DSL/RAW corner_radius \u5185\u8054\u8F93\u51FA\uFF08\u89C1 resolveCornerRadius\uFF09\u3002 */
1459
1465
  .universal-card-interactive-container {
1460
1466
  display: flex; flex-direction: column; box-sizing: border-box;
1461
- border-radius: 6px; padding: 0; text-decoration: none; color: inherit;
1467
+ padding: 0; text-decoration: none; color: inherit;
1462
1468
  row-gap: 4px;
1463
1469
  transition: background-color .1s;
1464
1470
  }
package/dist/styles.css CHANGED
@@ -535,9 +535,10 @@
535
535
 
536
536
 
537
537
  /* ---- interactive_container 可点击交互容器 ---- */
538
+ /* 真机无默认圆角;圆角只由 DSL/RAW corner_radius 内联输出(见 resolveCornerRadius)。 */
538
539
  .universal-card-interactive-container {
539
540
  display: flex; flex-direction: column; box-sizing: border-box;
540
- border-radius: 6px; padding: 0; text-decoration: none; color: inherit;
541
+ padding: 0; text-decoration: none; color: inherit;
541
542
  row-gap: 4px;
542
543
  transition: background-color .1s;
543
544
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-feishu-card/renderer",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "零框架依赖的飞书卡片渲染引擎:Web / DOM / SSR,输入 RAW 或公开 DSL,输出真实 DOM 或 HTML 字符串",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",