@supernova-studio/model 0.52.4 → 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/dist/index.d.mts +732 -42
- package/dist/index.d.ts +732 -42
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/data/figma-node-reference.ts +4 -0
- package/src/dsm/import/figma-frames.ts +5 -5
- package/src/export/export-destinations.ts +16 -0
package/package.json
CHANGED
|
@@ -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 {
|
|
1
|
+
import { ZodTypeDef, z } from "zod";
|
|
2
|
+
import { FigmaFileStructureNodeBase, FigmaFileStructureOrigin, FigmaFileStructureStatistics } from "../elements";
|
|
2
3
|
import { ImportModelBase, ImportModelInputBase } from "./base";
|
|
3
|
-
import {
|
|
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
|
-
|
|
11
|
+
png: FigmaPngRenderImportModel,
|
|
12
|
+
svg: FigmaSvgRenderImportModel,
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export const FigmaFileStructureNodeImportModel: z.ZodType<
|
|
@@ -27,6 +27,10 @@ export const ExporterDestinationGithub = z.object({
|
|
|
27
27
|
branch: z.string(),
|
|
28
28
|
relativePath: nullishToOptional(z.string()),
|
|
29
29
|
|
|
30
|
+
// Commit metadata
|
|
31
|
+
commitAuthorName: nullishToOptional(z.string()),
|
|
32
|
+
commitAuthorEmail: nullishToOptional(z.string()),
|
|
33
|
+
|
|
30
34
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
31
35
|
connectionId: nullishToOptional(z.string()),
|
|
32
36
|
userId: nullishToOptional(z.number()),
|
|
@@ -40,6 +44,10 @@ export const ExporterDestinationAzure = z.object({
|
|
|
40
44
|
projectId: z.string(),
|
|
41
45
|
repositoryId: z.string(),
|
|
42
46
|
|
|
47
|
+
// Commit metadata
|
|
48
|
+
commitAuthorName: nullishToOptional(z.string()),
|
|
49
|
+
commitAuthorEmail: nullishToOptional(z.string()),
|
|
50
|
+
|
|
43
51
|
// Location
|
|
44
52
|
branch: z.string(),
|
|
45
53
|
relativePath: nullishToOptional(z.string()),
|
|
@@ -58,6 +66,10 @@ export const ExporterDestinationGitlab = z.object({
|
|
|
58
66
|
// Repository
|
|
59
67
|
projectId: z.string(),
|
|
60
68
|
|
|
69
|
+
// Commit metadata
|
|
70
|
+
commitAuthorName: nullishToOptional(z.string()),
|
|
71
|
+
commitAuthorEmail: nullishToOptional(z.string()),
|
|
72
|
+
|
|
61
73
|
// Location
|
|
62
74
|
branch: z.string(),
|
|
63
75
|
relativePath: nullishToOptional(z.string()),
|
|
@@ -78,6 +90,10 @@ export const ExporterDestinationBitbucket = z.object({
|
|
|
78
90
|
projectKey: z.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
79
91
|
repoSlug: z.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
80
92
|
|
|
93
|
+
// Commit metadata
|
|
94
|
+
commitAuthorName: nullishToOptional(z.string()),
|
|
95
|
+
commitAuthorEmail: nullishToOptional(z.string()),
|
|
96
|
+
|
|
81
97
|
// Location
|
|
82
98
|
branch: z.string(),
|
|
83
99
|
relativePath: nullishToOptional(z.string()),
|