@supernova-studio/model 0.10.2 → 0.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/model",
3
- "version": "0.10.2",
3
+ "version": "0.12.0",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- import { ColorValue } from "./color";
3
2
  import { PageBlockCalloutType, PageBlockCodeLanguage, PageBlockText } from "./documentation-block-v1";
4
3
  import { Size } from "../primitives";
5
4
  import { DesignTokenType } from "../raw-element";
@@ -26,8 +25,10 @@ export type PageBlockThemeDisplayMode = z.infer<typeof PageBlockThemeDisplayMode
26
25
  // Definitions - Block
27
26
  //
28
27
 
28
+ export const PageBlockColorV2 = z.string();
29
+
29
30
  export const PageBlockAppearanceV2 = z.object({
30
- itemBackgroundColor: ColorValue.optional(),
31
+ itemBackgroundColor: PageBlockColorV2.optional(),
31
32
  numberOfColumns: z.number().optional(),
32
33
  });
33
34
 
@@ -59,6 +60,7 @@ export const PageBlockDataV2 = z.object({
59
60
  items: z.array(PageBlockItemV2),
60
61
  });
61
62
 
63
+ export type PageBlockColorV2 = z.infer<typeof PageBlockColorV2>;
62
64
  export type PageBlockAppearanceV2 = z.infer<typeof PageBlockAppearanceV2>;
63
65
  export type PageBlockItemUntypedValue = z.infer<typeof PageBlockItemUntypedValue>;
64
66
  export type PageBlockLinkV2 = z.infer<typeof PageBlockLinkV2>;
@@ -91,7 +93,7 @@ export const PageBlockItemAssetValue = z.object({
91
93
  selectedPropertyIds: z.array(z.string()).optional(),
92
94
  showSearch: z.boolean().optional(),
93
95
  previewContainerSize: PageBlockPreviewContainerSize.optional(),
94
- backgroundColor: z.string().optional(),
96
+ backgroundColor: PageBlockColorV2.optional(),
95
97
  value: z.array(
96
98
  z.object({
97
99
  entityId: z.string(),
@@ -7,13 +7,13 @@ export type DocumentationPageAssetType = z.infer<typeof DocumentationPageAssetTy
7
7
 
8
8
  export const DocumentationPageImageAsset = z.object({
9
9
  type: z.literal(DocumentationPageAssetType.Enum.image),
10
- url: z.string().url().optional(),
10
+ url: z.string().optional(),
11
11
  id: SafeIdSchema,
12
12
  });
13
13
 
14
14
  export const DocumentationPageFrameAsset = z.object({
15
15
  type: z.literal(DocumentationPageAssetType.Enum.figmaFrame),
16
- url: z.string().url().optional(),
16
+ url: z.string().optional(),
17
17
  figmaFrame: PageBlockFrame,
18
18
  });
19
19