@viasat/beam-tokens 2.89.0 → 2.91.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.
Files changed (136) hide show
  1. package/README.md +38 -0
  2. package/index.js +2 -2290
  3. package/native/i18n/font-face-names.generated.cjs +1 -0
  4. package/native/i18n/font-face-names.generated.js +1 -0
  5. package/native/i18n/typography-overlay.cjs +1 -0
  6. package/native/i18n/typography-overlay.js +1 -0
  7. package/native/index.cjs +1 -0
  8. package/native/index.js +1 -0
  9. package/native/themes/blue-consumer.cjs +1 -0
  10. package/native/themes/blue-consumer.js +1 -0
  11. package/native/themes/blue-enterprise.cjs +1 -0
  12. package/native/themes/blue-enterprise.js +1 -0
  13. package/native/themes/green-consumer.cjs +1 -0
  14. package/native/themes/green-consumer.js +1 -0
  15. package/native/themes/green-enterprise.cjs +1 -0
  16. package/native/themes/green-enterprise.js +1 -0
  17. package/native/themes/neutral-consumer.cjs +1 -0
  18. package/native/themes/neutral-consumer.js +1 -0
  19. package/native/themes/neutral-enterprise.cjs +1 -0
  20. package/native/themes/neutral-enterprise.js +1 -0
  21. package/native/themes/orange-consumer.cjs +1 -0
  22. package/native/themes/orange-consumer.js +1 -0
  23. package/native/themes/orange-enterprise.cjs +1 -0
  24. package/native/themes/orange-enterprise.js +1 -0
  25. package/native/themes/pink-consumer.cjs +1 -0
  26. package/native/themes/pink-consumer.js +1 -0
  27. package/native/themes/pink-enterprise.cjs +1 -0
  28. package/native/themes/pink-enterprise.js +1 -0
  29. package/native/themes/teal-consumer.cjs +1 -0
  30. package/native/themes/teal-consumer.js +1 -0
  31. package/native/themes/teal-enterprise.cjs +1 -0
  32. package/native/themes/teal-enterprise.js +1 -0
  33. package/native/themes/violet-consumer.cjs +1 -0
  34. package/native/themes/violet-consumer.js +1 -0
  35. package/native/themes/violet-enterprise.cjs +1 -0
  36. package/native/themes/violet-enterprise.js +1 -0
  37. package/package.json +36 -1
  38. package/types/configs/colors/colors.format.d.ts +1 -1
  39. package/types/configs/colors/colors.transformers.d.ts +1 -1
  40. package/types/configs/colors/index.d.ts +3 -3
  41. package/types/configs/colors/sd.colors.config.d.ts +1 -1
  42. package/types/configs/components/components.format.css.d.ts +1 -1
  43. package/types/configs/components/components.transformers.d.ts +1 -1
  44. package/types/configs/components/index.d.ts +1 -1
  45. package/types/configs/components/sd.components.config.d.ts +1 -1
  46. package/types/configs/dimensions/dimension.format.css.d.ts +1 -1
  47. package/types/configs/dimensions/dimensions.transformers.d.ts +1 -1
  48. package/types/configs/dimensions/dimensions.utils.d.ts +1 -1
  49. package/types/configs/dimensions/index.d.ts +3 -3
  50. package/types/configs/dimensions/sd.dimension.config.d.ts +1 -1
  51. package/types/configs/expressive/expressive.format.d.ts +1 -1
  52. package/types/configs/expressive/index.d.ts +2 -2
  53. package/types/configs/expressive/sd.expressive.config.d.ts +1 -1
  54. package/types/configs/index.d.ts +1 -1
  55. package/types/configs/js/index.d.ts +3 -3
  56. package/types/configs/js/js.formatters.d.ts +1 -1
  57. package/types/configs/js/js.transformers.d.ts +1 -1
  58. package/types/configs/js/sd.js.config.d.ts +1 -1
  59. package/types/configs/language/formatters/css.d.ts +1 -1
  60. package/types/configs/language/formatters/index.d.ts +1 -1
  61. package/types/configs/language/index.d.ts +4 -4
  62. package/types/configs/language/sd.language.config.d.ts +1 -1
  63. package/types/configs/language/transformers/index.d.ts +1 -1
  64. package/types/configs/native/index.d.ts +15 -0
  65. package/types/configs/native/native.color-guard.d.ts +13 -0
  66. package/types/configs/native/native.dimension.d.ts +13 -0
  67. package/types/configs/native/native.opacity-guard.d.ts +9 -0
  68. package/types/configs/native/native.resolvers.d.ts +5 -0
  69. package/types/configs/native/native.shadow.d.ts +17 -0
  70. package/types/configs/native/native.source.d.ts +24 -0
  71. package/types/configs/native/native.transformers.d.ts +3 -0
  72. package/types/configs/native/native.types-guard.d.ts +1 -0
  73. package/types/configs/native/native.types.d.ts +28 -0
  74. package/types/configs/native/native.typography.d.ts +22 -0
  75. package/types/configs/native/native.utils.d.ts +3 -0
  76. package/types/configs/native/sd.native.config.d.ts +7 -0
  77. package/types/configs/product-type/index.d.ts +4 -4
  78. package/types/configs/product-type/product-type.format.css.d.ts +1 -1
  79. package/types/configs/product-type/product-type.transformers.d.ts +1 -1
  80. package/types/configs/product-type/sd.product-tokens.config.d.ts +1 -1
  81. package/types/configs/shadows/index.d.ts +4 -4
  82. package/types/configs/shadows/sd.shadow.config.d.ts +1 -1
  83. package/types/configs/shadows/shadow.transformers.d.ts +1 -1
  84. package/types/configs/shadows/shadows.format.css.d.ts +1 -1
  85. package/types/configs/shadows/shadows.utils.d.ts +1 -1
  86. package/types/configs/storybook/index.d.ts +3 -3
  87. package/types/configs/storybook/js.formatters.d.ts +1 -1
  88. package/types/configs/storybook/js.transformers.d.ts +1 -1
  89. package/types/configs/storybook/sd.storybook.config.d.ts +1 -1
  90. package/types/configs/themes/generateThemes.d.ts +1 -1
  91. package/types/configs/themes/index.d.ts +1 -1
  92. package/types/configs/themes/sd.theme.config.d.ts +1 -1
  93. package/types/configs/themes/theme.utils.d.ts +5 -5
  94. package/types/configs/typography/formatters/css.d.ts +1 -1
  95. package/types/configs/typography/formatters/index.d.ts +1 -1
  96. package/types/configs/typography/helpers.d.ts +1 -1
  97. package/types/configs/typography/index.d.ts +4 -4
  98. package/types/configs/typography/sd.typography.config.d.ts +1 -1
  99. package/types/configs/typography/transformers/index.d.ts +1 -1
  100. package/types/lib/index.d.ts +2 -2
  101. package/types/lib/native/i18n/font-face-names.generated.d.ts +1 -0
  102. package/types/lib/native/i18n/typography-overlay.d.ts +10 -0
  103. package/types/lib/native/index.d.ts +1 -0
  104. package/types/lib/native/themes/blue-consumer.d.ts +3 -0
  105. package/types/lib/native/themes/blue-enterprise.d.ts +3 -0
  106. package/types/lib/native/themes/green-consumer.d.ts +3 -0
  107. package/types/lib/native/themes/green-enterprise.d.ts +3 -0
  108. package/types/lib/native/themes/neutral-consumer.d.ts +3 -0
  109. package/types/lib/native/themes/neutral-enterprise.d.ts +3 -0
  110. package/types/lib/native/themes/orange-consumer.d.ts +3 -0
  111. package/types/lib/native/themes/orange-enterprise.d.ts +3 -0
  112. package/types/lib/native/themes/pink-consumer.d.ts +3 -0
  113. package/types/lib/native/themes/pink-enterprise.d.ts +3 -0
  114. package/types/lib/native/themes/teal-consumer.d.ts +3 -0
  115. package/types/lib/native/themes/teal-enterprise.d.ts +3 -0
  116. package/types/lib/native/themes/violet-consumer.d.ts +3 -0
  117. package/types/lib/native/themes/violet-enterprise.d.ts +3 -0
  118. package/types/lib/native/token-tree.generated.d.ts +1723 -0
  119. package/types/lib/native/types.d.ts +58 -0
  120. package/types/utils/build-tokens-native.d.ts +1 -0
  121. package/types/utils/constants/class-names.d.ts +1 -1
  122. package/types/utils/constants/index.d.ts +7 -7
  123. package/types/utils/constants/theme.d.ts +20 -0
  124. package/types/utils/constants/token-types.d.ts +1 -1
  125. package/types/utils/constants/types.d.ts +4 -9
  126. package/types/utils/files/cleanup.d.ts +1 -1
  127. package/types/utils/files/index.d.ts +5 -5
  128. package/types/utils/files/merge.d.ts +1 -1
  129. package/types/utils/files/paths.d.ts +1 -1
  130. package/types/utils/formatters/className.d.ts +1 -1
  131. package/types/utils/formatters/format.css.d.ts +1 -1
  132. package/types/utils/formatters/format.scss.d.ts +1 -1
  133. package/types/utils/formatters/index.d.ts +4 -4
  134. package/types/utils/index.d.ts +8 -8
  135. package/types/utils/occurrences.d.ts +1 -1
  136. package/types/utils/tokens.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import { Named, Transform, TransformGroup } from 'style-dictionary';
