@supernova-studio/model 0.55.6 → 0.55.8

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.mjs CHANGED
@@ -547,7 +547,7 @@ var BlurTokenData = tokenAliasOrValue(BlurValue);
547
547
  import { z as z27 } from "zod";
548
548
  var BorderRadiusUnit = z27.enum(["Pixels", "Rem", "Percent"]);
549
549
  var BorderRadiusValue = z27.object({
550
- unit: BorderRadiusUnit,
550
+ unit: DimensionUnit,
551
551
  measure: z27.number()
552
552
  });
553
553
  var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
@@ -556,7 +556,7 @@ var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
556
556
  import { z as z28 } from "zod";
557
557
  var BorderWidthUnit = z28.enum(["Pixels"]);
558
558
  var BorderWidthValue = z28.object({
559
- unit: BorderWidthUnit,
559
+ unit: DimensionUnit,
560
560
  measure: z28.number()
561
561
  });
562
562
  var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
@@ -570,7 +570,7 @@ import { z as z30 } from "zod";
570
570
  // src/dsm/elements/data/opacity.ts
571
571
  import { z as z29 } from "zod";
572
572
  var OpacityValue = z29.object({
573
- unit: z29.enum(["Raw", "Pixels"]),
573
+ unit: DimensionUnit,
574
574
  measure: z29.number()
575
575
  });
576
576
  var OpacityTokenData = tokenAliasOrValue(OpacityValue);
@@ -1737,7 +1737,9 @@ var PageBlockTypeV1 = z40.enum([
1737
1737
  "TableRow",
1738
1738
  "TableCell",
1739
1739
  "Guidelines",
1740
- "Guideline"
1740
+ "Guideline",
1741
+ "FigmaComponents",
1742
+ "FigmaComponentPropsTable"
1741
1743
  ]);
