@supernova-studio/client 0.48.34 → 0.48.36
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
|
@@ -781,10 +781,6 @@ var ContentLoaderPayload = _zod.z.object({
|
|
|
781
781
|
location: _zod.z.string()
|
|
782
782
|
})
|
|
783
783
|
);
|
|
784
|
-
function slugify(str, options) {
|
|
785
|
-
const slug = _slugify2.default.call(void 0, _nullishCoalesce(str, () => ( "")), options);
|
|
786
|
-
return _optionalChain([slug, 'optionalAccess', _2 => _2.length]) > 0 ? slug : "item";
|
|
787
|
-
}
|
|
788
784
|
var RESERVED_SLUGS = [
|
|
789
785
|
"workspaces",
|
|
790
786
|
"workspace",
|
|
@@ -4100,7 +4096,7 @@ var IntegrationToken = _zod.z.object({
|
|
|
4100
4096
|
token_bitbucket_username: _zod.z.string().optional(),
|
|
4101
4097
|
// Bitbucket only
|
|
4102
4098
|
custom_url: _zod.z.string().optional().transform((value) => {
|
|
4103
|
-
if (!_optionalChain([value, 'optionalAccess',
|
|
4099
|
+
if (!_optionalChain([value, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]))
|
|
4104
4100
|
return void 0;
|
|
4105
4101
|
return formatCustomUrl(value);
|
|
4106
4102
|
})
|
|
@@ -4420,7 +4416,7 @@ var CreateWorkspaceInput = _zod.z.object({
|
|
|
4420
4416
|
product: ProductCodeSchema,
|
|
4421
4417
|
priceId: _zod.z.string(),
|
|
4422
4418
|
billingEmail: _zod.z.string().email().optional(),
|
|
4423
|
-
handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess',
|
|
4419
|
+
handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _4 => _4.length]) > 0).optional(),
|
|
4424
4420
|
invites: UserInvites.optional(),
|
|
4425
4421
|
promoCode: _zod.z.string().optional(),
|
|
4426
4422
|
status: InternalStatusSchema.optional(),
|
|
@@ -4519,12 +4515,12 @@ function buildDocPagePublishPaths(groups, pages, routingVersion) {
|
|
|
4519
4515
|
for (const page of pages) {
|
|
4520
4516
|
const parentChain = calculateElementParentChain(page.parentPersistentId, groupPersistentIdToGroupMap);
|
|
4521
4517
|
let pathV1 = `${page.userSlug || page.slug}.html`;
|
|
4522
|
-
let pathV2 = `${
|
|
4518
|
+
let pathV2 = `${page.slug}-${page.shortPersistentId}`;
|
|
4523
4519
|
for (const parent of parentChain) {
|
|
4524
4520
|
if (!parent.parentPersistentId)
|
|
4525
4521
|
continue;
|
|
4526
|
-
pathV1 = `${parent.userSlug || parent.slug}/${pathV1}`;
|
|
4527
|
-
pathV2 = `${
|
|
4522
|
+
pathV1 = `${parent.userSlug || parent.slug || "root"}/${pathV1}`;
|
|
4523
|
+
pathV2 = `${parent.slug || "root"}/${pathV2}`;
|
|
4528
4524
|
}
|
|
4529
4525
|
pathV1 = `/${pathV1}`;
|
|
4530
4526
|
pathV2 = `/${pathV2}`;
|
|
@@ -4543,7 +4539,7 @@ function calculateElementParentChain(elementParentPersistentId, groupPersistentI
|
|
|
4543
4539
|
const parent = groupPersistentIdToGroupMap.get(parentId);
|
|
4544
4540
|
if (parent)
|
|
4545
4541
|
result.push(parent);
|
|
4546
|
-
parentId = _optionalChain([parent, 'optionalAccess',
|
|
4542
|
+
parentId = _optionalChain([parent, 'optionalAccess', _5 => _5.parentPersistentId]);
|
|
4547
4543
|
}
|
|
4548
4544
|
return result;
|
|
4549
4545
|
}
|
|
@@ -4552,7 +4548,7 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
|
|
|
4552
4548
|
...group,
|
|
4553
4549
|
data: {
|
|
4554
4550
|
...group.data,
|
|
4555
|
-
configuration: _nullishCoalesce(_optionalChain([group, 'access',
|
|
4551
|
+
configuration: _nullishCoalesce(_optionalChain([group, 'access', _6 => _6.data, 'optionalAccess', _7 => _7.configuration]), () => ( getDefaultItemConfiguration()))
|
|
4556
4552
|
}
|
|
4557
4553
|
}));
|
|
4558
4554
|
const groupPersistentIdToGroupMap = mapByUnique(fixedGroups, (group) => group.persistentId);
|
|
@@ -4564,8 +4560,8 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
|
|
|
4564
4560
|
const parent = groupPersistentIdToGroupMap.get(nextParentId);
|
|
4565
4561
|
if (!parent)
|
|
4566
4562
|
break;
|
|
4567
|
-
isHidden = isHidden || _optionalChain([parent, 'access',
|
|
4568
|
-
isPrivate = isPrivate || _optionalChain([parent, 'access',
|
|
4563
|
+
isHidden = isHidden || _optionalChain([parent, 'access', _8 => _8.data, 'optionalAccess', _9 => _9.configuration, 'optionalAccess', _10 => _10.isHidden]) || false;
|
|
4564
|
+
isPrivate = isPrivate || _optionalChain([parent, 'access', _11 => _11.data, 'optionalAccess', _12 => _12.configuration, 'optionalAccess', _13 => _13.isPrivate]) || false;
|
|
4569
4565
|
nextParentId = parent.parentPersistentId;
|
|
4570
4566
|
}
|
|
4571
4567
|
groupToFix.data.configuration.isHidden = isHidden;
|
|
@@ -4573,7 +4569,7 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
|
|
|
4573
4569
|
}
|
|
4574
4570
|
const fixedPages = [];
|
|
4575
4571
|
for (const page of pages) {
|
|
4576
|
-
const configuration = _nullishCoalesce(_optionalChain([page, 'access',
|
|
4572
|
+
const configuration = _nullishCoalesce(_optionalChain([page, 'access', _14 => _14.data, 'optionalAccess', _15 => _15.configuration]), () => ( getDefaultItemConfiguration()));
|
|
4577
4573
|
const parent = groupPersistentIdToGroupMap.get(page.parentPersistentId);
|
|
4578
4574
|
fixedPages.push({
|
|
4579
4575
|
...page,
|
|
@@ -4581,8 +4577,8 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
|
|
|
4581
4577
|
...page.data,
|
|
4582
4578
|
configuration: {
|
|
4583
4579
|
...configuration,
|
|
4584
|
-
isHidden: configuration.isHidden || _optionalChain([parent, 'optionalAccess',
|
|
4585
|
-
isPrivate: configuration.isPrivate || _optionalChain([parent, 'optionalAccess',
|
|
4580
|
+
isHidden: configuration.isHidden || _optionalChain([parent, 'optionalAccess', _16 => _16.data, 'optionalAccess', _17 => _17.configuration, 'optionalAccess', _18 => _18.isHidden]) || false,
|
|
4581
|
+
isPrivate: configuration.isPrivate || _optionalChain([parent, 'optionalAccess', _19 => _19.data, 'optionalAccess', _20 => _20.configuration, 'optionalAccess', _21 => _21.isPrivate]) || false
|
|
4586
4582
|
}
|
|
4587
4583
|
}
|
|
4588
4584
|
});
|
|
@@ -4600,7 +4596,7 @@ function elementGroupsToDocumentationGroupDTOV1(groups, pages) {
|
|
|
4600
4596
|
return groups.map((group) => {
|
|
4601
4597
|
return {
|
|
4602
4598
|
...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
|
|
4603
|
-
configuration: documentationItemConfigurationToDTOV1(_optionalChain([group, 'access',
|
|
4599
|
+
configuration: documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _22 => _22.data, 'optionalAccess', _23 => _23.configuration]))
|
|
4604
4600
|
};
|
|
4605
4601
|
});
|
|
4606
4602
|
}
|
|
@@ -4608,7 +4604,7 @@ function elementGroupsToDocumentationGroupFixedConfigurationDTOV1(groups, pages)
|
|
|
4608
4604
|
const childrenIdsMap = calculateChildrenIdsMapV1(pages, groups);
|
|
4609
4605
|
const { groups: fixedGroups } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV1);
|
|
4610
4606
|
return fixedGroups.map((group) => {
|
|
4611
|
-
const configuration = documentationItemConfigurationToDTOV1(_optionalChain([group, 'access',
|
|
4607
|
+
const configuration = documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _24 => _24.data, 'optionalAccess', _25 => _25.configuration]));
|
|
4612
4608
|
return {
|
|
4613
4609
|
...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
|
|
4614
4610
|
// backward compatibility with custom doc exporters, anyway these groups will not be shown, so we can adjust title
|
|
@@ -4633,7 +4629,7 @@ function elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap) {
|
|
|
4633
4629
|
title: group.meta.name,
|
|
4634
4630
|
childrenIds,
|
|
4635
4631
|
isRoot: !group.parentPersistentId,
|
|
4636
|
-
groupBehavior: _nullishCoalesce(_optionalChain([group, 'access',
|
|
4632
|
+
groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _26 => _26.data, 'optionalAccess', _27 => _27.behavior]), () => ( "Group")),
|
|
4637
4633
|
shortPersistentId: group.shortPersistentId,
|
|
4638
4634
|
type: "Group"
|
|
4639
4635
|
};
|
|
@@ -4702,10 +4698,10 @@ function elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap) {
|
|
|
4702
4698
|
createdAt: group.createdAt,
|
|
4703
4699
|
updatedAt: group.updatedAt,
|
|
4704
4700
|
title: group.meta.name,
|
|
4705
|
-
configuration: documentationItemConfigurationToDTOV2(_optionalChain([group, 'optionalAccess',
|
|
4701
|
+
configuration: documentationItemConfigurationToDTOV2(_optionalChain([group, 'optionalAccess', _28 => _28.data, 'optionalAccess', _29 => _29.configuration])),
|
|
4706
4702
|
childrenIds,
|
|
4707
4703
|
isRoot: !group.parentPersistentId,
|
|
4708
|
-
groupBehavior: _nullishCoalesce(_optionalChain([group, 'access',
|
|
4704
|
+
groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.behavior]), () => ( "Group")),
|
|
4709
4705
|
shortPersistentId: group.shortPersistentId,
|
|
4710
4706
|
type: "Group"
|
|
4711
4707
|
};
|
|
@@ -4858,7 +4854,7 @@ function integrationToDto(integration) {
|
|
|
4858
4854
|
workspaceId: integration.workspaceId,
|
|
4859
4855
|
type: integration.type,
|
|
4860
4856
|
createdAt: integration.createdAt,
|
|
4861
|
-
integrationCredentials: _optionalChain([integration, 'access',
|
|
4857
|
+
integrationCredentials: _optionalChain([integration, 'access', _32 => _32.integrationCredentials, 'optionalAccess', _33 => _33.map, 'call', _34 => _34(integrationCredentialToDto)]),
|
|
4862
4858
|
integrationDesignSystems: _nullishCoalesce(integration.integrationDesignSystems, () => ( void 0))
|
|
4863
4859
|
};
|
|
4864
4860
|
}
|
|
@@ -6503,7 +6499,7 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6503
6499
|
if (snapshot) {
|
|
6504
6500
|
publishedState = this.itemStateFromPage(snapshot.page, snapshot.pageContentHash);
|
|
6505
6501
|
}
|
|
6506
|
-
const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess',
|
|
6502
|
+
const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _35 => _35.pageContentHash]))), () => ( ""));
|
|
6507
6503
|
const currentState = this.itemStateFromPage(page, currentPageContentHash);
|
|
6508
6504
|
const draftState = this.createDraftState(page.persistentId, currentState, publishedState);
|
|
6509
6505
|
if (draftState)
|
|
@@ -6585,7 +6581,7 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6585
6581
|
itemStateFromGroup(group) {
|
|
6586
6582
|
return {
|
|
6587
6583
|
title: group.meta.name,
|
|
6588
|
-
configuration: _nullishCoalesce(_optionalChain([group, 'access',
|
|
6584
|
+
configuration: _nullishCoalesce(_optionalChain([group, 'access', _36 => _36.data, 'optionalAccess', _37 => _37.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
|
|
6589
6585
|
contentHash: "-"
|
|
6590
6586
|
};
|
|
6591
6587
|
}
|
|
@@ -6698,7 +6694,7 @@ var DTODocumentationPageRoomHeaderDataUpdate = _zod.z.object({
|
|
|
6698
6694
|
function itemConfigurationToYjs(yDoc, item) {
|
|
6699
6695
|
yDoc.transact((trx) => {
|
|
6700
6696
|
const { title, configuration } = item;
|
|
6701
|
-
const header = _optionalChain([configuration, 'optionalAccess',
|
|
6697
|
+
const header = _optionalChain([configuration, 'optionalAccess', _38 => _38.header]);
|
|
6702
6698
|
if (title !== void 0) {
|
|
6703
6699
|
const headerYMap = trx.doc.getMap("itemTitle");
|
|
6704
6700
|
headerYMap.set("title", title);
|
|
@@ -6716,9 +6712,9 @@ function itemConfigurationToYjs(yDoc, item) {
|
|
|
6716
6712
|
header.minHeight !== void 0 && headerYMap.set("minHeight", header.minHeight);
|
|
6717
6713
|
}
|
|
6718
6714
|
const configYMap = trx.doc.getMap("itemConfiguration");
|
|
6719
|
-
_optionalChain([configuration, 'optionalAccess',
|
|
6720
|
-
_optionalChain([configuration, 'optionalAccess',
|
|
6721
|
-
_optionalChain([configuration, 'optionalAccess',
|
|
6715
|
+
_optionalChain([configuration, 'optionalAccess', _39 => _39.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
|
|
6716
|
+
_optionalChain([configuration, 'optionalAccess', _40 => _40.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
|
|
6717
|
+
_optionalChain([configuration, 'optionalAccess', _41 => _41.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
|
|
6722
6718
|
});
|
|
6723
6719
|
}
|
|
6724
6720
|
function yjsToItemConfiguration(yDoc) {
|
|
@@ -7430,7 +7426,7 @@ var ListTreeBuilder = class {
|
|
|
7430
7426
|
}
|
|
7431
7427
|
addWithProperty(block, multiRichTextProperty) {
|
|
7432
7428
|
const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
|
|
7433
|
-
return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess',
|
|
7429
|
+
return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _42 => _42.multiRichTextStyle]) || "OL");
|
|
7434
7430
|
}
|
|
7435
7431
|
add(block, multiRichTextPropertyId, multiRichTextPropertyStyle) {
|
|
7436
7432
|
const list = this.createList(block, multiRichTextPropertyId, multiRichTextPropertyStyle);
|
|
@@ -7450,7 +7446,7 @@ var ListTreeBuilder = class {
|
|
|
7450
7446
|
}
|
|
7451
7447
|
const listParent = this.getParentOfDepth(block.data.indentLevel);
|
|
7452
7448
|
const lastChild = listParent.children[listParent.children.length - 1];
|
|
7453
|
-
if (_optionalChain([lastChild, 'optionalAccess',
|
|
7449
|
+
if (_optionalChain([lastChild, 'optionalAccess', _43 => _43.type]) === "List") {
|
|
7454
7450
|
lastChild.children.push(...list.leadingChildren);
|
|
7455
7451
|
return;
|
|
7456
7452
|
} else {
|
|
@@ -7637,7 +7633,7 @@ function serializeAsRichTextBlock(input) {
|
|
|
7637
7633
|
const textPropertyValue = BlockParsingUtils.richTextPropertyValue(blockItem, richTextProperty.id);
|
|
7638
7634
|
const enrichedInput = { ...input, richTextPropertyValue: textPropertyValue };
|
|
7639
7635
|
const parsedOptions = PageBlockDefinitionRichTextOptions.optional().parse(richTextProperty.options);
|
|
7640
|
-
const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess',
|
|
7636
|
+
const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _44 => _44.richTextStyle]), () => ( "Default"));
|
|
7641
7637
|
switch (style) {
|
|
7642
7638
|
case "Callout":
|
|
7643
7639
|
return serializeAsCallout(enrichedInput);
|
|
@@ -7859,7 +7855,7 @@ function serializeBlockNodeAttributes(block) {
|
|
|
7859
7855
|
};
|
|
7860
7856
|
}
|
|
7861
7857
|
function richTextHeadingLevel(property) {
|
|
7862
|
-
const style = _optionalChain([property, 'access',
|
|
7858
|
+
const style = _optionalChain([property, 'access', _45 => _45.options, 'optionalAccess', _46 => _46.richTextStyle]);
|
|
7863
7859
|
if (!style)
|
|
7864
7860
|
return void 0;
|
|
7865
7861
|
switch (style) {
|
|
@@ -7980,7 +7976,7 @@ function serializeAsCustomBlock(block, definition) {
|
|
|
7980
7976
|
linksTo: i.linksTo
|
|
7981
7977
|
};
|
|
7982
7978
|
});
|
|
7983
|
-
const columns = _optionalChain([block, 'access',
|
|
7979
|
+
const columns = _optionalChain([block, 'access', _47 => _47.data, 'access', _48 => _48.appearance, 'optionalAccess', _49 => _49.numberOfColumns]);
|
|
7984
7980
|
return {
|
|
7985
7981
|
type: serializeCustomBlockNodeType(block, definition),
|
|
7986
7982
|
attrs: {
|
|
@@ -10600,10 +10596,10 @@ function parseAsMultiRichText(prosemirrorNode, definition, property, definitions
|
|
|
10600
10596
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
10601
10597
|
const result = [];
|
|
10602
10598
|
const listItems = [];
|
|
10603
|
-
_optionalChain([prosemirrorNode, 'access',
|
|
10599
|
+
_optionalChain([prosemirrorNode, 'access', _50 => _50.content, 'optionalAccess', _51 => _51.forEach, 'call', _52 => _52((c) => {
|
|
10604
10600
|
if (c.type !== "listItem")
|
|
10605
10601
|
return;
|
|
10606
|
-
_optionalChain([c, 'access',
|
|
10602
|
+
_optionalChain([c, 'access', _53 => _53.content, 'optionalAccess', _54 => _54.forEach, 'call', _55 => _55((cc) => {
|
|
10607
10603
|
listItems.push(cc);
|
|
10608
10604
|
})]);
|
|
10609
10605
|
})]);
|
|
@@ -10719,17 +10715,17 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
10719
10715
|
return null;
|
|
10720
10716
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
10721
10717
|
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", _zod.z.boolean().optional()) !== false;
|
|
10722
|
-
const tableChild = _optionalChain([prosemirrorNode, 'access',
|
|
10718
|
+
const tableChild = _optionalChain([prosemirrorNode, 'access', _56 => _56.content, 'optionalAccess', _57 => _57.find, 'call', _58 => _58((c) => c.type === "table")]);
|
|
10723
10719
|
if (!tableChild) {
|
|
10724
10720
|
return emptyTable(id, variantId, 0);
|
|
10725
10721
|
}
|
|
10726
|
-
const rows = _nullishCoalesce(_optionalChain([tableChild, 'access',
|
|
10722
|
+
const rows = _nullishCoalesce(_optionalChain([tableChild, 'access', _59 => _59.content, 'optionalAccess', _60 => _60.filter, 'call', _61 => _61((c) => c.type === "tableRow" && !!_optionalChain([c, 'access', _62 => _62.content, 'optionalAccess', _63 => _63.length]))]), () => ( []));
|
|
10727
10723
|
if (!rows.length) {
|
|
10728
10724
|
return emptyTable(id, variantId, 0);
|
|
10729
10725
|
}
|
|
10730
|
-
const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access',
|
|
10731
|
-
const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access',
|
|
10732
|
-
const hasHeaderRow = _optionalChain([rows, 'access',
|
|
10726
|
+
const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access', _64 => _64[0], 'access', _65 => _65.content, 'optionalAccess', _66 => _66.filter, 'call', _67 => _67((c) => c.type === "tableHeader"), 'access', _68 => _68.length]), () => ( 0));
|
|
10727
|
+
const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _69 => _69.content, 'optionalAccess', _70 => _70[0], 'optionalAccess', _71 => _71.type]) === "tableHeader").length;
|
|
10728
|
+
const hasHeaderRow = _optionalChain([rows, 'access', _72 => _72[0], 'access', _73 => _73.content, 'optionalAccess', _74 => _74.length]) === rowHeaderCells;
|
|
10733
10729
|
const hasHeaderColumn = rows.length === columnHeaderCells;
|
|
10734
10730
|
const tableValue = {
|
|
10735
10731
|
showBorder: hasBorder,
|
|
@@ -10811,7 +10807,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
10811
10807
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
10812
10808
|
if (!parsedItems.success)
|
|
10813
10809
|
return null;
|
|
10814
|
-
const rawImagePropertyValue = _optionalChain([parsedItems, 'access',
|
|
10810
|
+
const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _75 => _75.data, 'access', _76 => _76[0], 'optionalAccess', _77 => _77.props, 'access', _78 => _78.image]);
|
|
10815
10811
|
if (!rawImagePropertyValue)
|
|
10816
10812
|
return null;
|
|
10817
10813
|
const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
|
|
@@ -11047,7 +11043,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
|
11047
11043
|
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
|
|
11048
11044
|
}
|
|
11049
11045
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
11050
|
-
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access',
|
|
11046
|
+
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _79 => _79.attrs, 'optionalAccess', _80 => _80[attributeName]]));
|
|
11051
11047
|
if (parsedAttr.success) {
|
|
11052
11048
|
return parsedAttr.data;
|
|
11053
11049
|
} else {
|