@supernova-studio/model 0.55.34 → 0.56.0

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
@@ -1676,6 +1676,35 @@ var DesignElementType = DesignTokenType.or(
1676
1676
  function isTokenType(type) {
1677
1677
  return DesignTokenType.safeParse(type).success;
1678
1678
  }
1679
+ var numberTokenTypes = /* @__PURE__ */ new Set([
1680
+ "Dimension",
1681
+ "Duration",
1682
+ "Size",
1683
+ "Space",
1684
+ "Opacity",
1685
+ "FontSize",
1686
+ "LineHeight",
1687
+ "LetterSpacing",
1688
+ "ParagraphSpacing",
1689
+ "BorderWidth",
1690
+ "BorderRadius",
1691
+ "ZIndex"
1692
+ ]);
1693
+ var stringTokenTypes = /* @__PURE__ */ new Set([
1694
+ "String",
1695
+ "ProductCopy",
1696
+ "FontFamily",
1697
+ "FontWeight"
1698
+ ]);
1699
+ function areTokenTypesCompatible(lhs, rhs) {
1700
+ if (lhs === rhs)
1701
+ return true;
1702
+ if (numberTokenTypes.has(lhs) && numberTokenTypes.has(rhs))
1703
+ return true;
1704
+ if (stringTokenTypes.has(lhs) && stringTokenTypes.has(rhs))
1705
+ return true;
1706
+ return false;
1707
+ }
1679
1708
  var DesignElementCategory = z39.enum([
1680
1709
  "Token",
1681
1710
  "Component",
@@ -5921,6 +5950,7 @@ export {
5921
5950
  ZIndexValue,
5922
5951
  addImportModelCollections,
5923
5952
  areShallowObjectsEqual,
5953
+ areTokenTypesCompatible,
5924
5954
  buildConstantEnum,
5925
5955
  defaultDocumentationItemConfigurationV1,
5926
5956
  defaultDocumentationItemConfigurationV2,