2
- import { TokenTransformers } from '../../utils';
2
+ import { TokenTransformers } from '../../utils/index.js';
3
3
  /**
4
4
  * Adds CSS names to color and opacity tokens.
5
5
  */
@@ -1,5 +1,5 @@
1
- import { BuildConfig, ThemeConfig } from '../../utils';
2
- export * from './sd.colors.config';
3
- export * from './colors.transformers';
1
+ import { BuildConfig, ThemeConfig } from '../../utils/index.js';
2
+ export * from './sd.colors.config.js';
3
+ export * from './colors.transformers.js';
4
4
  export declare const colorBuildConfig: BuildConfig;
5
5
  export declare const colorThemeConfig: (theme: ThemeConfig) => BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Config, TransformedToken } from 'style-dictionary';
2
- import { OutPutFilesPaths, CommonConfig } from '../../utils';
2
+ import { OutPutFilesPaths, CommonConfig } from '../../utils/index.js';
3
3
  export declare const COMMON_CONFIG: CommonConfig;
4
4
  export declare const tokenFilter: (token: TransformedToken) => boolean;
5
5
  declare const ViasatConfig: Config[];
@@ -1,5 +1,5 @@
1
1
  import { Named, Format } from 'style-dictionary';
2
- import { CssVarsFormatters } from '../../utils';
2
+ import { CssVarsFormatters } from '../../utils/index.js';
3
3
  /**
4
4
  * Generates component prefix
5
5
  */
