@acuteinfo/common-base 1.2.85 → 1.2.86

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.
@@ -12,8 +12,6 @@ export * from "./generators/borderGenerator";
12
12
  export * from "./generateTheme";
13
13
  export * from "./presets/presets";
14
14
  export * from "./legacy/syncLegacyVars";
15
- export * from "./legacy/theme";
16
15
  export * from "./providers/BaseThemeProvider";
17
- export * from "./providers/ColorModeContext";
18
16
  export * from "./components/ThemeToggleButton";
19
17
  export * from "./examples/ThemeUsageExample";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acuteinfo/common-base",
3
- "version": "1.2.85",
3
+ "version": "1.2.86",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "react",
@@ -1,60 +0,0 @@
1
- import { Theme } from "@mui/material/styles";
2
- /**
3
- * Base color token interface representing the single source of truth for Light Mode.
4
- */
5
- export interface LightPaletteTokens {
6
- primary: string;
7
- secondary: string;
8
- backgroundDefault: string;
9
- backgroundPaper: string;
10
- textPrimary: string;
11
- textSecondary: string;
12
- }
13
- /**
14
- * Single Source of Truth Theme Configuration (Immutable Base Light Tokens).
15
- * Frozen at runtime to guarantee zero state drift or mutation when toggling back to Light Mode.
16
- */
17
- export declare const LIGHT_PALETTE: Readonly<LightPaletteTokens>;
18
- /**
19
- * Utility function to ensure WCAG AAA/AA contrast compliance (min 4.5:1 ratio for normal text).
20
- * Dynamically lightens text foreground if contrast against dark background is insufficient.
21
- */
22
- export declare const ensureWCAGContrast: (foregroundHex: string, backgroundHex: string, minRatio?: number) => string;
23
- /**
24
- * Deterministic utility function that converts baseline Light Mode colors into softer,
25
- * lighter shades appropriate for Dark Mode.
26
- *
27
- * Target Adjustments:
28
- * 1. primary.main & secondary.main: Lightened by 30-35% to eliminate visual vibration on dark surfaces.
29
- * 2. background.default: Converted into a rich deep dark canvas (#0b0f17).
30
- * 3. background.paper: Derived by slightly elevating luminance (+7%) above default dark background.
31
- * 4. text.primary & text.secondary: Dynamic high-contrast light shades validated against WCAG standards.
32
- */
33
- export declare const generateDynamicDarkPalette: (lightTokens?: LightPaletteTokens) => {
34
- mode: "dark";
35
- primary: {
36
- main: string;
37
- light: string;
38
- dark: string;
39
- contrastText: string;
40
- };
41
- secondary: {
42
- main: string;
43
- light: string;
44
- dark: string;
45
- contrastText: string;
46
- };
47
- background: {
48
- default: string;
49
- paper: string;
50
- };
51
- text: {
52
- primary: string;
53
- secondary: string;
54
- };
55
- };
56
- /**
57
- * Creates a complete MUI Theme instance using theme generators from @/theme/generators
58
- * instead of static inline color and structural style fallbacks.
59
- */
60
- export declare const createAppTheme: (mode: "light" | "dark", customTokens?: LightPaletteTokens) => Theme;
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { PaletteMode } from "@mui/material";
3
- import { LightPaletteTokens } from "../legacy/theme";
4
- export interface ColorModeContextValue {
5
- mode: PaletteMode;
6
- toggleColorMode: () => void;
7
- setColorMode: (mode: PaletteMode) => void;
8
- }
9
- /**
10
- * Custom hook to safely access the ColorModeContext state.
11
- */
12
- export declare const useColorMode: () => ColorModeContextValue;
13
- export interface ColorModeProviderProps {
14
- children: React.ReactNode;
15
- initialTokens?: LightPaletteTokens;
16
- }
17
- /**
18
- * React Context Provider managing mode state ('light' | 'dark') and memoizing
19
- * the generated MUI theme to avoid theme recalculations on unrelated renders.
20
- */
21
- export declare const ColorModeProvider: React.FC<ColorModeProviderProps>;