@omnitron-dev/prism 0.3.3 → 0.4.6

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 (47) hide show
  1. package/dist/{chunk-DHTYHUYI.js → chunk-74TJGLFR.js} +4 -4
  2. package/dist/{chunk-DHTYHUYI.js.map → chunk-74TJGLFR.js.map} +1 -1
  3. package/dist/{chunk-D4GFAJAZ.js → chunk-FADV3QAS.js} +4 -4
  4. package/dist/{chunk-D4GFAJAZ.js.map → chunk-FADV3QAS.js.map} +1 -1
  5. package/dist/chunk-GCXRYSWU.js +132 -0
  6. package/dist/chunk-GCXRYSWU.js.map +1 -0
  7. package/dist/{chunk-UEINJFLS.js → chunk-HCADZXAK.js} +19 -10
  8. package/dist/chunk-HCADZXAK.js.map +1 -0
  9. package/dist/{chunk-RSWVYIXK.js → chunk-KOOKHWTH.js} +6 -133
  10. package/dist/chunk-KOOKHWTH.js.map +1 -0
  11. package/dist/{chunk-F6RZ7LW6.js → chunk-SPK7E7BD.js} +3 -3
  12. package/dist/{chunk-F6RZ7LW6.js.map → chunk-SPK7E7BD.js.map} +1 -1
  13. package/dist/{chunk-AATAOOSF.js → chunk-UWYLMSIQ.js} +3 -3
  14. package/dist/{chunk-AATAOOSF.js.map → chunk-UWYLMSIQ.js.map} +1 -1
  15. package/dist/{chunk-NSNM53WI.js → chunk-YYQWPEOP.js} +12 -11
  16. package/dist/chunk-YYQWPEOP.js.map +1 -0
  17. package/dist/components/admin-filters/index.js +2 -2
  18. package/dist/components/index.js +13 -12
  19. package/dist/core/index.js +4 -3
  20. package/dist/core/provider.d.ts +10 -4
  21. package/dist/core/provider.d.ts.map +1 -1
  22. package/dist/hooks/index.js +5 -4
  23. package/dist/identity/geometry.d.ts +25 -0
  24. package/dist/identity/geometry.d.ts.map +1 -0
  25. package/dist/identity/index.d.ts +6 -0
  26. package/dist/identity/index.d.ts.map +1 -0
  27. package/dist/identity/index.js +278 -0
  28. package/dist/identity/index.js.map +1 -0
  29. package/dist/identity/omnitron-mark.d.ts +14 -0
  30. package/dist/identity/omnitron-mark.d.ts.map +1 -0
  31. package/dist/identity/omnitron-splash.d.ts +15 -0
  32. package/dist/identity/omnitron-splash.d.ts.map +1 -0
  33. package/dist/identity/theme.d.ts +7 -0
  34. package/dist/identity/theme.d.ts.map +1 -0
  35. package/dist/identity/tokens.d.ts +46 -0
  36. package/dist/identity/tokens.d.ts.map +1 -0
  37. package/dist/index.js +16 -15
  38. package/dist/index.js.map +1 -1
  39. package/dist/layouts/dashboard/sidenav.d.ts.map +1 -1
  40. package/dist/layouts/index.js +1 -1
  41. package/dist/theme/components/DataGrid.d.ts +0 -1
  42. package/dist/theme/components/DataGrid.d.ts.map +1 -1
  43. package/dist/theme/index.js +3 -2
  44. package/package.json +8 -4
  45. package/dist/chunk-NSNM53WI.js.map +0 -1
  46. package/dist/chunk-RSWVYIXK.js.map +0 -1
  47. package/dist/chunk-UEINJFLS.js.map +0 -1
@@ -0,0 +1,132 @@
1
+ // src/theme/typography.ts
2
+ var typography = {
3
+ fontFamily: {
4
+ primary: '"Nunito Sans Variable", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
5
+ secondary: '"Exo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
6
+ mono: '"JetBrains Mono", "Fira Code", Consolas, Monaco, monospace'
7
+ },
8
+ fontWeights: {
9
+ light: 300,
10
+ regular: 400,
11
+ medium: 500,
12
+ semiBold: 600,
13
+ bold: 700
14
+ }
15
+ };
16
+ var fontSizes = {
17
+ xs: "0.75rem",
18
+ // 12px
19
+ sm: "0.875rem",
20
+ // 14px
21
+ md: "1rem",
22
+ // 16px
23
+ lg: "1.125rem",
24
+ // 18px
25
+ xl: "1.25rem",
26
+ // 20px
27
+ "2xl": "1.5rem",
28
+ // 24px
29
+ "3xl": "1.875rem",
30
+ // 30px
31
+ "4xl": "2.25rem",
32
+ // 36px
33
+ "5xl": "3rem"};
34
+ var lineHeights = {
35
+ tight: 1.25,
36
+ snug: 1.375,
37
+ normal: 1.5,
38
+ relaxed: 1.625};
39
+ function createTypography(config) {
40
+ const { fontFamily, fontWeights } = config;
41
+ return {
42
+ fontFamily: fontFamily.primary,
43
+ fontWeightLight: fontWeights.light,
44
+ fontWeightRegular: fontWeights.regular,
45
+ fontWeightMedium: fontWeights.medium,
46
+ fontWeightBold: fontWeights.bold,
47
+ // Headings
48
+ h1: {
49
+ fontFamily: fontFamily.secondary || fontFamily.primary,
50
+ fontWeight: fontWeights.bold,
51
+ fontSize: fontSizes["5xl"],
52
+ lineHeight: lineHeights.tight,
53
+ letterSpacing: "-0.025em"
54
+ },
55
+ h2: {
56
+ fontFamily: fontFamily.secondary || fontFamily.primary,
57
+ fontWeight: fontWeights.bold,
58
+ fontSize: fontSizes["4xl"],
59
+ lineHeight: lineHeights.tight,
60
+ letterSpacing: "-0.025em"
61
+ },
62
+ h3: {
63
+ fontFamily: fontFamily.secondary || fontFamily.primary,
64
+ fontWeight: fontWeights.semiBold,
65
+ fontSize: fontSizes["3xl"],
66
+ lineHeight: lineHeights.snug,
67
+ letterSpacing: "-0.02em"
68
+ },
69
+ h4: {
70
+ fontFamily: fontFamily.secondary || fontFamily.primary,
71
+ fontWeight: fontWeights.semiBold,
72
+ fontSize: fontSizes["2xl"],
73
+ lineHeight: lineHeights.snug,
74
+ letterSpacing: "-0.02em"
75
+ },
76
+ h5: {
77
+ fontFamily: fontFamily.secondary || fontFamily.primary,
78
+ fontWeight: fontWeights.semiBold,
79
+ fontSize: fontSizes.xl,
80
+ lineHeight: lineHeights.snug
81
+ },
82
+ h6: {
83
+ fontFamily: fontFamily.secondary || fontFamily.primary,
84
+ fontWeight: fontWeights.semiBold,
85
+ fontSize: fontSizes.lg,
86
+ lineHeight: lineHeights.snug
87
+ },
88
+ // Body text
89
+ body1: {
90
+ fontSize: fontSizes.md,
91
+ lineHeight: lineHeights.relaxed
92
+ },
93
+ body2: {
94
+ fontSize: fontSizes.sm,
95
+ lineHeight: lineHeights.relaxed
96
+ },
97
+ // Subtitles
98
+ subtitle1: {
99
+ fontSize: fontSizes.md,
100
+ fontWeight: fontWeights.medium,
101
+ lineHeight: lineHeights.normal
102
+ },
103
+ subtitle2: {
104
+ fontSize: fontSizes.sm,
105
+ fontWeight: fontWeights.medium,
106
+ lineHeight: lineHeights.normal
107
+ },
108
+ // Captions and overlines
109
+ caption: {
110
+ fontSize: fontSizes.xs,
111
+ lineHeight: lineHeights.normal
112
+ },
113
+ overline: {
114
+ fontSize: fontSizes.xs,
115
+ fontWeight: fontWeights.semiBold,
116
+ lineHeight: lineHeights.normal,
117
+ textTransform: "uppercase",
118
+ letterSpacing: "0.08em"
119
+ },
120
+ // Buttons
121
+ button: {
122
+ fontSize: fontSizes.sm,
123
+ fontWeight: fontWeights.semiBold,
124
+ lineHeight: lineHeights.normal,
125
+ textTransform: "none"
126
+ }
127
+ };
128
+ }
129
+
130
+ export { createTypography, typography };
131
+ //# sourceMappingURL=chunk-GCXRYSWU.js.map
132
+ //# sourceMappingURL=chunk-GCXRYSWU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/typography.ts"],"names":[],"mappings":";AAiBO,IAAM,UAAA,GAA8B;AAAA,EACzC,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,0GAAA;AAAA,IACT,SAAA,EAAW,4EAAA;AAAA,IACX,IAAA,EAAM;AAAA,GACR;AAAA,EACA,WAAA,EAAa;AAAA,IACX,KAAA,EAAO,GAAA;AAAA,IACP,OAAA,EAAS,GAAA;AAAA,IACT,MAAA,EAAQ,GAAA;AAAA,IACR,QAAA,EAAU,GAAA;AAAA,IACV,IAAA,EAAM;AAAA;AAEV;AAKA,IAAM,SAAA,GAAY;AAAA,EAChB,EAAA,EAAI,SAAA;AAAA;AAAA,EACJ,EAAA,EAAI,UAAA;AAAA;AAAA,EACJ,EAAA,EAAI,MAAA;AAAA;AAAA,EACJ,EAAA,EAAI,UAA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AA,MACxB,YAAY,WAAA,CAAY;AAAA,KAC1B;AAAA;AAAA,IAGA,OAAA,EAAS;AAAA,MACP,UAAU,SAAA,CAAU,EAAA;AAAA,MACpB,YAAY,WAAA,CAAY;AAAA,KAC1B;AAAA,IACA,QAAA,EAAU;AAAA,MACR,UAAU,SAAA,CAAU,EAAA;AAAA,MACpB,YAAY,WAAA,CAAY,QAAA;AAAA,MACxB,YAAY,WAAA,CAAY,MAAA;AAAA,MACxB,aAAA,EAAe,WAAA;AAAA,MACf,aAAA,EAAe;AAAA,KACjB;AAAA;AAAA,IAGA,MAAA,EAAQ;AAAA,MACN,UAAU,SAAA,CAAU,EAAA;AAAA,MACpB,YAAY,WAAA,CAAY,QAAA;AAAA,MACxB,YAAY,WAAA,CAAY,MAAA;AAAA,MACxB,aAAA,EAAe;AAAA;AACjB,GACF;AACF","file":"chunk-GCXRYSWU.js","sourcesContent":["/**\n * Typography System\n *\n * Typography configuration for Prism themes.\n *\n * @module theme/typography\n */\n\nimport type { ThemeOptions } from '@mui/material/styles';\nimport type { ThemeTypography } from '../types/theme.js';\n\n/** MUI Typography options type */\ntype TypographyOptions = NonNullable<ThemeOptions['typography']>;\n\n/**\n * Default typography configuration.\n */\nexport const typography: ThemeTypography = {\n fontFamily: {\n primary: '\"Nunito Sans Variable\", \"Nunito Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n secondary: '\"Exo 2\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n mono: '\"JetBrains Mono\", \"Fira Code\", Consolas, Monaco, monospace',\n },\n fontWeights: {\n light: 300,\n regular: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n },\n};\n\n/**\n * Font size scale (in rem).\n */\nconst fontSizes = {\n xs: '0.75rem', // 12px\n sm: '0.875rem', // 14px\n md: '1rem', // 16px\n lg: '1.125rem', // 18px\n xl: '1.25rem', // 20px\n '2xl': '1.5rem', // 24px\n '3xl': '1.875rem', // 30px\n '4xl': '2.25rem', // 36px\n '5xl': '3rem', // 48px\n '6xl': '3.75rem', // 60px\n};\n\n/**\n * Line height scale.\n */\nconst lineHeights = {\n tight: 1.25,\n snug: 1.375,\n normal: 1.5,\n relaxed: 1.625,\n loose: 2,\n};\n\n/**\n * Create MUI typography options from Prism typography config.\n *\n * @param config - Typography configuration\n * @returns MUI typography options\n */\nexport function createTypography(config: ThemeTypography): TypographyOptions {\n const { fontFamily, fontWeights } = config;\n\n return {\n fontFamily: fontFamily.primary,\n fontWeightLight: fontWeights.light,\n fontWeightRegular: fontWeights.regular,\n fontWeightMedium: fontWeights.medium,\n fontWeightBold: fontWeights.bold,\n\n // Headings\n h1: {\n fontFamily: fontFamily.secondary || fontFamily.primary,\n fontWeight: fontWeights.bold,\n fontSize: fontSizes['5xl'],\n lineHeight: lineHeights.tight,\n letterSpacing: '-0.025em',\n },\n h2: {\n fontFamily: fontFamily.secondary || fontFamily.primary,\n fontWeight: fontWeights.bold,\n fontSize: fontSizes['4xl'],\n lineHeight: lineHeights.tight,\n letterSpacing: '-0.025em',\n },\n h3: {\n fontFamily: fontFamily.secondary || fontFamily.primary,\n fontWeight: fontWeights.semiBold,\n fontSize: fontSizes['3xl'],\n lineHeight: lineHeights.snug,\n letterSpacing: '-0.02em',\n },\n h4: {\n fontFamily: fontFamily.secondary || fontFamily.primary,\n fontWeight: fontWeights.semiBold,\n fontSize: fontSizes['2xl'],\n lineHeight: lineHeights.snug,\n letterSpacing: '-0.02em',\n },\n h5: {\n fontFamily: fontFamily.secondary || fontFamily.primary,\n fontWeight: fontWeights.semiBold,\n fontSize: fontSizes.xl,\n lineHeight: lineHeights.snug,\n },\n h6: {\n fontFamily: fontFamily.secondary || fontFamily.primary,\n fontWeight: fontWeights.semiBold,\n fontSize: fontSizes.lg,\n lineHeight: lineHeights.snug,\n },\n\n // Body text\n body1: {\n fontSize: fontSizes.md,\n lineHeight: lineHeights.relaxed,\n },\n body2: {\n fontSize: fontSizes.sm,\n lineHeight: lineHeights.relaxed,\n },\n\n // Subtitles\n subtitle1: {\n fontSize: fontSizes.md,\n fontWeight: fontWeights.medium,\n lineHeight: lineHeights.normal,\n },\n subtitle2: {\n fontSize: fontSizes.sm,\n fontWeight: fontWeights.medium,\n lineHeight: lineHeights.normal,\n },\n\n // Captions and overlines\n caption: {\n fontSize: fontSizes.xs,\n lineHeight: lineHeights.normal,\n },\n overline: {\n fontSize: fontSizes.xs,\n fontWeight: fontWeights.semiBold,\n lineHeight: lineHeights.normal,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n },\n\n // Buttons\n button: {\n fontSize: fontSizes.sm,\n fontWeight: fontWeights.semiBold,\n lineHeight: lineHeights.normal,\n textTransform: 'none',\n },\n };\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { defaultPrismConfig } from './chunk-ZRJYQN6Y.js';
2
- import { createPrismTheme } from './chunk-RSWVYIXK.js';
2
+ import { createPrismTheme } from './chunk-KOOKHWTH.js';
3
3
  import { useSettingsStore } from './chunk-NJM5AVBM.js';
