@supernova-studio/model 0.20.1 → 0.21.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 +1532 -4679
- package/dist/index.d.ts +1532 -4679
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/data/documentation-block-v2.ts +9 -9
- package/src/dsm/elements/data/item-header-v2.ts +2 -2
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import { DesignTokenType } from "../raw-element";
|
|
|
8
8
|
//
|
|
9
9
|
|
|
10
10
|
export const PageBlockLinkType = z.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
11
|
-
export const PageBlockImageType = z.enum(["
|
|
11
|
+
export const PageBlockImageType = z.enum(["Resource", "FigmaNode"]);
|
|
12
12
|
export const PageBlockImageAlignment = z.enum(["Left", "Center", "Stretch"]);
|
|
13
13
|
export const PageBlockTableCellAlignment = z.enum(["Left", "Center", "Right"]);
|
|
14
14
|
export const PageBlockPreviewContainerSize = z.enum(["Centered", "NaturalHeight"]);
|
|
@@ -27,18 +27,18 @@ export type PageBlockThemeDisplayMode = z.infer<typeof PageBlockThemeDisplayMode
|
|
|
27
27
|
|
|
28
28
|
export const PageBlockImageReference = z.object({
|
|
29
29
|
type: PageBlockImageType,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
|
|
31
|
+
resource: z
|
|
32
|
+
.object({
|
|
33
|
+
url: z.string(),
|
|
34
|
+
resourceId: z.string(),
|
|
35
|
+
})
|
|
36
|
+
.optional(),
|
|
37
|
+
|
|
33
38
|
figmaFile: z
|
|
34
39
|
.object({
|
|
35
40
|
sourceId: z.string(),
|
|
36
|
-
frameId: z.string(),
|
|
37
41
|
frameReferenceId: z.string(),
|
|
38
|
-
origin: z.object({
|
|
39
|
-
title: z.string().optional(),
|
|
40
|
-
sourceFileName: z.string().optional(),
|
|
41
|
-
}),
|
|
42
42
|
})
|
|
43
43
|
.optional(),
|
|
44
44
|
});
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DocumentationItemHeaderImageScaleType,
|
|
7
7
|
DocumentationItemHeaderImageScaleTypeSchema,
|
|
8
8
|
} from "./item-header";
|
|
9
|
-
import { PageBlockColorV2 } from "./documentation-block-v2";
|
|
9
|
+
import { PageBlockColorV2, PageBlockImageReference } from "./documentation-block-v2";
|
|
10
10
|
|
|
11
11
|
//
|
|
12
12
|
// Definitions
|
|
@@ -17,7 +17,7 @@ export const DocumentationItemHeaderV2 = z.object({
|
|
|
17
17
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
18
18
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
19
19
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
20
|
-
backgroundImageAsset:
|
|
20
|
+
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
21
21
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
22
22
|
showBackgroundOverlay: z.boolean(),
|
|
23
23
|
showCoverText: z.boolean(),
|