chesai-ui 0.16.2 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chesai-ui.css +1 -1
- package/dist/components/charts/bar-chart.d.ts +3 -1
- package/dist/components/charts/bar-chart.mjs +87 -74
- package/dist/components/charts/chart-utils.d.ts +7 -0
- package/dist/components/charts/chart-utils.mjs +24 -7
- package/dist/components/charts/heatmap-chart.d.ts +25 -0
- package/dist/components/playlist-studio/elements.d.ts +10 -2
- package/dist/components/playlist-studio/elements.mjs +289 -120
- package/dist/components/playlist-studio/index.d.ts +1 -0
- package/dist/components/playlist-studio/item-renderer.d.ts +2 -1
- package/dist/components/playlist-studio/item-renderer.mjs +66 -55
- package/dist/components/playlist-studio/player.d.ts +3 -1
- package/dist/components/playlist-studio/player.mjs +438 -71
- package/dist/components/playlist-studio/preload-context.d.ts +8 -0
- package/dist/components/playlist-studio/preload-context.mjs +6 -0
- package/dist/components/playlist-studio/types.d.ts +3 -0
- package/dist/components/textarea/textarea-styles.mjs +4 -4
- package/dist/components/textarea/use-textarea.d.ts +2 -2
- package/dist/components/textarea/use-textarea.mjs +72 -69
- package/dist/context/ChesaiProvider.d.ts +5 -1
- package/dist/context/ChesaiProvider.mjs +28 -24
- package/dist/context/ThemeProvider.d.ts +5 -1
- package/dist/context/ThemeProvider.mjs +130 -112
- package/dist/context/heatmap-chart.d.ts +25 -0
- package/dist/index.mjs +67 -63
- package/dist/utils/theme-generator.d.ts +1 -1
- package/dist/utils/theme-generator.mjs +39 -39
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface HeatmapDataPoint {
|
|
2
|
+
x: string;
|
|
3
|
+
y: string;
|
|
4
|
+
value: number;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface HeatmapChartProps {
|
|
8
|
+
data: HeatmapDataPoint[];
|
|
9
|
+
/** Explicit sequence of columns along the X-axis */
|
|
10
|
+
xLabels: string[];
|
|
11
|
+
/** Explicit sequence of rows along the Y-axis */
|
|
12
|
+
yLabels: string[];
|
|
13
|
+
/** Theme palette coloring (maps to container colors) */
|
|
14
|
+
variant?: "primary" | "secondary" | "tertiary" | "error";
|
|
15
|
+
/** Cell corner rounding */
|
|
16
|
+
shape?: "full" | "minimal" | "sharp";
|
|
17
|
+
height?: number | string;
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Custom formatter function for values displayed inside tooltips */
|
|
20
|
+
valueFormatter?: (value: number) => string;
|
|
21
|
+
/** Color overrides. If empty, dynamically binds to MD3 color theme variables. */
|
|
22
|
+
colorScale?: string[];
|
|
23
|
+
showLabels?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const HeatmapChart: ({ data, xLabels, yLabels, variant, shape, height, className, valueFormatter, showLabels, }: HeatmapChartProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import "react-medium-image-zoom/dist/styles.css";
|
|
|
4
4
|
import { default as p } from "./components/device/index.mjs";
|
|
5
5
|
import { default as i } from "./components/material3-carousel/Carousel.mjs";
|
|
6
6
|
import { default as l } from "./components/material3-carousel/CarouselItem.mjs";
|
|
7
|
-
import { Popover as
|
|
7
|
+
import { Popover as u, PopoverAnchor as f, PopoverArrow as d, PopoverClose as s, PopoverContent as S, PopoverPortal as c, PopoverTrigger as C } from "./components/popover/index.mjs";
|
|
8
8
|
import { Accordion as T } from "./components/accordion/index.mjs";
|
|
9
9
|
import { Alert as D, AlertAction as g, AlertContent as P, AlertDescription as h, AlertIcon as F, AlertTitle as B } from "./components/alert/index.mjs";
|
|
10
10
|
import { AppBar as A, useAppBarContext as w } from "./components/appbar/index.mjs";
|
|
@@ -18,7 +18,7 @@ import { BouncyBox as j } from "./components/bouncy-box/index.mjs";
|
|
|
18
18
|
import { Breadcrumb as J, BreadcrumbEllipsis as U, BreadcrumbItem as X, BreadcrumbLink as Y, BreadcrumbList as Z, BreadcrumbPage as $, BreadcrumbRoot as oo, BreadcrumbSeparator as ro } from "./components/breadcrumb/index.mjs";
|
|
19
19
|
import { Button as to, buttonVariants as ao } from "./components/button/index.mjs";
|
|
20
20
|
import { ButtonGroup as mo } from "./components/button-group/index.mjs";
|
|
21
|
-
import { Card as no, CardGroup as lo, cardVariants as
|
|
21
|
+
import { Card as no, CardGroup as lo, cardVariants as xo } from "./components/card/index.mjs";
|
|
22
22
|
import { AreaChart as fo } from "./components/charts/area-chart.mjs";
|
|
23
23
|
import { BarChart as So } from "./components/charts/bar-chart.mjs";
|
|
24
24
|
import { LineChart as Co } from "./components/charts/line-chart.mjs";
|
|
@@ -39,7 +39,7 @@ import { advancedFilterFn as or, advancedFilterFn as rr } from "./components/dat
|
|
|
39
39
|
import { DataTableContext as tr } from "./components/data-table/context.mjs";
|
|
40
40
|
import { DataTable as pr } from "./components/data-table/index.mjs";
|
|
41
41
|
import { dateInputSlots as ir, dateInputStyles as nr, getDateInputSlotClassNames as lr } from "./components/date-input/date-input-styles.mjs";
|
|
42
|
-
import { DateInputGroup as
|
|
42
|
+
import { DateInputGroup as ur } from "./components/date-input/date-input-group.mjs";
|
|
43
43
|
import { DateInputSegment as dr } from "./components/date-input/date-input-segment.mjs";
|
|
44
44
|
import { DateInputField as Sr } from "./components/date-input/date-input-field.mjs";
|
|
45
45
|
import { useDateInput as Cr } from "./components/date-input/use-date-input.mjs";
|
|
@@ -55,7 +55,7 @@ import { DatePicker as Er } from "./components/date-picker/date-picker.mjs";
|
|
|
55
55
|
import { InfiniteCalendar as Hr } from "./components/date-picker/infinite-calendar.mjs";
|
|
56
56
|
import { Dialog as zr, DialogBody as Qr, DialogClose as Kr, DialogContent as Wr, DialogDescription as _r, DialogFooter as jr, DialogHeader as qr, DialogTitle as Jr, DialogTrigger as Ur } from "./components/dialog/index.mjs";
|
|
57
57
|
import { Divider as Yr } from "./components/divider/index.mjs";
|
|
58
|
-
import { DropdownMenu as $r, DropdownMenuCheckboxItem as oe, DropdownMenuContent as re, DropdownMenuGroup as ee, DropdownMenuItem as te, DropdownMenuLabel as ae, DropdownMenuPortal as pe, DropdownMenuRadioGroup as me, DropdownMenuRadioItem as ie, DropdownMenuSeparator as ne, DropdownMenuShortcut as le, DropdownMenuSub as
|
|
58
|
+
import { DropdownMenu as $r, DropdownMenuCheckboxItem as oe, DropdownMenuContent as re, DropdownMenuGroup as ee, DropdownMenuItem as te, DropdownMenuLabel as ae, DropdownMenuPortal as pe, DropdownMenuRadioGroup as me, DropdownMenuRadioItem as ie, DropdownMenuSeparator as ne, DropdownMenuShortcut as le, DropdownMenuSub as xe, DropdownMenuSubContent as ue, DropdownMenuSubTrigger as fe, DropdownMenuTrigger as de } from "./components/dropdown-menu/index.mjs";
|
|
59
59
|
import { Dropzone as Se, VirtualDropzone as ce } from "./components/dropzone/index.mjs";
|
|
60
60
|
import { ElasticScrollArea as be } from "./components/elastic-scroll-area/index.mjs";
|
|
61
61
|
import { EmptyState as Ie } from "./components/empty-state/index.mjs";
|
|
@@ -71,7 +71,7 @@ import { inputWrapperVariants as Ue } from "./components/input/input-styles.mjs"
|
|
|
71
71
|
import { Input as Ye } from "./components/input/index.mjs";
|
|
72
72
|
import { InputGroup as $e, InputGroupAddon as ot, InputGroupInput as rt, InputGroupText as et, InputGroupTextarea as tt } from "./components/input-group/index.mjs";
|
|
73
73
|
import { InstallCommand as pt } from "./components/install-command/index.mjs";
|
|
74
|
-
import { Item as it, ItemActions as nt, ItemContent as lt, ItemDescription as
|
|
74
|
+
import { Item as it, ItemActions as nt, ItemContent as lt, ItemDescription as xt, ItemExpandedContent as ut, ItemFooter as ft, ItemGroup as dt, ItemHeader as st, ItemMedia as St, ItemSeparator as ct, ItemTitle as Ct, useItem as bt } from "./components/item/index.mjs";
|
|
75
75
|
import { Kbd as It } from "./components/kbd/index.mjs";
|
|
76
76
|
import { DismissibleContext as gt, LayoutRouter as Pt, useLayoutRouter as ht } from "./components/layout-router/index.mjs";
|
|
77
77
|
import { LayoutDirectionToggle as Bt } from "./components/layout-toggle/index.mjs";
|
|
@@ -91,7 +91,7 @@ import { Menubar as ra } from "./components/menubar/index.mjs";
|
|
|
91
91
|
import { MultiSelect as ta } from "./components/multi-select/index.mjs";
|
|
92
92
|
import { NavigationMenu as pa, navigationMenuTriggerStyle as ma } from "./components/navigation-menu/index.mjs";
|
|
93
93
|
import { NavigationRail as na, useNavigationRail as la } from "./components/navigation-rail/index.mjs";
|
|
94
|
-
import { NumberInput as
|
|
94
|
+
import { NumberInput as ua } from "./components/number-input/index.mjs";
|
|
95
95
|
import { InputOTP as da, InputOTPGroup as sa, InputOTPSeparator as Sa, InputOTPSlot as ca } from "./components/otp-field/index.mjs";
|
|
96
96
|
import { CircularProgress as ba } from "./components/progress/circular-progress.mjs";
|
|
97
97
|
import { LinearProgress as Ia } from "./components/progress/linear-progress.mjs";
|
|
@@ -106,7 +106,7 @@ import { Separator as ja } from "./components/separator/index.mjs";
|
|
|
106
106
|
import { ShallowPage as Ja, ShallowRoute as Ua, ShallowRouter as Xa, ShallowSwitch as Ya, useRouter as Za, useRouterOptions as $a } from "./components/shallow-router/index.mjs";
|
|
107
107
|
import { SHAPE_PATHS as rp } from "./components/shape/paths.mjs";
|
|
108
108
|
import { ShapedBadge as tp, ShapedButton as ap, ShapedContainer as pp, ShapedIcon as mp, ShapedIconButton as ip, ShapedImage as np } from "./components/shape/shaped-components.mjs";
|
|
109
|
-
import { Shape as
|
|
109
|
+
import { Shape as xp } from "./components/shape/index.mjs";
|
|
110
110
|
import { Sheet as fp, SheetClose as dp, SheetContent as sp, SheetDescription as Sp, SheetFooter as cp, SheetGrabber as Cp, SheetHeader as bp, SheetTitle as Tp, SheetTrigger as Ip } from "./components/sheet/index.mjs";
|
|
111
111
|
import { Sidebar as gp, SidebarProvider as Pp, useSidebar as hp } from "./components/sidebar/index.mjs";
|
|
112
112
|
import { Skeleton as Bp } from "./components/skeleton/index.mjs";
|
|
@@ -121,7 +121,7 @@ import { Table as jp, TableCell as qp, TableHead as Jp, TableRoot as Up, TableRo
|
|
|
121
121
|
import { Tabs as am, useTabs as pm } from "./components/tabs/index.mjs";
|
|
122
122
|
import { Taskbar as im } from "./components/taskbar/index.mjs";
|
|
123
123
|
import { Textarea as lm } from "./components/textarea/index.mjs";
|
|
124
|
-
import { FontPicker as
|
|
124
|
+
import { FontPicker as um } from "./components/theme-controls/FontPicker.mjs";
|
|
125
125
|
import { Timeline as dm } from "./components/timeline/index.mjs";
|
|
126
126
|
import { TimePicker as Sm } from "./components/time-picker/index.mjs";
|
|
127
127
|
import { toast as Cm } from "sonner";
|
|
@@ -141,26 +141,27 @@ import { useStudioStore as qm } from "./components/website-studio/store.mjs";
|
|
|
141
141
|
import { WebsiteStudio as Um } from "./components/website-studio/index.mjs";
|
|
142
142
|
import { usePlayhead as Ym } from "./components/playlist-studio/use-playhead.mjs";
|
|
143
143
|
import { PlaylistPlayer as $m } from "./components/playlist-studio/player.mjs";
|
|
144
|
-
import {
|
|
145
|
-
import {
|
|
146
|
-
import {
|
|
147
|
-
import {
|
|
148
|
-
import {
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
152
|
-
import {
|
|
153
|
-
import {
|
|
154
|
-
import {
|
|
155
|
-
import {
|
|
156
|
-
import {
|
|
157
|
-
import {
|
|
158
|
-
import {
|
|
159
|
-
import {
|
|
160
|
-
import {
|
|
144
|
+
import { PreloadContext as ri, usePreload as ei } from "./components/playlist-studio/preload-context.mjs";
|
|
145
|
+
import { PlaylistAudio as ai, PlaylistHtml as pi, PlaylistImage as mi, PlaylistVideo as ii, defaultPlaylistRegistry as ni } from "./components/playlist-studio/elements.mjs";
|
|
146
|
+
import { PlaylistStudio as xi } from "./components/playlist-studio/index.mjs";
|
|
147
|
+
import { ActionSheetProvider as fi, useActionSheet as di } from "./context/ActionSheetProvider.mjs";
|
|
148
|
+
import { ChesaiProvider as Si } from "./context/ChesaiProvider.mjs";
|
|
149
|
+
import { DialogProvider as Ci, useDialog as bi } from "./context/DialogProvider.mjs";
|
|
150
|
+
import { LayoutProvider as Ii, useLayout as Di } from "./context/layout-context.mjs";
|
|
151
|
+
import { ThemeProvider as Pi, useTheme as hi, useThemeTransition as Fi } from "./context/ThemeProvider.mjs";
|
|
152
|
+
import { useCalendar as Mi } from "./hooks/use-calender.mjs";
|
|
153
|
+
import { useTimePicker as wi } from "./hooks/use-time-picker.mjs";
|
|
154
|
+
import { useAppBar as Ri } from "./hooks/useAppBar.mjs";
|
|
155
|
+
import { useCapacitorBackButton as Gi } from "./hooks/useCapacitorBackButton.mjs";
|
|
156
|
+
import { useFlubber as Vi } from "./hooks/useFlubber.mjs";
|
|
157
|
+
import { useMaterialRipple as Ei } from "./hooks/useMaterialRipple.mjs";
|
|
158
|
+
import { useWindowSizeClass as Hi } from "./hooks/useWindowSizeClass.mjs";
|
|
159
|
+
import { PRESET_FONTS as zi, loadGoogleFont as Qi } from "./utils/font-loader.mjs";
|
|
160
|
+
import { CSS_MAPPING as Wi, applyThemeVariables as _i, clearThemeVariables as ji } from "./utils/theme-generator.mjs";
|
|
161
|
+
import { chesaiColors as Ji } from "./utils/tailwind-preset.mjs";
|
|
161
162
|
export {
|
|
162
163
|
T as Accordion,
|
|
163
|
-
|
|
164
|
+
fi as ActionSheetProvider,
|
|
164
165
|
D as Alert,
|
|
165
166
|
g as AlertAction,
|
|
166
167
|
P as AlertContent,
|
|
@@ -186,7 +187,7 @@ export {
|
|
|
186
187
|
ro as BreadcrumbSeparator,
|
|
187
188
|
to as Button,
|
|
188
189
|
mo as ButtonGroup,
|
|
189
|
-
|
|
190
|
+
Wi as CSS_MAPPING,
|
|
190
191
|
Vr as Calendar,
|
|
191
192
|
no as Card,
|
|
192
193
|
lo as CardGroup,
|
|
@@ -194,7 +195,7 @@ export {
|
|
|
194
195
|
l as CarouselItem,
|
|
195
196
|
Do as Checkbox,
|
|
196
197
|
Jt as ChesaiMap,
|
|
197
|
-
|
|
198
|
+
Si as ChesaiProvider,
|
|
198
199
|
Po as Chip,
|
|
199
200
|
ba as CircularProgress,
|
|
200
201
|
Fo as CodeEditor,
|
|
@@ -221,7 +222,7 @@ export {
|
|
|
221
222
|
Xo as DataTableToolbar,
|
|
222
223
|
Fr as DateInput,
|
|
223
224
|
Sr as DateInputField,
|
|
224
|
-
|
|
225
|
+
ur as DateInputGroup,
|
|
225
226
|
dr as DateInputSegment,
|
|
226
227
|
Er as DatePicker,
|
|
227
228
|
p as DeviceFrame,
|
|
@@ -232,7 +233,7 @@ export {
|
|
|
232
233
|
_r as DialogDescription,
|
|
233
234
|
jr as DialogFooter,
|
|
234
235
|
qr as DialogHeader,
|
|
235
|
-
|
|
236
|
+
Ci as DialogProvider,
|
|
236
237
|
Jr as DialogTitle,
|
|
237
238
|
Ur as DialogTrigger,
|
|
238
239
|
gt as DismissibleContext,
|
|
@@ -248,8 +249,8 @@ export {
|
|
|
248
249
|
ie as DropdownMenuRadioItem,
|
|
249
250
|
ne as DropdownMenuSeparator,
|
|
250
251
|
le as DropdownMenuShortcut,
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
xe as DropdownMenuSub,
|
|
253
|
+
ue as DropdownMenuSubContent,
|
|
253
254
|
fe as DropdownMenuSubTrigger,
|
|
254
255
|
de as DropdownMenuTrigger,
|
|
255
256
|
Se as Dropzone,
|
|
@@ -268,7 +269,7 @@ export {
|
|
|
268
269
|
At as Flex,
|
|
269
270
|
wt as FlexItem,
|
|
270
271
|
Le as FloatingPanel,
|
|
271
|
-
|
|
272
|
+
um as FontPicker,
|
|
272
273
|
Ee as FullCalendar,
|
|
273
274
|
Ne as FullCalendarViewDispatcher,
|
|
274
275
|
Rt as Grid,
|
|
@@ -291,8 +292,8 @@ export {
|
|
|
291
292
|
it as Item,
|
|
292
293
|
nt as ItemActions,
|
|
293
294
|
lt as ItemContent,
|
|
294
|
-
|
|
295
|
-
|
|
295
|
+
xt as ItemDescription,
|
|
296
|
+
ut as ItemExpandedContent,
|
|
296
297
|
ft as ItemFooter,
|
|
297
298
|
dt as ItemGroup,
|
|
298
299
|
st as ItemHeader,
|
|
@@ -303,7 +304,7 @@ export {
|
|
|
303
304
|
N as KanbanBoard,
|
|
304
305
|
It as Kbd,
|
|
305
306
|
Bt as LayoutDirectionToggle,
|
|
306
|
-
|
|
307
|
+
Ii as LayoutProvider,
|
|
307
308
|
Pt as LayoutRouter,
|
|
308
309
|
Qt as LexicalEditor,
|
|
309
310
|
Co as LineChart,
|
|
@@ -317,21 +318,23 @@ export {
|
|
|
317
318
|
ta as MultiSelect,
|
|
318
319
|
pa as NavigationMenu,
|
|
319
320
|
na as NavigationRail,
|
|
320
|
-
|
|
321
|
-
|
|
321
|
+
ua as NumberInput,
|
|
322
|
+
zi as PRESET_FONTS,
|
|
322
323
|
To as PieChart,
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
ai as PlaylistAudio,
|
|
325
|
+
pi as PlaylistHtml,
|
|
326
|
+
mi as PlaylistImage,
|
|
325
327
|
$m as PlaylistPlayer,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
328
|
+
xi as PlaylistStudio,
|
|
329
|
+
ii as PlaylistVideo,
|
|
330
|
+
u as Popover,
|
|
329
331
|
f as PopoverAnchor,
|
|
330
332
|
d as PopoverArrow,
|
|
331
333
|
s as PopoverClose,
|
|
332
334
|
S as PopoverContent,
|
|
333
335
|
c as PopoverPortal,
|
|
334
336
|
C as PopoverTrigger,
|
|
337
|
+
ri as PreloadContext,
|
|
335
338
|
He as PrintHeader,
|
|
336
339
|
Oe as PrintPagesLayout,
|
|
337
340
|
ga as PullToRefresh,
|
|
@@ -356,7 +359,7 @@ export {
|
|
|
356
359
|
Ua as ShallowRoute,
|
|
357
360
|
Xa as ShallowRouter,
|
|
358
361
|
Ya as ShallowSwitch,
|
|
359
|
-
|
|
362
|
+
xp as Shape,
|
|
360
363
|
tp as ShapedBadge,
|
|
361
364
|
ap as ShapedButton,
|
|
362
365
|
pp as ShapedContainer,
|
|
@@ -390,7 +393,7 @@ export {
|
|
|
390
393
|
am as Tabs,
|
|
391
394
|
im as Taskbar,
|
|
392
395
|
lm as Textarea,
|
|
393
|
-
|
|
396
|
+
Pi as ThemeProvider,
|
|
394
397
|
Mr as TimeInput,
|
|
395
398
|
Sm as TimePicker,
|
|
396
399
|
dm as Timeline,
|
|
@@ -409,21 +412,21 @@ export {
|
|
|
409
412
|
Ot as VirtualMasonry,
|
|
410
413
|
Um as WebsiteStudio,
|
|
411
414
|
or as advancedFilterFn,
|
|
412
|
-
|
|
415
|
+
_i as applyThemeVariables,
|
|
413
416
|
ao as buttonVariants,
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
+
xo as cardVariants,
|
|
418
|
+
Ji as chesaiColors,
|
|
419
|
+
ji as clearThemeVariables,
|
|
417
420
|
Ep as createStackNavigator,
|
|
418
421
|
ir as dateInputSlots,
|
|
419
422
|
nr as dateInputStyles,
|
|
420
423
|
Km as defaultActions,
|
|
421
|
-
|
|
424
|
+
ni as defaultPlaylistRegistry,
|
|
422
425
|
Dr as formatDuration,
|
|
423
426
|
lr as getDateInputSlotClassNames,
|
|
424
427
|
Ke as iconButtonVariants,
|
|
425
428
|
Ue as inputWrapperVariants,
|
|
426
|
-
|
|
429
|
+
Qi as loadGoogleFont,
|
|
427
430
|
ma as navigationMenuTriggerStyle,
|
|
428
431
|
rr as numericFilterFn,
|
|
429
432
|
gr as parseDuration,
|
|
@@ -433,28 +436,29 @@ export {
|
|
|
433
436
|
om as thVariants,
|
|
434
437
|
Cm as toast,
|
|
435
438
|
rm as trVariants,
|
|
436
|
-
|
|
437
|
-
|
|
439
|
+
di as useActionSheet,
|
|
440
|
+
Ri as useAppBar,
|
|
438
441
|
w as useAppBarContext,
|
|
439
|
-
|
|
440
|
-
|
|
442
|
+
Mi as useCalendar,
|
|
443
|
+
Gi as useCapacitorBackButton,
|
|
441
444
|
Cr as useDateInput,
|
|
442
|
-
|
|
445
|
+
bi as useDialog,
|
|
443
446
|
Pr as useDurationInput,
|
|
444
447
|
Np as useExternalStackState,
|
|
445
448
|
Fe as useFABMenu,
|
|
446
449
|
ve as useField,
|
|
447
450
|
Ve as useFloatingPanel,
|
|
448
|
-
|
|
451
|
+
Vi as useFlubber,
|
|
449
452
|
Lm as useGlobalViewTransitions,
|
|
450
453
|
bt as useItem,
|
|
451
|
-
|
|
454
|
+
Di as useLayout,
|
|
452
455
|
ht as useLayoutRouter,
|
|
453
456
|
Yt as useMap,
|
|
454
|
-
|
|
457
|
+
Ei as useMaterialRipple,
|
|
455
458
|
Hp as useNavigation,
|
|
456
459
|
la as useNavigationRail,
|
|
457
460
|
Ym as usePlayhead,
|
|
461
|
+
ei as usePreload,
|
|
458
462
|
La as useResizableState,
|
|
459
463
|
Op as useRoute,
|
|
460
464
|
Za as useRouter,
|
|
@@ -467,11 +471,11 @@ export {
|
|
|
467
471
|
em as useTableContext,
|
|
468
472
|
pm as useTabs,
|
|
469
473
|
Lp as useTanStackRouterAdapter,
|
|
470
|
-
|
|
471
|
-
|
|
474
|
+
hi as useTheme,
|
|
475
|
+
Fi as useThemeTransition,
|
|
472
476
|
Tr as useTimeInput,
|
|
473
|
-
|
|
477
|
+
wi as useTimePicker,
|
|
474
478
|
Bm as useTooltip,
|
|
475
479
|
vm as useViewTransition,
|
|
476
|
-
|
|
480
|
+
Hi as useWindowSizeClass
|
|
477
481
|
};
|
|
@@ -41,7 +41,7 @@ export type ThemeOverrides = Partial<Record<ThemeColorKey, string>>;
|
|
|
41
41
|
/**
|
|
42
42
|
* Generates an MD3 Palette from a hex color AND/OR applies manual overrides.
|
|
43
43
|
*/
|
|
44
|
-
export declare function applyThemeVariables(seedColorHex: string | null, isDark: boolean, contrast: 'standard' | 'medium' | 'high', overrides?: ThemeOverrides): void;
|
|
44
|
+
export declare function applyThemeVariables(seedColorHex: string | null, isDark: boolean, contrast: 'standard' | 'medium' | 'high', overrides?: ThemeOverrides, colorMatch?: boolean): void;
|
|
45
45
|
/**
|
|
46
46
|
* Removes dynamically injected theme variables.
|
|
47
47
|
*/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Hct as b, argbFromHex as g, SchemeTonalSpot as
|
|
2
|
-
function u(
|
|
3
|
-
return `${
|
|
1
|
+
import { Hct as b, argbFromHex as g, SchemeContent as S, SchemeTonalSpot as T, MaterialDynamicColors as C, TonalPalette as E, redFromArgb as A, greenFromArgb as P, blueFromArgb as w } from "@material/material-color-utilities";
|
|
2
|
+
function u(n) {
|
|
3
|
+
return `${A(n)} ${P(n)} ${w(n)}`;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
5
|
+
function V(n) {
|
|
6
|
+
if (n.startsWith("#"))
|
|
7
7
|
try {
|
|
8
|
-
const
|
|
9
|
-
return u(
|
|
8
|
+
const t = g(n);
|
|
9
|
+
return u(t);
|
|
10
10
|
} catch {
|
|
11
|
-
return
|
|
11
|
+
return n;
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return n.replace(/^rgb\((.+)\)$/, "$1").replace(/,/g, " ");
|
|
14
14
|
}
|
|
15
15
|
const s = {
|
|
16
16
|
primary: "primary",
|
|
@@ -49,62 +49,62 @@ const s = {
|
|
|
49
49
|
surfaceContainer: "surface-container",
|
|
50
50
|
surfaceContainerHigh: "surface-container-high",
|
|
51
51
|
surfaceContainerHighest: "surface-container-highest"
|
|
52
|
-
},
|
|
52
|
+
}, F = {
|
|
53
53
|
primary: { on: "onPrimary", container: "primaryContainer", onContainer: "onPrimaryContainer" },
|
|
54
54
|
secondary: { on: "onSecondary", container: "secondaryContainer", onContainer: "onSecondaryContainer" },
|
|
55
55
|
tertiary: { on: "onTertiary", container: "tertiaryContainer", onContainer: "onTertiaryContainer" },
|
|
56
56
|
error: { on: "onError", container: "errorContainer", onContainer: "onErrorContainer" }
|
|
57
57
|
};
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
58
|
+
function v(n, t, d, m = {}, h = !1) {
|
|
59
|
+
const p = document.documentElement, c = {};
|
|
60
|
+
if (n)
|
|
61
61
|
try {
|
|
62
|
-
const o = b.fromInt(g(
|
|
63
|
-
let
|
|
64
|
-
d === "medium" && (
|
|
65
|
-
const
|
|
62
|
+
const o = b.fromInt(g(n));
|
|
63
|
+
let r = 0;
|
|
64
|
+
d === "medium" && (r = 0.5), d === "high" && (r = 1);
|
|
65
|
+
const a = h ? new S(o, t, r) : new T(o, t, r);
|
|
66
66
|
Object.entries(s).forEach(([f, i]) => {
|
|
67
67
|
const y = C[f];
|
|
68
68
|
if (y && typeof y.getArgb == "function") {
|
|
69
|
-
const l = y.getArgb(
|
|
69
|
+
const l = y.getArgb(a);
|
|
70
70
|
c[`--md-sys-color-${i}`] = `rgb(${u(l)})`;
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
const e = C.primary.getArgb(
|
|
73
|
+
const e = C.primary.getArgb(a);
|
|
74
74
|
c["--md-sys-color-surface-tint"] = `rgb(${u(e)})`;
|
|
75
75
|
} catch (o) {
|
|
76
76
|
console.error("Failed to generate Material Theme from seed color:", o);
|
|
77
77
|
}
|
|
78
|
-
if (Object.entries(
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
78
|
+
if (Object.entries(F).forEach(([o, r]) => {
|
|
79
|
+
const a = m[o];
|
|
80
|
+
if (a && a.startsWith("#"))
|
|
81
81
|
try {
|
|
82
|
-
const e = g(
|
|
83
|
-
m[
|
|
82
|
+
const e = g(a), f = b.fromInt(e), i = E.fromHueAndChroma(f.hue, f.chroma), y = f.tone < 60 ? 100 : 10, l = t ? 30 : 90, $ = t ? 90 : 10;
|
|
83
|
+
m[r.on] || (c[`--md-sys-color-${s[r.on]}`] = `rgb(${u(i.tone(y))})`), m[r.container] || (c[`--md-sys-color-${s[r.container]}`] = `rgb(${u(i.tone(l))})`), m[r.onContainer] || (c[`--md-sys-color-${s[r.onContainer]}`] = `rgb(${u(i.tone($))})`);
|
|
84
84
|
} catch (e) {
|
|
85
85
|
console.warn(`Failed to auto-generate contrast palette for override ${o}:`, e);
|
|
86
86
|
}
|
|
87
|
-
}), Object.entries(m).forEach(([o,
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
c[`--md-sys-color-${
|
|
87
|
+
}), Object.entries(m).forEach(([o, r]) => {
|
|
88
|
+
if (r && s[o]) {
|
|
89
|
+
const a = s[o], e = V(r), i = /^\d{1,3}\s\d{1,3}\s\d{1,3}$/.test(e) ? `rgb(${e})` : e;
|
|
90
|
+
c[`--md-sys-color-${a}`] = i;
|
|
91
91
|
}
|
|
92
|
-
}), !
|
|
93
|
-
|
|
92
|
+
}), !n && Object.keys(m).length === 0) {
|
|
93
|
+
O();
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
Object.entries(c).forEach(([o,
|
|
97
|
-
|
|
96
|
+
Object.entries(c).forEach(([o, r]) => {
|
|
97
|
+
p.style.setProperty(o, r);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
const
|
|
102
|
-
Object.values(s).forEach((
|
|
103
|
-
|
|
104
|
-
}),
|
|
100
|
+
function O() {
|
|
101
|
+
const n = document.documentElement;
|
|
102
|
+
Object.values(s).forEach((t) => {
|
|
103
|
+
n.style.removeProperty(`--md-sys-color-${t}`);
|
|
104
|
+
}), n.style.removeProperty("--md-sys-color-surface-tint");
|
|
105
105
|
}
|
|
106
106
|
export {
|
|
107
107
|
s as CSS_MAPPING,
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
v as applyThemeVariables,
|
|
109
|
+
O as clearThemeVariables
|
|
110
110
|
};
|