@supernova-studio/model 0.47.57 → 0.47.59
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 +3724 -4273
- package/dist/index.d.ts +3724 -4273
- package/dist/index.js +88 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/documentation/block-definitions/definition.ts +2 -3
- package/src/dsm/element-snapshots/base.ts +1 -0
- package/src/dsm/elements/data/documentation-block-v1.ts +16 -3
- package/src/liveblocks/rooms/design-system-version-room.ts +6 -8
package/package.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { AssetValue } from "../../assets/asset-value";
|
|
3
|
-
import { PageBlockDefinitionItem } from "./item";
|
|
4
2
|
import { PageBlockDefinitionAppearance } from "./aux";
|
|
5
|
-
import {
|
|
3
|
+
import { PageBlockDefinitionItem } from "./item";
|
|
6
4
|
|
|
7
5
|
//
|
|
8
6
|
// Enums
|
|
@@ -68,6 +66,7 @@ export const PageBlockDefinition = z.object({
|
|
|
68
66
|
behavior: PageBlockDefinitionBehavior,
|
|
69
67
|
editorOptions: z.object({
|
|
70
68
|
onboarding: PageBlockDefinitionOnboarding.optional(),
|
|
69
|
+
newItemLabel: z.string().optional(),
|
|
71
70
|
}),
|
|
72
71
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
73
72
|
});
|
|
@@ -4,6 +4,7 @@ export const DesignElementSnapshotReason = z.enum(["Publish", "Deletion"]);
|
|
|
4
4
|
|
|
5
5
|
export const DesignElementSnapshotBase = z.object({
|
|
6
6
|
id: z.string(),
|
|
7
|
+
persistentId: z.string(),
|
|
7
8
|
designSystemVersionId: z.string(),
|
|
8
9
|
createdAt: z.coerce.date(),
|
|
9
10
|
updatedAt: z.coerce.date(),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { DimensionTokenData } from "./dimension";
|
|
2
|
+
import { nullishToOptional } from "../../../helpers";
|
|
4
3
|
import { ColorTokenInlineData } from "../../properties";
|
|
5
4
|
import { Size } from "../primitives";
|
|
6
|
-
import {
|
|
5
|
+
import { DesignTokenType } from "../raw-element";
|
|
6
|
+
import { DimensionTokenData } from "./dimension";
|
|
7
7
|
|
|
8
8
|
//
|
|
9
9
|
// Enums
|
|
@@ -43,6 +43,7 @@ export const PageBlockTypeV1 = z.enum([
|
|
|
43
43
|
"Table",
|
|
44
44
|
"TableRow",
|
|
45
45
|
"TableCell",
|
|
46
|
+
"Guidelines",
|
|
46
47
|
]);
|
|
47
48
|
|
|
48
49
|
export const PageBlockCodeLanguage = z.enum([
|
|
@@ -228,6 +229,12 @@ export const PageBlockText = z.object({
|
|
|
228
229
|
spans: z.array(PageBlockTextSpan),
|
|
229
230
|
});
|
|
230
231
|
|
|
232
|
+
export const PageBlockGuideline = z.object({
|
|
233
|
+
description: nullishToOptional(z.string()),
|
|
234
|
+
asset: nullishToOptional(PageBlockAsset),
|
|
235
|
+
type: z.string(),
|
|
236
|
+
});
|
|
237
|
+
|
|
231
238
|
export type PageBlockCalloutType = z.infer<typeof PageBlockCalloutType>;
|
|
232
239
|
export type PageBlockCodeLanguage = z.infer<typeof PageBlockCodeLanguage>;
|
|
233
240
|
export type PageBlockAlignment = z.infer<typeof PageBlockAlignment>;
|
|
@@ -241,6 +248,7 @@ export type PageBlockTypeV1 = z.infer<typeof PageBlockTypeV1>;
|
|
|
241
248
|
export type PageBlockTextSpanAttribute = z.infer<typeof PageBlockTextSpanAttribute>;
|
|
242
249
|
export type PageBlockTextSpan = z.infer<typeof PageBlockTextSpan>;
|
|
243
250
|
export type PageBlockText = z.infer<typeof PageBlockText>;
|
|
251
|
+
export type PageBlockGuideline = z.infer<typeof PageBlockGuideline>;
|
|
244
252
|
export type PageBlockFrame = z.infer<typeof PageBlockFrame>;
|
|
245
253
|
export type PageBlockFrameOrigin = z.infer<typeof PageBlockFrameOrigin>;
|
|
246
254
|
export type PageBlockAsset = z.infer<typeof PageBlockAsset>;
|
|
@@ -258,6 +266,8 @@ export const PageBlockBaseV1 = z.object({
|
|
|
258
266
|
persistentId: z.string(),
|
|
259
267
|
type: PageBlockTypeV1,
|
|
260
268
|
|
|
269
|
+
numberOfColumns: nullishToOptional(z.number()),
|
|
270
|
+
|
|
261
271
|
// Element linking
|
|
262
272
|
designObjectId: nullishToOptional(z.string()),
|
|
263
273
|
designObjectIds: nullishToOptional(z.array(z.string())),
|
|
@@ -282,6 +292,9 @@ export const PageBlockBaseV1 = z.object({
|
|
|
282
292
|
// Shortcuts block
|
|
283
293
|
shortcuts: nullishToOptional(z.array(PageBlockShortcut)),
|
|
284
294
|
|
|
295
|
+
// Guidelines
|
|
296
|
+
guidelines: nullishToOptional(PageBlockGuideline.array()),
|
|
297
|
+
|
|
285
298
|
// Custom blocks
|
|
286
299
|
customBlockKey: nullishToOptional(z.string()),
|
|
287
300
|
customBlockProperties: nullishToOptional(z.array(PageBlockCustomBlockPropertyValue)),
|
|
@@ -38,15 +38,13 @@ export const DesignSystemVersionRoomInitialState = z.object({
|
|
|
38
38
|
export const DesignSystemVersionRoomUpdate = z.object({
|
|
39
39
|
pages: z.array(DocumentationPageV2),
|
|
40
40
|
groups: z.array(ElementGroup),
|
|
41
|
+
pageIdsToDelete: z.array(z.string()),
|
|
42
|
+
groupIdsToDelete: z.array(z.string()),
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
publishedGroupSnapshots: z.array(ElementGroupSnapshot),
|
|
47
|
-
|
|
48
|
-
deletedPageSnapshots: z.array(DocumentationPageSnapshot),
|
|
49
|
-
deletedGroupSnapshots: z.array(ElementGroupSnapshot),
|
|
44
|
+
pageSnapshots: z.array(DocumentationPageSnapshot),
|
|
45
|
+
groupSnapshots: z.array(ElementGroupSnapshot),
|
|
46
|
+
pageSnapshotIdsToDelete: z.array(z.string()),
|
|
47
|
+
groupSnapshotIdsToDelete: z.array(z.string()),
|
|
50
48
|
});
|
|
51
49
|
|
|
52
50
|
export type DesignSystemVersionRoomInternalSettings = z.infer<typeof DesignSystemVersionRoomInternalSettings>;
|