@visin/frontend-core 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/components/AppLayout/AppLayout.d.ts +2 -4
  2. package/dist/components/AppLayout/AppLayout.d.ts.map +1 -1
  3. package/dist/components/AppLayout/AppLayout.js +84 -62
  4. package/dist/components/AppLayout/AppLayout.js.map +1 -1
  5. package/dist/components/ColorMode/ColorModeSetting.d.ts +39 -0
  6. package/dist/components/ColorMode/ColorModeSetting.d.ts.map +1 -0
  7. package/dist/components/ColorMode/ColorModeSetting.js +52 -0
  8. package/dist/components/ColorMode/ColorModeSetting.js.map +1 -0
  9. package/dist/components/ColorMode/VisinThemeProvider.d.ts +16 -0
  10. package/dist/components/ColorMode/VisinThemeProvider.d.ts.map +1 -0
  11. package/dist/components/ColorMode/VisinThemeProvider.js +19 -0
  12. package/dist/components/ColorMode/VisinThemeProvider.js.map +1 -0
  13. package/dist/components/ColorMode/index.d.ts +7 -0
  14. package/dist/components/ColorMode/index.d.ts.map +1 -0
  15. package/dist/components/ColorMode/index.js +4 -0
  16. package/dist/components/ColorMode/index.js.map +1 -0
  17. package/dist/components/ColorMode/useChartColors.d.ts +15 -0
  18. package/dist/components/ColorMode/useChartColors.d.ts.map +1 -0
  19. package/dist/components/ColorMode/useChartColors.js +16 -0
  20. package/dist/components/ColorMode/useChartColors.js.map +1 -0
  21. package/dist/components/Page/EmptyState.d.ts +10 -0
  22. package/dist/components/Page/EmptyState.d.ts.map +1 -0
  23. package/dist/components/Page/EmptyState.js +19 -0
  24. package/dist/components/Page/EmptyState.js.map +1 -0
  25. package/dist/components/Page/ListRow.d.ts +27 -0
  26. package/dist/components/Page/ListRow.d.ts.map +1 -0
  27. package/dist/components/Page/ListRow.js +73 -0
  28. package/dist/components/Page/ListRow.js.map +1 -0
  29. package/dist/components/Page/PageHeader.d.ts +33 -0
  30. package/dist/components/Page/PageHeader.d.ts.map +1 -0
  31. package/dist/components/Page/PageHeader.js +49 -0
  32. package/dist/components/Page/PageHeader.js.map +1 -0
  33. package/dist/components/Page/Panel.d.ts +18 -0
  34. package/dist/components/Page/Panel.d.ts.map +1 -0
  35. package/dist/components/Page/Panel.js +23 -0
  36. package/dist/components/Page/Panel.js.map +1 -0
  37. package/dist/components/Page/ResponsiveActions.d.ts +38 -0
  38. package/dist/components/Page/ResponsiveActions.d.ts.map +1 -0
  39. package/dist/components/Page/ResponsiveActions.js +30 -0
  40. package/dist/components/Page/ResponsiveActions.js.map +1 -0
  41. package/dist/components/Page/SectionHeading.d.ts +10 -0
  42. package/dist/components/Page/SectionHeading.d.ts.map +1 -0
  43. package/dist/components/Page/SectionHeading.js +7 -0
  44. package/dist/components/Page/SectionHeading.js.map +1 -0
  45. package/dist/components/Page/index.d.ts +14 -0
  46. package/dist/components/Page/index.d.ts.map +1 -0
  47. package/dist/components/Page/index.js +8 -0
  48. package/dist/components/Page/index.js.map +1 -0
  49. package/dist/components/Page/layout.d.ts +10 -0
  50. package/dist/components/Page/layout.d.ts.map +1 -0
  51. package/dist/components/Page/layout.js +14 -0
  52. package/dist/components/Page/layout.js.map +1 -0
  53. package/dist/index.d.ts +6 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +3 -0
  56. package/dist/index.js.map +1 -1
  57. package/dist/theme/chart.d.ts +19 -0
  58. package/dist/theme/chart.d.ts.map +1 -0
  59. package/dist/theme/chart.js +19 -0
  60. package/dist/theme/chart.js.map +1 -0
  61. package/dist/theme/createVisinTheme.d.ts +45 -0
  62. package/dist/theme/createVisinTheme.d.ts.map +1 -0
  63. package/dist/theme/createVisinTheme.js +261 -0
  64. package/dist/theme/createVisinTheme.js.map +1 -0
  65. package/dist/theme/index.d.ts +6 -0
  66. package/dist/theme/index.d.ts.map +1 -0
  67. package/dist/theme/index.js +5 -0
  68. package/dist/theme/index.js.map +1 -0
  69. package/dist/theme/livePalette.d.ts +11 -0
  70. package/dist/theme/livePalette.d.ts.map +1 -0
  71. package/dist/theme/livePalette.js +10 -0
  72. package/dist/theme/livePalette.js.map +1 -0
  73. package/dist/theme/tokens.d.ts +224 -0
  74. package/dist/theme/tokens.d.ts.map +1 -0
  75. package/dist/theme/tokens.js +205 -0
  76. package/dist/theme/tokens.js.map +1 -0
  77. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createVisinTheme.d.ts","sourceRoot":"","sources":["../../src/theme/createVisinTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMlF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,iBAAiB;QACzB,OAAO,EAAE,IAAI,CAAC;KACf;CACF;AAeD,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB,mDAAmD;;;;;CAK3C,CAAC;AA8BX;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,GAAE,YAAiB,GAAG,KAAK,CA2LpE;AAED,mFAAmF;AACnF,eAAO,MAAM,UAAU,OAAqB,CAAC"}