@@ -1,4 +1,4 @@
1
1
  import { Named, TransformGroup } from 'style-dictionary';
2
- import { TokenTransformers } from '../../utils';
2
+ import { TokenTransformers } from '../../utils/index.js';
3
3
  export declare const componentsTransformGroup: Named<TransformGroup>;
4
4
  export declare const componentTransformers: TokenTransformers;
@@ -1,2 +1,2 @@
1
- import { BuildConfig } from '../../utils';
1
+ import { BuildConfig } from '../../utils/index.js';
2
2
  export declare const componentsBuildConfig: BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Config, TransformedToken } from 'style-dictionary';
2
- import { OutPutFilesPaths, CommonConfig } from '../../utils';
2
+ import { OutPutFilesPaths, CommonConfig } from '../../utils/index.js';
3
3
  export declare const COMMON_CONFIG: CommonConfig;
4
4
  /**
5
5
  * Filters tokens to only include component tokens (bm.comp.*)
@@ -1,5 +1,5 @@
1
1
  import { Named, Format } from 'style-dictionary';
2
- import { CssVarsFormatters } from '../../utils';
2
+ import { CssVarsFormatters } from '../../utils/index.js';
3
3
  /**
4
4
  * Formatter to generate CSS variables for dimension tokens.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Named, Transform, TransformGroup } from 'style-dictionary';
2
- import { TokenTransformers } from '../../utils';
2
+ import { TokenTransformers } from '../../utils/index.js';
3
3
  /** Transforms */
4
4
  export declare const parseRawRemTokenValue: Named<Transform>;
5
5
  export declare const parseSemTokenValue: Named<Transform>;
@@ -1,4 +1,4 @@
1
- import { TOKEN_CATEGORY, OccurrenceCounts } from '../../utils';
1
+ import { TOKEN_CATEGORY, OccurrenceCounts } from '../../utils/index.js';
2
2
  import { TransformedToken } from 'style-dictionary';
3
3
  /**
4
4
  * Checks if the token is a dimension token.
@@ -1,6 +1,6 @@
1
- import { BuildConfig, CssVarsFormatters, ThemeConfig } from '../../utils';
2
- export * from './sd.dimension.config';
3
- export * from './dimensions.transformers';
1
+ import { BuildConfig, CssVarsFormatters, ThemeConfig } from '../../utils/index.js';
2
+ export * from './sd.dimension.config.js';
3
+ export * from './dimensions.transformers.js';
4
4
  export declare const dimensionFormatters: CssVarsFormatters;
5
5
  export default dimensionFormatters;
6
6
  export declare const dimensionBuildConfig: BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Config, TransformedToken } from 'style-dictionary';
2
- import { OutPutFilesPaths, CommonConfig } from '../../utils';
2
+ import { OutPutFilesPaths, CommonConfig } from '../../utils/index.js';
3
3
  export declare const COMMON_CONFIG: CommonConfig;
4
4
  /**
5
5
  * Token filter to identify valid dimension tokens.
@@ -1,5 +1,5 @@
1
1
  import { Named, Format } from 'style-dictionary';
2
- import { CssVarsFormatters } from '../../utils';
2
+ import { CssVarsFormatters } from '../../utils/index.js';
3
3
  /**
4
4
  * Formatter to generate CSS variables for color tokens.
5
5
  */
