@supernova-studio/model 0.30.0 → 0.31.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.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,11 +32,12 @@
32
32
  "license": "ISC",
33
33
  "dependencies": {
34
34
  "@sindresorhus/slugify": "1.1.2",
35
+ "ip-cidr": "^3.1.0",
35
36
  "zod": "^3.22.4"
36
37
  },
37
38
  "devDependencies": {
38
39
  "fs": "^0.0.1-security",
39
- "typescript": "^5.0.4",
40
- "tsup": "^8.0.1"
40
+ "tsup": "^8.0.1",
41
+ "typescript": "^5.0.4"
41
42
  }
42
43
  }
@@ -4,6 +4,7 @@ export const PageBlockDefinitionAppearance = z.object({
4
4
  isBordered: z.boolean().optional(),
5
5
  hasBackground: z.boolean().optional(),
6
6
  isEditorPresentationDifferent: z.boolean().optional(),
7
+ showBlockHeaderInEditor: z.boolean().optional(),
7
8
  });
8
9
 
9
10
  export type PageBlockDefinitionAppearance = z.infer<typeof PageBlockDefinitionAppearance>;
@@ -59,6 +59,7 @@ export const PageBlockDefinitionTextPropertyStyle = z.enum([
59
59
  "Small",
60
60
  "SmallBold",
61
61
  "SmallSemibold",
62
+ "Custom",
62
63
  ]);
63
64
 
64
65
  export const PageBlockDefinitionTextPropertyColor = z.enum(["Neutral", "NeutralFaded"]);
@@ -249,7 +249,7 @@ export type PageBlockCustomBlockPropertyValue = z.infer<typeof PageBlockCustomBl
249
249
  // Block
250
250
  //
251
251
 
252
- const PageBlockBaseV1 = z.object({
252
+ export const PageBlockBaseV1 = z.object({
253
253
  persistentId: z.string(),
254
254
  type: PageBlockTypeV1,
255
255
 
@@ -175,10 +175,10 @@ export const PageBlockItemEmbedValue = z.object({
175
175
  });
176
176
 
177
177
  export const PageBlockItemFigmaNodeValue = z.object({
178
- selectedPropertyIds: z.array(z.string()).optional(),
179
178
  showSearch: z.boolean().optional(),
180
179
  previewContainerSize: PageBlockPreviewContainerSize.optional(),
181
180
  backgroundColor: PageBlockColorV2.optional(),
181
+ showFrameDetails: z.boolean().optional(),
182
182
  value: z.array(
183
183
  z.object({
184
184
  entityId: z.string(),
@@ -7,8 +7,3 @@ export const DocumentationPageDataV1 = z.object({
7
7
  blocks: z.array(PageBlockV1),
8
8
  configuration: nullishToOptional(DocumentationItemConfigurationV1),
9
9
  });
10
-
11
- export const DocumentationPageElementDataV1 = z.object({
12
- dataVersion: z.literal(1).optional().default(1),
13
- value: DocumentationPageDataV1,
14
- });
@@ -6,8 +6,3 @@ import { DocumentationPageDataV1 } from "./documentation-page-v1";
6
6
  export const DocumentationPageDataV2 = z.object({
7
7
  configuration: nullishToOptional(DocumentationItemConfigurationV2),
8
8
  });
9
-
10
- export const DocumentationPageElementDataV2 = z.object({
11
- value: DocumentationPageDataV1,
12
- valueV2: DocumentationPageDataV2.optional(),
13
- });
@@ -5,20 +5,10 @@ import { DocumentationItemConfigurationV2 } from "./documentation-v2";
5
5
 
6
6
  export const DocumentationGroupBehavior = z.enum(["Group", "Tabs"]);
7
7
 
8
- export const ElementGroupDataDeprecated = z.object({
9
- behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
10
- configuration: nullishToOptional(DocumentationItemConfigurationV1),
11
- });
12
-
13
8
  export const ElementGroupDataV2 = z.object({
14
9
  behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
15
10
  configuration: nullishToOptional(DocumentationItemConfigurationV2),
16
11
  });
17
12
 
18
- export const ElementGroupElementData = z.object({
19
- value: ElementGroupDataDeprecated.optional(),
20
- valueV2: ElementGroupDataV2.optional(),
21
- });
22
-
23
13
  export type DocumentationGroupBehavior = z.infer<typeof DocumentationGroupBehavior>;
24
14
  export type ElementGroupDataV2 = z.infer<typeof ElementGroupDataV2>;