@supernova-studio/model 0.55.26 → 0.55.28
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 +452 -1
- package/dist/index.d.ts +452 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/assets/asset.ts +1 -0
- package/src/dsm/data-sources/data-source.ts +1 -0
- package/src/dsm/elements/component-properties.ts +8 -0
- package/src/utils/common.ts +8 -0
package/package.json
CHANGED
package/src/dsm/assets/asset.ts
CHANGED
|
@@ -106,6 +106,7 @@ export const DataSourceUploadRemote = z.object({
|
|
|
106
106
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
107
107
|
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
108
108
|
warnings: nullishToOptional(ImportWarning.array()),
|
|
109
|
+
isTokenTypeSplitEnabled: z.boolean(),
|
|
109
110
|
});
|
|
110
111
|
|
|
111
112
|
export type DataSourceUploadImportMetadata = z.infer<typeof DataSourceUploadImportMetadata>;
|
|
@@ -15,6 +15,12 @@ const FigmaComponentPropertyBase = z.object({
|
|
|
15
15
|
name: z.string(),
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
+
export const FigmaComponentInstancePreview = z.object({
|
|
19
|
+
componentName: z.string(),
|
|
20
|
+
componentSetName: z.string().optional(),
|
|
21
|
+
isRemote: z.boolean(),
|
|
22
|
+
});
|
|
23
|
+
|
|
18
24
|
export const FigmaComponentBooleanProperty = FigmaComponentPropertyBase.extend({
|
|
19
25
|
type: z.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
20
26
|
defaultValue: z.boolean(),
|
|
@@ -23,6 +29,7 @@ export const FigmaComponentBooleanProperty = FigmaComponentPropertyBase.extend({
|
|
|
23
29
|
export const FigmaComponentInstanceSwapProperty = FigmaComponentPropertyBase.extend({
|
|
24
30
|
type: z.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
25
31
|
defaultValue: z.string(),
|
|
32
|
+
defaultValuePreview: FigmaComponentInstancePreview.optional(),
|
|
26
33
|
});
|
|
27
34
|
|
|
28
35
|
export const FigmaComponentVariantProperty = FigmaComponentPropertyBase.extend({
|
|
@@ -46,6 +53,7 @@ export const FigmaComponentProperty = z.discriminatedUnion("type", [
|
|
|
46
53
|
|
|
47
54
|
export const FigmaComponentPropertyMap = z.record(z.string(), FigmaComponentProperty);
|
|
48
55
|
|
|
56
|
+
export type FigmaComponentInstancePreview = z.infer<typeof FigmaComponentInstancePreview>;
|
|
49
57
|
export type FigmaComponentPropertyType = z.infer<typeof FigmaComponentPropertyType>;
|
|
50
58
|
export type FigmaComponentBooleanProperty = z.infer<typeof FigmaComponentBooleanProperty>;
|
|
51
59
|
export type FigmaComponentInstanceSwapProperty = z.infer<typeof FigmaComponentInstanceSwapProperty>;
|
package/src/utils/common.ts
CHANGED
|
@@ -150,6 +150,14 @@ export function areShallowObjectsEqual<T extends object>(lhs: T | undefined, rhs
|
|
|
150
150
|
return true;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
export function isNotNullish<T>(value: T | null | undefined): value is T {
|
|
154
|
+
return !isNullish(value);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function isNullish<T>(value: T | null | undefined): value is null | undefined {
|
|
158
|
+
return value === null || value === undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
153
161
|
export type Pagination = {
|
|
154
162
|
skip?: number;
|
|
155
163
|
take?: number;
|