4
- import { createContext, useContext, useMemo, useEffect, useCallback, useState, useRef, createElement } from 'react';
4
+ import { createContext, useContext, useMemo, useCallback, useEffect, useState, useRef, createElement } from 'react';
5
5
  import createCache from '@emotion/cache';
6
6
  import { CacheProvider } from '@emotion/react';
7
7
  import { ThemeProvider, useTheme } from '@mui/material/styles';
@@ -55,6 +55,8 @@ var noOpDrawerWarning = () => {
55
55
  function PrismProvider({
56
56
  children,
57
57
  config: configOverrides,
58
+ mode: controlledMode,
59
+ onModeChange,
58
60
  defaultSettings,
59
61
  disableCssBaseline = false,
60
62
  themeOverrides,
@@ -75,21 +77,25 @@ function PrismProvider({
75
77
  navLayout: storeNavLayout,
76
78
  navColor: storeNavColor,
77
79
  // Actions (stable references from Zustand)
78
- setMode,
79
- toggleMode,
80
+ setMode: setStoreMode,
80
81
  setPreset,
81
82
  setDirection,
82
83
  setCompactSidebar,
83
84
  reset: resetSettings
84
85
  } = useSettingsStore();
86
+ const mode = controlledMode ?? storeMode;
87
+ const setMode = useCallback((nextMode) => {
88
+ if (controlledMode === void 0) setStoreMode(nextMode);
89
+ onModeChange?.(nextMode);
90
+ }, [controlledMode, setStoreMode, onModeChange]);
85
91
  useEffect(() => {
86
- if (defaultSettings?.mode) setMode(defaultSettings.mode);
92
+ if (controlledMode === void 0 && defaultSettings?.mode) setStoreMode(defaultSettings.mode);
87
93
  if (defaultSettings?.preset) setPreset(defaultSettings.preset);
88
94
  if (defaultSettings?.direction) setDirection(defaultSettings.direction);
89
95
  }, []);
90
96
  const settings = useMemo(
91
97
  () => ({
92
- mode: storeMode,
98
+ mode,
93
99
  preset: storePreset,
94
100
  direction: storeDirection,
95
101
  sidebarCollapsed: compactSidebar,
@@ -103,7 +109,7 @@ function PrismProvider({
103
109
  navColor: storeNavColor
104
110
  }),
105
111
  [
106
- storeMode,
112
+ mode,
107
113
  storePreset,
108
114
  storeDirection,
109
115
  compactSidebar,
@@ -137,7 +143,10 @@ function PrismProvider({
137
143
  }
138
144
  }
139
145
  }, [storeFontSize]);
140
- const resolvedMode = useResolvedMode(storeMode);
146
+ const resolvedMode = useResolvedMode(mode);
147
+ const toggleMode = useCallback(() => {
148
+ setMode(resolvedMode === "dark" ? "light" : "dark");
149
+ }, [resolvedMode, setMode]);
141
150
  const theme = useMemo(
142
151
  () => createPrismTheme({
143
152
  preset: storePreset,
@@ -897,5 +906,5 @@ function useTimeout(callback, delay) {
897
906
  }
898
907
 
899
908
  export { PrismContext, PrismProvider, ProviderStack, composeProviders, conditionalProvider, createProviderStack, filterProviders, useBreakpoints, useClickOutside, useCopyToClipboard, useCountdown, useDebounce, useDebounceCallback, useEventListener, useInterval, useIsClient, useLocalStorage, useMounted, useMultiSelect, usePrevious, usePrismContext, useSetState, useTimeout, withProviderProps };
900
- //# sourceMappingURL=chunk-UEINJFLS.js.map
901
- //# sourceMappingURL=chunk-UEINJFLS.js.map
909
+ //# sourceMappingURL=chunk-HCADZXAK.js.map
910
+ //# sourceMappingURL=chunk-HCADZXAK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/context.ts","../src/core/hooks/use-media-query.ts","../src/core/provider.tsx","../src/core/provider-stack.tsx","../src/core/hooks/use-set-state.ts","../src/core/hooks/use-multi-select.ts","../src/core/hooks/use-local-storage.ts","../src/core/hooks/use-copy-to-clipboard.ts","../src/core/hooks/use-debounce.ts","../src/core/hooks/use-countdown.ts","../src/core/hooks/use-breakpoints.ts","../src/core/hooks/use-is-client.ts","../src/core/hooks/use-mounted.ts","../src/core/hooks/use-previous.ts","../src/core/hooks/use-event-listener.ts","../src/core/hooks/use-click-outside.ts","../src/core/hooks/use-interval.ts","../src/core/hooks/use-timeout.ts"],"names":["useMuiMediaQuery","MuiThemeProvider","useMemo","jsx","useCallback","useState","useEffect","useRef"],"mappings":";;;;;;;;;;;;;;;;AAoFO,IAAM,YAAA,GAAe,cAAwC,IAAI;AAExE,YAAA,CAAa,WAAA,GAAc,cAAA;AAqBpB,SAAS,eAAA,GAAqC;AACnD,EAAA,MAAM,OAAA,GAAU,WAAW,YAAY,CAAA;AAEvC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,MAAM,IAAI,MAAM,qDAAqD,CAAA;AAAA,EACvE;AAEA,EAAA,OAAO,OAAA;AACT;AChFO,SAAS,kBAAA,GAA8B;AAC5C,EAAA,OAAOA,gBAAiB,8BAA8B,CAAA;AACxD;AAwFO,SAAS,gBAAgB,IAAA,EAAqD;AACnF,EAAA,MAAM,cAAc,kBAAA,EAAmB;AAEvC,EAAA,IAAI,SAAS,QAAA,EAAU;AACrB,IAAA,OAAO,cAAc,MAAA,GAAS,OAAA;AAAA,EAChC;AAEA,EAAA,OAAO,IAAA;AACT;AC1DA,SAAS,WAAA,CAAY,MAAmB,SAAA,EAA6C;AACnF,EAAA,IAAI,CAAC,WAAW,OAAO,IAAA;AAEvB,EAAA,OAAO;AAAA,IACL,GAAG,IAAA;AAAA,IACH,GAAG,SAAA;AAAA,IAC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B,MAAA,WAAA,CAAY,KAAK,CAAA;AAAA,IACnB;AAAA,EACF,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,MAAM,KAAA,GAAQA,YAAY,MAAM;AAC9B,IAAA,KAAA,EAAM;AACN,IAAA,UAAA,CAAW,OAAA,GAAU,WAAW,MAAM;AACpC,MAAA,aAAA,CAAc,OAAA,EAAQ;AACtB,MAAA,WAAA,CAAY,KAAK,CAAA;AAAA,IACnB,GAAG,KAAK,CAAA;AACR,IAAA,WAAA,CAAY,IAAI,CAAA;AAAA,EAClB,CAAA,EAAG,CAAC,KAAA,EAAO,KAAK,CAAC,CAAA;AAGjB,EAAAE,UAAU,MAAM;AACd,IAAA,KAAA,EAAM;AACN,IAAA,OAAO,KAAA;AAAA,EACT,CAAA,EAAG,CAAC,KAAA,EAAO,KAAK,CAAC,CAAA;AAGjB,EAAA,OAAOJ,OAAAA,CAAQ,OAAO,EAAE,KAAA,EAAO,KAAA,EAAO,QAAA,EAAS,CAAA,EAAI,CAAC,KAAA,EAAO,KAAA,EAAO,QAAQ,CAAC,CAAA;AAC7E","file":"chunk-HCADZXAK.js","sourcesContent":["/**\n * Prism Context\n *\n * Global context for Prism configuration and state.\n *\n * @module core/context\n */\n\nimport { createContext, useContext } from 'react';\nimport type { PrismConfig } from '../types/config.js';\nimport type { PrismTheme, ThemeMode, ThemePreset, ThemeDirection } from '../types/theme.js';\nimport type { NavLayout, NavColor } from '../state/stores/settings.js';\n\n/**\n * Settings state managed by Prism.\n * @deprecated Use useSettingsStore from '@omnitron-dev/prism/state' for full settings access.\n * This interface is maintained for backwards compatibility with PrismContext.\n */\nexport interface PrismSettingsState {\n /** Current theme mode */\n mode: ThemeMode;\n /** Current theme preset */\n preset: ThemePreset;\n /** Text direction */\n direction: ThemeDirection;\n /** Sidebar collapsed state */\n sidebarCollapsed: boolean;\n /** Settings drawer open */\n settingsDrawerOpen: boolean;\n /** Primary color override */\n primaryColor: string | null;\n /** High contrast mode */\n contrast: 'default' | 'high';\n /** Base font size (12-20) */\n fontSize: number;\n /** Selected font family */\n fontFamily: string;\n /** Navigation layout */\n navLayout: NavLayout;\n /** Navigation color mode */\n navColor: NavColor;\n}\n\n/**\n * Prism context value.\n */\nexport interface PrismContextValue {\n /** Current configuration */\n config: PrismConfig;\n /** Current theme */\n theme: PrismTheme;\n /** Settings state */\n settings: PrismSettingsState;\n\n // Theme actions\n /** Set theme mode */\n setMode: (mode: ThemeMode) => void;\n /** Toggle between light/dark */\n toggleMode: () => void;\n /** Set theme preset */\n setPreset: (preset: ThemePreset) => void;\n /** Set text direction */\n setDirection: (direction: ThemeDirection) => void;\n\n // Settings actions\n /** Toggle sidebar */\n toggleSidebar: () => void;\n /** Set sidebar collapsed */\n setSidebarCollapsed: (collapsed: boolean) => void;\n /** Open settings drawer */\n openSettingsDrawer: () => void;\n /** Close settings drawer */\n closeSettingsDrawer: () => void;\n /** Toggle settings drawer */\n toggleSettingsDrawer: () => void;\n\n // Reset\n /** Reset all settings to defaults */\n resetSettings: () => void;\n}\n\n/**\n * Prism context.\n */\nexport const PrismContext = createContext<PrismContextValue | null>(null);\n\nPrismContext.displayName = 'PrismContext';\n\n/**\n * Hook to access Prism context.\n *\n * @returns Prism context value\n * @throws If used outside PrismProvider\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { theme, setMode, toggleSidebar } = usePrismContext();\n *\n * return (\n * <Button onClick={() => setMode('dark')}>\n * Switch to Dark Mode\n * </Button>\n * );\n * }\n * ```\n */\nexport function usePrismContext(): PrismContextValue {\n const context = useContext(PrismContext);\n\n if (!context) {\n throw new Error('usePrismContext must be used within a PrismProvider');\n }\n\n return context;\n}\n\n/**\n * Default settings state.\n */\nexport const defaultSettingsState: PrismSettingsState = {\n mode: 'light',\n preset: 'default-light',\n direction: 'ltr',\n sidebarCollapsed: false,\n settingsDrawerOpen: false,\n primaryColor: null,\n contrast: 'default',\n fontSize: 16,\n fontFamily: 'Public Sans Variable',\n navLayout: 'vertical',\n navColor: 'integrate',\n};\n","'use client';\n\n/**\n * useMediaQuery Hook\n *\n * Re-export and extension of MUI's useMediaQuery.\n *\n * @module core/hooks/use-media-query\n */\n\nimport { useMediaQuery as useMuiMediaQuery } from '@mui/material';\nimport type { UseMediaQueryOptions } from '@mui/material';\n\nexport { useMuiMediaQuery as useMediaQuery };\nexport type { UseMediaQueryOptions };\n\n/**\n * Hook for detecting system color scheme preference.\n *\n * @returns true if user prefers dark mode\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const prefersDark = usePrefersDarkMode();\n * const { setMode } = usePrismContext();\n *\n * useEffect(() => {\n * setMode(prefersDark ? 'dark' : 'light');\n * }, [prefersDark, setMode]);\n *\n * return null;\n * }\n * ```\n */\nexport function usePrefersDarkMode(): boolean {\n return useMuiMediaQuery('(prefers-color-scheme: dark)');\n}\n\n/**\n * Hook for detecting reduced motion preference.\n *\n * @returns true if user prefers reduced motion\n *\n * @example\n * ```tsx\n * function AnimatedComponent() {\n * const prefersReducedMotion = usePrefersReducedMotion();\n *\n * return (\n * <motion.div\n * animate={{ x: 100 }}\n * transition={{\n * duration: prefersReducedMotion ? 0 : 0.3,\n * }}\n * />\n * );\n * }\n * ```\n */\nexport function usePrefersReducedMotion(): boolean {\n return useMuiMediaQuery('(prefers-reduced-motion: reduce)');\n}\n\n/**\n * Hook for detecting high contrast preference.\n *\n * @returns true if user prefers high contrast\n */\nexport function usePrefersHighContrast(): boolean {\n return useMuiMediaQuery('(prefers-contrast: more)');\n}\n\n/**\n * Hook for detecting touch device.\n *\n * @returns true if device supports hover (likely not touch)\n *\n * @example\n * ```tsx\n * function Tooltip() {\n * const canHover = useCanHover();\n *\n * // Only show hover tooltips on non-touch devices\n * if (!canHover) {\n * return <TouchTooltip />;\n * }\n *\n * return <HoverTooltip />;\n * }\n * ```\n */\nexport function useCanHover(): boolean {\n return useMuiMediaQuery('(hover: hover) and (pointer: fine)');\n}\n\n/**\n * Hook for detecting print mode.\n *\n * @returns true if currently printing\n */\nexport function useIsPrinting(): boolean {\n return useMuiMediaQuery('print');\n}\n\n/**\n * Hook that resolves 'system' mode to actual 'light' or 'dark' based on system preference.\n * If mode is already 'light' or 'dark', returns it unchanged.\n *\n * @param mode - The theme mode ('light' | 'dark' | 'system')\n * @returns Resolved mode ('light' | 'dark')\n *\n * @example\n * ```tsx\n * function ThemeProvider({ mode, children }) {\n * const resolvedMode = useResolvedMode(mode);\n *\n * return (\n * <MuiThemeProvider theme={createTheme({ mode: resolvedMode })}>\n * {children}\n * </MuiThemeProvider>\n * );\n * }\n * ```\n */\nexport function useResolvedMode(mode: 'light' | 'dark' | 'system'): 'light' | 'dark' {\n const prefersDark = usePrefersDarkMode();\n\n if (mode === 'system') {\n return prefersDark ? 'dark' : 'light';\n }\n\n return mode;\n}\n","/**\n * Prism Provider\n *\n * Root provider for the Prism design system.\n * Uses useSettingsStore for persisted settings, with an explicit mode for SSR or controlled trees.\n *\n * @module core/provider\n */\n\nimport type { ReactNode } from 'react';\nimport { useMemo, useEffect, useCallback } from 'react';\nimport createCache from '@emotion/cache';\nimport { CacheProvider } from '@emotion/react';\nimport { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';\nimport { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';\nimport rtlPlugin from 'stylis-plugin-rtl';\n\nimport type { PrismConfig, PartialPrismConfig } from '../types/config.js';\nimport type { PrismTheme, ThemeMode } from '../types/theme.js';\nimport { defaultPrismConfig } from '../types/config.js';\nimport { PrismContext } from './context.js';\nimport type { PrismSettingsState } from './context.js';\nimport { useResolvedMode } from './hooks/use-media-query.js';\nimport { createPrismTheme } from '../theme/create-theme.js';\nimport { useSettingsStore } from '../state/stores/settings.js';\n\nexport interface PrismThemeOverrideContext {\n /** Actual palette mode after resolving the operating-system preference. */\n mode: 'light' | 'dark';\n}\n\nexport type PrismThemeOverrides =\n | Record<string, unknown>\n | ((context: PrismThemeOverrideContext) => Record<string, unknown>);\n\n/**\n * Props for PrismProvider.\n */\nexport interface PrismProviderProps {\n /** Child components */\n children: ReactNode;\n /** Configuration overrides */\n config?: PartialPrismConfig;\n /** Controlled mode, applied during SSR and the first client render without writing the settings store. */\n mode?: ThemeMode;\n /** Receives mode changes requested through Prism context. With mode set, the owner updates that prop. */\n onModeChange?: (mode: ThemeMode) => void;\n /** Default settings (overrides defaults but not persisted values) */\n defaultSettings?: Partial<PrismSettingsState>;\n /** Disable CSS baseline */\n disableCssBaseline?: boolean;\n /** Static overrides or an application palette derived from the resolved native mode. */\n themeOverrides?: PrismThemeOverrides;\n /**\n * Locale code passed to MUI's `LocalizationProvider` as\n * `adapterLocale` — e.g. `'ru'`, `'en'`. Must be a locale already\n * registered with dayjs (e.g. `import 'dayjs/locale/ru'`).\n * Switches calendar month/weekday labels and date masks.\n * If omitted, MUI falls back to dayjs's global locale (English).\n */\n dateAdapterLocale?: string;\n /**\n * Override for MUI x-date-pickers' built-in strings\n * (e.g. ARIA labels, toolbar text). Passed straight through to\n * `LocalizationProvider.localeText`. Typically pulled from\n * `@mui/x-date-pickers/locales` (e.g. `ruRU.components.MuiLocalizationProvider.defaultProps.localeText`).\n */\n dateLocaleText?: Record<string, unknown>;\n}\n\n/**\n * Merge configurations deeply.\n */\nfunction mergeConfig(base: PrismConfig, overrides?: PartialPrismConfig): PrismConfig {\n if (!overrides) return base;\n\n return {\n ...base,\n ...overrides,\n paths: { ...base.paths, ...overrides.paths },\n registries: { ...base.registries, ...overrides.registries },\n theme: { ...base.theme, ...overrides.theme },\n style: { ...base.style, ...overrides.style },\n features: { ...base.features, ...overrides.features },\n } as PrismConfig;\n}\n\n/** Stable no-op for deprecated drawer controls */\nconst noOpDrawerWarning = () => {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n '[PrismProvider] Settings drawer is now managed by SettingsProvider. ' +\n 'Use useSettingsDrawer() from @omnitron-dev/prism/components/settings instead.'\n );\n }\n};\n\n/**\n * PrismProvider - Root provider for Prism design system.\n *\n * Provides theme, settings, and configuration to all child components.\n * An explicit mode belongs to this provider; otherwise mode follows the persisted settings store.\n *\n * @example\n * ```tsx\n * import { PrismProvider } from '@omnitron-dev/prism';\n *\n * function App() {\n * return (\n * <PrismProvider\n * mode=\"dark\"\n * config={{\n * theme: { preset: 'luxury' },\n * features: { darkMode: true, rtl: true },\n * }}\n * >\n * <YourApp />\n * </PrismProvider>\n * );\n * }\n * ```\n */\nexport function PrismProvider({\n children,\n config: configOverrides,\n mode: controlledMode,\n onModeChange,\n defaultSettings,\n disableCssBaseline = false,\n themeOverrides,\n dateAdapterLocale,\n dateLocaleText,\n}: PrismProviderProps): ReactNode {\n // Merge configuration\n const config = useMemo(() => mergeConfig(defaultPrismConfig, configOverrides), [configOverrides]);\n\n // Use Zustand store as single source of truth for settings\n // Zustand actions are stable references, no need for useCallback wrappers\n const {\n // State values\n mode: storeMode,\n preset: storePreset,\n direction: storeDirection,\n primaryColor: storePrimaryColor,\n contrast: storeContrast,\n compactSidebar,\n fontSize: storeFontSize,\n fontFamily: storeFontFamily,\n navLayout: storeNavLayout,\n navColor: storeNavColor,\n // Actions (stable references from Zustand)\n setMode: setStoreMode,\n setPreset,\n setDirection,\n setCompactSidebar,\n reset: resetSettings,\n } = useSettingsStore();\n\n const mode = controlledMode ?? storeMode;\n const setMode = useCallback((nextMode: ThemeMode) => {\n if (controlledMode === undefined) setStoreMode(nextMode);\n onModeChange?.(nextMode);\n }, [controlledMode, setStoreMode, onModeChange]);\n\n // Initialize store with config values on first mount\n useEffect(() => {\n if (controlledMode === undefined && defaultSettings?.mode) setStoreMode(defaultSettings.mode);\n if (defaultSettings?.preset) setPreset(defaultSettings.preset);\n if (defaultSettings?.direction) setDirection(defaultSettings.direction);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []); // Only on mount - intentionally empty deps\n\n // Create settings object for context (backwards compatibility)\n const settings = useMemo<PrismSettingsState>(\n () => ({\n mode,\n preset: storePreset,\n direction: storeDirection,\n sidebarCollapsed: compactSidebar,\n settingsDrawerOpen: false, // Managed by SettingsProvider component\n primaryColor: storePrimaryColor,\n contrast: storeContrast,\n fontSize: storeFontSize,\n fontFamily: storeFontFamily ?? 'Public Sans Variable',\n navLayout: storeNavLayout,\n navColor: storeNavColor,\n }),\n [\n mode,\n storePreset,\n storeDirection,\n compactSidebar,\n storePrimaryColor,\n storeContrast,\n storeFontSize,\n storeFontFamily,\n storeNavLayout,\n storeNavColor,\n ]\n );\n\n // Sidebar toggle — uses functional read from store to avoid stale closure\n const toggleSidebar = useCallback(() => {\n const current = useSettingsStore.getState().compactSidebar;\n setCompactSidebar(!current);\n }, [setCompactSidebar]);\n\n // Settings drawer is managed by SettingsProvider component\n // These are no-ops for backwards compatibility (stable reference, hoisted below)\n\n // Emotion cache for RTL support — flips CSS properties automatically via Stylis plugin\n const emotionCache = useMemo(\n () =>\n storeDirection === 'rtl'\n ? createCache({ key: 'prism-rtl', stylisPlugins: [rtlPlugin] })\n : createCache({ key: 'prism-ltr' }),\n [storeDirection]\n );\n\n // Set document direction attribute (SSR-safe)\n useEffect(() => {\n if (typeof document !== 'undefined') {\n document.documentElement.dir = storeDirection;\n }\n }, [storeDirection]);\n\n // Set document font size (SSR-safe)\n useEffect(() => {\n if (typeof document !== 'undefined') {\n if (storeFontSize && storeFontSize !== 16) {\n document.documentElement.style.fontSize = `${storeFontSize}px`;\n } else {\n document.documentElement.style.removeProperty('font-size');\n }\n }\n }, [storeFontSize]);\n\n // Resolve 'system' mode to actual 'light' or 'dark' based on OS preference\n const resolvedMode = useResolvedMode(mode);\n const toggleMode = useCallback(() => {\n setMode(resolvedMode === 'dark' ? 'light' : 'dark');\n }, [resolvedMode, setMode]);\n\n // Create theme based on current settings\n const theme = useMemo<PrismTheme>(\n () =>\n createPrismTheme({\n preset: storePreset,\n mode: resolvedMode,\n direction: storeDirection,\n primaryColor: storePrimaryColor || config.theme.primaryColor,\n typography: config.theme.typography,\n cssVariables: config.theme.cssVariables,\n components: config.theme.components,\n contrast: storeContrast,\n fontFamily: storeFontFamily,\n fontSize: storeFontSize,\n overrides: typeof themeOverrides === 'function'\n ? themeOverrides({ mode: resolvedMode })\n : themeOverrides,\n }),\n [\n storePreset,\n resolvedMode,\n storeDirection,\n storePrimaryColor,\n storeContrast,\n storeFontSize,\n storeFontFamily,\n config.theme,\n themeOverrides,\n ]\n );\n\n // Context value\n // Zustand actions are stable, so they don't need to be in deps\n const contextValue = useMemo(\n () => ({\n config,\n theme,\n settings,\n // Zustand actions (stable references)\n setMode,\n toggleMode,\n setPreset,\n setDirection,\n toggleSidebar,\n setSidebarCollapsed: setCompactSidebar,\n resetSettings,\n // Deprecated drawer controls (no-ops, stable module-level reference)\n openSettingsDrawer: noOpDrawerWarning,\n closeSettingsDrawer: noOpDrawerWarning,\n toggleSettingsDrawer: noOpDrawerWarning,\n }),\n [\n config,\n theme,\n settings,\n setMode,\n toggleMode,\n setPreset,\n setDirection,\n toggleSidebar,\n setCompactSidebar,\n resetSettings,\n ]\n );\n\n return (\n <CacheProvider value={emotionCache}>\n <PrismContext.Provider value={contextValue}>\n <MuiThemeProvider theme={theme}>\n <LocalizationProvider\n dateAdapter={AdapterDayjs}\n adapterLocale={dateAdapterLocale}\n localeText={dateLocaleText as any}\n >\n {!disableCssBaseline && <CssBaseline />}\n {children}\n </LocalizationProvider>\n </MuiThemeProvider>\n </PrismContext.Provider>\n </CacheProvider>\n );\n}\n","'use client';\n\n/**\n * Provider Stack Utilities\n *\n * Composable provider pattern for building flexible provider hierarchies.\n *\n * @module core/provider-stack\n */\n\nimport type { ReactNode, ComponentType, FC } from 'react';\nimport { createElement, useMemo } from 'react';\n\n/**\n * A provider component with its props.\n */\nexport type ProviderEntry<P = Record<string, unknown>> = [ComponentType<P & { children: ReactNode }>, P];\n\n/**\n * A provider that takes only children.\n */\nexport type SimpleProvider = ComponentType<{ children: ReactNode }>;\n\n/**\n * Provider entry that can be a simple component or a tuple with props.\n */\nexport type ProviderConfig = SimpleProvider | ProviderEntry;\n\n/**\n * Options for createProviderStack.\n */\nexport interface ProviderStackOptions {\n /** Display name for debugging */\n displayName?: string;\n}\n\n/**\n * Compose multiple providers into a single component.\n * Providers are applied from left to right (first provider wraps outermost).\n *\n * @param providers - Array of providers to compose\n * @returns A single component that renders all providers\n *\n * @example\n * ```tsx\n * const AppProviders = composeProviders([\n * ThemeProvider,\n * [AuthProvider, { client: authClient }],\n * [QueryProvider, { client: queryClient }],\n * ToastProvider,\n * ]);\n *\n * function App() {\n * return (\n * <AppProviders>\n * <YourApp />\n * </AppProviders>\n * );\n * }\n * ```\n */\nexport function composeProviders(providers: ProviderConfig[]): FC<{ children: ReactNode }> {\n const ComposedProviders: FC<{ children: ReactNode }> = ({ children }) =>\n // Build the provider tree from inside-out (reverse iteration)\n providers.reduceRight<ReactNode>((acc, provider) => {\n if (Array.isArray(provider)) {\n const [Component, props] = provider;\n return createElement(Component, { ...props, children: acc });\n }\n return createElement(provider, { children: acc });\n }, children);\n ComposedProviders.displayName = 'ComposedProviders';\n return ComposedProviders;\n}\n\n/**\n * Create a provider stack factory for building customizable provider hierarchies.\n *\n * @param baseProviders - Base providers that are always included\n * @param options - Configuration options\n * @returns A factory function for creating provider components\n *\n * @example\n * ```tsx\n * // Define base stack\n * const createAppProviders = createProviderStack([\n * ThemeProvider,\n * [I18nProvider, { locale: 'en' }],\n * ]);\n *\n * // Create with additional providers\n * const AppProviders = createAppProviders({\n * prepend: [ErrorBoundaryProvider],\n * append: [ToastProvider, NotificationProvider],\n * });\n *\n * // Or use without modifications\n * const SimpleProviders = createAppProviders();\n * ```\n */\nexport function createProviderStack(\n baseProviders: ProviderConfig[],\n options: ProviderStackOptions = {}\n): (config?: {\n prepend?: ProviderConfig[];\n append?: ProviderConfig[];\n replace?: ProviderConfig[];\n}) => FC<{ children: ReactNode }> {\n const { displayName = 'ProviderStack' } = options;\n\n return (config = {}) => {\n const { prepend = [], append = [], replace } = config;\n\n const providers = replace ?? [...prepend, ...baseProviders, ...append];\n const Component = composeProviders(providers);\n Component.displayName = displayName;\n\n return Component;\n };\n}\n\n/**\n * Props for ProviderStack component.\n */\nexport interface ProviderStackProps {\n /** Provider configurations */\n providers: ProviderConfig[];\n /** Child components */\n children: ReactNode;\n}\n\n/**\n * ProviderStack - Declarative provider composition component.\n *\n * @example\n * ```tsx\n * function App() {\n * const providers = useMemo(() => [\n * ThemeProvider,\n * [AuthProvider, { client }],\n * ToastProvider,\n * ], [client]);\n *\n * return (\n * <ProviderStack providers={providers}>\n * <YourApp />\n * </ProviderStack>\n * );\n * }\n * ```\n */\nexport function ProviderStack({ providers, children }: ProviderStackProps): ReactNode {\n const Provider = useMemo(() => composeProviders(providers), [providers]);\n return <Provider>{children}</Provider>;\n}\n\n/**\n * Create a provider component with bound props.\n * Useful for creating reusable provider configurations.\n *\n * @param Provider - The provider component\n * @param props - Props to bind to the provider\n * @returns A new component with bound props\n *\n * @example\n * ```tsx\n * const BoundQueryProvider = withProviderProps(QueryClientProvider, {\n * client: queryClient,\n * });\n *\n * // Use like a simple provider\n * <BoundQueryProvider>\n * <App />\n * </BoundQueryProvider>\n * ```\n */\nexport function withProviderProps<P extends object>(\n Provider: ComponentType<P & { children: ReactNode }>,\n props: P\n): SimpleProvider {\n const BoundProvider: SimpleProvider = ({ children }) => createElement(Provider, { ...props, children });\n\n BoundProvider.displayName = `withProviderProps(${Provider.displayName || Provider.name || 'Component'})`;\n return BoundProvider;\n}\n\n/**\n * Create a conditional provider that only renders when condition is true.\n *\n * @param Provider - The provider component\n * @param condition - Whether to render the provider\n * @returns A provider that renders conditionally\n *\n * @example\n * ```tsx\n * const providers = [\n * ThemeProvider,\n * conditionalProvider(DevToolsProvider, process.env.NODE_ENV === 'development'),\n * AuthProvider,\n * ];\n * ```\n */\nexport function conditionalProvider<P extends { children: ReactNode }>(\n Provider: ComponentType<P>,\n condition: boolean,\n props?: Omit<P, 'children'>\n): ProviderConfig | null {\n if (!condition) return null;\n if (props) {\n return [Provider as ComponentType<Record<string, unknown> & { children: ReactNode }>, props];\n }\n return Provider as SimpleProvider;\n}\n\n/**\n * Filter out null/undefined providers from a provider array.\n *\n * @param providers - Array of providers that may contain nulls\n * @returns Filtered array of valid providers\n *\n * @example\n * ```tsx\n * const providers = filterProviders([\n * ThemeProvider,\n * conditionalProvider(DevToolsProvider, isDev),\n * conditionalProvider(MockProvider, isMocking),\n * AuthProvider,\n * ]);\n * ```\n */\nexport function filterProviders(providers: (ProviderConfig | null | undefined)[]): ProviderConfig[] {\n return providers.filter((p): p is ProviderConfig => p != null);\n}\n","'use client';\n\n/**\n * useSetState Hook\n *\n * State hook that works like React.Component's setState,\n * allowing partial state updates.\n *\n * @module core/hooks/use-set-state\n */\n\nimport { useCallback, useState } from 'react';\n\n/**\n * State updater function type.\n * Accepts partial state or a function that returns partial state.\n */\nexport type SetState<T extends Record<string, unknown>> = (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void;\n\n/**\n * Return type for useSetState.\n */\nexport interface UseSetStateReturn<T extends Record<string, unknown>> {\n /** Current state */\n state: T;\n /** Update state with partial values */\n setState: SetState<T>;\n /** Reset state to initial value */\n resetState: () => void;\n}\n\n/**\n * useSetState - State hook with partial update support.\n * Works like React class component's setState method.\n *\n * @example\n * ```tsx\n * interface FormState {\n * name: string;\n * email: string;\n * phone: string;\n * }\n *\n * function Form() {\n * const { state, setState, resetState } = useSetState<FormState>({\n * name: '',\n * email: '',\n * phone: '',\n * });\n *\n * return (\n * <>\n * <TextField\n * value={state.name}\n * onChange={(e) => setState({ name: e.target.value })}\n * />\n * <TextField\n * value={state.email}\n * onChange={(e) => setState({ email: e.target.value })}\n * />\n * <Button onClick={resetState}>Reset</Button>\n * </>\n * );\n * }\n * ```\n *\n * @param initialState - Initial state object\n * @returns State, setState, and resetState\n */\nexport function useSetState<T extends Record<string, unknown>>(initialState: T | (() => T)): UseSetStateReturn<T> {\n const [state, setInternalState] = useState<T>(initialState);\n\n const setState = useCallback<SetState<T>>((patch) => {\n setInternalState((prevState) => {\n const newPartial = typeof patch === 'function' ? patch(prevState) : patch;\n return { ...prevState, ...newPartial };\n });\n }, []);\n\n const resetState = useCallback(() => {\n setInternalState(typeof initialState === 'function' ? initialState() : initialState);\n }, [initialState]);\n\n return {\n state,\n setState,\n resetState,\n };\n}\n","'use client';\n\n/**\n * useMultiSelect Hook\n *\n * Multi-selection state management with keyboard support.\n *\n * @module core/hooks/use-multi-select\n */\n\nimport { useCallback, useMemo, useState } from 'react';\n\n/**\n * Options for useMultiSelect.\n */\nexport interface UseMultiSelectOptions<T> {\n /** Initial selected items */\n initial?: T[];\n /** Maximum selection count */\n maxSelections?: number;\n /** Callback when selection changes */\n onChange?: (selected: T[]) => void;\n}\n\n/**\n * Return type for useMultiSelect.\n */\nexport interface UseMultiSelectReturn<T> {\n /** Currently selected items */\n selected: T[];\n /** Number of selected items */\n count: number;\n /** Whether nothing is selected */\n isEmpty: boolean;\n /** Check if item is selected */\n isSelected: (item: T) => boolean;\n /** Toggle item selection */\n toggle: (item: T) => void;\n /** Select an item */\n select: (item: T) => void;\n /** Deselect an item */\n deselect: (item: T) => void;\n /** Select multiple items */\n selectMany: (items: T[]) => void;\n /** Deselect multiple items */\n deselectMany: (items: T[]) => void;\n /** Clear all selections */\n clear: () => void;\n /** Replace all selections */\n setSelected: (items: T[]) => void;\n /** Select all items from a list */\n selectAll: (allItems: T[]) => void;\n /** Check if all items are selected */\n isAllSelected: (allItems: T[]) => boolean;\n /** Check if some items are selected (for indeterminate state) */\n isPartiallySelected: (allItems: T[]) => boolean;\n}\n\n/**\n * useMultiSelect - Multi-selection state management.\n *\n * @example\n * ```tsx\n * function UserList() {\n * const users = ['Alice', 'Bob', 'Charlie'];\n * const selection = useMultiSelect<string>();\n *\n * return (\n * <>\n * <Checkbox\n * checked={selection.isAllSelected(users)}\n * indeterminate={selection.isPartiallySelected(users)}\n * onChange={() => {\n * if (selection.isAllSelected(users)) {\n * selection.clear();\n * } else {\n * selection.selectAll(users);\n * }\n * }}\n * />\n * {users.map((user) => (\n * <Checkbox\n * key={user}\n * checked={selection.isSelected(user)}\n * onChange={() => selection.toggle(user)}\n * />\n * ))}\n * <Button disabled={selection.isEmpty}>\n * Delete ({selection.count})\n * </Button>\n * </>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // With objects and custom max\n * interface Item {\n * id: string;\n * name: string;\n * }\n *\n * function ItemPicker() {\n * const items: Item[] = [...];\n * const selection = useMultiSelect<string>({\n * maxSelections: 5,\n * onChange: (selected) => console.log('Selected:', selected),\n * });\n *\n * return items.map((item) => (\n * <Chip\n * key={item.id}\n * selected={selection.isSelected(item.id)}\n * onClick={() => selection.toggle(item.id)}\n * >\n * {item.name}\n * </Chip>\n * ));\n * }\n * ```\n *\n * @param options - Hook options\n * @returns Selection state and controls\n */\nexport function useMultiSelect<T>(options: UseMultiSelectOptions<T> = {}): UseMultiSelectReturn<T> {\n const { initial = [], maxSelections, onChange } = options;\n\n const [selected, setInternalSelected] = useState<T[]>(initial);\n\n const selectedSet = useMemo(() => new Set(selected), [selected]);\n\n const setSelected = useCallback(\n (items: T[]) => {\n const limited = maxSelections ? items.slice(0, maxSelections) : items;\n setInternalSelected(limited);\n onChange?.(limited);\n },\n [maxSelections, onChange]\n );\n\n const isSelected = useCallback((item: T) => selectedSet.has(item), [selectedSet]);\n\n const select = useCallback(\n (item: T) => {\n if (selectedSet.has(item)) return;\n if (maxSelections && selected.length >= maxSelections) return;\n\n const newSelected = [...selected, item];\n setInternalSelected(newSelected);\n onChange?.(newSelected);\n },\n [selected, selectedSet, maxSelections, onChange]\n );\n\n const deselect = useCallback(\n (item: T) => {\n if (!selectedSet.has(item)) return;\n\n const newSelected = selected.filter((s) => s !== item);\n setInternalSelected(newSelected);\n onChange?.(newSelected);\n },\n [selected, selectedSet, onChange]\n );\n\n const toggle = useCallback(\n (item: T) => {\n if (selectedSet.has(item)) {\n deselect(item);\n } else {\n select(item);\n }\n },\n [selectedSet, select, deselect]\n );\n\n const selectMany = useCallback(\n (items: T[]) => {\n const toAdd = items.filter((item) => !selectedSet.has(item));\n if (toAdd.length === 0) return;\n\n let newSelected = [...selected, ...toAdd];\n if (maxSelections) {\n newSelected = newSelected.slice(0, maxSelections);\n }\n\n setInternalSelected(newSelected);\n onChange?.(newSelected);\n },\n [selected, selectedSet, maxSelections, onChange]\n );\n\n const deselectMany = useCallback(\n (items: T[]) => {\n const toRemove = new Set(items);\n const newSelected = selected.filter((s) => !toRemove.has(s));\n\n if (newSelected.length === selected.length) return;\n\n setInternalSelected(newSelected);\n onChange?.(newSelected);\n },\n [selected, onChange]\n );\n\n const clear = useCallback(() => {\n if (selected.length === 0) return;\n setInternalSelected([]);\n onChange?.([]);\n }, [selected.length, onChange]);\n\n const selectAll = useCallback(\n (allItems: T[]) => {\n const limited = maxSelections ? allItems.slice(0, maxSelections) : allItems;\n setInternalSelected(limited);\n onChange?.(limited);\n },\n [maxSelections, onChange]\n );\n\n const isAllSelected = useCallback(\n (allItems: T[]) => {\n if (allItems.length === 0) return false;\n return allItems.every((item) => selectedSet.has(item));\n },\n [selectedSet]\n );\n\n const isPartiallySelected = useCallback(\n (allItems: T[]) => {\n if (allItems.length === 0) return false;\n const selectedCount = allItems.filter((item) => selectedSet.has(item)).length;\n return selectedCount > 0 && selectedCount < allItems.length;\n },\n [selectedSet]\n );\n\n return {\n selected,\n count: selected.length,\n isEmpty: selected.length === 0,\n isSelected,\n toggle,\n select,\n deselect,\n selectMany,\n deselectMany,\n clear,\n setSelected,\n selectAll,\n isAllSelected,\n isPartiallySelected,\n };\n}\n","'use client';\n\n/**\n * useLocalStorage Hook\n *\n * A hook for persisting state to localStorage.\n *\n * @module core/hooks/use-local-storage\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\n\n/**\n * Check if localStorage is available.\n */\nfunction isLocalStorageAvailable(): boolean {\n try {\n const testKey = '__prism_test__';\n localStorage.setItem(testKey, testKey);\n localStorage.removeItem(testKey);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Serialize value to JSON string.\n */\nfunction serialize<T>(value: T): string {\n return JSON.stringify(value);\n}\n\n/**\n * Deserialize JSON string to value.\n */\nfunction deserialize<T>(value: string | null, fallback: T): T {\n if (value === null) return fallback;\n\n try {\n return JSON.parse(value) as T;\n } catch {\n return fallback;\n }\n}\n\n/**\n * Return type for useLocalStorage hook.\n */\nexport type UseLocalStorageReturn<T> = [\n /** Current value */\n T,\n /** Set value (accepts value or updater function) */\n (value: T | ((prev: T) => T)) => void,\n /** Remove value from storage */\n () => void,\n];\n\n/**\n * Hook for persisting state to localStorage.\n *\n * @param key - Storage key\n * @param initialValue - Initial value (used if no stored value exists)\n * @returns Tuple of [value, setValue, removeValue]\n *\n * @example\n * ```tsx\n * function Settings() {\n * const [theme, setTheme] = useLocalStorage('theme', 'light');\n *\n * return (\n * <Select\n * value={theme}\n * onChange={(e) => setTheme(e.target.value)}\n * >\n * <MenuItem value=\"light\">Light</MenuItem>\n * <MenuItem value=\"dark\">Dark</MenuItem>\n * </Select>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * function Counter() {\n * const [count, setCount] = useLocalStorage('counter', 0);\n *\n * return (\n * <>\n * <span>{count}</span>\n * <Button onClick={() => setCount((prev) => prev + 1)}>\n * Increment\n * </Button>\n * </>\n * );\n * }\n * ```\n */\nexport function useLocalStorage<T>(key: string, initialValue: T): UseLocalStorageReturn<T> {\n const storageAvailable = useMemo(() => isLocalStorageAvailable(), []);\n\n // Get initial state from localStorage or use initialValue\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (!storageAvailable) return initialValue;\n\n try {\n const item = localStorage.getItem(key);\n return deserialize(item, initialValue);\n } catch (error) {\n console.warn(`Error reading localStorage key \"${key}\":`, error);\n return initialValue;\n }\n });\n\n /**\n * Write and set, in that order, inside the updater.\n *\n * The write is a side effect and an updater is supposed to be pure, so\n * this is deliberate rather than overlooked. Moving it out means reading\n * the previous value from a ref, and a ref does not compose within a\n * batch: two `setValue(prev => …)` calls in one handler would both read\n * the same value and the first would be lost. That is a correctness\n * regression traded for a purity one.\n *\n * What it costs, written down so the next reader need not re-derive it:\n * under `StrictMode` the updater runs twice, so the same value is written\n * to `localStorage` twice — idempotent, and one extra synchronous write.\n * And if React ever discards a render, storage will hold a value the state\n * never took. Both are acceptable here because the value written is always\n * the one computed from the state React is about to commit; neither would\n * be acceptable for a side effect that is not idempotent.\n */\n const setValue = useCallback(\n (value: T | ((prev: T) => T)) => {\n setStoredValue((prev) => {\n const newValue = value instanceof Function ? value(prev) : value;\n\n if (storageAvailable) {\n try {\n localStorage.setItem(key, serialize(newValue));\n } catch (error) {\n console.warn(`Error setting localStorage key \"${key}\":`, error);\n }\n }\n\n return newValue;\n });\n },\n [key, storageAvailable]\n );\n\n // Remove value from storage\n const removeValue = useCallback(() => {\n setStoredValue(initialValue);\n\n if (storageAvailable) {\n try {\n localStorage.removeItem(key);\n } catch (error) {\n console.warn(`Error removing localStorage key \"${key}\":`, error);\n }\n }\n }, [key, initialValue, storageAvailable]);\n\n // Sync with other tabs/windows\n useEffect(() => {\n if (!storageAvailable) {\n return undefined;\n }\n\n const handleStorageChange = (event: StorageEvent) => {\n if (event.key === key && event.newValue !== null) {\n setStoredValue(deserialize(event.newValue, initialValue));\n }\n };\n\n window.addEventListener('storage', handleStorageChange);\n\n return () => {\n window.removeEventListener('storage', handleStorageChange);\n };\n }, [key, initialValue, storageAvailable]);\n\n return [storedValue, setValue, removeValue];\n}\n\n/**\n * Hook for reading localStorage value (read-only).\n *\n * @param key - Storage key\n * @param fallback - Fallback value if key doesn't exist\n * @returns Current stored value\n */\nexport function useReadLocalStorage<T>(key: string, fallback: T): T {\n const [value, setValue] = useState<T>(() => {\n if (!isLocalStorageAvailable()) return fallback;\n\n try {\n const item = localStorage.getItem(key);\n return deserialize(item, fallback);\n } catch {\n return fallback;\n }\n });\n\n useEffect(() => {\n // SSR guard\n if (typeof window === 'undefined') return undefined;\n\n const handleStorageChange = (event: StorageEvent) => {\n if (event.key === key) {\n setValue(deserialize(event.newValue, fallback));\n }\n };\n\n window.addEventListener('storage', handleStorageChange);\n\n return () => {\n window.removeEventListener('storage', handleStorageChange);\n };\n }, [key, fallback]);\n\n return value;\n}\n","'use client';\n\n/**\n * useCopyToClipboard Hook\n *\n * Copy text to clipboard with success/error state tracking.\n *\n * @module core/hooks/use-copy-to-clipboard\n */\n\nimport { useCallback, useState, useRef, useEffect, useMemo } from 'react';\n\n/**\n * Copy state types.\n */\nexport type CopyState = 'idle' | 'success' | 'error';\n\n/**\n * Return type for useCopyToClipboard.\n */\nexport interface UseCopyToClipboardReturn {\n /** Current copy state */\n state: CopyState;\n /** Copied text (null if not copied) */\n copiedText: string | null;\n /** Copy text to clipboard */\n copy: (text: string) => Promise<boolean>;\n /** Reset state to idle */\n reset: () => void;\n}\n\n/**\n * Options for useCopyToClipboard.\n */\nexport interface UseCopyToClipboardOptions {\n /** Reset to idle after this many ms (default: 2000) */\n resetTimeout?: number;\n /** Callback on successful copy */\n onSuccess?: (text: string) => void;\n /** Callback on copy error */\n onError?: (error: Error) => void;\n}\n\n/**\n * useCopyToClipboard - Copy text to clipboard with state tracking.\n *\n * @example\n * ```tsx\n * function CopyButton({ text }: { text: string }) {\n * const { state, copy } = useCopyToClipboard();\n *\n * return (\n * <Button onClick={() => copy(text)}>\n * {state === 'success' ? 'Copied!' : 'Copy'}\n * </Button>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // With callback\n * function ShareLink({ url }: { url: string }) {\n * const { state, copy } = useCopyToClipboard({\n * onSuccess: () => enqueueSnackbar('Link copied!'),\n * onError: (err) => enqueueSnackbar(`Failed to copy: ${err.message}`, { variant: 'error' }),\n * });\n *\n * return (\n * <IconButton onClick={() => copy(url)}>\n * {state === 'success' ? <CheckIcon /> : <CopyIcon />}\n * </IconButton>\n * );\n * }\n * ```\n *\n * @param options - Hook options\n * @returns Copy function and state\n */\nexport function useCopyToClipboard(options: UseCopyToClipboardOptions = {}): UseCopyToClipboardReturn {\n const { resetTimeout = 2000, onSuccess, onError } = options;\n\n const [state, setState] = useState<CopyState>('idle');\n const [copiedText, setCopiedText] = useState<string | null>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Cleanup timeout on unmount\n useEffect(\n () => () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n },\n []\n );\n\n const reset = useCallback(() => {\n // Clear any pending timeout when manually resetting\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n setState('idle');\n setCopiedText(null);\n }, []);\n\n const copy = useCallback(\n async (text: string): Promise<boolean> => {\n // Clear any existing timeout\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n\n // Check if clipboard API is available\n if (!navigator?.clipboard) {\n const error = new Error('Clipboard API not available');\n setState('error');\n onError?.(error);\n return false;\n }\n\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n setState('success');\n onSuccess?.(text);\n\n // Auto-reset after timeout\n if (resetTimeout > 0) {\n timeoutRef.current = setTimeout(reset, resetTimeout);\n }\n\n return true;\n } catch (err) {\n const error = err instanceof Error ? err : new Error('Failed to copy');\n setState('error');\n onError?.(error);\n\n // Auto-reset after timeout\n if (resetTimeout > 0) {\n timeoutRef.current = setTimeout(reset, resetTimeout);\n }\n\n return false;\n }\n },\n [resetTimeout, reset, onSuccess, onError]\n );\n\n // Memoize return object to prevent unnecessary re-renders\n return useMemo(\n () => ({\n state,\n copiedText,\n copy,\n reset,\n }),\n [state, copiedText, copy, reset]\n );\n}\n","'use client';\n\n/**\n * useDebounce Hook\n *\n * A hook for debouncing values.\n *\n * @module core/hooks/use-debounce\n */\n\nimport { useState, useEffect, useRef, useCallback } from 'react';\n\n/**\n * Hook for debouncing a value.\n *\n * @param value - Value to debounce\n * @param delay - Debounce delay in milliseconds (default: 500)\n * @returns Debounced value\n *\n * @example\n * ```tsx\n * function SearchInput() {\n * const [query, setQuery] = useState('');\n * const debouncedQuery = useDebounce(query, 300);\n *\n * useEffect(() => {\n * if (debouncedQuery) {\n * search(debouncedQuery);\n * }\n * }, [debouncedQuery]);\n *\n * return (\n * <TextField\n * value={query}\n * onChange={(e) => setQuery(e.target.value)}\n * placeholder=\"Search...\"\n * />\n * );\n * }\n * ```\n */\nexport function useDebounce<T>(value: T, delay = 500): T {\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n return () => {\n clearTimeout(timer);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}\n\n/**\n * Hook for debouncing a callback function.\n *\n * @param callback - Function to debounce\n * @param delay - Debounce delay in milliseconds (default: 500)\n * @returns Debounced callback and cancel function\n *\n * @example\n * ```tsx\n * function AutoSave() {\n * const [content, setContent] = useState('');\n *\n * const { debouncedCallback: save, cancel } = useDebounceCallback(\n * async (text: string) => {\n * await api.saveDocument(text);\n * },\n * 1000\n * );\n *\n * const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n * setContent(e.target.value);\n * save(e.target.value);\n * };\n *\n * return <textarea value={content} onChange={handleChange} />;\n * }\n * ```\n */\nexport function useDebounceCallback<T extends (...args: never[]) => unknown>(\n callback: T,\n delay = 500\n): {\n debouncedCallback: (...args: Parameters<T>) => void;\n cancel: () => void;\n flush: () => void;\n} {\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const callbackRef = useRef<T>(callback);\n const argsRef = useRef<Parameters<T> | null>(null);\n\n // Update callback ref on each render\n callbackRef.current = callback;\n\n const cancel = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n argsRef.current = null;\n }, []);\n\n const flush = useCallback(() => {\n if (timeoutRef.current && argsRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n callbackRef.current(...(argsRef.current as Parameters<T>));\n argsRef.current = null;\n }\n }, []);\n\n const debouncedCallback = useCallback(\n (...args: Parameters<T>) => {\n argsRef.current = args;\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n timeoutRef.current = setTimeout(() => {\n callbackRef.current(...args);\n timeoutRef.current = null;\n argsRef.current = null;\n }, delay);\n },\n [delay]\n );\n\n // Cleanup on unmount\n useEffect(\n () => () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n },\n []\n );\n\n return { debouncedCallback, cancel, flush };\n}\n","'use client';\n\n/**\n * useCountdown Hook\n *\n * Countdown timer with start, pause, and reset controls.\n *\n * @module core/hooks/use-countdown\n */\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\n/**\n * Countdown state.\n */\nexport interface CountdownState {\n /** Remaining time in seconds */\n seconds: number;\n /** Whether countdown is running */\n isRunning: boolean;\n /** Whether countdown has finished */\n isFinished: boolean;\n}\n\n/**\n * Countdown controls.\n */\nexport interface CountdownControls {\n /** Start or resume the countdown */\n start: () => void;\n /** Pause the countdown */\n pause: () => void;\n /** Reset to initial duration */\n reset: () => void;\n /** Set a new duration and reset */\n setDuration: (seconds: number) => void;\n}\n\n/**\n * Return type for useCountdown.\n */\nexport interface UseCountdownReturn extends CountdownState, CountdownControls {\n /** Formatted time string (MM:SS or HH:MM:SS) */\n formatted: string;\n /** Time parts for custom formatting */\n parts: {\n hours: number;\n minutes: number;\n seconds: number;\n };\n}\n\n/**\n * Options for useCountdown.\n */\nexport interface UseCountdownOptions {\n /** Initial duration in seconds */\n duration: number;\n /** Auto-start countdown (default: false) */\n autoStart?: boolean;\n /** Callback when countdown finishes */\n onComplete?: () => void;\n /** Callback on each tick */\n onTick?: (remaining: number) => void;\n /** Tick interval in ms (default: 1000) */\n interval?: number;\n}\n\n/**\n * Format seconds into time parts.\n */\nfunction getTimeParts(totalSeconds: number): { hours: number; minutes: number; seconds: number } {\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n return { hours, minutes, seconds };\n}\n\n/**\n * Format seconds into a time string.\n */\nfunction formatTime(totalSeconds: number): string {\n const { hours, minutes, seconds } = getTimeParts(totalSeconds);\n const pad = (n: number) => n.toString().padStart(2, '0');\n\n if (hours > 0) {\n return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;\n }\n return `${pad(minutes)}:${pad(seconds)}`;\n}\n\n/**\n * useCountdown - Countdown timer hook.\n *\n * @example\n * ```tsx\n * function OTPTimer() {\n * const { formatted, isFinished, reset } = useCountdown({\n * duration: 60,\n * autoStart: true,\n * onComplete: () => console.log('Timer finished!'),\n * });\n *\n * return (\n * <div>\n * {isFinished ? (\n * <Button onClick={reset}>Resend OTP</Button>\n * ) : (\n * <Typography>Resend in {formatted}</Typography>\n * )}\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * function QuizTimer() {\n * const countdown = useCountdown({\n * duration: 300, // 5 minutes\n * onTick: (remaining) => {\n * if (remaining === 60) {\n * showWarning('1 minute remaining!');\n * }\n * },\n * onComplete: () => submitQuiz(),\n * });\n *\n * return (\n * <Box>\n * <Typography variant=\"h4\">{countdown.formatted}</Typography>\n * <Button onClick={countdown.start}>Start</Button>\n * <Button onClick={countdown.pause}>Pause</Button>\n * <Button onClick={countdown.reset}>Reset</Button>\n * </Box>\n * );\n * }\n * ```\n *\n * @param options - Countdown options\n * @returns Countdown state and controls\n */\nexport function useCountdown(options: UseCountdownOptions): UseCountdownReturn {\n const { duration, autoStart = false, onComplete, onTick, interval = 1000 } = options;\n\n const [seconds, setSeconds] = useState(duration);\n const [isRunning, setIsRunning] = useState(autoStart);\n const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);\n const onCompleteRef = useRef(onComplete);\n const onTickRef = useRef(onTick);\n\n /**\n * The remaining time, tracked outside React state.\n *\n * The tick needs to read the current value and act on it in the same\n * breath, and doing that inside a `setSeconds` updater is what broke this\n * hook: an updater must be pure, and React is entitled to run it more than\n * once — which under `StrictMode` it does, deliberately, to surface exactly\n * this. Measured before the fix, a two-second countdown called `onTick`\n * ten times with `[1, 1, 0, 0, -1, -1, …]` and `onComplete` eight times.\n */\n const remainingRef = useRef(duration);\n\n /**\n * Whether `onComplete` has already been delivered for this run.\n *\n * The old guard was `next <= 0`, a property of the computed value rather\n * than of the countdown, so every tick after zero satisfied it again. The\n * interval kept firing until the effect tore down, and each firing\n * completed the countdown once more — four times without `StrictMode`.\n * `onComplete` is where a caller submits the quiz.\n */\n const completedRef = useRef(false);\n\n // Update refs to avoid stale closures\n useEffect(() => {\n onCompleteRef.current = onComplete;\n onTickRef.current = onTick;\n }, [onComplete, onTick]);\n\n // Cleanup interval on unmount\n useEffect(\n () => () => {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n },\n []\n );\n\n // Run countdown\n useEffect(() => {\n if (!isRunning) {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n return undefined;\n }\n\n intervalRef.current = setInterval(() => {\n // Stopping is the effect's job, but it can only do it on the next\n // render, and several ticks can queue before one happens — a long task,\n // a burst of work, a test advancing a fake clock. The callback has to\n // be inert on its own once the countdown is over, not merely\n // uninteresting.\n if (completedRef.current) return;\n\n // Everything here is a side effect, so none of it belongs in a state\n // updater. The arithmetic reads a ref, the state is set from the\n // result, and the callbacks fire once each.\n const next = Math.max(0, remainingRef.current - 1);\n remainingRef.current = next;\n setSeconds(next);\n onTickRef.current?.(next);\n\n if (next === 0) {\n setIsRunning(false);\n if (!completedRef.current) {\n completedRef.current = true;\n onCompleteRef.current?.();\n }\n }\n }, interval);\n\n return () => {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n };\n }, [isRunning, interval]);\n\n const start = useCallback(() => {\n if (seconds > 0) {\n setIsRunning(true);\n }\n }, [seconds]);\n\n const pause = useCallback(() => {\n setIsRunning(false);\n }, []);\n\n const reset = useCallback(() => {\n setIsRunning(false);\n remainingRef.current = duration;\n completedRef.current = false;\n setSeconds(duration);\n }, [duration]);\n\n const setDuration = useCallback((newDuration: number) => {\n setIsRunning(false);\n remainingRef.current = newDuration;\n completedRef.current = false;\n setSeconds(newDuration);\n }, []);\n\n return {\n seconds,\n isRunning,\n isFinished: seconds <= 0,\n formatted: formatTime(seconds),\n parts: getTimeParts(seconds),\n start,\n pause,\n reset,\n setDuration,\n };\n}\n","'use client';\n\n/**\n * useBreakpoints Hook\n *\n * A hook for responsive breakpoint detection.\n *\n * @module core/hooks/use-breakpoints\n */\n\nimport { useMemo } from 'react';\nimport { useTheme } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport type { Breakpoint } from '@mui/material/styles';\n\n/**\n * Breakpoint values in pixels.\n */\nexport interface BreakpointValues {\n xs: number;\n sm: number;\n md: number;\n lg: number;\n xl: number;\n}\n\n/**\n * Breakpoint state.\n */\nexport interface BreakpointState {\n /** Current breakpoint name */\n current: Breakpoint;\n /** Is extra-small screen (< sm) */\n isXs: boolean;\n /** Is small screen (>= sm, < md) */\n isSm: boolean;\n /** Is medium screen (>= md, < lg) */\n isMd: boolean;\n /** Is large screen (>= lg, < xl) */\n isLg: boolean;\n /** Is extra-large screen (>= xl) */\n isXl: boolean;\n /** Is mobile (< md) */\n isMobile: boolean;\n /** Is tablet (>= md, < lg) */\n isTablet: boolean;\n /** Is desktop (>= lg) */\n isDesktop: boolean;\n}\n\n/**\n * Return type for useBreakpoints hook.\n */\nexport interface UseBreakpointsReturn extends BreakpointState {\n /** Check if viewport is >= breakpoint */\n up: (breakpoint: Breakpoint) => boolean;\n /** Check if viewport is < breakpoint */\n down: (breakpoint: Breakpoint) => boolean;\n /** Check if viewport is exactly at breakpoint range */\n only: (breakpoint: Breakpoint) => boolean;\n /** Check if viewport is between two breakpoints */\n between: (start: Breakpoint, end: Breakpoint) => boolean;\n /** Breakpoint values in pixels */\n values: BreakpointValues;\n}\n\n/**\n * Hook for responsive breakpoint detection.\n *\n * @returns Breakpoint state and helper functions\n *\n * @example\n * ```tsx\n * function ResponsiveLayout() {\n * const { isMobile, isDesktop, up, current } = useBreakpoints();\n *\n * return (\n * <Box>\n * {isMobile && <MobileNav />}\n * {isDesktop && <DesktopSidebar />}\n * <Typography>Current: {current}</Typography>\n * {up('md') && <AdvancedFeatures />}\n * </Box>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * function DataGrid() {\n * const { between, only } = useBreakpoints();\n *\n * const columns = useMemo(() => {\n * if (only('xs')) return 1;\n * if (between('sm', 'md')) return 2;\n * return 3;\n * }, [only, between]);\n *\n * return <Grid columns={columns}>...</Grid>;\n * }\n * ```\n */\nexport function useBreakpoints(): UseBreakpointsReturn {\n const theme = useTheme();\n\n // Media queries for each breakpoint\n const isXsUp = useMediaQuery(theme.breakpoints.up('xs'));\n const isSmUp = useMediaQuery(theme.breakpoints.up('sm'));\n const isMdUp = useMediaQuery(theme.breakpoints.up('md'));\n const isLgUp = useMediaQuery(theme.breakpoints.up('lg'));\n const isXlUp = useMediaQuery(theme.breakpoints.up('xl'));\n\n // Derive current breakpoint and states\n const { current, isXs, isSm, isMd, isLg, isXl } = useMemo(() => {\n let currentBreakpoint: Breakpoint = 'xs';\n if (isXlUp) currentBreakpoint = 'xl';\n else if (isLgUp) currentBreakpoint = 'lg';\n else if (isMdUp) currentBreakpoint = 'md';\n else if (isSmUp) currentBreakpoint = 'sm';\n\n return {\n current: currentBreakpoint,\n isXs: !isSmUp,\n isSm: isSmUp && !isMdUp,\n isMd: isMdUp && !isLgUp,\n isLg: isLgUp && !isXlUp,\n isXl: isXlUp,\n };\n }, [isSmUp, isMdUp, isLgUp, isXlUp]);\n\n // Semantic breakpoints\n const isMobile = !isMdUp;\n const isTablet = isMdUp && !isLgUp;\n const isDesktop = isLgUp;\n\n // Helper functions\n const up = useMemo(\n () => (breakpoint: Breakpoint) => {\n switch (breakpoint) {\n case 'xs':\n return isXsUp;\n case 'sm':\n return isSmUp;\n case 'md':\n return isMdUp;\n case 'lg':\n return isLgUp;\n case 'xl':\n return isXlUp;\n default:\n return false;\n }\n },\n [isXsUp, isSmUp, isMdUp, isLgUp, isXlUp]\n );\n\n const down = useMemo(\n () => (breakpoint: Breakpoint) => {\n switch (breakpoint) {\n case 'xs':\n return false; // Nothing is below xs\n case 'sm':\n return !isSmUp;\n case 'md':\n return !isMdUp;\n case 'lg':\n return !isLgUp;\n case 'xl':\n return !isXlUp;\n default:\n return false;\n }\n },\n [isSmUp, isMdUp, isLgUp, isXlUp]\n );\n\n const only = useMemo(\n () => (breakpoint: Breakpoint) => {\n switch (breakpoint) {\n case 'xs':\n return isXs;\n case 'sm':\n return isSm;\n case 'md':\n return isMd;\n case 'lg':\n return isLg;\n case 'xl':\n return isXl;\n default:\n return false;\n }\n },\n [isXs, isSm, isMd, isLg, isXl]\n );\n\n const between = useMemo(\n () => (start: Breakpoint, end: Breakpoint) => {\n const breakpointOrder: Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl'];\n const startIndex = breakpointOrder.indexOf(start);\n const endIndex = breakpointOrder.indexOf(end);\n const currentIndex = breakpointOrder.indexOf(current);\n\n return currentIndex >= startIndex && currentIndex <= endIndex;\n },\n [current]\n );\n\n // Breakpoint values\n const values = useMemo<BreakpointValues>(\n () => ({\n xs: theme.breakpoints.values.xs,\n sm: theme.breakpoints.values.sm,\n md: theme.breakpoints.values.md,\n lg: theme.breakpoints.values.lg,\n xl: theme.breakpoints.values.xl,\n }),\n [theme.breakpoints.values]\n );\n\n return {\n current,\n isXs,\n isSm,\n isMd,\n isLg,\n isXl,\n isMobile,\n isTablet,\n isDesktop,\n up,\n down,\n only,\n between,\n values,\n };\n}\n","'use client';\n\n/**\n * useIsClient Hook\n *\n * Detects client-side rendering vs server-side rendering.\n * Returns false during SSR, true after hydration.\n *\n * @module core/hooks\n */\n\nimport { useState, useEffect } from 'react';\n\n/**\n * Return type for useIsClient hook.\n */\nexport type UseIsClientReturn = boolean;\n\n/**\n * Hook to detect client-side rendering.\n *\n * @returns {boolean} True if running on client, false during SSR\n *\n * @example\n * ```tsx\n * function ClientOnlyComponent() {\n * const isClient = useIsClient();\n *\n * if (!isClient) {\n * return <Skeleton />;\n * }\n *\n * return <BrowserOnlyFeature />;\n * }\n * ```\n */\nexport function useIsClient(): UseIsClientReturn {\n const [isClient, setIsClient] = useState(false);\n\n useEffect(() => {\n setIsClient(true);\n }, []);\n\n return isClient;\n}\n","'use client';\n\n/**\n * useMounted Hook\n *\n * Tracks component mount state for async operations.\n *\n * @module core/hooks\n */\n\nimport { useEffect, useRef, useCallback } from 'react';\n\n/**\n * Return type for useMounted hook.\n */\nexport interface UseMountedReturn {\n /** Check if component is currently mounted */\n isMounted: () => boolean;\n}\n\n/**\n * Hook to check if a component is currently mounted.\n * Useful for preventing state updates on unmounted components.\n *\n * @returns {UseMountedReturn} Mount state checker\n *\n * @example\n * ```tsx\n * function AsyncComponent() {\n * const [data, setData] = useState(null);\n * const { isMounted } = useMounted();\n *\n * useEffect(() => {\n * fetchData().then((result) => {\n * if (isMounted()) {\n * setData(result);\n * }\n * });\n * }, [isMounted]);\n *\n * return <div>{data}</div>;\n * }\n * ```\n */\nexport function useMounted(): UseMountedReturn {\n const mountedRef = useRef(false);\n\n useEffect(() => {\n mountedRef.current = true;\n\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n const isMounted = useCallback(() => mountedRef.current, []);\n\n return { isMounted };\n}\n","'use client';\n\n/**\n * usePrevious Hook\n *\n * Tracks the previous value of a state or prop.\n *\n * @module core/hooks\n */\n\nimport { useRef, useEffect } from 'react';\n\n/**\n * Hook to track the previous value.\n *\n * @template T - Type of the value\n * @param {T} value - Current value to track\n * @returns {T | undefined} Previous value (undefined on first render)\n *\n * @example\n * ```tsx\n * function Counter() {\n * const [count, setCount] = useState(0);\n * const prevCount = usePrevious(count);\n *\n * return (\n * <div>\n * Current: {count}, Previous: {prevCount ?? 'N/A'}\n * </div>\n * );\n * }\n * ```\n */\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined);\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n}\n","'use client';\n\n/**\n * useEventListener Hook\n *\n * Attaches event listeners with automatic cleanup.\n *\n * @module core/hooks\n */\n\nimport { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\n\n/**\n * Supported event maps for different targets.\n */\ntype WindowEventMap = globalThis.WindowEventMap;\ntype HTMLElementEventMap = globalThis.HTMLElementEventMap;\ntype DocumentEventMap = globalThis.DocumentEventMap;\n\n/**\n * Hook to attach event listeners with automatic cleanup.\n *\n * @template K - Event type key\n * @param {K} eventName - Name of the event\n * @param {function} handler - Event handler\n * @param {RefObject<HTMLElement>} [element] - Target element (defaults to window)\n * @param {AddEventListenerOptions} [options] - Event listener options\n *\n * @example\n * ```tsx\n * // Window event\n * function ScrollTracker() {\n * useEventListener('scroll', () => console.log('Scrolled!'));\n * return null;\n * }\n *\n * // Element event\n * function ClickTracker() {\n * const ref = useRef<HTMLDivElement>(null);\n * useEventListener('click', (e) => console.log('Clicked!', e), ref);\n * return <div ref={ref}>Click me</div>;\n * }\n * ```\n */\nexport function useEventListener<K extends keyof WindowEventMap>(\n eventName: K,\n handler: (event: WindowEventMap[K]) => void,\n element?: undefined,\n options?: AddEventListenerOptions\n): void;\n\nexport function useEventListener<K extends keyof HTMLElementEventMap>(\n eventName: K,\n handler: (event: HTMLElementEventMap[K]) => void,\n element: RefObject<HTMLElement | null>,\n options?: AddEventListenerOptions\n): void;\n\nexport function useEventListener<K extends keyof DocumentEventMap>(\n eventName: K,\n handler: (event: DocumentEventMap[K]) => void,\n element: RefObject<Document>,\n options?: AddEventListenerOptions\n): void;\n\nexport function useEventListener(\n eventName: string,\n handler: (event: Event) => void,\n element?: RefObject<HTMLElement | Document | null>,\n options?: AddEventListenerOptions\n): void {\n const savedHandler = useRef(handler);\n\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const targetElement = element?.current ?? window;\n\n if (!targetElement?.addEventListener) {\n return undefined;\n }\n\n const eventListener = (event: Event) => savedHandler.current(event);\n\n targetElement.addEventListener(eventName, eventListener, options);\n\n return () => {\n targetElement.removeEventListener(eventName, eventListener, options);\n };\n }, [eventName, element, options]);\n}\n","'use client';\n\n/**\n * useClickOutside Hook\n *\n * Detects clicks outside of a specified element.\n *\n * @module core/hooks\n */\n\nimport { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\n\n/**\n * Hook to detect clicks outside of an element.\n *\n * @template T - Element type (defaults to HTMLElement)\n * @param {function} handler - Callback when clicked outside\n * @param {RefObject<T>} [providedRef] - Optional external ref\n * @returns {RefObject<T>} Ref to attach to the element\n *\n * @example\n * ```tsx\n * function Dropdown() {\n * const [isOpen, setIsOpen] = useState(false);\n * const ref = useClickOutside<HTMLDivElement>(() => setIsOpen(false));\n *\n * return (\n * <div ref={ref}>\n * <button onClick={() => setIsOpen(true)}>Open</button>\n * {isOpen && <DropdownMenu />}\n * </div>\n * );\n * }\n * ```\n */\nexport function useClickOutside<T extends HTMLElement = HTMLElement>(\n handler: (event: MouseEvent | TouchEvent) => void,\n providedRef?: RefObject<T | null>\n): RefObject<T | null> {\n const internalRef = useRef<T | null>(null);\n const ref = providedRef ?? internalRef;\n\n // Use ref to always call latest handler without re-attaching listeners\n const handlerRef = useRef(handler);\n handlerRef.current = handler;\n\n useEffect(() => {\n const listener = (event: MouseEvent | TouchEvent) => {\n const element = ref.current;\n\n // Do nothing if clicking ref's element or its descendants\n if (!element || element.contains(event.target as Node)) {\n return;\n }\n\n handlerRef.current(event);\n };\n\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, [ref]);\n\n return ref;\n}\n","'use client';\n\n/**\n * useInterval Hook\n *\n * Declarative interval hook with automatic cleanup.\n *\n * @module core/hooks\n */\n\nimport { useEffect, useRef } from 'react';\n\n/**\n * Hook to run a callback at a specified interval.\n *\n * @param {function} callback - Function to call on each interval\n * @param {number | null} delay - Interval delay in ms (null to pause)\n *\n * @example\n * ```tsx\n * function Timer() {\n * const [seconds, setSeconds] = useState(0);\n * const [isRunning, setIsRunning] = useState(true);\n *\n * useInterval(\n * () => setSeconds((s) => s + 1),\n * isRunning ? 1000 : null\n * );\n *\n * return (\n * <div>\n * <p>Seconds: {seconds}</p>\n * <button onClick={() => setIsRunning(!isRunning)}>\n * {isRunning ? 'Pause' : 'Resume'}\n * </button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useInterval(callback: () => void, delay: number | null): void {\n const savedCallback = useRef(callback);\n\n // Remember the latest callback\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Set up the interval\n useEffect(() => {\n if (delay === null) {\n return undefined;\n }\n\n const tick = () => savedCallback.current();\n const id = setInterval(tick, delay);\n\n return () => clearInterval(id);\n }, [delay]);\n}\n","'use client';\n\n/**\n * useTimeout Hook\n *\n * Declarative timeout hook with automatic cleanup.\n *\n * @module core/hooks\n */\n\nimport { useEffect, useRef, useCallback, useState, useMemo } from 'react';\n\n/**\n * Return type for useTimeout hook.\n */\nexport interface UseTimeoutReturn {\n /** Reset the timeout */\n reset: () => void;\n /** Clear the timeout */\n clear: () => void;\n /** Whether the timeout is active */\n isActive: boolean;\n}\n\n/**\n * Hook to run a callback after a specified delay.\n *\n * @param {function} callback - Function to call after delay\n * @param {number} delay - Delay in milliseconds\n * @returns {UseTimeoutReturn} Timeout controls\n *\n * @example\n * ```tsx\n * function AutoSave() {\n * const [content, setContent] = useState('');\n * const { reset } = useTimeout(() => {\n * saveContent(content);\n * }, 3000);\n *\n * const handleChange = (value: string) => {\n * setContent(value);\n * reset(); // Reset timer on each change\n * };\n *\n * return <textarea value={content} onChange={(e) => handleChange(e.target.value)} />;\n * }\n * ```\n */\nexport function useTimeout(callback: () => void, delay: number): UseTimeoutReturn {\n const savedCallback = useRef(callback);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [isActive, setIsActive] = useState(true);\n\n // Remember the latest callback\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n const clear = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n setIsActive(false);\n }\n }, []);\n\n const reset = useCallback(() => {\n clear();\n timeoutRef.current = setTimeout(() => {\n savedCallback.current();\n setIsActive(false);\n }, delay);\n setIsActive(true);\n }, [clear, delay]);\n\n // Set up the timeout\n useEffect(() => {\n reset();\n return clear;\n }, [reset, clear]);\n\n // Memoize return object to prevent unnecessary re-renders in consumers\n return useMemo(() => ({ reset, clear, isActive }), [reset, clear, isActive]);\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { TableIcon } from './chunk-TZHWYT34.js';
2
2
  import { semanticSurfaceStyles } from './chunk-TZWHELY4.js';
3
+ import { createTypography, typography } from './chunk-GCXRYSWU.js';
3
4
  import { generateColorScaleWithChannels, hexToRgbChannel, cssVarRgba, getContrastText, generatePaletteColorWithChannels, scrollbarStyles, varAlpha, generateColorScale, mixins } from './chunk-IRYU3NTG.js';
4
5
  import { RemoveIcon, AddIcon, SearchIcon, CloseIcon, DownloadIcon, FilterIcon, ArrowDownIcon, ArrowUpIcon, MoreIcon, ChevronRightIcon, ChevronLeftIcon, LastPageIcon, FirstPageIcon, ChevronDownIcon, StarEmptyIcon, StarIcon, ErrorIcon, WarningIcon, InfoIcon, SuccessIcon, RadioCheckedIcon, RadioIcon } from './chunk-VQVVHMPG.js';
5
6
  import { createPrismIcon } from './chunk-D5J3KW6Q.js';
@@ -29,7 +30,6 @@ import { formLabelClasses } from '@mui/material/FormLabel';
29
30
  import { jsx } from 'react/jsx-runtime';
30
31
  import { tabClasses } from '@mui/material/Tab';
31
32
  import { autocompleteClasses } from '@mui/material/Autocomplete';
32
- import '@mui/x-data-grid/themeAugmentation';
33
33
  import { forwardRef } from 'react';
34
34
  import * as locales from '@mui/material/locale';
35
35
 
@@ -1604,6 +1604,8 @@ function createAutocompleteOverrides(config) {
1604
1604
  }
1605
1605
  };
1606
1606
  }
1607
+
1608
+ // src/theme/components/DataGrid.ts
1607
1609
  function createDataGridOverrides(config) {
1608
1610
  const { borderRadius } = config;
1609
1611
  return {
@@ -2878,135 +2880,6 @@ function createShadows(primaryColor, opacityMultiplier = 1) {
2878
2880
  });
2879
2881
  var darkShadow = "0px 0px 0px 1px rgba(255, 255, 255, 0.1)";
2880
2882
 
2881
- // src/theme/typography.ts
2882
- var typography = {
2883
- fontFamily: {
2884
- primary: '"Nunito Sans Variable", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
2885
- secondary: '"Exo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
2886
- mono: '"JetBrains Mono", "Fira Code", Consolas, Monaco, monospace'
2887
- },
2888
- fontWeights: {
2889
- light: 300,
2890
- regular: 400,
2891
- medium: 500,
2892
- semiBold: 600,
2893
- bold: 700
2894
- }
2895
- };
2896
- var fontSizes = {
2897
- xs: "0.75rem",
2898
- // 12px
2899
- sm: "0.875rem",
2900
- // 14px
2901
- md: "1rem",
2902
- // 16px
2903
- lg: "1.125rem",
2904
- // 18px
2905
- xl: "1.25rem",
2906
- // 20px
2907
- "2xl": "1.5rem",
2908
- // 24px
2909
- "3xl": "1.875rem",
2910
- // 30px
2911
- "4xl": "2.25rem",
2912
- // 36px
2913
- "5xl": "3rem"};
2914
- var lineHeights = {
2915
- tight: 1.25,
2916
- snug: 1.375,
2917
- normal: 1.5,
2918
- relaxed: 1.625};
2919
- function createTypography(config) {
2920
- const { fontFamily, fontWeights } = config;
2921
- return {
2922
- fontFamily: fontFamily.primary,
2923
- fontWeightLight: fontWeights.light,
2924
- fontWeightRegular: fontWeights.regular,
2925
- fontWeightMedium: fontWeights.medium,
2926
- fontWeightBold: fontWeights.bold,
2927
- // Headings
2928
- h1: {
2929
- fontFamily: fontFamily.secondary || fontFamily.primary,
2930
- fontWeight: fontWeights.bold,
2931
- fontSize: fontSizes["5xl"],
2932
- lineHeight: lineHeights.tight,
2933
- letterSpacing: "-0.025em"
2934
- },
2935
- h2: {
2936
- fontFamily: fontFamily.secondary || fontFamily.primary,
2937
- fontWeight: fontWeights.bold,
2938
- fontSize: fontSizes["4xl"],
2939
- lineHeight: lineHeights.tight,
2940
- letterSpacing: "-0.025em"
2941
- },
2942
- h3: {
2943
- fontFamily: fontFamily.secondary || fontFamily.primary,
2944
- fontWeight: fontWeights.semiBold,
2945
- fontSize: fontSizes["3xl"],
2946
- lineHeight: lineHeights.snug,
2947
- letterSpacing: "-0.02em"
2948
- },
2949
- h4: {
2950
- fontFamily: fontFamily.secondary || fontFamily.primary,
2951
- fontWeight: fontWeights.semiBold,
2952
- fontSize: fontSizes["2xl"],
2953
- lineHeight: lineHeights.snug,
2954
- letterSpacing: "-0.02em"
2955
- },
2956
- h5: {
2957
- fontFamily: fontFamily.secondary || fontFamily.primary,
2958
- fontWeight: fontWeights.semiBold,
2959
- fontSize: fontSizes.xl,
2960
- lineHeight: lineHeights.snug
2961
- },
2962
- h6: {
2963
- fontFamily: fontFamily.secondary || fontFamily.primary,
2964
- fontWeight: fontWeights.semiBold,
2965
- fontSize: fontSizes.lg,
2966
- lineHeight: lineHeights.snug
2967
- },
2968
- // Body text
2969
- body1: {
2970
- fontSize: fontSizes.md,
2971
- lineHeight: lineHeights.relaxed
2972
- },
2973
- body2: {
2974
- fontSize: fontSizes.sm,
2975
- lineHeight: lineHeights.relaxed
2976
- },
2977
- // Subtitles
2978
- subtitle1: {
2979
- fontSize: fontSizes.md,
2980
- fontWeight: fontWeights.medium,
2981
- lineHeight: lineHeights.normal
2982
- },
2983
- subtitle2: {
2984
- fontSize: fontSizes.sm,
2985
- fontWeight: fontWeights.medium,
2986
- lineHeight: lineHeights.normal
2987
- },
2988
- // Captions and overlines
2989
- caption: {
2990
- fontSize: fontSizes.xs,
2991
- lineHeight: lineHeights.normal
2992
- },
2993
- overline: {
2994
- fontSize: fontSizes.xs,
2995
- fontWeight: fontWeights.semiBold,
2996
- lineHeight: lineHeights.normal,
2997
- textTransform: "uppercase",
2998
- letterSpacing: "0.08em"
2999
- },
3000
- // Buttons
3001
- button: {
3002
- fontSize: fontSizes.sm,
3003
- fontWeight: fontWeights.semiBold,
3004
- lineHeight: lineHeights.normal,
3005
- textTransform: "none"
3006
- }
3007
- };
3008
- }
3009
-
3010
2883
  // src/theme/colors/luxury.ts
3011
2884
  var luxuryPrimary = {
3012
2885
  50: "#FBF7E8",
@@ -4172,6 +4045,6 @@ function getPresetDisplayName(preset) {
4172
4045
  return PRESET_DISPLAY_NAMES[preset];
4173
4046
  }
4174
4047
 
4175
- export { COLOR_GROUPS, PRESET_DISPLAY_NAMES, PRESET_INHERENT_MODE, PRESET_NAMES, arcticPreset, baseColors, basic, blue, buildAction, buildBackground, buildChartColors, buildPalette, buildPaletteColor, buildText, buildVibrant, componentOverrides, createButtonBaseOverrides, createButtonGroupOverrides, createButtonOverrides, createPrismTheme, createShadows, createTypography, darkShadow, defaultDarkPalette, defaultLightPalette, draculaPreset, emberPreset, getPresetDisplayName, green, grey, lightBlue, luxuryColors, luxuryError, luxuryInfo, luxuryNeutral, luxuryPrimary, luxurySecondary, luxurySuccess, luxuryWarning, midnightPreset, minimalPreset, orange, purple, red, retroPreset, shadows, typography };
4176
- //# sourceMappingURL=chunk-RSWVYIXK.js.map
4177
- //# sourceMappingURL=chunk-RSWVYIXK.js.map
4048
+ export { COLOR_GROUPS, PRESET_DISPLAY_NAMES, PRESET_INHERENT_MODE, PRESET_NAMES, arcticPreset, baseColors, basic, blue, buildAction, buildBackground, buildChartColors, buildPalette, buildPaletteColor, buildText, buildVibrant, componentOverrides, createButtonBaseOverrides, createButtonGroupOverrides, createButtonOverrides, createPrismTheme, createShadows, darkShadow, defaultDarkPalette, defaultLightPalette, draculaPreset, emberPreset, getPresetDisplayName, green, grey, lightBlue, luxuryColors, luxuryError, luxuryInfo, luxuryNeutral, luxuryPrimary, luxurySecondary, luxurySuccess, luxuryWarning, midnightPreset, minimalPreset, orange, purple, red, retroPreset, shadows };
4049
+ //# sourceMappingURL=chunk-KOOKHWTH.js.map
4050
+ //# sourceMappingURL=chunk-KOOKHWTH.js.map