@supernova-studio/client 1.9.4 → 1.9.6
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 +198 -56
- package/dist/index.d.ts +198 -56
- package/dist/index.js +139 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +138 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1848,7 +1848,8 @@ var PageBlockTypeV1 = z45.enum([
|
|
|
1848
1848
|
"Guidelines",
|
|
1849
1849
|
"Guideline",
|
|
1850
1850
|
"FigmaComponents",
|
|
1851
|
-
"FigmaComponentPropsTable"
|
|
1851
|
+
"FigmaComponentPropsTable",
|
|
1852
|
+
"File"
|
|
1852
1853
|
]);
|
|
1853
1854
|
var PageBlockCodeLanguage = z45.enum([
|
|
1854
1855
|
"Angular",
|
|
@@ -2060,6 +2061,13 @@ var PageBlockGuideline = z45.object({
|
|
|
2060
2061
|
openLightbox: nullishToOptional(z45.boolean()),
|
|
2061
2062
|
isBordered: nullishToOptional(z45.boolean())
|
|
2062
2063
|
});
|
|
2064
|
+
var PageBlockFile = z45.object({
|
|
2065
|
+
entityId: z45.string(),
|
|
2066
|
+
entityMeta: z45.object({
|
|
2067
|
+
title: z45.string().optional(),
|
|
2068
|
+
description: z45.string().optional()
|
|
2069
|
+
}).optional()
|
|
2070
|
+
});
|
|
2063
2071
|
var PageBlockBaseV1 = z45.object({
|
|
2064
2072
|
persistentId: z45.string(),
|
|
2065
2073
|
type: PageBlockTypeV1,
|
|
@@ -2122,7 +2130,9 @@ var PageBlockBaseV1 = z45.object({
|
|
|
2122
2130
|
// Arbitrary
|
|
2123
2131
|
userMetadata: nullishToOptional(z45.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: z45.lazy(
|
|
@@ -2273,7 +2283,8 @@ var PageBlockDefinitionPropertyType = z48.enum([
|
|
|
2273
2283
|
"Divider",
|
|
2274
2284
|
"Storybook",
|
|
2275
2285
|
"Color",
|
|
2276
|
-
"FigmaComponent"
|
|
2286
|
+
"FigmaComponent",
|
|
2287
|
+
"File"
|
|
2277
2288
|
]);
|
|
2278
2289
|
var PageBlockDefinitionRichTextPropertyStyle = z48.enum([
|
|
2279
2290
|
"Title1",
|
|
@@ -2646,6 +2657,15 @@ var PageBlockItemTokenValue = z49.object({
|
|
|
2646
2657
|
})
|
|
2647
2658
|
).default([])
|
|
2648
2659
|
});
|
|
2660
|
+
var PageBlockItemFileValue = z49.object({
|
|
2661
|
+
value: z49.object({
|
|
2662
|
+
entityId: z49.string(),
|
|
2663
|
+
entityMeta: z49.object({
|
|
2664
|
+
title: z49.string().optional(),
|
|
2665
|
+
description: z49.string().optional()
|
|
2666
|
+
}).optional()
|
|
2667
|
+
}).array()
|
|
2668
|
+
});
|
|
2649
2669
|
var PageBlockItemTokenPropertyValue = z49.object({
|
|
2650
2670
|
selectedPropertyIds: z49.array(z49.string()).optional(),
|
|
2651
2671
|
selectedThemeIds: z49.array(z49.string()).optional(),
|
|
@@ -3800,7 +3820,15 @@ var PageBlockCategory = z110.enum([
|
|
|
3800
3820
|
"Data",
|
|
3801
3821
|
"Other"
|
|
3802
3822
|
]);
|
|
3803
|
-
var PageBlockBehaviorDataType = z110.enum([
|
|
3823
|
+
var PageBlockBehaviorDataType = z110.enum([
|
|
3824
|
+
"Item",
|
|
3825
|
+
"Token",
|
|
3826
|
+
"Asset",
|
|
3827
|
+
"Component",
|
|
3828
|
+
"FigmaNode",
|
|
3829
|
+
"FigmaComponent",
|
|
3830
|
+
"File"
|
|
3831
|
+
]);
|
|
3804
3832
|
var PageBlockBehaviorSelectionType = z110.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
3805
3833
|
var PageBlockDefinitionBehavior = z110.object({
|
|
3806
3834
|
dataType: PageBlockBehaviorDataType,
|
|
@@ -6496,6 +6524,7 @@ var DTOFileUploadResponseItem = z212.object({
|
|
|
6496
6524
|
url: z212.string(),
|
|
6497
6525
|
size: z212.number()
|
|
6498
6526
|
});
|
|
6527
|
+
var DTOFileResponseItem = DTOFileUploadResponseItem.omit({ pendingUpload: true });
|
|
6499
6528
|
var DTOUploadUrlItem = z212.object({
|
|
6500
6529
|
fileId: z212.string(),
|
|
6501
6530
|
uploadUrl: z212.string()
|
|
@@ -6504,6 +6533,12 @@ var DTOFileUploadResponse = z212.object({
|
|
|
6504
6533
|
files: z212.array(DTOFileUploadResponseItem),
|
|
6505
6534
|
uploadUrls: z212.array(DTOUploadUrlItem)
|
|
6506
6535
|
});
|
|
6536
|
+
var DTOFilesGetPayload = z212.object({
|
|
6537
|
+
persistentIds: z212.string().array().optional()
|
|
6538
|
+
});
|
|
6539
|
+
var DTOFilesResponse = z212.object({
|
|
6540
|
+
files: z212.array(DTOFileResponseItem)
|
|
6541
|
+
});
|
|
6507
6542
|
var DTOFileUploadFinalizePayload = z212.object({
|
|
6508
6543
|
fileIds: z212.array(z212.string())
|
|
6509
6544
|
});
|
|
@@ -9085,6 +9120,16 @@ var FilesEndpoint = class {
|
|
|
9085
9120
|
}
|
|
9086
9121
|
);
|
|
9087
9122
|
}
|
|
9123
|
+
get(designSystemId, versionId, body) {
|
|
9124
|
+
return this.requestExecutor.json(
|
|
9125
|
+
`/design-systems/${designSystemId}/versions/${versionId}/files`,
|
|
9126
|
+
DTOFilesResponse,
|
|
9127
|
+
{
|
|
9128
|
+
method: "POST",
|
|
9129
|
+
body
|
|
9130
|
+
}
|
|
9131
|
+
);
|
|
9132
|
+
}
|
|
9088
9133
|
};
|
|
9089
9134
|
|
|
9090
9135
|
// src/api/endpoints/design-system/versions/import-jobs.ts
|
|
@@ -14142,6 +14187,90 @@ var blocks = [
|
|
|
14142
14187
|
isEditorPresentationDifferent: false,
|
|
14143
14188
|
showBlockHeaderInEditor: false
|
|
14144
14189
|
}
|
|
14190
|
+
},
|
|
14191
|
+
{
|
|
14192
|
+
id: "io.supernova.block.files",
|
|
14193
|
+
name: "File upload",
|
|
14194
|
+
description: "Display attachments for download",
|
|
14195
|
+
category: "Media",
|
|
14196
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/files.svg",
|
|
14197
|
+
searchKeywords: ["files", "attachments", "download", "upload"],
|
|
14198
|
+
item: {
|
|
14199
|
+
properties: [
|
|
14200
|
+
{
|
|
14201
|
+
id: "files",
|
|
14202
|
+
name: "Files",
|
|
14203
|
+
type: "File",
|
|
14204
|
+
options: {
|
|
14205
|
+
renderLayoutAs: "iconOnLeft"
|
|
14206
|
+
},
|
|
14207
|
+
variantOptions: {
|
|
14208
|
+
iconOnTop: {
|
|
14209
|
+
renderLayoutAs: "iconOnTop"
|
|
14210
|
+
},
|
|
14211
|
+
iconOnLeft: {
|
|
14212
|
+
renderLayoutAs: "iconOnLeft"
|
|
14213
|
+
}
|
|
14214
|
+
}
|
|
14215
|
+
}
|
|
14216
|
+
],
|
|
14217
|
+
appearance: {
|
|
14218
|
+
isBordered: true,
|
|
14219
|
+
hasBackground: false
|
|
14220
|
+
},
|
|
14221
|
+
variants: [
|
|
14222
|
+
{
|
|
14223
|
+
id: "iconOnTop",
|
|
14224
|
+
name: "Icon on top",
|
|
14225
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/files-icon-on-top.svg",
|
|
14226
|
+
layout: {
|
|
14227
|
+
type: "Column",
|
|
14228
|
+
children: ["files"],
|
|
14229
|
+
columnAlign: "Start",
|
|
14230
|
+
columnResizing: "Fill",
|
|
14231
|
+
gap: "Medium"
|
|
14232
|
+
},
|
|
14233
|
+
maxColumns: 4,
|
|
14234
|
+
defaultColumns: 1,
|
|
14235
|
+
appearance: {}
|
|
14236
|
+
},
|
|
14237
|
+
{
|
|
14238
|
+
id: "iconOnLeft",
|
|
14239
|
+
name: "Icon on left",
|
|
14240
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/files-leading-icon.svg",
|
|
14241
|
+
layout: {
|
|
14242
|
+
type: "Column",
|
|
14243
|
+
children: ["files"],
|
|
14244
|
+
columnAlign: "Start",
|
|
14245
|
+
columnResizing: "Fill",
|
|
14246
|
+
gap: "Medium"
|
|
14247
|
+
},
|
|
14248
|
+
maxColumns: 2,
|
|
14249
|
+
defaultColumns: 1,
|
|
14250
|
+
appearance: {}
|
|
14251
|
+
}
|
|
14252
|
+
],
|
|
14253
|
+
defaultVariantKey: "iconOnTop"
|
|
14254
|
+
},
|
|
14255
|
+
behavior: {
|
|
14256
|
+
dataType: "File",
|
|
14257
|
+
entities: {
|
|
14258
|
+
selectionType: "Entity",
|
|
14259
|
+
maxSelected: 0
|
|
14260
|
+
}
|
|
14261
|
+
},
|
|
14262
|
+
editorOptions: {
|
|
14263
|
+
onboarding: {
|
|
14264
|
+
helpText: "Display attachments for download",
|
|
14265
|
+
documentationLink: "https://learn.supernova.io/file-upload-block"
|
|
14266
|
+
}
|
|
14267
|
+
},
|
|
14268
|
+
appearance: {
|
|
14269
|
+
isBordered: false,
|
|
14270
|
+
hasBackground: false,
|
|
14271
|
+
isEditorPresentationDifferent: false,
|
|
14272
|
+
showBlockHeaderInEditor: false
|
|
14273
|
+
}
|
|
14145
14274
|
}
|
|
14146
14275
|
];
|
|
14147
14276
|
|
|
@@ -14771,6 +14900,8 @@ function valueSchemaForPropertyType(type) {
|
|
|
14771
14900
|
return PageBlockItemFigmaComponentValue;
|
|
14772
14901
|
case "RichTextEditor":
|
|
14773
14902
|
return PageBlockItemRichTextEditorValue;
|
|
14903
|
+
case "File":
|
|
14904
|
+
return PageBlockItemFileValue;
|
|
14774
14905
|
}
|
|
14775
14906
|
}
|
|
14776
14907
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
@@ -15578,12 +15709,15 @@ export {
|
|
|
15578
15709
|
DTOFigmaNodeStructureListResponse,
|
|
15579
15710
|
DTOFigmaNodeV2,
|
|
15580
15711
|
DTOFigmaSourceUpdatePayload,
|
|
15712
|
+
DTOFileResponseItem,
|
|
15581
15713
|
DTOFileUploadFinalizePayload,
|
|
15582
15714
|
DTOFileUploadFinalizeResponse,
|
|
15583
15715
|
DTOFileUploadItem,
|
|
15584
15716
|
DTOFileUploadPayload,
|
|
15585
15717
|
DTOFileUploadResponse,
|
|
15586
15718
|
DTOFileUploadResponseItem,
|
|
15719
|
+
DTOFilesGetPayload,
|
|
15720
|
+
DTOFilesResponse,
|
|
15587
15721
|
DTOFrameNodeStructure,
|
|
15588
15722
|
DTOFrameNodeStructureListResponse,
|
|
15589
15723
|
DTOGetBlockDefinitionsOutput,
|