@alextheman/components 6.25.1 → 6.25.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  import { TypographyProps } from "@mui/material/Typography";
2
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
2
  import { CollapseProps } from "@mui/material/Collapse";
4
- import * as _$react from "react";
5
3
  import { CSSProperties, ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, Dispatch, ElementType, JSX, Key, MouseEventHandler, ReactNode, Ref, SetStateAction } from "react";
6
4
  import { LinkProps } from "@mui/material/Link";
7
- import Button$1, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
5
+ import MUIButton, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
8
6
  import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
9
7
  import { SwitchProps } from "@mui/material/Switch";
10
8
  import { CreateEnumType, OptionalOnCondition } from "@alextheman/utility";
@@ -18,7 +16,7 @@ import { SvgIconTypeMap } from "@mui/material/SvgIcon";
18
16
 
19
17
  //#region src/components/Artwork.d.ts
20
18
  /** The artwork associated with the package's theme song, _An Interface For You And I_. */
21
- declare function Artwork(): _$react_jsx_runtime0.JSX.Element;
19
+ declare function Artwork(): import("react/jsx-runtime").JSX.Element;
22
20
  //#endregion
23
21
  //#region src/components/CollapsableItem.d.ts
24
22
  interface CollapsableItemProps {
@@ -65,7 +63,7 @@ declare function CollapsableItem({
65
63
  openIcon,
66
64
  closedIcon,
67
65
  useDefaultStyling
68
- }: CollapsableItemProps): _$react_jsx_runtime0.JSX.Element;
66
+ }: CollapsableItemProps): import("react/jsx-runtime").JSX.Element;
69
67
  //#endregion
70
68
  //#region src/components/ExternalLink.d.ts
71
69
  interface ExternalLinkProps extends Omit<LinkProps, "to" | "target" | "rel"> {
@@ -87,7 +85,7 @@ declare function ExternalLink({
87
85
  children,
88
86
  ref,
89
87
  ...linkProps
90
- }: ExternalLinkProps): _$react_jsx_runtime0.JSX.Element;
88
+ }: ExternalLinkProps): import("react/jsx-runtime").JSX.Element;
91
89
  //#endregion
92
90
  //#region src/components/FileInput.d.ts
93
91
  declare const FileType: {
@@ -122,7 +120,7 @@ declare function FileInput({
122
120
  accept,
123
121
  useDropzone,
124
122
  ...buttonProps
125
- }: FileInputProps): _$react_jsx_runtime0.JSX.Element;
123
+ }: FileInputProps): import("react/jsx-runtime").JSX.Element;
126
124
  //#endregion
127
125
  //#region src/components/FileInputList.d.ts
128
126
  interface FileInputListProps extends Omit<FileInputProps, "onFileInput"> {
@@ -137,11 +135,11 @@ declare function FileInputList({
137
135
  setFiles,
138
136
  multiple,
139
137
  ...fileInputProps
140
- }: FileInputListProps): _$react_jsx_runtime0.JSX.Element;
138
+ }: FileInputListProps): import("react/jsx-runtime").JSX.Element;
141
139
  //#endregion
142
140
  //#region src/components/ModeToggle.d.ts
143
141
  /** A toggle to switch between dark mode and light mode. Must be used in a `ModeProvider`. */
144
- declare function ModeToggle(): _$react_jsx_runtime0.JSX.Element;
142
+ declare function ModeToggle(): import("react/jsx-runtime").JSX.Element;
145
143
  //#endregion
146
144
  //#region src/components/Page.d.ts
147
145
  interface PageProps {
@@ -166,7 +164,7 @@ declare function Page({
166
164
  children,
167
165
  tabs,
168
166
  disablePadding
169
- }: PageProps): _$react_jsx_runtime0.JSX.Element;
167
+ }: PageProps): import("react/jsx-runtime").JSX.Element;
170
168
  //#endregion
171
169
  //#region src/groups/QueryBoundary/QueryBoundaryData.d.ts
172
170
  interface QueryBoundaryDataProps<DataType> {
@@ -189,7 +187,7 @@ declare function QueryBoundaryData<DataType>({
189
187
  children,
190
188
  dataParser: propDataParser,
191
189
  loadingComponent
192
- }: QueryBoundaryDataProps<DataType>): _$react_jsx_runtime0.JSX.Element | null;
190
+ }: QueryBoundaryDataProps<DataType>): import("react/jsx-runtime").JSX.Element | null;
193
191
  //#endregion
194
192
  //#region src/groups/QueryBoundary/QueryBoundaryDataMap.d.ts
195
193
  interface QueryBoundaryDataMapBaseProps<ItemType> {
@@ -244,7 +242,7 @@ declare function QueryBoundaryDataMap<ItemType>({
244
242
  dataParser: propDataParser,
245
243
  emptyComponent,
246
244
  strictlyRequireArray
247
- }: QueryBoundaryDataMapProps<ItemType>): _$react_jsx_runtime0.JSX.Element | null;
245
+ }: QueryBoundaryDataMapProps<ItemType>): import("react/jsx-runtime").JSX.Element | null;
248
246
  //#endregion
249
247
  //#region src/groups/QueryBoundary/QueryBoundaryError.d.ts
250
248
  interface QueryBoundaryErrorProps {
@@ -259,7 +257,7 @@ interface QueryBoundaryErrorProps {
259
257
  declare function QueryBoundaryError({
260
258
  children,
261
259
  logError: propsLogError
262
- }: QueryBoundaryErrorProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
260
+ }: QueryBoundaryErrorProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
263
261
  //#endregion
264
262
  //#region src/groups/QueryBoundary/QueryBoundaryNullable.d.ts
265
263
  interface QueryBoundaryNullablePropsWithUndefinedOrNull {
@@ -281,7 +279,7 @@ declare function QueryBoundaryNullable({
281
279
  undefinedComponent,
282
280
  nullComponent,
283
281
  nullableComponent
284
- }: QueryBoundaryNullableProps): _$react_jsx_runtime0.JSX.Element | null;
282
+ }: QueryBoundaryNullableProps): import("react/jsx-runtime").JSX.Element | null;
285
283
  //#endregion
286
284
  //#region src/groups/QueryBoundary/QueryBoundaryFallback.d.ts
287
285
  type QueryBoundaryFallbackProps = Omit<QueryBoundaryErrorProps, "children"> & {
@@ -294,7 +292,7 @@ declare function QueryBoundaryFallback({
294
292
  errorComponent,
295
293
  logError,
296
294
  ...queryBoundaryNullableProps
297
- }: QueryBoundaryFallbackProps): _$react_jsx_runtime0.JSX.Element;
295
+ }: QueryBoundaryFallbackProps): import("react/jsx-runtime").JSX.Element;
298
296
  //#endregion
299
297
  //#region src/groups/QueryBoundary/index.d.ts
300
298
  interface QueryBase {
@@ -384,7 +382,7 @@ declare function QueryBoundaryProvider<DataType>({
384
382
  children,
385
383
  loadingComponent,
386
384
  ...contextProps
387
- }: QueryBoundaryProviderProps<DataType>): _$react_jsx_runtime0.JSX.Element;
385
+ }: QueryBoundaryProviderProps<DataType>): import("react/jsx-runtime").JSX.Element;
388
386
  //#endregion
389
387
  //#region src/groups/QueryBoundary/creators/createBaseQueryBoundary.d.ts
390
388
  interface QueryBase$1<DataType> {
@@ -466,7 +464,7 @@ declare function QueryBoundaryMap<ItemType>({
466
464
  dataParser,
467
465
  itemParser,
468
466
  itemKey
469
- }: QueryBoundaryMapProps<ItemType>): _$react_jsx_runtime0.JSX.Element;
467
+ }: QueryBoundaryMapProps<ItemType>): import("react/jsx-runtime").JSX.Element;
470
468
  //#endregion
471
469
  //#region src/components/QueryBoundaryWrapper.d.ts
472
470
  type QueryBoundaryWrapperProps<DataType> = Omit<QueryBoundaryProviderProps<DataType>, "children" | "logError"> & Omit<QueryBoundaryFallbackProps, "errorComponent"> & Omit<QueryBoundaryDataProps<DataType>, "showOnError" | "onUndefined" | "onNull" | "onNullable">;
@@ -488,7 +486,7 @@ declare function QueryBoundaryWrapper<DataType>({
488
486
  error,
489
487
  data,
490
488
  dataParser
491
- }: QueryBoundaryWrapperProps<DataType>): _$react_jsx_runtime0.JSX.Element;
489
+ }: QueryBoundaryWrapperProps<DataType>): import("react/jsx-runtime").JSX.Element;
492
490
  //#endregion
493
491
  //#region src/components/ReactPlayground.d.ts
494
492
  interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {
@@ -500,7 +498,7 @@ declare function ReactPlayground({
500
498
  code,
501
499
  previewStyles,
502
500
  ...liveProviderProps
503
- }: ReactPlaygroundProps): _$react_jsx_runtime0.JSX.Element;
501
+ }: ReactPlaygroundProps): import("react/jsx-runtime").JSX.Element;
504
502
  //#endregion
505
503
  //#region src/components/SkeletonRow.d.ts
506
504
  interface SkeletonRowProps {
@@ -510,7 +508,7 @@ interface SkeletonRowProps {
510
508
  /** Renders the skeleton of a table row. Often helpful to represent the loading state of the data in your table. */
511
509
  declare function SkeletonRow({
512
510
  columns
513
- }: SkeletonRowProps): _$react_jsx_runtime0.JSX.Element;
511
+ }: SkeletonRowProps): import("react/jsx-runtime").JSX.Element;
514
512
  //#endregion
515
513
  //#region src/components/SwitchWithIcons.d.ts
