@open-feishu-card/adapter 0.3.19 → 0.3.20

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
@@ -818,10 +818,12 @@ function convertEl(el, colors) {
818
818
  }
819
819
  }
820
820
  if (tag === "video") {
821
- const cover = el.image_key ?? el.cover_image_key ?? el.coverImageID;
821
+ const nestedCover = isRecord2(el.cover) ? el.cover.img_key : void 0;
822
+ const cover = nestedCover ?? el.image_key ?? el.cover_image_key ?? el.coverImageID;
822
823
  if (typeof cover === "string" && cover) property.coverImageID = cover;
823
824
  delete property.image_key;
824
825
  delete property.cover_image_key;
826
+ delete property.cover;
825
827
  }
826
828
  return withRawElementId(el, { tag, property });
827
829
  }
package/dist/index.js CHANGED
@@ -816,10 +816,12 @@ function convertEl(el, colors) {
816
816
  }
817
817
  }
818
818
  if (tag === "video") {
819
- const cover = el.image_key ?? el.cover_image_key ?? el.coverImageID;
819
+ const nestedCover = isRecord2(el.cover) ? el.cover.img_key : void 0;
820
+ const cover = nestedCover ?? el.image_key ?? el.cover_image_key ?? el.coverImageID;
820
821
  if (typeof cover === "string" && cover) property.coverImageID = cover;
821
822
  delete property.image_key;
822
823
  delete property.cover_image_key;
824
+ delete property.cover;
823
825
  }
824
826
  return withRawElementId(el, { tag, property });
825
827
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-feishu-card/adapter",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "公开 DSL 与飞书内部 RAW JSON 的双向适配器;raw→DSL 对齐 feishu-raw-card-to-dsl",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -22,7 +22,7 @@
22
22
  "tsx": "^4.19.3",
23
23
  "typescript": "^7.0.2",
24
24
  "vitest": "^2.1.9",
25
- "@open-feishu-card/schema": "0.1.9"
25
+ "@open-feishu-card/schema": "0.1.10"
26
26
  },
27
27
  "license": "MIT",
28
28
  "publishConfig": {