@supernova-studio/model 0.47.22 → 0.47.27
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 +302 -109
- package/dist/index.d.ts +302 -109
- package/dist/index.js +40 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -9
- 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 +9 -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.27",
|
|
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>;
|
|
@@ -87,6 +87,12 @@ export const PageBlockDefinitionSingleSelectPropertyColor = z.enum([
|
|
|
87
87
|
"Fuchsia",
|
|
88
88
|
]);
|
|
89
89
|
|
|
90
|
+
export const IconSet = z.enum([
|
|
91
|
+
"CheckCircle",
|
|
92
|
+
"CrossCircle",
|
|
93
|
+
"Alert",
|
|
94
|
+
]);
|
|
95
|
+
|
|
90
96
|
export const PageBlockDefinitionMultiSelectPropertyStyle = z.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
91
97
|
|
|
92
98
|
export const PageBlockDefinitionImageAspectRatio = z.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
@@ -113,7 +119,8 @@ export type PageBlockDefinitionImageWidth = z.infer<typeof PageBlockDefinitionIm
|
|
|
113
119
|
export const PageBlockDefinitionSelectChoice = z.object({
|
|
114
120
|
value: z.string(),
|
|
115
121
|
name: z.string(),
|
|
116
|
-
icon:
|
|
122
|
+
icon: IconSet.optional(),
|
|
123
|
+
customIconUrl: z.string().optional(),
|
|
117
124
|
color: PageBlockDefinitionSingleSelectPropertyColor.optional(),
|
|
118
125
|
});
|
|
119
126
|
|
|
@@ -138,6 +145,7 @@ export const PageBlockDefinitionTextOptions = z.object({
|
|
|
138
145
|
defaultValue: z.string().optional(),
|
|
139
146
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
140
147
|
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
148
|
+
allowLineBreaks: z.boolean().optional(),
|
|
141
149
|
});
|
|
142
150
|
|
|
143
151
|
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>;
|