@open-feishu-card/renderer 0.3.2 → 0.3.3

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 CHANGED
@@ -742,7 +742,7 @@ function resolveURL(url) {
742
742
  if (typeof url === "string") return url;
743
743
  if (typeof url === "object") {
744
744
  const u = url;
745
- return u.pcURL || u.url || u.iosURL || u.androidURL || u.harmonyURL || "";
745
+ return u.pcURL || u.pc_url || u.url || u.iosURL || u.ios_url || u.androidURL || u.android_url || u.harmonyURL || u.harmony_url || "";
746
746
  }
747
747
  return "";
748
748
  }
@@ -6265,7 +6265,8 @@ function registerBuiltins() {
6265
6265
  const fromList = (list) => {
6266
6266
  if (!Array.isArray(list)) return null;
6267
6267
  for (const item of list) {
6268
- if (!isRecord(item) || item.type !== "callback") continue;
6268
+ if (!isRecord(item)) continue;
6269
+ if (item.type !== "callback" && item.type !== "action_request") continue;
6269
6270
  const inner = isRecord(item.action) ? item.action : item;
6270
6271
  if (isRecord(inner.value)) return inner.value;
6271
6272
  }
package/dist/index.js CHANGED
@@ -741,7 +741,7 @@ function resolveURL(url) {
741
741
  if (typeof url === "string") return url;
742
742
  if (typeof url === "object") {
743
743
  const u = url;
744
- return u.pcURL || u.url || u.iosURL || u.androidURL || u.harmonyURL || "";
744
+ return u.pcURL || u.pc_url || u.url || u.iosURL || u.ios_url || u.androidURL || u.android_url || u.harmonyURL || u.harmony_url || "";
745
745
  }
746
746
  return "";
747
747
  }
@@ -6264,7 +6264,8 @@ function registerBuiltins() {
6264
6264
  const fromList = (list) => {
6265
6265
  if (!Array.isArray(list)) return null;
6266
6266
  for (const item of list) {
6267
- if (!isRecord(item) || item.type !== "callback") continue;
6267
+ if (!isRecord(item)) continue;
6268
+ if (item.type !== "callback" && item.type !== "action_request") continue;
6268
6269
  const inner = isRecord(item.action) ? item.action : item;
6269
6270
  if (isRecord(inner.value)) return inner.value;
6270
6271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-feishu-card/renderer",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
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.18"
31
+ "@open-feishu-card/adapter": "0.3.19"
32
32
  },
33
33
  "devDependencies": {
34
34
  "tsup": "^8.3.5",