516
514
  interface SwitchWithIconsProps extends Omit<SwitchProps, "icon" | "checkedIcon"> {
@@ -534,7 +532,7 @@ declare function SwitchWithIcons({
534
532
  uncheckedIcon: UncheckedIcon,
535
533
  uncheckedIconStyles,
536
534
  ...switchProps
537
- }: SwitchWithIconsProps): _$react_jsx_runtime0.JSX.Element;
535
+ }: SwitchWithIconsProps): import("react/jsx-runtime").JSX.Element;
538
536
  //#endregion
539
537
  //#region src/deprecated/DropdownMenu.d.ts
540
538
  interface DropdownMenuProps {
@@ -559,7 +557,7 @@ declare function DropdownMenu({
559
557
  isClosedIcon,
560
558
  onOpen,
561
559
  onClose
562
- }: DropdownMenuProps): _$react_jsx_runtime0.JSX.Element;
560
+ }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
563
561
  //#endregion
564
562
  //#region src/deprecated/DarkModeToggle.d.ts
565
563
  /** @deprecated This component has been renamed to `ModeToggle`. */
@@ -579,10 +577,10 @@ declare function DropdownMenu$1({
579
577
  children,
580
578
  onClose,
581
579
  ...menuProps
582
- }: DropdownMenuProps$1): _$react_jsx_runtime0.JSX.Element;
580
+ }: DropdownMenuProps$1): import("react/jsx-runtime").JSX.Element;
583
581
  //#endregion
584
582
  //#region src/v7/components/DropdownMenu/DropdownMenuItem.d.ts
585
- type DropdownMenuItemProps$1<RootComponent extends ElementType = typeof Button$1> = {
583
+ type DropdownMenuItemProps$1<RootComponent extends ElementType = typeof MUIButton> = {
586
584
  /**
587
585
  * An optional component to provide to override the current component.
588
586
  *
@@ -597,13 +595,13 @@ type DropdownMenuItemProps$1<RootComponent extends ElementType = typeof Button$1
597
595
  onClick?: ComponentProps<RootComponent>["onClick"];
598
596
  } & Omit<ComponentPropsWithoutRef<RootComponent>, "children" | "ref"> & MenuItemOwnProps;
599
597
  /** Represents a menu item to be used inside the `DropdownMenu`. It must be used as children of the `DropdownMenu` component. */
600
- declare function DropdownMenuItem$1<RootComponent extends ElementType = typeof Button$1>({
598
+ declare function DropdownMenuItem$1<RootComponent extends ElementType = typeof MUIButton>({
601
599
  component,
602
600
  children,
603
601
  ref,
604
602
  onClick,
605
603
  ...menuItemProps
606
- }: DropdownMenuItemProps$1<RootComponent>): _$react_jsx_runtime0.JSX.Element;
604
+ }: DropdownMenuItemProps$1<RootComponent>): import("react/jsx-runtime").JSX.Element;
607
605
  //#endregion
608
606
  //#region src/v7/components/DropdownMenu/DropdownMenuProvider.d.ts
609
607
  interface DropdownMenuContextValue {
@@ -652,7 +650,7 @@ declare function DropdownMenuExternalLink({
652
650
  children,
653
651
  onClick,
654
652
  ...menuItemProps
655
- }: DropdownMenuExternalLinkProps): _$react_jsx_runtime0.JSX.Element;
653
+ }: DropdownMenuExternalLinkProps): import("react/jsx-runtime").JSX.Element;
656
654
  //#endregion
657
655
  //#region src/deprecated/InternalLink.d.ts
658
656
  interface InternalLinkProps extends Omit<LinkProps, "href" | "component"> {
@@ -688,7 +686,7 @@ declare function InternalLink({
688
686
  children,
689
687
  ref,
690
688
  ...linkProps
691
- }: InternalLinkProps): _$react_jsx_runtime0.JSX.Element;
689
+ }: InternalLinkProps): import("react/jsx-runtime").JSX.Element;
692
690
  //#endregion
693
691
  //#region src/deprecated/DropdownMenuInternalLink.d.ts
694
692
  interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {
@@ -704,7 +702,7 @@ declare function DropdownMenuInternalLink({
704
702
  children,
705
703
  onClick,
706
704
  ...menuItemProps
707
- }: DropdownMenuInternalLinkProps): _$react_jsx_runtime0.JSX.Element;
705
+ }: DropdownMenuInternalLinkProps): import("react/jsx-runtime").JSX.Element;
708
706
  //#endregion
709
707
  //#region src/deprecated/IconWithPopover.d.ts
710
708
  interface IconWithPopoverProps {
@@ -732,7 +730,7 @@ declare function IconWithPopover({
732
730
  onClose,
733
731
  iconProps,
734
732
  children
735
- }: IconWithPopoverProps): _$react_jsx_runtime0.JSX.Element;
733
+ }: IconWithPopoverProps): import("react/jsx-runtime").JSX.Element;
736
734
  //#endregion
737
735
  //#region src/deprecated/ListItemInternalLink.d.ts
738
736
  interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
@@ -743,7 +741,7 @@ interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
743
741
  declare function ListItemInternalLink({
744
742
  children,
745
743
  ...listItemButtonProps
746
- }: ListItemInternalLinkProps): _$react_jsx_runtime0.JSX.Element;
744
+ }: ListItemInternalLinkProps): import("react/jsx-runtime").JSX.Element;
747
745
  //#endregion
748
746
  //#region src/deprecated/Loader.d.ts
749
747
  /** @deprecated This component has been renamed to QueryBoundary */
@@ -806,7 +804,7 @@ interface NavigationBottomProps {
806
804
  declare function NavigationBottom({
807
805
  children,
808
806
  navItems
809
- }: NavigationBottomProps): _$react_jsx_runtime0.JSX.Element;
807
+ }: NavigationBottomProps): import("react/jsx-runtime").JSX.Element;
810
808
  //#endregion
811
809
  //#region src/deprecated/NavigationDrawer.d.ts
812
810
  interface NavMenuItemOptions {
@@ -843,7 +841,7 @@ declare function NavigationDrawer({
843
841
  navItems,
844
842
  children,
845
843
  headerElements
846
- }: NavigationDrawerProps): _$react_jsx_runtime0.JSX.Element;
844
+ }: NavigationDrawerProps): import("react/jsx-runtime").JSX.Element;
847
845
  //#endregion
848
846
  //#region src/deprecated/PopoverText.d.ts
849
847
  interface PopoverTextProps extends TypographyProps {
@@ -856,7 +854,7 @@ declare function PopoverText({
856
854
  text,
857
855
  sx,
858
856
  ...typographyProps
859
- }: PopoverTextProps): _$react_jsx_runtime0.JSX.Element;
857
+ }: PopoverTextProps): import("react/jsx-runtime").JSX.Element;
860
858
  //#endregion
861
859
  //#region src/deprecated/QueryBoundary.d.ts
862
860
  /** @deprecated This type has been renamed to `QueryBoundaryWrapperProps`. */
@@ -880,7 +878,7 @@ declare function SubmitButton({
880
878
  disableClean,
881
879
  label,
882
880
  ...buttonProps
883
- }: SubmitButtonProps): _$react_jsx_runtime0.JSX.Element;
881
+ }: SubmitButtonProps): import("react/jsx-runtime").JSX.Element;
884
882
  //#endregion
885
883
  //#region src/hooks/useDebounce.d.ts
886
884
  /**
@@ -930,11 +928,11 @@ declare function useAudioContext<Strict extends boolean = true>({
930
928
  declare function AudioProvider({
931
929
  tracks,
932
930
  children
933
- }: AudioProviderProps): _$react_jsx_runtime0.JSX.Element;
931
+ }: AudioProviderProps): import("react/jsx-runtime").JSX.Element;
934
932
  //#endregion
935
933
  //#region src/providers/AudioProvider/AudioControls.d.ts
936
934
  /** Controls the tracks provided by the AudioProvider. */
937
- declare function AudioControls(): _$react_jsx_runtime0.JSX.Element;
935
+ declare function AudioControls(): import("react/jsx-runtime").JSX.Element;
938
936
  //#endregion
939
937
  //#region src/providers/ModeProvider.d.ts
940
938
  interface ModeContextValue {
@@ -955,7 +953,7 @@ interface ModeProviderProps {
955
953
  declare function ModeProvider({
956
954
  children,
957
955
  mode: modeProp
958
- }: ModeProviderProps): _$react_jsx_runtime0.JSX.Element;
956
+ }: ModeProviderProps): import("react/jsx-runtime").JSX.Element;
959
957
  //#endregion
960
958
  //#region src/providers/ScreenSizeProvider.d.ts
