@supernova-studio/model 0.35.0 → 0.37.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 +352 -128
- package/dist/index.d.ts +352 -128
- package/dist/index.js +170 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +588 -436
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/billing/product.ts +1 -1
- package/src/dsm/brand.ts +11 -7
- package/src/dsm/elements/data/documentation-block-v2.ts +46 -38
- package/src/dsm/elements/index.ts +1 -0
- package/src/dsm/elements/utils.ts +114 -0
- package/src/dsm/properties/property-definition.ts +7 -5
- package/src/dsm/properties/property-value.ts +1 -1
- package/src/dsm/version.ts +24 -14
- package/src/dsm/views/column.ts +46 -32
- package/src/dsm/views/view.ts +12 -9
package/package.json
CHANGED
package/src/billing/product.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
-
export const ProductCodeSchema = z.enum(["free", "team", "
|
|
3
|
+
export const ProductCodeSchema = z.enum(["free", "team", "company", "enterprise"]);
|
|
4
4
|
export type ProductCode = z.infer<typeof ProductCodeSchema>;
|
|
5
5
|
export const ProductCode = ProductCodeSchema.enum;
|
package/src/dsm/brand.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const Brand = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
designSystemVersionId: z.string(),
|
|
6
|
+
persistentId: z.string(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
description: z.string(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type Brand = z.infer<typeof Brand>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { PageBlockCalloutType, PageBlockCodeLanguage, PageBlockText } from "./documentation-block-v1";
|
|
3
2
|
import { DesignTokenType } from "../raw-element";
|
|
3
|
+
import { PageBlockCalloutType, PageBlockCodeLanguage, PageBlockText } from "./documentation-block-v1";
|
|
4
4
|
|
|
5
5
|
//
|
|
6
6
|
// Enums
|
|
@@ -112,17 +112,19 @@ export const PageBlockItemAssetValue = z.object({
|
|
|
112
112
|
showSearch: z.boolean().optional(),
|
|
113
113
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
114
114
|
backgroundColor: PageBlockColorV2.optional(),
|
|
115
|
-
value: z
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
value: z
|
|
116
|
+
.array(
|
|
117
|
+
z.object({
|
|
118
|
+
entityId: z.string(),
|
|
119
|
+
entityType: z.enum(["Asset", "AssetGroup"]),
|
|
120
|
+
entityMeta: PageBlockAssetEntityMeta.optional(),
|
|
121
|
+
})
|
|
122
|
+
)
|
|
123
|
+
.default([]),
|
|
122
124
|
});
|
|
123
125
|
|
|
124
126
|
export const PageBlockItemAssetPropertyValue = z.object({
|
|
125
|
-
value: z.array(z.string()),
|
|
127
|
+
value: z.array(z.string()).default([]),
|
|
126
128
|
});
|
|
127
129
|
|
|
128
130
|
export const PageBlockItemBooleanValue = z.object({
|
|
@@ -148,12 +150,14 @@ export const PageBlockItemColorValue = z.record(z.any());
|
|
|
148
150
|
|
|
149
151
|
export const PageBlockItemComponentValue = z.object({
|
|
150
152
|
selectedPropertyIds: z.array(z.string()).optional(),
|
|
151
|
-
value: z
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
value: z
|
|
154
|
+
.array(
|
|
155
|
+
z.object({
|
|
156
|
+
entityId: z.string(),
|
|
157
|
+
entityType: z.enum(["Component", "ComponentGroup"]),
|
|
158
|
+
})
|
|
159
|
+
)
|
|
160
|
+
.default([]),
|
|
157
161
|
});
|
|
158
162
|
|
|
159
163
|
export const PageBlockItemComponentPropertyValue = z.object({
|
|
@@ -180,12 +184,14 @@ export const PageBlockItemFigmaNodeValue = z.object({
|
|
|
180
184
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
181
185
|
backgroundColor: PageBlockColorV2.optional(),
|
|
182
186
|
showFrameDetails: z.boolean().optional(),
|
|
183
|
-
value: z
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
value: z
|
|
188
|
+
.array(
|
|
189
|
+
z.object({
|
|
190
|
+
entityId: z.string(),
|
|
191
|
+
entityMeta: PageBlockFigmaNodeEntityMeta.optional(),
|
|
192
|
+
})
|
|
193
|
+
)
|
|
194
|
+
.default([]),
|
|
189
195
|
});
|
|
190
196
|
|
|
191
197
|
export const PageBlockItemImageValue = z.object({
|
|
@@ -204,7 +210,7 @@ export const PageBlockItemMultiRichTextValue = z.object({
|
|
|
204
210
|
});
|
|
205
211
|
|
|
206
212
|
export const PageBlockItemMultiSelectValue = z.object({
|
|
207
|
-
value: z.array(z.string()),
|
|
213
|
+
value: z.array(z.string()).default([]),
|
|
208
214
|
});
|
|
209
215
|
|
|
210
216
|
export const PageBlockItemNumberValue = z.object({
|
|
@@ -223,8 +229,8 @@ export const PageBlockItemSingleSelectValue = z.object({
|
|
|
223
229
|
export const PageBlockItemStorybookValue = z.object({
|
|
224
230
|
caption: z.string().optional(),
|
|
225
231
|
height: z.number().optional(),
|
|
226
|
-
|
|
227
|
-
value: z.string(),
|
|
232
|
+
embedUrl: z.string().optional(),
|
|
233
|
+
value: z.string().optional(),
|
|
228
234
|
});
|
|
229
235
|
|
|
230
236
|
export const PageBlockItemTextValue = z.object({
|
|
@@ -235,27 +241,29 @@ export const PageBlockItemTokenValue = z.object({
|
|
|
235
241
|
selectedPropertyIds: z.array(z.string()).optional(),
|
|
236
242
|
selectedThemeIds: z.array(z.string()).optional(),
|
|
237
243
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
238
|
-
value: z
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
value: z
|
|
245
|
+
.array(
|
|
246
|
+
z.object({
|
|
247
|
+
entityId: z.string(),
|
|
248
|
+
entityType: z.enum(["Token", "TokenGroup"]),
|
|
249
|
+
entityMeta: z
|
|
250
|
+
.object({
|
|
251
|
+
showNestedGroups: z.boolean().optional(),
|
|
252
|
+
})
|
|
253
|
+
.optional(),
|
|
254
|
+
})
|
|
255
|
+
)
|
|
256
|
+
.default([]),
|
|
249
257
|
});
|
|
250
258
|
|
|
251
259
|
export const PageBlockItemTokenPropertyValue = z.object({
|
|
252
260
|
selectedPropertyIds: z.array(z.string()).optional(),
|
|
253
261
|
selectedThemeIds: z.array(z.string()).optional(),
|
|
254
|
-
value: z.array(z.string()),
|
|
262
|
+
value: z.array(z.string()).default([]),
|
|
255
263
|
});
|
|
256
264
|
|
|
257
265
|
export const PageBlockItemTokenTypeValue = z.object({
|
|
258
|
-
value: z.array(DesignTokenType),
|
|
266
|
+
value: z.array(DesignTokenType).default([]),
|
|
259
267
|
});
|
|
260
268
|
|
|
261
269
|
export const PageBlockItemUrlValue = z.object({
|
|
@@ -330,7 +338,7 @@ export const PageBlockItemTableValue = z.object({
|
|
|
330
338
|
highlightHeaderColumn: z.boolean().optional(),
|
|
331
339
|
highlightHeaderRow: z.boolean().optional(),
|
|
332
340
|
showBorder: z.boolean().optional(),
|
|
333
|
-
value: z.array(PageBlockItemTableRow),
|
|
341
|
+
value: z.array(PageBlockItemTableRow).default([]),
|
|
334
342
|
});
|
|
335
343
|
|
|
336
344
|
export type PageBlockItemTableRichTextNode = z.infer<typeof PageBlockItemTableRichTextNode>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { DocumentationPageContentItem, PageBlockDefinition, PageBlockDefinitionProperty } from "../documentation";
|
|
2
|
+
import { PageBlockItemUntypedValue, PageBlockItemV2 } from "./data";
|
|
3
|
+
import { PageBlockEditorModelV2 } from "./page-block-v2";
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
// Traverse
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Pay attention to correct types!
|
|
11
|
+
*/
|
|
12
|
+
export function mapPageBlockItemValuesV2(
|
|
13
|
+
pageItems: DocumentationPageContentItem[],
|
|
14
|
+
definitionsMap: PageBlockDefinitionsMap,
|
|
15
|
+
fn: (
|
|
16
|
+
block: PageBlockEditorModelV2,
|
|
17
|
+
item: PageBlockItemV2,
|
|
18
|
+
property: PageBlockDefinitionProperty,
|
|
19
|
+
value: PageBlockItemUntypedValue
|
|
20
|
+
) => PageBlockItemUntypedValue
|
|
21
|
+
) {
|
|
22
|
+
traversePageBlockItemsV2(pageItems, (block, item) => {
|
|
23
|
+
Object.entries(item.props).forEach(([propKey, value]) => {
|
|
24
|
+
const property = definitionsMap.getDefinitionProperty(block.data.packageId, propKey);
|
|
25
|
+
if (!property) return;
|
|
26
|
+
|
|
27
|
+
item.props[propKey] = fn(block, item, property, value);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function traversePageBlockItemValuesV2(
|
|
33
|
+
pageItems: DocumentationPageContentItem[],
|
|
34
|
+
definitionsMap: PageBlockDefinitionsMap,
|
|
35
|
+
fn: (
|
|
36
|
+
block: PageBlockEditorModelV2,
|
|
37
|
+
item: PageBlockItemV2,
|
|
38
|
+
property: PageBlockDefinitionProperty,
|
|
39
|
+
value: PageBlockItemUntypedValue
|
|
40
|
+
) => void
|
|
41
|
+
) {
|
|
42
|
+
traversePageBlockItemsV2(pageItems, (block, item) => {
|
|
43
|
+
Object.entries(item.props).forEach(([propKey, value]) => {
|
|
44
|
+
const property = definitionsMap.getDefinitionProperty(block.data.packageId, propKey);
|
|
45
|
+
if (!property) return;
|
|
46
|
+
|
|
47
|
+
fn(block, item, property, value);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function traversePageBlockItemsV2(
|
|
53
|
+
pageItems: DocumentationPageContentItem[],
|
|
54
|
+
fn: (block: PageBlockEditorModelV2, item: PageBlockItemV2) => void
|
|
55
|
+
) {
|
|
56
|
+
traversePageItemsV2(pageItems, block => {
|
|
57
|
+
block.data.items.forEach(item => {
|
|
58
|
+
fn(block, item);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function traversePageItemsV2(
|
|
64
|
+
pageItems: DocumentationPageContentItem[],
|
|
65
|
+
fn: (item: PageBlockEditorModelV2) => void
|
|
66
|
+
): void {
|
|
67
|
+
for (const item of pageItems) {
|
|
68
|
+
switch (item.type) {
|
|
69
|
+
case "Block":
|
|
70
|
+
fn(item);
|
|
71
|
+
|
|
72
|
+
break;
|
|
73
|
+
|
|
74
|
+
case "Section":
|
|
75
|
+
item.items.forEach(i => {
|
|
76
|
+
i.columns.forEach(c => {
|
|
77
|
+
traversePageItemsV2(c.blocks, fn);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//
|
|
87
|
+
// Definitions map
|
|
88
|
+
//
|
|
89
|
+
|
|
90
|
+
export class PageBlockDefinitionsMap {
|
|
91
|
+
private definitionsMap = new Map<string, PageBlockDefinition>();
|
|
92
|
+
private propertiesMap = new Map<string, PageBlockDefinitionProperty>();
|
|
93
|
+
|
|
94
|
+
constructor(definitions: PageBlockDefinition[]) {
|
|
95
|
+
definitions.forEach(d => {
|
|
96
|
+
this.definitionsMap.set(d.id, d);
|
|
97
|
+
d.item.properties.forEach(p => {
|
|
98
|
+
this.propertiesMap.set(this.propertyKey(d.id, p.id), p);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
getDefinition(id: string): PageBlockDefinition | undefined {
|
|
104
|
+
return this.definitionsMap.get(id);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
getDefinitionProperty(defId: string, propId: string): PageBlockDefinitionProperty | undefined {
|
|
108
|
+
return this.propertiesMap.get(this.propertyKey(defId, propId));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
private propertyKey(defId: string, propId: string): string {
|
|
112
|
+
return `${defId}.${propId}`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { DbCreateInputOmit, DbUpdate } from "../../helpers";
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const ElementPropertyTypeSchema = z.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
5
5
|
export const ElementPropertyTargetType = z.enum(["Token", "Component", "DocumentationPage"]);
|
|
6
6
|
export const ElementPropertyLinkType = z.enum(["FigmaComponent", "DocumentationPage"]);
|
|
7
7
|
|
|
@@ -22,13 +22,15 @@ export const ElementPropertyDefinition = z.object({
|
|
|
22
22
|
name: z.string(),
|
|
23
23
|
codeName: z.string(),
|
|
24
24
|
description: z.string(),
|
|
25
|
-
type:
|
|
25
|
+
type: ElementPropertyTypeSchema,
|
|
26
26
|
targetElementType: ElementPropertyTargetType,
|
|
27
|
-
options: z.array(ElementPropertyDefinitionOption).
|
|
28
|
-
linkElementType: ElementPropertyLinkType.
|
|
27
|
+
options: z.array(ElementPropertyDefinitionOption).optional(),
|
|
28
|
+
linkElementType: ElementPropertyLinkType.optional(),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
export type ElementPropertyType = z.infer<typeof
|
|
31
|
+
export type ElementPropertyType = z.infer<typeof ElementPropertyTypeSchema>;
|
|
32
|
+
export const ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
33
|
+
|
|
32
34
|
export type ElementPropertyTargetType = z.infer<typeof ElementPropertyTargetType>;
|
|
33
35
|
export type ElementPropertyLinkType = z.infer<typeof ElementPropertyLinkType>;
|
|
34
36
|
export type ColorTokenInlineData = z.infer<typeof ColorTokenInlineData>;
|
|
@@ -11,7 +11,7 @@ export const ElementPropertyValue = z.object({
|
|
|
11
11
|
numberValue: z.number().nullish(),
|
|
12
12
|
booleanValue: z.boolean().nullish(),
|
|
13
13
|
referenceValue: z.string().nullish(),
|
|
14
|
-
referenceValuePreview: z.string().
|
|
14
|
+
referenceValuePreview: z.string().optional(),
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
export type ElementPropertyValue = z.infer<typeof ElementPropertyValue>;
|
package/src/dsm/version.ts
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { OmitStrict } from "../utils";
|
|
3
|
+
import { DbCreateInputOmit, DbUpdate } from "../helpers";
|
|
4
|
+
|
|
5
|
+
export const DesignSystemVersion = z.object({
|
|
6
|
+
id: z.string(),
|
|
7
|
+
version: z.string(),
|
|
8
|
+
createdAt: z.date(),
|
|
9
|
+
designSystemId: z.string(),
|
|
10
|
+
name: z.string(),
|
|
11
|
+
comment: z.string(),
|
|
12
|
+
isReadonly: z.boolean(),
|
|
13
|
+
changeLog: z.string(),
|
|
14
|
+
parentId: z.string().optional(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type DesignSystemVersion = z.infer<typeof DesignSystemVersion>;
|
|
18
|
+
|
|
19
|
+
export type CreateDesignSystemVersion = DbCreateInputOmit<DesignSystemVersion>;
|
|
20
|
+
|
|
21
|
+
export type UpdateDesignSystemVersion = OmitStrict<
|
|
22
|
+
DbUpdate<DesignSystemVersion>,
|
|
23
|
+
"designSystemId" | "isReadonly" | "version" | "parentId"
|
|
24
|
+
>;
|
package/src/dsm/views/column.ts
CHANGED
|
@@ -1,37 +1,51 @@
|
|
|
1
1
|
import { DbCreateInputOmit, DbUpdate } from "../../helpers";
|
|
2
2
|
import { OmitStrict } from "../../utils";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
type: "
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
export const ElementViewBaseColumnType = z.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
6
|
+
|
|
7
|
+
export const ElementViewColumnType = z.union([
|
|
8
|
+
z.literal("BaseProperty"),
|
|
9
|
+
z.literal("PropertyDefinition"),
|
|
10
|
+
z.literal("Theme"),
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
export const ElementViewColumnSharedAttributes = z.object({
|
|
14
|
+
id: z.string(),
|
|
15
|
+
persistentId: z.string(),
|
|
16
|
+
elementDataViewId: z.string(),
|
|
17
|
+
sortPosition: z.number(),
|
|
18
|
+
width: z.number(),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
22
|
+
type: z.literal("BaseProperty"),
|
|
23
|
+
basePropertyType: ElementViewBaseColumnType,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
27
|
+
type: z.literal("PropertyDefinition"),
|
|
28
|
+
propertyDefinitionId: z.string(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
32
|
+
type: z.literal("Theme"),
|
|
33
|
+
themeId: z.string(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export const ElementViewColumn = z.discriminatedUnion("type", [
|
|
37
|
+
ElementViewBasePropertyColumn,
|
|
38
|
+
ElementViewPropertyDefinitionColumn,
|
|
39
|
+
ElementViewThemeColumn,
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
export type ElementViewBaseColumnType = z.infer<typeof ElementViewBaseColumnType>;
|
|
43
|
+
export type ElementViewBasePropertyColumn = z.infer<typeof ElementViewBasePropertyColumn>;
|
|
44
|
+
export type ElementViewPropertyDefinitionColumn = z.infer<typeof ElementViewPropertyDefinitionColumn>;
|
|
45
|
+
export type ElementViewThemeColumn = z.infer<typeof ElementViewThemeColumn>;
|
|
46
|
+
export type ElementViewColumn = z.infer<typeof ElementViewColumn>;
|
|
47
|
+
export type ElementViewColumnSharedAttributes = z.infer<typeof ElementViewColumnSharedAttributes>;
|
|
48
|
+
export type ElementViewColumnType = z.infer<typeof ElementViewColumn>["type"];
|
|
35
49
|
|
|
36
50
|
export type CreateElementViewColumn =
|
|
37
51
|
| DbCreateInputOmit<ElementViewBasePropertyColumn>
|
package/src/dsm/views/view.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ElementPropertyTargetType } from "../properties";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
id: string
|
|
5
|
-
persistentId: string
|
|
6
|
-
designSystemVersionId: string
|
|
7
|
-
name: string
|
|
8
|
-
description: string
|
|
9
|
-
targetElementType: ElementPropertyTargetType
|
|
10
|
-
isDefault: boolean
|
|
11
|
-
};
|
|
4
|
+
export const ElementView = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
persistentId: z.string(),
|
|
7
|
+
designSystemVersionId: z.string(),
|
|
8
|
+
name: z.string(),
|
|
9
|
+
description: z.string(),
|
|
10
|
+
targetElementType: ElementPropertyTargetType,
|
|
11
|
+
isDefault: z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export type ElementView = z.infer<typeof ElementView>;
|