@texturehq/edges 1.28.1 → 1.28.2

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.d.cts CHANGED
@@ -6625,6 +6625,25 @@ interface BrandProviderProps {
6625
6625
  * These override the default Edges theme variables.
6626
6626
  */
6627
6627
  variables?: BrandVariables;
6628
+ /**
6629
+ * CSS variable overrides to apply when dark mode is active (`.theme-dark`).
6630
+ * Uses the same cascade map as `variables` — overriding `--color-brand-primary`
6631
+ * automatically cascades to derived tokens (action colors, link colors, etc.).
6632
+ *
6633
+ * When omitted, the dark mode theme falls back to Edges defaults.
6634
+ * This is a non-breaking addition — existing consumers are unaffected.
6635
+ *
6636
+ * @example
6637
+ * ```tsx
6638
+ * <BrandProvider
6639
+ * variables={{ '--color-brand-primary': '#2563eb' }}
6640
+ * darkVariables={{ '--color-brand-primary': '#60a5fa' }}
6641
+ * >
6642
+ * <App />
6643
+ * </BrandProvider>
6644
+ * ```
6645
+ */
6646
+ darkVariables?: BrandVariables;
6628
6647
  children: ReactNode;
6629
6648
  }
6630
6649
  /**
@@ -6635,19 +6654,29 @@ interface BrandProviderProps {
6635
6654
  * (like --color-brand-primary), this component automatically cascades
6636
6655
  * the override to derived semantic tokens (action colors, link colors, etc.).
6637
6656
  *
6657
+ * Pass `darkVariables` to provide separate overrides for dark mode (`.theme-dark`).
6658
+ * This is especially useful for ensuring accessible contrast ratios in both modes.
6659
+ *
6660
+ * Both `variables` and `darkVariables` are applied via stylesheet rules (not inline
6661
+ * styles), so dark-mode rules correctly override light-mode rules in `.theme-dark`.
6662
+ *
6638
6663
  * @example
6639
6664
  * ```tsx
6640
6665
  * <BrandProvider
6641
6666
  * variables={{
6642
- * '--color-brand-primary': '#ff6600',
6643
- * '--color-brand-dark': '#cc5200',
6667
+ * '--color-brand-primary': '#2563eb',
6668
+ * '--color-brand-dark': '#1d4ed8',
6669
+ * }}
6670
+ * darkVariables={{
6671
+ * '--color-brand-primary': '#60a5fa',
6672
+ * '--color-brand-dark': '#93c5fd',
6644
6673
  * }}
6645
6674
  * >
6646
6675
  * <App />
6647
6676
  * </BrandProvider>
6648
6677
  * ```
6649
6678
  */
6650
- declare function BrandProvider({ variables, children }: BrandProviderProps): react_jsx_runtime.JSX.Element;
6679
+ declare function BrandProvider({ variables, darkVariables, children }: BrandProviderProps): react_jsx_runtime.JSX.Element;
6651
6680
 
6652
6681
  type ColorMode = "system" | "light" | "dark";
6653
6682
  type ResolvedTheme = "light" | "dark";
package/dist/index.d.ts CHANGED
@@ -6625,6 +6625,25 @@ interface BrandProviderProps {
6625
6625
  * These override the default Edges theme variables.
6626
6626
  */
6627
6627
  variables?: BrandVariables;
6628
+ /**
6629
+ * CSS variable overrides to apply when dark mode is active (`.theme-dark`).
6630
+ * Uses the same cascade map as `variables` — overriding `--color-brand-primary`
6631
+ * automatically cascades to derived tokens (action colors, link colors, etc.).
6632
+ *
6633
+ * When omitted, the dark mode theme falls back to Edges defaults.
6634
+ * This is a non-breaking addition — existing consumers are unaffected.
6635
+ *
6636
+ * @example
6637
+ * ```tsx
6638
+ * <BrandProvider
6639
+ * variables={{ '--color-brand-primary': '#2563eb' }}
6640
+ * darkVariables={{ '--color-brand-primary': '#60a5fa' }}
6641
+ * >
6642
+ * <App />
6643
+ * </BrandProvider>
6644
+ * ```
6645
+ */
6646
+ darkVariables?: BrandVariables;
6628
6647
  children: ReactNode;
6629
6648
  }
6630
6649
  /**
@@ -6635,19 +6654,29 @@ interface BrandProviderProps {
6635
6654
  * (like --color-brand-primary), this component automatically cascades
6636
6655
  * the override to derived semantic tokens (action colors, link colors, etc.).
6637
6656
  *
6657
+ * Pass `darkVariables` to provide separate overrides for dark mode (`.theme-dark`).
6658
+ * This is especially useful for ensuring accessible contrast ratios in both modes.
6659
+ *
6660
+ * Both `variables` and `darkVariables` are applied via stylesheet rules (not inline
6661
+ * styles), so dark-mode rules correctly override light-mode rules in `.theme-dark`.
6662
+ *
6638
6663
  * @example
6639
6664
  * ```tsx
6640
6665
  * <BrandProvider
6641
6666
  * variables={{
6642
- * '--color-brand-primary': '#ff6600',
6643
- * '--color-brand-dark': '#cc5200',
6667
+ * '--color-brand-primary': '#2563eb',
6668
+ * '--color-brand-dark': '#1d4ed8',
6669
+ * }}
6670
+ * darkVariables={{
6671
+ * '--color-brand-primary': '#60a5fa',
6672
+ * '--color-brand-dark': '#93c5fd',
6644
6673
  * }}
6645
6674
  * >
6646
6675
  * <App />
6647
6676
  * </BrandProvider>
6648
6677
  * ```
6649
6678
  */
6650
- declare function BrandProvider({ variables, children }: BrandProviderProps): react_jsx_runtime.JSX.Element;
6679
+ declare function BrandProvider({ variables, darkVariables, children }: BrandProviderProps): react_jsx_runtime.JSX.Element;
6651
6680
 
6652
6681
  type ColorMode = "system" | "light" | "dark";
6653
6682
  type ResolvedTheme = "light" | "dark";