@supernova-studio/client 0.24.0 → 0.25.1
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 +4521 -3
- package/dist/index.d.ts +4521 -3
- package/dist/index.js +296 -183
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +581 -468
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/elements/documentation/group.ts +2 -2
- package/src/api/dto/index.ts +1 -0
- package/src/api/dto/workspaces/index.ts +3 -0
- package/src/api/dto/workspaces/membership.ts +29 -0
- package/src/api/dto/workspaces/npm-registry.ts +31 -0
- package/src/api/dto/workspaces/workspace.ts +16 -0
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +28 -2
- package/src/yjs/docs-editor/mock.ts +135 -119
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +19 -9
package/dist/index.js
CHANGED
|
@@ -159,25 +159,43 @@ var PostStripeCheckoutOutputSchema = _zod.z.object({
|
|
|
159
159
|
id: _zod.z.string(),
|
|
160
160
|
url: _zod.z.string().nullish()
|
|
161
161
|
});
|
|
162
|
+
function zodCreateInputOmit() {
|
|
163
|
+
return {
|
|
164
|
+
id: true,
|
|
165
|
+
createdAt: true,
|
|
166
|
+
updatedAt: true
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function zodUpdateInputOmit() {
|
|
170
|
+
return {
|
|
171
|
+
id: true,
|
|
172
|
+
createdAt: true,
|
|
173
|
+
updatedAt: true,
|
|
174
|
+
persistentId: true
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function nullishToOptional(type) {
|
|
178
|
+
return type.nullish().transform((t) => _nullishCoalesce(t, () => ( void 0)));
|
|
179
|
+
}
|
|
162
180
|
var Customer = _zod.z.object({
|
|
163
181
|
id: _zod.z.string()
|
|
164
182
|
});
|
|
165
183
|
var Address = _zod.z.object({
|
|
166
|
-
street1: _zod.z.string()
|
|
167
|
-
street2: _zod.z.string()
|
|
168
|
-
city: _zod.z.string()
|
|
169
|
-
postal: _zod.z.string()
|
|
170
|
-
country: _zod.z.string()
|
|
171
|
-
state: _zod.z.string()
|
|
184
|
+
street1: nullishToOptional(_zod.z.string()),
|
|
185
|
+
street2: nullishToOptional(_zod.z.string()),
|
|
186
|
+
city: nullishToOptional(_zod.z.string()),
|
|
187
|
+
postal: nullishToOptional(_zod.z.string()),
|
|
188
|
+
country: nullishToOptional(_zod.z.string()),
|
|
189
|
+
state: nullishToOptional(_zod.z.string())
|
|
172
190
|
});
|
|
173
191
|
var BillingDetails = _zod.z.object({
|
|
174
|
-
address: Address
|
|
175
|
-
email: _zod.z.string()
|
|
176
|
-
companyName: _zod.z.string()
|
|
177
|
-
companyId: _zod.z.string()
|
|
178
|
-
notes: _zod.z.string()
|
|
179
|
-
vat: _zod.z.string()
|
|
180
|
-
poNumber: _zod.z.string()
|
|
192
|
+
address: nullishToOptional(Address),
|
|
193
|
+
email: nullishToOptional(_zod.z.string()),
|
|
194
|
+
companyName: nullishToOptional(_zod.z.string()),
|
|
195
|
+
companyId: nullishToOptional(_zod.z.string()),
|
|
196
|
+
notes: nullishToOptional(_zod.z.string()),
|
|
197
|
+
vat: nullishToOptional(_zod.z.string()),
|
|
198
|
+
poNumber: nullishToOptional(_zod.z.string())
|
|
181
199
|
});
|
|
182
200
|
var featureLimitedSchema = _zod.z.object({
|
|
183
201
|
max: _zod.z.number(),
|
|
@@ -633,24 +651,6 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
633
651
|
return void 0;
|
|
634
652
|
return v;
|
|
635
653
|
});
|
|
636
|
-
function zodCreateInputOmit() {
|
|
637
|
-
return {
|
|
638
|
-
id: true,
|
|
639
|
-
createdAt: true,
|
|
640
|
-
updatedAt: true
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
function zodUpdateInputOmit() {
|
|
644
|
-
return {
|
|
645
|
-
id: true,
|
|
646
|
-
createdAt: true,
|
|
647
|
-
updatedAt: true,
|
|
648
|
-
persistentId: true
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
function nullishToOptional(type) {
|
|
652
|
-
return type.nullish().transform((t) => _nullishCoalesce(t, () => ( void 0)));
|
|
653
|
-
}
|
|
654
654
|
var PageBlockCalloutType = _zod.z.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
655
655
|
var PageBlockTypeV1 = _zod.z.enum([
|
|
656
656
|
"Text",
|
|
@@ -908,6 +908,16 @@ var PageBlockColorV2 = _zod.z.object({
|
|
|
908
908
|
value: _zod.z.string(),
|
|
909
909
|
referencedTokenId: _zod.z.string().optional()
|
|
910
910
|
});
|
|
911
|
+
var PageBlockAssetEntityMeta = _zod.z.object({
|
|
912
|
+
title: _zod.z.string().optional(),
|
|
913
|
+
description: _zod.z.string().optional(),
|
|
914
|
+
backgroundColor: PageBlockColorV2.optional()
|
|
915
|
+
});
|
|
916
|
+
var PageBlockFigmaNodeEntityMeta = _zod.z.object({
|
|
917
|
+
title: _zod.z.string().optional(),
|
|
918
|
+
description: _zod.z.string().optional(),
|
|
919
|
+
backgroundColor: PageBlockColorV2.optional()
|
|
920
|
+
});
|
|
911
921
|
var PageBlockAppearanceV2 = _zod.z.object({
|
|
912
922
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
913
923
|
numberOfColumns: _zod.z.number().optional()
|
|
@@ -943,10 +953,7 @@ var PageBlockItemAssetValue = _zod.z.object({
|
|
|
943
953
|
_zod.z.object({
|
|
944
954
|
entityId: _zod.z.string(),
|
|
945
955
|
entityType: _zod.z.enum(["Asset", "AssetGroup"]),
|
|
946
|
-
entityMeta:
|
|
947
|
-
title: _zod.z.string().optional(),
|
|
948
|
-
description: _zod.z.string().optional()
|
|
949
|
-
}).optional()
|
|
956
|
+
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
950
957
|
})
|
|
951
958
|
)
|
|
952
959
|
});
|
|
@@ -963,6 +970,7 @@ var PageBlockItemCodeValue = _zod.z.object({
|
|
|
963
970
|
});
|
|
964
971
|
var PageBlockItemSandboxValue = _zod.z.object({
|
|
965
972
|
showCode: _zod.z.boolean().optional(),
|
|
973
|
+
showControls: _zod.z.boolean().optional(),
|
|
966
974
|
backgroundColor: _zod.z.string().optional(),
|
|
967
975
|
alignPreview: _zod.z.enum(["Left", "Center"]).optional(),
|
|
968
976
|
previewHeight: _zod.z.number().optional(),
|
|
@@ -996,14 +1004,11 @@ var PageBlockItemFigmaNodeValue = _zod.z.object({
|
|
|
996
1004
|
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
997
1005
|
showSearch: _zod.z.boolean().optional(),
|
|
998
1006
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
999
|
-
backgroundColor:
|
|
1007
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
1000
1008
|
value: _zod.z.array(
|
|
1001
1009
|
_zod.z.object({
|
|
1002
1010
|
entityId: _zod.z.string(),
|
|
1003
|
-
entityMeta:
|
|
1004
|
-
title: _zod.z.string().optional(),
|
|
1005
|
-
description: _zod.z.string().optional()
|
|
1006
|
-
}).optional()
|
|
1011
|
+
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1007
1012
|
})
|
|
1008
1013
|
)
|
|
1009
1014
|
});
|
|
@@ -1068,6 +1073,7 @@ var PageBlockItemUrlValue = _zod.z.object({
|
|
|
1068
1073
|
});
|
|
1069
1074
|
var PageBlockItemTableRichTextNode = _zod.z.object({
|
|
1070
1075
|
type: _zod.z.literal("RichText"),
|
|
1076
|
+
id: _zod.z.string(),
|
|
1071
1077
|
value: PageBlockItemRichTextValue.shape.value
|
|
1072
1078
|
});
|
|
1073
1079
|
var PageBlockItemTableMultiRichTextNode = _zod.z.object({
|
|
@@ -1076,6 +1082,7 @@ var PageBlockItemTableMultiRichTextNode = _zod.z.object({
|
|
|
1076
1082
|
});
|
|
1077
1083
|
var PageBlockItemTableImageNode = _zod.z.object({
|
|
1078
1084
|
type: _zod.z.literal("Image"),
|
|
1085
|
+
id: _zod.z.string(),
|
|
1079
1086
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1080
1087
|
value: PageBlockItemImageValue.shape.value
|
|
1081
1088
|
});
|
|
@@ -2180,8 +2187,8 @@ var WorkspaceProfile = _zod.z.object({
|
|
|
2180
2187
|
name: _zod.z.string(),
|
|
2181
2188
|
handle: _zod.z.string(),
|
|
2182
2189
|
color: _zod.z.string(),
|
|
2183
|
-
avatar: _zod.z.string()
|
|
2184
|
-
billingDetails: BillingDetails
|
|
2190
|
+
avatar: nullishToOptional(_zod.z.string()),
|
|
2191
|
+
billingDetails: nullishToOptional(BillingDetails)
|
|
2185
2192
|
});
|
|
2186
2193
|
var Workspace = _zod.z.object({
|
|
2187
2194
|
id: _zod.z.string(),
|
|
@@ -3657,14 +3664,14 @@ var DTOCreateDocumentationGroupInput = _zod.z.object({
|
|
|
3657
3664
|
});
|
|
3658
3665
|
var DTOUpdateDocumentationGroupInput = _zod.z.object({
|
|
3659
3666
|
// Identifier of the group to update
|
|
3660
|
-
id: _zod.z.string()
|
|
3667
|
+
id: _zod.z.string(),
|
|
3661
3668
|
// Group properties
|
|
3662
3669
|
title: _zod.z.string().optional(),
|
|
3663
3670
|
configuration: DocumentationItemConfigurationV2.optional()
|
|
3664
3671
|
});
|
|
3665
3672
|
var DTOMoveDocumentationGroupInput = _zod.z.object({
|
|
3666
3673
|
// Identifier of the group to update
|
|
3667
|
-
id: _zod.z.string()
|
|
3674
|
+
id: _zod.z.string(),
|
|
3668
3675
|
// Group placement properties
|
|
3669
3676
|
parentPersistentId: _zod.z.string().uuid(),
|
|
3670
3677
|
afterPersistentId: _zod.z.string().uuid().optional()
|
|
@@ -3961,6 +3968,57 @@ var DTOElementsGetOutput = _zod.z.object({
|
|
|
3961
3968
|
figmaNodes: _zod.z.array(DTOFigmaNode).optional()
|
|
3962
3969
|
});
|
|
3963
3970
|
|
|
3971
|
+
// src/api/dto/workspaces/membership.ts
|
|
3972
|
+
|
|
3973
|
+
|
|
3974
|
+
// src/api/dto/workspaces/workspace.ts
|
|
3975
|
+
|
|
3976
|
+
|
|
3977
|
+
// src/api/dto/workspaces/npm-registry.ts
|
|
3978
|
+
|
|
3979
|
+
var DTONpmRegistryConfig = _zod.z.object({
|
|
3980
|
+
// Registry basic configuration
|
|
3981
|
+
registryType: NpmRegistryType,
|
|
3982
|
+
registryUrl: _zod.z.string(),
|
|
3983
|
+
customRegistryUrl: _zod.z.string().optional(),
|
|
3984
|
+
// URL of Supernova NPM packages proxy
|
|
3985
|
+
proxyUrl: _zod.z.string(),
|
|
3986
|
+
// Auth configuration
|
|
3987
|
+
authType: NpmRegistryAuthType,
|
|
3988
|
+
accessToken: _zod.z.literal("redacted").optional(),
|
|
3989
|
+
username: _zod.z.string().optional(),
|
|
3990
|
+
password: _zod.z.literal("redacted").optional(),
|
|
3991
|
+
// NPM package scopes for whih the proxy should be enabled
|
|
3992
|
+
enabledScopes: _zod.z.array(_zod.z.string()),
|
|
3993
|
+
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
3994
|
+
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
3995
|
+
bypassProxy: _zod.z.boolean()
|
|
3996
|
+
});
|
|
3997
|
+
|
|
3998
|
+
// src/api/dto/workspaces/workspace.ts
|
|
3999
|
+
var DTOWorkspace = _zod.z.object({
|
|
4000
|
+
id: _zod.z.string(),
|
|
4001
|
+
profile: WorkspaceProfile,
|
|
4002
|
+
subscription: Subscription,
|
|
4003
|
+
npmRegistry: DTONpmRegistryConfig.optional()
|
|
4004
|
+
});
|
|
4005
|
+
|
|
4006
|
+
// src/api/dto/workspaces/membership.ts
|
|
4007
|
+
var DTOWorkspaceRole = _zod.z.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
4008
|
+
var DTOUserWorkspaceMembership = _zod.z.object({
|
|
4009
|
+
// Workspace the user is a member of
|
|
4010
|
+
workspace: DTOWorkspace,
|
|
4011
|
+
// Assigned role the user has in the workspace
|
|
4012
|
+
role: DTOWorkspaceRole,
|
|
4013
|
+
// Role that determines actual permissions the user has in the workspace
|
|
4014
|
+
// E.g. this is different from the default role when editors are downgraded to viewers
|
|
4015
|
+
// when a workspace's subscription is downgraded to free tier
|
|
4016
|
+
effectiveRole: DTOWorkspaceRole
|
|
4017
|
+
});
|
|
4018
|
+
var DTOUserWorkspaceMembershipsResponse = _zod.z.object({
|
|
4019
|
+
membership: _zod.z.array(DTOUserWorkspaceMembership)
|
|
4020
|
+
});
|
|
4021
|
+
|
|
3964
4022
|
// src/api/payloads/documentation/block-definitions.ts
|
|
3965
4023
|
|
|
3966
4024
|
var DTOGetBlockDefinitionsOutput = _zod.z.object({
|
|
@@ -5087,13 +5145,28 @@ function serializeTableNode(node) {
|
|
|
5087
5145
|
case "RichText":
|
|
5088
5146
|
return {
|
|
5089
5147
|
type: "paragraph",
|
|
5148
|
+
attrs: {
|
|
5149
|
+
id: node.id,
|
|
5150
|
+
definitionId: "io.supernova.block.rich-text"
|
|
5151
|
+
},
|
|
5090
5152
|
...serializeRichTextNodePart(node.value)
|
|
5091
5153
|
};
|
|
5092
5154
|
case "Image":
|
|
5093
5155
|
return {
|
|
5094
5156
|
type: "image",
|
|
5095
5157
|
attrs: {
|
|
5096
|
-
|
|
5158
|
+
id: node.id,
|
|
5159
|
+
definitionId: "io.supernova.block.image",
|
|
5160
|
+
items: JSON.stringify([
|
|
5161
|
+
{
|
|
5162
|
+
id: node.id,
|
|
5163
|
+
props: {
|
|
5164
|
+
image: {
|
|
5165
|
+
value: node.value
|
|
5166
|
+
}
|
|
5167
|
+
}
|
|
5168
|
+
}
|
|
5169
|
+
])
|
|
5097
5170
|
}
|
|
5098
5171
|
};
|
|
5099
5172
|
}
|
|
@@ -5113,7 +5186,7 @@ function serializeBlockNodeAttributes(input) {
|
|
|
5113
5186
|
};
|
|
5114
5187
|
}
|
|
5115
5188
|
function richTextHeadingLevel(property) {
|
|
5116
|
-
const style = _optionalChain([property, 'access',
|
|
5189
|
+
const style = _optionalChain([property, 'access', _12 => _12.options, 'optionalAccess', _13 => _13.richTextStyle]);
|
|
5117
5190
|
if (!style)
|
|
5118
5191
|
return void 0;
|
|
5119
5192
|
switch (style) {
|
|
@@ -5211,9 +5284,9 @@ function serializeAsCustomBlock(block, definition) {
|
|
|
5211
5284
|
linksTo: i.linksTo
|
|
5212
5285
|
};
|
|
5213
5286
|
});
|
|
5214
|
-
const columns = _optionalChain([block, 'access',
|
|
5287
|
+
const columns = _optionalChain([block, 'access', _14 => _14.data, 'access', _15 => _15.appearance, 'optionalAccess', _16 => _16.numberOfColumns]);
|
|
5215
5288
|
return {
|
|
5216
|
-
type:
|
|
5289
|
+
type: serializeCustomBlockNodeType(block, definition),
|
|
5217
5290
|
attrs: {
|
|
5218
5291
|
id: block.id,
|
|
5219
5292
|
definitionId: block.data.packageId,
|
|
@@ -5223,6 +5296,14 @@ function serializeAsCustomBlock(block, definition) {
|
|
|
5223
5296
|
}
|
|
5224
5297
|
};
|
|
5225
5298
|
}
|
|
5299
|
+
function serializeCustomBlockNodeType(block, definition) {
|
|
5300
|
+
switch (block.data.packageId) {
|
|
5301
|
+
case "io.supernova.block.image":
|
|
5302
|
+
return "image";
|
|
5303
|
+
default:
|
|
5304
|
+
return "blockNode";
|
|
5305
|
+
}
|
|
5306
|
+
}
|
|
5226
5307
|
function nonNullFilter(item) {
|
|
5227
5308
|
return !!item;
|
|
5228
5309
|
}
|
|
@@ -5245,7 +5326,6 @@ var blocks = [
|
|
|
5245
5326
|
name: "Text",
|
|
5246
5327
|
type: "RichText",
|
|
5247
5328
|
options: {
|
|
5248
|
-
placeholder: "Start writing with plain text",
|
|
5249
5329
|
richTextStyle: "Default"
|
|
5250
5330
|
}
|
|
5251
5331
|
}
|
|
@@ -5299,7 +5379,7 @@ var blocks = [
|
|
|
5299
5379
|
name: "Title 1",
|
|
5300
5380
|
description: "Main sections within the page",
|
|
5301
5381
|
category: "Text",
|
|
5302
|
-
searchKeywords: ["heading"],
|
|
5382
|
+
searchKeywords: ["heading", "h1"],
|
|
5303
5383
|
item: {
|
|
5304
5384
|
properties: [
|
|
5305
5385
|
{
|
|
@@ -5361,7 +5441,7 @@ var blocks = [
|
|
|
5361
5441
|
name: "Title 2",
|
|
5362
5442
|
description: "Section subheadings",
|
|
5363
5443
|
category: "Text",
|
|
5364
|
-
searchKeywords: ["heading"],
|
|
5444
|
+
searchKeywords: ["heading", "h2"],
|
|
5365
5445
|
item: {
|
|
5366
5446
|
properties: [
|
|
5367
5447
|
{
|
|
@@ -5423,7 +5503,7 @@ var blocks = [
|
|
|
5423
5503
|
name: "Title 3",
|
|
5424
5504
|
description: "Further subsections",
|
|
5425
5505
|
category: "Text",
|
|
5426
|
-
searchKeywords: ["heading"],
|
|
5506
|
+
searchKeywords: ["heading", "h3"],
|
|
5427
5507
|
item: {
|
|
5428
5508
|
properties: [
|
|
5429
5509
|
{
|
|
@@ -5485,7 +5565,7 @@ var blocks = [
|
|
|
5485
5565
|
name: "Title 4",
|
|
5486
5566
|
description: "Details in subsections",
|
|
5487
5567
|
category: "Text",
|
|
5488
|
-
searchKeywords: ["heading"],
|
|
5568
|
+
searchKeywords: ["heading", "h4"],
|
|
5489
5569
|
item: {
|
|
5490
5570
|
properties: [
|
|
5491
5571
|
{
|
|
@@ -5547,7 +5627,7 @@ var blocks = [
|
|
|
5547
5627
|
name: "Title 5",
|
|
5548
5628
|
description: "Nuanced details or sub-points",
|
|
5549
5629
|
category: "Text",
|
|
5550
|
-
searchKeywords: ["heading"],
|
|
5630
|
+
searchKeywords: ["heading", "h5"],
|
|
5551
5631
|
item: {
|
|
5552
5632
|
properties: [
|
|
5553
5633
|
{
|
|
@@ -5670,7 +5750,7 @@ var blocks = [
|
|
|
5670
5750
|
name: "Unordered list",
|
|
5671
5751
|
description: "A list with bullet points",
|
|
5672
5752
|
category: "Text",
|
|
5673
|
-
searchKeywords: ["ul"],
|
|
5753
|
+
searchKeywords: ["ul", "bullet points"],
|
|
5674
5754
|
item: {
|
|
5675
5755
|
properties: [
|
|
5676
5756
|
{
|
|
@@ -5798,7 +5878,7 @@ var blocks = [
|
|
|
5798
5878
|
name: "Text",
|
|
5799
5879
|
type: "RichText",
|
|
5800
5880
|
options: {
|
|
5801
|
-
placeholder: "
|
|
5881
|
+
placeholder: "Write a quote...",
|
|
5802
5882
|
richTextStyle: "Quote"
|
|
5803
5883
|
}
|
|
5804
5884
|
}
|
|
@@ -5860,6 +5940,7 @@ var blocks = [
|
|
|
5860
5940
|
name: "Text",
|
|
5861
5941
|
type: "RichText",
|
|
5862
5942
|
options: {
|
|
5943
|
+
placeholder: "Highlight some information...",
|
|
5863
5944
|
richTextStyle: "Callout"
|
|
5864
5945
|
}
|
|
5865
5946
|
}
|
|
@@ -5977,29 +6058,11 @@ var blocks = [
|
|
|
5977
6058
|
searchKeywords: [],
|
|
5978
6059
|
item: {
|
|
5979
6060
|
properties: [
|
|
5980
|
-
{
|
|
5981
|
-
id: "block.links.property.title",
|
|
5982
|
-
name: "Title",
|
|
5983
|
-
type: "Text",
|
|
5984
|
-
options: {
|
|
5985
|
-
textStyle: "Title5"
|
|
5986
|
-
}
|
|
5987
|
-
},
|
|
5988
|
-
{
|
|
5989
|
-
id: "block.links.property.description",
|
|
5990
|
-
name: "Short description",
|
|
5991
|
-
type: "Text",
|
|
5992
|
-
options: {
|
|
5993
|
-
textStyle: "Default",
|
|
5994
|
-
color: "NeutralFaded"
|
|
5995
|
-
}
|
|
5996
|
-
},
|
|
5997
6061
|
{
|
|
5998
6062
|
id: "block.links.property.image",
|
|
5999
6063
|
name: "Image",
|
|
6000
6064
|
type: "Image",
|
|
6001
6065
|
options: {
|
|
6002
|
-
width: "Medium",
|
|
6003
6066
|
aspectRatio: "Landscape",
|
|
6004
6067
|
allowCaption: false
|
|
6005
6068
|
},
|
|
@@ -6013,6 +6076,25 @@ var blocks = [
|
|
|
6013
6076
|
aspectRatio: "Square"
|
|
6014
6077
|
}
|
|
6015
6078
|
}
|
|
6079
|
+
},
|
|
6080
|
+
{
|
|
6081
|
+
id: "block.links.property.title",
|
|
6082
|
+
name: "Title",
|
|
6083
|
+
type: "Text",
|
|
6084
|
+
options: {
|
|
6085
|
+
textStyle: "Title5",
|
|
6086
|
+
placeholder: "Add title"
|
|
6087
|
+
}
|
|
6088
|
+
},
|
|
6089
|
+
{
|
|
6090
|
+
id: "block.links.property.description",
|
|
6091
|
+
name: "Short description",
|
|
6092
|
+
type: "Text",
|
|
6093
|
+
options: {
|
|
6094
|
+
textStyle: "Default",
|
|
6095
|
+
color: "NeutralFaded",
|
|
6096
|
+
placeholder: "Add description"
|
|
6097
|
+
}
|
|
6016
6098
|
}
|
|
6017
6099
|
],
|
|
6018
6100
|
appearance: {
|
|
@@ -6023,7 +6105,7 @@ var blocks = [
|
|
|
6023
6105
|
{
|
|
6024
6106
|
id: "imageOnTop",
|
|
6025
6107
|
name: "Image on top",
|
|
6026
|
-
image: "assets/
|
|
6108
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-image-on-top.svg",
|
|
6027
6109
|
layout: {
|
|
6028
6110
|
type: "Column",
|
|
6029
6111
|
children: ["block.links.property.image", "block.links.property.title", "block.links.property.description"],
|
|
@@ -6042,7 +6124,7 @@ var blocks = [
|
|
|
6042
6124
|
{
|
|
6043
6125
|
id: "imageOnLeft",
|
|
6044
6126
|
name: "Image on left",
|
|
6045
|
-
image: "assets/
|
|
6127
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-leading-image.svg",
|
|
6046
6128
|
layout: {
|
|
6047
6129
|
type: "Row",
|
|
6048
6130
|
children: [
|
|
@@ -6076,7 +6158,7 @@ var blocks = [
|
|
|
6076
6158
|
{
|
|
6077
6159
|
id: "iconOnTop",
|
|
6078
6160
|
name: "Icon on top",
|
|
6079
|
-
image: "assets/
|
|
6161
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-icon-on-top.svg",
|
|
6080
6162
|
layout: {
|
|
6081
6163
|
type: "Column",
|
|
6082
6164
|
children: ["block.links.property.image", "block.links.property.title", "block.links.property.description"],
|
|
@@ -6095,7 +6177,7 @@ var blocks = [
|
|
|
6095
6177
|
{
|
|
6096
6178
|
id: "iconOnLeft",
|
|
6097
6179
|
name: "Icon on left",
|
|
6098
|
-
image: "assets/
|
|
6180
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-leading-icon.svg",
|
|
6099
6181
|
layout: {
|
|
6100
6182
|
type: "Row",
|
|
6101
6183
|
children: [
|
|
@@ -6195,8 +6277,8 @@ var blocks = [
|
|
|
6195
6277
|
behavior: {
|
|
6196
6278
|
dataType: "Token",
|
|
6197
6279
|
entities: {
|
|
6198
|
-
selectionType: "
|
|
6199
|
-
maxSelected:
|
|
6280
|
+
selectionType: "EntityAndGroup",
|
|
6281
|
+
maxSelected: 0
|
|
6200
6282
|
}
|
|
6201
6283
|
},
|
|
6202
6284
|
editorOptions: {
|
|
@@ -6351,7 +6433,23 @@ var blocks = [
|
|
|
6351
6433
|
name: "Lottie URL",
|
|
6352
6434
|
type: "URL",
|
|
6353
6435
|
options: {
|
|
6354
|
-
urlValidationRegex: "^(https
|
|
6436
|
+
urlValidationRegex: "^(http|https)://.*.(json|lottie)$"
|
|
6437
|
+
}
|
|
6438
|
+
},
|
|
6439
|
+
{
|
|
6440
|
+
id: "height",
|
|
6441
|
+
name: "Height",
|
|
6442
|
+
type: "Number",
|
|
6443
|
+
options: {
|
|
6444
|
+
defaultValue: 270
|
|
6445
|
+
}
|
|
6446
|
+
},
|
|
6447
|
+
{
|
|
6448
|
+
id: "width",
|
|
6449
|
+
name: "Width",
|
|
6450
|
+
type: "Number",
|
|
6451
|
+
options: {
|
|
6452
|
+
defaultValue: 400
|
|
6355
6453
|
}
|
|
6356
6454
|
},
|
|
6357
6455
|
{
|
|
@@ -6369,6 +6467,14 @@ var blocks = [
|
|
|
6369
6467
|
options: {
|
|
6370
6468
|
defaultValue: true
|
|
6371
6469
|
}
|
|
6470
|
+
},
|
|
6471
|
+
{
|
|
6472
|
+
id: "playerControls",
|
|
6473
|
+
name: "Show player controls",
|
|
6474
|
+
type: "Boolean",
|
|
6475
|
+
options: {
|
|
6476
|
+
defaultValue: true
|
|
6477
|
+
}
|
|
6372
6478
|
}
|
|
6373
6479
|
],
|
|
6374
6480
|
appearance: {
|
|
@@ -6379,9 +6485,10 @@ var blocks = [
|
|
|
6379
6485
|
{
|
|
6380
6486
|
id: "default",
|
|
6381
6487
|
name: "Default",
|
|
6488
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/lottie.svg",
|
|
6382
6489
|
layout: {
|
|
6383
6490
|
type: "Column",
|
|
6384
|
-
children: ["url", "autoplay", "loop"],
|
|
6491
|
+
children: ["url", "height", "width", "autoplay", "loop", "playerControls"],
|
|
6385
6492
|
columnAlign: "Start",
|
|
6386
6493
|
columnResizing: "Fill",
|
|
6387
6494
|
gap: "Medium"
|
|
@@ -6391,7 +6498,7 @@ var blocks = [
|
|
|
6391
6498
|
appearance: {
|
|
6392
6499
|
isBordered: false,
|
|
6393
6500
|
hasBackground: false,
|
|
6394
|
-
isEditorPresentationDifferent:
|
|
6501
|
+
isEditorPresentationDifferent: true
|
|
6395
6502
|
}
|
|
6396
6503
|
}
|
|
6397
6504
|
],
|
|
@@ -6554,7 +6661,9 @@ var blocks = [
|
|
|
6554
6661
|
id: "markdownUrl",
|
|
6555
6662
|
name: "Markdown URL",
|
|
6556
6663
|
type: "Markdown",
|
|
6557
|
-
options: {
|
|
6664
|
+
options: {
|
|
6665
|
+
urlValidationRegex: "^(https?://)?(www.)?.+.md$"
|
|
6666
|
+
}
|
|
6558
6667
|
}
|
|
6559
6668
|
],
|
|
6560
6669
|
appearance: {
|
|
@@ -6565,7 +6674,7 @@ var blocks = [
|
|
|
6565
6674
|
{
|
|
6566
6675
|
id: "plain",
|
|
6567
6676
|
name: "Plain",
|
|
6568
|
-
image: "assets/
|
|
6677
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/markdown-plain.svg",
|
|
6569
6678
|
layout: {
|
|
6570
6679
|
type: "Column",
|
|
6571
6680
|
children: ["markdownUrl"],
|
|
@@ -6584,7 +6693,7 @@ var blocks = [
|
|
|
6584
6693
|
{
|
|
6585
6694
|
id: "bordered",
|
|
6586
6695
|
name: "Bordered",
|
|
6587
|
-
image: "assets/
|
|
6696
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/markdown-bordered.svg",
|
|
6588
6697
|
layout: {
|
|
6589
6698
|
type: "Column",
|
|
6590
6699
|
children: ["markdownUrl"],
|
|
@@ -6603,7 +6712,7 @@ var blocks = [
|
|
|
6603
6712
|
{
|
|
6604
6713
|
id: "boxed",
|
|
6605
6714
|
name: "Boxed",
|
|
6606
|
-
image: "assets/
|
|
6715
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/markdown-boxed.svg",
|
|
6607
6716
|
layout: {
|
|
6608
6717
|
type: "Column",
|
|
6609
6718
|
children: ["markdownUrl"],
|
|
@@ -6714,7 +6823,7 @@ var blocks = [
|
|
|
6714
6823
|
options: {
|
|
6715
6824
|
renderLayoutAs: "List",
|
|
6716
6825
|
defaultTheme: "none",
|
|
6717
|
-
defaultValuePreview: "
|
|
6826
|
+
defaultValuePreview: "Split"
|
|
6718
6827
|
}
|
|
6719
6828
|
}
|
|
6720
6829
|
],
|
|
@@ -6725,8 +6834,8 @@ var blocks = [
|
|
|
6725
6834
|
variants: [
|
|
6726
6835
|
{
|
|
6727
6836
|
id: "table",
|
|
6728
|
-
name: "Table
|
|
6729
|
-
image: "assets/
|
|
6837
|
+
name: "Table row",
|
|
6838
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
|
|
6730
6839
|
layout: {
|
|
6731
6840
|
type: "Column",
|
|
6732
6841
|
children: ["tokens"],
|
|
@@ -6744,8 +6853,8 @@ var blocks = [
|
|
|
6744
6853
|
},
|
|
6745
6854
|
{
|
|
6746
6855
|
id: "grid",
|
|
6747
|
-
name: "Grid
|
|
6748
|
-
image: "assets/
|
|
6856
|
+
name: "Grid item",
|
|
6857
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
|
|
6749
6858
|
layout: {
|
|
6750
6859
|
type: "Column",
|
|
6751
6860
|
children: ["tokens"],
|
|
@@ -6764,7 +6873,7 @@ var blocks = [
|
|
|
6764
6873
|
{
|
|
6765
6874
|
id: "color-stack",
|
|
6766
6875
|
name: "Color stack item",
|
|
6767
|
-
image: "assets/
|
|
6876
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
|
|
6768
6877
|
layout: {
|
|
6769
6878
|
type: "Column",
|
|
6770
6879
|
children: ["tokens"],
|
|
@@ -6806,7 +6915,7 @@ var blocks = [
|
|
|
6806
6915
|
name: "Token list",
|
|
6807
6916
|
description: "Show a list of design tokens",
|
|
6808
6917
|
category: "Tokens",
|
|
6809
|
-
searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"
|
|
6918
|
+
searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
|
|
6810
6919
|
item: {
|
|
6811
6920
|
properties: [
|
|
6812
6921
|
{
|
|
@@ -6816,7 +6925,7 @@ var blocks = [
|
|
|
6816
6925
|
options: {
|
|
6817
6926
|
renderLayoutAs: "List",
|
|
6818
6927
|
defaultTheme: "none",
|
|
6819
|
-
defaultValuePreview: "
|
|
6928
|
+
defaultValuePreview: "Split"
|
|
6820
6929
|
},
|
|
6821
6930
|
variantOptions: {
|
|
6822
6931
|
grid: {
|
|
@@ -6833,7 +6942,7 @@ var blocks = [
|
|
|
6833
6942
|
{
|
|
6834
6943
|
id: "table",
|
|
6835
6944
|
name: "Table",
|
|
6836
|
-
image: "assets/
|
|
6945
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
|
|
6837
6946
|
layout: {
|
|
6838
6947
|
type: "Column",
|
|
6839
6948
|
children: ["tokens"],
|
|
@@ -6852,7 +6961,7 @@ var blocks = [
|
|
|
6852
6961
|
{
|
|
6853
6962
|
id: "grid",
|
|
6854
6963
|
name: "Grid",
|
|
6855
|
-
image: "assets/
|
|
6964
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
|
|
6856
6965
|
layout: {
|
|
6857
6966
|
type: "Column",
|
|
6858
6967
|
children: ["tokens"],
|
|
@@ -6871,26 +6980,7 @@ var blocks = [
|
|
|
6871
6980
|
{
|
|
6872
6981
|
id: "color-stack",
|
|
6873
6982
|
name: "Color stack",
|
|
6874
|
-
image: "assets/
|
|
6875
|
-
layout: {
|
|
6876
|
-
type: "Column",
|
|
6877
|
-
children: ["tokens"],
|
|
6878
|
-
columnAlign: "Start",
|
|
6879
|
-
columnResizing: "Fill",
|
|
6880
|
-
gap: "Medium"
|
|
6881
|
-
},
|
|
6882
|
-
maxColumns: 1,
|
|
6883
|
-
defaultColumns: 1,
|
|
6884
|
-
appearance: {
|
|
6885
|
-
isBordered: false,
|
|
6886
|
-
hasBackground: false,
|
|
6887
|
-
isEditorPresentationDifferent: false
|
|
6888
|
-
}
|
|
6889
|
-
},
|
|
6890
|
-
{
|
|
6891
|
-
id: "color-contrast-grid",
|
|
6892
|
-
name: "Color contrast grid",
|
|
6893
|
-
image: "assets/variant-color-contrast-grid.png",
|
|
6983
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
|
|
6894
6984
|
layout: {
|
|
6895
6985
|
type: "Column",
|
|
6896
6986
|
children: ["tokens"],
|
|
@@ -6932,7 +7022,7 @@ var blocks = [
|
|
|
6932
7022
|
name: "Token group",
|
|
6933
7023
|
description: "Show a group of design tokens",
|
|
6934
7024
|
category: "Tokens",
|
|
6935
|
-
searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"
|
|
7025
|
+
searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
|
|
6936
7026
|
item: {
|
|
6937
7027
|
properties: [
|
|
6938
7028
|
{
|
|
@@ -6942,7 +7032,7 @@ var blocks = [
|
|
|
6942
7032
|
options: {
|
|
6943
7033
|
renderLayoutAs: "List",
|
|
6944
7034
|
defaultTheme: "none",
|
|
6945
|
-
defaultValuePreview: "
|
|
7035
|
+
defaultValuePreview: "Split"
|
|
6946
7036
|
},
|
|
6947
7037
|
variantOptions: {
|
|
6948
7038
|
grid: {
|
|
@@ -6959,7 +7049,7 @@ var blocks = [
|
|
|
6959
7049
|
{
|
|
6960
7050
|
id: "table",
|
|
6961
7051
|
name: "Table",
|
|
6962
|
-
image: "assets/
|
|
7052
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
|
|
6963
7053
|
layout: {
|
|
6964
7054
|
type: "Column",
|
|
6965
7055
|
children: ["tokens"],
|
|
@@ -6978,7 +7068,7 @@ var blocks = [
|
|
|
6978
7068
|
{
|
|
6979
7069
|
id: "grid",
|
|
6980
7070
|
name: "Grid",
|
|
6981
|
-
image: "assets/
|
|
7071
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
|
|
6982
7072
|
layout: {
|
|
6983
7073
|
type: "Column",
|
|
6984
7074
|
children: ["tokens"],
|
|
@@ -6997,7 +7087,7 @@ var blocks = [
|
|
|
6997
7087
|
{
|
|
6998
7088
|
id: "color-stack",
|
|
6999
7089
|
name: "Color stack",
|
|
7000
|
-
image: "assets/
|
|
7090
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
|
|
7001
7091
|
layout: {
|
|
7002
7092
|
type: "Column",
|
|
7003
7093
|
children: ["tokens"],
|
|
@@ -7012,25 +7102,6 @@ var blocks = [
|
|
|
7012
7102
|
hasBackground: false,
|
|
7013
7103
|
isEditorPresentationDifferent: false
|
|
7014
7104
|
}
|
|
7015
|
-
},
|
|
7016
|
-
{
|
|
7017
|
-
id: "color-contrast-grid",
|
|
7018
|
-
name: "Color contrast grid",
|
|
7019
|
-
image: "assets/variant-color-contrast-grid.png",
|
|
7020
|
-
layout: {
|
|
7021
|
-
type: "Column",
|
|
7022
|
-
children: ["tokens"],
|
|
7023
|
-
columnAlign: "Start",
|
|
7024
|
-
columnResizing: "Fill",
|
|
7025
|
-
gap: "Medium"
|
|
7026
|
-
},
|
|
7027
|
-
maxColumns: 1,
|
|
7028
|
-
defaultColumns: 1,
|
|
7029
|
-
appearance: {
|
|
7030
|
-
isBordered: false,
|
|
7031
|
-
hasBackground: false,
|
|
7032
|
-
isEditorPresentationDifferent: false
|
|
7033
|
-
}
|
|
7034
7105
|
}
|
|
7035
7106
|
],
|
|
7036
7107
|
defaultVariantKey: "table"
|
|
@@ -7044,7 +7115,7 @@ var blocks = [
|
|
|
7044
7115
|
},
|
|
7045
7116
|
editorOptions: {
|
|
7046
7117
|
onboarding: {
|
|
7047
|
-
helpText: "Show a group of design tokens.
|
|
7118
|
+
helpText: "Show a group of design tokens. Automatically display all subgroups too.",
|
|
7048
7119
|
documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-group-09"
|
|
7049
7120
|
}
|
|
7050
7121
|
},
|
|
@@ -7147,7 +7218,7 @@ var blocks = [
|
|
|
7147
7218
|
{
|
|
7148
7219
|
id: "codeBottom",
|
|
7149
7220
|
name: "Full width, code bottom",
|
|
7150
|
-
image: "
|
|
7221
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/react-code-bottom.svg",
|
|
7151
7222
|
description: "Full-width block of code, with a preview on top.",
|
|
7152
7223
|
layout: {
|
|
7153
7224
|
type: "Column",
|
|
@@ -7167,7 +7238,7 @@ var blocks = [
|
|
|
7167
7238
|
{
|
|
7168
7239
|
id: "codeTop",
|
|
7169
7240
|
name: "Full width, code top",
|
|
7170
|
-
image: "
|
|
7241
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/react-code-top.svg",
|
|
7171
7242
|
description: "Full-width block of code, with a preview on bottom.",
|
|
7172
7243
|
layout: {
|
|
7173
7244
|
type: "Column",
|
|
@@ -7187,7 +7258,7 @@ var blocks = [
|
|
|
7187
7258
|
{
|
|
7188
7259
|
id: "codeLeft",
|
|
7189
7260
|
name: "Side by side, code left",
|
|
7190
|
-
image: "
|
|
7261
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/react-code-left.svg",
|
|
7191
7262
|
description: "Side-by-side preview and code, with code on the left.",
|
|
7192
7263
|
layout: {
|
|
7193
7264
|
type: "Column",
|
|
@@ -7207,7 +7278,7 @@ var blocks = [
|
|
|
7207
7278
|
{
|
|
7208
7279
|
id: "codeRight",
|
|
7209
7280
|
name: "Side by side, code right",
|
|
7210
|
-
image: "
|
|
7281
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/react-code-right.svg",
|
|
7211
7282
|
description: "Side-by-side preview and code, with code on the right.",
|
|
7212
7283
|
layout: {
|
|
7213
7284
|
type: "Column",
|
|
@@ -7325,7 +7396,7 @@ var blocks = [
|
|
|
7325
7396
|
{
|
|
7326
7397
|
id: "default",
|
|
7327
7398
|
name: "Simple grid",
|
|
7328
|
-
image: "assets/
|
|
7399
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/assets-simple-grid.svg",
|
|
7329
7400
|
description: "A simple grid of assets. Both the title and description are displayed below the preview.",
|
|
7330
7401
|
layout: {
|
|
7331
7402
|
type: "Column",
|
|
@@ -7345,7 +7416,7 @@ var blocks = [
|
|
|
7345
7416
|
{
|
|
7346
7417
|
id: "square-grid",
|
|
7347
7418
|
name: "Square grid",
|
|
7348
|
-
image: "assets/
|
|
7419
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/assets-square-grid.svg",
|
|
7349
7420
|
description: "Bordered square grid tailored for displaying icon assets. Only the title is displayed.",
|
|
7350
7421
|
layout: {
|
|
7351
7422
|
type: "Column",
|
|
@@ -7365,7 +7436,7 @@ var blocks = [
|
|
|
7365
7436
|
{
|
|
7366
7437
|
id: "borderless-grid",
|
|
7367
7438
|
name: "Borderless grid",
|
|
7368
|
-
image: "assets/
|
|
7439
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/assets-borderless-grid.svg",
|
|
7369
7440
|
description: "Borderless grid, perfect for displaying assets of the same height. Only the title is visible.",
|
|
7370
7441
|
layout: {
|
|
7371
7442
|
type: "Column",
|
|
@@ -7388,7 +7459,7 @@ var blocks = [
|
|
|
7388
7459
|
behavior: {
|
|
7389
7460
|
dataType: "Asset",
|
|
7390
7461
|
entities: {
|
|
7391
|
-
selectionType: "
|
|
7462
|
+
selectionType: "EntityAndGroup",
|
|
7392
7463
|
maxSelected: 0
|
|
7393
7464
|
}
|
|
7394
7465
|
},
|
|
@@ -7404,7 +7475,7 @@ var blocks = [
|
|
|
7404
7475
|
}
|
|
7405
7476
|
},
|
|
7406
7477
|
{
|
|
7407
|
-
id: "io.supernova.block.figma-
|
|
7478
|
+
id: "io.supernova.block.figma-frames",
|
|
7408
7479
|
name: "Figma frames",
|
|
7409
7480
|
description: "Display Figma frames as images",
|
|
7410
7481
|
category: "Figma",
|
|
@@ -7412,9 +7483,9 @@ var blocks = [
|
|
|
7412
7483
|
item: {
|
|
7413
7484
|
properties: [
|
|
7414
7485
|
{
|
|
7415
|
-
id: "
|
|
7416
|
-
name: "Figma Frames
|
|
7417
|
-
type: "
|
|
7486
|
+
id: "figmaNodes",
|
|
7487
|
+
name: "Figma Frames",
|
|
7488
|
+
type: "FigmaNode",
|
|
7418
7489
|
options: {}
|
|
7419
7490
|
}
|
|
7420
7491
|
],
|
|
@@ -7426,11 +7497,11 @@ var blocks = [
|
|
|
7426
7497
|
{
|
|
7427
7498
|
id: "bordered",
|
|
7428
7499
|
name: "Bordered",
|
|
7429
|
-
image: "assets/
|
|
7500
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/figma-nodes-boxed.svg",
|
|
7430
7501
|
description: "Tiles with background and border, great for larger sets of frames.",
|
|
7431
7502
|
layout: {
|
|
7432
7503
|
type: "Column",
|
|
7433
|
-
children: ["
|
|
7504
|
+
children: ["figmaNodes"],
|
|
7434
7505
|
columnAlign: "Start",
|
|
7435
7506
|
columnResizing: "Fill",
|
|
7436
7507
|
gap: "Medium"
|
|
@@ -7446,11 +7517,11 @@ var blocks = [
|
|
|
7446
7517
|
{
|
|
7447
7518
|
id: "plain",
|
|
7448
7519
|
name: "Plain",
|
|
7449
|
-
image: "assets/
|
|
7520
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/figma-nodes-plain.svg",
|
|
7450
7521
|
description: "Frame as it is in Figma with no extra formatting, great for single images.",
|
|
7451
7522
|
layout: {
|
|
7452
7523
|
type: "Column",
|
|
7453
|
-
children: ["
|
|
7524
|
+
children: ["figmaNodes"],
|
|
7454
7525
|
columnAlign: "Start",
|
|
7455
7526
|
columnResizing: "Fill",
|
|
7456
7527
|
gap: "Medium"
|
|
@@ -7500,6 +7571,7 @@ var blocks = [
|
|
|
7500
7571
|
{
|
|
7501
7572
|
id: "default",
|
|
7502
7573
|
name: "Default",
|
|
7574
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/release-notes.svg",
|
|
7503
7575
|
layout: {
|
|
7504
7576
|
type: "Column",
|
|
7505
7577
|
children: [],
|
|
@@ -7512,7 +7584,7 @@ var blocks = [
|
|
|
7512
7584
|
appearance: {
|
|
7513
7585
|
isBordered: false,
|
|
7514
7586
|
hasBackground: false,
|
|
7515
|
-
isEditorPresentationDifferent:
|
|
7587
|
+
isEditorPresentationDifferent: true
|
|
7516
7588
|
}
|
|
7517
7589
|
}
|
|
7518
7590
|
],
|
|
@@ -7550,6 +7622,22 @@ var blocks = [
|
|
|
7550
7622
|
options: {
|
|
7551
7623
|
renderLayoutAs: "List"
|
|
7552
7624
|
}
|
|
7625
|
+
},
|
|
7626
|
+
{
|
|
7627
|
+
id: "showDescription",
|
|
7628
|
+
name: "Show description",
|
|
7629
|
+
type: "Boolean",
|
|
7630
|
+
options: {
|
|
7631
|
+
defaultValue: true
|
|
7632
|
+
}
|
|
7633
|
+
},
|
|
7634
|
+
{
|
|
7635
|
+
id: "title",
|
|
7636
|
+
name: "Title",
|
|
7637
|
+
type: "Text",
|
|
7638
|
+
options: {
|
|
7639
|
+
defaultValue: "Component checklist"
|
|
7640
|
+
}
|
|
7553
7641
|
}
|
|
7554
7642
|
],
|
|
7555
7643
|
appearance: {
|
|
@@ -7560,9 +7648,10 @@ var blocks = [
|
|
|
7560
7648
|
{
|
|
7561
7649
|
id: "default",
|
|
7562
7650
|
name: "Default",
|
|
7651
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/component-checklist.svg",
|
|
7563
7652
|
layout: {
|
|
7564
7653
|
type: "Column",
|
|
7565
|
-
children: ["components"],
|
|
7654
|
+
children: ["components", "showDescription", "title"],
|
|
7566
7655
|
columnAlign: "Start",
|
|
7567
7656
|
columnResizing: "Fill",
|
|
7568
7657
|
gap: "Medium"
|
|
@@ -7572,7 +7661,7 @@ var blocks = [
|
|
|
7572
7661
|
appearance: {
|
|
7573
7662
|
isBordered: false,
|
|
7574
7663
|
hasBackground: false,
|
|
7575
|
-
isEditorPresentationDifferent:
|
|
7664
|
+
isEditorPresentationDifferent: true
|
|
7576
7665
|
}
|
|
7577
7666
|
}
|
|
7578
7667
|
],
|
|
@@ -7609,7 +7698,15 @@ var blocks = [
|
|
|
7609
7698
|
name: "Components",
|
|
7610
7699
|
type: "Component",
|
|
7611
7700
|
options: {
|
|
7612
|
-
renderLayoutAs: "
|
|
7701
|
+
renderLayoutAs: "Table"
|
|
7702
|
+
}
|
|
7703
|
+
},
|
|
7704
|
+
{
|
|
7705
|
+
id: "showLastUpdatedColumn",
|
|
7706
|
+
name: "Show last updated column",
|
|
7707
|
+
type: "Boolean",
|
|
7708
|
+
options: {
|
|
7709
|
+
defaultValue: true
|
|
7613
7710
|
}
|
|
7614
7711
|
}
|
|
7615
7712
|
],
|
|
@@ -7621,9 +7718,10 @@ var blocks = [
|
|
|
7621
7718
|
{
|
|
7622
7719
|
id: "default",
|
|
7623
7720
|
name: "Default",
|
|
7721
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/component-overview-table.svg",
|
|
7624
7722
|
layout: {
|
|
7625
7723
|
type: "Column",
|
|
7626
|
-
children: ["components"],
|
|
7724
|
+
children: ["components", "showLastUpdatedColumn"],
|
|
7627
7725
|
columnAlign: "Start",
|
|
7628
7726
|
columnResizing: "Fill",
|
|
7629
7727
|
gap: "Medium"
|
|
@@ -7633,7 +7731,7 @@ var blocks = [
|
|
|
7633
7731
|
appearance: {
|
|
7634
7732
|
isBordered: false,
|
|
7635
7733
|
hasBackground: false,
|
|
7636
|
-
isEditorPresentationDifferent:
|
|
7734
|
+
isEditorPresentationDifferent: true
|
|
7637
7735
|
}
|
|
7638
7736
|
}
|
|
7639
7737
|
],
|
|
@@ -7682,6 +7780,7 @@ var blocks = [
|
|
|
7682
7780
|
{
|
|
7683
7781
|
id: "default",
|
|
7684
7782
|
name: "Default",
|
|
7783
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/component-health.svg",
|
|
7685
7784
|
layout: {
|
|
7686
7785
|
type: "Column",
|
|
7687
7786
|
children: ["components"],
|
|
@@ -7694,7 +7793,7 @@ var blocks = [
|
|
|
7694
7793
|
appearance: {
|
|
7695
7794
|
isBordered: false,
|
|
7696
7795
|
hasBackground: false,
|
|
7697
|
-
isEditorPresentationDifferent:
|
|
7796
|
+
isEditorPresentationDifferent: true
|
|
7698
7797
|
}
|
|
7699
7798
|
}
|
|
7700
7799
|
],
|
|
@@ -7837,7 +7936,7 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
|
|
|
7837
7936
|
value: (_nullishCoalesce(prosemirrorNode.content, () => ( []))).map((listItem) => {
|
|
7838
7937
|
if (listItem.type !== "listItem")
|
|
7839
7938
|
return null;
|
|
7840
|
-
if (!_optionalChain([listItem, 'access',
|
|
7939
|
+
if (!_optionalChain([listItem, 'access', _17 => _17.content, 'optionalAccess', _18 => _18.length]))
|
|
7841
7940
|
return parseRichText([]);
|
|
7842
7941
|
const paragraph = listItem.content[0];
|
|
7843
7942
|
if (paragraph.type !== "paragraph")
|
|
@@ -7880,7 +7979,7 @@ function parseRichTextAttribute(mark) {
|
|
|
7880
7979
|
const href = getProsemirrorAttribute(mark, "href", _zod.z.string().optional());
|
|
7881
7980
|
return {
|
|
7882
7981
|
type: "Link",
|
|
7883
|
-
openInNewWindow: _optionalChain([mark, 'access',
|
|
7982
|
+
openInNewWindow: _optionalChain([mark, 'access', _19 => _19.attrs, 'optionalAccess', _20 => _20.target]) !== "_self",
|
|
7884
7983
|
documentationItemId: itemId,
|
|
7885
7984
|
link: href
|
|
7886
7985
|
};
|
|
@@ -7893,17 +7992,17 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
7893
7992
|
return null;
|
|
7894
7993
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
7895
7994
|
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", _zod.z.boolean().optional()) !== false;
|
|
7896
|
-
const tableChild = _optionalChain([prosemirrorNode, 'access',
|
|
7995
|
+
const tableChild = _optionalChain([prosemirrorNode, 'access', _21 => _21.content, 'optionalAccess', _22 => _22.find, 'call', _23 => _23((c) => c.type === "table")]);
|
|
7897
7996
|
if (!tableChild) {
|
|
7898
7997
|
return emptyTable(id, variantId, 0);
|
|
7899
7998
|
}
|
|
7900
|
-
const rows = _nullishCoalesce(_optionalChain([tableChild, 'access',
|
|
7999
|
+
const rows = _nullishCoalesce(_optionalChain([tableChild, 'access', _24 => _24.content, 'optionalAccess', _25 => _25.filter, 'call', _26 => _26((c) => c.type === "tableRow" && !!_optionalChain([c, 'access', _27 => _27.content, 'optionalAccess', _28 => _28.length]))]), () => ( []));
|
|
7901
8000
|
if (!rows.length) {
|
|
7902
8001
|
return emptyTable(id, variantId, 0);
|
|
7903
8002
|
}
|
|
7904
|
-
const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access',
|
|
7905
|
-
const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access',
|
|
7906
|
-
const hasHeaderRow = _optionalChain([rows, 'access',
|
|
8003
|
+
const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access', _29 => _29[0], 'access', _30 => _30.content, 'optionalAccess', _31 => _31.filter, 'call', _32 => _32((c) => c.type === "tableHeader"), 'access', _33 => _33.length]), () => ( 0));
|
|
8004
|
+
const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _34 => _34.content, 'optionalAccess', _35 => _35[0], 'optionalAccess', _36 => _36.type]) === "tableHeader").length;
|
|
8005
|
+
const hasHeaderRow = _optionalChain([rows, 'access', _37 => _37[0], 'access', _38 => _38.content, 'optionalAccess', _39 => _39.length]) === rowHeaderCells;
|
|
7907
8006
|
const hasHeaderColumn = rows.length === columnHeaderCells;
|
|
7908
8007
|
const tableValue = {
|
|
7909
8008
|
showBorder: hasBorder,
|
|
@@ -7967,25 +8066,33 @@ function parseTableCellAlignment(alignment) {
|
|
|
7967
8066
|
}
|
|
7968
8067
|
}
|
|
7969
8068
|
function parseAsTableNode(prosemirrorNode) {
|
|
8069
|
+
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
8070
|
+
if (!id)
|
|
8071
|
+
return null;
|
|
7970
8072
|
switch (prosemirrorNode.type) {
|
|
7971
8073
|
case "paragraph":
|
|
7972
8074
|
return {
|
|
7973
8075
|
type: "RichText",
|
|
8076
|
+
id,
|
|
7974
8077
|
value: parseRichText(_nullishCoalesce(prosemirrorNode.content, () => ( [])))
|
|
7975
8078
|
};
|
|
7976
8079
|
case "image":
|
|
7977
|
-
const
|
|
7978
|
-
if (!
|
|
8080
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", _zod.z.string());
|
|
8081
|
+
if (!items)
|
|
8082
|
+
return null;
|
|
8083
|
+
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
8084
|
+
if (!parsedItems.success)
|
|
8085
|
+
return null;
|
|
8086
|
+
const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _40 => _40.data, 'access', _41 => _41[0], 'optionalAccess', _42 => _42.props, 'access', _43 => _43.image]);
|
|
8087
|
+
if (!rawImagePropertyValue)
|
|
8088
|
+
return null;
|
|
8089
|
+
const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
|
|
8090
|
+
if (!imagePropertyValueParseResult.success)
|
|
7979
8091
|
return null;
|
|
7980
8092
|
return {
|
|
7981
8093
|
type: "Image",
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
resource: {
|
|
7985
|
-
resourceId: "",
|
|
7986
|
-
url
|
|
7987
|
-
}
|
|
7988
|
-
}
|
|
8094
|
+
id,
|
|
8095
|
+
value: imagePropertyValueParseResult.data.value
|
|
7989
8096
|
};
|
|
7990
8097
|
default:
|
|
7991
8098
|
return null;
|
|
@@ -8031,6 +8138,7 @@ function emptyTableCellContent() {
|
|
|
8031
8138
|
return [
|
|
8032
8139
|
{
|
|
8033
8140
|
type: "RichText",
|
|
8141
|
+
id: "",
|
|
8034
8142
|
value: { spans: [] }
|
|
8035
8143
|
}
|
|
8036
8144
|
];
|
|
@@ -8187,7 +8295,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
|
8187
8295
|
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
|
|
8188
8296
|
}
|
|
8189
8297
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
8190
|
-
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access',
|
|
8298
|
+
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _44 => _44.attrs, 'optionalAccess', _45 => _45[attributeName]]));
|
|
8191
8299
|
if (parsedAttr.success) {
|
|
8192
8300
|
return parsedAttr.data;
|
|
8193
8301
|
} else {
|
|
@@ -8291,5 +8399,10 @@ function mapByUnique2(items, keyFn) {
|
|
|
8291
8399
|
|
|
8292
8400
|
|
|
8293
8401
|
|
|
8294
|
-
|
|
8402
|
+
|
|
8403
|
+
|
|
8404
|
+
|
|
8405
|
+
|
|
8406
|
+
|
|
8407
|
+
exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DTOCreateDocumentationGroupInput = DTOCreateDocumentationGroupInput; exports.DTOCreateDocumentationPageInputV2 = DTOCreateDocumentationPageInputV2; exports.DTOCreateDocumentationTabGroupInput = DTOCreateDocumentationTabGroupInput; exports.DTODeleteDocumentationGroupInput = DTODeleteDocumentationGroupInput; exports.DTODeleteDocumentationPageInputV2 = DTODeleteDocumentationPageInputV2; exports.DTODeleteDocumentationTabGroupInput = DTODeleteDocumentationTabGroupInput; exports.DTODesignSystem = DTODesignSystem; exports.DTODocumentationGroupCreateActionInputV2 = DTODocumentationGroupCreateActionInputV2; exports.DTODocumentationGroupCreateActionOutputV2 = DTODocumentationGroupCreateActionOutputV2; exports.DTODocumentationGroupDeleteActionInputV2 = DTODocumentationGroupDeleteActionInputV2; exports.DTODocumentationGroupDeleteActionOutputV2 = DTODocumentationGroupDeleteActionOutputV2; exports.DTODocumentationGroupDuplicateActionInputV2 = DTODocumentationGroupDuplicateActionInputV2; exports.DTODocumentationGroupDuplicateActionOutputV2 = DTODocumentationGroupDuplicateActionOutputV2; exports.DTODocumentationGroupMoveActionInputV2 = DTODocumentationGroupMoveActionInputV2; exports.DTODocumentationGroupMoveActionOutputV2 = DTODocumentationGroupMoveActionOutputV2; exports.DTODocumentationGroupStructureV2 = DTODocumentationGroupStructureV2; exports.DTODocumentationGroupUpdateActionInputV2 = DTODocumentationGroupUpdateActionInputV2; exports.DTODocumentationGroupUpdateActionOutputV2 = DTODocumentationGroupUpdateActionOutputV2; exports.DTODocumentationGroupV2 = DTODocumentationGroupV2; exports.DTODocumentationHierarchyV2 = DTODocumentationHierarchyV2; exports.DTODocumentationPageCreateActionInputV2 = DTODocumentationPageCreateActionInputV2; exports.DTODocumentationPageCreateActionOutputV2 = DTODocumentationPageCreateActionOutputV2; exports.DTODocumentationPageDeleteActionInputV2 = DTODocumentationPageDeleteActionInputV2; exports.DTODocumentationPageDeleteActionOutputV2 = DTODocumentationPageDeleteActionOutputV2; exports.DTODocumentationPageDuplicateActionInputV2 = DTODocumentationPageDuplicateActionInputV2; exports.DTODocumentationPageDuplicateActionOutputV2 = DTODocumentationPageDuplicateActionOutputV2; exports.DTODocumentationPageMoveActionInputV2 = DTODocumentationPageMoveActionInputV2; exports.DTODocumentationPageMoveActionOutputV2 = DTODocumentationPageMoveActionOutputV2; exports.DTODocumentationPageRoomHeaderData = DTODocumentationPageRoomHeaderData; exports.DTODocumentationPageRoomHeaderDataUpdate = DTODocumentationPageRoomHeaderDataUpdate; exports.DTODocumentationPageStructureV2 = DTODocumentationPageStructureV2; exports.DTODocumentationPageUpdateActionInputV2 = DTODocumentationPageUpdateActionInputV2; exports.DTODocumentationPageUpdateActionOutputV2 = DTODocumentationPageUpdateActionOutputV2; exports.DTODocumentationPageV2 = DTODocumentationPageV2; exports.DTODocumentationTabGroupCreateActionInputV2 = DTODocumentationTabGroupCreateActionInputV2; exports.DTODocumentationTabGroupCreateActionOutputV2 = DTODocumentationTabGroupCreateActionOutputV2; exports.DTODocumentationTabGroupDeleteActionInputV2 = DTODocumentationTabGroupDeleteActionInputV2; exports.DTODocumentationTabGroupDeleteActionOutputV2 = DTODocumentationTabGroupDeleteActionOutputV2; exports.DTODuplicateDocumentationGroupInput = DTODuplicateDocumentationGroupInput; exports.DTODuplicateDocumentationPageInputV2 = DTODuplicateDocumentationPageInputV2; exports.DTOElementActionInput = DTOElementActionInput; exports.DTOElementActionOutput = DTOElementActionOutput; exports.DTOElementsGetOutput = DTOElementsGetOutput; exports.DTOElementsGetQuerySchema = DTOElementsGetQuerySchema; exports.DTOElementsGetTypeFilter = DTOElementsGetTypeFilter; exports.DTOFigmaNode = DTOFigmaNode; exports.DTOFigmaNodeData = DTOFigmaNodeData; exports.DTOFigmaNodeRenderActionInput = DTOFigmaNodeRenderActionInput; exports.DTOFigmaNodeRenderActionOutput = DTOFigmaNodeRenderActionOutput; exports.DTOFigmaNodeRenderInput = DTOFigmaNodeRenderInput; exports.DTOGetBlockDefinitionsOutput = DTOGetBlockDefinitionsOutput; exports.DTOLiveblocksAuthRequest = DTOLiveblocksAuthRequest; exports.DTOMoveDocumentationGroupInput = DTOMoveDocumentationGroupInput; exports.DTOMoveDocumentationPageInputV2 = DTOMoveDocumentationPageInputV2; exports.DTONpmRegistryConfig = DTONpmRegistryConfig; exports.DTOUpdateDocumentationGroupInput = DTOUpdateDocumentationGroupInput; exports.DTOUpdateDocumentationPageInputV2 = DTOUpdateDocumentationPageInputV2; exports.DTOUserWorkspaceMembership = DTOUserWorkspaceMembership; exports.DTOUserWorkspaceMembershipsResponse = DTOUserWorkspaceMembershipsResponse; exports.DTOWorkspace = DTOWorkspace; exports.DTOWorkspaceRole = DTOWorkspaceRole; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.PageBlockEditorModel = PageBlockEditorModel2; exports.blockDefinitionForBlock = blockDefinitionForBlock; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.buildDocPagePublishPaths = buildDocPagePublishPaths; exports.calculateElementParentChain = calculateElementParentChain; exports.documentationElementsToHierarchyDto = documentationElementsToHierarchyDto; exports.documentationHierarchyToYjs = documentationHierarchyToYjs; exports.documentationPagesToDTOV1 = documentationPagesToDTOV1; exports.documentationPagesToDTOV2 = documentationPagesToDTOV2; exports.documentationPagesToStructureDTOV2 = documentationPagesToStructureDTOV2; exports.elementGroupsToDocumentationGroupDTO = elementGroupsToDocumentationGroupDTO; exports.elementGroupsToDocumentationGroupStructureDTO = elementGroupsToDocumentationGroupStructureDTO; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pmSchema = pmSchema; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorNodeToBlock = prosemirrorNodeToBlock; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
|
|
8295
8408
|
//# sourceMappingURL=index.js.map
|