@supernova-studio/model 0.46.11 → 0.46.12
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 +228 -17
- package/dist/index.d.ts +228 -17
- package/dist/index.js +36 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +123 -114
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/data-sources/data-source.ts +2 -1
- package/src/dsm/import/support/import-context.ts +7 -0
- package/src/dsm/import/warning.ts +7 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { SourceImportSummary } from "./import-summary";
|
|
3
2
|
import { DbCreateInputOmit, DbUpdate } from "../../helpers";
|
|
4
3
|
import { OmitStrict } from "../../utils";
|
|
4
|
+
import { SourceImportSummary } from "./import-summary";
|
|
5
5
|
|
|
6
6
|
//
|
|
7
7
|
// Enums
|
|
@@ -51,6 +51,7 @@ export const DataSourceFigmaScope = z.object({
|
|
|
51
51
|
documentationFrames: z.boolean(),
|
|
52
52
|
tokens: z.boolean(),
|
|
53
53
|
themePersistentId: z.string().optional(),
|
|
54
|
+
isUnpublishedImportFallbackEnabled: z.boolean(),
|
|
54
55
|
});
|
|
55
56
|
|
|
56
57
|
export const DataSourceFigmaImportMetadata = z.object({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { DataSourceFigmaImportMetadata, DataSourceFigmaRemote } from "../../data-sources";
|
|
3
|
+
import { ImportWarning } from "../warning";
|
|
3
4
|
import { FigmaFileAccessData, FigmaFileDownloadScope } from "./figma-files";
|
|
4
5
|
|
|
5
6
|
//
|
|
@@ -40,6 +41,12 @@ export const FigmaImportBaseContext = z.object({
|
|
|
40
41
|
* sourceId: source data
|
|
41
42
|
*/
|
|
42
43
|
importedSourceDataBySourceId: z.record(ImportedFigmaSourceData),
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Array of warnings that will be written into the import result summary at the end
|
|
47
|
+
* of import job execution and displayed by the client.
|
|
48
|
+
*/
|
|
49
|
+
importWarnings: z.record(ImportWarning.array()).default({}),
|
|
43
50
|
});
|
|
44
51
|
|
|
45
52
|
export type ImportedFigmaSourceData = z.infer<typeof ImportedFigmaSourceData>;
|
|
@@ -2,17 +2,24 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
export const ImportWarningType = z.enum([
|
|
4
4
|
"NoVersionFound",
|
|
5
|
+
|
|
5
6
|
"UnsupportedFill",
|
|
6
7
|
"UnsupportedStroke",
|
|
7
8
|
"UnsupportedEffect",
|
|
9
|
+
|
|
8
10
|
"NoPublishedElements",
|
|
9
11
|
"NoPublishedStyles",
|
|
10
12
|
"NoPublishedComponents",
|
|
11
13
|
"NoPublishedAssets",
|
|
14
|
+
|
|
12
15
|
"StyleNotApplied",
|
|
16
|
+
|
|
13
17
|
"ComponentHasNoThumbnail",
|
|
18
|
+
|
|
14
19
|
"DuplicateImportedStyleId",
|
|
15
20
|
"DuplicateImportedStylePath",
|
|
21
|
+
|
|
22
|
+
"NoUnpublishedStyles",
|
|
16
23
|
]);
|
|
17
24
|
|
|
18
25
|
export const ImportWarning = z.object({
|