@supernova-studio/model 0.52.5 → 0.52.6

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.52.5",
3
+ "version": "0.52.6",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,10 +1,13 @@
1
1
  import { z } from "zod";
2
2
 
3
+ export const FigmaNodeRenderFormat = z.enum(["Png", "Svg"]);
4
+
3
5
  export const FigmaNodeReferenceData = z.object({
4
6
  structureElementId: z.string(),
5
7
  nodeId: z.string(),
6
8
  fileId: z.string().optional(),
7
9
  valid: z.boolean(),
10
+ format: FigmaNodeRenderFormat.default("Png"),
8
11
 
9
12
  // Asset data
10
13
  assetId: z.string().optional(),
@@ -19,5 +22,6 @@ export const FigmaNodeReferenceElementData = z.object({
19
22
  value: FigmaNodeReferenceData,
20
23
  });
21
24
 
25
+ export type FigmaNodeRenderFormat = z.infer<typeof FigmaNodeRenderFormat>;
22
26
  export type FigmaNodeReferenceData = z.infer<typeof FigmaNodeReferenceData>;
23
27
  export type FigmaNodeReferenceElementData = z.infer<typeof FigmaNodeReferenceElementData>;
@@ -1,15 +1,15 @@
1
- import { ZodType, ZodTypeDef, z } from "zod";
1
+ import { ZodTypeDef, z } from "zod";
2
+ import { FigmaFileStructureNodeBase, FigmaFileStructureOrigin, FigmaFileStructureStatistics } from "../elements";
2
3
  import { ImportModelBase, ImportModelInputBase } from "./base";
3
- import { FigmaFileStructureOrigin } from "../elements";
4
- import { FigmaFileStructureNodeBase, FigmaFileStructureStatistics } from "../elements";
5
- import { FigmaPngRenderImportModel } from "./image";
4
+ import { FigmaPngRenderImportModel, FigmaSvgRenderImportModel } from "./image";
6
5
 
7
6
  //
8
7
  // Nodes Import Model
9
8
  //
10
9
 
11
10
  const FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
12
- image: FigmaPngRenderImportModel,
11
+ png: FigmaPngRenderImportModel,
12
+ svg: FigmaSvgRenderImportModel,
13
13
  });
14
14
 
15
15
  export const FigmaFileStructureNodeImportModel: z.ZodType<