@matteoaliano/forest-ui 0.8.8 → 1.0.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/theme.d.mts CHANGED
@@ -552,6 +552,7 @@ declare const buttonColors: {
552
552
  };
553
553
  declare const avatarColors: {
554
554
  readonly bg: "#f5f3f1";
555
+ readonly fg: "#52525b";
555
556
  readonly contrastBorder: "#00000014";
556
557
  readonly profilePhotoBorder: "#ffffff";
557
558
  readonly focusBorder: "#a0a0a624";
@@ -760,27 +761,23 @@ interface DesignTokens {
760
761
  button: string;
761
762
  }>;
762
763
  }
763
- /** Configuration for a single variant within a preset. */
764
- interface PresetVariantConfig {
765
- tokens: DesignTokens;
766
- }
767
- /** A named theme preset with one or more variants. */
764
+ /** A named theme preset carrying a full set of design tokens. */
768
765
  interface ThemePreset {
769
766
  name: string;
770
- defaultVariant: string;
771
- variants: Record<string, PresetVariantConfig>;
767
+ tokens: DesignTokens;
768
+ /** Optional dark-scheme token set. Same shape as `tokens`. */
769
+ tokensDark?: DesignTokens;
772
770
  }
773
771
 
774
- /** Assemble a MUI ThemeOptions object from a full set of design tokens. */
775
- declare function buildThemeOptions(tokens: DesignTokens): ThemeOptions;
772
+ /**
773
+ * Assemble a MUI ThemeOptions object from a full set of design tokens.
774
+ * When `tokensDark` is supplied, the theme carries both `light` and `dark`
775
+ * color schemes (CSS variables, `.dark` class selector) so consumers get a
776
+ * native MUI dark mode. Without it, the theme stays single-scheme (light).
777
+ */
778
+ declare function buildThemeOptions(tokens: DesignTokens, tokensDark?: DesignTokens): ThemeOptions;
776
779
  /** Create a fully resolved MUI Theme from a full set of design tokens. */
777
- declare function buildTheme(tokens: DesignTokens): Theme;
778
-
779
- declare const forestExternalPreset: ThemePreset;
780
-
781
- declare const forestAgencyPreset: ThemePreset;
782
-
783
- declare const forestInternalPreset: ThemePreset;
780
+ declare function buildTheme(tokens: DesignTokens, tokensDark?: DesignTokens): Theme;
784
781
 
785
782
  declare const forestAlkemyPlusPreset: ThemePreset;
786
783
 
@@ -794,4 +791,4 @@ declare function getAvailablePresets(): string[];
794
791
  declare const forestTheme: _mui_material.Theme;
795
792
  declare const forestThemeOptions: _mui_material.ThemeOptions;
796
793
 
797
- export { type DesignTokens, type PresetVariantConfig, type ThemePreset, alpha, avatarColors, base, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, container, display, error, fg, focusRings, fontFamily, fontFamilyMono, fontSize, fontWeight, forestAgencyPreset, forestAlkemyPlusPreset, forestExternalPreset, forestInternalPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, gray, iconColors, info, lineHeight, magenta, misc, navColors, radius, red, registerPreset, shadows, sliderColors, spacing, success, text, toggleColors, violet, warning, widths };
794
+ export { type DesignTokens, type ThemePreset, alpha, avatarColors, base, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, container, display, error, fg, focusRings, fontFamily, fontFamilyMono, fontSize, fontWeight, forestAlkemyPlusPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, gray, iconColors, info, lineHeight, magenta, misc, navColors, radius, red, registerPreset, shadows, sliderColors, spacing, success, text, toggleColors, violet, warning, widths };
package/dist/theme.d.ts CHANGED
@@ -552,6 +552,7 @@ declare const buttonColors: {
552
552
  };
553
553
  declare const avatarColors: {
554
554
  readonly bg: "#f5f3f1";
555
+ readonly fg: "#52525b";
555
556
  readonly contrastBorder: "#00000014";
556
557
  readonly profilePhotoBorder: "#ffffff";
557
558
  readonly focusBorder: "#a0a0a624";
@@ -760,27 +761,23 @@ interface DesignTokens {
760
761
  button: string;
761
762
  }>;
762
763
  }
763
- /** Configuration for a single variant within a preset. */
764
- interface PresetVariantConfig {
765
- tokens: DesignTokens;
766
- }
767
- /** A named theme preset with one or more variants. */
764
+ /** A named theme preset carrying a full set of design tokens. */
768
765
  interface ThemePreset {
769
766
  name: string;
770
- defaultVariant: string;
771
- variants: Record<string, PresetVariantConfig>;
767
+ tokens: DesignTokens;
768
+ /** Optional dark-scheme token set. Same shape as `tokens`. */
769
+ tokensDark?: DesignTokens;
772
770
  }
773
771
 
774
- /** Assemble a MUI ThemeOptions object from a full set of design tokens. */
775
- declare function buildThemeOptions(tokens: DesignTokens): ThemeOptions;
772
+ /**
773
+ * Assemble a MUI ThemeOptions object from a full set of design tokens.
774
+ * When `tokensDark` is supplied, the theme carries both `light` and `dark`
775
+ * color schemes (CSS variables, `.dark` class selector) so consumers get a
776
+ * native MUI dark mode. Without it, the theme stays single-scheme (light).
777
+ */
778
+ declare function buildThemeOptions(tokens: DesignTokens, tokensDark?: DesignTokens): ThemeOptions;
776
779
  /** Create a fully resolved MUI Theme from a full set of design tokens. */
777
- declare function buildTheme(tokens: DesignTokens): Theme;
778
-
779
- declare const forestExternalPreset: ThemePreset;
780
-
781
- declare const forestAgencyPreset: ThemePreset;
782
-
783
- declare const forestInternalPreset: ThemePreset;
780
+ declare function buildTheme(tokens: DesignTokens, tokensDark?: DesignTokens): Theme;
784
781
 
785
782
  declare const forestAlkemyPlusPreset: ThemePreset;
786
783
 
@@ -794,4 +791,4 @@ declare function getAvailablePresets(): string[];
794
791
  declare const forestTheme: _mui_material.Theme;
795
792
  declare const forestThemeOptions: _mui_material.ThemeOptions;
796
793
 
797
- export { type DesignTokens, type PresetVariantConfig, type ThemePreset, alpha, avatarColors, base, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, container, display, error, fg, focusRings, fontFamily, fontFamilyMono, fontSize, fontWeight, forestAgencyPreset, forestAlkemyPlusPreset, forestExternalPreset, forestInternalPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, gray, iconColors, info, lineHeight, magenta, misc, navColors, radius, red, registerPreset, shadows, sliderColors, spacing, success, text, toggleColors, violet, warning, widths };
794
+ export { type DesignTokens, type ThemePreset, alpha, avatarColors, base, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, container, display, error, fg, focusRings, fontFamily, fontFamilyMono, fontSize, fontWeight, forestAlkemyPlusPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, gray, iconColors, info, lineHeight, magenta, misc, navColors, radius, red, registerPreset, shadows, sliderColors, spacing, success, text, toggleColors, violet, warning, widths };