961
959
  interface ScreenSizeProps {
@@ -966,14 +964,16 @@ interface ScreenSizeProps {
966
964
  /** The minimum screen height in pixels required to be considered a large screen. */
967
965
  largeScreenHeight?: number;
968
966
  }
969
- interface ScreenSizeContextValue {
970
- /** Whether the screen is a large screen or not. */
971
- isLargeScreen: boolean;
967
+ interface ScreenDimensions {
972
968
  /** The current window width. */
973
969
  windowWidth: number;
974
970
  /** The current window height. */
975
971
  windowHeight: number;
976
972
  }
973
+ interface ScreenSizeContextValue extends ScreenDimensions {
974
+ /** Whether the screen is a large screen or not. */
975
+ isLargeScreen: boolean;
976
+ }
977
977
  /** Access the screen size context directly. */
978
978
  declare function useScreenSize<Strict extends boolean = true>({
979
979
  strict
@@ -983,7 +983,7 @@ declare function ScreenSizeProvider({
983
983
  children,
984
984
  largeScreenWidth,
985
985
  largeScreenHeight
986
- }: ScreenSizeProps): _$react_jsx_runtime0.JSX.Element;
986
+ }: ScreenSizeProps): import("react/jsx-runtime").JSX.Element;
987
987
  //#endregion
988
988
  //#region src/providers/SnackbarProvider.d.ts
989
989
  interface SnackbarProviderProps {
@@ -1004,7 +1004,7 @@ declare function useSnackbar<Strict extends boolean = true>({
1004
1004
  declare function SnackbarProvider({
1005
1005
  children,
1006
1006
  autoHideDuration
1007
- }: SnackbarProviderProps): _$react_jsx_runtime0.JSX.Element;
1007
+ }: SnackbarProviderProps): import("react/jsx-runtime").JSX.Element;
1008
1008
  //#endregion
1009
- export { Artwork, type AudioContextValue, AudioControls, AudioProvider, type AudioProviderProps, CollapsableItem, type CollapsableItemProps, ContextHookOptions, type CreateBaseQueryBoundaryParameters, type CreateItemQueryBoundaryParameters, type CreateListQueryBoundaryParameters, type CreateQueryBoundaryParameters, DarkModeToggle, type DefaultQueryBoundaryComponents, type DefaultQueryBoundaryComponentsBase, type DefaultQueryBoundaryItemComponents, type DefaultQueryBoundaryListComponents, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, DropdownMenuInternalLink, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, Loader, type LoaderContextValue, LoaderData, type LoaderDataProps, LoaderError, type LoaderErrorBaseProps, type LoaderErrorProps, type LoaderErrorPropsWithNullable, type LoaderErrorPropsWithUndefinedOrNull, LoaderProvider, type LoaderProviderBaseProps, type LoaderProviderProps, type LoaderProviderPropsWithError, type LoaderProviderPropsWithNoError, ModeProvider, type ModeProviderProps, ModeToggle, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, Page, PopoverText, type PopoverTextProps, type QueryBase, QueryBoundary, QueryBoundaryData, QueryBoundaryDataMap, type QueryBoundaryDataMapBaseProps, type QueryBoundaryDataMapProps, type QueryBoundaryDataMapPropsWithDataParser, type QueryBoundaryDataMapPropsWithItemParser, type QueryBoundaryDataMapPropsWithNoParser, type QueryBoundaryDataProps, QueryBoundaryError, type QueryBoundaryErrorProps, QueryBoundaryFallback, type QueryBoundaryFallbackProps, QueryBoundaryMap, type QueryBoundaryMapProps, QueryBoundaryNullable, type QueryBoundaryNullableProps, type QueryBoundaryNullablePropsWithNullable, type QueryBoundaryNullablePropsWithUndefinedOrNull, type QueryBoundaryProps, QueryBoundaryProvider, type QueryBoundaryProviderBaseProps, type QueryBoundaryProviderProps, type QueryBoundaryProviderPropsWithError, type QueryBoundaryProviderPropsWithNoError, QueryBoundaryWrapper, type QueryBoundaryWrapperProps, type QueryItem, type QueryList, type QueryMultiple, type QuerySingle, ReactPlayground, type ReactPlaygroundProps, type ScreenSizeContextValue, type ScreenSizeProps, ScreenSizeProvider, SkeletonRow, type SkeletonRowProps, SnackbarProvider, type SnackbarProviderProps, SubmitButton, type SubmitButtonProps, SwitchWithIcons, type SwitchWithIconsProps, type TrackData, createBaseQueryBoundary, createItemQueryBoundary, createListQueryBoundary, createQueryBoundary, useAudioContext, useDebounce, useDropdownMenu, useHash, useMode, useQueryBoundary, useScreenSize, useSnackbar };
1009
+ export { Artwork, type AudioContextValue, AudioControls, AudioProvider, type AudioProviderProps, CollapsableItem, type CollapsableItemProps, type ContextHookOptions, type CreateBaseQueryBoundaryParameters, type CreateItemQueryBoundaryParameters, type CreateListQueryBoundaryParameters, type CreateQueryBoundaryParameters, DarkModeToggle, type DefaultQueryBoundaryComponents, type DefaultQueryBoundaryComponentsBase, type DefaultQueryBoundaryItemComponents, type DefaultQueryBoundaryListComponents, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, DropdownMenuInternalLink, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, Loader, type LoaderContextValue, LoaderData, type LoaderDataProps, LoaderError, type LoaderErrorBaseProps, type LoaderErrorProps, type LoaderErrorPropsWithNullable, type LoaderErrorPropsWithUndefinedOrNull, LoaderProvider, type LoaderProviderBaseProps, type LoaderProviderProps, type LoaderProviderPropsWithError, type LoaderProviderPropsWithNoError, ModeProvider, type ModeProviderProps, ModeToggle, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, Page, PopoverText, type PopoverTextProps, type QueryBase, QueryBoundary, QueryBoundaryData, QueryBoundaryDataMap, type QueryBoundaryDataMapBaseProps, type QueryBoundaryDataMapProps, type QueryBoundaryDataMapPropsWithDataParser, type QueryBoundaryDataMapPropsWithItemParser, type QueryBoundaryDataMapPropsWithNoParser, type QueryBoundaryDataProps, QueryBoundaryError, type QueryBoundaryErrorProps, QueryBoundaryFallback, type QueryBoundaryFallbackProps, QueryBoundaryMap, type QueryBoundaryMapProps, QueryBoundaryNullable, type QueryBoundaryNullableProps, type QueryBoundaryNullablePropsWithNullable, type QueryBoundaryNullablePropsWithUndefinedOrNull, type QueryBoundaryProps, QueryBoundaryProvider, type QueryBoundaryProviderBaseProps, type QueryBoundaryProviderProps, type QueryBoundaryProviderPropsWithError, type QueryBoundaryProviderPropsWithNoError, QueryBoundaryWrapper, type QueryBoundaryWrapperProps, type QueryItem, type QueryList, type QueryMultiple, type QuerySingle, ReactPlayground, type ReactPlaygroundProps, type ScreenDimensions, type ScreenSizeContextValue, type ScreenSizeProps, ScreenSizeProvider, SkeletonRow, type SkeletonRowProps, SnackbarProvider, type SnackbarProviderProps, SubmitButton, type SubmitButtonProps, SwitchWithIcons, type SwitchWithIconsProps, type TrackData, createBaseQueryBoundary, createItemQueryBoundary, createListQueryBoundary, createQueryBoundary, useAudioContext, useDebounce, useDropdownMenu, useHash, useMode, useQueryBoundary, useScreenSize, useSnackbar };
1010
1010
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import e from"@mui/material/Box";import t from"@mui/material/Card";import n from"@mui/material/CardContent";import r from"@mui/material/CardHeader";import i from"@mui/material/Chip";import a from"@mui/material/Divider";import o from"@mui/material/Stack";import s from"@mui/material/Typography";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import d from"@mui/material/ButtonBase";import f from"@mui/material/Collapse";import{Fragment as p,createContext as m,useCallback as h,useContext as g,useEffect as _,useId as v,useMemo as y,useRef as ee,useState as b}from"react";import{MdArrowDropDown as x,MdArrowDropUp as te,MdChevronLeft as ne,MdChevronRight as re,MdCloudUpload as ie,MdDelete as ae,MdMenu as oe,MdOutlineDarkMode as se,MdOutlineLightMode as ce,MdVisibility as le}from"react-icons/md";import S from"@mui/material/Link";import C from"@mui/material/Button";import{ThemeProvider as ue,createTheme as de,styled as w,useTheme as fe}from"@mui/material/styles";import T from"@mui/material/IconButton";import pe from"@mui/material/List";import me from"@mui/material/ListItem";import he from"@mui/material/ListItemText";import ge from"@mui/material/Tooltip";import _e from"@mui/material/Switch";import{DataError as E}from"@alextheman/utility/v6";import D from"@mui/material/CssBaseline";import{fillArray as ve,truncate as O,wait as ye}from"@alextheman/utility";import k from"@mui/material/Alert";import be from"@mui/material/Snackbar";import A from"@mui/material/CircularProgress";import{stripIndent as xe}from"common-tags";import{LiveEditor as Se,LiveError as Ce,LivePreview as we,LiveProvider as Te}from"react-live";import Ee from"@mui/material/Skeleton";import De from"@mui/material/TableCell";import Oe from"@mui/material/TableRow";import j from"@mui/material/Menu";import ke from"@mui/material/BottomNavigation";import Ae from"@mui/material/BottomNavigationAction";import je from"@mui/material/Paper";import Me from"@mui/material/AppBar";import Ne from"@mui/material/Drawer";import M from"@mui/material/ListItemButton";import Pe from"@mui/material/ListItemIcon";import Fe from"@mui/material/Toolbar";import N from"@mui/material/MenuItem";import{Link as P,useLocation as Ie}from"react-router-dom";import Le from"@mui/material/Popover";import{useFormContext as Re}from"react-hook-form";function ze({containerLabel:e,chipLabels:r}){return l(t,{sx:{width:320,height:420,backgroundColor:`rgba(255,255,255,0.07)`,backdropFilter:`blur(8px)`,border:`1px solid rgba(255,255,255,0.06)`,boxShadow:`0 10px 40px rgba(0,0,0,0.35)`},children:u(n,{children:[l(s,{variant:`h6`,gutterBottom:!0,sx:{color:`#f8fafc`},children:e}),l(o,{spacing:1,children:r.map(e=>l(i,{label:e,sx:{backgroundColor:`rgba(255,255,255,0.11)`,color:`rgba(255,255,255,0.88)`,border:`1px solid rgba(255,255,255,0.06)`}},e))})]})})}function Be(){return l(e,{sx:{width:120,height:6,borderRadius:3,background:`linear-gradient(90deg, #f43f5e, #a78bfa, #22d3ee)`,boxShadow:`0 0 24px rgba(167,139,250,0.55)`}})}function Ve(){return u(t,{sx:{width:1e3,height:1e3,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,p:4,background:`radial-gradient(circle at 20% 10%, rgba(167,139,250,0.35) 0%, rgba(167,139,250,0.12) 35%, rgba(0,0,0,0) 55%), linear-gradient(135deg, #3a3380 0%, #1d2e5f 40%, #2d3f55 100%)`,color:`white`},elevation:0,children:[l(r,{title:`An Interface For You And I`,sx:{color:`#f8fafc`,textAlign:`center`,"& .MuiCardHeader-title":{fontSize:40,fontWeight:600,letterSpacing:2}}}),l(a,{sx:{borderColor:`rgba(255,255,255,0.2)`}}),l(n,{sx:{flex:1,display:`flex`,alignItems:`center`},children:u(o,{direction:`row`,spacing:4,sx:{width:`100%`,justifyContent:`center`,alignItems:`center`},children:[l(ze,{containerLabel:`You`,chipLabels:[`state`,`context`,`input`,`event`,`focus`,`value`,`history`]}),l(Be,{}),l(ze,{containerLabel:`I`,chipLabels:[`render`,`effect`,`response`,`update`,`history`,`layout`,`provider`]})]})})]})}function He({isInitiallyOpen:t,onOpen:n,onClose:r,children:i,buttonStyles:a,buttonContents:o,buttonComponent:s=d,collapseProps:c,openIcon:p=l(te,{}),closedIcon:m=l(x,{}),useDefaultStyling:h=s===d}){let[g,v]=b(!!t);return _(()=>{g&&n?n():!g&&r&&r()},[g]),u(e,{children:[u(s,{onClick:()=>{v(e=>!e)},sx:h?{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,paddingY:1.5,paddingX:2,textAlign:`center`,"&:hover":s===d?{backgroundColor:`action.hover`}:null,...a}:a,"aria-expanded":g,children:[o,g?p:m]}),l(f,{in:g,...c,children:i})]})}function Ue({href:e,children:t,ref:n,...r}){return l(S,{component:`a`,href:e,ref:n,target:`_blank`,rel:`noopener noreferrer`,...r,children:t})}const We={PDF:`application/pdf`,PNG:`image/png`,JPEG:`image/jpeg`,JPG:`image/jpg`,XLSX:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,DOCX:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,MP3:`audio/mp3`,MP4:`video/mp4`,WAV:`audio/wav`},Ge=w(`input`)({clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:1,overflow:`hidden`,position:`absolute`,bottom:0,left:0,whiteSpace:`nowrap`,width:1}),Ke=w(`div`)(({theme:e,$dragging:t})=>({border:`2px dashed`,borderColor:t?e.palette.primary.main:`#ccc`,backgroundColor:t?e.palette.action.hover:`transparent`,borderRadius:8,padding:`1.5rem`,textAlign:`center`,transition:`border-color 0.2s`,cursor:`pointer`}));function qe({onFileInput:e,label:t=`Upload files`,multiple:n,accept:r,useDropzone:i,...a}){let[o,s]=b(!1),c=v(),d=u(C,{variant:`contained`,component:`label`,"aria-label":`File input button`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),document.getElementById(c)?.click())},...a,startIcon:a.startIcon??l(ie,{}),children:[t,l(Ge,{id:c,type:`file`,onChange:t=>{let n=t.target;e(Array.from(n.files??[])),n.value=``},multiple:n,accept:r?.join(`,`),disabled:a.disabled})]});return i?l(Ke,{$dragging:o,onDragOver:e=>{e.preventDefault(),!a.disabled&&s(!0)},onDragLeave:e=>{e.preventDefault(),s(!1)},onDrop:t=>{t.preventDefault(),s(!1),!a.disabled&&e(Array.from(t.dataTransfer.files??[]))},children:d}):d}function Je({files:t,setFiles:n,multiple:r=!0,...i}){function a(e){n(t=>[...t,...e])}return u(e,{children:[l(qe,{...i,multiple:r,onFileInput:a}),l(pe,{children:t.map(e=>l(me,{secondaryAction:l(T,{"aria-label":`Delete`,edge:`end`,onClick:()=>{n(t=>t.filter(t=>t!==e))},children:l(ae,{})}),children:l(he,{primary:e.name})},`${e.name}-${e.lastModified}`))})]})}const Ye=w(_e)(()=>({padding:8,"& .MuiSwitch-track":{borderRadius:11,"&::before, &::after":{content:`""`,position:`absolute`,top:`50%`,transform:`translateY(-50%)`,fontSize:16,width:28,height:28}}}));function Xe({checkedIcon:t,checkedIconStyles:n,uncheckedIcon:r,uncheckedIconStyles:i,...a}){let o={borderRadius:`50%`,borderColor:`white`,backgroundColor:`white`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:.25},s={color:`black`,maxWidth:16.5,maxHeight:16.5};return l(Ye,{checkedIcon:l(e,{sx:o,children:l(t,{style:{...s,...n}})}),icon:l(e,{sx:o,children:l(r,{style:{...s,...i}})}),...a})}const Ze=m(void 0);function F({strict:e=!0}={}){let t=g(Ze);if(e&&!t)throw new E({strict:e,context:t},`AUDIO_PROVIDER_NOT_FOUND`,`Could not find the AudioProvider context. Please double-check that it is present.`);return t}function Qe({tracks:e,children:t}){let[n,r]=b(e[0]);return l(Ze.Provider,{value:{tracks:e,currentTrack:n,setCurrentTrack:r},children:t})}function $e(){let{currentTrack:e}=F();return l(`audio`,{src:e.src,controls:!0,children:l(`track`,{kind:`captions`})})}const I=m({toggleMode:()=>{},mode:`dark`});function L({strict:e=!0}={}){let t=g(I);if(e&&!t)throw new E({strict:e,context:t},`MODE_PROVIDER_NOT_FOUND`,`Could not find the ModeProvider context. Please double-check that it is present.`);return t}function et({children:e,mode:t=`dark`}){let[n,r]=b(t),i=y(()=>de({palette:{mode:n},components:{MuiPaper:{styleOverrides:{root:({theme:e})=>({border:1,borderStyle:`solid`,borderColor:e.palette.divider})}}}}),[n]);return l(I.Provider,{value:{mode:n,toggleMode:()=>{r(e=>e===`light`?`dark`:`light`)}},children:u(ue,{theme:i,children:[l(D,{}),e]})})}const R=m({windowWidth:0,windowHeight:0,isLargeScreen:!1});function tt({strict:e=!0}={}){let t=g(R);if(e&&!t)throw new E({strict:e,context:t},`SCREEN_SIZE_PROVIDER_NOT_FOUND`,`Could not find the ScreenSizeProvider context. Please double-check that it is present.`);return t}function nt({children:e,largeScreenWidth:t=669,largeScreenHeight:n=660}){let[r,i]=b(window.innerWidth),[a,o]=b(window.innerHeight);_(()=>{function e(){i(window.innerWidth),o(window.innerHeight)}return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]);let s=y(()=>r>t&&a>n,[r,a,t,n]);return l(R.Provider,{value:{isLargeScreen:s,windowWidth:r,windowHeight:a},children:e})}const z=m(void 0);function rt({strict:e=!0}={}){let t=g(z);if(e&&!t)throw new E({strict:e,context:t},`SNACKBAR_PROVIDER_NOT_FOUND`,`Could not find the SnackbarProvider context. Please double-check that it is present.`);return t}function it({children:e,autoHideDuration:t=5e3}){let[n,r]=b(!1),[i,a]=b(t),[o,s]=b(``),[c,d]=b(`info`);function f(e,n,i){r(!0),a(i??t),d(n??`info`),s(e)}async function p(){r(!1),await ye(.2),s(``)}return u(z.Provider,{value:{addSnackbar:f},children:[l(be,{open:n,autoHideDuration:i,onClose:p,children:l(k,{onClose:p,severity:c,children:o})}),e]})}function B(){let{mode:e,toggleMode:t}=L(),n=e===`dark`,r=`Enable ${n?`light`:`dark`} mode`;return l(ge,{title:r,children:l(Xe,{uncheckedIcon:ce,checkedIcon:se,checked:n,onChange:t,"aria-label":r})})}function at({title:e,subtitle:i,action:o,children:d,tabs:f,disablePadding:p}){return u(t,{children:[l(r,{title:u(c,{children:[typeof e==`string`?l(s,{variant:`h6`,children:e}):e,i?typeof i==`string`?l(s,{variant:`body2`,color:`text.secondary`,children:i}):i:null]}),action:o}),f,l(a,{}),p?d:l(n,{children:d})]})}const V=m(void 0);function H({strict:e=!0}={}){let t=g(V);if(e&&!t)throw new E({strict:e,context:t},`QUERY_BOUNDARY_PROVIDER_NOT_FOUND`,`Could not find the QueryBoundaryProvider context. Please double-check that it is present.`);return t}function U({children:e,loadingComponent:t=l(A,{}),...n}){return l(V.Provider,{value:{loadingComponent:t,...n},children:e})}function W({children:e,logError:t}){let{data:n,error:r,errorComponent:i,logError:a}=H(),o=t??a,s=ee(!1),u=e??i;return r?(o&&!s.current&&(n!=null&&console.error(`An error has occurred but data is still present. This may indicate an invalid query state.`,{data:n,error:r}),console.error(r),s.current=!0),typeof u==`function`?u(r):u?l(c,{children:u}):l(k,{severity:`error`,children:typeof r==`object`&&`message`in r&&typeof r.message==`string`?r.message:`An unknown error has occured. Please try again later.`})):null}function G({undefinedComponent:e,nullComponent:t,nullableComponent:n}){let{isLoading:r,data:i,error:a}=H();return r||a?null:i==null?n?l(c,{children:n}):i===void 0&&e?l(c,{children:e}):i===null&&t?l(c,{children:t}):l(k,{severity:`error`,children:`Failed to load data. Please try again later.`}):null}function K({errorComponent:e,logError:t,...n}){return u(c,{children:[l(W,{logError:t,children:e}),l(G,{...n})]})}function q({query:e}){return{Context:({children:t})=>l(U,{isLoading:e.isLoading,error:e.error,data:e.data,children:t}),Error:W,Fallback:K,Nullable:G}}function J({children:e,loadingComponent:t,itemKey:n,itemParser:r,dataParser:i,emptyComponent:a=l(s,{children:`No data present`}),strictlyRequireArray:o=!0}){let{isLoading:u,data:d,dataParser:f,loadingComponent:m,error:h}=H(),g=i??f,_=t??m;if(u)return l(c,{children:_});if(h||d==null)return null;if(!Array.isArray(d)){if(o)throw new E({data:d,strictlyRequireArray:o},`NOT_AN_ARRAY`,`Expected the data to be an array but it was not an array.`);return null}if(d.length===0)return l(c,{children:a});let v;return v=g?g(d):r?d.map(r):d,l(c,{children:v.map((t,r)=>l(p,{children:typeof e==`function`?e(t):e},n?n(t,r):r))})}function ot({query:e}){return{...q({query:e}),DataMap:J}}function st({loadingComponent:e,undefinedComponent:t,nullComponent:n,nullableComponent:r,logError:i,errorComponent:a,children:o,isLoading:s,error:c,data:d,dataParser:f,itemParser:p,itemKey:m}){let h=ot({query:{isLoading:s,error:c,data:d}}),g=l(h.Fallback,{logError:i,errorComponent:a});r?g=l(h.Fallback,{nullableComponent:r,logError:i,errorComponent:a}):(t||n)&&(g=l(h.Fallback,{undefinedComponent:t,nullComponent:n,logError:i,errorComponent:a}));let _=l(h.DataMap,{loadingComponent:e,itemKey:m,children:o});return f?_=l(h.DataMap,{loadingComponent:e,itemKey:m,dataParser:f,children:o}):p&&(_=l(h.DataMap,{loadingComponent:e,itemKey:m,itemParser:p,children:o})),u(h.Context,{children:[g,_]})}function Y({children:e,dataParser:t,loadingComponent:n}){let{isLoading:r,data:i,dataParser:a,loadingComponent:o,error:s}=H(),u=t??a;return s?null:r?l(c,{children:n??o}):i==null?null:l(c,{children:typeof e==`function`?e(u?u(i):i):e})}function ct({query:e}){return{...q({query:e}),Data:Y}}function X({children:e,errorComponent:t,undefinedComponent:n,nullComponent:r,nullableComponent:i,logError:a,loadingComponent:o=l(A,{}),isLoading:s,error:c,data:d,dataParser:f}){let p=ct({query:{isLoading:s,error:c,data:d}}),m=l(p.Fallback,{logError:a,errorComponent:t});return i?m=l(p.Fallback,{nullableComponent:i,logError:a,errorComponent:t}):(n||r)&&(m=l(p.Fallback,{undefinedComponent:n,nullComponent:r,logError:a,errorComponent:t})),u(p.Context,{children:[m,l(p.Data,{loadingComponent:o,dataParser:f,children:e})]})}function lt({code:t,previewStyles:n,...r}){let{mode:i}=L(),a={backgroundColor:i===`dark`?`black`:`white`,border:.3,borderRadius:1,padding:2,borderColor:`darkgray`},o=n?{...a,...n}:{...a};return l(e,{sx:{borderRadius:1,border:.5,padding:2},children:u(Te,{...r,code:xe(t??``),children:[l(s,{variant:`h5`,children:`Code`}),l(e,{sx:{border:.3,borderRadius:.3,borderColor:`darkgray`},children:l(Se,{})}),l(`br`,{}),l(s,{variant:`h5`,children:`Result`}),u(e,{sx:o,children:[l(we,{}),l(Ce,{})]})]})})}function ut({columns:e}){return l(Oe,{children:ve(e=>l(De,{children:l(Ee,{})},e),e)})}const dt=B;function ft({children:t,button:n=C,buttonChildren:r=`Menu`,buttonProps:i,isOpenIcon:a=l(te,{}),isClosedIcon:o=l(x,{}),onOpen:s,onClose:c}){let[d,f]=b(null),p=y(()=>!!d,[d]),m={...i,onClick:e=>{f(e.currentTarget)},"aria-controls":p?`dropdown-menu`:void 0,"aria-haspopup":`true`,"aria-expanded":p};return n===C&&(m.endIcon=p?a:o),_(()=>{p&&s?s():!p&&c&&c()},[p,s,c]),u(e,{children:[l(n,{...m,children:r}),l(j,{id:`dropdown-menu`,anchorEl:d,open:p,onClose:()=>{f(null)},children:typeof t==`function`?l(e,{children:t(()=>{f(null)})}):t})]})}const pt=m(void 0);function Z({strict:e=!0}={}){let t=g(pt);if(e&&!t)throw new E({strict:e,context:t},`DROPDOWN_MENU_NOT_FOUND`,`Could not find the DropdownMenu context. Please double-check that it is present.`);return t}function mt({strict:e=!0}={}){return Z({strict:e})}function ht({children:e,onClose:t,...n}){let{anchorElement:r,isDropdownOpen:i,closeMenu:a}=mt();return l(j,{anchorEl:r,open:i,onClose:(e,n)=>{e.defaultPrevented||a(),t&&t(e,n)},...n,children:e})}function gt({component:e,children:t,ref:n,onClick:r,...i}){let{closeMenu:a}=Z();return l(N,{component:e,ref:n,...i,onClick:e=>{r&&r(e),!e.defaultPrevented&&a()},children:t})}const Q=Z,_t=ht,vt=gt;var yt=_t;function bt({ref:e,href:t,children:n,onClick:r,...i}){let{closeMenu:a}=Q();return l(N,{component:Ue,href:t,ref:e,...i,onClick:e=>{e.defaultPrevented||a(),r&&r(e)},children:n})}function $({to:e,component:t=P,children:n,ref:r,...i}){return l(S,{component:t,to:e,ref:r,...i,children:n})}function xt({to:e,ref:t,children:n,onClick:r,...i}){let{closeMenu:a}=Q();return l(N,{component:$,to:e,ref:t,...i,onClick:e=>{e.defaultPrevented||a(),r&&r(e)},children:n})}function St({icon:t=le,onOpen:n,onClose:r,iconProps:i,children:a}){let[o,s]=b(null),c=!!o,d=v();function f(e){s(e.currentTarget),n&&n()}function p(){s(null),r&&r()}return u(e,{children:[l(t,{"aria-owns":c?d:void 0,"aria-haspopup":`true`,onMouseEnter:f,onMouseLeave:p,...i}),l(Le,{id:d,disablePortal:!0,disableScrollLock:!0,slotProps:{root:{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0}},sx:{pointerEvents:`none`},open:c,anchorEl:o,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:p,disableRestoreFocus:!0,children:a})]})}function Ct({children:e,...t}){return l(M,{component:$,...t,children:e})}const wt=X;function Tt({query:e}){return{Context:({children:t})=>l(U,{isLoading:e.isLoading,error:e.error,data:`data`in e?e.data:e.dataCollection,children:t}),Error:W,Data:Y,DataMap:J,Fallback:K,Nullable:G}}const Et=Y,Dt=K,Ot=U;function kt({children:t,navItems:n}){let[r,i]=b(``);return u(c,{children:[l(e,{sx:{paddingBottom:7},children:t}),l(je,{sx:{position:`fixed`,bottom:0,left:0,right:0},children:l(ke,{showLabels:!0,value:r,onChange:(e,t)=>{i(t)},children:n.map(e=>l(Ae,{...e,component:P},e.value))})})]})}function At(e){return{width:240,transition:e.transitions.create(`width`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:`hidden`}}function jt(e){return{transition:e.transitions.create(`width`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:`hidden`,width:`calc(${e.spacing(7)} + 1px)`,[e.breakpoints.up(`sm`)]:{width:`calc(${e.spacing(8)} + 1px)`}}}const Mt=w(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`flex-end`,padding:e.spacing(0,1),...e.mixins.toolbar})),Nt=w(Me,{shouldForwardProp:e=>e!==`open`})(({theme:e})=>({zIndex:e.zIndex.drawer+1,transition:e.transitions.create([`width`,`margin`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{marginLeft:240,width:`calc(100% - 240px)`,transition:e.transitions.create([`width`,`margin`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}]})),Pt=w(Ne,{shouldForwardProp:e=>e!==`open`})(({theme:e})=>({width:240,flexShrink:0,whiteSpace:`nowrap`,boxSizing:`border-box`,variants:[{props:({open:e})=>e,style:{...At(e),"& .MuiDrawer-paper":At(e)}},{props:({open:e})=>!e,style:{...jt(e),"& .MuiDrawer-paper":jt(e)}}]}));function Ft({title:t,navItems:n,children:r,headerElements:i}){let o=fe(),[c,d]=b(!0),f=Ie();function m(){d(!0)}function h(){d(!1)}return u(e,{sx:{display:`flex`},children:[l(D,{}),l(Nt,{position:`fixed`,open:c,children:u(Fe,{children:[l(T,{color:`inherit`,"aria-label":`open drawer`,onClick:m,edge:`start`,sx:[{marginRight:5},c&&{display:`none`}],children:l(oe,{})}),l(s,{variant:`h6`,noWrap:!0,component:`div`,children:t}),i]})}),u(Pt,{variant:`permanent`,open:c,children:[l(Mt,{children:l(T,{onClick:h,children:o.direction===`rtl`?l(re,{}):l(ne,{})})}),l(a,{}),n.map(e=>u(p,{children:[u(pe,{children:[l(s,{variant:c?`h5`:`h6`,sx:{paddingLeft:c?2:1},children:c?e.category:O(e.category,4)}),e.options.map(e=>l(me,{disablePadding:!0,sx:{display:`block`},children:u(M,{sx:[{minHeight:48,px:2.5},c?{justifyContent:`initial`}:{justifyContent:`center`}],component:P,to:e.to,selected:f.pathname===e.to,children:[l(Pe,{sx:[{minWidth:0,justifyContent:`center`},c?{mr:3}:{mr:`auto`}],children:e.icon?e.icon:c?null:l(s,{children:O(e.label,4)})}),l(he,{primary:e.label,sx:[c?{opacity:1}:{opacity:0}]})]})},e.to))]}),l(a,{})]},e.category))]}),u(e,{component:`main`,sx:{flexGrow:1,p:3},children:[l(Mt,{}),r]})]})}function It({text:e,sx:t,...n}){return l(c,{children:e.split(`
2
- `).map((e,r)=>l(s,{sx:{margin:1,...t},...n,children:e},r))})}const Lt=X;function Rt({disableClean:e,label:t,...n}){let{formState:{disabled:r,isDirty:i,isSubmitting:a}}=Re();return l(C,{color:`primary`,disabled:n.disabled||e&&!i||r,loading:a,type:`submit`,variant:`contained`,...n,children:t})}function zt(e,t=500){let[n,r]=b(e);return _(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}function Bt(e){let[t,n]=b(()=>{let t=window.location.hash.replace(`#`,``);return e&&t===``?e:t}),r=h(()=>{let t=window.location.hash.replace(`#`,``);n(e&&t===``?e:t)},[n,e]);return _(()=>(window.addEventListener(`hashchange`,r),()=>{window.removeEventListener(`hashchange`,r)}),[r]),[t,h(e=>{let n=typeof e==`function`?e(t):e;n!==t&&(window.location.hash=n)},[t])]}export{Ve as Artwork,$e as AudioControls,Qe as AudioProvider,He as CollapsableItem,dt as DarkModeToggle,ft as DropdownMenu,yt as DropdownMenu2,bt as DropdownMenuExternalLink,xt as DropdownMenuInternalLink,vt as DropdownMenuItem,Ue as ExternalLink,qe as FileInput,Je as FileInputList,We as FileType,St as IconWithPopover,$ as InternalLink,Ct as ListItemInternalLink,wt as Loader,Et as LoaderData,Dt as LoaderError,Ot as LoaderProvider,et as ModeProvider,B as ModeToggle,kt as NavigationBottom,Ft as NavigationDrawer,at as Page,It as PopoverText,Lt as QueryBoundary,Y as QueryBoundaryData,J as QueryBoundaryDataMap,W as QueryBoundaryError,K as QueryBoundaryFallback,st as QueryBoundaryMap,G as QueryBoundaryNullable,U as QueryBoundaryProvider,X as QueryBoundaryWrapper,lt as ReactPlayground,nt as ScreenSizeProvider,ut as SkeletonRow,it as SnackbarProvider,Rt as SubmitButton,Xe as SwitchWithIcons,q as createBaseQueryBoundary,ct as createItemQueryBoundary,ot as createListQueryBoundary,Tt as createQueryBoundary,F as useAudioContext,zt as useDebounce,Q as useDropdownMenu,Bt as useHash,L as useMode,H as useQueryBoundary,tt as useScreenSize,rt as useSnackbar};
1
+ import e from"@mui/material/Box";import t from"@mui/material/Card";import n from"@mui/material/CardContent";import r from"@mui/material/CardHeader";import i from"@mui/material/Chip";import a from"@mui/material/Divider";import o from"@mui/material/Stack";import s from"@mui/material/Typography";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import d from"@mui/material/ButtonBase";import f from"@mui/material/Collapse";import{Fragment as p,createContext as m,use as h,useCallback as g,useEffect as _,useId as v,useMemo as y,useRef as ee,useState as b,useSyncExternalStore as te}from"react";import{MdArrowDropDown as x,MdArrowDropUp as ne,MdChevronLeft as re,MdChevronRight as ie,MdCloudUpload as ae,MdDelete as oe,MdMenu as se,MdOutlineDarkMode as ce,MdOutlineLightMode as le,MdVisibility as ue}from"react-icons/md";import S from"@mui/material/Link";import C from"@mui/material/Button";import{ThemeProvider as de,createTheme as fe,styled as w,useTheme as pe}from"@mui/material/styles";import T from"@mui/material/IconButton";import me from"@mui/material/List";import he from"@mui/material/ListItem";import ge from"@mui/material/ListItemText";import _e from"@mui/material/Tooltip";import ve from"@mui/material/Switch";import{DataError as E}from"@alextheman/utility/v6";import D from"@mui/material/CssBaseline";import{fillArray as ye,truncate as O,wait as be}from"@alextheman/utility";import xe from"@mui/material/Alert";import Se from"@mui/material/Snackbar";import Ce from"@mui/material/CircularProgress";import{stripIndent as we}from"common-tags";import{LiveEditor as Te,LiveError as Ee,LivePreview as De,LiveProvider as Oe}from"react-live";import ke from"@mui/material/Skeleton";import Ae from"@mui/material/TableCell";import je from"@mui/material/TableRow";import k from"@mui/material/Menu";import Me from"@mui/material/BottomNavigation";import Ne from"@mui/material/BottomNavigationAction";import Pe from"@mui/material/Paper";import Fe from"@mui/material/AppBar";import Ie from"@mui/material/Drawer";import A from"@mui/material/ListItemButton";import Le from"@mui/material/ListItemIcon";import Re from"@mui/material/Toolbar";import j from"@mui/material/MenuItem";import{Link as M,useLocation as ze}from"react-router-dom";import Be from"@mui/material/Popover";import{useFormContext as Ve}from"react-hook-form";function He({containerLabel:e,chipLabels:r}){return l(t,{sx:{width:320,height:420,backgroundColor:`rgba(255,255,255,0.07)`,backdropFilter:`blur(8px)`,border:`1px solid rgba(255,255,255,0.06)`,boxShadow:`0 10px 40px rgba(0,0,0,0.35)`},children:u(n,{children:[l(s,{variant:`h6`,gutterBottom:!0,sx:{color:`#f8fafc`},children:e}),l(o,{spacing:1,children:r.map(e=>l(i,{label:e,sx:{backgroundColor:`rgba(255,255,255,0.11)`,color:`rgba(255,255,255,0.88)`,border:`1px solid rgba(255,255,255,0.06)`}},e))})]})})}function Ue(){return l(e,{sx:{width:120,height:6,borderRadius:3,background:`linear-gradient(90deg, #f43f5e, #a78bfa, #22d3ee)`,boxShadow:`0 0 24px rgba(167,139,250,0.55)`}})}function We(){return u(t,{sx:{width:1e3,height:1e3,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,p:4,background:`radial-gradient(circle at 20% 10%, rgba(167,139,250,0.35) 0%, rgba(167,139,250,0.12) 35%, rgba(0,0,0,0) 55%), linear-gradient(135deg, #3a3380 0%, #1d2e5f 40%, #2d3f55 100%)`,color:`white`},elevation:0,children:[l(r,{title:`An Interface For You And I`,sx:{color:`#f8fafc`,textAlign:`center`,"& .MuiCardHeader-title":{fontSize:40,fontWeight:600,letterSpacing:2}}}),l(a,{sx:{borderColor:`rgba(255,255,255,0.2)`}}),l(n,{sx:{flex:1,display:`flex`,alignItems:`center`},children:u(o,{direction:`row`,spacing:4,sx:{width:`100%`,justifyContent:`center`,alignItems:`center`},children:[l(He,{containerLabel:`You`,chipLabels:[`state`,`context`,`input`,`event`,`focus`,`value`,`history`]}),l(Ue,{}),l(He,{containerLabel:`I`,chipLabels:[`render`,`effect`,`response`,`update`,`history`,`layout`,`provider`]})]})})]})}function Ge({isInitiallyOpen:t,onOpen:n,onClose:r,children:i,buttonStyles:a,buttonContents:o,buttonComponent:s=d,collapseProps:c,openIcon:p=l(ne,{}),closedIcon:m=l(x,{}),useDefaultStyling:h=s===d}){let[g,v]=b(!!t);return _(()=>{g&&n?n():!g&&r&&r()},[g,n,r]),u(e,{children:[u(s,{onClick:()=>{v(e=>!e)},sx:h?{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,paddingY:1.5,paddingX:2,textAlign:`center`,"&:hover":s===d?{backgroundColor:`action.hover`}:null,...a}:a,"aria-expanded":g,children:[o,g?p:m]}),l(f,{in:g,...c,children:i})]})}function Ke({href:e,children:t,ref:n,...r}){return l(S,{component:`a`,href:e,ref:n,target:`_blank`,rel:`noopener noreferrer`,...r,children:t})}const qe={PDF:`application/pdf`,PNG:`image/png`,JPEG:`image/jpeg`,JPG:`image/jpg`,XLSX:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,DOCX:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,MP3:`audio/mp3`,MP4:`video/mp4`,WAV:`audio/wav`},Je=w(`input`)({clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:1,overflow:`hidden`,position:`absolute`,bottom:0,left:0,whiteSpace:`nowrap`,width:1}),Ye=w(`div`)(({theme:e,$dragging:t})=>({border:`2px dashed`,borderColor:t?e.palette.primary.main:`#ccc`,backgroundColor:t?e.palette.action.hover:`transparent`,borderRadius:8,padding:`1.5rem`,textAlign:`center`,transition:`border-color 0.2s`,cursor:`pointer`}));function Xe({onFileInput:e,label:t=`Upload files`,multiple:n,accept:r,useDropzone:i,...a}){let[o,s]=b(!1),c=v(),d=u(C,{variant:`contained`,component:`label`,"aria-label":`File input button`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),document.getElementById(c)?.click())},...a,startIcon:a.startIcon??l(ae,{}),children:[t,l(Je,{id:c,type:`file`,onChange:t=>{let n=t.target;e(Array.from(n.files??[])),n.value=``},multiple:n,accept:r?.join(`,`),disabled:a.disabled})]});return i?l(Ye,{$dragging:o,onDragOver:e=>{e.preventDefault(),!a.disabled&&s(!0)},onDragLeave:e=>{e.preventDefault(),s(!1)},onDrop:t=>{t.preventDefault(),s(!1),!a.disabled&&e(Array.from(t.dataTransfer.files??[]))},children:d}):d}function Ze({files:t,setFiles:n,multiple:r=!0,...i}){function a(e){n(t=>[...t,...e])}return u(e,{children:[l(Xe,{...i,multiple:r,onFileInput:a}),l(me,{children:t.map(e=>l(he,{secondaryAction:l(T,{"aria-label":`Delete`,edge:`end`,onClick:()=>{n(t=>t.filter(t=>t!==e))},children:l(oe,{})}),children:l(ge,{primary:e.name})},`${e.name}-${e.lastModified}`))})]})}const Qe=w(ve)(()=>({padding:8,"& .MuiSwitch-track":{borderRadius:11,"&::before, &::after":{content:`""`,position:`absolute`,top:`50%`,transform:`translateY(-50%)`,fontSize:16,width:28,height:28}}}));function $e({checkedIcon:t,checkedIconStyles:n,uncheckedIcon:r,uncheckedIconStyles:i,...a}){let o={borderRadius:`50%`,borderColor:`white`,backgroundColor:`white`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:.25},s={color:`black`,maxWidth:16.5,maxHeight:16.5};return l(Qe,{checkedIcon:l(e,{sx:o,children:l(t,{style:{...s,...n}})}),icon:l(e,{sx:o,children:l(r,{style:{...s,...i}})}),...a})}const N=m(void 0);function P({strict:e=!0}={}){let t=h(N);if(e&&!t)throw new E({strict:e,context:t},`AUDIO_PROVIDER_NOT_FOUND`,`Could not find the AudioProvider context. Please double-check that it is present.`);return t}function et({tracks:e,children:t}){let[n,r]=b(e[0]);return l(N,{value:{tracks:e,currentTrack:n,setCurrentTrack:r},children:t})}function tt(){let{currentTrack:e}=P();return l(`audio`,{src:e.src,controls:!0,children:l(`track`,{kind:`captions`})})}const F=m({toggleMode:()=>{},mode:`dark`});function I({strict:e=!0}={}){let t=h(F);if(e&&!t)throw new E({strict:e,context:t},`MODE_PROVIDER_NOT_FOUND`,`Could not find the ModeProvider context. Please double-check that it is present.`);return t}function nt({children:e,mode:t=`dark`}){let[n,r]=b(t),i=y(()=>fe({palette:{mode:n},components:{MuiPaper:{styleOverrides:{root:({theme:e})=>({border:1,borderStyle:`solid`,borderColor:e.palette.divider})}}}}),[n]);return l(F,{value:{mode:n,toggleMode:()=>{r(e=>e===`light`?`dark`:`light`)}},children:u(de,{theme:i,children:[l(D,{}),e]})})}const L=m({windowWidth:0,windowHeight:0,isLargeScreen:!1});function rt({strict:e=!0}={}){let t=h(L);if(e&&!t)throw new E({strict:e,context:t},`SCREEN_SIZE_PROVIDER_NOT_FOUND`,`Could not find the ScreenSizeProvider context. Please double-check that it is present.`);return t}let R={windowWidth:window.innerWidth,windowHeight:window.innerHeight};function it(){return R}function at(e){function t(){R={windowWidth:window.innerWidth,windowHeight:window.innerHeight},e()}return window.addEventListener(`resize`,t),()=>{window.removeEventListener(`resize`,t)}}function ot({children:e,largeScreenWidth:t=669,largeScreenHeight:n=660}){let{windowWidth:r,windowHeight:i}=te(at,it);return l(L,{value:{isLargeScreen:y(()=>r>t&&i>n,[r,i,t,n]),windowWidth:r,windowHeight:i},children:e})}const z=m(void 0);function st({strict:e=!0}={}){let t=h(z);if(e&&!t)throw new E({strict:e,context:t},`SNACKBAR_PROVIDER_NOT_FOUND`,`Could not find the SnackbarProvider context. Please double-check that it is present.`);return t}function ct({children:e,autoHideDuration:t=5e3}){let[n,r]=b(!1),[i,a]=b(t),[o,s]=b(``),[c,d]=b(`info`);function f(e,n,i){r(!0),a(i??t),d(n??`info`),s(e)}async function p(){r(!1),await be(.2),s(``)}return u(z,{value:{addSnackbar:f},children:[l(Se,{open:n,autoHideDuration:i,onClose:p,children:l(xe,{onClose:p,severity:c,children:o})}),e]})}function B(){let{mode:e,toggleMode:t}=I(),n=e===`dark`,r=`Enable ${n?`light`:`dark`} mode`;return l(_e,{title:r,children:l($e,{uncheckedIcon:le,checkedIcon:ce,checked:n,onChange:t,"aria-label":r})})}function lt({title:e,subtitle:i,action:o,children:d,tabs:f,disablePadding:p}){return u(t,{children:[l(r,{title:u(c,{children:[typeof e==`string`?l(s,{variant:`h6`,children:e}):e,i?typeof i==`string`?l(s,{variant:`body2`,color:`text.secondary`,children:i}):i:null]}),action:o}),f,l(a,{}),p?d:l(n,{children:d})]})}const V=m(void 0);function H({strict:e=!0}={}){let t=h(V);if(e&&!t)throw new E({strict:e,context:t},`QUERY_BOUNDARY_PROVIDER_NOT_FOUND`,`Could not find the QueryBoundaryProvider context. Please double-check that it is present.`);return t}function U({children:e,loadingComponent:t=l(Ce,{}),...n}){return l(V,{value:{loadingComponent:t,...n},children:e})}function W({children:e,logError:t}){let{data:n,error:r,errorComponent:i,logError:a}=H(),o=t??a,s=ee(!1),u=e??i;return r?(o&&!s.current&&(n==null?console.error(r):console.error(`An error has occurred but data is still present. This may indicate an invalid query state.`,{data:n,error:r}),s.current=!0),typeof u==`function`?u(r):u===void 0?l(xe,{severity:`error`,children:typeof r==`object`&&`message`in r&&typeof r.message==`string`?r.message:`An unknown error has occured.`}):l(c,{children:u})):null}function G({undefinedComponent:e,nullComponent:t,nullableComponent:n}){let{isLoading:r,data:i,error:a}=H();if(r||a)return null;if(i==null){if(n!==void 0)return l(c,{children:n});if(i===void 0)return e===void 0?l(s,{children:`No data available.`}):l(c,{children:e});if(i===null)return t===void 0?l(s,{children:`No data found.`}):l(c,{children:t})}return null}function K({errorComponent:e,logError:t,...n}){return u(c,{children:[l(W,{logError:t,children:e}),l(G,{...n})]})}function q({query:e}){return{Context:({children:t})=>l(U,{isLoading:e.isLoading,error:e.error,data:e.data,children:t}),Error:W,Fallback:K,Nullable:G}}function J({children:e,loadingComponent:t,itemKey:n,itemParser:r,dataParser:i,emptyComponent:a=l(s,{children:`No data present`}),strictlyRequireArray:o=!0}){let{isLoading:u,data:d,dataParser:f,loadingComponent:m,error:h}=H(),g=i??f,_=t??m;if(u)return l(c,{children:_});if(h||d==null)return null;if(!Array.isArray(d)){if(o)throw new E({data:d,strictlyRequireArray:o},`NOT_AN_ARRAY`,`Expected the data to be an array but it was not an array.`);return null}if(d.length===0)return l(c,{children:a});let v;return v=g?g(d):r?d.map(r):d,l(c,{children:v.map((t,r)=>l(p,{children:typeof e==`function`?e(t):e},n?n(t,r):r))})}function ut({query:e}){return{...q({query:e}),DataMap:J}}function dt({loadingComponent:e,undefinedComponent:t,nullComponent:n,nullableComponent:r,logError:i,errorComponent:a,children:o,isLoading:s,error:c,data:d,dataParser:f,itemParser:p,itemKey:m}){let h=ut({query:{isLoading:s,error:c,data:d}}),g=l(h.Fallback,{logError:i,errorComponent:a});r?g=l(h.Fallback,{nullableComponent:r,logError:i,errorComponent:a}):(t||n)&&(g=l(h.Fallback,{undefinedComponent:t,nullComponent:n,logError:i,errorComponent:a}));let _=l(h.DataMap,{loadingComponent:e,itemKey:m,children:o});return f?_=l(h.DataMap,{loadingComponent:e,itemKey:m,dataParser:f,children:o}):p&&(_=l(h.DataMap,{loadingComponent:e,itemKey:m,itemParser:p,children:o})),u(h.Context,{children:[g,_]})}function Y({children:e,dataParser:t,loadingComponent:n}){let{isLoading:r,data:i,dataParser:a,loadingComponent:o,error:s}=H(),u=t??a;return s?null:r?l(c,{children:n??o}):i==null?null:l(c,{children:typeof e==`function`?e(u?u(i):i):e})}function ft({query:e}){return{...q({query:e}),Data:Y}}function X({children:e,errorComponent:t,undefinedComponent:n,nullComponent:r,nullableComponent:i,logError:a,loadingComponent:o=l(Ce,{}),isLoading:s,error:c,data:d,dataParser:f}){let p=ft({query:{isLoading:s,error:c,data:d}}),m=l(p.Fallback,{logError:a,errorComponent:t});return i?m=l(p.Fallback,{nullableComponent:i,logError:a,errorComponent:t}):(n||r)&&(m=l(p.Fallback,{undefinedComponent:n,nullComponent:r,logError:a,errorComponent:t})),u(p.Context,{children:[m,l(p.Data,{loadingComponent:o,dataParser:f,children:e})]})}function pt({code:t,previewStyles:n,...r}){let{mode:i}=I(),a={backgroundColor:i===`dark`?`black`:`white`,border:.3,borderRadius:1,padding:2,borderColor:`darkgray`},o=n?{...a,...n}:{...a};return l(e,{sx:{borderRadius:1,border:.5,padding:2},children:u(Oe,{...r,code:we(t??``),children:[l(s,{variant:`h5`,children:`Code`}),l(e,{sx:{border:.3,borderRadius:.3,borderColor:`darkgray`},children:l(Te,{})}),l(`br`,{}),l(s,{variant:`h5`,children:`Result`}),u(e,{sx:o,children:[l(De,{}),l(Ee,{})]})]})})}function mt({columns:e}){return l(je,{children:ye(e=>l(Ae,{children:l(ke,{})},e),e)})}const ht=B;function gt({children:t,button:n=C,buttonChildren:r=`Menu`,buttonProps:i,isOpenIcon:a=l(ne,{}),isClosedIcon:o=l(x,{}),onOpen:s,onClose:c}){let[d,f]=b(null),p=y(()=>!!d,[d]),m={...i,onClick:e=>{f(e.currentTarget)},"aria-controls":p?`dropdown-menu`:void 0,"aria-haspopup":`true`,"aria-expanded":p};return n===C&&(m.endIcon=p?a:o),_(()=>{p&&s?s():!p&&c&&c()},[p,s,c]),u(e,{children:[l(n,{...m,children:r}),l(k,{id:`dropdown-menu`,anchorEl:d,open:p,onClose:()=>{f(null)},children:typeof t==`function`?l(e,{children:t(()=>{f(null)})}):t})]})}const _t=m(void 0);function Z({strict:e=!0}={}){let t=h(_t);if(e&&!t)throw new E({strict:e,context:t},`DROPDOWN_MENU_NOT_FOUND`,`Could not find the DropdownMenu context. Please double-check that it is present.`);return t}function vt({strict:e=!0}={}){return Z({strict:e})}function yt({children:e,onClose:t,...n}){let{anchorElement:r,isDropdownOpen:i,closeMenu:a}=vt();return l(k,{anchorEl:r,open:i,onClose:(e,n)=>{e.defaultPrevented||a(),t&&t(e,n)},...n,children:e})}function bt({component:e,children:t,ref:n,onClick:r,...i}){let{closeMenu:a}=Z();return l(j,{component:e,ref:n,...i,onClick:e=>{r&&r(e),!e.defaultPrevented&&a()},children:t})}const Q=Z,xt=yt,St=bt;var Ct=xt;function wt({ref:e,href:t,children:n,onClick:r,...i}){let{closeMenu:a}=Q();return l(j,{component:Ke,href:t,ref:e,...i,onClick:e=>{e.defaultPrevented||a(),r&&r(e)},children:n})}function $({to:e,component:t=M,children:n,ref:r,...i}){return l(S,{component:t,to:e,ref:r,...i,children:n})}function Tt({to:e,ref:t,children:n,onClick:r,...i}){let{closeMenu:a}=Q();return l(j,{component:$,to:e,ref:t,...i,onClick:e=>{e.defaultPrevented||a(),r&&r(e)},children:n})}function Et({icon:t=ue,onOpen:n,onClose:r,iconProps:i,children:a}){let[o,s]=b(null),c=!!o,d=v();function f(e){s(e.currentTarget),n&&n()}function p(){s(null),r&&r()}return u(e,{children:[l(t,{"aria-owns":c?d:void 0,"aria-haspopup":`true`,onMouseEnter:f,onMouseLeave:p,...i}),l(Be,{id:d,disablePortal:!0,disableScrollLock:!0,slotProps:{root:{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0}},sx:{pointerEvents:`none`},open:c,anchorEl:o,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:p,disableRestoreFocus:!0,children:a})]})}function Dt({children:e,...t}){return l(A,{component:$,...t,children:e})}const Ot=X;function kt({query:e}){return{Context:({children:t})=>l(U,{isLoading:e.isLoading,error:e.error,data:`data`in e?e.data:e.dataCollection,children:t}),Error:W,Data:Y,DataMap:J,Fallback:K,Nullable:G}}const At=Y,jt=K,Mt=U;function Nt({children:t,navItems:n}){let[r,i]=b(``);return u(c,{children:[l(e,{sx:{paddingBottom:7},children:t}),l(Pe,{sx:{position:`fixed`,bottom:0,left:0,right:0},children:l(Me,{showLabels:!0,value:r,onChange:(e,t)=>{i(t)},children:n.map(e=>l(Ne,{...e,component:M},e.value))})})]})}function Pt(e){return{width:240,transition:e.transitions.create(`width`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:`hidden`}}function Ft(e){return{transition:e.transitions.create(`width`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:`hidden`,width:`calc(${e.spacing(7)} + 1px)`,[e.breakpoints.up(`sm`)]:{width:`calc(${e.spacing(8)} + 1px)`}}}const It=w(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`flex-end`,padding:e.spacing(0,1),...e.mixins.toolbar})),Lt=w(Fe,{shouldForwardProp:e=>e!==`open`})(({theme:e})=>({zIndex:e.zIndex.drawer+1,transition:e.transitions.create([`width`,`margin`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{marginLeft:240,width:`calc(100% - 240px)`,transition:e.transitions.create([`width`,`margin`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}]})),Rt=w(Ie,{shouldForwardProp:e=>e!==`open`})(({theme:e})=>({width:240,flexShrink:0,whiteSpace:`nowrap`,boxSizing:`border-box`,variants:[{props:({open:e})=>e,style:{...Pt(e),"& .MuiDrawer-paper":Pt(e)}},{props:({open:e})=>!e,style:{...Ft(e),"& .MuiDrawer-paper":Ft(e)}}]}));function zt({title:t,navItems:n,children:r,headerElements:i}){let o=pe(),[c,d]=b(!0),f=ze();function m(){d(!0)}function h(){d(!1)}return u(e,{sx:{display:`flex`},children:[l(D,{}),l(Lt,{position:`fixed`,open:c,children:u(Re,{children:[l(T,{color:`inherit`,"aria-label":`open drawer`,onClick:m,edge:`start`,sx:[{marginRight:5},c&&{display:`none`}],children:l(se,{})}),l(s,{variant:`h6`,noWrap:!0,component:`div`,children:t}),i]})}),u(Rt,{variant:`permanent`,open:c,children:[l(It,{children:l(T,{onClick:h,children:o.direction===`rtl`?l(ie,{}):l(re,{})})}),l(a,{}),n.map(e=>u(p,{children:[u(me,{children:[l(s,{variant:c?`h5`:`h6`,sx:{paddingLeft:c?2:1},children:c?e.category:O(e.category,4)}),e.options.map(e=>l(he,{disablePadding:!0,sx:{display:`block`},children:u(A,{sx:[{minHeight:48,px:2.5},c?{justifyContent:`initial`}:{justifyContent:`center`}],component:M,to:e.to,selected:f.pathname===e.to,children:[l(Le,{sx:[{minWidth:0,justifyContent:`center`},c?{mr:3}:{mr:`auto`}],children:e.icon?e.icon:c?null:l(s,{children:O(e.label,4)})}),l(ge,{primary:e.label,sx:[c?{opacity:1}:{opacity:0}]})]})},e.to))]}),l(a,{})]},e.category))]}),u(e,{component:`main`,sx:{flexGrow:1,p:3},children:[l(It,{}),r]})]})}function Bt({text:e,sx:t,...n}){return l(c,{children:e.split(`
2
+ `).map((e,r)=>l(s,{sx:{margin:1,...t},...n,children:e},r))})}const Vt=X;function Ht({disableClean:e,label:t,...n}){let{formState:{disabled:r,isDirty:i,isSubmitting:a}}=Ve();return l(C,{color:`primary`,disabled:n.disabled||e&&!i||r,loading:a,type:`submit`,variant:`contained`,...n,children:t})}function Ut(e,t=500){let[n,r]=b(e);return _(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}function Wt(e){let[t,n]=b(()=>{let t=window.location.hash.replace(`#`,``);return e&&t===``?e:t}),r=g(()=>{let t=window.location.hash.replace(`#`,``);n(e&&t===``?e:t)},[n,e]);return _(()=>(window.addEventListener(`hashchange`,r),()=>{window.removeEventListener(`hashchange`,r)}),[r]),[t,g(e=>{let n=typeof e==`function`?e(t):e;n!==t&&(window.location.hash=n)},[t])]}export{We as Artwork,tt as AudioControls,et as AudioProvider,Ge as CollapsableItem,ht as DarkModeToggle,gt as DropdownMenu,Ct as DropdownMenu2,wt as DropdownMenuExternalLink,Tt as DropdownMenuInternalLink,St as DropdownMenuItem,Ke as ExternalLink,Xe as FileInput,Ze as FileInputList,qe as FileType,Et as IconWithPopover,$ as InternalLink,Dt as ListItemInternalLink,Ot as Loader,At as LoaderData,jt as LoaderError,Mt as LoaderProvider,nt as ModeProvider,B as ModeToggle,Nt as NavigationBottom,zt as NavigationDrawer,lt as Page,Bt as PopoverText,Vt as QueryBoundary,Y as QueryBoundaryData,J as QueryBoundaryDataMap,W as QueryBoundaryError,K as QueryBoundaryFallback,dt as QueryBoundaryMap,G as QueryBoundaryNullable,U as QueryBoundaryProvider,X as QueryBoundaryWrapper,pt as ReactPlayground,ot as ScreenSizeProvider,mt as SkeletonRow,ct as SnackbarProvider,Ht as SubmitButton,$e as SwitchWithIcons,q as createBaseQueryBoundary,ft as createItemQueryBoundary,ut as createListQueryBoundary,kt as createQueryBoundary,P as useAudioContext,Ut as useDebounce,Q as useDropdownMenu,Wt as useHash,I as useMode,H as useQueryBoundary,rt as useScreenSize,st as useSnackbar};
3
3
  //# sourceMappingURL=index.js.map