@@ -1,3 +1,3 @@
1
- import { BuildConfig } from '../../utils';
2
- export * from './sd.expressive.config';
1
+ import { BuildConfig } from '../../utils/index.js';
2
+ export * from './sd.expressive.config.js';
3
3
  export declare const expressiveColorBuildConfig: BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Config } from 'style-dictionary';
2
- import { OutPutFilesPaths, CommonConfig } from '../../utils';
2
+ import { OutPutFilesPaths, CommonConfig } from '../../utils/index.js';
3
3
  export declare const COMMON_CONFIG: CommonConfig;
4
4
  declare const ExpressiveConfigs: Config[];
5
5
  export declare const expressiveColorOutputPaths: OutPutFilesPaths;
@@ -1,4 +1,4 @@
1
- import { BuildConfig, ThemeConfig } from '../utils';
1
+ import { BuildConfig, ThemeConfig } from '../utils/index.js';
2
2
  /**
3
3
  * Type guard to check if a value is a BuildConfig.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { BuildConfig } from '../../utils';
2
- export * from './sd.js.config';
3
- export * from './js.transformers';
1
+ import { BuildConfig } from '../../utils/index.js';
2
+ export * from './sd.js.config.js';
3
+ export * from './js.transformers.js';
4
4
  export declare const jsBuildConfig: BuildConfig;
@@ -1,3 +1,3 @@
1
- import { CssVarsFormatters } from '../../utils';
1
+ import { CssVarsFormatters } from '../../utils/index.js';
2
2
  export declare const jsFormatters: CssVarsFormatters;
3
3
  export default jsFormatters;
@@ -1,5 +1,5 @@
1
1
  import { Named, TransformGroup, Transform } from 'style-dictionary';
2
- import { TokenTransformers } from '../../utils';
2
+ import { TokenTransformers } from '../../utils/index.js';
3
3
  export declare const colorsCssProperty: Named<Transform>;
4
4
  export declare const dimensionsCssProperty: Named<Transform>;
5
5
  export declare const shadowsCssProperty: Named<Transform>;
@@ -1,5 +1,5 @@
1
1
  import { Config } from 'style-dictionary';
2
- import { OutPutFilesPaths } from '../../utils';
2
+ import { OutPutFilesPaths } from '../../utils/index.js';
3
3
  export declare const jsStyleDictConfig: Config;
4
4
  export declare const allConfigs: Config[];
5
5
  export declare const jsOutputPaths: OutPutFilesPaths;
@@ -1,5 +1,5 @@
1
1
  import { Named, Format, TransformedToken } from 'style-dictionary';
2
- import { CssVarsFormatters } from '../../../utils';
2
+ import { CssVarsFormatters } from '../../../utils/index.js';
3
3
  type TypoTokenFormatterHelper = (params: {
4
4
  dictionary: TransformedToken[];
5
5
  }) => string;
@@ -1,3 +1,3 @@
1
- import { CssVarsFormatters } from '../../../utils';
1
+ import { CssVarsFormatters } from '../../../utils/index.js';
2
2
  export declare const typographyFormatters: CssVarsFormatters;
3
3
  export default typographyFormatters;
@@ -1,6 +1,6 @@
1
- import { BuildConfig, SupportedLanguages, ThemeConfig } from '../../utils';
2
- export * from './formatters';
3
- export * from './sd.language.config';
4
- export * from './transformers';
1
+ import { BuildConfig, SupportedLanguages, ThemeConfig } from '../../utils/index.js';
2
+ export * from './formatters/index.js';
3
+ export * from './sd.language.config.js';
4
+ export * from './transformers/index.js';
5
5
  export declare const languageBuildConfig: BuildConfig;
6
6
  export declare const languageThemeConfig: (theme: ThemeConfig, languages: SupportedLanguages[]) => BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Config } from 'style-dictionary';
2
- import { OutPutFilesPaths, CommonConfig } from '../../utils';
2
+ import { OutPutFilesPaths, CommonConfig } from '../../utils/index.js';
3
3
  export declare const tokenFilter: (token: import('style-dictionary').TransformedToken) => boolean;
4
4
  export declare const COMMON_CONFIG: CommonConfig;
5
5
  declare const allConfigs: Config[];
@@ -1,5 +1,5 @@
1
1
  import { Named, TransformGroup } from 'style-dictionary';
2
- import { TokenTransformers } from '../../../utils';
2
+ import { TokenTransformers } from '../../../utils/index.js';
3
3
  export declare const languageTransformGroup: Named<TransformGroup>;
4
4
  export declare const languageTransformers: TokenTransformers;
5
5
  export default languageTransformers;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Barrel for the React Native token build. It resolves each accent × productType
3
+ * combo into a literal `{ light, dark }` module under `lib/native/themes/`.
4
+ */
5
+ export * from './native.types.js';
6
+ export * from './native.source.js';
7
+ export * from './sd.native.config.js';
8
+ export * from './native.resolvers.js';
9
+ export * from './native.utils.js';
10
+ export * from './native.color-guard.js';
11
+ export * from './native.dimension.js';
12
+ export * from './native.opacity-guard.js';
13
+ export * from './native.shadow.js';
14
+ export * from './native.typography.js';
15
+ export * from './native.transformers.js';
@@ -0,0 +1,13 @@
1
+ import { Named, Transform } from 'style-dictionary';
2
+ /**
3
+ * True if React Native's own parser can render this color string: hex (incl.
4
+ * 4-/8-digit alpha), rgb(a), hsl(a), named colors and `transparent`.
5
+ */
6
+ export declare const isNativeRenderableColor: (value: unknown) => value is string;
7
+ /**
8
+ * Fails the build if a color isn't RN-renderable (hex, rgb(a), hsl(a), named,
9
+ * `transparent`, not hsv/lch/lab/oklch). Validates only; valid colors pass through.
10
+ *
11
+ * `transitive` so it also runs on reference-derived colors, not just literals.
12
+ */
13
+ export declare const nativeColorGuard: Named<Transform>;
@@ -0,0 +1,13 @@
1
+ import { Named, Transform } from 'style-dictionary';
2
+ /**
3
+ * Converts rem/px dimensions to unitless dp for React Native.
4
+ */
5
+ export declare const nativeDimensionTransform: Named<Transform>;
6
+ /**
7
+ * Converts rem/px dimensions to unitless dp for React Native — `rem × 16`, `px × 1`
8
+ * (`0.5rem → 8`, `400px → 400`). Fails the build on any other unit so a
9
+ * mis-authored token (e.g. a unitless `lineHeight` multiplier) can't ship.
10
+ *
11
+ * `transitive` so it also runs on reference derived values, not just literals.
12
+ */
13
+ export declare const toDp: (value: unknown, tokenPath: string) => number;
@@ -0,0 +1,9 @@
1
+ import { Named, Transform } from 'style-dictionary';
2
+ /**
3
+ * Fails the build if an opacity isn't a number in the 0–1 range. The built-in
4
+ * `ts/opacity` converts the source `'40%'` → `0.4` first; this guards the result
5
+ * and catches anything it passed through untouched (`'150%'` → `1.5`, or junk).
6
+ *
7
+ * `transitive` so it also runs on reference derived opacities, not just literals.
8
+ */
9
+ export declare const nativeOpacityGuard: Named<Transform>;
@@ -0,0 +1,5 @@
1
+ import { CoreTree, BuildExpressivePalette } from './native.types.js';
2
+ /** Pull the runtime slice `{ sem, dataviz, comp }` out of a resolved SD dictionary. */
3
+ export declare const extractCoreTree: (exportedTokens: Record<string, unknown>) => CoreTree;
4
+ /** Pull one expressive palette (`bm.expressive.color`) out of a resolved SD dictionary. */
5
+ export declare const extractExpressivePalette: (exportedTokens: Record<string, unknown>) => BuildExpressivePalette;
@@ -0,0 +1,17 @@
1
+ import { Named, Transform } from 'style-dictionary';
2
+ /** A single React Native `boxShadow` layer. */
3
+ export type BoxShadowValue = {
4
+ offsetX: number;
5
+ offsetY: number;
6
+ blurRadius: number;
7
+ spreadDistance: number;
8
+ color: string;
9
+ inset?: boolean;
10
+ };
11
+ /**
12
+ * Reshapes a `boxShadow` composite into an RN `boxShadow` array, one `BoxShadowValue` per visible
13
+ * shadow layer. Zero-alpha layers are dropped, a "none" shadow emits `[]`.
14
+ *
15
+ * `transitive` so it also runs on reference derived shadows, not just literals.
16
+ */
17
+ export declare const nativeShadowTransform: Named<Transform>;
@@ -0,0 +1,24 @@
1
+ import { BaseColorTheme, BaseShapeTheme } from '../../utils/index.js';
2
+ import { ExpressivePaletteSource, NativeCombo } from './native.types.js';
3
+ /**
4
+ * List every (mode × accent × productType) combo.
5
+ */
6
+ export declare const enumerateCombos: () => NativeCombo[];
7
+ /**
8
+ * Full source list for one combo: base source followed by accent overrides,
9
+ * de-duplicated.
10
+ */
11
+ export declare const composeNativeSource: (accent: string, mode: BaseColorTheme, productType: BaseShapeTheme) => string[];
12
+ /**
13
+ * Source list for resolving expressive palettes only.
14
+ */
15
+ export declare const composeExpressiveSource: (accent: string, mode: BaseColorTheme) => string[];
16
+ /**
17
+ * Expressive source with no accent overrides, for the eight fixed palettes
18
+ * (`blue`, `green`, … — every palette except `accent`).
19
+ */
20
+ export declare const composeBaseExpressiveSource: (mode: BaseColorTheme) => string[];
21
+ /**
22
+ * The nine expressive palette files under `EXPRESSIVE_TOKEN_PATH`, keyed by palette name.
23
+ */
24
+ export declare const expressivePaletteSources: () => ExpressivePaletteSource[];
@@ -0,0 +1,3 @@
1
+ import { Core } from 'style-dictionary';
2
+ /** Register the native-only transforms. */
3
+ export declare const registerNativeTransforms: (sd: Core) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,28 @@
1
+ import { Accent, BaseColorTheme, BaseShapeTheme } from '../../utils/index.js';
2
+ /**
3
+ * One build combo (mode × accent × productType). We resolve a tree per combo,
4
+ * then group combos that share accent + productType into a single module.
5
+ */
6
+ export interface NativeCombo {
7
+ mode: BaseColorTheme;
8
+ accent: Accent;
9
+ productType: BaseShapeTheme;
10
+ }
11
+ /** An expressive palette's key (its name) and token file path. */
12
+ export interface ExpressivePaletteSource {
13
+ key: string;
14
+ file: string;
15
+ }
16
+ /**
17
+ * A combo's resolved core tree — the `{ sem, dataviz, comp }` literals apps
18
+ * consume. Build-only layers (primitive, alias, theme, utility) are resolved away.
19
+ */
20
+ export interface CoreTree {
21
+ sem: unknown;
22
+ dataviz: unknown;
23
+ comp: unknown;
24
+ }
25
+ /** One resolved expressive palette (`bg`, `fg`, …), keys as authored. */
26
+ export type BuildExpressivePalette = Record<string, unknown>;
27
+ /** A combo's expressive palettes, keyed by palette name (`accent`, `blue`, …). */
28
+ export type BuildExpressivePaletteMap = Record<string, BuildExpressivePalette>;
@@ -0,0 +1,22 @@
1
+ import { Named, Transform } from 'style-dictionary';
2
+ /**
3
+ * Maps a font family + weight word to the font's registered name. Each weight ships
4
+ * as its own font.
5
+ */
6
+ export declare const FONT_NAME_MAP: Record<string, Record<string, string>>;
7
+ /** Valid RN textTransform values. */
8
+ export declare const TEXT_TRANSFORM_VALUES: Set<string>;
9
+ /** Valid RN textDecorationLine values. */
10
+ export declare const TEXT_DECORATION_LINE_VALUES: Set<string>;
11
+ /**
12
+ * Looks up a font's registered face name in `FONT_NAME_MAP`, or throws with
13
+ * `context` describing where the lookup came from.
14
+ */
15
+ export declare const lookupRegisteredFace: (family: string, weight: string, context: string) => string;
16
+ export declare const stripQuotes: (value: string) => string;
17
+ /**
18
+ * Expands a typography composite into `{ fontFamily, fontSize, lineHeight,
19
+ * letterSpacing, textTransform?, textDecorationLine? }`. `fontFamily` encodes the
20
+ * weight (see FONT_NAME_MAP).
21
+ */
22
+ export declare const nativeTypographyTransform: Named<Transform>;
@@ -0,0 +1,3 @@
1
+ import { TransformedToken } from 'style-dictionary';
2
+ /** Dotted token path for error messages, falling back to the token name. */
3
+ export declare const getTokenPath: (token: TransformedToken) => string;
@@ -0,0 +1,7 @@
1
+ import { Config } from 'style-dictionary';
2
+ export declare const nativeTransforms: string[];
3
+ /**
4
+ * SD config for one source list. Emits no files, the build reads resolved tokens in
5
+ * memory. `outputReferences: false` → every value is a literal.
6
+ */
7
+ export declare const createNativeConfig: (source: string[]) => Config;
@@ -1,5 +1,5 @@
1
- import { BuildConfig } from '../../utils';
2
- export * from './product-type.format.css';
3
- export * from './sd.product-tokens.config';
4
- export * from './product-type.transformers';
1
+ import { BuildConfig } from '../../utils/index.js';
2
+ export * from './product-type.format.css.js';
3
+ export * from './sd.product-tokens.config.js';
4
+ export * from './product-type.transformers.js';
5
5
  export declare const productTypeBuildConfig: BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Named, Format } from 'style-dictionary';
