@supernova-studio/model 1.0.0-alpha.6 → 1.0.0-alpha.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
@@ -851,6 +851,12 @@ function chunkedArray(array, chunkSize) {
851
851
  }
852
852
  return result;
853
853
  }
854
+ function recordToMap(record) {
855
+ const map = /* @__PURE__ */ new Map();
856
+ for (const [k, v] of Object.entries(record))
857
+ map.set(k, v);
858
+ return map;
859
+ }
854
860
 
855
861
  // src/utils/content-loader-instruction.ts
856
862
  import { z as z34 } from "zod";
@@ -1846,6 +1852,7 @@ var PageBlockCodeLanguage = z40.enum([
1846
1852
  ]);
1847
1853
  var PageBlockAlignment = z40.enum(["Left", "Center", "Stretch", "Right"]);
1848
1854
  var PageBlockThemeType = z40.enum(["Override", "Comparison"]);
1855
+ var PageBlockTokenNameFormat = z40.enum(["Name", "GroupAndName", "FullPath", "CustomProperty"]);
1849
1856
  var PageBlockAssetType = z40.enum(["image", "figmaFrame"]);
1850
1857
  var PageBlockTilesAlignment = z40.enum(["Center", "FrameHeight"]);
1851
1858
  var PageBlockTilesLayout = z40.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
@@ -1920,6 +1927,7 @@ var PageBlockFigmaFrameProperties = z40.object({
1920
1927
  })
1921
1928
  ),
1922
1929
  alignment: PageBlockTilesAlignment,
1930
+ previewContainerHeight: nullishToOptional(z40.number()),
1923
1931
  layout: PageBlockTilesLayout,
1924
1932
  backgroundColor: nullishToOptional(ColorTokenInlineData),
1925
1933
  showTitles: z40.boolean()
@@ -1951,8 +1959,17 @@ var PageBlockFigmaComponentBlockConfig = z40.object({
1951
1959
  showPropertyList: nullishToOptional(z40.boolean()),
1952
1960
  previewOrderIds: nullishToOptional(z40.array(z40.string())),
1953
1961
  previewContainerSize: nullishToOptional(z40.enum(["Centered", "NaturalHeight"])),
1962
+ previewContainerHeight: nullishToOptional(z40.number()),
1954
1963
  backgroundColor: nullishToOptional(ColorTokenInlineData)
1955
1964
  });
