@supernova-studio/model 0.58.20 → 0.58.21
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 +1353 -19
- package/dist/index.d.ts +1353 -19
- package/dist/index.js +26 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/data/documentation-block-v1.ts +23 -1
- package/src/dsm/elements/data/documentation-block-v2.ts +8 -3
package/package.json
CHANGED
|
@@ -88,6 +88,7 @@ export const PageBlockCodeLanguage = z.enum([
|
|
|
88
88
|
|
|
89
89
|
export const PageBlockAlignment = z.enum(["Left", "Center", "Stretch", "Right"]);
|
|
90
90
|
export const PageBlockThemeType = z.enum(["Override", "Comparison"]);
|
|
91
|
+
export const PageBlockTokenNameFormat = z.enum(["Name", "GroupAndName", "FullPath", "CustomProperty"]);
|
|
91
92
|
export const PageBlockAssetType = z.enum(["image", "figmaFrame"]);
|
|
92
93
|
|
|
93
94
|
export const PageBlockTilesAlignment = z.enum(["Center", "FrameHeight"]);
|
|
@@ -179,6 +180,7 @@ export const PageBlockFigmaFrameProperties = z.object({
|
|
|
179
180
|
})
|
|
180
181
|
),
|
|
181
182
|
alignment: PageBlockTilesAlignment,
|
|
183
|
+
previewContainerHeight: nullishToOptional(z.number()),
|
|
182
184
|
layout: PageBlockTilesLayout,
|
|
183
185
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
184
186
|
showTitles: z.boolean(),
|
|
@@ -215,9 +217,20 @@ export const PageBlockFigmaComponentBlockConfig = z.object({
|
|
|
215
217
|
showPropertyList: nullishToOptional(z.boolean()),
|
|
216
218
|
previewOrderIds: nullishToOptional(z.array(z.string())),
|
|
217
219
|
previewContainerSize: nullishToOptional(z.enum(["Centered", "NaturalHeight"])),
|
|
220
|
+
previewContainerHeight: nullishToOptional(z.number()),
|
|
218
221
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
219
222
|
});
|
|
220
223
|
|
|
224
|
+
export const PageBlockTokenBlockConfig = z.object({
|
|
225
|
+
tokenNameFormat: nullishToOptional(PageBlockTokenNameFormat),
|
|
226
|
+
tokenNameCustomPropertyId: nullishToOptional(z.string()),
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
export const PageBlockAssetBlockConfig = z.object({
|
|
230
|
+
showSearch: nullishToOptional(z.boolean()),
|
|
231
|
+
showAssetDescription: nullishToOptional(z.boolean()),
|
|
232
|
+
});
|
|
233
|
+
|
|
221
234
|
export const PageBlockSelectedFigmaComponent = z.object({
|
|
222
235
|
figmaComponentId: z.string(),
|
|
223
236
|
selectedComponentProperties: z.string().array(),
|
|
@@ -259,6 +272,8 @@ export const PageBlockGuideline = z.object({
|
|
|
259
272
|
imageAlt: nullishToOptional(z.string()),
|
|
260
273
|
imageCaption: nullishToOptional(z.string()),
|
|
261
274
|
imageAlignment: nullishToOptional(PageBlockAlignment),
|
|
275
|
+
openLightbox: nullishToOptional(z.boolean()),
|
|
276
|
+
isBordered: nullishToOptional(z.boolean()),
|
|
262
277
|
});
|
|
263
278
|
|
|
264
279
|
export type PageBlockCalloutType = z.infer<typeof PageBlockCalloutType>;
|
|
@@ -285,6 +300,7 @@ export type PageBlockShortcut = z.infer<typeof PageBlockShortcut>;
|
|
|
285
300
|
export type PageBlockCustomBlockPropertyValue = z.infer<typeof PageBlockCustomBlockPropertyValue>;
|
|
286
301
|
export type PageBlockCustomBlockPropertyImageValue = z.infer<typeof PageBlockCustomBlockPropertyImageValue>;
|
|
287
302
|
export type PageBlockFigmaComponentBlockConfig = z.infer<typeof PageBlockFigmaComponentBlockConfig>;
|
|
303
|
+
export type PageBlockTokenNameFormat = z.infer<typeof PageBlockTokenNameFormat>;
|
|
288
304
|
|
|
289
305
|
//
|
|
290
306
|
// Block
|
|
@@ -319,6 +335,8 @@ export const PageBlockBaseV1 = z.object({
|
|
|
319
335
|
asset: nullishToOptional(PageBlockAsset),
|
|
320
336
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
321
337
|
imageAlt: nullishToOptional(z.string()),
|
|
338
|
+
openLightbox: nullishToOptional(z.boolean()),
|
|
339
|
+
isBordered: nullishToOptional(z.boolean()),
|
|
322
340
|
|
|
323
341
|
// Shortcuts block
|
|
324
342
|
shortcuts: nullishToOptional(z.array(PageBlockShortcut)),
|
|
@@ -349,10 +367,14 @@ export const PageBlockBaseV1 = z.object({
|
|
|
349
367
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
350
368
|
columnId: nullishToOptional(z.string()),
|
|
351
369
|
|
|
352
|
-
//
|
|
370
|
+
// Design tokens
|
|
353
371
|
theme: nullishToOptional(PageBlockTheme),
|
|
354
372
|
swatches: nullishToOptional(PageBlockSwatch.array()),
|
|
355
373
|
blacklistedElementProperties: nullishToOptional(z.array(z.string())),
|
|
374
|
+
tokenBlockConfig: nullishToOptional(PageBlockTokenBlockConfig),
|
|
375
|
+
|
|
376
|
+
// (Vector) assets
|
|
377
|
+
assetBlockConfig: nullishToOptional(PageBlockAssetBlockConfig),
|
|
356
378
|
|
|
357
379
|
// Figma components
|
|
358
380
|
figmaComponentsBlockConfig: nullishToOptional(PageBlockFigmaComponentBlockConfig),
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { PageBlockDefinitionMultiRichTextPropertyStyle } from "../../documentation/block-definitions/item";
|
|
3
3
|
import { DesignTokenType } from "../raw-element";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
PageBlockCalloutType,
|
|
6
|
+
PageBlockCodeLanguage,
|
|
7
|
+
PageBlockText,
|
|
8
|
+
PageBlockTokenNameFormat,
|
|
9
|
+
} from "./documentation-block-v1";
|
|
5
10
|
|
|
6
11
|
//
|
|
7
12
|
// Enums
|
|
@@ -13,7 +18,6 @@ export const PageBlockImageAlignment = z.enum(["Left", "Center", "Stretch"]);
|
|
|
13
18
|
export const PageBlockTableCellAlignment = z.enum(["Left", "Center", "Right"]);
|
|
14
19
|
export const PageBlockPreviewContainerSize = z.enum(["Centered", "NaturalHeight"]);
|
|
15
20
|
export const PageBlockThemeDisplayMode = z.enum(["Split", "Override"]);
|
|
16
|
-
export const PageBlockTokenNameFormat = z.enum(["Name", "GroupAndName", "FullPath", "CustomProperty"]);
|
|
17
21
|
export const PageBlockTokenValueFormat = z.enum(["ResolvedValue", "ReferenceName", "NoValue"]);
|
|
18
22
|
|
|
19
23
|
export type PageBlockLinkType = z.infer<typeof PageBlockLinkType>;
|
|
@@ -22,7 +26,6 @@ export type PageBlockImageAlignment = z.infer<typeof PageBlockImageAlignment>;
|
|
|
22
26
|
export type PageBlockTableCellAlignment = z.infer<typeof PageBlockTableCellAlignment>;
|
|
23
27
|
export type PageBlockPreviewContainerSize = z.infer<typeof PageBlockPreviewContainerSize>;
|
|
24
28
|
export type PageBlockThemeDisplayMode = z.infer<typeof PageBlockThemeDisplayMode>;
|
|
25
|
-
export type PageBlockTokenNameFormat = z.infer<typeof PageBlockTokenNameFormat>;
|
|
26
29
|
export type PageBlockTokenValueFormat = z.infer<typeof PageBlockTokenValueFormat>;
|
|
27
30
|
|
|
28
31
|
//
|
|
@@ -396,6 +399,8 @@ export const PageBlockItemTableImageNode = z.object({
|
|
|
396
399
|
alt: PageBlockItemImageValue.shape.alt,
|
|
397
400
|
value: PageBlockItemImageValue.shape.value,
|
|
398
401
|
alignment: PageBlockItemImageValue.shape.alignment,
|
|
402
|
+
openLightbox: PageBlockItemImageValue.shape.openLightbox,
|
|
403
|
+
isBordered: PageBlockItemImageValue.shape.isBordered,
|
|
399
404
|
});
|
|
400
405
|
|
|
401
406
|
export const PageBlockItemTableNode = z.discriminatedUnion("type", [
|