2
- import { CssVarsFormatters } from '../../utils';
2
+ import { CssVarsFormatters } from '../../utils/index.js';
3
3
  /**
4
4
  * Formatter to generate CSS variables for product type themes.
5
5
  **/
@@ -1,2 +1,2 @@
1
- export declare const productTypeTransformers: import('../../utils').TokenTransformers;
1
+ export declare const productTypeTransformers: import('../../utils/index.js').TokenTransformers;
2
2
  export default productTypeTransformers;
@@ -1,5 +1,5 @@
1
1
  import { Config } from 'style-dictionary';
2
- import { OutPutFilesPaths } from '../../utils';
2
+ import { OutPutFilesPaths } from '../../utils/index.js';
3
3
  export declare const enterpriseStyleDictConfig: Config;
4
4
  export declare const consumerStyleDictConfig: Config;
5
5
  declare const allConfigs: Config[];
@@ -1,7 +1,7 @@
1
- import { BuildConfig, CssVarsFormatters, ThemeConfig } from '../../utils';
2
- export * from './sd.shadow.config';
3
- export * from './shadows.format.css';
4
- export * from './shadow.transformers';
1
+ import { BuildConfig, CssVarsFormatters, ThemeConfig } from '../../utils/index.js';
2
+ export * from './sd.shadow.config.js';
3
+ export * from './shadows.format.css.js';
4
+ export * from './shadow.transformers.js';
5
5
  export declare const shadowFormatters: CssVarsFormatters;
