@supernova-studio/client 1.9.4 → 1.9.5
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 +111 -55
- package/dist/index.d.ts +111 -55
- package/dist/index.js +118 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1848,7 +1848,8 @@ var PageBlockTypeV1 = _zod.z.enum([
|
|
|
1848
1848
|
"Guidelines",
|
|
1849
1849
|
"Guideline",
|
|
1850
1850
|
"FigmaComponents",
|
|
1851
|
-
"FigmaComponentPropsTable"
|
|
1851
|
+
"FigmaComponentPropsTable",
|
|
1852
|
+
"File"
|
|
1852
1853
|
]);
|
|
1853
1854
|
var PageBlockCodeLanguage = _zod.z.enum([
|
|
1854
1855
|
"Angular",
|
|
@@ -2060,6 +2061,13 @@ var PageBlockGuideline = _zod.z.object({
|
|
|
2060
2061
|
openLightbox: nullishToOptional(_zod.z.boolean()),
|
|
2061
2062
|
isBordered: nullishToOptional(_zod.z.boolean())
|
|
2062
2063
|
});
|
|
2064
|
+
var PageBlockFile = _zod.z.object({
|
|
2065
|
+
entityId: _zod.z.string(),
|
|
2066
|
+
entityMeta: _zod.z.object({
|
|
2067
|
+
title: _zod.z.string().optional(),
|
|
2068
|
+
description: _zod.z.string().optional()
|
|
2069
|
+
}).optional()
|
|
2070
|
+
});
|
|
2063
2071
|
var PageBlockBaseV1 = _zod.z.object({
|
|
2064
2072
|
persistentId: _zod.z.string(),
|
|
2065
2073
|
type: PageBlockTypeV1,
|
|
@@ -2122,7 +2130,9 @@ var PageBlockBaseV1 = _zod.z.object({
|
|
|
2122
2130
|
// Arbitrary
|
|
2123
2131
|
userMetadata: nullishToOptional(_zod.z.string()),
|
|
2124
2132
|
// Storybook
|
|
2125
|
-
storybookBlockConfig: nullishToOptional(PageBlockStorybookBlockConfig)
|
|
2133
|
+
storybookBlockConfig: nullishToOptional(PageBlockStorybookBlockConfig),
|
|
2134
|
+
// Files
|
|
2135
|
+
files: nullishToOptional(PageBlockFile.array())
|
|
2126
2136
|
});
|
|
2127
2137
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
2128
2138
|
children: _zod.z.lazy(
|
|
@@ -2273,7 +2283,8 @@ var PageBlockDefinitionPropertyType = _zod.z.enum([
|
|
|
2273
2283
|
"Divider",
|
|
2274
2284
|
"Storybook",
|
|
2275
2285
|
"Color",
|
|
2276
|
-
"FigmaComponent"
|
|
2286
|
+
"FigmaComponent",
|
|
2287
|
+
"File"
|
|
2277
2288
|
]);
|
|
2278
2289
|
var PageBlockDefinitionRichTextPropertyStyle = _zod.z.enum([
|
|
2279
2290
|
"Title1",
|
|
@@ -2646,6 +2657,15 @@ var PageBlockItemTokenValue = _zod.z.object({
|
|
|
2646
2657
|
})
|
|
2647
2658
|
).default([])
|
|
2648
2659
|
});
|
|
2660
|
+
var PageBlockItemFileValue = _zod.z.object({
|
|
2661
|
+
value: _zod.z.object({
|
|
2662
|
+
entityId: _zod.z.string(),
|
|
2663
|
+
entityMeta: _zod.z.object({
|
|
2664
|
+
title: _zod.z.string().optional(),
|
|
2665
|
+
description: _zod.z.string().optional()
|
|
2666
|
+
}).optional()
|
|
2667
|
+
}).array()
|
|
2668
|
+
});
|
|
2649
2669
|
var PageBlockItemTokenPropertyValue = _zod.z.object({
|
|
2650
2670
|
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
2651
2671
|
selectedThemeIds: _zod.z.array(_zod.z.string()).optional(),
|
|
@@ -3800,7 +3820,15 @@ var PageBlockCategory = _zod.z.enum([
|
|
|
3800
3820
|
"Data",
|
|
3801
3821
|
"Other"
|
|
3802
3822
|
]);
|
|
3803
|
-
var PageBlockBehaviorDataType = _zod.z.enum([
|
|
3823
|
+
var PageBlockBehaviorDataType = _zod.z.enum([
|
|
3824
|
+
"Item",
|
|
3825
|
+
"Token",
|
|
3826
|
+
"Asset",
|
|
3827
|
+
"Component",
|
|
3828
|
+
"FigmaNode",
|
|
3829
|
+
"FigmaComponent",
|
|
3830
|
+
"File"
|
|
3831
|
+
]);
|
|
3804
3832
|
var PageBlockBehaviorSelectionType = _zod.z.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
3805
3833
|
var PageBlockDefinitionBehavior = _zod.z.object({
|
|
3806
3834
|
dataType: PageBlockBehaviorDataType,
|
|
@@ -14142,6 +14170,90 @@ var blocks = [
|
|
|
14142
14170
|
isEditorPresentationDifferent: false,
|
|
14143
14171
|
showBlockHeaderInEditor: false
|
|
14144
14172
|
}
|
|
14173
|
+
},
|
|
14174
|
+
{
|
|
14175
|
+
id: "io.supernova.block.files",
|
|
14176
|
+
name: "File upload",
|
|
14177
|
+
description: "Display attachments for download",
|
|
14178
|
+
category: "Media",
|
|
14179
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/files.svg",
|
|
14180
|
+
searchKeywords: ["files", "attachments", "download", "upload"],
|
|
14181
|
+
item: {
|
|
14182
|
+
properties: [
|
|
14183
|
+
{
|
|
14184
|
+
id: "files",
|
|
14185
|
+
name: "Files",
|
|
14186
|
+
type: "File",
|
|
14187
|
+
options: {
|
|
14188
|
+
renderLayoutAs: "iconOnLeft"
|
|
14189
|
+
},
|
|
14190
|
+
variantOptions: {
|
|
14191
|
+
iconOnTop: {
|
|
14192
|
+
renderLayoutAs: "iconOnTop"
|
|
14193
|
+
},
|
|
14194
|
+
iconOnLeft: {
|
|
14195
|
+
renderLayoutAs: "iconOnLeft"
|
|
14196
|
+
}
|
|
14197
|
+
}
|
|
14198
|
+
}
|
|
14199
|
+
],
|
|
14200
|
+
appearance: {
|
|
14201
|
+
isBordered: true,
|
|
14202
|
+
hasBackground: false
|
|
14203
|
+
},
|
|
14204
|
+
variants: [
|
|
14205
|
+
{
|
|
14206
|
+
id: "iconOnTop",
|
|
14207
|
+
name: "Icon on top",
|
|
14208
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/files-icon-on-top.svg",
|
|
14209
|
+
layout: {
|
|
14210
|
+
type: "Column",
|
|
14211
|
+
children: ["files"],
|
|
14212
|
+
columnAlign: "Start",
|
|
14213
|
+
columnResizing: "Fill",
|
|
14214
|
+
gap: "Medium"
|
|
14215
|
+
},
|
|
14216
|
+
maxColumns: 4,
|
|
14217
|
+
defaultColumns: 1,
|
|
14218
|
+
appearance: {}
|
|
14219
|
+
},
|
|
14220
|
+
{
|
|
14221
|
+
id: "iconOnLeft",
|
|
14222
|
+
name: "Icon on left",
|
|
14223
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/files-leading-icon.svg",
|
|
14224
|
+
layout: {
|
|
14225
|
+
type: "Column",
|
|
14226
|
+
children: ["files"],
|
|
14227
|
+
columnAlign: "Start",
|
|
14228
|
+
columnResizing: "Fill",
|
|
14229
|
+
gap: "Medium"
|
|
14230
|
+
},
|
|
14231
|
+
maxColumns: 2,
|
|
14232
|
+
defaultColumns: 1,
|
|
14233
|
+
appearance: {}
|
|
14234
|
+
}
|
|
14235
|
+
],
|
|
14236
|
+
defaultVariantKey: "iconOnTop"
|
|
14237
|
+
},
|
|
14238
|
+
behavior: {
|
|
14239
|
+
dataType: "File",
|
|
14240
|
+
entities: {
|
|
14241
|
+
selectionType: "Entity",
|
|
14242
|
+
maxSelected: 0
|
|
14243
|
+
}
|
|
14244
|
+
},
|
|
14245
|
+
editorOptions: {
|
|
14246
|
+
onboarding: {
|
|
14247
|
+
helpText: "Display attachments for download",
|
|
14248
|
+
documentationLink: "https://learn.supernova.io/file-upload-block"
|
|
14249
|
+
}
|
|
14250
|
+
},
|
|
14251
|
+
appearance: {
|
|
14252
|
+
isBordered: false,
|
|
14253
|
+
hasBackground: false,
|
|
14254
|
+
isEditorPresentationDifferent: false,
|
|
14255
|
+
showBlockHeaderInEditor: false
|
|
14256
|
+
}
|
|
14145
14257
|
}
|
|
14146
14258
|
];
|
|
14147
14259
|
|
|
@@ -14771,6 +14883,8 @@ function valueSchemaForPropertyType(type) {
|
|
|
14771
14883
|
return PageBlockItemFigmaComponentValue;
|
|
14772
14884
|
case "RichTextEditor":
|
|
14773
14885
|
return PageBlockItemRichTextEditorValue;
|
|
14886
|
+
case "File":
|
|
14887
|
+
return PageBlockItemFileValue;
|
|
14774
14888
|
}
|
|
14775
14889
|
}
|
|
14776
14890
|
function getProsemirrorBlockId(prosemirrorNode) {
|