@stackone/malachite 0.41.0 → 0.42.1

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.ts CHANGED
@@ -103,6 +103,9 @@ export declare function applyLightTheme(): void;
103
103
  */
104
104
  export declare function applyTheme(theme: PartialMalachiteTheme): void;
105
105
 
106
+ /** Scope the active theme (base mode + any persisted custom overrides) to one element/root, without changing global mode. Used by <ThemeScope>. */
107
+ export declare function applyThemeVars(target: HTMLElement | ShadowRoot, mode: ThemeMode): void;
108
+
106
109
  /**
107
110
  * A logo/initial avatar. Renders `src` when available, otherwise a coloured tile
108
111
  * with the first letter of `name`. Encapsulates the fallback colour so consumers
@@ -928,6 +931,7 @@ export declare interface MalachiteTheme {
928
931
  placeholder: string;
929
932
  destructive: string;
930
933
  success: string;
934
+ highlight: string;
931
935
  warning: string;
932
936
  warningMuted: string;
933
937
  error: string;
@@ -1568,7 +1572,7 @@ declare interface TextAreaProps {
1568
1572
 
1569
1573
  declare type TextAreaSize = 'small' | 'medium' | 'large';
1570
1574
 
1571
- declare type TextColor = 'primary' | 'secondary' | 'dimmed' | 'placeholder' | 'emphasis' | 'muted' | 'destructive' | 'success' | 'warning' | 'error' | 'link';
1575
+ declare type TextColor = 'primary' | 'secondary' | 'dimmed' | 'placeholder' | 'emphasis' | 'muted' | 'destructive' | 'success' | 'highlight' | 'warning' | 'error' | 'link';
1572
1576
 
1573
1577
  declare interface TextProps {
1574
1578
  color?: TextColor;
@@ -1582,6 +1586,22 @@ declare interface TextProps {
1582
1586
  style?: default_2.CSSProperties;
1583
1587
  }
1584
1588
 
1589
+ export declare type ThemeMode = 'light' | 'dark';
1590
+
1591
+ /**
1592
+ * Pins a subtree to a fixed Malachite theme via its own shadow root — a themed island (e.g. a dark
1593
+ * panel in a light app). The dedicated root is required: theme tokens are scoped per shadow root.
1594
+ */
1595
+ export declare const ThemeScope: default_2.FC<ThemeScopeProps>;
1596
+
1597
+ export declare interface ThemeScopeProps {
1598
+ mode?: ThemeMode;
1599
+ fontFamily?: string;
1600
+ className?: string;
1601
+ style?: default_2.CSSProperties;
1602
+ children?: default_2.ReactNode;
1603
+ }
1604
+
1585
1605
  export declare const Toggle: default_2.FC<ToggleProps>;
1586
1606
 
1587
1607
  declare interface ToggleProps {