1965
+ var PageBlockTokenBlockConfig = z40.object({
1966
+ tokenNameFormat: nullishToOptional(PageBlockTokenNameFormat),
1967
+ tokenNameCustomPropertyId: nullishToOptional(z40.string())
1968
+ });
1969
+ var PageBlockAssetBlockConfig = z40.object({
1970
+ showSearch: nullishToOptional(z40.boolean()),
1971
+ showAssetDescription: nullishToOptional(z40.boolean())
1972
+ });
1956
1973
  var PageBlockSelectedFigmaComponent = z40.object({
1957
1974
  figmaComponentId: z40.string(),
1958
1975
  selectedComponentProperties: z40.string().array()
@@ -1983,7 +2000,9 @@ var PageBlockGuideline = z40.object({
1983
2000
  type: z40.string(),
1984
2001
  imageAlt: nullishToOptional(z40.string()),
1985
2002
  imageCaption: nullishToOptional(z40.string()),
1986
- imageAlignment: nullishToOptional(PageBlockAlignment)
2003
+ imageAlignment: nullishToOptional(PageBlockAlignment),
2004
+ openLightbox: nullishToOptional(z40.boolean()),
2005
+ isBordered: nullishToOptional(z40.boolean())
1987
2006
  });
1988
2007
  var PageBlockBaseV1 = z40.object({
1989
2008
  persistentId: z40.string(),
@@ -2010,6 +2029,8 @@ var PageBlockBaseV1 = z40.object({
2010
2029
  asset: nullishToOptional(PageBlockAsset),
2011
2030
  alignment: nullishToOptional(PageBlockAlignment),
2012
2031
  imageAlt: nullishToOptional(z40.string()),
2032
+ openLightbox: nullishToOptional(z40.boolean()),
2033
+ isBordered: nullishToOptional(z40.boolean()),
2013
2034
  // Shortcuts block
2014
2035
  shortcuts: nullishToOptional(z40.array(PageBlockShortcut)),
2015
2036
  // Guidelines
@@ -2031,10 +2052,13 @@ var PageBlockBaseV1 = z40.object({
2031
2052
  // Tables
2032
2053
  tableProperties: nullishToOptional(PageBlockTableProperties),
2033
2054
  columnId: nullishToOptional(z40.string()),
2034
- // Token spreadsheet
2055
+ // Design tokens
2035
2056
  theme: nullishToOptional(PageBlockTheme),
2036
2057
  swatches: nullishToOptional(PageBlockSwatch.array()),
2037
2058
  blacklistedElementProperties: nullishToOptional(z40.array(z40.string())),
2059
+ tokenBlockConfig: nullishToOptional(PageBlockTokenBlockConfig),
2060
+ // (Vector) assets
2061
+ assetBlockConfig: nullishToOptional(PageBlockAssetBlockConfig),
2038
2062
  // Figma components
2039
2063
  figmaComponentsBlockConfig: nullishToOptional(PageBlockFigmaComponentBlockConfig),
2040
2064
  selectedFigmaComponent: nullishToOptional(PageBlockSelectedFigmaComponent),
@@ -2354,7 +2378,6 @@ var PageBlockImageAlignment = z44.enum(["Left", "Center", "Stretch"]);
2354
2378
  var PageBlockTableCellAlignment = z44.enum(["Left", "Center", "Right"]);
2355
2379
  var PageBlockPreviewContainerSize = z44.enum(["Centered", "NaturalHeight"]);
2356
2380
  var PageBlockThemeDisplayMode = z44.enum(["Split", "Override"]);
2357
- var PageBlockTokenNameFormat = z44.enum(["Name", "GroupAndName", "FullPath", "CustomProperty"]);
2358
2381
  var PageBlockTokenValueFormat = z44.enum(["ResolvedValue", "ReferenceName", "NoValue"]);
2359
2382
  var PageBlockImageResourceReference = z44.object({
2360
2383
  resourceId: z44.string(),
@@ -2603,7 +2626,9 @@ var PageBlockItemTableImageNode = z44.object({
2603
2626
  caption: PageBlockItemImageValue.shape.caption,
2604
2627
  alt: PageBlockItemImageValue.shape.alt,
2605
2628
  value: PageBlockItemImageValue.shape.value,
2606
- alignment: PageBlockItemImageValue.shape.alignment
2629
+ alignment: PageBlockItemImageValue.shape.alignment,
2630
+ openLightbox: PageBlockItemImageValue.shape.openLightbox,
2631
+ isBordered: PageBlockItemImageValue.shape.isBordered
2607
2632
  });
2608
2633
  var PageBlockItemTableNode = z44.discriminatedUnion("type", [
2609
2634
  PageBlockItemTableRichTextNode,
@@ -2994,6 +3019,7 @@ var ShadowLayerValue = z70.object({
2994
3019
  type: ShadowType
2995
3020
  });
2996
3021
  var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
3022
+ var ShadowValue = z70.array(ShadowTokenDataBase);
2997
3023
  var ShadowTokenData = tokenAliasOrValue(z70.array(ShadowTokenDataBase));
2998
3024
 
2999
3025
  // src/dsm/elements/data/size.ts
@@ -3617,10 +3643,15 @@ var FigmaImportBaseContext = z90.object({
3617
3643
  */
3618
3644
  importWarnings: z90.record(ImportWarning.array()).default({})
3619
3645
  });
3646
+ var FeatureFlagsKeepAliases = z90.object({
3647
+ isTypographyPropsKeepAliasesEnabled: z90.boolean().default(false),
3648
+ isGradientPropsKeepAliasesEnabled: z90.boolean().default(false),
3649
+ isShadowPropsKeepAliasesEnabled: z90.boolean().default(false)
3650
+ });
3620
3651
  var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
3621
3652
  sourcesWithMissingAccess: z90.array(z90.string()).default([]),
3622
3653
  shadowOpacityOptional: z90.boolean().default(false),
3623
- typographyPropsKeepAliases: z90.boolean().default(false)
3654
+ featureFlagsKeepAliases: FeatureFlagsKeepAliases.default({})
3624
3655
  });
3625
3656
  var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
3626
3657
  importMetadata: DataSourceFigmaImportMetadata
@@ -4934,7 +4965,8 @@ var RestoredDocumentationGroup = z149.object({
4934
4965
  // src/liveblocks/rooms/room-type.ts
4935
4966
  import { z as z150 } from "zod";
4936
4967
  var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
4937
- RoomTypeEnum2["DocumentationPage"] = "documentation-page";
4968
+ RoomTypeEnum2["DocumentationPageOld"] = "documentation-page";
4969
+ RoomTypeEnum2["DocumentationPage"] = "doc-page";
4938
4970
  RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
4939
4971
  RoomTypeEnum2["Workspace"] = "workspace";
4940
4972
  return RoomTypeEnum2;
@@ -5319,7 +5351,9 @@ var FlaggedFeature = z169.enum([
5319
5351
  "ShadowOpacityOptional",
5320
5352
  "DisableImporter",
5321
5353
  "VariablesOrder",
5322
- "TypographyPropsKeepAliases"
5354
+ "TypographyPropsKeepAliases",
5355
+ "GradientPropsKeepAliases",
5356
+ "ShadowPropsKeepAliases"
5323
5357
  ]);
5324
5358
  var FeatureFlagMap = z169.record(FlaggedFeature, z169.boolean());
5325
5359
  var FeatureFlag = z169.object({
@@ -5684,6 +5718,7 @@ export {
5684
5718
  ExternalServiceType,
5685
5719
  FeatureFlag,
5686
5720
  FeatureFlagMap,
5721
+ FeatureFlagsKeepAliases,
5687
5722
  FeaturesSummary,
5688
5723
  FigmaComponent,
5689
5724
  FigmaComponentBooleanProperty,
@@ -5810,6 +5845,7 @@ export {
5810
5845
  PageBlockAlignment,
5811
5846
  PageBlockAppearanceV2,
5812
5847
  PageBlockAsset,
5848
+ PageBlockAssetBlockConfig,
5813
5849
  PageBlockAssetComponent,
5814
5850
  PageBlockAssetEntityMeta,
5815
5851
  PageBlockAssetType,
@@ -5932,6 +5968,7 @@ export {
5932
5968
  PageBlockThemeType,
5933
5969
  PageBlockTilesAlignment,
5934
5970
  PageBlockTilesLayout,
5971
+ PageBlockTokenBlockConfig,
5935
5972
  PageBlockTokenNameFormat,
5936
5973
  PageBlockTokenValueFormat,
5937
5974
  PageBlockTypeV1,
@@ -5997,6 +6034,7 @@ export {
5997
6034
  ShadowLayerValue,
5998
6035
  ShadowTokenData,
5999
6036
  ShadowType,
6037
+ ShadowValue,
6000
6038
  ShallowDesignElement,
6001
6039
  Size,
6002
6040
  SizeOrUndefined,
@@ -6131,6 +6169,7 @@ export {
6131
6169
  pickLatestSnapshots,
6132
6170
  promiseWithTimeout,
6133
6171
  publishedDocEnvironments,
6172
+ recordToMap,
6134
6173
  removeCommentSpans,
6135
6174
  sleep,
6136
6175
  slugRegex,