@supernova-studio/model 0.55.26 → 0.55.27
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 +385 -1
- package/dist/index.d.ts +385 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/component-properties.ts +8 -0
package/package.json
CHANGED
|
@@ -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>;
|