@bettercms-ai/sdk 1.35.0 → 1.36.0
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 +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -61,6 +61,7 @@ __export(index_exports, {
|
|
|
61
61
|
deletePage: () => deletePage,
|
|
62
62
|
deleteSubmission: () => deleteSubmission,
|
|
63
63
|
deleteWorkspace: () => deleteWorkspace,
|
|
64
|
+
embeds: () => embeds,
|
|
64
65
|
encodeStega: () => encodeStega,
|
|
65
66
|
entrySeoInput: () => entrySeoInput,
|
|
66
67
|
formInitialValues: () => formInitialValues,
|
|
@@ -1585,6 +1586,11 @@ function portableText(value) {
|
|
|
1585
1586
|
const v = value;
|
|
1586
1587
|
return v.format === PORTABLE_TEXT_FORMAT && Array.isArray(v.value) ? v.value : null;
|
|
1587
1588
|
}
|
|
1589
|
+
function embeds(value) {
|
|
1590
|
+
if (!isRichText(value)) return null;
|
|
1591
|
+
const e = value.embeds;
|
|
1592
|
+
return typeof e === "object" && e !== null && typeof e.cards === "object" && e.cards !== null ? e : null;
|
|
1593
|
+
}
|
|
1588
1594
|
function isRichText(value) {
|
|
1589
1595
|
return typeof value === "object" && value !== null && !Array.isArray(value) && ("html" in value || "format" in value);
|
|
1590
1596
|
}
|
|
@@ -2134,6 +2140,7 @@ function inEditor(win = globalThis.window) {
|
|
|
2134
2140
|
deletePage,
|
|
2135
2141
|
deleteSubmission,
|
|
2136
2142
|
deleteWorkspace,
|
|
2143
|
+
embeds,
|
|
2137
2144
|
encodeStega,
|
|
2138
2145
|
entrySeoInput,
|
|
2139
2146
|
formInitialValues,
|