@supernova-studio/client 0.47.36 → 0.47.37
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.js
CHANGED
|
@@ -9220,9 +9220,13 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
9220
9220
|
return null;
|
|
9221
9221
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
9222
9222
|
const appearance = parseAppearance(prosemirrorNode);
|
|
9223
|
-
const parsedItems = parseBlockItems(prosemirrorNode, definition);
|
|
9224
|
-
if (!parsedItems)
|
|
9225
|
-
|
|
9223
|
+
const parsedItems = _nullishCoalesce(parseBlockItems(prosemirrorNode, definition), () => ( []));
|
|
9224
|
+
if (!parsedItems.length && _optionalChain([definition, 'access', _76 => _76.behavior, 'access', _77 => _77.items, 'optionalAccess', _78 => _78.numberOfItems]) === 1) {
|
|
9225
|
+
parsedItems.push({
|
|
9226
|
+
id,
|
|
9227
|
+
props: {}
|
|
9228
|
+
});
|
|
9229
|
+
}
|
|
9226
9230
|
return {
|
|
9227
9231
|
id,
|
|
9228
9232
|
type: "Block",
|
|
@@ -9361,7 +9365,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
|
9361
9365
|
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
|
|
9362
9366
|
}
|
|
9363
9367
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
9364
|
-
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access',
|
|
9368
|
+
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _79 => _79.attrs, 'optionalAccess', _80 => _80[attributeName]]));
|
|
9365
9369
|
if (parsedAttr.success) {
|
|
9366
9370
|
return parsedAttr.data;
|
|
9367
9371
|
} else {
|