@supernova-studio/model 0.47.23 → 0.47.28
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 +327 -134
- package/dist/index.d.ts +327 -134
- package/dist/index.js +42 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/dsm/documentation/block-definitions/definition.ts +1 -1
- package/src/dsm/documentation/block-definitions/item.ts +10 -1
- package/src/dsm/elements/data/documentation-block-v2.ts +25 -0
- package/src/export/export-jobs.ts +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supernova-studio/model",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.28",
|
|
4
4
|
"description": "Supernova Data Models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"license": "ISC",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@sindresorhus/slugify": "1.1.2",
|
|
34
|
-
"ip-cidr": "
|
|
35
|
-
"zod": "
|
|
34
|
+
"ip-cidr": "3.1.0",
|
|
35
|
+
"zod": "3.23.6"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"fs": "
|
|
39
|
-
"tsup": "
|
|
40
|
-
"typescript": "
|
|
38
|
+
"fs": "0.0.1-security",
|
|
39
|
+
"tsup": "8.0.2",
|
|
40
|
+
"typescript": "5.0.4"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -23,7 +23,7 @@ export const PageBlockCategory = z.enum([
|
|
|
23
23
|
"Other",
|
|
24
24
|
]);
|
|
25
25
|
|
|
26
|
-
export const PageBlockBehaviorDataType = z.enum(["Item", "Token", "Asset", "Component", "FigmaNode"]);
|
|
26
|
+
export const PageBlockBehaviorDataType = z.enum(["Item", "Token", "Asset", "Component", "FigmaNode", "FigmaComponent"]);
|
|
27
27
|
export const PageBlockBehaviorSelectionType = z.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
28
28
|
|
|
29
29
|
export type PageBlockCategory = z.infer<typeof PageBlockCategory>;
|
|
@@ -32,6 +32,7 @@ export const PageBlockDefinitionPropertyType = z.enum([
|
|
|
32
32
|
"Divider",
|
|
33
33
|
"Storybook",
|
|
34
34
|
"Color",
|
|
35
|
+
"FigmaComponent",
|
|
35
36
|
]);
|
|
36
37
|
|
|
37
38
|
export const PageBlockDefinitionRichTextPropertyStyle = z.enum([
|
|
@@ -87,6 +88,12 @@ export const PageBlockDefinitionSingleSelectPropertyColor = z.enum([
|
|
|
87
88
|
"Fuchsia",
|
|
88
89
|
]);
|
|
89
90
|
|
|
91
|
+
export const IconSet = z.enum([
|
|
92
|
+
"CheckCircle",
|
|
93
|
+
"CrossCircle",
|
|
94
|
+
"Alert",
|
|
95
|
+
]);
|
|
96
|
+
|
|
90
97
|
export const PageBlockDefinitionMultiSelectPropertyStyle = z.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
91
98
|
|
|
92
99
|
export const PageBlockDefinitionImageAspectRatio = z.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
@@ -113,7 +120,8 @@ export type PageBlockDefinitionImageWidth = z.infer<typeof PageBlockDefinitionIm
|
|
|
113
120
|
export const PageBlockDefinitionSelectChoice = z.object({
|
|
114
121
|
value: z.string(),
|
|
115
122
|
name: z.string(),
|
|
116
|
-
icon:
|
|
123
|
+
icon: IconSet.optional(),
|
|
124
|
+
customIconUrl: z.string().optional(),
|
|
117
125
|
color: PageBlockDefinitionSingleSelectPropertyColor.optional(),
|
|
118
126
|
});
|
|
119
127
|
|
|
@@ -138,6 +146,7 @@ export const PageBlockDefinitionTextOptions = z.object({
|
|
|
138
146
|
defaultValue: z.string().optional(),
|
|
139
147
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
140
148
|
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
149
|
+
allowLineBreaks: z.boolean().optional(),
|
|
141
150
|
});
|
|
142
151
|
|
|
143
152
|
export const PageBlockDefinitionSelectOptions = z.object({
|
|
@@ -52,6 +52,13 @@ export const PageBlockAssetEntityMeta = z.object({
|
|
|
52
52
|
backgroundColor: PageBlockColorV2.optional(),
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
+
export const PageBlockFigmaComponentEntityMeta = z.object({
|
|
56
|
+
title: z.string().optional(),
|
|
57
|
+
description: z.string().optional(),
|
|
58
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
59
|
+
selectedComponentProperties: z.array(z.string()).optional(),
|
|
60
|
+
});
|
|
61
|
+
|
|
55
62
|
export const PageBlockFigmaNodeEntityMeta = z.object({
|
|
56
63
|
title: z.string().optional(),
|
|
57
64
|
description: z.string().optional(),
|
|
@@ -96,6 +103,7 @@ export type PageBlockResourceFrameNodeReference = z.infer<typeof PageBlockResour
|
|
|
96
103
|
export type PageBlockImageReference = z.infer<typeof PageBlockImageReference>;
|
|
97
104
|
export type PageBlockColorV2 = z.infer<typeof PageBlockColorV2>;
|
|
98
105
|
export type PageBlockAssetEntityMeta = z.infer<typeof PageBlockAssetEntityMeta>;
|
|
106
|
+
export type PageBlockFigmaComponentEntityMeta = z.infer<typeof PageBlockFigmaComponentEntityMeta>;
|
|
99
107
|
export type PageBlockFigmaNodeEntityMeta = z.infer<typeof PageBlockFigmaNodeEntityMeta>;
|
|
100
108
|
export type PageBlockAppearanceV2 = z.infer<typeof PageBlockAppearanceV2>;
|
|
101
109
|
export type PageBlockItemUntypedValue = z.infer<typeof PageBlockItemUntypedValue>;
|
|
@@ -127,6 +135,23 @@ export const PageBlockItemAssetPropertyValue = z.object({
|
|
|
127
135
|
value: z.array(z.string()).default([]),
|
|
128
136
|
});
|
|
129
137
|
|
|
138
|
+
export const PageBlockItemFigmaComponentValue = z.object({
|
|
139
|
+
showComponentName: z.boolean().optional(),
|
|
140
|
+
showComponentDescription: z.boolean().optional(),
|
|
141
|
+
showPropertyList: z.boolean().optional(),
|
|
142
|
+
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
143
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
144
|
+
value: z
|
|
145
|
+
.array(
|
|
146
|
+
z.object({
|
|
147
|
+
entityId: z.string(),
|
|
148
|
+
entityType: z.enum(["FigmaComponent"]),
|
|
149
|
+
entityMeta: PageBlockFigmaComponentEntityMeta.optional(),
|
|
150
|
+
})
|
|
151
|
+
)
|
|
152
|
+
.default([]),
|
|
153
|
+
});
|
|
154
|
+
|
|
130
155
|
export const PageBlockItemBooleanValue = z.object({
|
|
131
156
|
value: z.boolean(),
|
|
132
157
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { PublishedDocEnvironment } from "../dsm";
|
|
3
|
-
import { DbCreateInputOmit, DbUpdate } from "../helpers";
|
|
3
|
+
import { DbCreateInputOmit, DbUpdate, nullishToOptional } from "../helpers";
|
|
4
4
|
import { ExportDestinationsMap } from "./export-destinations";
|
|
5
5
|
|
|
6
6
|
//
|
|
@@ -51,12 +51,12 @@ export const ExportJobDocsDestinationResult = z.object({
|
|
|
51
51
|
|
|
52
52
|
export const ExportJobResult = z.object({
|
|
53
53
|
error: z.string().optional(),
|
|
54
|
-
s3: ExportJobS3DestinationResult
|
|
55
|
-
github: ExportJobPullRequestDestinationResult
|
|
56
|
-
azure: ExportJobPullRequestDestinationResult
|
|
57
|
-
gitlab: ExportJobPullRequestDestinationResult
|
|
58
|
-
bitbucket: ExportJobPullRequestDestinationResult
|
|
59
|
-
sndocs: ExportJobDocsDestinationResult
|
|
54
|
+
s3: nullishToOptional(ExportJobS3DestinationResult),
|
|
55
|
+
github: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
56
|
+
azure: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
57
|
+
gitlab: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
58
|
+
bitbucket: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
59
|
+
sndocs: nullishToOptional(ExportJobDocsDestinationResult),
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
export type ExportJobLogEntry = z.infer<typeof ExportJobLogEntry>;
|