@open-feishu-card/adapter 0.3.13 → 0.3.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/index.cjs +8 -1
- package/dist/index.js +8 -1
- package/dist/raw-to-dsl.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1732,7 +1732,14 @@ function unwrap(node, ctx) {
|
|
|
1732
1732
|
const tp = isRecord3(text.property) ? text.property : {};
|
|
1733
1733
|
const content = typeof tp.content === "string" ? tp.content : "";
|
|
1734
1734
|
const textAlign = typeof tp.textAlign === "string" ? tp.textAlign : "left";
|
|
1735
|
-
|
|
1735
|
+
const outText = { tag: "plain_text", content, text_align: textAlign };
|
|
1736
|
+
const ts = isRecord3(tp.textStyle) ? tp.textStyle : void 0;
|
|
1737
|
+
if (ts && typeof ts.size === "string") outText.text_size = ts.size;
|
|
1738
|
+
const { color } = resolveInlineStyle(ts, ctx);
|
|
1739
|
+
if (color) outText.text_color = color;
|
|
1740
|
+
out.text = outText;
|
|
1741
|
+
if (isRecord3(property.margin) && hasSide(property.margin)) out.margin = formatBox(property.margin);
|
|
1742
|
+
else if (typeof property.margin === "string") out.margin = property.margin;
|
|
1736
1743
|
if (isRecord3(property.icon)) {
|
|
1737
1744
|
out.icon = unwrap(property.icon, ctx);
|
|
1738
1745
|
}
|
package/dist/index.js
CHANGED
|
@@ -1730,7 +1730,14 @@ function unwrap(node, ctx) {
|
|
|
1730
1730
|
const tp = isRecord3(text.property) ? text.property : {};
|
|
1731
1731
|
const content = typeof tp.content === "string" ? tp.content : "";
|
|
1732
1732
|
const textAlign = typeof tp.textAlign === "string" ? tp.textAlign : "left";
|
|
1733
|
-
|
|
1733
|
+
const outText = { tag: "plain_text", content, text_align: textAlign };
|
|
1734
|
+
const ts = isRecord3(tp.textStyle) ? tp.textStyle : void 0;
|
|
1735
|
+
if (ts && typeof ts.size === "string") outText.text_size = ts.size;
|
|
1736
|
+
const { color } = resolveInlineStyle(ts, ctx);
|
|
1737
|
+
if (color) outText.text_color = color;
|
|
1738
|
+
out.text = outText;
|
|
1739
|
+
if (isRecord3(property.margin) && hasSide(property.margin)) out.margin = formatBox(property.margin);
|
|
1740
|
+
else if (typeof property.margin === "string") out.margin = property.margin;
|
|
1734
1741
|
if (isRecord3(property.icon)) {
|
|
1735
1742
|
out.icon = unwrap(property.icon, ctx);
|
|
1736
1743
|
}
|
package/dist/raw-to-dsl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raw-to-dsl.d.ts","sourceRoot":"","sources":["../src/raw-to-dsl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAwBH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAIzD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAcvD;
|
|
1
|
+
{"version":3,"file":"raw-to-dsl.d.ts","sourceRoot":"","sources":["../src/raw-to-dsl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAwBH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAIzD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAcvD;AA8rDD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CA8C9C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGnF"}
|