@supernova-studio/client 0.0.15 → 0.1.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.d.mts +123 -110
- package/dist/index.d.ts +123 -110
- package/dist/index.js +137 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +131 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
- package/src/docs-editor/blocks-to-prosemirror.ts +130 -34
- package/src/docs-editor/mock.ts +14 -14
- package/src/docs-editor/utils.ts +21 -9
package/dist/index.js
CHANGED
|
@@ -863,8 +863,18 @@ var PageBlockLinkType = _zod.z.enum(["Page", "PageHeading", "Group", "Url"]);
|
|
|
863
863
|
var PageBlockAppearanceV2 = _zod.z.object({
|
|
864
864
|
itemBackgroundColor: ColorValue
|
|
865
865
|
});
|
|
866
|
-
var
|
|
867
|
-
value: _zod.z.any()
|
|
866
|
+
var PageBlockItemUntypedPropertyValue = _zod.z.object({
|
|
867
|
+
value: _zod.z.any()
|
|
868
|
+
}).and(_zod.z.record(_zod.z.any()));
|
|
869
|
+
var PageBlockItemRichTextPropertyValue = _zod.z.object({
|
|
870
|
+
value: PageBlockText,
|
|
871
|
+
calloutType: PageBlockCalloutType.optional()
|
|
872
|
+
});
|
|
873
|
+
var PageBlockItemMultiRichTextPropertyValue = _zod.z.object({
|
|
874
|
+
value: PageBlockText.array()
|
|
875
|
+
});
|
|
876
|
+
var PageBlockItemTextPropertyValue = _zod.z.object({
|
|
877
|
+
value: _zod.z.string(),
|
|
868
878
|
calloutType: PageBlockCalloutType.optional()
|
|
869
879
|
});
|
|
870
880
|
var PageBlockLinkV2 = _zod.z.object({
|
|
@@ -878,7 +888,7 @@ var PageBlockLinkV2 = _zod.z.object({
|
|
|
878
888
|
var PageBlockItemV2 = _zod.z.object({
|
|
879
889
|
id: _zod.z.string(),
|
|
880
890
|
linksTo: PageBlockLinkV2.optional(),
|
|
881
|
-
props: _zod.z.record(
|
|
891
|
+
props: _zod.z.record(PageBlockItemUntypedPropertyValue)
|
|
882
892
|
});
|
|
883
893
|
var PageBlockDataV2 = _zod.z.object({
|
|
884
894
|
packageId: _zod.z.string(),
|
|
@@ -1806,6 +1816,7 @@ var PageBlockDefinitionVariant = _zod.z.object({
|
|
|
1806
1816
|
// ../model/src/dsm/documentation/block-definitions/item.ts
|
|
1807
1817
|
var PageBlockDefinitionPropertyType = _zod.z.enum([
|
|
1808
1818
|
"RichText",
|
|
1819
|
+
"MultiRichText",
|
|
1809
1820
|
"Text",
|
|
1810
1821
|
"Boolean",
|
|
1811
1822
|
"Number",
|
|
@@ -1836,10 +1847,9 @@ var PageBlockDefinitionRichTextPropertyStyle = _zod.z.enum([
|
|
|
1836
1847
|
"Title5",
|
|
1837
1848
|
"Quote",
|
|
1838
1849
|
"Callout",
|
|
1839
|
-
"OL",
|
|
1840
|
-
"UL",
|
|
1841
1850
|
"Default"
|
|
1842
1851
|
]);
|
|
1852
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = _zod.z.enum(["OL", "UL", "Default"]);
|
|
1843
1853
|
var PageBlockDefinitionTextPropertyStyle = _zod.z.enum([
|
|
1844
1854
|
"Title1",
|
|
1845
1855
|
"Title2",
|
|
@@ -1863,6 +1873,7 @@ var PageBlockDefinitionSingleSelectPropertyStyle = _zod.z.enum([
|
|
|
1863
1873
|
var PageBlockDefinitionMultiSelectPropertyStyle = _zod.z.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
1864
1874
|
var PageBlockDefinitionPropertyOptions = _zod.z.object({
|
|
1865
1875
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional(),
|
|
1876
|
+
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional(),
|
|
1866
1877
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
1867
1878
|
placeholder: _zod.z.string().optional()
|
|
1868
1879
|
}).and(_zod.z.record(_zod.z.any()));
|
|
@@ -3860,24 +3871,26 @@ var BlockParsingUtils = {
|
|
|
3860
3871
|
},
|
|
3861
3872
|
richTextPropertyValue(item, propertyKey) {
|
|
3862
3873
|
const objectValue = this.objectPropertyValue(item, propertyKey);
|
|
3863
|
-
const richText =
|
|
3874
|
+
const richText = PageBlockItemRichTextPropertyValue.parse(objectValue);
|
|
3875
|
+
return richText;
|
|
3876
|
+
},
|
|
3877
|
+
multiRichTextPropertyValue(item, propertyKey) {
|
|
3878
|
+
const objectValue = this.objectPropertyValue(item, propertyKey);
|
|
3879
|
+
const richText = PageBlockItemMultiRichTextPropertyValue.parse(objectValue);
|
|
3864
3880
|
return richText;
|
|
3865
3881
|
},
|
|
3866
3882
|
objectPropertyValue(item, propertyKey) {
|
|
3867
|
-
const value = this.
|
|
3883
|
+
const value = this.propertyValueOrThrow(item, propertyKey);
|
|
3868
3884
|
if (typeof value !== "object") {
|
|
3869
3885
|
throw new Error(`Value for property ${propertyKey} is expected to be an object, but instead is ${typeof value}`);
|
|
3870
3886
|
}
|
|
3871
3887
|
return value;
|
|
3872
3888
|
},
|
|
3873
|
-
|
|
3874
|
-
const value =
|
|
3889
|
+
propertyValueOrThrow(item, propertyKey) {
|
|
3890
|
+
const value = item.props[propertyKey];
|
|
3875
3891
|
if (!value)
|
|
3876
3892
|
throw new Error(`Property ${propertyKey} is not defined on block item`);
|
|
3877
3893
|
return value;
|
|
3878
|
-
},
|
|
3879
|
-
safePropertyValue(item, propertyKey) {
|
|
3880
|
-
return _nullishCoalesce(item.props[propertyKey], () => ( void 0));
|
|
3881
3894
|
}
|
|
3882
3895
|
};
|
|
3883
3896
|
var BlockDefinitionUtils = {
|
|
@@ -3887,6 +3900,12 @@ var BlockDefinitionUtils = {
|
|
|
3887
3900
|
return property;
|
|
3888
3901
|
return void 0;
|
|
3889
3902
|
},
|
|
3903
|
+
firstMultiRichTextProperty(definition) {
|
|
3904
|
+
const property = definition.item.properties.find((p) => p.type === "MultiRichText");
|
|
3905
|
+
if (property)
|
|
3906
|
+
return property;
|
|
3907
|
+
return void 0;
|
|
3908
|
+
},
|
|
3890
3909
|
firstTableProperty(definition) {
|
|
3891
3910
|
const property = definition.item.properties.find((p) => p.type === "RichText");
|
|
3892
3911
|
if (property)
|
|
@@ -3937,13 +3956,21 @@ function blockToProsemirrorNode(block, definition) {
|
|
|
3937
3956
|
return serializeAsRichTextBlock({
|
|
3938
3957
|
block,
|
|
3939
3958
|
definition,
|
|
3940
|
-
richTextProperty
|
|
3959
|
+
property: richTextProperty
|
|
3960
|
+
});
|
|
3961
|
+
}
|
|
3962
|
+
const multiRichTextProperty = BlockDefinitionUtils.firstMultiRichTextProperty(definition);
|
|
3963
|
+
if (multiRichTextProperty) {
|
|
3964
|
+
return serializeAsMultiRichTextBlock({
|
|
3965
|
+
block,
|
|
3966
|
+
definition,
|
|
3967
|
+
property: multiRichTextProperty
|
|
3941
3968
|
});
|
|
3942
3969
|
}
|
|
3943
3970
|
return serializeAsCustomBlock(block, definition);
|
|
3944
3971
|
}
|
|
3945
3972
|
function serializeAsRichTextBlock(input) {
|
|
3946
|
-
const { block, definition, richTextProperty } = input;
|
|
3973
|
+
const { block, definition, property: richTextProperty } = input;
|
|
3947
3974
|
const blockItem = BlockParsingUtils.singleBlockItem(block);
|
|
3948
3975
|
const textPropertyValue = BlockParsingUtils.richTextPropertyValue(blockItem, richTextProperty.id);
|
|
3949
3976
|
const enrichedInput = { ...input, richTextPropertyValue: textPropertyValue };
|
|
@@ -3961,16 +3988,13 @@ function serializeAsRichTextBlock(input) {
|
|
|
3961
3988
|
case "Title4":
|
|
3962
3989
|
case "Title5":
|
|
3963
3990
|
return serializeAsHeading(enrichedInput);
|
|
3964
|
-
case "OL":
|
|
3965
|
-
case "UL":
|
|
3966
|
-
throw new Error(`Not allowed!`);
|
|
3967
3991
|
}
|
|
3968
3992
|
}
|
|
3969
3993
|
function serializeAsParagraph(input) {
|
|
3970
3994
|
return {
|
|
3971
3995
|
type: "paragraph",
|
|
3972
3996
|
attrs: serializeBlockNodeAttributes(input),
|
|
3973
|
-
content: serializeRichText(input.richTextPropertyValue)
|
|
3997
|
+
content: serializeRichText(input.richTextPropertyValue.value)
|
|
3974
3998
|
};
|
|
3975
3999
|
}
|
|
3976
4000
|
function serializeAsHeading(input) {
|
|
@@ -3978,27 +4002,81 @@ function serializeAsHeading(input) {
|
|
|
3978
4002
|
type: "heading",
|
|
3979
4003
|
attrs: {
|
|
3980
4004
|
...serializeBlockNodeAttributes(input),
|
|
3981
|
-
level: richTextHeadingLevel(input.
|
|
4005
|
+
level: richTextHeadingLevel(input.property)
|
|
3982
4006
|
},
|
|
3983
|
-
content: serializeRichText(input.richTextPropertyValue)
|
|
4007
|
+
content: serializeRichText(input.richTextPropertyValue.value)
|
|
3984
4008
|
};
|
|
3985
4009
|
}
|
|
3986
4010
|
function serializeAsBlockquote(input) {
|
|
3987
4011
|
return {
|
|
3988
4012
|
type: "blockquote",
|
|
3989
4013
|
attrs: serializeBlockNodeAttributes(input),
|
|
3990
|
-
content: serializeRichText(input.richTextPropertyValue)
|
|
4014
|
+
content: serializeRichText(input.richTextPropertyValue.value)
|
|
3991
4015
|
};
|
|
3992
4016
|
}
|
|
3993
4017
|
function serializeAsCallout(input) {
|
|
4018
|
+
const calloutType = _nullishCoalesce(input.richTextPropertyValue.calloutType, () => ( "Info"));
|
|
3994
4019
|
return {
|
|
3995
4020
|
type: "callout",
|
|
3996
4021
|
attrs: {
|
|
3997
4022
|
...serializeBlockNodeAttributes(input),
|
|
3998
|
-
|
|
3999
|
-
|
|
4023
|
+
type: serializeCalloutType(calloutType)
|
|
4024
|
+
},
|
|
4025
|
+
content: serializeRichText(input.richTextPropertyValue.value)
|
|
4026
|
+
};
|
|
4027
|
+
}
|
|
4028
|
+
function serializeAsMultiRichTextBlock(input) {
|
|
4029
|
+
const { block, definition, property: richTextProperty } = input;
|
|
4030
|
+
const blockItem = BlockParsingUtils.singleBlockItem(block);
|
|
4031
|
+
const textPropertyValue = BlockParsingUtils.multiRichTextPropertyValue(blockItem, richTextProperty.id);
|
|
4032
|
+
const enrichedInput = { ...input, multiRichTextPropertyValue: textPropertyValue };
|
|
4033
|
+
const style = _nullishCoalesce(_optionalChain([richTextProperty, 'access', _4 => _4.options, 'optionalAccess', _5 => _5.multiRichTextStyle]), () => ( "Default"));
|
|
4034
|
+
switch (style) {
|
|
4035
|
+
case "Default":
|
|
4036
|
+
return serializeAsMultiParagraph(enrichedInput);
|
|
4037
|
+
case "OL":
|
|
4038
|
+
return serializeAsOrderedList(enrichedInput);
|
|
4039
|
+
case "UL":
|
|
4040
|
+
return serializeAsUnorderedList(enrichedInput);
|
|
4041
|
+
}
|
|
4042
|
+
}
|
|
4043
|
+
function serializeAsMultiParagraph(input) {
|
|
4044
|
+
return {
|
|
4045
|
+
type: "bulletlist",
|
|
4046
|
+
attrs: {
|
|
4047
|
+
...serializeBlockNodeAttributes(input)
|
|
4048
|
+
},
|
|
4049
|
+
content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
|
|
4050
|
+
};
|
|
4051
|
+
}
|
|
4052
|
+
function serializeAsOrderedList(input) {
|
|
4053
|
+
return {
|
|
4054
|
+
type: "orderedlist",
|
|
4055
|
+
attrs: {
|
|
4056
|
+
...serializeBlockNodeAttributes(input),
|
|
4057
|
+
start: "1"
|
|
4000
4058
|
},
|
|
4001
|
-
content:
|
|
4059
|
+
content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
|
|
4060
|
+
};
|
|
4061
|
+
}
|
|
4062
|
+
function serializeAsUnorderedList(input) {
|
|
4063
|
+
return {
|
|
4064
|
+
type: "bulletlist",
|
|
4065
|
+
attrs: {
|
|
4066
|
+
...serializeBlockNodeAttributes(input)
|
|
4067
|
+
},
|
|
4068
|
+
content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
|
|
4069
|
+
};
|
|
4070
|
+
}
|
|
4071
|
+
function serializeAsListItem(text) {
|
|
4072
|
+
return {
|
|
4073
|
+
type: "listitem",
|
|
4074
|
+
content: [
|
|
4075
|
+
{
|
|
4076
|
+
type: "paragraph",
|
|
4077
|
+
content: serializeRichText(text)
|
|
4078
|
+
}
|
|
4079
|
+
]
|
|
4002
4080
|
};
|
|
4003
4081
|
}
|
|
4004
4082
|
function serializeBlockNodeAttributes(input) {
|
|
@@ -4006,11 +4084,11 @@ function serializeBlockNodeAttributes(input) {
|
|
|
4006
4084
|
return {
|
|
4007
4085
|
id: block.id,
|
|
4008
4086
|
definitionId: block.data.packageId,
|
|
4009
|
-
...
|
|
4087
|
+
...block.data.variantId && { variantId: block.data.variantId }
|
|
4010
4088
|
};
|
|
4011
4089
|
}
|
|
4012
4090
|
function richTextHeadingLevel(property) {
|
|
4013
|
-
const style = _optionalChain([property, 'access',
|
|
4091
|
+
const style = _optionalChain([property, 'access', _6 => _6.options, 'optionalAccess', _7 => _7.richTextStyle]);
|
|
4014
4092
|
if (!style)
|
|
4015
4093
|
return void 0;
|
|
4016
4094
|
switch (style) {
|
|
@@ -4024,14 +4102,24 @@ function richTextHeadingLevel(property) {
|
|
|
4024
4102
|
return 4;
|
|
4025
4103
|
case "Title5":
|
|
4026
4104
|
return 5;
|
|
4027
|
-
case "OL":
|
|
4028
|
-
case "UL":
|
|
4029
4105
|
case "Callout":
|
|
4030
4106
|
case "Default":
|
|
4031
4107
|
case "Quote":
|
|
4032
4108
|
return void 0;
|
|
4033
4109
|
}
|
|
4034
4110
|
}
|
|
4111
|
+
function serializeCalloutType(calloutType) {
|
|
4112
|
+
switch (calloutType) {
|
|
4113
|
+
case "Error":
|
|
4114
|
+
return "error";
|
|
4115
|
+
case "Info":
|
|
4116
|
+
return "neutral";
|
|
4117
|
+
case "Success":
|
|
4118
|
+
return "success";
|
|
4119
|
+
case "Warning":
|
|
4120
|
+
return "warning";
|
|
4121
|
+
}
|
|
4122
|
+
}
|
|
4035
4123
|
function serializeRichText(richText) {
|
|
4036
4124
|
return richText.spans.map(serializeTextSpan).flat();
|
|
4037
4125
|
}
|
|
@@ -4144,7 +4232,7 @@ var blocks = [
|
|
|
4144
4232
|
description: void 0,
|
|
4145
4233
|
options: {
|
|
4146
4234
|
placeholder: "Start writing with plain text",
|
|
4147
|
-
|
|
4235
|
+
richTextStyle: "Default"
|
|
4148
4236
|
},
|
|
4149
4237
|
variantOptions: void 0
|
|
4150
4238
|
}
|
|
@@ -4190,7 +4278,7 @@ var blocks = [
|
|
|
4190
4278
|
id: "text",
|
|
4191
4279
|
name: "Text",
|
|
4192
4280
|
type: "RichText",
|
|
4193
|
-
options: { placeholder: "Title 1",
|
|
4281
|
+
options: { placeholder: "Title 1", richTextStyle: "Title1" }
|
|
4194
4282
|
}
|
|
4195
4283
|
],
|
|
4196
4284
|
appearance: { isBordered: false, hasBackground: false },
|
|
@@ -4235,7 +4323,7 @@ var blocks = [
|
|
|
4235
4323
|
name: "Text",
|
|
4236
4324
|
type: "RichText",
|
|
4237
4325
|
description: void 0,
|
|
4238
|
-
options: { placeholder: "Title 2",
|
|
4326
|
+
options: { placeholder: "Title 2", richTextStyle: "Title2" },
|
|
4239
4327
|
variantOptions: void 0
|
|
4240
4328
|
}
|
|
4241
4329
|
],
|
|
@@ -4283,7 +4371,7 @@ var blocks = [
|
|
|
4283
4371
|
name: "Text",
|
|
4284
4372
|
type: "RichText",
|
|
4285
4373
|
description: void 0,
|
|
4286
|
-
options: { placeholder: "Title 3",
|
|
4374
|
+
options: { placeholder: "Title 3", richTextStyle: "Title3" },
|
|
4287
4375
|
variantOptions: void 0
|
|
4288
4376
|
}
|
|
4289
4377
|
],
|
|
@@ -4331,7 +4419,7 @@ var blocks = [
|
|
|
4331
4419
|
name: "Text",
|
|
4332
4420
|
type: "RichText",
|
|
4333
4421
|
description: void 0,
|
|
4334
|
-
options: { placeholder: "Title 4",
|
|
4422
|
+
options: { placeholder: "Title 4", richTextStyle: "Title4" },
|
|
4335
4423
|
variantOptions: void 0
|
|
4336
4424
|
}
|
|
4337
4425
|
],
|
|
@@ -4379,7 +4467,7 @@ var blocks = [
|
|
|
4379
4467
|
name: "Text",
|
|
4380
4468
|
type: "RichText",
|
|
4381
4469
|
description: void 0,
|
|
4382
|
-
options: { placeholder: "Title 5",
|
|
4470
|
+
options: { placeholder: "Title 5", richTextStyle: "Title5" },
|
|
4383
4471
|
variantOptions: void 0
|
|
4384
4472
|
}
|
|
4385
4473
|
],
|
|
@@ -4425,9 +4513,9 @@ var blocks = [
|
|
|
4425
4513
|
{
|
|
4426
4514
|
id: "text",
|
|
4427
4515
|
name: "Text",
|
|
4428
|
-
type: "
|
|
4516
|
+
type: "MultiRichText",
|
|
4429
4517
|
description: void 0,
|
|
4430
|
-
options: {
|
|
4518
|
+
options: { multiRichTextStyle: "OL" },
|
|
4431
4519
|
variantOptions: void 0
|
|
4432
4520
|
}
|
|
4433
4521
|
],
|
|
@@ -4473,9 +4561,9 @@ var blocks = [
|
|
|
4473
4561
|
{
|
|
4474
4562
|
id: "text",
|
|
4475
4563
|
name: "Text",
|
|
4476
|
-
type: "
|
|
4564
|
+
type: "MultiRichText",
|
|
4477
4565
|
description: void 0,
|
|
4478
|
-
options: {
|
|
4566
|
+
options: { multiRichTextStyle: "UL" },
|
|
4479
4567
|
variantOptions: void 0
|
|
4480
4568
|
}
|
|
4481
4569
|
],
|
|
@@ -4571,7 +4659,7 @@ var blocks = [
|
|
|
4571
4659
|
name: "Text",
|
|
4572
4660
|
type: "RichText",
|
|
4573
4661
|
description: void 0,
|
|
4574
|
-
options: { placeholder: "Empty quote",
|
|
4662
|
+
options: { placeholder: "Empty quote", richTextStyle: "Quote" },
|
|
4575
4663
|
variantOptions: void 0
|
|
4576
4664
|
}
|
|
4577
4665
|
],
|
|
@@ -4619,7 +4707,7 @@ var blocks = [
|
|
|
4619
4707
|
name: "Text",
|
|
4620
4708
|
type: "RichText",
|
|
4621
4709
|
description: void 0,
|
|
4622
|
-
options: {
|
|
4710
|
+
options: { richTextStyle: "Callout" },
|
|
4623
4711
|
variantOptions: void 0
|
|
4624
4712
|
}
|
|
4625
4713
|
],
|
|
@@ -4715,7 +4803,7 @@ var blocks = [
|
|
|
4715
4803
|
name: "Title",
|
|
4716
4804
|
type: "RichText",
|
|
4717
4805
|
description: void 0,
|
|
4718
|
-
options: {
|
|
4806
|
+
options: { textStyle: "Title5" },
|
|
4719
4807
|
variantOptions: void 0
|
|
4720
4808
|
},
|
|
4721
4809
|
{
|
|
@@ -4723,7 +4811,7 @@ var blocks = [
|
|
|
4723
4811
|
name: "Short description",
|
|
4724
4812
|
type: "RichText",
|
|
4725
4813
|
description: void 0,
|
|
4726
|
-
options: {
|
|
4814
|
+
options: { textStyle: "Default", color: "NeutralFaded" },
|
|
4727
4815
|
variantOptions: void 0
|
|
4728
4816
|
},
|
|
4729
4817
|
{
|
|
@@ -5498,7 +5586,7 @@ function prosemirrorDocToPage(prosemirrorDoc, definitions) {
|
|
|
5498
5586
|
const definitionsById = mapByUnique(definitions, (d) => d.id);
|
|
5499
5587
|
return {
|
|
5500
5588
|
blocks: (_nullishCoalesce(prosemirrorDoc.content, () => ( []))).map((prosemirrorNode) => {
|
|
5501
|
-
const definitionId = _optionalChain([prosemirrorNode, 'access',
|
|
5589
|
+
const definitionId = _optionalChain([prosemirrorNode, 'access', _8 => _8.attrs, 'optionalAccess', _9 => _9.definitionId]);
|
|
5502
5590
|
if (!definitionId)
|
|
5503
5591
|
throw new Error(`Node is missing defintion id`);
|
|
5504
5592
|
if (typeof definitionId !== "string")
|
|
@@ -5565,11 +5653,11 @@ function parseRichTextAttribute(mark) {
|
|
|
5565
5653
|
case "code":
|
|
5566
5654
|
return { type: "Code" };
|
|
5567
5655
|
case "link":
|
|
5568
|
-
const itemId = _optionalChain([mark, 'access',
|
|
5569
|
-
const href = _optionalChain([mark, 'access',
|
|
5656
|
+
const itemId = _optionalChain([mark, 'access', _10 => _10.attrs, 'optionalAccess', _11 => _11.itemId]);
|
|
5657
|
+
const href = _optionalChain([mark, 'access', _12 => _12.attrs, 'optionalAccess', _13 => _13.href]);
|
|
5570
5658
|
return {
|
|
5571
5659
|
type: "Link",
|
|
5572
|
-
openInNewWindow: _optionalChain([mark, 'access',
|
|
5660
|
+
openInNewWindow: _optionalChain([mark, 'access', _14 => _14.attrs, 'optionalAccess', _15 => _15.target]) !== "_self",
|
|
5573
5661
|
documentationItemId: itemId,
|
|
5574
5662
|
link: href
|
|
5575
5663
|
};
|
|
@@ -5587,7 +5675,7 @@ function parseProsemirrorBlockAttribute(prosemirrorNode, attributeName) {
|
|
|
5587
5675
|
return attributeValue;
|
|
5588
5676
|
}
|
|
5589
5677
|
function parseProsemirrorOptionalBlockAttribute(prosemirrorNode, attributeName) {
|
|
5590
|
-
return _nullishCoalesce(_optionalChain([prosemirrorNode, 'access',
|
|
5678
|
+
return _nullishCoalesce(_optionalChain([prosemirrorNode, 'access', _16 => _16.attrs, 'optionalAccess', _17 => _17[attributeName]]), () => ( void 0));
|
|
5591
5679
|
}
|
|
5592
5680
|
function nonNullFilter2(item) {
|
|
5593
5681
|
return item !== null;
|
|
@@ -5616,5 +5704,6 @@ function mapByUnique(items, keyFn) {
|
|
|
5616
5704
|
|
|
5617
5705
|
|
|
5618
5706
|
|
|
5619
|
-
|
|
5707
|
+
|
|
5708
|
+
exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.GetBlockDefinitionsResponse = GetBlockDefinitionsResponse; exports.PageBlockEditorModel = PageBlockEditorModel; exports.blockDefinitionForBlock = blockDefinitionForBlock; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pmSchema = pmSchema; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorNodeToBlock = prosemirrorNodeToBlock; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.serializeAsMultiRichTextBlock = serializeAsMultiRichTextBlock; exports.serializeAsRichTextBlock = serializeAsRichTextBlock; exports.yXmlFragmetToPage = yXmlFragmetToPage;
|
|
5620
5709
|
//# sourceMappingURL=index.js.map
|