1742
1744
  var PageBlockCodeLanguage = z40.enum([
1743
1745
  "Angular",
@@ -1841,15 +1843,6 @@ var PageBlockCustomBlockPropertyImageValue = z40.object({
1841
1843
  var PageBlockCustomBlockPropertyValue = z40.object({
1842
1844
  key: z40.string(),
1843
1845
  value: z40.any()
1844
- // TODO Artem: for some reason there are cases when there's an array here in the DB
1845
- // e.g. element id 67451 in the dev db
1846
- // value: z
1847
- // .boolean()
1848
- // .or(z.number())
1849
- // .or(z.string())
1850
- // .or(ColorTokenData)
1851
- // .or(TypographyTokenData)
1852
- // .or(PageBlockCustomBlockPropertyImageValue),
1853
1846
  });
1854
1847
  var PageBlockFigmaFrameProperties = z40.object({
1855
1848
  color: nullishToOptional(
@@ -1883,6 +1876,17 @@ var PageBlockTableProperties = z40.object({
1883
1876
  showHeaderColumn: z40.boolean(),
1884
1877
  columns: z40.array(PageBlockTableColumn)
1885
1878
  });
1879
+ var PageBlockFigmaComponentBlockConfig = z40.object({
1880
+ showComponentName: nullishToOptional(z40.boolean()),
1881
+ showComponentDescription: nullishToOptional(z40.boolean()),
1882
+ showPropertyList: nullishToOptional(z40.boolean()),
1883
+ previewContainerSize: nullishToOptional(z40.enum(["Centered", "NaturalHeight"])),
1884
+ backgroundColor: nullishToOptional(ColorTokenInlineData)
1885
+ });
1886
+ var PageBlockSelectedFigmaComponent = z40.object({
1887
+ figmaComponentId: z40.string(),
1888
+ selectedComponentProperties: z40.string().array()
1889
+ });
1886
1890
  var PageBlockTextSpanAttributeType = z40.enum(["Bold", "Italic", "Link", "Strikethrough", "Code", "Comment"]);
1887
1891
  var PageBlockTextSpanAttribute = z40.object({
1888
1892
  type: PageBlockTextSpanAttributeType,
@@ -1959,6 +1963,10 @@ var PageBlockBaseV1 = z40.object({
1959
1963
  theme: nullishToOptional(PageBlockTheme),
1960
1964
  swatches: nullishToOptional(PageBlockSwatch.array()),
1961
1965
  blacklistedElementProperties: nullishToOptional(z40.array(z40.string())),
1966
+ // Figma components
1967
+ figmaComponentsBlockConfig: nullishToOptional(PageBlockFigmaComponentBlockConfig),
1968
+ selectedFigmaComponent: nullishToOptional(PageBlockSelectedFigmaComponent),
1969
+ selectedFigmaComponents: nullishToOptional(PageBlockSelectedFigmaComponent.array()),
1962
1970
  // Arbitrary
1963
1971
  userMetadata: nullishToOptional(z40.string())
1964
1972
  });
@@ -2359,7 +2367,7 @@ var PageBlockItemFigmaComponentValue = z44.object({
2359
2367
  z44.object({
2360
2368
  entityId: z44.string(),
2361
2369
  entityType: z44.enum(["FigmaComponent"]),
2362
- entityMeta: PageBlockFigmaComponentEntityMeta.optional()
2370
+ selectedComponentProperties: z44.string().array().optional()
2363
2371
  })
2364
2372
  ).default([])
2365
2373
  });
@@ -2717,7 +2725,7 @@ var PageSectionEditorModelV2 = z54.object({
2717
2725
  import { z as z55 } from "zod";
2718
2726
  var DurationUnit = z55.enum(["Ms"]);
2719
2727
  var DurationValue = z55.object({
2720
- unit: DurationUnit,
2728
+ unit: DimensionUnit,
2721
2729
  measure: z55.number()
2722
2730
  });
2723
2731
  var DurationTokenData = tokenAliasOrValue(DurationValue);
@@ -2787,7 +2795,7 @@ var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
2787
2795
  import { z as z59 } from "zod";
2788
2796
  var FontSizeUnit = z59.enum(["Pixels", "Rem", "Percent"]);
2789
2797
  var FontSizeValue = z59.object({
2790
- unit: FontSizeUnit,
2798
+ unit: DimensionUnit,
2791
2799
  measure: z59.number()
2792
2800
  });
2793
2801
  var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
@@ -2837,7 +2845,7 @@ var ElementGroupDataV2 = z63.object({
2837
2845
  import { z as z64 } from "zod";
2838
2846
  var LetterSpacingUnit = z64.enum(["Pixels", "Rem", "Percent"]);
2839
2847
  var LetterSpacingValue = z64.object({
2840
- unit: LetterSpacingUnit,
2848
+ unit: DimensionUnit,
2841
2849
  measure: z64.number()
2842
2850
  });
2843
2851
  var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
@@ -2846,7 +2854,7 @@ var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
2846
2854
  import { z as z65 } from "zod";
2847
2855
  var LineHeightUnit = z65.enum(["Pixels", "Rem", "Percent", "Raw"]);
2848
2856
  var LineHeightValue = z65.object({
2849
- unit: LineHeightUnit,
2857
+ unit: DimensionUnit,
2850
2858
  measure: z65.number()
2851
2859
  });
2852
2860
  var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
@@ -2855,7 +2863,7 @@ var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
2855
2863
  import { z as z66 } from "zod";
2856
2864
  var ParagraphIndentUnit = z66.enum(["Pixels", "Rem", "Percent"]);
2857
2865
  var ParagraphIndentValue = z66.object({
2858
- unit: ParagraphIndentUnit,
2866
+ unit: DimensionUnit,
2859
2867
  measure: z66.number()
2860
2868
  });
2861
2869
  var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
@@ -2864,7 +2872,7 @@ var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
2864
2872
  import { z as z67 } from "zod";
2865
2873
  var ParagraphSpacingUnit = z67.enum(["Pixels", "Rem", "Percent"]);
2866
2874
  var ParagraphSpacingValue = z67.object({
2867
- unit: ParagraphSpacingUnit,
2875
+ unit: DimensionUnit,
2868
2876
  measure: z67.number()
2869
2877
  });
2870
2878
  var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
@@ -2905,7 +2913,7 @@ var ShadowTokenData = tokenAliasOrValue(z70.array(ShadowTokenDataBase));
2905
2913
  import { z as z71 } from "zod";
2906
2914
  var SizeUnit = z71.enum(["Pixels", "Rem", "Percent"]);
2907
2915
  var SizeValue = z71.object({
2908
- unit: SizeUnit,
2916
+ unit: DimensionUnit,
2909
2917
  measure: z71.number()
2910
2918
  });
2911
2919
  var SizeTokenData = tokenAliasOrValue(SizeValue);
@@ -2914,7 +2922,7 @@ var SizeTokenData = tokenAliasOrValue(SizeValue);
2914
2922
  import { z as z72 } from "zod";
2915
2923
  var SpaceUnit = z72.enum(["Pixels", "Rem", "Percent"]);
2916
2924
  var SpaceValue = z72.object({
2917
- unit: SpaceUnit,
2925
+ unit: DimensionUnit,
2918
2926
  measure: z72.number()
2919
2927
  });
2920
2928
  var SpaceTokenData = tokenAliasOrValue(SpaceValue);
@@ -2961,7 +2969,7 @@ var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
2961
2969
  import { z as z78 } from "zod";
2962
2970
  var ZIndexUnit = z78.enum(["Raw"]);
2963
2971
  var ZIndexValue = z78.object({
2964
- unit: ZIndexUnit,
2972
+ unit: DimensionUnit,
2965
2973
  measure: z78.number()
2966
2974
  });
2967
2975
  var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
@@ -5609,6 +5617,7 @@ export {
5609
5617
  PageBlockDefinitionVariant,
5610
5618
  PageBlockDefinitionsMap,
5611
5619
  PageBlockEditorModelV2,
5620
+ PageBlockFigmaComponentBlockConfig,
5612
5621
  PageBlockFigmaComponentEntityMeta,
5613
5622
  PageBlockFigmaFrameProperties,
5614
5623
  PageBlockFigmaNodeEntityMeta,
@@ -5663,6 +5672,7 @@ export {
5663
5672
  PageBlockPreviewContainerSize,
5664
5673
  PageBlockRenderCodeProperties,
5665
5674
  PageBlockResourceFrameNodeReference,
5675
+ PageBlockSelectedFigmaComponent,
5666
5676
  PageBlockShortcut,
5667
5677
  PageBlockSwatch,
5668
5678
  PageBlockTableCellAlignment,