6
6
  export declare const shadowBuildConfig: BuildConfig;
7
7
  export declare const ShadowThemeConfig: (theme: ThemeConfig) => BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Config, TransformedToken } from 'style-dictionary';
2
- import { OutPutFilesPaths, CommonConfig } from '../../utils';
2
+ import { OutPutFilesPaths, CommonConfig } from '../../utils/index.js';
3
3
  export declare const COMMON_CONFIG: CommonConfig;
4
4
  export declare const tokenFilter: (token: TransformedToken, darkMode?: boolean) => boolean;
5
5
  export declare const shadowStyleDictConfig: Config;
@@ -1,5 +1,5 @@
1
1
  import { Named, Transform, TransformGroup } from 'style-dictionary';
2
- import { TokenTransformers } from '../../utils';
2
+ import { TokenTransformers } from '../../utils/index.js';
3
3
  export declare const parseGblTokenValue: Named<Transform>;
4
4
  export declare const parseSemTokenValue: Named<Transform>;
5
5
  export declare const dimensionTransformGroup: Named<TransformGroup>;
@@ -1,5 +1,5 @@
1
1
  import { Format, Named } from 'style-dictionary';
2
- import { CssVarsFormatters } from '../../utils';
2
+ import { CssVarsFormatters } from '../../utils/index.js';
3
3
  /**
4
4
  * Formatter to generate CSS variables for shadow tokens.
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  import { TransformedToken } from 'style-dictionary';
2
- import { TOKEN_CATEGORY } from '../../utils';
2
+ import { TOKEN_CATEGORY } from '../../utils/index.js';
3
3
  export declare const isShadowToken: (token: TransformedToken, category: TOKEN_CATEGORY) => boolean;
4
4
  export declare const parseShadowTokenValue: (token: TransformedToken) => {
5
5
  bmValue: string;
@@ -1,4 +1,4 @@
1
- import { BuildConfig } from '../../utils';
2
- export * from './sd.storybook.config';
3
- export * from './js.transformers';
1
+ import { BuildConfig } from '../../utils/index.js';
2
+ export * from './sd.storybook.config.js';
3
+ export * from './js.transformers.js';
4
4
  export declare const storybookBuildConfig: BuildConfig;
@@ -1,3 +1,3 @@
1
- import { CssVarsFormatters } from '../../utils';
1
+ import { CssVarsFormatters } from '../../utils/index.js';
2
2
  export declare const storyBookFormatters: CssVarsFormatters;
3
3
  export default storyBookFormatters;
@@ -1,5 +1,5 @@
1
1
  import { Named, TransformGroup } from 'style-dictionary';
2
- import { TokenTransformers } from '../../utils';
2
+ import { TokenTransformers } from '../../utils/index.js';
3
3
  export declare const storybookTransformGroup: Named<TransformGroup>;
4
4
  export declare const storybookTransformers: TokenTransformers;
5
5
  export default storybookTransformers;
@@ -1,5 +1,5 @@
1
1
  import { Config } from 'style-dictionary';
2
- import { OutPutFilesPaths } from '../../utils';
2
+ import { OutPutFilesPaths } from '../../utils/index.js';
3
3
  export declare const storybookStyleDictConfig: Config;
4
4
  export declare const allConfigs: Config[];
5
5
  export declare const storybookOutputPaths: OutPutFilesPaths;
@@ -1,2 +1,2 @@
1
- import { ThemeConfig } from '../../utils';
1
+ import { ThemeConfig } from '../../utils/index.js';
2
2
  export declare const generateThemes: () => ThemeConfig[];
@@ -1 +1 @@
1
- export * from './generateThemes';
1
+ export * from './generateThemes.js';
@@ -1,3 +1,3 @@
1
1
  import { Config } from 'style-dictionary';
2
- import { ThemeConfigurationGenerator } from '../../utils';
2
+ import { ThemeConfigurationGenerator } from '../../utils/index.js';
3
3
  export declare const createThemeConfigs: ({ theme, commonConfig, tokenFilter, languages, }: ThemeConfigurationGenerator) => Config[];
@@ -1,4 +1,4 @@
1
- import { TokenOutputPaths, ThemeConfig } from '../../utils/constants';
1
+ import { TokenOutputPaths, ThemeConfig } from '../../utils/constants/index.js';
2
2
  /**
3
3
  * Checks if a theme contains a given token type.
4
4
  * @param themeRootPath - The root path of the theme.
@@ -12,7 +12,7 @@ export declare const doesThemeHaveToken: ({ themeRootPath, tokenType, tokenSearc
12
12
  tokenSearchString?: string | string[];
13
13
  }) => boolean;
14
14
  export declare const hasDarkTheme: (themeRootPath: string) => false | "dark";
15
- export declare const hasDimensionTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants').BuildConfig;
16
- export declare const hasShadowTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants').BuildConfig;
17
- export declare const hasTypographyTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants').BuildConfig;
18
- export declare const hasLanguageTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants').BuildConfig;
15
+ export declare const hasDimensionTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants/index.js').BuildConfig;
16
+ export declare const hasShadowTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants/index.js').BuildConfig;
17
+ export declare const hasTypographyTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants/index.js').BuildConfig;
18
+ export declare const hasLanguageTokens: (themeRootPath: string, theme: ThemeConfig) => false | import('../../utils/constants/index.js').BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Named, Format, TransformedToken } from 'style-dictionary';
2
- import { CssVarsFormatters } from '../../../utils';
2
+ import { CssVarsFormatters } from '../../../utils/index.js';
3
3
  type TypoTokenFormatterHelper = (params: {
4
4
  dictionary: TransformedToken[];
5
5
  }) => string;
@@ -1,3 +1,3 @@
1
- import { CssVarsFormatters } from '../../../utils';
1
+ import { CssVarsFormatters } from '../../../utils/index.js';
2
2
  export declare const typographyFormatters: CssVarsFormatters;
3
3
  export default typographyFormatters;
@@ -1,5 +1,5 @@
1
1
  import { TransformedToken } from 'style-dictionary';
2
- import { CommonConfig } from '../../utils';
2
+ import { CommonConfig } from '../../utils/index.js';
3
3
  export declare const COMMON_CONFIG: CommonConfig;
4
4
  /**
5
5
  * These tokens are a special case that Figma and Token Studio do not support
@@ -1,6 +1,6 @@
1
- import { BuildConfig, ThemeConfig } from '../../utils';
2
- export * from './formatters';
3
- export * from './sd.typography.config';
4
- export * from './transformers';
1
+ import { BuildConfig, ThemeConfig } from '../../utils/index.js';
2
+ export * from './formatters/index.js';
3
+ export * from './sd.typography.config.js';
4
+ export * from './transformers/index.js';
5
5
  export declare const typographyBuildConfig: BuildConfig;
6
6
  export declare const typographyThemeConfig: (theme: ThemeConfig) => BuildConfig;
@@ -1,5 +1,5 @@
1
1
  import { Config } from 'style-dictionary';
2
- import { OutPutFilesPaths } from '../../utils';
2
+ import { OutPutFilesPaths } from '../../utils/index.js';
3
3
  declare const allConfigs: Config[];
4
4
  export declare const typographyOutputPaths: OutPutFilesPaths;
5
5
  export default allConfigs;
@@ -1,5 +1,5 @@
1
1
  import { Named, TransformGroup } from 'style-dictionary';
2
- import { TokenTransformers } from '../../../utils';
2
+ import { TokenTransformers } from '../../../utils/index.js';
3
3
  export declare const typographyTransformGroup: Named<TransformGroup>;
4
4
  export declare const typographyTransformers: TokenTransformers;
5
5
  export default typographyTransformers;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Export the flat tokens for css in js solutions
3
3
  */
4
- export * from './js/tokens';
4
+ export * from './js/tokens.js';
5
5
  /**
6
6
  * Export utility functions and helpers
7
7
  */
8
- export * from '../utils/dataviz';
8
+ export * from '../utils/dataviz.js';
@@ -0,0 +1 @@
1
+ export declare const fontFaceNames: string[];