@@ -0,0 +1,261 @@
1
+ import { createTheme } from '@mui/material/styles';
2
+ import { brand, glass, ink, raisedShadow, schemeCssVars, schemes, surface } from './tokens';
3
+ /** Below `md` — the compact (phone) layout, as `useCompactLayout` reads it. */
4
+ const PHONE = '@media (max-width:899.95px)';
5
+ /**
6
+ * Below `sm` — a phone held upright, where a thumb does the pointing. 44px is
7
+ * the WCAG 2.2 target size and both platforms' minimum; MUI's 36px button is a
8
+ * miss often enough to feel broken.
9
+ */
10
+ const HANDHELD = '@media (max-width:599.95px)';
11
+ const TOUCH_TARGET = 44;
12
+ const FONT_STACK = '"Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
13
+ /** The attribute on <html> that says which scheme is showing: `light` or `dark`. */
14
+ export const COLOR_SCHEME_ATTRIBUTE = 'data-color-scheme';
15
+ /**
16
+ * Where the person's choice (`system`, `light` or `dark`) is kept. Named rather
17
+ * than MUI's default, so the pre-paint script in each index.html reads the same key.
18
+ */
19
+ export const COLOR_MODE_STORAGE_KEY = 'visin-mode';
20
+ export const COLOR_SCHEME_STORAGE_KEY = 'visin-color-scheme';
21
+ /**
22
+ * The colours named outside a React tree: `theme-color` in each index.html,
23
+ * the manifest, the offline page.
24
+ */
25
+ export const VISIN_COLORS = {
26
+ /** Primary: buttons, links, the selected state. */
27
+ brand: brand.light,
28
+ themeColor: schemes.light.themeColor,
29
+ themeColorDark: schemes.dark.themeColor,
30
+ background: schemes.light.surface.default
31
+ };
32
+ const lightPalette = {
33
+ primary: { main: brand.light, light: '#60a5fa', dark: '#1d4ed8', contrastText: '#ffffff' },
34
+ secondary: { main: '#64748b' },
35
+ success: { main: '#15803d' },
36
+ warning: { main: '#b45309' },
37
+ error: { main: '#dc2626' },
38
+ info: { main: '#0369a1' },
39
+ background: { default: schemes.light.surface.default, paper: schemes.light.surface.paper },
40
+ text: { primary: schemes.light.ink.strong, secondary: schemes.light.ink.body, disabled: schemes.light.ink.faint },
41
+ divider: schemes.light.surface.divider
42
+ };
43
+ /**
44
+ * Walked *up* for dark: the light scheme's blue is 3.1:1 on the dark paper, so
45
+ * anything readable gets a lighter one, with dark text on it as a button fill.
46
+ */
47
+ const darkPalette = {
48
+ primary: { main: brand.dark, light: '#93c5fd', dark: '#3b82f6', contrastText: '#0b1220' },
49
+ secondary: { main: '#94a3b8' },
50
+ success: { main: '#4ade80' },
51
+ warning: { main: '#fbbf24' },
52
+ error: { main: '#f87171' },
53
+ info: { main: '#38bdf8' },
54
+ background: { default: schemes.dark.surface.default, paper: schemes.dark.surface.paper },
55
+ text: { primary: schemes.dark.ink.strong, secondary: schemes.dark.ink.body, disabled: schemes.dark.ink.faint },
56
+ divider: schemes.dark.surface.divider
57
+ };
58
+ /**
59
+ * The one theme every Visin front renders with — shell, vision, label, account
60
+ * and sign-in — so crossing apps inside the shell never changes the typeface,
61
+ * the blue, the scheme or the shape of a button.
62
+ *
63
+ * Colours are CSS variables switched by an attribute on <html>. That is what
64
+ * makes one switch reach every front: the remotes are federated into the
65
+ * shell's page, so they all read the same attribute. It also means
66
+ * `theme.palette` holds the *light* values in both schemes; code that needs a
67
+ * colour in JS reads `theme.vars.palette` (or `useActivePalette` for a real
68
+ * value, e.g. a chart series).
69
+ *
70
+ * `shape.borderRadius` stays MUI's 4px unit on purpose: pages across the apps
71
+ * set radii as theme multiples (`borderRadius: 2`), and a larger unit turned
72
+ * those into pills. Components get their rounder corners here instead.
73
+ */
74
+ export function createVisinTheme(overrides = {}) {
75
+ return createTheme({
76
+ cssVariables: { colorSchemeSelector: COLOR_SCHEME_ATTRIBUTE },
77
+ colorSchemes: { light: { palette: lightPalette }, dark: { palette: darkPalette } },
78
+ typography: {
79
+ fontFamily: FONT_STACK,
80
+ h1: { fontWeight: 700, letterSpacing: '-0.02em' },
81
+ h2: { fontWeight: 700, letterSpacing: '-0.02em' },
82
+ h3: { fontWeight: 700, letterSpacing: '-0.02em' },
83
+ // Page titles: MUI's 2.125rem h4 filled a phone's width with two words.
84
+ h4: { fontWeight: 700, letterSpacing: '-0.02em', fontSize: '1.75rem', [PHONE]: { fontSize: '1.375rem' } },
85
+ h5: { fontWeight: 600, [PHONE]: { fontSize: '1.2rem' } },
86
+ h6: { fontWeight: 600 },
87
+ subtitle1: { fontWeight: 600 },
88
+ subtitle2: { fontWeight: 600 },
89
+ button: { textTransform: 'none', fontWeight: 600 }
90
+ },
91
+ shape: { borderRadius: 4 },
92
+ components: {
93
+ MuiCssBaseline: {
94
+ styleOverrides: {
95
+ // The tokens pages use (`ink.muted`, `surface.sunken`, `glass`…) are
96
+ // variables; these are their values in each scheme. The attribute
97
+ // also works on an element, not only <html>, so a region can pin
98
+ // itself to one scheme.
99
+ [`:root, [${COLOR_SCHEME_ATTRIBUTE}="light"]`]: schemeCssVars('light'),
100
+ [`:root[${COLOR_SCHEME_ATTRIBUTE}="dark"], [${COLOR_SCHEME_ATTRIBUTE}="dark"]`]: schemeCssVars('dark'),
101
+ body: { WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale' },
102
+ '*::-webkit-scrollbar': { width: 10, height: 10 },
103
+ '*::-webkit-scrollbar-track': { background: 'transparent' },
104
+ '*::-webkit-scrollbar-thumb': {
105
+ background: 'rgba(100,116,139,0.28)',
106
+ borderRadius: 999,
107
+ border: '2px solid transparent',
108
+ backgroundClip: 'padding-box'
109
+ },
110
+ '*::-webkit-scrollbar-thumb:hover': { background: 'rgba(100,116,139,0.5)', backgroundClip: 'padding-box' }
111
+ }
112
+ },
113
+ // AppLayout's content column already has the page gutters; a Container's
114
+ // own added a second pair, which a phone paid for in width.
115
+ MuiContainer: {
116
+ defaultProps: { disableGutters: true }
117
+ },
118
+ MuiButton: {
119
+ defaultProps: { disableElevation: true },
120
+ styleOverrides: {
121
+ root: ({ theme }) => ({
122
+ borderRadius: 10,
123
+ [HANDHELD]: { minHeight: TOUCH_TARGET },
124
+ variants: [
125
+ {
126
+ // A little light from above and a glow in its own colour: a
127
+ // flat fill read as a sticker on the frosted chrome.
128
+ props: { variant: 'contained', color: 'primary' },
129
+ style: {
130
+ backgroundImage: 'linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0))',
131
+ boxShadow: `0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 20px -10px ${theme.alpha(theme.vars.palette.primary.main, 0.7)}`,
132
+ '&:hover': {
133
+ boxShadow: `0 1px 0 rgba(255,255,255,0.18) inset, 0 10px 24px -10px ${theme.alpha(theme.vars.palette.primary.main, 0.85)}`
134
+ },
135
+ '&.Mui-disabled': { backgroundImage: 'none', boxShadow: 'none' }
136
+ }
137
+ }
138
+ ]
139
+ }),
140
+ sizeSmall: { [HANDHELD]: { minHeight: 36 } }
141
+ }
142
+ },
143
+ MuiIconButton: {
144
+ styleOverrides: {
145
+ root: {
146
+ [HANDHELD]: {
147
+ minWidth: TOUCH_TARGET,
148
+ minHeight: TOUCH_TARGET,
149
+ // Inside a text field the field is the target, and 44px would
150
+ // stretch a small one taller than its neighbours.
151
+ '.MuiInputAdornment-root &': { minWidth: 0, minHeight: 0 }
152
+ }
153
+ },
154
+ sizeSmall: { [HANDHELD]: { minWidth: 36, minHeight: 36 } }
155
+ }
156
+ },
157
+ MuiMenuItem: {
158
+ styleOverrides: { root: { [HANDHELD]: { minHeight: TOUCH_TARGET } } }
159
+ },
160
+ MuiListItemButton: {
161
+ styleOverrides: { root: { [HANDHELD]: { minHeight: TOUCH_TARGET } } }
162
+ },
163
+ MuiFab: {
164
+ styleOverrides: { root: { textTransform: 'none', fontWeight: 600 } }
165
+ },
166
+ MuiPaper: {
167
+ styleOverrides: {
168
+ // MUI lightens dark paper by elevation with a white overlay, which
169
+ // turns a menu grey against its own panel. The surfaces are chosen.
170
+ root: { backgroundImage: 'none' },
171
+ rounded: { borderRadius: 12 },
172
+ outlined: { borderColor: surface.divider }
173
+ }
174
+ },
175
+ MuiCard: {
176
+ defaultProps: { variant: 'outlined' },
177
+ styleOverrides: {
178
+ root: { borderRadius: 16, boxShadow: raisedShadow }
179
+ }
180
+ },
181
+ MuiPopover: {
182
+ styleOverrides: { paper: { ...glass, borderRadius: 12 } }
183
+ },
184
+ MuiMenu: {
185
+ styleOverrides: { paper: { borderRadius: 12 } }
186
+ },
187
+ MuiAutocomplete: {
188
+ styleOverrides: { paper: { ...glass, borderRadius: 12 } }
189
+ },
190
+ MuiDialog: {
191
+ styleOverrides: {
192
+ // Solid: a form over a blur is harder to read than it is pretty.
193
+ paper: {
194
+ borderRadius: 16,
195
+ border: `1px solid ${surface.divider}`,
196
+ boxShadow: '0 30px 80px -30px rgba(0,0,0,0.45)',
197
+ // Near full screen on a phone: a desktop's margins squeeze a form
198
+ // into the middle for nothing.
199
+ [HANDHELD]: {
200
+ margin: 12,
201
+ width: 'calc(100% - 24px)',
202
+ maxWidth: 'calc(100% - 24px)',
203
+ maxHeight: 'calc(100% - 24px)'
204
+ }
205
+ }
206
+ }
207
+ },
208
+ MuiBackdrop: {
209
+ styleOverrides: {
210
+ root: {
211
+ variants: [
212
+ {
213
+ props: { invisible: false },
214
+ style: { backgroundColor: 'rgba(8,12,20,0.45)', backdropFilter: 'blur(3px)' }
215
+ }
216
+ ]
217
+ }
218
+ }
219
+ },
220
+ MuiOutlinedInput: {
221
+ styleOverrides: { root: { borderRadius: 10, backgroundColor: surface.paper } }
222
+ },
223
+ MuiAlert: {
224
+ styleOverrides: { root: { borderRadius: 10 } }
225
+ },
226
+ MuiChip: {
227
+ styleOverrides: { root: { fontWeight: 500 } }
228
+ },
229
+ // A tab strip wider than the phone it is on is the commonest cause of a
230
+ // page that slides sideways. A page that wants fixed tabs says so.
231
+ MuiTabs: {
232
+ defaultProps: { variant: 'scrollable', scrollButtons: 'auto', allowScrollButtonsMobile: true }
233
+ },
234
+ MuiTab: {
235
+ styleOverrides: { root: { textTransform: 'none', fontWeight: 600, [HANDHELD]: { minWidth: 'auto', paddingInline: 12 } } }
236
+ },
237
+ MuiTableCell: {
238
+ styleOverrides: {
239
+ root: { borderColor: surface.divider },
240
+ head: {
241
+ backgroundColor: surface.sunken,
242
+ color: ink.body,
243
+ fontSize: '0.75rem',
244
+ fontWeight: 600,
245
+ letterSpacing: '0.04em',
246
+ textTransform: 'uppercase'
247
+ }
248
+ }
249
+ },
250
+ MuiTooltip: {
251
+ styleOverrides: { tooltip: { fontSize: '0.75rem', borderRadius: 8, padding: '6px 10px' } }
252
+ },
253
+ MuiLinearProgress: {
254
+ styleOverrides: { root: { borderRadius: 999 }, bar: { borderRadius: 999 } }
255
+ }
256
+ }
257
+ }, overrides);
258
+ }
259
+ /** Built once at module scope: a theme rebuilt per render remounts every style. */
260
+ export const visinTheme = createVisinTheme();
261
+ //# sourceMappingURL=createVisinTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createVisinTheme.js","sourceRoot":"","sources":["../../src/theme/createVisinTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiC,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAW5F,+EAA+E;AAC/E,MAAM,KAAK,GAAG,6BAA6B,CAAC;AAE5C;;;;GAIG;AACH,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,MAAM,UAAU,GAAG,4FAA4F,CAAC;AAEhH,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,mDAAmD;IACnD,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU;IACpC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU;IACvC,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO;CACjC,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;IAC1F,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5B,OAAO,E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,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE;aAC3F;YACD,iBAAiB,EAAE;gBACjB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE;aAC5E;SACF;KACF,EACD,SAAS,CACV,CAAC;AACJ,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { brand, schemes, schemeCssVars, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint } from './tokens';
2
+ export type { ColorSchemeName } from './tokens';
3
+ export { livePalette } from './livePalette';
4
+ export { chartSeries } from './chart';
5
+ export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY } from './createVisinTheme';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,GAAG,EACH,OAAO,EACP,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,IAAI,EACL,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { brand, schemes, schemeCssVars, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint } from './tokens';
2
+ export { livePalette } from './livePalette';
3
+ export { chartSeries } from './chart';
4
+ export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY } from './createVisinTheme';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,GAAG,EACH,OAAO,EACP,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,IAAI,EACL,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Theme } from '@mui/material/styles';
2
+ /**
3
+ * The palette as values that follow light and dark: CSS variables under the
4
+ * Visin theme, plain colours under a theme without them (a test's default).
5
+ *
6
+ * `theme.palette` holds the light values in both schemes. Anything built from
7
+ * this must mix colours in CSS — `tint`, `theme.alpha` — not with MUI's
8
+ * `alpha()`, which cannot parse a variable.
9
+ */
10
+ export declare const livePalette: (theme: Theme) => Omit<import("@mui/material").Palette & import("@mui/material").CssVarsPalette, "mode" | "colorScheme" | "contrastThreshold" | "tonalOffset" | "getContrastText" | "augmentColor">;
11
+ //# sourceMappingURL=livePalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"livePalette.d.ts","sourceRoot":"","sources":["../../src/theme/livePalette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,sLAAkC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The palette as values that follow light and dark: CSS variables under the
3
+ * Visin theme, plain colours under a theme without them (a test's default).
4
+ *
5
+ * `theme.palette` holds the light values in both schemes. Anything built from
6
+ * this must mix colours in CSS — `tint`, `theme.alpha` — not with MUI's
7
+ * `alpha()`, which cannot parse a variable.
8
+ */
9
+ export const livePalette = (theme) => (theme.vars ?? theme).palette;
10
+ //# sourceMappingURL=livePalette.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"livePalette.js","sourceRoot":"","sources":["../../src/theme/livePalette.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC"}
@@ -0,0 +1,224 @@
1
+ /**
2
+ * The colours Visin draws with, per colour scheme, in one place.
3
+ *
4
+ * Pages never read the raw values: they use `ink`, `surface`, `glass` and
5
+ * `chrome`, which point at CSS variables the theme writes for both schemes, so
6
+ * a page that says `color: ink.muted` follows the switch without knowing there
7
+ * is one. The raw values are here for the contrast tests and for the few places
8
+ * outside a React tree (`theme-color`, the manifest, the offline page).
9
+ *
10
+ * The dark scheme is slate with a little blue in it rather than neutral grey:
11
+ * it keeps the brand's cast, and pure grey behind charts reads as dead.
12
+ */
13
+ /** Primary, per scheme: what can be acted on. Walked lighter for dark, where the light blue fails AA. */
14
+ export declare const brand: {
15
+ readonly light: "#2563eb";
16
+ readonly dark: "#60a5fa";
17
+ };
18
+ export declare const schemes: {
19
+ readonly light: {
20
+ /** Text, darkest to lightest. Slate rather than grey, to sit under the blue. */
21
+ readonly ink: {
22
+ readonly strong: "#0f172a";
23
+ readonly body: "#475569";
24
+ readonly muted: "#5b6779";
25
+ /** Decorative only — under 3:1. Never put words a reader needs in this. */
26
+ readonly faint: "#94a3b8";
27
+ };
28
+ readonly surface: {
29
+ /** A faint blue glow at the top of the page, over `default`. */
30
+ readonly glow: "rgba(37,99,235,0.10)";
31
+ readonly default: "#f6f7fb";
32
+ readonly paper: "#ffffff";
33
+ /** Table heads, inset panels: one step back from `paper`. */
34
+ readonly sunken: "#f8fafc";
35
+ readonly divider: "#e2e8f0";
36
+ /** The edge of the frosted chrome: an opaque divider draws a hard rule across the blur. */
37
+ readonly chromeEdge: "rgba(15,23,42,0.08)";
38
+ /** Hover tint on neutral controls. */
39
+ readonly hover: "rgba(15,23,42,0.05)";
40
+ /** The veil over an image that text has to stay readable on. */
41
+ readonly scrim: "rgba(255,255,255,0.72)";
42
+ };
43
+ readonly glass: {
44
+ readonly background: "rgba(255,255,255,0.88)";
45
+ readonly border: "rgba(15,23,42,0.07)";
46
+ readonly shadow: "rgba(15,23,42,0.30)";
47
+ };
48
+ readonly chrome: {
49
+ readonly background: "rgba(255,255,255,0.72)";
50
+ readonly ink: "#0f172a";
51
+ readonly inkMuted: "#5b6779";
52
+ };
53
+ /** The main action's gradient, blue into indigo; white text clears AA on every stop. */
54
+ readonly accent: {
55
+ readonly start: "#2563eb";
56
+ readonly end: "#4f46e5";
57
+ readonly startHover: "#1d4ed8";
58
+ readonly endHover: "#4338ca";
59
+ };
60
+ /** The browser's own bar, `<meta name="theme-color">`. */
61
+ readonly themeColor: "#f6f7fb";
62
+ };
63
+ readonly dark: {
64
+ readonly ink: {
65
+ readonly strong: "#e6eaf2";
66
+ readonly body: "#b3bccb";
67
+ readonly muted: "#8f9aac";
68
+ readonly faint: "#5b6474";
69
+ };
70
+ readonly surface: {
71
+ readonly glow: "rgba(96,165,250,0.12)";
72
+ readonly default: "#0b0f17";
73
+ readonly paper: "#121826";
74
+ readonly sunken: "#182030";
75
+ readonly divider: "#232b3a";
76
+ readonly chromeEdge: "rgba(148,163,184,0.12)";
77
+ readonly hover: "rgba(255,255,255,0.06)";
78
+ readonly scrim: "rgba(11,15,23,0.72)";
79
+ };
80
+ readonly glass: {
81
+ readonly background: "rgba(18,24,38,0.86)";
82
+ readonly border: "rgba(255,255,255,0.07)";
83
+ readonly shadow: "rgba(0,0,0,0.65)";
84
+ };
85
+ readonly chrome: {
86
+ readonly background: "rgba(13,18,28,0.72)";
87
+ readonly ink: "#e6eaf2";
88
+ readonly inkMuted: "#8f9aac";
89
+ };
90
+ readonly accent: {
91
+ readonly start: "#60a5fa";
92
+ readonly end: "#818cf8";
93
+ readonly startHover: "#93c5fd";
94
+ readonly endHover: "#a5b4fc";
95
+ };
96
+ readonly themeColor: "#0b0f17";
97
+ };
98
+ };
99
+ export type ColorSchemeName = keyof typeof schemes;
100
+ /** One scheme as CSS custom properties. The theme writes these; nothing else should. */
101
+ export declare function schemeCssVars(name: ColorSchemeName): Record<string, string>;
102
+ /** Text, darkest to lightest. Follows light and dark. */
103
+ export declare const ink: {
104
+ readonly strong: string;
105
+ readonly body: string;
106
+ readonly muted: string;
107
+ readonly faint: string;
108
+ };
109
+ /** Page and panel backgrounds. Follows light and dark. */
110
+ export declare const surface: {
111
+ readonly glow: string;
112
+ readonly default: string;
113
+ readonly paper: string;
114
+ readonly sunken: string;
115
+ readonly divider: string;
116
+ readonly chromeEdge: string;
117
+ readonly hover: string;
118
+ readonly scrim: string;
119
+ };
120
+ /** The page behind everything: a glow at the top, fading into `default`. */
121
+ export declare const pageBackground: {
122
+ readonly backgroundColor: string;
123
+ readonly backgroundImage: `radial-gradient(1200px 520px at 50% -160px, ${string}, transparent 70%)`;
124
+ readonly backgroundRepeat: "no-repeat";
125
+ };
126
+ /**
127
+ * A frosted surface that floats over the page: menus, popovers, dialogs, the
128
+ * phone's bottom sheet, cards on the home page. Translucent on purpose, so what
129
+ * is under it shows through as colour rather than being cut out.
130
+ *
131
+ * Not for tables, lists and charts. Blur behind numbers costs legibility and
132
+ * scrolling; those stay on solid `Panel`s.
133
+ */
134
+ export declare const glass: {
135
+ readonly background: "var(--vi-glass-background)";
136
+ readonly backdropFilter: "blur(14px) saturate(160%)";
137
+ readonly WebkitBackdropFilter: "blur(14px) saturate(160%)";
138
+ readonly border: "1px solid var(--vi-glass-border)";
139
+ readonly boxShadow: "0 18px 40px -24px var(--vi-glass-shadow)";
140
+ };
141
+ /**
142
+ * The resting shadow of a solid surface (a `Panel`, a card): enough to lift it
143
+ * off the page, soft enough that a stack of them does not read as clutter.
144
+ */
145
+ export declare const raisedShadow = "0 12px 32px -28px rgba(15,23,42,0.45)";
146
+ /** A surface that rises toward the pointer. `accent` tints the edge and the lifted shadow. */
147
+ export declare const liftOnHover: (accent?: string) => {
148
+ readonly transition: "transform .2s ease, box-shadow .2s ease, border-color .2s ease";
149
+ readonly '&:hover': {
150
+ readonly transform: "translateY(-2px)";
151
+ readonly borderColor: `color-mix(in srgb, ${string} 35%, transparent)`;
152
+ readonly boxShadow: `0 22px 44px -26px color-mix(in srgb, ${string} 80%, transparent)`;
153
+ };
154
+ readonly '@media (prefers-reduced-motion: reduce)': {
155
+ readonly transition: "none";
156
+ readonly '&:hover': {
157
+ readonly transform: "none";
158
+ };
159
+ };
160
+ };
161
+ /** A glass card that responds to being pointed at. `accent` tints the lifted shadow. */
162
+ export declare const glassInteractive: (accent?: string) => {
163
+ readonly transition: "transform .2s ease, box-shadow .2s ease, border-color .2s ease";
164
+ readonly '&:hover': {
165
+ readonly transform: "translateY(-2px)";
166
+ readonly borderColor: `color-mix(in srgb, ${string} 35%, transparent)`;
167
+ readonly boxShadow: `0 22px 44px -26px color-mix(in srgb, ${string} 80%, transparent)`;
168
+ };
169
+ readonly '@media (prefers-reduced-motion: reduce)': {
170
+ readonly transition: "none";
171
+ readonly '&:hover': {
172
+ readonly transform: "none";
173
+ };
174
+ };
175
+ readonly background: "var(--vi-glass-background)";
176
+ readonly backdropFilter: "blur(14px) saturate(160%)";
177
+ readonly WebkitBackdropFilter: "blur(14px) saturate(160%)";
178
+ readonly border: "1px solid var(--vi-glass-border)";
179
+ readonly boxShadow: "0 18px 40px -24px var(--vi-glass-shadow)";
180
+ };
181
+ /**
182
+ * The one action a page is for, where a plain filled button undersells it: a
183
+ * blue-to-indigo gradient with a glow. At most one per page.
184
+ */
185
+ export declare const mainAction: {
186
+ readonly backgroundImage: `linear-gradient(135deg, ${string} 0%, ${string} 100%)`;
187
+ readonly color: "var(--mui-palette-primary-contrastText)";
188
+ readonly boxShadow: "0 10px 28px -12px color-mix(in srgb, var(--mui-palette-primary-main) 85%, transparent)";
189
+ readonly '&:hover': {
190
+ readonly backgroundImage: `linear-gradient(135deg, ${string} 0%, ${string} 100%)`;
191
+ readonly boxShadow: "0 12px 32px -12px color-mix(in srgb, var(--mui-palette-primary-main) 95%, transparent)";
192
+ };
193
+ };
194
+ /**
195
+ * The frosted chrome around the content: the navigation rail, the app bar and
196
+ * the phone's tab bar. One tint and one blur for all three, because they meet
197
+ * at a corner, and two slightly different tints show as a step there.
198
+ */
199
+ export declare const chrome: {
200
+ readonly background: string;
201
+ readonly ink: string;
202
+ readonly inkMuted: string;
203
+ readonly edge: string;
204
+ readonly surface: {
205
+ readonly background: string;
206
+ readonly backdropFilter: "blur(16px) saturate(165%)";
207
+ readonly WebkitBackdropFilter: "blur(16px) saturate(165%)";
208
+ };
209
+ };
210
+ /**
211
+ * Controls laid over a photo or a frame: a viewer's buttons, a caption chip.
212
+ * The same in both schemes, because the picture under them is.
213
+ */
214
+ export declare const onImage: {
215
+ /** Behind a frame being judged: dark and neutral, so the picture's own colours read true. */
216
+ readonly backdrop: "#0b0f19";
217
+ readonly ink: "#ffffff";
218
+ readonly scrim: "rgba(0,0,0,0.5)";
219
+ readonly scrimStrong: "rgba(0,0,0,0.7)";
220
+ readonly chip: "rgba(255,255,255,0.2)";
221
+ };
222
+ /** `color` at `opacity` (0–1). Unlike MUI's `alpha()`, works on a CSS variable as well as a hex. */
223
+ export declare const tint: (color: string, opacity: number) => string;
224
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,yGAAyG;AACzG,eAAO,MAAM,KAAK;;;CAGR,CAAC;AAEX,eAAO,MAAM,OAAO;;QAEhB,gFAAgF;;;;;YAK9E,2EAA2E;;;;YAI3E,gEAAgE;;;;YAIhE,6DAA6D;;;YAG7D,2FAA2F;;YAE3F,sCAAsC;;YAEtC,gEAAgE;;;;;;;;;;;;;QAelE,wFAAwF;;;;;;;QAOxF,0DAA0D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCpD,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,OAAO,CAAC;AAcnD,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAS3E;AAED,yDAAyD;AACzD,eAAO,MAAM,GAAG;;;;;CAAiC,CAAC;AAElD,0DAA0D;AAC1D,eAAO,MAAM,OAAO;;;;;;;;;CAAyC,CAAC;AAK9D,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK;;;;;;CAMR,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,YAAY,0CAA0C,CAAC;AAEpE,8FAA8F;AAC9F,eAAO,MAAM,WAAW,GAAI,eAA0C;;;;;;;;;;;;;CASzD,CAAC;AAEd,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM;;;;;;;;;;;;;;;;;;CAAoD,CAAC;AAErG;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAUT,C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