@edrlab/thorium-web 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1174,5 +1174,5 @@ var ThSettingsWrapper = ({
1174
1174
  };
1175
1175
 
1176
1176
  export { ThActionButton, ThActionsBar, ThActionsTriggerVariant, ThBottomSheet, ThCloseButton, ThCollapsibleActionsBar, ThContainerBody, ThContainerHeader, ThContainerHeaderWithClose, ThContainerHeaderWithPrevious, ThDockedPanel, ThDragIndicatorButton, ThDropdown, ThDropdownButton, ThFooter, ThForm, ThFormNumberField, ThFormSearchField, ThFormTextField, ThHeader, ThLoader, ThMenu, ThMenuButton, ThMenuItem, ThModal, ThNavigationButton, ThNumberField, ThPopover, ThProgression, ThRadioGroup, ThRunningHead, ThSettingsWrapper, ThSettingsWrapperButton, ThSlider, ThSwitch, ThTypedComponentRenderer, useActions, useFirstFocusable };
1177
- //# sourceMappingURL=chunk-SG5SZZVH.mjs.map
1178
- //# sourceMappingURL=chunk-SG5SZZVH.mjs.map
1177
+ //# sourceMappingURL=chunk-2U455VSY.mjs.map
1178
+ //# sourceMappingURL=chunk-2U455VSY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/Components/Actions/hooks/useActions.ts","../src/core/Components/Actions/ThActionsBar.tsx","../src/core/Components/Menu/assets/icons/more_vert.svg","../src/core/Components/Buttons/ThActionButton.tsx","../src/core/Components/Menu/ThMenuButton.tsx","../src/core/Components/Menu/ThMenu.tsx","../src/core/Components/Actions/ThCollapsibleActionsBar.tsx","../src/core/Components/Buttons/assets/icons/close.svg","../src/core/Components/Buttons/ThCloseButton.tsx","../src/core/Components/Containers/ThBottomSheet/assets/icons/horizontal_rule.svg","../src/core/Components/Containers/ThBottomSheet/ThDragIndicatorButton.tsx","../src/core/Components/Buttons/assets/icons/arrow_back.svg","../src/core/Components/Buttons/assets/icons/arrow_forward.svg","../src/core/Components/Buttons/ThNavigationButton.tsx","../src/core/Components/Containers/hooks/useFirstFocusable.ts","../src/core/Components/Containers/ThPopover.tsx","../src/core/Components/Containers/ThModal.tsx","../src/core/Components/Containers/ThDockedPanel.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeader.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeaderWithClose.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeaderWithPrevious.tsx","../src/core/Components/Containers/ThContainerBody.tsx","../src/core/Components/Containers/ThBottomSheet/ThBottomSheet.tsx","../src/core/Components/Containers/ThTypedComponentRenderer.tsx","../src/core/Components/Form/ThForm.tsx","../src/core/Components/Form/Fields/ThFormNumberField.tsx","../src/core/Components/Form/Fields/ThFormTextField.tsx","../src/core/Components/Form/Fields/assets/icons/search.svg","../src/core/Components/Form/Fields/ThFormSearchField.tsx","../src/core/Components/Menu/ThMenuItem.tsx","../src/core/Components/Reader/ThFooter.tsx","../src/core/Components/Reader/ThLoader.tsx","../src/core/Components/Reader/ThHeader.tsx","../src/core/Components/Reader/ThProgression.tsx","../src/core/Components/Reader/ThRunningHead.tsx","../src/core/Components/Settings/assets/icons/add.svg","../src/core/Components/Settings/assets/icons/remove.svg","../src/core/Components/Settings/ThNumberField.tsx","../src/core/Components/Settings/ThRadioGroup.tsx","../src/core/Components/Settings/ThSlider.tsx","../src/core/Components/Settings/ThSwitch.tsx","../src/core/Components/Settings/ThDropdown/assets/icons/arrow_drop_down.svg","../src/core/Components/Settings/ThDropdown/ThDropdownButton.tsx","../src/core/Components/Settings/ThDropdown/ThDropdown.tsx","../src/core/Components/Settings/ThSettingsWrapper/assets/icons/settings.svg","../src/core/Components/Settings/ThSettingsWrapper/ThSettingsWrapperButton.tsx","../src/core/Components/Settings/ThSettingsWrapper/ThSettingsWrapper.tsx"],"names":["ThActionsTriggerVariant","jsx","jsxs","Fragment","React","useObjectRef","Button","useRef","input","element","Popover","Dialog","useEffect","FocusScope","Label","Input","Text","FieldError","NumberField","Heading","createElement"],"mappings":";;;;;;;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,GAAA,MAAA,CAAO,IAAK,CAAA,KAAK,CAAE,CAAA,MAAA,IACjC,YAAgB,IAAA,YAAA,CAAa,MAAS,GAAA,CAAA,CAAA;AAGxC,EAAA,IAAI,KAAO,EAAA;AACT,IAAA,uBACEA,GAAAA,CAAAE,QAAA,EAAA,EACA,QAAAD,kBAAAA,IAAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACE,GAAG,KAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAc,UAAA,IAAA,SAAA,EAAW,KACzB,oBAAAD,GAACkB,CAAAA,OAAAA,EAAA,EAAU,GAAG,SAAA,EAAW,OACrB,EAAA,QAAA,EAAA,SAAA,CAAU,KACd,EAAA,CAAA;AAAA,UACA,IAAK,CAAA,GAAA,CAAI,CAAC,GAAA,EAAK,KAAU,KAAA;AACzB,YAAM,MAAA,KAAA,GAAQ,MAAM,GAAG,CAAA;AACvB,YAAA,OAAO,KAAS,oBAAAlB,GAAC,CAAA,KAAA,CAAM,IAAN,EAAA,EAAuB,UAAa,EAAA,CAAC,UAAc,IAAA,KAAA,KAAU,CAAM,EAAA,GAAG,SAArD,GAA6D,CAAA;AAAA,WAChG,CAAA;AAAA,UACC,8BACAA,GAAAA;AAAA,YAAC,uBAAA;AAAA,YAAA;AAAA,cACG,GAAG,SAAW,EAAA;AAAA;AAAA;AAClB;AAAA;AAAA,KAGJ,EAAA,CAAA;AAAA;AAGN","file":"chunk-SG5SZZVH.mjs","sourcesContent":["\"use client\";\n\nimport { ActionStateObject } from \"@/lib/actionsReducer\";\n\nexport interface ThActionMap {\n [key: string | number | symbol]: ActionStateObject | undefined;\n}\n\nexport const useActions = <K extends string | number | symbol>(actionMap: ThActionMap) => {\n const findOpen = () => {\n const open: K[] = [];\n\n Object.entries(actionMap).forEach(([key, value]) => {\n if (value?.isOpen) open.push(key as K);\n });\n\n return open;\n };\n\n const anyOpen = () => {\n return Object.values(actionMap).some((value) => value?.isOpen);\n };\n\n const isOpen = (key?: K | null) => {\n if (key) {\n if (actionMap[key]?.isOpen == null) {\n return false;\n } else {\n return actionMap[key]?.isOpen;\n }\n }\n return false;\n };\n\n const findDocked = () => {\n const docked: K[] = [];\n\n Object.entries(actionMap).forEach(([key, value]) => {\n if (value?.docking) docked.push(key as K);\n });\n\n return docked;\n };\n\n const anyDocked = () => {\n return Object.values(actionMap).some((value) => value?.docking);\n };\n\n const isDocked = (key?: K | null) => {\n return key ? !!(actionMap[key]?.docking) : false;\n };\n\n const whichDocked = (key?: K | null) => {\n return key ? actionMap[key]?.docking : null;\n };\n\n const getDockedWidth = (key?: K | null) => {\n return key && actionMap[key]?.dockedWidth || undefined;\n };\n\n const everyOpenDocked = () => {\n const opens = findOpen();\n\n return opens.every((key) => {\n return isDocked(key);\n });\n };\n\n return {\n findOpen,\n anyOpen,\n isOpen,\n findDocked,\n anyDocked,\n isDocked,\n whichDocked,\n getDockedWidth,\n everyOpenDocked,\n };\n};","\"use client\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { Toolbar, ToolbarProps } from \"react-aria-components\";\n\nexport enum ThActionsTriggerVariant {\n button = \"iconButton\",\n menu = \"menuItem\"\n}\n\nexport interface ThActionEntry<T> {\n key: T;\n associatedKey?: string;\n Trigger: React.ComponentType<any>;\n Target?: React.ComponentType<any>;\n}\n\nexport interface ThActionsBarProps extends ToolbarProps {\n ref?: React.ForwardedRef<HTMLDivElement>\n};\n\nexport const ThActionsBar = ({ \n ref, \n children, \n ...props \n}: ThActionsBarProps) => {\n const resolvedRef = useObjectRef(ref);\n\n return (\n <Toolbar \n ref={ resolvedRef } \n { ...props }\n >\n { children }\n </Toolbar>\n )\n}","import * as React from \"react\";\nconst SvgMoreVert = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z\" /></svg>;\nexport default SvgMoreVert;","\"use client\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Button, ButtonProps, Tooltip, TooltipProps, TooltipTrigger } from \"react-aria-components\";\nimport { TooltipTriggerProps } from \"react-aria\";\n\nexport interface ThActionButtonProps extends ButtonProps {\n label?: string,\n ref?: React.ForwardedRef<HTMLButtonElement>,\n compounds?: {\n /**\n * Props for the tooltipTrigger component. See `TooltipTriggerProps` for more information.\n */\n tooltipTrigger?: WithRef<TooltipTriggerProps, HTMLDivElement>,\n /**\n * Props for the tooltip component. See `TooltipProps` for more information.\n */\n tooltip?: WithRef<TooltipProps, HTMLDivElement>,\n /**\n * String for the tooltip\n */\n label: string \n }\n}\n\nexport const ThActionButton = ({\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => { \n if (compounds) {\n return (\n <>\n <TooltipTrigger\n { ...compounds.tooltipTrigger }\n >\n <Button \n ref={ ref }\n { ...props }\n >\n { children } \n </Button>\n <Tooltip\n arrowBoundaryOffset={ 0 }\n { ...compounds.tooltip }\n >\n { compounds.label }\n </Tooltip>\n </TooltipTrigger>\n </>\n )\n } else {\n return (\n <>\n <Button \n { ...props }\n >\n { children }\n </Button>\n </>\n )\n }\n}","\"use client\";\n\nimport MoreVertIcon from \"./assets/icons/more_vert.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"../Buttons/ThActionButton\";\n\nexport const ThMenuButton = ({\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => {\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children \n ? children \n : <>\n <MoreVertIcon aria-hidden=\"true\" focusable=\"false\" /> \n { label }\n </> \n }\n </ThActionButton>\n )\n}","\"use client\";\n\nimport React, { useRef } from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Menu, MenuProps, MenuTrigger, MenuTriggerProps, Popover, PopoverProps } from \"react-aria-components\";\n\nimport { ThMenuButton } from \"./ThMenuButton\";\nimport { ThActionButtonProps } from \"../Buttons\";\nimport { ThActionEntry, ThActionsTriggerVariant } from \"../Actions/ThActionsBar\";\n\nexport interface THMenuProps<T> extends MenuProps<ThActionEntry<T>> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n triggerRef?: React.RefObject<HTMLElement | null>;\n items?: Iterable<ThActionEntry<T>>;\n children?: never;\n compounds?: {\n /**\n * Props for the trigger component. See `MenuTriggerProps` for more information.\n */\n menuTrigger?: Omit<WithRef<MenuTriggerProps, HTMLDivElement>, \"children\">;\n /**\n * Props for the button component. See `ThActionButtonProps` for more information.\n * Alternatively you can provide your own component\n */\n button?: ThActionButtonProps | React.ReactElement<ThActionButtonProps>;\n /**\n * Props for the popover component. See `PopoverProps` for more information.\n */\n popover?: WithRef<PopoverProps, HTMLDivElement>;\n }\n}\n\nexport const ThMenu = ({\n ref,\n id,\n triggerRef,\n items,\n dependencies,\n compounds,\n ...props\n}: THMenuProps<string>) => {\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n if (items) {\n return (\n <>\n <MenuTrigger \n { ...compounds?.menuTrigger }\n >\n { compounds?.button && React.isValidElement(compounds.button) \n ? compounds.button \n : <ThMenuButton \n ref={ buttonRef }\n { ...compounds?.button as ThActionButtonProps }\n />\n }\n <Popover { ...compounds?.popover }>\n <Menu \n ref={ ref }\n id={ id }\n dependencies={ dependencies }\n { ...props }\n >\n { Array.from(items).map(({ Trigger, key, associatedKey }) => \n <Trigger \n key={ `${ key }-menuItem` } \n variant={ ThActionsTriggerVariant.menu }\n { ...(associatedKey ? { associatedKey: associatedKey } : {}) } \n { ...props }\n />\n )}\n </Menu>\n </Popover>\n </MenuTrigger>\n { Array.from(items).map(({ Target, key }) => \n Target && <Target key={ `${ key }-container` } triggerRef={ triggerRef || buttonRef } { ...props } />\n )}\n </>\n )\n }\n}","\"use client\";\n\nimport React, { Fragment } from \"react\";\n\nimport { ThActionEntry, ThActionsBar, ThActionsBarProps, ThActionsTriggerVariant } from \"./ThActionsBar\";\nimport { ThMenu, THMenuProps } from \"../Menu/ThMenu\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { CollapsiblePref, useCollapsibility } from \"./hooks/useCollapsibility\";\n\nexport interface ThCollapsibleActionsBarProps extends ThActionsBarProps {\n id: string;\n items: ThActionEntry<string>[];\n prefs: CollapsiblePref;\n breakpoint?: string;\n children?: never;\n compounds?: {\n menu: THMenuProps<string> | React.ReactElement<typeof ThMenu>;\n }\n}\n\nexport const ThCollapsibleActionsBar = ({\n ref,\n id,\n items,\n prefs,\n breakpoint,\n compounds,\n ...props\n}: ThCollapsibleActionsBarProps) => {\n const resolvedRef = useObjectRef(ref);\n const Actions = useCollapsibility(items, prefs, breakpoint);\n\n return (\n <>\n <ThActionsBar \n ref={ resolvedRef }\n { ...props }\n >\n { Actions.ActionIcons.map(({ Trigger, Target, key, associatedKey }) => \n <Fragment key={ key }>\n <Trigger \n key={ `${ key }-trigger` } \n variant={ ThActionsTriggerVariant.button }\n { ...(associatedKey ? { associatedKey: associatedKey } : {}) } \n { ...props }\n />\n { Target && <Target key={ `${ key }-container` } triggerRef={ resolvedRef } /> }\n </Fragment>\n ) \n }\n\n { React.isValidElement(compounds?.menu) \n ? (React.cloneElement(compounds.menu, {\n ...compounds.menu.props,\n id: id,\n triggerRef: resolvedRef,\n items: Actions.MenuItems,\n dependencies: [\"Trigger\"],\n } as THMenuProps<string>)) \n : (<ThMenu \n id={ id } \n triggerRef={ resolvedRef }\n items={ Actions.MenuItems }\n dependencies={ [\"Trigger\"] }\n { ...compounds?.menu }\n />\n )}\n </ThActionsBar>\n </>\n )\n}\n","import * as React from \"react\";\nconst SvgClose = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\" /></svg>;\nexport default SvgClose;","\"use client\";\n\nimport Close from \"./assets/icons/close.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"./ThActionButton\";\n\nexport const ThCloseButton = ({\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => {\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children \n ? children \n : <>\n <Close aria-hidden=\"true\" focusable=\"false\" /> \n { label }\n </> \n }\n </ThActionButton>\n )\n}","import * as React from \"react\";\nconst SvgHorizontalRule = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M200-440q-17 0-28.5-11.5T160-480q0-17 11.5-28.5T200-520h560q17 0 28.5 11.5T800-480q0 17-11.5 28.5T760-440H200Z\" /></svg>;\nexport default SvgHorizontalRule;","\"use client\";\n\nimport HorizontalRule from \"./assets/icons/horizontal_rule.svg\";\n\nimport { Button, ButtonProps } from \"react-aria-components\";\n\nexport interface ThDragIndicatorButtonProps extends ButtonProps {\n ref?: React.ForwardedRef<HTMLButtonElement>;\n}\n\nexport const ThDragIndicatorButton = ({\n ref,\n children,\n ...props\n}: ThDragIndicatorButtonProps) => {\n return (\n <>\n <Button \n ref={ ref }\n { ...props }\n >\n { children ? children : <HorizontalRule aria-hidden=\"true\" focusable=\"false\" /> }\n </Button>\n </>\n )\n}","import * as React from \"react\";\nconst SvgArrowBack = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M640-80 240-480l400-400 71 71-329 329 329 329-71 71Z\" /></svg>;\nexport default SvgArrowBack;","import * as React from \"react\";\nconst SvgArrowForward = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z\" /></svg>;\nexport default SvgArrowForward;","\"use client\";\n\nimport React from \"react\";\n\nimport ArrowBack from \"./assets/icons/arrow_back.svg\";\nimport ArrowForward from \"./assets/icons/arrow_forward.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"./ThActionButton\";\n\nexport interface ThNavigationButtonProps extends ThActionButtonProps {\n direction?: \"left\" | \"right\";\n}\n\nexport const ThNavigationButton = ({\n direction,\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThNavigationButtonProps) => {\n const fallBackChildren = (\n <React.Fragment>\n { direction === \"right\"\n ? <ArrowForward aria-hidden=\"true\" focusable=\"false\" />\n : <ArrowBack aria-hidden=\"true\" focusable=\"false\" />\n }\n { label }\n </React.Fragment>\n );\n\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children || fallBackChildren }\n </ThActionButton>\n )\n}\n","\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nexport interface UseFirstFocusableProps {\n withinRef?: React.RefObject<HTMLElement | null>;\n fallbackRef?: React.RefObject<HTMLElement | null>;\n scrollerRef?: React.RefObject<HTMLElement | null>;\n trackedState?: boolean;\n autoFocus?: boolean;\n updateState?: unknown;\n}\n\nexport const useFirstFocusable = (props?: UseFirstFocusableProps) => {\n const { withinRef, fallbackRef, scrollerRef, trackedState, autoFocus = true, updateState } = props ?? {};\n\n const focusableElement = useRef<HTMLElement | null>(null);\n const attemptsRef = useRef(0);\n\n useEffect(() => {\n if (!withinRef || !trackedState) return;\n\n attemptsRef.current = 0;\n\n const tryFocus = () => {\n const targetElement = withinRef.current && withinRef.current.firstElementChild || withinRef.current;\n const selectedEl = targetElement && targetElement.querySelector(\"[data-selected]\");\n\n let firstFocusable: HTMLElement | null = null;\n\n if (selectedEl === null) {\n const inputs = targetElement && targetElement.querySelectorAll(\"input\");\n const input = inputs && Array.from(inputs).find((input: HTMLInputElement) => !input.disabled && input.tabIndex >= 0);\n firstFocusable = input as HTMLElement | null;\n } else if (selectedEl instanceof HTMLElement) {\n firstFocusable = selectedEl;\n }\n\n if (!firstFocusable) {\n const focusableElements = withinRef.current && withinRef.current.querySelectorAll(\"a, button, input, select\");\n const element = focusableElements && Array.from(focusableElements).find(element => {\n const htmlElement = element as HTMLAnchorElement | HTMLButtonElement | HTMLInputElement | HTMLSelectElement;\n if (htmlElement instanceof HTMLAnchorElement) return true;\n return !htmlElement.disabled && htmlElement.tabIndex >= 0;\n });\n firstFocusable = element as HTMLElement | null;\n }\n\n if (firstFocusable) {\n if (autoFocus) {\n firstFocusable.focus({ preventScroll: true });\n if (scrollerRef?.current) {\n scrollerRef.current.scrollTop = 0;\n } else {\n withinRef.current!.scrollTop = 0;\n }\n }\n focusableElement.current = firstFocusable;\n } else {\n attemptsRef.current++;\n if (attemptsRef.current < 3) {\n setTimeout(tryFocus, 50);\n } else {\n if (fallbackRef?.current) {\n if (autoFocus) {\n fallbackRef.current.focus({ preventScroll: true });\n }\n focusableElement.current = fallbackRef.current;\n }\n }\n }\n };\n\n tryFocus();\n\n return () => {\n attemptsRef.current = 0;\n };\n }, [withinRef, fallbackRef, scrollerRef, trackedState, autoFocus, updateState]);\n\n return focusableElement.current;\n};","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { Dialog, DialogProps, Popover, PopoverProps } from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThPopoverProps extends Omit<PopoverProps, \"children\">, ThContainerProps {\n triggerRef: React.RefObject<HTMLElement | null>;\n compounds?: {\n dialog: WithRef<DialogProps, HTMLDivElement>;\n }\n}\n\nexport const ThPopover = ({ \n ref,\n triggerRef,\n focusOptions,\n compounds,\n maxHeight,\n children, \n ...props \n}: ThPopoverProps) => {\n const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n useFirstFocusable(focusOptions);\n\n const computeMaxHeight = () => {\n if (!resolvedRef.current) return;\n return window.innerHeight - resolvedRef.current.offsetTop;\n };\n\n return (\n <Popover \n ref={ resolvedRef }\n triggerRef={ triggerRef }\n maxHeight={ maxHeight || computeMaxHeight() }\n { ...props }\n >\n <Dialog { ...compounds?.dialog }>\n { children }\n </Dialog>\n </Popover>\n )\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { Dialog, DialogProps, Modal, ModalOverlayProps } from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThModalProps extends Omit<ModalOverlayProps, \"children\">, ThContainerProps {\n compounds?: {\n dialog: WithRef<DialogProps, HTMLDivElement>;\n }\n}\n\nexport const ThModal = ({ \n ref,\n focusOptions,\n compounds,\n children, \n ...props \n}: ThModalProps) => {\n const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n useFirstFocusable(focusOptions);\n\n return (\n <Modal \n ref={ resolvedRef }\n { ...props }\n >\n <Dialog { ...compounds?.dialog }>\n { children }\n </Dialog>\n </Modal>\n )\n}","\"use client\";\n\nimport React from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { FocusScope, useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThDockedPanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">, ThContainerProps {\n isOpen: boolean;\n portal: HTMLElement | null;\n}\n\nexport const ThDockedPanel = ({ \n ref,\n isOpen,\n portal,\n focusOptions,\n children, \n ...props \n}: ThDockedPanelProps) => {\n const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n useFirstFocusable(focusOptions);\n\n return (\n <>\n { isOpen && portal && createPortal(\n <FocusScope \n contain={ false }\n autoFocus={ focusOptions?.autoFocus ?? true } \n restoreFocus={ true }\n >\n <div\n ref={ resolvedRef } \n { ...props }\n >\n { children }\n </div>\n </FocusScope>\n , portal)\n }\n </>\n )\n}","\"use client\";\n\nimport { Heading, HeadingProps } from \"react-aria-components\";\nimport { HTMLAttributesWithRef, WithRef } from \"../../customTypes\";\n\nexport interface ThContainerHeaderProps extends HTMLAttributesWithRef<HTMLDivElement> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label: string;\n compounds?: {\n heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n }\n}\n\nexport const ThContainerHeader = ({ \n ref,\n label,\n compounds,\n children,\n ...props \n}: ThContainerHeaderProps) => {\n return (\n <div \n ref={ ref } \n { ...props }\n >\n <Heading \n slot=\"title\"\n { ...compounds?.heading }\n >\n { label }\n </Heading>\n { children }\n </div>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { HeadingProps } from \"react-aria-components\";\nimport { ThActionButtonProps, ThCloseButton } from \"../../Buttons\";\nimport { ThContainerHeader, ThContainerHeaderProps } from \"./ThContainerHeader\"\n\nexport interface THContainerWithCloseProps extends ThContainerHeaderProps {\n closeRef?: React.ForwardedRef<HTMLButtonElement>;\n children?: never;\n compounds?: {\n heading: WithRef<HeadingProps, HTMLHeadingElement>;\n button: ThActionButtonProps;\n }\n}\nexport const ThContainerHeaderWithClose = ({ \n ref,\n closeRef,\n label,\n compounds,\n ...props \n}: THContainerWithCloseProps) => {\n return (\n <ThContainerHeader \n ref={ ref } \n label={ label }\n { ...props }\n compounds={ { heading: compounds?.heading }}\n >\n <ThCloseButton ref={ closeRef } { ...compounds?.button } />\n </ThContainerHeader>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { HeadingProps } from \"react-aria-components\";\nimport { ThNavigationButton, ThNavigationButtonProps } from \"../../Buttons\";\nimport { ThContainerHeader, ThContainerHeaderProps } from \"./ThContainerHeader\"\n\nexport interface THContainerWithPreviousProps extends ThContainerHeaderProps {\n previousRef?: React.ForwardedRef<HTMLButtonElement>;\n children?: never;\n compounds?: {\n heading: WithRef<HeadingProps, HTMLHeadingElement>;\n button: ThNavigationButtonProps;\n }\n}\nexport const ThContainerHeaderWithPrevious = ({ \n ref,\n previousRef,\n label,\n compounds,\n ...props \n}: THContainerWithPreviousProps) => {\n return (\n <ThContainerHeader \n ref={ ref } \n label={ label }\n { ...props }\n compounds={ { heading: compounds?.heading }}\n >\n <ThNavigationButton ref={ previousRef } { ...compounds?.button } />\n </ThContainerHeader>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThContainerBodyProps extends HTMLAttributesWithRef<HTMLDivElement> {}\n\nexport const ThContainerBody = ({ \n ref,\n children,\n ...props \n}: ThContainerBodyProps) => {\n return (\n <div \n ref={ ref } \n { ...props }\n >\n { children }\n </div>\n )\n}","\"use client\";\n\nimport React, { \n CSSProperties,\n RefObject, \n useCallback, \n useEffect, \n useMemo, \n useState \n} from \"react\";\n\nimport { OverlayTriggerState, useOverlayTriggerState } from \"react-stately\";\n\nimport { ThContainerHeader, ThContainerHeaderProps } from \"../ThContainerHeader\";\nimport { ThContainerBody } from \"../ThContainerBody\";\nimport { ThContainerProps } from \"../ThContainer\";\nimport { useFirstFocusable, UseFirstFocusableProps } from \"../hooks/useFirstFocusable\";\n\nimport { ThDragIndicatorButton, ThDragIndicatorButtonProps } from \"./ThDragIndicatorButton\";\n\nimport { Sheet, SheetRef } from \"react-modal-sheet\";\nimport { HeadingProps } from \"react-aria-components\";\nimport { \n AriaOverlayProps, \n FocusScope, \n OverlayProvider, \n useDialog, \n useModal, \n useObjectRef, \n useOverlay \n} from \"react-aria\";\n\nexport interface ThBottomSheetHeaderProps extends ThContainerHeaderProps {\n wrapper: React.ComponentProps<typeof Sheet.Header>,\n dragIndicator: React.ComponentProps<typeof ThDragIndicatorButton>,\n header: ThContainerHeaderProps,\n heading: HeadingProps\n}\n\nexport interface ThBottomSheetCompounds {\n container?: Omit<React.ComponentProps<typeof Sheet.Container>, \"children\">,\n header?: React.ComponentProps<typeof Sheet.Header>,\n dragIndicator?: ThDragIndicatorButtonProps,\n content?: React.ComponentProps<typeof Sheet.Content>,\n scroller?: React.ComponentProps<typeof Sheet.Scroller>,\n backdrop?: React.ComponentProps<typeof Sheet.Backdrop>\n}\n\nexport interface ThBottomSheetProps extends Omit<React.ComponentProps<typeof Sheet>, \"children\" | \"ref\" | \"isOpen\" | \"onClose\">, AriaOverlayProps, ThContainerProps {\n onOpenChange?: (isOpen: boolean) => void;\n isKeyboardDismissDisabled?: boolean;\n compounds?: ThBottomSheetCompounds;\n}\n\nconst ThBottomSheetContainer = ({\n sheetRef,\n sheetState,\n isDraggable, \n isKeyboardDismissDisabled,\n focusOptions,\n compounds,\n children\n}: {\n sheetRef: RefObject<HTMLDivElement | SheetRef | null>;\n sheetState: OverlayTriggerState;\n onFullHeight?: Omit<React.ComponentProps<typeof Sheet.Container>, \"children\">;\n isDraggable?: boolean;\n isKeyboardDismissDisabled?: boolean;\n focusOptions?: UseFirstFocusableProps;\n compounds?: ThBottomSheetCompounds;\n children: ThContainerProps[\"children\"];\n}) => {\n const containerRef = useObjectRef(compounds?.container?.ref);\n const scrollerRef = useObjectRef(compounds?.scroller?.ref);\n const dialog = useDialog({}, containerRef);\n const overlay = useOverlay({ \n onClose: sheetState.close, \n isOpen: true, \n isDismissable: true,\n isKeyboardDismissDisabled: isKeyboardDismissDisabled\n }, containerRef);\n const [isFullHeight, setFullHeight] = useState<boolean>(false);\n\n useModal();\n\n const fullHeightIntersectionCallback = useCallback((entries: IntersectionObserverEntry[]) => {\n entries.forEach( (entry) => {\n if (\n entry.isIntersecting && \n entry.intersectionRatio === 1 && \n // For some reason width is larger on mobile (and border-right is almost invisible)…\n entry.boundingClientRect.width >= window.innerWidth\n ) {\n setFullHeight(true);\n } else {\n setFullHeight(false);\n }\n });\n }, [setFullHeight]);\n\n useEffect(() => {\n const observer = new IntersectionObserver(fullHeightIntersectionCallback, {\n threshold: 1.0\n });\n containerRef.current && observer.observe(containerRef.current);\n\n return () => {\n observer.disconnect();\n }\n });\n\n const [Header, Body] = useMemo(() => {\n const header = children.find((child) => child.type === ThContainerHeader);\n const body = children.find((child) => child.type === ThContainerBody);\n \n const modifiedHeader = header ? React.cloneElement(header as React.ReactElement<ThContainerHeaderProps>, {\n ...header.props,\n compounds: {\n ...(header.props as ThContainerHeaderProps).compounds,\n heading: {\n ...(header.props as ThContainerHeaderProps).compounds?.heading,\n ...dialog.titleProps\n }\n }\n }) : null;\n\n return [modifiedHeader, body];\n }, [children, dialog.titleProps]);\n\n const updatedFocusOptions = focusOptions ? {\n ...focusOptions,\n scrollerRef: scrollerRef\n } : undefined;\n\n useFirstFocusable(updatedFocusOptions);\n\n return (\n <>\n <Sheet.Container \n { ...compounds?.container }\n ref={ containerRef }\n {...(isFullHeight ? { \"data-full-height\": \"true\" } : {} )}\n { ...overlay.overlayProps as any}\n { ...dialog.dialogProps }\n >\n <Sheet.Header\n { ...compounds?.header }\n >\n { isDraggable && \n <ThDragIndicatorButton \n { ...compounds?.dragIndicator }\n /> \n }\n { Header }\n </Sheet.Header>\n <Sheet.Content \n { ...compounds?.content }\n // Motion being picky with style on bundling so we have to cast like this… \n { ...(isDraggable ? { style: { paddingBottom: (sheetRef.current as SheetRef)?.y }} as { [key: string]: any } : {} )}\n >\n <Sheet.Scroller \n ref={ scrollerRef }\n { ...compounds?.scroller }\n // This is enabled by default since 4.4 but breaks scroll on focus…\n autoPadding={ false }\n >\n { Body }\n </Sheet.Scroller>\n </Sheet.Content>\n </Sheet.Container>\n <Sheet.Backdrop \n { ...compounds?.backdrop }\n />\n </>\n )\n}\n\nexport const ThBottomSheet = ({\n id,\n isOpen,\n onOpenChange,\n ref,\n focusOptions,\n isKeyboardDismissDisabled,\n detent,\n snapPoints,\n compounds,\n children, \n ...props\n}: ThBottomSheetProps) => {\n const resolvedRef = useObjectRef(ref);\n\n let sheetState = useOverlayTriggerState({\n isOpen: isOpen,\n onOpenChange: onOpenChange\n });\n\n const isDraggable = useMemo(() => snapPoints && snapPoints.length > 1, [snapPoints]);\n\n return(\n <>\n <Sheet\n ref={ resolvedRef }\n isOpen={ sheetState.isOpen }\n onClose={ sheetState.close }\n // Otherwise buggy with prefersReducedMotion\n // as the bottom sheet won’t be displayed on mount\n style={{\n zIndex: isOpen ? \"999999\" : \"-1\",\n visibility: isOpen ? \"visible\" : \"hidden\"\n } as CSSProperties }\n detent={ detent }\n snapPoints={ snapPoints }\n { ...props }\n >\n <OverlayProvider>\n <FocusScope \n contain={ true } \n autoFocus={ focusOptions?.autoFocus ?? true } \n restoreFocus={ true }\n >\n <ThBottomSheetContainer \n sheetRef={ resolvedRef } \n sheetState={ sheetState } \n isDraggable= { isDraggable }\n isKeyboardDismissDisabled={ isKeyboardDismissDisabled }\n focusOptions={ focusOptions }\n compounds={ compounds }\n >\n { children }\n </ThBottomSheetContainer>\n </FocusScope>\n </OverlayProvider>\n </Sheet> \n </>\n )\n}","\"use client\";\n\nimport React, { ReactNode } from \"react\";\n\nexport type ComponentMap<T extends string> = {\n [type in T]: React.ComponentType<any>;\n}\n\nexport interface TypedComponentRendererProps<T extends string, K extends keyof ComponentMap<T>> {\n type: K;\n componentMap: ComponentMap<T>;\n props?: any;\n children?: ReactNode;\n}\n\nexport const ThTypedComponentRenderer = <T extends string, K extends keyof ComponentMap<T>>({\n type,\n componentMap,\n props,\n children,\n}: TypedComponentRendererProps<T, K>) => {\n const Component = componentMap[type];\n\n if (!Component) {\n throw new Error(`Unsupported type: ${type}`);\n }\n\n return React.createElement(Component, props, children);\n};","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Button, ButtonProps, Form, FormProps } from \"react-aria-components\";\n\nexport interface ThFormProps extends FormProps {\n ref?: React.ForwardedRef<HTMLFormElement>;\n label: string;\n compounds?: {\n button?: Exclude<WithRef<ButtonProps, HTMLButtonElement>, \"type\"> | React.ReactElement<typeof Button>;\n }\n}\n\nexport const ThForm = ({\n ref,\n label,\n compounds,\n children,\n ...props\n}: ThFormProps) => {\n return(\n <>\n <Form\n ref={ ref }\n {...props}\n >\n { children }\n \n { compounds?.button && React.isValidElement(compounds.button) \n ? compounds.button \n : <Button\n { ...compounds?.button }\n type=\"submit\"\n >\n { label }\n </Button>\n }\n </Form>\n </>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n Input, \n InputProps, \n Label, \n LabelProps, \n NumberField, \n NumberFieldProps, \n Text \n} from \"react-aria-components\";\n\nexport interface ThFormNumberFieldProps extends NumberFieldProps {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n compounds?: {\n label?: WithRef<LabelProps, HTMLLabelElement>;\n input?: WithRef<InputProps, HTMLInputElement>;\n description?: string;\n }\n}\n\nexport const ThFormNumberField = ({\n ref,\n label,\n compounds,\n children,\n ...props\n}: ThFormNumberFieldProps) => {\n return(\n <>\n <NumberField\n ref={ ref }\n {...props }\n >\n { children \n ? children \n : <>\n { label && <Label {...compounds?.label }>\n { label }\n </Label>\n }\n\n <Input {...compounds?.input } />\n \n { compounds?.description && <Text slot=\"description\"> \n { compounds?.description } \n </Text> \n }\n </> \n }\n </NumberField>\n </>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n FieldError, \n FieldErrorProps, \n Input, \n InputProps, \n Label, \n LabelProps, \n Text, \n TextField, \n TextFieldProps, \n ValidationResult \n} from \"react-aria-components\";\n\nexport interface ThFormTextFieldProps extends TextFieldProps {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n compounds?: {\n label?: WithRef<LabelProps, HTMLLabelElement>;\n input?: WithRef<InputProps, HTMLInputElement>;\n description?: string;\n fieldError?: WithRef<FieldErrorProps, HTMLDivElement>;\n },\n errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport const ThFormTextField = ({\n ref,\n label,\n children,\n compounds,\n errorMessage,\n ...props\n}: ThFormTextFieldProps) => {\n return(\n <>\n <TextField\n ref={ ref }\n {...props }\n >\n <>\n { children \n ? children \n : <>\n { label && <Label {...compounds?.label }>\n { label }\n </Label>\n }\n \n { errorMessage && <FieldError { ...compounds?.fieldError }>\n { errorMessage }\n </FieldError> \n }\n \n <Input {...compounds?.input } />\n \n { compounds?.description && <Text slot=\"description\"> \n { compounds?.description } \n </Text> \n }\n </> \n }\n </>\n </TextField>\n </>\n )\n}","import * as React from \"react\";\nconst SvgSearch = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z\" /></svg>;\nexport default SvgSearch;","\"use client\";\n\nimport React, { HTMLAttributes } from \"react\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport SearchIcon from \"./assets/icons/search.svg\";\n\nimport { \n FieldError, \n FieldErrorProps, \n Input, \n InputProps, \n Label, \n LabelProps, \n SearchField, \n SearchFieldProps, \n Text, \n ValidationResult \n} from \"react-aria-components\";\nimport { ThActionButtonProps, ThCloseButton } from \"../../Buttons\";\n\nexport interface ThFormSearchFieldProps extends SearchFieldProps {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n compounds?: {\n label?: WithRef<LabelProps, HTMLLabelElement>;\n input?: WithRef<InputProps, HTMLInputElement>;\n searchIcon?: HTMLAttributes<HTMLDivElement> | React.ReactElement<HTMLDivElement>;\n clearButton?: ThActionButtonProps | React.ReactElement<ThActionButtonProps>;\n description?: string;\n fieldError?: WithRef<FieldErrorProps, HTMLDivElement>;\n },\n errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport const ThFormSearchField = ({\n ref,\n label,\n children,\n compounds,\n errorMessage,\n ...props\n}: ThFormSearchFieldProps) => {\n return(\n <>\n <SearchField\n ref={ ref }\n {...props }\n >\n <>\n { children \n ? children \n : <>\n { label && <Label { ...compounds?.label }>\n { label }\n </Label>\n }\n\n { errorMessage && <FieldError { ...compounds?.fieldError }>\n { errorMessage }\n </FieldError> \n }\n \n <Input { ...compounds?.input } />\n\n { compounds?.searchIcon && React.isValidElement(compounds.searchIcon)\n ? compounds.searchIcon\n : <div {...compounds?.searchIcon }>\n <SearchIcon aria-hidden=\"true\" focusable=\"false\" />\n </div>\n }\n \n { compounds?.clearButton && React.isValidElement(compounds.clearButton) \n ? compounds.clearButton \n : <ThCloseButton { ...compounds?.clearButton } type=\"button\" />\n }\n \n { compounds?.description && <Text slot=\"description\"> \n { compounds?.description } \n </Text> \n }\n </> \n }\n </>\n </SearchField>\n </>\n )\n}","\"use client\";\n\nimport React from \"react\";\nimport { KeyboardProps } from \"react-aria\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Keyboard, LabelProps, MenuItem, MenuItemProps, Text } from \"react-aria-components\";\n\nexport interface ThMenuItemProps extends MenuItemProps {\n ref?: React.Ref<HTMLLIElement>;\n id: string;\n SVGIcon?: React.ComponentType<React.SVGProps<SVGElement>>;\n label: string;\n shortcut?: string;\n compounds?: {\n label: WithRef<LabelProps, HTMLSpanElement>;\n shortcut: WithRef<KeyboardProps, HTMLSpanElement>;\n }\n}\n\nexport const ThMenuItem = ({\n ref,\n id,\n SVGIcon,\n label, \n shortcut,\n compounds,\n children,\n ...props\n}: ThMenuItemProps) => {\n const menuItemLabelId = `${ id }-label`; \n return(\n <>\n <MenuItem \n ref={ ref }\n id={ id } \n { ...(children ? {} : { \"aria-labelledby\": menuItemLabelId }) }\n { ...props }\n >\n { children \n ? children \n : <>\n { SVGIcon && <SVGIcon aria-hidden=\"true\" focusable=\"false\" /> }\n <Text \n { ...compounds?.label } \n slot=\"label\"\n id={ menuItemLabelId }\n >\n { label }\n </Text>\n { shortcut && <Keyboard { ...compounds?.shortcut }>{ shortcut }</Keyboard> }\n </>\n }\n </MenuItem>\n </>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport const ThFooter = ({ \n ref,\n children,\n ...props \n}: HTMLAttributesWithRef<HTMLDivElement>) => {\n return (\n <aside \n ref={ ref } \n { ...props }\n >\n { children }\n </aside>\n )\n}","\"use client\";\n\nimport { ReactNode } from \"react\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThLoaderProps extends Omit<HTMLAttributesWithRef<HTMLDivElement>, \"aria-busy\" | \"aria-live\"> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n isLoading: boolean;\n loader: ReactNode;\n}\n\n// Since we are removing loader entirely, no need for aria-hidden={ !isLoading }\n// No need for a label either since we are using the string for the animation\nexport const ThLoader = ({ \n ref, \n isLoading,\n loader,\n children,\n ...props\n }: ThLoaderProps) => {\n return (\n <>\n <div \n ref={ ref }\n { ...props }\n aria-busy={ isLoading } \n aria-live=\"polite\"\n >\n { isLoading && loader }\n { children }\n </div>\n </>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport const ThHeader = ({ \n ref,\n children,\n ...props \n}: HTMLAttributesWithRef<HTMLDivElement>) => {\n return (\n <header \n ref={ ref } \n { ...props }\n >\n { children }\n </header>\n )\n}","\"use client\";\n\nimport React from \"react\";\n\nexport interface ThProgressionProps extends React.HTMLAttributes<HTMLDivElement> {\n ref?: React.RefObject<HTMLDivElement>\n}\n\nexport const ThProgression = ({ \n ref,\n children, \n ...props\n}: ThProgressionProps) => {\n return (\n <>\n <div \n ref={ ref } \n {...props }\n >\n { children }\n </div>\n </>\n )\n}","\"use client\";\n\nimport React, { useEffect } from \"react\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThRunningHeadProps extends HTMLAttributesWithRef<HTMLHeadingElement> {\n ref?: React.RefObject<HTMLHeadingElement>\n label: string;\n syncDocTitle?: boolean; \n}\n\nexport const ThRunningHead = ({ \n ref,\n label,\n syncDocTitle,\n ...props\n}: ThRunningHeadProps) => {\n\n useEffect(() => {\n if (syncDocTitle && label) document.title = label;\n }, [syncDocTitle, label])\n\n return(\n <>\n <h1 \n ref={ ref }\n { ...props }\n >\n { label }\n </h1>\n </>\n )\n}","import * as React from \"react\";\nconst SvgAdd = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z\" /></svg>;\nexport default SvgAdd;","import * as React from \"react\";\nconst SvgRemove = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M200-440v-80h560v80H200Z\" /></svg>;\nexport default SvgRemove;","\"use client\";\n\nimport { ComponentType, SVGProps } from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport AddIcon from \"./assets/icons/add.svg\";\nimport RemoveIcon from \"./assets/icons/remove.svg\";\n\nimport { \n Button, \n ButtonProps, \n Group, \n GroupProps, \n Input, \n InputProps, \n Label, \n LabelProps, \n NumberField, \n NumberFieldProps \n} from \"react-aria-components\";\n\nexport interface ThNumberFieldProps extends Omit<NumberFieldProps, \"minValue\" | \"maxValue\" | \"decrementAriaLabel\" | \"incrementAriaLabel\"> {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n range: number[];\n isVirtualKeyboardDisabled?: boolean;\n steppers?: {\n decrementIcon?: ComponentType<SVGProps<SVGElement>> | null;\n decrementLabel: string;\n incrementIcon?: ComponentType<SVGProps<SVGElement>> | null;\n incrementLabel: string;\n };\n compounds?: {\n /**\n * Props for the Group component. See `GroupProps` for more information.\n */\n group?: WithRef<GroupProps, HTMLDivElement>;\n /**\n * Props for the Input component. See `InputProps` for more information.\n */\n input?: WithRef<InputProps, HTMLInputElement>;\n /**\n * Props for the Label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the Button component used for decrement/increment. See `ButtonProps` for more information.\n */\n stepper?: ButtonProps;\n };\n}\n\nexport const ThNumberField = ({\n ref,\n label,\n range,\n isVirtualKeyboardDisabled,\n steppers,\n compounds,\n ...props\n}: ThNumberFieldProps) => {\n\n return (\n <NumberField \n ref={ ref }\n minValue={ Math.min(...range) }\n maxValue={ Math.max(...range) }\n decrementAriaLabel={ steppers?.decrementLabel }\n incrementAriaLabel={ steppers?.incrementLabel }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label>\n }\n\n <Group { ...compounds?.group }>\n { steppers && \n <Button \n { ...compounds?.stepper }\n slot=\"decrement\" \n >\n { steppers.decrementIcon \n ? <steppers.decrementIcon aria-hidden=\"true\" focusable=\"false\" /> \n : <RemoveIcon aria-hidden=\"true\" focusable=\"false\" /> }\n </Button> \n }\n\n <Input \n { ...compounds?.input } \n { ...(isVirtualKeyboardDisabled ? { inputMode: \"none\" } : {}) } \n />\n\n { steppers && \n <Button \n { ...compounds?.stepper }\n slot=\"increment\" \n >\n { steppers.incrementIcon \n ? <steppers.incrementIcon aria-hidden=\"true\" focusable=\"false\" /> \n : <AddIcon aria-hidden=\"true\" focusable=\"false\" /> }\n </Button>\n }\n </Group>\n </NumberField>\n );\n};","\"use client\";\n\nimport React, { ComponentType, SVGProps } from \"react\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\n\nimport { \n Label, \n LabelProps, \n Radio, \n RadioGroup, \n RadioGroupProps, \n RadioProps \n} from \"react-aria-components\"\n\nexport interface ThRadioGroupItems {\n value: string;\n icon?: ComponentType<SVGProps<SVGElement>>;\n label: string;\n isDisabled?: boolean;\n}\n\nexport interface ThRadioGroupProps extends RadioGroupProps {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label?: string;\n items?: ThRadioGroupItems[];\n compounds?: {\n /**\n * Props for the wrapper component. See `HTMLAttributesWithRef` for more information.\n */\n wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n /**\n * Props for the label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the radio component. See `RadioProps` for more information.\n */\n radio?: Omit<RadioProps, \"value\">;\n /**\n * Props for the radio label component. See `HTMLAttributesWithRef` for more information.\n */\n radioLabel?: HTMLAttributesWithRef<HTMLSpanElement>;\n }\n}\n\nexport const ThRadioGroup = ({\n ref,\n label,\n items,\n compounds,\n children,\n ...props\n}: ThRadioGroupProps) => {\n if (React.isValidElement(children)) {\n return (\n <RadioGroup \n ref={ ref }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label> \n }\n { children }\n </RadioGroup>\n )\n } else if (items) {\n return (\n <RadioGroup \n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label> \n }\n <div { ...compounds?.wrapper }>\n { items.map((item, index) => (\n <Radio \n { ...compounds?.radio }\n key={ index }\n value={ item.value }\n >\n <React.Fragment>\n { item.icon && <item.icon aria-hidden=\"true\" focusable=\"false\" /> }\n <span { ...compounds?.radioLabel }>\n { item.label }\n </span> \n </React.Fragment>\n </Radio>\n )) }\n </div>\n </RadioGroup>\n )\n }\n}","\"use client\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { \n Label, \n LabelProps, \n Slider, \n SliderOutput, \n SliderOutputProps, \n SliderProps, \n SliderThumb, \n SliderThumbProps, \n SliderTrack, \n SliderTrackProps \n} from \"react-aria-components\";\n\nexport interface ThSliderProps extends Omit<SliderProps, \"minValue\" | \"maxValue\"> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label?: string;\n range: number[];\n compounds?: {\n /**\n * Props for the label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the slider output component. See `SliderOutputProps` for more information.\n */\n output?: WithRef<SliderOutputProps, HTMLOutputElement>;\n /**\n * Props for the slider track component. See `SliderTrackProps` for more information.\n */\n track?: WithRef<SliderTrackProps, HTMLDivElement>;\n /**\n * Props for the slider thumb component. See `SliderThumbProps` for more information.\n */\n thumb?: WithRef<SliderThumbProps, HTMLDivElement>;\n };\n}\n\nexport const ThSlider = ({\n ref,\n label,\n range,\n compounds,\n ...props\n}: ThSliderProps) => {\n return(\n <>\n <Slider \n ref={ ref }\n minValue={ Math.min(...range) }\n maxValue={ Math.max(...range) }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label> \n }\n <SliderOutput { ...compounds?.output } />\n <SliderTrack { ...compounds?.track }>\n <SliderThumb { ...compounds?.thumb } />\n </SliderTrack>\n </Slider>\n </>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\n\nimport { Heading, HeadingProps, Switch, SwitchProps } from \"react-aria-components\";\n\nexport interface ThSwitchProps extends SwitchProps {\n ref?: React.ForwardedRef<HTMLLabelElement>;\n label: string;\n heading?: string;\n compounds?: {\n /**\n * Props for the wrapper component. See `HTMLAttributesWithRef` for more information.\n */\n wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n /**\n * Props for the heading component. See `HeadingProps` for more information.\n */\n heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n /**\n * Props for the indicator component. See `HTMLAttributesWithRef` for more information.\n */\n indicator?: HTMLAttributesWithRef<HTMLDivElement>;\n }\n}\n\nexport const ThSwitch = ({\n ref,\n label,\n compounds,\n heading, \n ...props\n}: ThSwitchProps) => {\n return(\n <>\n <div { ...compounds?.wrapper }>\n { heading && <Heading { ...compounds?.heading }>\n { heading }\n </Heading> \n }\n <Switch \n ref={ ref }\n { ...props }\n >\n <div { ...compounds?.indicator } />\n { label }\n </Switch>\n </div>\n </>\n )\n}","import * as React from \"react\";\nconst SvgArrowDropDown = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M480-360 280-560h400L480-360Z\" /></svg>;\nexport default SvgArrowDropDown;","\"use client\";\n\nimport ArrowDropDownIcon from \"./assets/icons/arrow_drop_down.svg\";\n\nimport { Button, ButtonProps, SelectValue } from \"react-aria-components\";\n\nexport interface ThDropdownButtonProps extends ButtonProps {\n ref?: React.ForwardedRef<HTMLButtonElement>;\n}\n\nexport const ThDropdownButton = ({\n ref,\n children,\n ...props\n}: ThDropdownButtonProps) => {\n return (\n <>\n <Button \n ref={ ref }\n { ...props }\n >\n { children \n ? children \n : <>\n <SelectValue /> \n <ArrowDropDownIcon aria-hidden=\"true\" focusable=\"false\" />\n </> \n }\n </Button>\n </>\n )\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n Button,\n ButtonProps, \n Label, \n LabelProps, \n ListBox, \n ListBoxItem, \n ListBoxItemProps, \n ListBoxProps, \n Popover, \n PopoverProps, \n Select, \n SelectProps \n} from \"react-aria-components\";\nimport { ThDropdownButton, ThDropdownButtonProps } from \"./ThDropdownButton\";\n\nexport interface ThDropdownEntry {\n id: string;\n label: string;\n value: string;\n}\n\nexport interface ThDropdownProps extends SelectProps {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label?: string;\n items?: Iterable<ThDropdownEntry>;\n children?: never;\n compounds?: {\n /**\n * Props for the label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the button component. See `ThDropdownButtonProps` for more information.\n * Alternatively you can provide your own Button component\n */\n button?: WithRef<ButtonProps, HTMLButtonElement> | React.ReactElement<typeof Button>;\n /**\n * Props for the popover component. See `PopoverProps` for more information.\n */\n popover?: WithRef<PopoverProps, HTMLDivElement>;\n /**\n * Props for the listbox component. See `LisboxProps` for more information.\n * Alternatively you can provide your own Listbox component\n */\n listbox?: WithRef<ListBoxProps<ThDropdownEntry>, HTMLDivElement> | React.ReactElement<typeof ListBox | HTMLDivElement>;\n /**\n * Props for the listboxItem component. See `ListBoxItemProps` for more information.\n */\n listboxItem?: ListBoxItemProps<ThDropdownEntry>;\n }\n}\n\nexport const ThDropdown = ({\n ref,\n label,\n items,\n compounds,\n ...props\n}: ThDropdownProps) => {\n if (!items && !React.isValidElement(compounds?.listbox)) {\n return null;\n }\n\n return(\n <>\n <Select\n ref={ ref }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label>\n }\n { compounds?.button && React.isValidElement(compounds.button) \n ? compounds.button \n : <ThDropdownButton { ...compounds?.button as ThDropdownButtonProps } />\n }\n <Popover\n { ...compounds?.popover }\n >\n { compounds?.listbox && React.isValidElement(compounds.listbox) \n ? compounds.listbox \n : <ListBox \n items={ items } \n { ...compounds?.listbox }>\n { (item: ThDropdownEntry) => <ListBoxItem \n { ...compounds?.listboxItem }\n id={ item.id } \n key={ item.id } \n textValue={ item.value || undefined }\n >\n { item.label }\n </ListBoxItem>\n }\n </ListBox>\n }\n </Popover>\n </Select>\n </>\n )\n}\n","import * as React from \"react\";\nconst SvgSettings = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z\" /></svg>;\nexport default SvgSettings;","\"use client\";\n\nimport Settings from \"./assets/icons/settings.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"../../Buttons/ThActionButton\";\n\nexport const ThSettingsWrapperButton = ({\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => {\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children \n ? children \n : <>\n <Settings aria-hidden=\"true\" focusable=\"false\" /> \n { label }\n </> \n }\n </ThActionButton>\n )\n}","\"use client\";\n\nimport { ThSettingsWrapperButton } from \"./ThSettingsWrapperButton\";\n\nimport { Heading, HeadingProps } from \"react-aria-components\";\nimport { HTMLAttributesWithRef, WithRef } from \"../../customTypes\";\nimport { ThActionButtonProps } from \"../../Buttons\";\n\nexport interface ThSettingsEntry {\n Comp: React.ComponentType<any>\n}\n\nexport interface ThSettingsPrefs {\n main: string[];\n subPanel?: string[] | null;\n}\n\nexport interface ThSettingsWrapperProps extends HTMLAttributesWithRef<HTMLDivElement> {\n items?: Record<string, ThSettingsEntry> | null;\n prefs: ThSettingsPrefs;\n compounds?: {\n /**\n * Label for advanced settings that will be displayed as a heading\n */\n label?: string;\n /**\n * Props for the heading. See `HeadingProps` for more information.\n */\n heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n /**\n * Props for the button that triggers the subpanel. See `ThActionButtonProps` for more information.\n */\n button?: ThActionButtonProps;\n }\n}\n\n// TODO: Handle Standalone and Usage as Group\nexport const ThSettingsWrapper = ({\n ref,\n items,\n prefs,\n compounds,\n ...props\n}: ThSettingsWrapperProps) => {\n const main = prefs.main;\n const displayOrder = prefs.subPanel;\n \n const isAdvanced = items &&(\n main.length < Object.keys(items).length && \n displayOrder && displayOrder.length > 0\n );\n\n if (items) {\n return(\n <>\n <div \n ref={ ref }\n { ...props }\n >\n { isAdvanced && compounds?.label &&\n <Heading { ...compounds?.heading }>\n { compounds.label }\n </Heading> }\n { main.map((key, index) => {\n const match = items[key];\n return match && <match.Comp key={ key } standalone={ !isAdvanced || index !== 0 } { ...props } />;\n }) }\n { isAdvanced && (\n <ThSettingsWrapperButton\n { ...compounds?.button }\n />\n ) }\n </div>\n </>\n )\n }\n}"]}
1
+ {"version":3,"sources":["../src/core/Components/Actions/hooks/useActions.ts","../src/core/Components/Actions/ThActionsBar.tsx","../src/core/Components/Menu/assets/icons/more_vert.svg","../src/core/Components/Buttons/ThActionButton.tsx","../src/core/Components/Menu/ThMenuButton.tsx","../src/core/Components/Menu/ThMenu.tsx","../src/core/Components/Actions/ThCollapsibleActionsBar.tsx","../src/core/Components/Buttons/assets/icons/close.svg","../src/core/Components/Buttons/ThCloseButton.tsx","../src/core/Components/Containers/ThBottomSheet/assets/icons/horizontal_rule.svg","../src/core/Components/Containers/ThBottomSheet/ThDragIndicatorButton.tsx","../src/core/Components/Buttons/assets/icons/arrow_back.svg","../src/core/Components/Buttons/assets/icons/arrow_forward.svg","../src/core/Components/Buttons/ThNavigationButton.tsx","../src/core/Components/Containers/hooks/useFirstFocusable.ts","../src/core/Components/Containers/ThPopover.tsx","../src/core/Components/Containers/ThModal.tsx","../src/core/Components/Containers/ThDockedPanel.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeader.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeaderWithClose.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeaderWithPrevious.tsx","../src/core/Components/Containers/ThContainerBody.tsx","../src/core/Components/Containers/ThBottomSheet/ThBottomSheet.tsx","../src/core/Components/Containers/ThTypedComponentRenderer.tsx","../src/core/Components/Form/ThForm.tsx","../src/core/Components/Form/Fields/ThFormNumberField.tsx","../src/core/Components/Form/Fields/ThFormTextField.tsx","../src/core/Components/Form/Fields/assets/icons/search.svg","../src/core/Components/Form/Fields/ThFormSearchField.tsx","../src/core/Components/Menu/ThMenuItem.tsx","../src/core/Components/Reader/ThFooter.tsx","../src/core/Components/Reader/ThLoader.tsx","../src/core/Components/Reader/ThHeader.tsx","../src/core/Components/Reader/ThProgression.tsx","../src/core/Components/Reader/ThRunningHead.tsx","../src/core/Components/Settings/assets/icons/add.svg","../src/core/Components/Settings/assets/icons/remove.svg","../src/core/Components/Settings/ThNumberField.tsx","../src/core/Components/Settings/ThRadioGroup.tsx","../src/core/Components/Settings/ThSlider.tsx","../src/core/Components/Settings/ThSwitch.tsx","../src/core/Components/Settings/ThDropdown/assets/icons/arrow_drop_down.svg","../src/core/Components/Settings/ThDropdown/ThDropdownButton.tsx","../src/core/Components/Settings/ThDropdown/ThDropdown.tsx","../src/core/Components/Settings/ThSettingsWrapper/assets/icons/settings.svg","../src/core/Components/Settings/ThSettingsWrapper/ThSettingsWrapperButton.tsx","../src/core/Components/Settings/ThSettingsWrapper/ThSettingsWrapper.tsx"],"names":["ThActionsTriggerVariant","jsx","jsxs","Fragment","React","useObjectRef","Button","useRef","input","element","Popover","Dialog","useEffect","FocusScope","Label","Input","Text","FieldError","NumberField","Heading","createElement"],"mappings":";;;;;;;;;;AAQa,IAAA,UAAA,GAAa,CAAqC,SAA2B,KAAA;AACxF,EAAA,MAAM,WAAW,MAAM;AACrB,IAAA,MAAM,OAAY,EAAC;AAEnB,IAAO,MAAA,CAAA,OAAA,CAAQ,SAAS,CAAE,CAAA,OAAA,CAAQ,CAAC,CAAC,GAAA,EAAK,KAAK,CAAM,KAAA;AAClD,MAAA,IAAI,KAAO,EAAA,MAAA,EAAa,IAAA,CAAA,IAAA,CAAK,GAAQ,CAAA;AAAA,KACtC,CAAA;AAED,IAAO,OAAA,IAAA;AAAA,GACT;AAEA,EAAA,MAAM,UAAU,MAAM;AACpB,IAAO,OAAA,MAAA,CAAO,OAAO,SAAS,CAAA,CAA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,SAAA,CAAU,KACd,EAAA,CAAA;AAAA,UACA,IAAK,CAAA,GAAA,CAAI,CAAC,GAAA,EAAK,KAAU,KAAA;AACzB,YAAM,MAAA,KAAA,GAAQ,MAAM,GAAG,CAAA;AACvB,YAAA,OAAO,KAAS,oBAAAlB,GAAC,CAAA,KAAA,CAAM,IAAN,EAAA,EAAuB,UAAa,EAAA,CAAC,UAAc,IAAA,KAAA,KAAU,CAAM,EAAA,GAAG,SAArD,GAA6D,CAAA;AAAA,WAChG,CAAA;AAAA,UACC,8BACAA,GAAAA;AAAA,YAAC,uBAAA;AAAA,YAAA;AAAA,cACG,GAAG,SAAW,EAAA;AAAA;AAAA;AAClB;AAAA;AAAA,KAGJ,EAAA,CAAA;AAAA;AAGN","file":"chunk-2U455VSY.mjs","sourcesContent":["\"use client\";\n\nimport { ActionStateObject } from \"@/lib/actionsReducer\";\n\nexport interface ThActionMap {\n [key: string | number | symbol]: ActionStateObject | undefined;\n}\n\nexport const useActions = <K extends string | number | symbol>(actionMap: ThActionMap) => {\n const findOpen = () => {\n const open: K[] = [];\n\n Object.entries(actionMap).forEach(([key, value]) => {\n if (value?.isOpen) open.push(key as K);\n });\n\n return open;\n };\n\n const anyOpen = () => {\n return Object.values(actionMap).some((value) => value?.isOpen);\n };\n\n const isOpen = (key?: K | null) => {\n if (key) {\n if (actionMap[key]?.isOpen == null) {\n return false;\n } else {\n return actionMap[key]?.isOpen;\n }\n }\n return false;\n };\n\n const findDocked = () => {\n const docked: K[] = [];\n\n Object.entries(actionMap).forEach(([key, value]) => {\n if (value?.docking) docked.push(key as K);\n });\n\n return docked;\n };\n\n const anyDocked = () => {\n return Object.values(actionMap).some((value) => value?.docking);\n };\n\n const isDocked = (key?: K | null) => {\n return key ? !!(actionMap[key]?.docking) : false;\n };\n\n const whichDocked = (key?: K | null) => {\n return key ? actionMap[key]?.docking : null;\n };\n\n const getDockedWidth = (key?: K | null) => {\n return key && actionMap[key]?.dockedWidth || undefined;\n };\n\n const everyOpenDocked = () => {\n const opens = findOpen();\n\n return opens.every((key) => {\n return isDocked(key);\n });\n };\n\n return {\n findOpen,\n anyOpen,\n isOpen,\n findDocked,\n anyDocked,\n isDocked,\n whichDocked,\n getDockedWidth,\n everyOpenDocked,\n };\n};","\"use client\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { Toolbar, ToolbarProps } from \"react-aria-components\";\n\nexport enum ThActionsTriggerVariant {\n button = \"iconButton\",\n menu = \"menuItem\"\n}\n\nexport interface ThActionEntry<T> {\n key: T;\n associatedKey?: string;\n Trigger: React.ComponentType<any>;\n Target?: React.ComponentType<any>;\n}\n\nexport interface ThActionsBarProps extends ToolbarProps {\n ref?: React.ForwardedRef<HTMLDivElement>\n};\n\nexport const ThActionsBar = ({ \n ref, \n children, \n ...props \n}: ThActionsBarProps) => {\n const resolvedRef = useObjectRef(ref);\n\n return (\n <Toolbar \n ref={ resolvedRef } \n { ...props }\n >\n { children }\n </Toolbar>\n )\n}","import * as React from \"react\";\nconst SvgMoreVert = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z\" /></svg>;\nexport default SvgMoreVert;","\"use client\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Button, ButtonProps, Tooltip, TooltipProps, TooltipTrigger } from \"react-aria-components\";\nimport { TooltipTriggerProps } from \"react-aria\";\n\nexport interface ThActionButtonProps extends ButtonProps {\n label?: string,\n ref?: React.ForwardedRef<HTMLButtonElement>,\n compounds?: {\n /**\n * Props for the tooltipTrigger component. See `TooltipTriggerProps` for more information.\n */\n tooltipTrigger?: WithRef<TooltipTriggerProps, HTMLDivElement>,\n /**\n * Props for the tooltip component. See `TooltipProps` for more information.\n */\n tooltip?: WithRef<TooltipProps, HTMLDivElement>,\n /**\n * String for the tooltip\n */\n label: string \n }\n}\n\nexport const ThActionButton = ({\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => { \n if (compounds) {\n return (\n <>\n <TooltipTrigger\n { ...compounds.tooltipTrigger }\n >\n <Button \n ref={ ref }\n { ...props }\n >\n { children } \n </Button>\n <Tooltip\n arrowBoundaryOffset={ 0 }\n { ...compounds.tooltip }\n >\n { compounds.label }\n </Tooltip>\n </TooltipTrigger>\n </>\n )\n } else {\n return (\n <>\n <Button \n { ...props }\n >\n { children }\n </Button>\n </>\n )\n }\n}","\"use client\";\n\nimport MoreVertIcon from \"./assets/icons/more_vert.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"../Buttons/ThActionButton\";\n\nexport const ThMenuButton = ({\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => {\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children \n ? children \n : <>\n <MoreVertIcon aria-hidden=\"true\" focusable=\"false\" /> \n { label }\n </> \n }\n </ThActionButton>\n )\n}","\"use client\";\n\nimport React, { useRef } from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Menu, MenuProps, MenuTrigger, MenuTriggerProps, Popover, PopoverProps } from \"react-aria-components\";\n\nimport { ThMenuButton } from \"./ThMenuButton\";\nimport { ThActionButtonProps } from \"../Buttons\";\nimport { ThActionEntry, ThActionsTriggerVariant } from \"../Actions/ThActionsBar\";\n\nexport interface THMenuProps<T> extends MenuProps<ThActionEntry<T>> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n triggerRef?: React.RefObject<HTMLElement | null>;\n items?: Iterable<ThActionEntry<T>>;\n children?: never;\n compounds?: {\n /**\n * Props for the trigger component. See `MenuTriggerProps` for more information.\n */\n menuTrigger?: Omit<WithRef<MenuTriggerProps, HTMLDivElement>, \"children\">;\n /**\n * Props for the button component. See `ThActionButtonProps` for more information.\n * Alternatively you can provide your own component\n */\n button?: ThActionButtonProps | React.ReactElement<ThActionButtonProps>;\n /**\n * Props for the popover component. See `PopoverProps` for more information.\n */\n popover?: WithRef<PopoverProps, HTMLDivElement>;\n }\n}\n\nexport const ThMenu = ({\n ref,\n id,\n triggerRef,\n items,\n dependencies,\n compounds,\n ...props\n}: THMenuProps<string>) => {\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n if (items) {\n return (\n <>\n <MenuTrigger \n { ...compounds?.menuTrigger }\n >\n { compounds?.button && React.isValidElement(compounds.button) \n ? compounds.button \n : <ThMenuButton \n ref={ buttonRef }\n { ...compounds?.button as ThActionButtonProps }\n />\n }\n <Popover { ...compounds?.popover }>\n <Menu \n ref={ ref }\n id={ id }\n dependencies={ dependencies }\n { ...props }\n >\n { Array.from(items).map(({ Trigger, key, associatedKey }) => \n <Trigger \n key={ `${ key }-menuItem` } \n variant={ ThActionsTriggerVariant.menu }\n { ...(associatedKey ? { associatedKey: associatedKey } : {}) } \n { ...props }\n />\n )}\n </Menu>\n </Popover>\n </MenuTrigger>\n { Array.from(items).map(({ Target, key }) => \n Target && <Target key={ `${ key }-container` } triggerRef={ triggerRef || buttonRef } { ...props } />\n )}\n </>\n )\n }\n}","\"use client\";\n\nimport React, { Fragment } from \"react\";\n\nimport { ThActionEntry, ThActionsBar, ThActionsBarProps, ThActionsTriggerVariant } from \"./ThActionsBar\";\nimport { ThMenu, THMenuProps } from \"../Menu/ThMenu\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { CollapsiblePref, useCollapsibility } from \"./hooks/useCollapsibility\";\n\nexport interface ThCollapsibleActionsBarProps extends ThActionsBarProps {\n id: string;\n items: ThActionEntry<string>[];\n prefs: CollapsiblePref;\n breakpoint?: string;\n children?: never;\n compounds?: {\n menu: THMenuProps<string> | React.ReactElement<typeof ThMenu>;\n }\n}\n\nexport const ThCollapsibleActionsBar = ({\n ref,\n id,\n items,\n prefs,\n breakpoint,\n compounds,\n ...props\n}: ThCollapsibleActionsBarProps) => {\n const resolvedRef = useObjectRef(ref);\n const Actions = useCollapsibility(items, prefs, breakpoint);\n\n return (\n <>\n <ThActionsBar \n ref={ resolvedRef }\n { ...props }\n >\n { Actions.ActionIcons.map(({ Trigger, Target, key, associatedKey }) => \n <Fragment key={ key }>\n <Trigger \n key={ `${ key }-trigger` } \n variant={ ThActionsTriggerVariant.button }\n { ...(associatedKey ? { associatedKey: associatedKey } : {}) } \n { ...props }\n />\n { Target && <Target key={ `${ key }-container` } triggerRef={ resolvedRef } /> }\n </Fragment>\n ) \n }\n\n { React.isValidElement(compounds?.menu) \n ? (React.cloneElement(compounds.menu, {\n ...compounds.menu.props,\n id: id,\n triggerRef: resolvedRef,\n items: Actions.MenuItems,\n dependencies: [\"Trigger\"],\n } as THMenuProps<string>)) \n : (<ThMenu \n id={ id } \n triggerRef={ resolvedRef }\n items={ Actions.MenuItems }\n dependencies={ [\"Trigger\"] }\n { ...compounds?.menu }\n />\n )}\n </ThActionsBar>\n </>\n )\n}\n","import * as React from \"react\";\nconst SvgClose = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\" /></svg>;\nexport default SvgClose;","\"use client\";\n\nimport Close from \"./assets/icons/close.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"./ThActionButton\";\n\nexport const ThCloseButton = ({\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => {\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children \n ? children \n : <>\n <Close aria-hidden=\"true\" focusable=\"false\" /> \n { label }\n </> \n }\n </ThActionButton>\n )\n}","import * as React from \"react\";\nconst SvgHorizontalRule = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M200-440q-17 0-28.5-11.5T160-480q0-17 11.5-28.5T200-520h560q17 0 28.5 11.5T800-480q0 17-11.5 28.5T760-440H200Z\" /></svg>;\nexport default SvgHorizontalRule;","\"use client\";\n\nimport HorizontalRule from \"./assets/icons/horizontal_rule.svg\";\n\nimport { Button, ButtonProps } from \"react-aria-components\";\n\nexport interface ThDragIndicatorButtonProps extends ButtonProps {\n ref?: React.ForwardedRef<HTMLButtonElement>;\n}\n\nexport const ThDragIndicatorButton = ({\n ref,\n children,\n ...props\n}: ThDragIndicatorButtonProps) => {\n return (\n <>\n <Button \n ref={ ref }\n { ...props }\n >\n { children ? children : <HorizontalRule aria-hidden=\"true\" focusable=\"false\" /> }\n </Button>\n </>\n )\n}","import * as React from \"react\";\nconst SvgArrowBack = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M640-80 240-480l400-400 71 71-329 329 329 329-71 71Z\" /></svg>;\nexport default SvgArrowBack;","import * as React from \"react\";\nconst SvgArrowForward = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z\" /></svg>;\nexport default SvgArrowForward;","\"use client\";\n\nimport React from \"react\";\n\nimport ArrowBack from \"./assets/icons/arrow_back.svg\";\nimport ArrowForward from \"./assets/icons/arrow_forward.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"./ThActionButton\";\n\nexport interface ThNavigationButtonProps extends ThActionButtonProps {\n direction?: \"left\" | \"right\";\n}\n\nexport const ThNavigationButton = ({\n direction,\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThNavigationButtonProps) => {\n const fallBackChildren = (\n <React.Fragment>\n { direction === \"right\"\n ? <ArrowForward aria-hidden=\"true\" focusable=\"false\" />\n : <ArrowBack aria-hidden=\"true\" focusable=\"false\" />\n }\n { label }\n </React.Fragment>\n );\n\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children || fallBackChildren }\n </ThActionButton>\n )\n}\n","\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nexport interface UseFirstFocusableProps {\n withinRef?: React.RefObject<HTMLElement | null>;\n fallbackRef?: React.RefObject<HTMLElement | null>;\n scrollerRef?: React.RefObject<HTMLElement | null>;\n trackedState?: boolean;\n autoFocus?: boolean;\n updateState?: unknown;\n}\n\nexport const useFirstFocusable = (props?: UseFirstFocusableProps) => {\n const { withinRef, fallbackRef, scrollerRef, trackedState, autoFocus = true, updateState } = props ?? {};\n\n const focusableElement = useRef<HTMLElement | null>(null);\n const attemptsRef = useRef(0);\n\n useEffect(() => {\n if (!withinRef || !trackedState) return;\n\n attemptsRef.current = 0;\n\n const tryFocus = () => {\n const targetElement = withinRef.current && withinRef.current.firstElementChild || withinRef.current;\n const selectedEl = targetElement && targetElement.querySelector(\"[data-selected]\");\n\n let firstFocusable: HTMLElement | null = null;\n\n if (selectedEl === null) {\n const inputs = targetElement && targetElement.querySelectorAll(\"input\");\n const input = inputs && Array.from(inputs).find((input: HTMLInputElement) => !input.disabled && input.tabIndex >= 0);\n firstFocusable = input as HTMLElement | null;\n } else if (selectedEl instanceof HTMLElement) {\n firstFocusable = selectedEl;\n }\n\n if (!firstFocusable) {\n const focusableElements = withinRef.current && withinRef.current.querySelectorAll(\"a, button, input, select\");\n const element = focusableElements && Array.from(focusableElements).find(element => {\n const htmlElement = element as HTMLAnchorElement | HTMLButtonElement | HTMLInputElement | HTMLSelectElement;\n if (htmlElement instanceof HTMLAnchorElement) return true;\n return !htmlElement.disabled && htmlElement.tabIndex >= 0;\n });\n firstFocusable = element as HTMLElement | null;\n }\n\n if (firstFocusable) {\n if (autoFocus) {\n firstFocusable.focus({ preventScroll: true });\n if (scrollerRef?.current) {\n scrollerRef.current.scrollTop = 0;\n } else {\n withinRef.current!.scrollTop = 0;\n }\n }\n focusableElement.current = firstFocusable;\n } else {\n attemptsRef.current++;\n if (attemptsRef.current < 3) {\n setTimeout(tryFocus, 50);\n } else {\n if (fallbackRef?.current) {\n if (autoFocus) {\n fallbackRef.current.focus({ preventScroll: true });\n }\n focusableElement.current = fallbackRef.current;\n }\n }\n }\n };\n\n tryFocus();\n\n return () => {\n attemptsRef.current = 0;\n };\n }, [withinRef, fallbackRef, scrollerRef, trackedState, autoFocus, updateState]);\n\n return focusableElement.current;\n};","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { Dialog, DialogProps, Popover, PopoverProps } from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThPopoverProps extends Omit<PopoverProps, \"children\">, ThContainerProps {\n triggerRef: React.RefObject<HTMLElement | null>;\n compounds?: {\n dialog: WithRef<DialogProps, HTMLDivElement>;\n }\n}\n\nexport const ThPopover = ({ \n ref,\n triggerRef,\n focusOptions,\n compounds,\n maxHeight,\n children, \n ...props \n}: ThPopoverProps) => {\n const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n useFirstFocusable(focusOptions);\n\n const computeMaxHeight = () => {\n if (!resolvedRef.current) return;\n return window.innerHeight - resolvedRef.current.offsetTop;\n };\n\n return (\n <Popover \n ref={ resolvedRef }\n triggerRef={ triggerRef }\n maxHeight={ maxHeight || computeMaxHeight() }\n { ...props }\n >\n <Dialog { ...compounds?.dialog }>\n { children }\n </Dialog>\n </Popover>\n )\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { Dialog, DialogProps, Modal, ModalOverlayProps } from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThModalProps extends Omit<ModalOverlayProps, \"children\">, ThContainerProps {\n compounds?: {\n dialog: WithRef<DialogProps, HTMLDivElement>;\n }\n}\n\nexport const ThModal = ({ \n ref,\n focusOptions,\n compounds,\n children, \n ...props \n}: ThModalProps) => {\n const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n useFirstFocusable(focusOptions);\n\n return (\n <Modal \n ref={ resolvedRef }\n { ...props }\n >\n <Dialog { ...compounds?.dialog }>\n { children }\n </Dialog>\n </Modal>\n )\n}","\"use client\";\n\nimport React from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { FocusScope, useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThDockedPanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">, ThContainerProps {\n isOpen: boolean;\n portal: HTMLElement | null;\n}\n\nexport const ThDockedPanel = ({ \n ref,\n isOpen,\n portal,\n focusOptions,\n children, \n ...props \n}: ThDockedPanelProps) => {\n const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n useFirstFocusable(focusOptions);\n\n return (\n <>\n { isOpen && portal && createPortal(\n <FocusScope \n contain={ false }\n autoFocus={ focusOptions?.autoFocus ?? true } \n restoreFocus={ true }\n >\n <div\n ref={ resolvedRef } \n { ...props }\n >\n { children }\n </div>\n </FocusScope>\n , portal)\n }\n </>\n )\n}","\"use client\";\n\nimport { Heading, HeadingProps } from \"react-aria-components\";\nimport { HTMLAttributesWithRef, WithRef } from \"../../customTypes\";\n\nexport interface ThContainerHeaderProps extends HTMLAttributesWithRef<HTMLDivElement> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label: string;\n compounds?: {\n heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n }\n}\n\nexport const ThContainerHeader = ({ \n ref,\n label,\n compounds,\n children,\n ...props \n}: ThContainerHeaderProps) => {\n return (\n <div \n ref={ ref } \n { ...props }\n >\n <Heading \n slot=\"title\"\n { ...compounds?.heading }\n >\n { label }\n </Heading>\n { children }\n </div>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { HeadingProps } from \"react-aria-components\";\nimport { ThActionButtonProps, ThCloseButton } from \"../../Buttons\";\nimport { ThContainerHeader, ThContainerHeaderProps } from \"./ThContainerHeader\"\n\nexport interface THContainerWithCloseProps extends ThContainerHeaderProps {\n closeRef?: React.ForwardedRef<HTMLButtonElement>;\n children?: never;\n compounds?: {\n heading: WithRef<HeadingProps, HTMLHeadingElement>;\n button: ThActionButtonProps;\n }\n}\nexport const ThContainerHeaderWithClose = ({ \n ref,\n closeRef,\n label,\n compounds,\n ...props \n}: THContainerWithCloseProps) => {\n return (\n <ThContainerHeader \n ref={ ref } \n label={ label }\n { ...props }\n compounds={ { heading: compounds?.heading }}\n >\n <ThCloseButton ref={ closeRef } { ...compounds?.button } />\n </ThContainerHeader>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { HeadingProps } from \"react-aria-components\";\nimport { ThNavigationButton, ThNavigationButtonProps } from \"../../Buttons\";\nimport { ThContainerHeader, ThContainerHeaderProps } from \"./ThContainerHeader\"\n\nexport interface THContainerWithPreviousProps extends ThContainerHeaderProps {\n previousRef?: React.ForwardedRef<HTMLButtonElement>;\n children?: never;\n compounds?: {\n heading: WithRef<HeadingProps, HTMLHeadingElement>;\n button: ThNavigationButtonProps;\n }\n}\nexport const ThContainerHeaderWithPrevious = ({ \n ref,\n previousRef,\n label,\n compounds,\n ...props \n}: THContainerWithPreviousProps) => {\n return (\n <ThContainerHeader \n ref={ ref } \n label={ label }\n { ...props }\n compounds={ { heading: compounds?.heading }}\n >\n <ThNavigationButton ref={ previousRef } { ...compounds?.button } />\n </ThContainerHeader>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThContainerBodyProps extends HTMLAttributesWithRef<HTMLDivElement> {}\n\nexport const ThContainerBody = ({ \n ref,\n children,\n ...props \n}: ThContainerBodyProps) => {\n return (\n <div \n ref={ ref } \n { ...props }\n >\n { children }\n </div>\n )\n}","\"use client\";\n\nimport React, { \n CSSProperties,\n RefObject, \n useCallback, \n useEffect, \n useMemo, \n useState \n} from \"react\";\n\nimport { OverlayTriggerState, useOverlayTriggerState } from \"react-stately\";\n\nimport { ThContainerHeader, ThContainerHeaderProps } from \"../ThContainerHeader\";\nimport { ThContainerBody } from \"../ThContainerBody\";\nimport { ThContainerProps } from \"../ThContainer\";\nimport { useFirstFocusable, UseFirstFocusableProps } from \"../hooks/useFirstFocusable\";\n\nimport { ThDragIndicatorButton, ThDragIndicatorButtonProps } from \"./ThDragIndicatorButton\";\n\nimport { Sheet, SheetRef } from \"react-modal-sheet\";\nimport { HeadingProps } from \"react-aria-components\";\nimport { \n AriaOverlayProps, \n FocusScope, \n OverlayProvider, \n useDialog, \n useModal, \n useObjectRef, \n useOverlay \n} from \"react-aria\";\n\nexport interface ThBottomSheetHeaderProps extends ThContainerHeaderProps {\n wrapper: React.ComponentProps<typeof Sheet.Header>,\n dragIndicator: React.ComponentProps<typeof ThDragIndicatorButton>,\n header: ThContainerHeaderProps,\n heading: HeadingProps\n}\n\nexport interface ThBottomSheetCompounds {\n container?: Omit<React.ComponentProps<typeof Sheet.Container>, \"children\">,\n header?: React.ComponentProps<typeof Sheet.Header>,\n dragIndicator?: ThDragIndicatorButtonProps,\n content?: React.ComponentProps<typeof Sheet.Content>,\n scroller?: React.ComponentProps<typeof Sheet.Scroller>,\n backdrop?: React.ComponentProps<typeof Sheet.Backdrop>\n}\n\nexport interface ThBottomSheetProps extends Omit<React.ComponentProps<typeof Sheet>, \"children\" | \"ref\" | \"isOpen\" | \"onClose\">, AriaOverlayProps, ThContainerProps {\n onOpenChange?: (isOpen: boolean) => void;\n isKeyboardDismissDisabled?: boolean;\n compounds?: ThBottomSheetCompounds;\n}\n\nconst ThBottomSheetContainer = ({\n sheetRef,\n sheetState,\n isDraggable, \n isKeyboardDismissDisabled,\n focusOptions,\n compounds,\n children\n}: {\n sheetRef: RefObject<HTMLDivElement | SheetRef | null>;\n sheetState: OverlayTriggerState;\n onFullHeight?: Omit<React.ComponentProps<typeof Sheet.Container>, \"children\">;\n isDraggable?: boolean;\n isKeyboardDismissDisabled?: boolean;\n focusOptions?: UseFirstFocusableProps;\n compounds?: ThBottomSheetCompounds;\n children: ThContainerProps[\"children\"];\n}) => {\n const containerRef = useObjectRef(compounds?.container?.ref);\n const scrollerRef = useObjectRef(compounds?.scroller?.ref);\n const dialog = useDialog({}, containerRef);\n const overlay = useOverlay({ \n onClose: sheetState.close, \n isOpen: true, \n isDismissable: true,\n isKeyboardDismissDisabled: isKeyboardDismissDisabled\n }, containerRef);\n const [isFullHeight, setFullHeight] = useState<boolean>(false);\n\n useModal();\n\n const fullHeightIntersectionCallback = useCallback((entries: IntersectionObserverEntry[]) => {\n entries.forEach( (entry) => {\n if (\n entry.isIntersecting && \n entry.intersectionRatio === 1 && \n // For some reason width is larger on mobile (and border-right is almost invisible)…\n entry.boundingClientRect.width >= window.innerWidth\n ) {\n setFullHeight(true);\n } else {\n setFullHeight(false);\n }\n });\n }, [setFullHeight]);\n\n useEffect(() => {\n const observer = new IntersectionObserver(fullHeightIntersectionCallback, {\n threshold: 1.0\n });\n containerRef.current && observer.observe(containerRef.current);\n\n return () => {\n observer.disconnect();\n }\n });\n\n const [Header, Body] = useMemo(() => {\n const header = children.find((child) => child.type === ThContainerHeader);\n const body = children.find((child) => child.type === ThContainerBody);\n \n const modifiedHeader = header ? React.cloneElement(header as React.ReactElement<ThContainerHeaderProps>, {\n ...header.props,\n compounds: {\n ...(header.props as ThContainerHeaderProps).compounds,\n heading: {\n ...(header.props as ThContainerHeaderProps).compounds?.heading,\n ...dialog.titleProps\n }\n }\n }) : null;\n\n return [modifiedHeader, body];\n }, [children, dialog.titleProps]);\n\n const updatedFocusOptions = focusOptions ? {\n ...focusOptions,\n scrollerRef: scrollerRef\n } : undefined;\n\n useFirstFocusable(updatedFocusOptions);\n\n return (\n <>\n <Sheet.Container \n { ...compounds?.container }\n ref={ containerRef }\n {...(isFullHeight ? { \"data-full-height\": \"true\" } : {} )}\n { ...overlay.overlayProps as any}\n { ...dialog.dialogProps }\n >\n <Sheet.Header\n { ...compounds?.header }\n >\n { isDraggable && \n <ThDragIndicatorButton \n { ...compounds?.dragIndicator }\n /> \n }\n { Header }\n </Sheet.Header>\n <Sheet.Content \n { ...compounds?.content }\n // Motion being picky with style on bundling so we have to cast like this… \n { ...(isDraggable ? { style: { paddingBottom: (sheetRef.current as SheetRef)?.y }} as { [key: string]: any } : {} )}\n >\n <Sheet.Scroller \n ref={ scrollerRef }\n { ...compounds?.scroller }\n // This is enabled by default since 4.4 but breaks scroll on focus…\n autoPadding={ false }\n >\n { Body }\n </Sheet.Scroller>\n </Sheet.Content>\n </Sheet.Container>\n <Sheet.Backdrop \n { ...compounds?.backdrop }\n />\n </>\n )\n}\n\nexport const ThBottomSheet = ({\n id,\n isOpen,\n onOpenChange,\n ref,\n focusOptions,\n isKeyboardDismissDisabled,\n detent,\n snapPoints,\n compounds,\n children, \n ...props\n}: ThBottomSheetProps) => {\n const resolvedRef = useObjectRef(ref);\n\n let sheetState = useOverlayTriggerState({\n isOpen: isOpen,\n onOpenChange: onOpenChange\n });\n\n const isDraggable = useMemo(() => snapPoints && snapPoints.length > 1, [snapPoints]);\n\n return(\n <>\n <Sheet\n ref={ resolvedRef }\n isOpen={ sheetState.isOpen }\n onClose={ sheetState.close }\n // Otherwise buggy with prefersReducedMotion\n // as the bottom sheet won’t be displayed on mount\n style={{\n zIndex: isOpen ? \"999999\" : \"-1\",\n visibility: isOpen ? \"visible\" : \"hidden\"\n } as CSSProperties }\n detent={ detent }\n snapPoints={ snapPoints }\n { ...props }\n >\n <OverlayProvider>\n <FocusScope \n contain={ true } \n autoFocus={ focusOptions?.autoFocus ?? true } \n restoreFocus={ true }\n >\n <ThBottomSheetContainer \n sheetRef={ resolvedRef } \n sheetState={ sheetState } \n isDraggable= { isDraggable }\n isKeyboardDismissDisabled={ isKeyboardDismissDisabled }\n focusOptions={ focusOptions }\n compounds={ compounds }\n >\n { children }\n </ThBottomSheetContainer>\n </FocusScope>\n </OverlayProvider>\n </Sheet> \n </>\n )\n}","\"use client\";\n\nimport React, { ReactNode } from \"react\";\n\nexport type ComponentMap<T extends string> = {\n [type in T]: React.ComponentType<any>;\n}\n\nexport interface TypedComponentRendererProps<T extends string, K extends keyof ComponentMap<T>> {\n type: K;\n componentMap: ComponentMap<T>;\n props?: any;\n children?: ReactNode;\n}\n\nexport const ThTypedComponentRenderer = <T extends string, K extends keyof ComponentMap<T>>({\n type,\n componentMap,\n props,\n children,\n}: TypedComponentRendererProps<T, K>) => {\n const Component = componentMap[type];\n\n if (!Component) {\n throw new Error(`Unsupported type: ${type}`);\n }\n\n return React.createElement(Component, props, children);\n};","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Button, ButtonProps, Form, FormProps } from \"react-aria-components\";\n\nexport interface ThFormProps extends FormProps {\n ref?: React.ForwardedRef<HTMLFormElement>;\n label: string;\n compounds?: {\n button?: Exclude<WithRef<ButtonProps, HTMLButtonElement>, \"type\"> | React.ReactElement<typeof Button>;\n }\n}\n\nexport const ThForm = ({\n ref,\n label,\n compounds,\n children,\n ...props\n}: ThFormProps) => {\n return(\n <>\n <Form\n ref={ ref }\n {...props}\n >\n { children }\n \n { compounds?.button && React.isValidElement(compounds.button) \n ? compounds.button \n : <Button\n { ...compounds?.button }\n type=\"submit\"\n >\n { label }\n </Button>\n }\n </Form>\n </>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n Input, \n InputProps, \n Label, \n LabelProps, \n NumberField, \n NumberFieldProps, \n Text \n} from \"react-aria-components\";\n\nexport interface ThFormNumberFieldProps extends NumberFieldProps {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n compounds?: {\n label?: WithRef<LabelProps, HTMLLabelElement>;\n input?: WithRef<InputProps, HTMLInputElement>;\n description?: string;\n }\n}\n\nexport const ThFormNumberField = ({\n ref,\n label,\n compounds,\n children,\n ...props\n}: ThFormNumberFieldProps) => {\n return(\n <>\n <NumberField\n ref={ ref }\n {...props }\n >\n { children \n ? children \n : <>\n { label && <Label {...compounds?.label }>\n { label }\n </Label>\n }\n\n <Input {...compounds?.input } />\n \n { compounds?.description && <Text slot=\"description\"> \n { compounds?.description } \n </Text> \n }\n </> \n }\n </NumberField>\n </>\n )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n FieldError, \n FieldErrorProps, \n Input, \n InputProps, \n Label, \n LabelProps, \n Text, \n TextField, \n TextFieldProps, \n ValidationResult \n} from \"react-aria-components\";\n\nexport interface ThFormTextFieldProps extends TextFieldProps {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n compounds?: {\n label?: WithRef<LabelProps, HTMLLabelElement>;\n input?: WithRef<InputProps, HTMLInputElement>;\n description?: string;\n fieldError?: WithRef<FieldErrorProps, HTMLDivElement>;\n },\n errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport const ThFormTextField = ({\n ref,\n label,\n children,\n compounds,\n errorMessage,\n ...props\n}: ThFormTextFieldProps) => {\n return(\n <>\n <TextField\n ref={ ref }\n {...props }\n >\n <>\n { children \n ? children \n : <>\n { label && <Label {...compounds?.label }>\n { label }\n </Label>\n }\n \n { errorMessage && <FieldError { ...compounds?.fieldError }>\n { errorMessage }\n </FieldError> \n }\n \n <Input {...compounds?.input } />\n \n { compounds?.description && <Text slot=\"description\"> \n { compounds?.description } \n </Text> \n }\n </> \n }\n </>\n </TextField>\n </>\n )\n}","import * as React from \"react\";\nconst SvgSearch = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z\" /></svg>;\nexport default SvgSearch;","\"use client\";\n\nimport React, { HTMLAttributes } from \"react\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport SearchIcon from \"./assets/icons/search.svg\";\n\nimport { \n FieldError, \n FieldErrorProps, \n Input, \n InputProps, \n Label, \n LabelProps, \n SearchField, \n SearchFieldProps, \n Text, \n ValidationResult \n} from \"react-aria-components\";\nimport { ThActionButtonProps, ThCloseButton } from \"../../Buttons\";\n\nexport interface ThFormSearchFieldProps extends SearchFieldProps {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n compounds?: {\n label?: WithRef<LabelProps, HTMLLabelElement>;\n input?: WithRef<InputProps, HTMLInputElement>;\n searchIcon?: HTMLAttributes<HTMLDivElement> | React.ReactElement<HTMLDivElement>;\n clearButton?: ThActionButtonProps | React.ReactElement<ThActionButtonProps>;\n description?: string;\n fieldError?: WithRef<FieldErrorProps, HTMLDivElement>;\n },\n errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport const ThFormSearchField = ({\n ref,\n label,\n children,\n compounds,\n errorMessage,\n ...props\n}: ThFormSearchFieldProps) => {\n return(\n <>\n <SearchField\n ref={ ref }\n {...props }\n >\n <>\n { children \n ? children \n : <>\n { label && <Label { ...compounds?.label }>\n { label }\n </Label>\n }\n\n { errorMessage && <FieldError { ...compounds?.fieldError }>\n { errorMessage }\n </FieldError> \n }\n \n <Input { ...compounds?.input } />\n\n { compounds?.searchIcon && React.isValidElement(compounds.searchIcon)\n ? compounds.searchIcon\n : <div {...compounds?.searchIcon }>\n <SearchIcon aria-hidden=\"true\" focusable=\"false\" />\n </div>\n }\n \n { compounds?.clearButton && React.isValidElement(compounds.clearButton) \n ? compounds.clearButton \n : <ThCloseButton { ...compounds?.clearButton } type=\"button\" />\n }\n \n { compounds?.description && <Text slot=\"description\"> \n { compounds?.description } \n </Text> \n }\n </> \n }\n </>\n </SearchField>\n </>\n )\n}","\"use client\";\n\nimport React from \"react\";\nimport { KeyboardProps } from \"react-aria\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Keyboard, LabelProps, MenuItem, MenuItemProps, Text } from \"react-aria-components\";\n\nexport interface ThMenuItemProps extends MenuItemProps {\n ref?: React.Ref<HTMLLIElement>;\n id: string;\n SVGIcon?: React.ComponentType<React.SVGProps<SVGElement>>;\n label: string;\n shortcut?: string;\n compounds?: {\n label: WithRef<LabelProps, HTMLSpanElement>;\n shortcut: WithRef<KeyboardProps, HTMLSpanElement>;\n }\n}\n\nexport const ThMenuItem = ({\n ref,\n id,\n SVGIcon,\n label, \n shortcut,\n compounds,\n children,\n ...props\n}: ThMenuItemProps) => {\n const menuItemLabelId = `${ id }-label`; \n return(\n <>\n <MenuItem \n ref={ ref }\n id={ id } \n { ...(children ? {} : { \"aria-labelledby\": menuItemLabelId }) }\n { ...props }\n >\n { children \n ? children \n : <>\n { SVGIcon && <SVGIcon aria-hidden=\"true\" focusable=\"false\" /> }\n <Text \n { ...compounds?.label } \n slot=\"label\"\n id={ menuItemLabelId }\n >\n { label }\n </Text>\n { shortcut && <Keyboard { ...compounds?.shortcut }>{ shortcut }</Keyboard> }\n </>\n }\n </MenuItem>\n </>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport const ThFooter = ({ \n ref,\n children,\n ...props \n}: HTMLAttributesWithRef<HTMLDivElement>) => {\n return (\n <aside \n ref={ ref } \n { ...props }\n >\n { children }\n </aside>\n )\n}","\"use client\";\n\nimport { ReactNode } from \"react\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThLoaderProps extends Omit<HTMLAttributesWithRef<HTMLDivElement>, \"aria-busy\" | \"aria-live\"> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n isLoading: boolean;\n loader: ReactNode;\n}\n\n// Since we are removing loader entirely, no need for aria-hidden={ !isLoading }\n// No need for a label either since we are using the string for the animation\nexport const ThLoader = ({ \n ref, \n isLoading,\n loader,\n children,\n ...props\n }: ThLoaderProps) => {\n return (\n <>\n <div \n ref={ ref }\n { ...props }\n aria-busy={ isLoading } \n aria-live=\"polite\"\n >\n { isLoading && loader }\n { children }\n </div>\n </>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport const ThHeader = ({ \n ref,\n children,\n ...props \n}: HTMLAttributesWithRef<HTMLDivElement>) => {\n return (\n <header \n ref={ ref } \n { ...props }\n >\n { children }\n </header>\n )\n}","\"use client\";\n\nimport React from \"react\";\n\nexport interface ThProgressionProps extends React.HTMLAttributes<HTMLDivElement> {\n ref?: React.RefObject<HTMLDivElement>\n}\n\nexport const ThProgression = ({ \n ref,\n children, \n ...props\n}: ThProgressionProps) => {\n return (\n <>\n <div \n ref={ ref } \n {...props }\n >\n { children }\n </div>\n </>\n )\n}","\"use client\";\n\nimport React, { useEffect } from \"react\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThRunningHeadProps extends HTMLAttributesWithRef<HTMLHeadingElement> {\n ref?: React.RefObject<HTMLHeadingElement>\n label: string;\n syncDocTitle?: boolean; \n}\n\nexport const ThRunningHead = ({ \n ref,\n label,\n syncDocTitle,\n ...props\n}: ThRunningHeadProps) => {\n\n useEffect(() => {\n if (syncDocTitle && label) document.title = label;\n }, [syncDocTitle, label])\n\n return(\n <>\n <h1 \n ref={ ref }\n { ...props }\n >\n { label }\n </h1>\n </>\n )\n}","import * as React from \"react\";\nconst SvgAdd = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z\" /></svg>;\nexport default SvgAdd;","import * as React from \"react\";\nconst SvgRemove = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M200-440v-80h560v80H200Z\" /></svg>;\nexport default SvgRemove;","\"use client\";\n\nimport { ComponentType, SVGProps } from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport AddIcon from \"./assets/icons/add.svg\";\nimport RemoveIcon from \"./assets/icons/remove.svg\";\n\nimport { \n Button, \n ButtonProps, \n Group, \n GroupProps, \n Input, \n InputProps, \n Label, \n LabelProps, \n NumberField, \n NumberFieldProps \n} from \"react-aria-components\";\n\nexport interface ThNumberFieldProps extends Omit<NumberFieldProps, \"minValue\" | \"maxValue\" | \"decrementAriaLabel\" | \"incrementAriaLabel\"> {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n range: number[];\n isVirtualKeyboardDisabled?: boolean;\n steppers?: {\n decrementIcon?: ComponentType<SVGProps<SVGElement>> | null;\n decrementLabel: string;\n incrementIcon?: ComponentType<SVGProps<SVGElement>> | null;\n incrementLabel: string;\n };\n compounds?: {\n /**\n * Props for the Group component. See `GroupProps` for more information.\n */\n group?: WithRef<GroupProps, HTMLDivElement>;\n /**\n * Props for the Input component. See `InputProps` for more information.\n */\n input?: WithRef<InputProps, HTMLInputElement>;\n /**\n * Props for the Label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the Button component used for decrement/increment. See `ButtonProps` for more information.\n */\n stepper?: ButtonProps;\n };\n}\n\nexport const ThNumberField = ({\n ref,\n label,\n range,\n isVirtualKeyboardDisabled,\n steppers,\n compounds,\n ...props\n}: ThNumberFieldProps) => {\n\n return (\n <NumberField \n ref={ ref }\n minValue={ Math.min(...range) }\n maxValue={ Math.max(...range) }\n decrementAriaLabel={ steppers?.decrementLabel }\n incrementAriaLabel={ steppers?.incrementLabel }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label>\n }\n\n <Group { ...compounds?.group }>\n { steppers && \n <Button \n { ...compounds?.stepper }\n slot=\"decrement\" \n >\n { steppers.decrementIcon \n ? <steppers.decrementIcon aria-hidden=\"true\" focusable=\"false\" /> \n : <RemoveIcon aria-hidden=\"true\" focusable=\"false\" /> }\n </Button> \n }\n\n <Input \n { ...compounds?.input } \n { ...(isVirtualKeyboardDisabled ? { inputMode: \"none\" } : {}) } \n />\n\n { steppers && \n <Button \n { ...compounds?.stepper }\n slot=\"increment\" \n >\n { steppers.incrementIcon \n ? <steppers.incrementIcon aria-hidden=\"true\" focusable=\"false\" /> \n : <AddIcon aria-hidden=\"true\" focusable=\"false\" /> }\n </Button>\n }\n </Group>\n </NumberField>\n );\n};","\"use client\";\n\nimport React, { ComponentType, SVGProps } from \"react\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\n\nimport { \n Label, \n LabelProps, \n Radio, \n RadioGroup, \n RadioGroupProps, \n RadioProps \n} from \"react-aria-components\"\n\nexport interface ThRadioGroupItems {\n value: string;\n icon?: ComponentType<SVGProps<SVGElement>>;\n label: string;\n isDisabled?: boolean;\n}\n\nexport interface ThRadioGroupProps extends RadioGroupProps {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label?: string;\n items?: ThRadioGroupItems[];\n compounds?: {\n /**\n * Props for the wrapper component. See `HTMLAttributesWithRef` for more information.\n */\n wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n /**\n * Props for the label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the radio component. See `RadioProps` for more information.\n */\n radio?: Omit<RadioProps, \"value\">;\n /**\n * Props for the radio label component. See `HTMLAttributesWithRef` for more information.\n */\n radioLabel?: HTMLAttributesWithRef<HTMLSpanElement>;\n }\n}\n\nexport const ThRadioGroup = ({\n ref,\n label,\n items,\n compounds,\n children,\n ...props\n}: ThRadioGroupProps) => {\n if (React.isValidElement(children)) {\n return (\n <RadioGroup \n ref={ ref }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label> \n }\n { children }\n </RadioGroup>\n )\n } else if (items) {\n return (\n <RadioGroup \n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label> \n }\n <div { ...compounds?.wrapper }>\n { items.map((item, index) => (\n <Radio \n { ...compounds?.radio }\n key={ index }\n value={ item.value }\n >\n <React.Fragment>\n { item.icon && <item.icon aria-hidden=\"true\" focusable=\"false\" /> }\n <span { ...compounds?.radioLabel }>\n { item.label }\n </span> \n </React.Fragment>\n </Radio>\n )) }\n </div>\n </RadioGroup>\n )\n }\n}","\"use client\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { \n Label, \n LabelProps, \n Slider, \n SliderOutput, \n SliderOutputProps, \n SliderProps, \n SliderThumb, \n SliderThumbProps, \n SliderTrack, \n SliderTrackProps \n} from \"react-aria-components\";\n\nexport interface ThSliderProps extends Omit<SliderProps, \"minValue\" | \"maxValue\"> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label?: string;\n range: number[];\n compounds?: {\n /**\n * Props for the label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the slider output component. See `SliderOutputProps` for more information.\n */\n output?: WithRef<SliderOutputProps, HTMLOutputElement>;\n /**\n * Props for the slider track component. See `SliderTrackProps` for more information.\n */\n track?: WithRef<SliderTrackProps, HTMLDivElement>;\n /**\n * Props for the slider thumb component. See `SliderThumbProps` for more information.\n */\n thumb?: WithRef<SliderThumbProps, HTMLDivElement>;\n };\n}\n\nexport const ThSlider = ({\n ref,\n label,\n range,\n compounds,\n ...props\n}: ThSliderProps) => {\n return(\n <>\n <Slider \n ref={ ref }\n minValue={ Math.min(...range) }\n maxValue={ Math.max(...range) }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label> \n }\n <SliderOutput { ...compounds?.output } />\n <SliderTrack { ...compounds?.track }>\n <SliderThumb { ...compounds?.thumb } />\n </SliderTrack>\n </Slider>\n </>\n )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\n\nimport { Heading, HeadingProps, Switch, SwitchProps } from \"react-aria-components\";\n\nexport interface ThSwitchProps extends SwitchProps {\n ref?: React.ForwardedRef<HTMLLabelElement>;\n label: string;\n heading?: string;\n compounds?: {\n /**\n * Props for the wrapper component. See `HTMLAttributesWithRef` for more information.\n */\n wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n /**\n * Props for the heading component. See `HeadingProps` for more information.\n */\n heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n /**\n * Props for the indicator component. See `HTMLAttributesWithRef` for more information.\n */\n indicator?: HTMLAttributesWithRef<HTMLDivElement>;\n }\n}\n\nexport const ThSwitch = ({\n ref,\n label,\n compounds,\n heading, \n ...props\n}: ThSwitchProps) => {\n return(\n <>\n <div { ...compounds?.wrapper }>\n { heading && <Heading { ...compounds?.heading }>\n { heading }\n </Heading> \n }\n <Switch \n ref={ ref }\n { ...props }\n >\n <div { ...compounds?.indicator } />\n { label }\n </Switch>\n </div>\n </>\n )\n}","import * as React from \"react\";\nconst SvgArrowDropDown = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M480-360 280-560h400L480-360Z\" /></svg>;\nexport default SvgArrowDropDown;","\"use client\";\n\nimport ArrowDropDownIcon from \"./assets/icons/arrow_drop_down.svg\";\n\nimport { Button, ButtonProps, SelectValue } from \"react-aria-components\";\n\nexport interface ThDropdownButtonProps extends ButtonProps {\n ref?: React.ForwardedRef<HTMLButtonElement>;\n}\n\nexport const ThDropdownButton = ({\n ref,\n children,\n ...props\n}: ThDropdownButtonProps) => {\n return (\n <>\n <Button \n ref={ ref }\n { ...props }\n >\n { children \n ? children \n : <>\n <SelectValue /> \n <ArrowDropDownIcon aria-hidden=\"true\" focusable=\"false\" />\n </> \n }\n </Button>\n </>\n )\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n Button,\n ButtonProps, \n Label, \n LabelProps, \n ListBox, \n ListBoxItem, \n ListBoxItemProps, \n ListBoxProps, \n Popover, \n PopoverProps, \n Select, \n SelectProps \n} from \"react-aria-components\";\nimport { ThDropdownButton, ThDropdownButtonProps } from \"./ThDropdownButton\";\n\nexport interface ThDropdownEntry {\n id: string;\n label: string;\n value: string;\n}\n\nexport interface ThDropdownProps extends SelectProps {\n ref?: React.ForwardedRef<HTMLDivElement>;\n label?: string;\n items?: Iterable<ThDropdownEntry>;\n children?: never;\n compounds?: {\n /**\n * Props for the label component. See `LabelProps` for more information.\n */\n label?: WithRef<LabelProps, HTMLLabelElement>;\n /**\n * Props for the button component. See `ThDropdownButtonProps` for more information.\n * Alternatively you can provide your own Button component\n */\n button?: WithRef<ButtonProps, HTMLButtonElement> | React.ReactElement<typeof Button>;\n /**\n * Props for the popover component. See `PopoverProps` for more information.\n */\n popover?: WithRef<PopoverProps, HTMLDivElement>;\n /**\n * Props for the listbox component. See `LisboxProps` for more information.\n * Alternatively you can provide your own Listbox component\n */\n listbox?: WithRef<ListBoxProps<ThDropdownEntry>, HTMLDivElement> | React.ReactElement<typeof ListBox | HTMLDivElement>;\n /**\n * Props for the listboxItem component. See `ListBoxItemProps` for more information.\n */\n listboxItem?: ListBoxItemProps<ThDropdownEntry>;\n }\n}\n\nexport const ThDropdown = ({\n ref,\n label,\n items,\n compounds,\n ...props\n}: ThDropdownProps) => {\n if (!items && !React.isValidElement(compounds?.listbox)) {\n return null;\n }\n\n return(\n <>\n <Select\n ref={ ref }\n { ...props }\n >\n { label && <Label { ...compounds?.label }>\n { label }\n </Label>\n }\n { compounds?.button && React.isValidElement(compounds.button) \n ? compounds.button \n : <ThDropdownButton { ...compounds?.button as ThDropdownButtonProps } />\n }\n <Popover\n { ...compounds?.popover }\n >\n { compounds?.listbox && React.isValidElement(compounds.listbox) \n ? compounds.listbox \n : <ListBox \n items={ items } \n { ...compounds?.listbox }>\n { (item: ThDropdownEntry) => <ListBoxItem \n { ...compounds?.listboxItem }\n id={ item.id } \n key={ item.id } \n textValue={ item.value || undefined }\n >\n { item.label }\n </ListBoxItem>\n }\n </ListBox>\n }\n </Popover>\n </Select>\n </>\n )\n}\n","import * as React from \"react\";\nconst SvgSettings = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z\" /></svg>;\nexport default SvgSettings;","\"use client\";\n\nimport Settings from \"./assets/icons/settings.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"../../Buttons/ThActionButton\";\n\nexport const ThSettingsWrapperButton = ({\n label,\n ref,\n compounds,\n children,\n ...props\n}: ThActionButtonProps) => {\n return (\n <ThActionButton\n ref={ ref }\n compounds={ compounds }\n { ...props }\n >\n { children \n ? children \n : <>\n <Settings aria-hidden=\"true\" focusable=\"false\" /> \n { label }\n </> \n }\n </ThActionButton>\n )\n}","\"use client\";\n\nimport { ThSettingsWrapperButton } from \"./ThSettingsWrapperButton\";\n\nimport { Heading, HeadingProps } from \"react-aria-components\";\nimport { HTMLAttributesWithRef, WithRef } from \"../../customTypes\";\nimport { ThActionButtonProps } from \"../../Buttons\";\n\nexport interface ThSettingsEntry {\n Comp: React.ComponentType<any>\n}\n\nexport interface ThSettingsPrefs {\n main: string[];\n subPanel?: string[] | null;\n}\n\nexport interface ThSettingsWrapperProps extends HTMLAttributesWithRef<HTMLDivElement> {\n items?: Record<string, ThSettingsEntry> | null;\n prefs: ThSettingsPrefs;\n compounds?: {\n /**\n * Label for advanced settings that will be displayed as a heading\n */\n label?: string;\n /**\n * Props for the heading. See `HeadingProps` for more information.\n */\n heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n /**\n * Props for the button that triggers the subpanel. See `ThActionButtonProps` for more information.\n */\n button?: ThActionButtonProps;\n }\n}\n\n// TODO: Handle Standalone and Usage as Group\nexport const ThSettingsWrapper = ({\n ref,\n items,\n prefs,\n compounds,\n ...props\n}: ThSettingsWrapperProps) => {\n const main = prefs.main;\n const displayOrder = prefs.subPanel;\n \n const isAdvanced = items &&(\n main.length < Object.keys(items).length && \n displayOrder && displayOrder.length > 0\n );\n\n if (items) {\n return(\n <>\n <div \n ref={ ref }\n { ...props }\n >\n { isAdvanced && compounds?.label &&\n <Heading { ...compounds?.heading }>\n { compounds.label }\n </Heading> }\n { main.map((key, index) => {\n const match = items[key];\n return match && <match.Comp key={ key } standalone={ !isAdvanced || index !== 0 } { ...props } />;\n }) }\n { isAdvanced && (\n <ThSettingsWrapperButton\n { ...compounds?.button }\n />\n ) }\n </div>\n </>\n )\n }\n}"]}
@@ -596,5 +596,5 @@ var useEpubNavigator = () => {
596
596
  };
597
597
 
598
598
  export { TH_CUSTOM_SCHEME, ThScrollActions, en_default, useEpubNavigator, useFullscreen, useIsClient, usePrevious };
599
- //# sourceMappingURL=chunk-CW72NB4V.mjs.map
600
- //# sourceMappingURL=chunk-CW72NB4V.mjs.map
599
+ //# sourceMappingURL=chunk-JS5WI5D4.mjs.map
600
+ //# sourceMappingURL=chunk-JS5WI5D4.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/Hooks/useIsClient.ts","../src/core/Hooks/useFullscreen.ts","../src/core/Hooks/usePrevious.ts","../src/resources/locales/en.json","../src/core/Hooks/Epub/scrollAffordance.ts","../src/core/Hooks/Epub/useEpubNavigator.ts"],"names":["useState","useEffect","ThScrollActions","useRef","useCallback"],"mappings":";;;;;AAIO,IAAM,cAAc,MAAM;AAC/B,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,KAAK,CAAA;AAE9C,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,OAAO,MAAA,KAAW,WAAa,EAAA,WAAA,CAAY,IAAI,CAAA;AAAA,GACrD,EAAG,EAAE,CAAA;AAEL,EAAO,OAAA,QAAA;AACT;;;ACPa,IAAA,aAAA,GAAgB,CAAC,QAA+C,KAAA;AAC3E,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAIA,SAAS,KAAK,CAAA;AACtD,EAAA,MAAM,WAAW,WAAY,EAAA;AAE7B,EAAM,MAAA,gBAAA,GAAmB,YAAY,MAAM;AACzC,IAAA,IAAI,CAAC,QAAU,EAAA;AAEf,IAAI,IAAA,CAAC,SAAS,iBAAmB,EAAA;AAC/B,MAAA,QAAA,CAAS,gBAAgB,iBAAkB,EAAA;AAAA,KAC7C,MAAA,IAAW,SAAS,cAAgB,EAAA;AAClC,MAAA,QAAA,CAAS,cAAe,EAAA;AAAA;AAC1B,GACF,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,aAAa,MAAM;AACvB,MAAM,MAAA,IAAA,GAAO,OAAQ,CAAA,QAAA,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EAAA,EAAA,CAAG,OAAS,EAAA,QAAA,EAAU,QAAQ,CAAA;AAAA,GACnD,EAAG,EAAE,CAAA;AAEL,EAAM,MAAA,SAAA,GAAYA,YAAY,MAAM;AAClC,IAAA,OAAO,iBAAmB,EAAA,MAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAEL,EAAM,MAAA,cAAA,GAAiBA,YAAY,MAAM;AACvC,IAAA,OAAO,iBAAmB,EAAA,cAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAEL,EAAM,MAAA,gBAAA,GAAmBA,YAAY,MAAM;AACzC,IAAA,OAAO,iBAAmB,EAAA,sBAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAIL,EAAM,MAAA,UAAA,GAAaA,YAAY,MAAM;AACnC,IAAA,OAAO,iBAAmB,EAAA,QAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAEL,EAAO,OAAA;AAAA,IACL,iBAAA;AAAA,IACA,oBAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,EAAA;AAAA,IACA,uBAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,cAAA;AAAA,IACA,gBAAA;AAAA,IACA,mBAAmB,iBAAmB,EAAA,iBAAA;AAAA,IACtC,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA;AAAA,IACA,mBAAA,EAAqB,CAAC,EAAmC,KAAA;AACvD,MAA6B,0BAAA,GAAA,EAAA;AAAA;AAC/B,GACF;AACF","file":"chunk-CW72NB4V.mjs","sourcesContent":["\"use client\";\n\nimport { useLayoutEffect, useState } from \"react\";\n\nexport const useIsClient = () => {\n const [isClient, setIsClient] = useState(false);\n\n useLayoutEffect(() => {\n if (typeof window !== \"undefined\") setIsClient(true);\n }, []);\n\n return isClient;\n}","\"use client\";\n\nimport { useCallback, useEffect, useState } from \"react\";\nimport { useIsClient } from \"./useIsClient\";\n\nexport const useFullscreen = (onChange?: (isFullscreen: boolean) => void) => {\n const [isFullscreen, setIsFullscreen] = useState(false);\n const isClient = useIsClient();\n\n const handleFullscreen = useCallback(() => {\n if (!isClient) return;\n\n if (!document.fullscreenElement) {\n document.documentElement.requestFullscreen();\n } else if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n }, [isClient]);\n\n useEffect(() => {\n const onFSchange = () => {\n const isFs = Boolean(document.fullscreenElement);\n setIsFullscreen(isFs);\n onChange && onChange(isFs);\n }\n document.addEventListener(\"fullscreenchange\", onFSchange);\n\n return () => {\n document.removeEventListener(\"fullscreenchange\", onFSchange);\n }\n }, [onChange]);\n\n return {\n isFullscreen,\n handleFullscreen\n }\n}","\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nexport const usePrevious = <T>(value: T): T | null => {\n const ref = useRef<T | null>(null);\n \n useEffect(() => {\n ref.current = value;\n }, [value]); \n\n return ref.current;\n}\n","{\n \"bookUrlConverter\": {\n \"label\": \"Load an EPUB publication from a remote server (it must support byte-range requests):\",\n \"placeholder\": \"https://www.example.org/ebook.epub\",\n \"button\": \"Load\",\n \"error\": \"The URL is invalid. Please check the URL is correct and try again.\"\n },\n \"reader\": {\n \"app\": {\n \"loading\": \"Loading\",\n \"publicationWrapper\": \"You’re now in the publication.\",\n \"docking\": {\n \"dockingLeft\": \"Docked panel left\",\n \"dockingRight\": \"Docked panel right\",\n \"dockingEmpty\": \"Currently empty\",\n \"dockingClosed\": \"Is closed, contains {{ action }}\",\n \"dockingCollapsed\": \"Is Collapsed, contains {{ action }}\"\n },\n \"header\": {\n \"label\": \"Top bar\",\n \"runningHead\": \"Running head\",\n \"runningHeadFallback\": \"...\",\n \"actions\": \"Actions\"\n },\n \"footer\": {\n \"label\": \"Bottom bar\"\n },\n \"progression\": {\n \"wrapper\": \"Current progression\",\n \"of\": \"{{ current }} of {{ reference }}\",\n \"referenceFallback\": \"current chapter\",\n \"pubFallback\": \"the publication\"\n },\n \"docker\": {\n \"wrapper\": \"Docking options\",\n \"dockToLeft\": {\n \"trigger\": \"Dock to the left\",\n \"tooltip\": \"Dock left\"\n },\n \"dockToRight\": {\n \"trigger\": \"Dock to the right\",\n \"tooltip\": \"Dock Right\"\n },\n \"popover\": {\n \"trigger\": \"Display in a window\",\n \"tooltip\": \"Pop over\"\n },\n \"fullscreen\": {\n \"trigger\": \"Display over contents\",\n \"tooltip\": \"Overlay\"\n },\n \"close\": {\n \"trigger\": \"Close\",\n \"tooltip\": \"Close\"\n }\n },\n \"back\": {\n \"trigger\": \"Back\"\n }\n },\n \"navigation\": {\n \"goForward\": \"Go forward\",\n \"goBackward\": \"Go backward\",\n \"scroll\": {\n \"wrapper\": \"Navigate through the publication\",\n \"prevLabel\": \"Previous\",\n \"nextLabel\": \"Next\",\n \"prevA11yLabel\": \"Go to the previous resource\",\n \"nextA11yLabel\": \"Go to the next resource\"\n }\n },\n \"fullscreen\": {\n \"tooltip\": \"Fullscreen\",\n \"trigger\": \"Toggle fullscreen mode\",\n \"close\": \"Exit fullscreen mode\" \n },\n \"toc\": {\n \"tooltip\": \"Table of contents\",\n \"trigger\": \"Table of contents\",\n \"close\": \"Close table of contents\",\n \"heading\": \"Table of contents\",\n \"entries\": \"Entries in the table\",\n \"empty\": \"The table of contents was not provided for this publication.\",\n \"search\": {\n \"label\": \"Search\",\n \"placeholder\": \"Search\",\n \"clear\": \"Clear\"\n }\n },\n \"jumpToPosition\": {\n \"tooltip\": \"Jump to…\",\n \"trigger\": \"Jump to position\",\n \"heading\": \"Jump to position\",\n \"go\": \"Go\",\n \"close\": \"Close jump to position\",\n \"label\": \"Select a position from {{ positionStart }} to {{ positionEnd }}:\"\n },\n \"overflowMenu\": {\n \"active\": {\n \"tooltip\": \"More actions\",\n \"trigger\": \"Toggle menu\"\n },\n \"hint\": {\n \"tooltip\": \"Toggle actions\",\n \"trigger\": \"Display actions\"\n }\n },\n \"layoutStrategy\": {\n \"tooltip\": \"Layout\",\n \"trigger\": \"Layout strategy\",\n \"close\": \"Close layout strategy menu\",\n \"heading\": \"Layout strategy\",\n \"title\": \"Strategy\",\n \"margin\": \"Margin\",\n \"lineLength\": \"Line length\",\n \"columns\": \"Columns\",\n \"minChars\": \"Disable minimal line length\",\n \"maxChars\": \"Disable maximal line length\",\n \"minimalLineLength\": {\n \"title\": \"Minimal line length\",\n \"increase\": \"Increase minimal line length\",\n \"decrease\": \"Decrease maximal line length\"\n },\n \"optimalLineLength\": {\n \"title\": \"Optimal line length\",\n \"increase\": \"Increase optimal line length\",\n \"decrease\": \"Decrease optimal line length\"\n },\n \"maximalLineLength\": {\n \"title\": \"Maximal line length\",\n \"increase\": \"Increase maximal line length\",\n \"decrease\": \"Decrease maximal line length\"\n }\n },\n \"settings\": {\n \"tooltip\": \"Settings\",\n \"trigger\": \"Settings menu\",\n \"close\": \"Close settings menu\",\n \"heading\": \"Display settings\",\n \"themes\": {\n \"title\": \"Themes\",\n \"auto\": \"Auto\",\n \"light\": \"Light\",\n \"sepia\": \"Sepia\",\n \"paper\": \"Paper\",\n \"dark\": \"Dark\",\n \"contrast1\": \"Contrast 1\",\n \"contrast2\": \"Contrast 2\",\n \"contrast3\": \"Contrast 3\"\n },\n \"zoom\": {\n \"title\": \"Zoom\",\n \"increase\": \"Increase zoom\",\n \"decrease\": \"Decrease zoom\"\n },\n \"fontSize\": {\n \"title\": \"Font size\",\n \"increase\": \"Increase font size\",\n \"decrease\": \"Decrease font size\"\n },\n \"fontFamily\": {\n \"title\": \"Font family\",\n \"labels\": {\n \"publisher\": \"Publisher’s font\",\n \"oldStyle\": \"Old style serif\",\n \"modern\": \"Modern serif\",\n \"sans\": \"Sans-serif\",\n \"humanist\": \"Humanist sans-serif\",\n \"monospace\": \"Monospace\" \n }\n },\n \"fontWeight\": {\n \"title\": \"Font weight\",\n \"increase\": \"Increase font weight\",\n \"decrease\": \"Decrease font weight\"\n },\n \"normalizeText\": {\n \"title\": \"Text normalization\",\n \"label\": \"Remove all text formatting\"\n },\n \"align\": {\n \"title\": \"Text alignment\",\n \"publisher\": \"Default\",\n \"left\": \"Left\",\n \"justify\": \"Justify\",\n \"right\": \"Right\"\n },\n \"hyphens\": {\n \"title\": \"Hyphenation\",\n \"label\": \"Enable hyphens\"\n },\n \"text\": {\n \"title\": \"Text\",\n \"advanced\": {\n \"tooltip\": \"More options\",\n \"trigger\": \"More formatting options\"\n }\n },\n \"lineHeight\": {\n \"title\": \"Line height\",\n \"publisher\": \"Default\",\n \"small\": \"Tight\",\n \"medium\": \"Balanced\",\n \"large\": \"Loose\"\n },\n \"paraSpacing\": {\n \"title\": \"Paragraph spacing\",\n \"increase\": \"Increase paragraph spacing\",\n \"decrease\": \"Decrease paragraph spacing\"\n },\n \"paraIndent\": {\n \"title\": \"Paragraph indent\",\n \"increase\": \"Increase paragraph indent\",\n \"decrease\": \"Decrease paragraph indent\"\n },\n \"wordSpacing\": {\n \"title\": \"Word spacing\",\n \"increase\": \"Increase word spacing\",\n \"decrease\": \"Decrease word spacing\"\n },\n \"letterSpacing\": {\n \"title\": \"Letter spacing\",\n \"increase\": \"Increase letter spacing\",\n \"decrease\": \"Decrease letter spacing\"\n },\n \"publisherStyles\": {\n \"label\": \"Use original formatting\"\n },\n \"spacing\": {\n \"title\": \"Spacing\",\n \"advanced\": {\n \"tooltip\": \"More options\",\n \"trigger\": \"More spacing options\"\n }\n },\n \"layout\": {\n \"title\": \"Layout\",\n \"scrolled\": \"Scrollable\",\n \"paginated\": \"Paginated\"\n },\n \"column\": {\n \"title\": \"Columns\",\n \"auto\": \"Auto\",\n \"one\": \"1 col\",\n \"two\": \"2 cols\"\n }\n }\n }\n}","\"use client\";\n\nimport Locale from \"../../../resources/locales/en.json\";\n\nimport { ScrollAffordanceConfig, ThScrollAffordancePref } from \"@/preferences/models/enums\";\n\n// Button posting message from iFrame won’t work since Navigator handles click\n// so the message is never received.\n// Link href is relative to selfhref but https and http links are\n// handled as external links in Reader, opening a new window.\n// Trying a custom scheme to avoid conflicts and progress on scroll for MVP\n// but not particularly happy about that.\n// React Portal has a lots of caveats too but it may at least protect\n// the component from Navigator’s handling, although I’m not 100% sure yet.\nexport const TH_CUSTOM_SCHEME = \"thorium-web:\";\nexport enum ThScrollActions {\n prev = TH_CUSTOM_SCHEME + \"go_prev\",\n next = TH_CUSTOM_SCHEME + \"go_next\"\n}\nconst STYLESHEET_ID = \"scroll-affordance-stylesheet\"\n\nexport class ScrollAffordance {\n private pref: ThScrollAffordancePref;\n private placement: \"top\" | \"bottom\";\n public id: string;\n public className: string;\n private styleSheetContent?: string;\n\n constructor(config: ScrollAffordanceConfig) {\n this.pref = config.pref;\n this.placement = config.placement;\n this.id = `thorium-web-scroll-affordance-wrapper-${config.placement}`;\n this.className = config.className || \"thorium-web-scroll-affordance-wrapper\";\n this.styleSheetContent = config.styleSheetContent;\n }\n\n private createStyleSheet = (cssContent?: string) => {\n const styleSheet = document.createElement(\"style\");\n styleSheet.id = STYLESHEET_ID;\n styleSheet.dataset.readium = \"true\";\n styleSheet.textContent = cssContent || `.thorium-web-scroll-affordance-wrapper {\n --color-text: currentColor;\n\n box-sizing: border-box;\n display: flex;\n width: 100%;\n gap: 20px;\n margin: 0;\n padding: 0;\n }\n .thorium-web-scroll-affordance-wrapper:focus-within {\n /* to get around hidden overflow cutting off focus ring w/o being too noticeable */\n padding: 0 2px;\n }\n #thorium-web-scroll-affordance-wrapper-top {\n /* to get around hidden overflow cutting off focus ring */\n padding-top: 0.25rem;\n margin-bottom: 1.25rem;\n }\n #thorium-web-scroll-affordance-wrapper-bottom {\n margin-top: 1.5rem;\n /* to get around hidden overflow cutting off focus ring */\n padding-bottom: 1.5rem;\n }\n .thorium-web-scroll-affordance-wrapper > a {\n box-sizing: border-box;\n border: 1px solid color-mix(in srgb, var(--color-text) 50%, transparent);\n border-radius: 3px;\n padding: 0.75rem;\n text-decoration: none;\n font-weight: bold;\n flex: 1 1 0;\n text-align: left;\n color: var(--color-text);\n font-size: 1rem;\n font-style: normal;\n font-family: inherit;\n }\n .thorium-web-scroll-affordance-wrapper > a:hover {\n background-color: \"color-mix(in srgb, var(--color-text) 15%, transparent)\";\n border: 1px solid var(--color-text);\n }\n .thorium-web-scroll-affordance-wrapper > a:first-child:not(:last-child) {\n text-align: right;\n }\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-prev > span:before {\n content: \"←\";\n float: left;\n margin-right: 10px;\n color: \"color-mix(in srgb, var(--color-text) 50%, transparent)\";\n }\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-prev:hover > span:before,\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-next:hover > span:after {\n color: var(--color-text);\n }\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-next > span:after {\n content: \"→\";\n float: right;\n margin-left: 10px;\n color: \"color-mix(in srgb, var(--color-text) 50%, transparent)\";\n }`;\n return styleSheet;\n };\n\n public render = (doc: Document) => {\n if (doc) {\n // Prevent duplicates\n this.destroy(doc);\n\n let wrapper: HTMLElement | null = null;\n\n if (this.pref !== ThScrollAffordancePref.none) {\n let prevAnchor: HTMLAnchorElement | undefined;\n let nextAnchor: HTMLAnchorElement | undefined;\n\n if ((this.pref === ThScrollAffordancePref.both || this.pref === ThScrollAffordancePref.prev)) {\n prevAnchor = doc.createElement(\"a\");\n prevAnchor.className = `thorium-web-scroll-affordance-button-prev`;\n prevAnchor.id = `thorium-web-scroll-affordance-button-prev-${this.placement}`;\n prevAnchor.href = ThScrollActions.prev;\n\n // In practice browsers don’t do anything with this? And since the href\n // is a custom scheme, they wouldn’t be able to preload the document\n // that is handled by navigator anyway. So not sure it hurts or has any benefit…\n prevAnchor.rel = \"prev\";\n prevAnchor.setAttribute(\"aria-label\", Locale.reader.navigation.scroll.prevA11yLabel);\n\n prevAnchor.innerHTML = `<span>${Locale.reader.navigation.scroll.prevLabel}</span>`;\n }\n\n if ((this.pref === ThScrollAffordancePref.both || this.pref === ThScrollAffordancePref.next)) {\n nextAnchor = doc.createElement(\"a\");\n nextAnchor.className = `thorium-web-scroll-affordance-button-next`;\n nextAnchor.id = `<a id=\"thorium-web-scroll-affordance-button-next-${this.placement}`;\n nextAnchor.href = ThScrollActions.next;\n\n // In practice browsers don’t do anything with this? And since the href\n // is a custom scheme, they wouldn’t be able to preload the document\n // that is handled by navigator anyway. So not sure it hurts or has any benefit…\n nextAnchor.rel = \"next\";\n nextAnchor.setAttribute(\"aria-label\", Locale.reader.navigation.scroll.nextA11yLabel);\n\n nextAnchor.innerHTML = `<span>${Locale.reader.navigation.scroll.nextLabel}</span>`\n }\n\n if (prevAnchor || nextAnchor) {\n wrapper = doc.createElement(\"nav\");\n wrapper.id = `thorium-web-scroll-affordance-wrapper-${this.placement}`;\n wrapper.className = this.className || \"thorium-web-scroll-affordance-wrapper\";\n wrapper.dataset.readium = \"true\";\n wrapper.setAttribute(\"aria-label\", Locale.reader.navigation.scroll.wrapper);\n\n if (prevAnchor) wrapper.append(prevAnchor);\n if (nextAnchor) wrapper.append(nextAnchor);\n }\n }\n\n if (wrapper) {\n const styleSheet = this.createStyleSheet(this.styleSheetContent);\n doc.head.append(styleSheet);\n this.placement === \"top\" ? doc.body.prepend(wrapper) : doc.body.append(wrapper);\n }\n }\n }\n\n public destroy = (doc: Document) => {\n if (doc) {\n const stylesheet = doc.getElementById(`#${ STYLESHEET_ID }`);\n if (stylesheet) stylesheet.remove();\n\n const wrapper = doc.getElementById(this.id);\n if (wrapper) {\n wrapper.remove();\n }\n }\n }\n}","\"use client\";\n\nimport { useCallback, useMemo, useRef } from \"react\";\n\nimport { ThScrollAffordancePref, ThScrollBackTo } from \"@/preferences/models/enums\";\nimport { ScrollAffordance } from \"./scrollAffordance\";\n\nimport { \n EPUBLayout, \n Link, \n Locator, \n Publication \n} from \"@readium/shared\";\nimport { \n EpubNavigator, \n EpubNavigatorListeners, \n EpubPreferences, \n EpubSettings, \n FrameManager, \n FXLFrameManager, \n IEpubDefaults, \n IEpubPreferences\n} from \"@readium/navigator\";\n\ntype cbb = (ok: boolean) => void;\n\n// Module scoped, singleton instance of navigator\nlet navigatorInstance: EpubNavigator | null = null;\n\n// Scroll Affordances as mutable, otherwise the callbacks\n// will not work for components mounting before load\n// They should not be part of the hook anyway\n// And their existence is due to the lack of Injection API\nlet scrollAffordanceTop: ScrollAffordance | null = null;\nlet scrollAffordanceBottom: ScrollAffordance | null = null;\n\nexport interface EpubNavigatorLoadProps {\n container: HTMLDivElement | null;\n publication: Publication;\n listeners: EpubNavigatorListeners;\n positionsList?: Locator[];\n initialPosition?: Locator;\n preferences?: IEpubPreferences;\n defaults?: IEpubDefaults;\n scrollAffordances?: {\n top?: ThScrollAffordancePref;\n bottom?: ThScrollAffordancePref;\n }\n}\n\nexport const useEpubNavigator = () => {\n const container = useRef<HTMLDivElement | null>(null);\n const containerParent = useRef<HTMLElement | null>(null);\n const publication = useRef<Publication | null>(null);\n\n // Warning: this is using an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const mountScroll = useCallback(() => {\n navigatorInstance?._cframes.forEach((frameManager: FrameManager | FXLFrameManager | undefined) => {\n if (frameManager) { \n scrollAffordanceTop?.render(frameManager.window.document);\n scrollAffordanceBottom?.render(frameManager.window.document)\n }\n });\n }, []);\n\n // Warning: this is using an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const unmountScroll = useCallback(() => {\n navigatorInstance?._cframes.forEach((frameManager: FrameManager | FXLFrameManager | undefined) => {\n if (frameManager) {\n scrollAffordanceTop?.destroy(frameManager.window.document);\n scrollAffordanceBottom?.destroy(frameManager.window.document)\n }\n });\n }, []);\n\n const handleScrollAffordances = useCallback((scroll: boolean) => {\n if (navigatorInstance === null || navigatorInstance.layout === EPUBLayout.fixed) return;\n scroll ? mountScroll() : unmountScroll();\n }, [mountScroll, unmountScroll]);\n\n const submitPreferences = useCallback(async (preferences: IEpubPreferences) => {\n await navigatorInstance?.submitPreferences(new EpubPreferences(preferences));\n }, []);\n\n const getSetting = useCallback(<K extends keyof EpubSettings>(settingKey: K) => {\n return navigatorInstance?.settings[settingKey] as EpubSettings[K];\n }, []);\n\n // Warning: this is using an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const scrollBackTo = useCallback((position: ThScrollBackTo) => {\n if (position !== ThScrollBackTo.untouched) {\n navigatorInstance?._cframes.forEach((frameManager: FrameManager | FXLFrameManager | undefined) => {\n if (frameManager) {\n const scrollingEl = frameManager.window.document.scrollingElement;\n if (position === ThScrollBackTo.top) {\n scrollingEl?.scrollTo(0, 0);\n } else {\n scrollingEl?.scrollTo(0, scrollingEl.scrollHeight);\n }\n }\n });\n }\n }, []);\n\n // [TMP] Working around positionChanged not firing consistently for FXL\n // We’re observing the FXLFramePoolManager spine div element’s style\n // and checking whether its translate3d has changed.\n // Sure IntersectionObserver should be the obvious one to use here,\n // observing iframes instead of the style attribute on the spine element\n // but there’s additional complexity to handle as a spread = 2 iframes\n // And keeping in sync while the FramePool is re-aligning on resize can be suboptimal\n let FXLPositionChangedCallback: ((locator: Locator) => void) | undefined;\n const FXLPositionChanged = useMemo(() => { \n return new MutationObserver((mutationsList: MutationRecord[]) => {\n for (const mutation of mutationsList) {\n const re = /translate3d\\(([^)]+)\\)/;\n const newVal = (mutation.target as HTMLElement).getAttribute(mutation.attributeName as string);\n const oldVal = mutation.oldValue;\n if (newVal?.split(re)[1] !== oldVal?.split(re)[1]) {\n const locator = navigatorInstance?.currentLocator;\n if (locator) {\n FXLPositionChangedCallback?.(locator);\n }\n }\n }\n });\n }, [FXLPositionChangedCallback]);\n\n const EpubNavigatorLoad = useCallback((config: EpubNavigatorLoadProps, cb: Function) => {\n if (config.container) {\n container.current = config.container;\n containerParent.current = container.current? container.current.parentElement : null;\n \n publication.current = config.publication;\n\n if (config.scrollAffordances) {\n if (config.scrollAffordances.top) {\n scrollAffordanceTop = new ScrollAffordance({ pref: config.scrollAffordances.top, placement: \"top\" })\n }\n if (config.scrollAffordances.bottom) {\n scrollAffordanceBottom = new ScrollAffordance({ pref: config.scrollAffordances.bottom, placement: \"bottom\" })\n }\n }\n\n navigatorInstance = new EpubNavigator(\n config.container, \n config.publication, \n config.listeners, \n config.positionsList, \n config.initialPosition, \n { preferences: config.preferences || {}, defaults: config.defaults || {} }\n );\n\n navigatorInstance.load().then(() => {\n cb();\n\n if (navigatorInstance?.layout === EPUBLayout.fixed) {\n // @ts-ignore\n FXLPositionChanged.observe((navigatorInstance?.pool.spineElement as HTMLElement), {\n attributeFilter: [\"style\"], \n attributeOldValue: true\n });\n }\n });\n }\n }, [FXLPositionChanged]);\n\n const EpubNavigatorDestroy = useCallback((cb: Function) => {\n cb();\n\n if (navigatorInstance?.layout === EPUBLayout.fixed) {\n FXLPositionChanged.disconnect();\n }\n navigatorInstance?.destroy;\n }, [FXLPositionChanged]);\n\n const goRight = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goRight(animated, callback);\n }, []);\n\n const goLeft = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goLeft(animated, callback)\n }, []);\n\n const goBackward = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goBackward(animated, callback);\n }, []);\n\n const goForward = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goForward(animated, callback);\n }, []);\n\n const goLink = useCallback((link: Link, animated: boolean, callback: cbb) => {\n navigatorInstance?.goLink(link, animated, callback);\n }, []);\n\n const go = useCallback((locator: Locator, animated: boolean, callback: cbb) => {\n navigatorInstance?.go(locator, animated, callback);\n }, []);\n\n const navLayout = useCallback(() => {\n return navigatorInstance?.layout;\n }, []);\n\n const currentLocator = useCallback(() => {\n return navigatorInstance?.currentLocator;\n }, []);\n\n const currentPositions = useCallback(() => {\n return navigatorInstance?.currentPositionNumbers;\n }, []);\n\n // Warning: this is an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const getCframes = useCallback(() => {\n return navigatorInstance?._cframes;\n }, []);\n\n return { \n EpubNavigatorLoad, \n EpubNavigatorDestroy, \n goRight, \n goLeft, \n goBackward, \n goForward,\n goLink, \n go, \n handleScrollAffordances,\n scrollBackTo, \n navLayout, \n currentLocator,\n currentPositions,\n preferencesEditor: navigatorInstance?.preferencesEditor,\n getSetting,\n submitPreferences,\n getCframes,\n onFXLPositionChange: (cb: (locator: Locator) => void) => {\n FXLPositionChangedCallback = cb;\n }\n }\n}"]}
1
+ {"version":3,"sources":["../src/core/Hooks/useIsClient.ts","../src/core/Hooks/useFullscreen.ts","../src/core/Hooks/usePrevious.ts","../src/resources/locales/en.json","../src/core/Hooks/Epub/scrollAffordance.ts","../src/core/Hooks/Epub/useEpubNavigator.ts"],"names":["useState","useEffect","ThScrollActions","useRef","useCallback"],"mappings":";;;;;AAIO,IAAM,cAAc,MAAM;AAC/B,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,KAAK,CAAA;AAE9C,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,OAAO,MAAA,KAAW,WAAa,EAAA,WAAA,CAAY,IAAI,CAAA;AAAA,GACrD,EAAG,EAAE,CAAA;AAEL,EAAO,OAAA,QAAA;AACT;;;ACPa,IAAA,aAAA,GAAgB,CAAC,QAA+C,KAAA;AAC3E,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAIA,SAAS,KAAK,CAAA;AACtD,EAAA,MAAM,WAAW,WAAY,EAAA;AAE7B,EAAM,MAAA,gBAAA,GAAmB,YAAY,MAAM;AACzC,IAAA,IAAI,CAAC,QAAU,EAAA;AAEf,IAAI,IAAA,CAAC,SAAS,iBAAmB,EAAA;AAC/B,MAAA,QAAA,CAAS,gBAAgB,iBAAkB,EAAA;AAAA,KAC7C,MAAA,IAAW,SAAS,cAAgB,EAAA;AAClC,MAAA,QAAA,CAAS,cAAe,EAAA;AAAA;AAC1B,GACF,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,aAA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C,OAAA,EAAkB,UAAmB,QAAkB,KAAA;AAC7E,IAAmB,iBAAA,EAAA,EAAA,CAAG,OAAS,EAAA,QAAA,EAAU,QAAQ,CAAA;AAAA,GACnD,EAAG,EAAE,CAAA;AAEL,EAAM,MAAA,SAAA,GAAYA,YAAY,MAAM;AAClC,IAAA,OAAO,iBAAmB,EAAA,MAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAEL,EAAM,MAAA,cAAA,GAAiBA,YAAY,MAAM;AACvC,IAAA,OAAO,iBAAmB,EAAA,cAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAEL,EAAM,MAAA,gBAAA,GAAmBA,YAAY,MAAM;AACzC,IAAA,OAAO,iBAAmB,EAAA,sBAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAIL,EAAM,MAAA,UAAA,GAAaA,YAAY,MAAM;AACnC,IAAA,OAAO,iBAAmB,EAAA,QAAA;AAAA,GAC5B,EAAG,EAAE,CAAA;AAEL,EAAO,OAAA;AAAA,IACL,iBAAA;AAAA,IACA,oBAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,EAAA;AAAA,IACA,uBAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,cAAA;AAAA,IACA,gBAAA;AAAA,IACA,mBAAmB,iBAAmB,EAAA,iBAAA;AAAA,IACtC,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA;AAAA,IACA,mBAAA,EAAqB,CAAC,EAAmC,KAAA;AACvD,MAA6B,0BAAA,GAAA,EAAA;AAAA;AAC/B,GACF;AACF","file":"chunk-JS5WI5D4.mjs","sourcesContent":["\"use client\";\n\nimport { useLayoutEffect, useState } from \"react\";\n\nexport const useIsClient = () => {\n const [isClient, setIsClient] = useState(false);\n\n useLayoutEffect(() => {\n if (typeof window !== \"undefined\") setIsClient(true);\n }, []);\n\n return isClient;\n}","\"use client\";\n\nimport { useCallback, useEffect, useState } from \"react\";\nimport { useIsClient } from \"./useIsClient\";\n\nexport const useFullscreen = (onChange?: (isFullscreen: boolean) => void) => {\n const [isFullscreen, setIsFullscreen] = useState(false);\n const isClient = useIsClient();\n\n const handleFullscreen = useCallback(() => {\n if (!isClient) return;\n\n if (!document.fullscreenElement) {\n document.documentElement.requestFullscreen();\n } else if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n }, [isClient]);\n\n useEffect(() => {\n const onFSchange = () => {\n const isFs = Boolean(document.fullscreenElement);\n setIsFullscreen(isFs);\n onChange && onChange(isFs);\n }\n document.addEventListener(\"fullscreenchange\", onFSchange);\n\n return () => {\n document.removeEventListener(\"fullscreenchange\", onFSchange);\n }\n }, [onChange]);\n\n return {\n isFullscreen,\n handleFullscreen\n }\n}","\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nexport const usePrevious = <T>(value: T): T | null => {\n const ref = useRef<T | null>(null);\n \n useEffect(() => {\n ref.current = value;\n }, [value]); \n\n return ref.current;\n}\n","{\n \"bookUrlConverter\": {\n \"label\": \"Load an EPUB publication from a remote server (it must support byte-range requests):\",\n \"placeholder\": \"https://www.example.org/ebook.epub\",\n \"button\": \"Load\",\n \"error\": \"The URL is invalid. Please check the URL is correct and try again.\"\n },\n \"reader\": {\n \"app\": {\n \"loading\": \"Loading\",\n \"publicationWrapper\": \"You’re now in the publication.\",\n \"docking\": {\n \"dockingLeft\": \"Docked panel left\",\n \"dockingRight\": \"Docked panel right\",\n \"dockingEmpty\": \"Currently empty\",\n \"dockingClosed\": \"Is closed, contains {{ action }}\",\n \"dockingCollapsed\": \"Is Collapsed, contains {{ action }}\"\n },\n \"header\": {\n \"label\": \"Top bar\",\n \"runningHead\": \"Running head\",\n \"runningHeadFallback\": \"...\",\n \"actions\": \"Actions\"\n },\n \"footer\": {\n \"label\": \"Bottom bar\"\n },\n \"progression\": {\n \"wrapper\": \"Current progression\",\n \"of\": \"{{ current }} of {{ reference }}\",\n \"referenceFallback\": \"current chapter\",\n \"pubFallback\": \"the publication\"\n },\n \"docker\": {\n \"wrapper\": \"Docking options\",\n \"dockToLeft\": {\n \"trigger\": \"Dock to the left\",\n \"tooltip\": \"Dock left\"\n },\n \"dockToRight\": {\n \"trigger\": \"Dock to the right\",\n \"tooltip\": \"Dock Right\"\n },\n \"popover\": {\n \"trigger\": \"Display in a window\",\n \"tooltip\": \"Pop over\"\n },\n \"fullscreen\": {\n \"trigger\": \"Display over contents\",\n \"tooltip\": \"Overlay\"\n },\n \"close\": {\n \"trigger\": \"Close\",\n \"tooltip\": \"Close\"\n }\n },\n \"back\": {\n \"trigger\": \"Back\"\n }\n },\n \"navigation\": {\n \"goForward\": \"Go forward\",\n \"goBackward\": \"Go backward\",\n \"scroll\": {\n \"wrapper\": \"Navigate through the publication\",\n \"prevLabel\": \"Previous\",\n \"nextLabel\": \"Next\",\n \"prevA11yLabel\": \"Go to the previous resource\",\n \"nextA11yLabel\": \"Go to the next resource\"\n }\n },\n \"fullscreen\": {\n \"tooltip\": \"Fullscreen\",\n \"trigger\": \"Toggle fullscreen mode\",\n \"close\": \"Exit fullscreen mode\" \n },\n \"toc\": {\n \"tooltip\": \"Table of contents\",\n \"trigger\": \"Table of contents\",\n \"close\": \"Close table of contents\",\n \"heading\": \"Table of contents\",\n \"entries\": \"Entries in the table\",\n \"empty\": \"The table of contents was not provided for this publication.\",\n \"search\": {\n \"label\": \"Search\",\n \"placeholder\": \"Search\",\n \"clear\": \"Clear\"\n }\n },\n \"jumpToPosition\": {\n \"tooltip\": \"Jump to…\",\n \"trigger\": \"Jump to position\",\n \"heading\": \"Jump to position\",\n \"go\": \"Go\",\n \"close\": \"Close jump to position\",\n \"label\": \"Select a position from {{ positionStart }} to {{ positionEnd }}:\"\n },\n \"overflowMenu\": {\n \"active\": {\n \"tooltip\": \"More actions\",\n \"trigger\": \"Toggle menu\"\n },\n \"hint\": {\n \"tooltip\": \"Toggle actions\",\n \"trigger\": \"Display actions\"\n }\n },\n \"layoutStrategy\": {\n \"tooltip\": \"Layout\",\n \"trigger\": \"Layout strategy\",\n \"close\": \"Close layout strategy menu\",\n \"heading\": \"Layout strategy\",\n \"title\": \"Strategy\",\n \"margin\": \"Margin\",\n \"lineLength\": \"Line length\",\n \"columns\": \"Columns\",\n \"minChars\": \"Disable minimal line length\",\n \"maxChars\": \"Disable maximal line length\",\n \"minimalLineLength\": {\n \"title\": \"Minimal line length\",\n \"increase\": \"Increase minimal line length\",\n \"decrease\": \"Decrease maximal line length\"\n },\n \"optimalLineLength\": {\n \"title\": \"Optimal line length\",\n \"increase\": \"Increase optimal line length\",\n \"decrease\": \"Decrease optimal line length\"\n },\n \"maximalLineLength\": {\n \"title\": \"Maximal line length\",\n \"increase\": \"Increase maximal line length\",\n \"decrease\": \"Decrease maximal line length\"\n }\n },\n \"settings\": {\n \"tooltip\": \"Settings\",\n \"trigger\": \"Settings menu\",\n \"close\": \"Close settings menu\",\n \"heading\": \"Display settings\",\n \"themes\": {\n \"title\": \"Themes\",\n \"auto\": \"Auto\",\n \"light\": \"Light\",\n \"sepia\": \"Sepia\",\n \"paper\": \"Paper\",\n \"dark\": \"Dark\",\n \"contrast1\": \"Contrast 1\",\n \"contrast2\": \"Contrast 2\",\n \"contrast3\": \"Contrast 3\"\n },\n \"zoom\": {\n \"title\": \"Zoom\",\n \"increase\": \"Increase zoom\",\n \"decrease\": \"Decrease zoom\"\n },\n \"fontSize\": {\n \"title\": \"Font size\",\n \"increase\": \"Increase font size\",\n \"decrease\": \"Decrease font size\"\n },\n \"fontFamily\": {\n \"title\": \"Font family\",\n \"labels\": {\n \"publisher\": \"Publisher’s font\",\n \"oldStyle\": \"Old style serif\",\n \"modern\": \"Modern serif\",\n \"sans\": \"Sans-serif\",\n \"humanist\": \"Humanist sans-serif\",\n \"monospace\": \"Monospace\" \n }\n },\n \"fontWeight\": {\n \"title\": \"Font weight\",\n \"increase\": \"Increase font weight\",\n \"decrease\": \"Decrease font weight\"\n },\n \"normalizeText\": {\n \"title\": \"Text normalization\",\n \"label\": \"Remove all text formatting\"\n },\n \"align\": {\n \"title\": \"Text alignment\",\n \"publisher\": \"Default\",\n \"left\": \"Left\",\n \"justify\": \"Justify\",\n \"right\": \"Right\"\n },\n \"hyphens\": {\n \"title\": \"Hyphenation\",\n \"label\": \"Enable hyphens\"\n },\n \"text\": {\n \"title\": \"Text\",\n \"advanced\": {\n \"tooltip\": \"More options\",\n \"trigger\": \"More formatting options\"\n }\n },\n \"lineHeight\": {\n \"title\": \"Line height\",\n \"publisher\": \"Default\",\n \"small\": \"Tight\",\n \"medium\": \"Balanced\",\n \"large\": \"Loose\"\n },\n \"paraSpacing\": {\n \"title\": \"Paragraph spacing\",\n \"increase\": \"Increase paragraph spacing\",\n \"decrease\": \"Decrease paragraph spacing\"\n },\n \"paraIndent\": {\n \"title\": \"Paragraph indent\",\n \"increase\": \"Increase paragraph indent\",\n \"decrease\": \"Decrease paragraph indent\"\n },\n \"wordSpacing\": {\n \"title\": \"Word spacing\",\n \"increase\": \"Increase word spacing\",\n \"decrease\": \"Decrease word spacing\"\n },\n \"letterSpacing\": {\n \"title\": \"Letter spacing\",\n \"increase\": \"Increase letter spacing\",\n \"decrease\": \"Decrease letter spacing\"\n },\n \"publisherStyles\": {\n \"label\": \"Use original formatting\"\n },\n \"spacing\": {\n \"title\": \"Spacing\",\n \"advanced\": {\n \"tooltip\": \"More options\",\n \"trigger\": \"More spacing options\"\n }\n },\n \"layout\": {\n \"title\": \"Layout\",\n \"scrolled\": \"Scrollable\",\n \"paginated\": \"Paginated\"\n },\n \"column\": {\n \"title\": \"Columns\",\n \"auto\": \"Auto\",\n \"one\": \"1 col\",\n \"two\": \"2 cols\"\n }\n }\n }\n}","\"use client\";\n\nimport Locale from \"../../../resources/locales/en.json\";\n\nimport { ScrollAffordanceConfig, ThScrollAffordancePref } from \"@/preferences/models/enums\";\n\n// Button posting message from iFrame won’t work since Navigator handles click\n// so the message is never received.\n// Link href is relative to selfhref but https and http links are\n// handled as external links in Reader, opening a new window.\n// Trying a custom scheme to avoid conflicts and progress on scroll for MVP\n// but not particularly happy about that.\n// React Portal has a lots of caveats too but it may at least protect\n// the component from Navigator’s handling, although I’m not 100% sure yet.\nexport const TH_CUSTOM_SCHEME = \"thorium-web:\";\nexport enum ThScrollActions {\n prev = TH_CUSTOM_SCHEME + \"go_prev\",\n next = TH_CUSTOM_SCHEME + \"go_next\"\n}\nconst STYLESHEET_ID = \"scroll-affordance-stylesheet\"\n\nexport class ScrollAffordance {\n private pref: ThScrollAffordancePref;\n private placement: \"top\" | \"bottom\";\n public id: string;\n public className: string;\n private styleSheetContent?: string;\n\n constructor(config: ScrollAffordanceConfig) {\n this.pref = config.pref;\n this.placement = config.placement;\n this.id = `thorium-web-scroll-affordance-wrapper-${config.placement}`;\n this.className = config.className || \"thorium-web-scroll-affordance-wrapper\";\n this.styleSheetContent = config.styleSheetContent;\n }\n\n private createStyleSheet = (cssContent?: string) => {\n const styleSheet = document.createElement(\"style\");\n styleSheet.id = STYLESHEET_ID;\n styleSheet.dataset.readium = \"true\";\n styleSheet.textContent = cssContent || `.thorium-web-scroll-affordance-wrapper {\n --color-text: currentColor;\n\n box-sizing: border-box;\n display: flex;\n width: 100%;\n gap: 20px;\n margin: 0;\n padding: 0;\n }\n .thorium-web-scroll-affordance-wrapper:focus-within {\n /* to get around hidden overflow cutting off focus ring w/o being too noticeable */\n padding: 0 2px;\n }\n #thorium-web-scroll-affordance-wrapper-top {\n /* to get around hidden overflow cutting off focus ring */\n padding-top: 0.25rem;\n margin-bottom: 1.25rem;\n }\n #thorium-web-scroll-affordance-wrapper-bottom {\n margin-top: 1.5rem;\n /* to get around hidden overflow cutting off focus ring */\n padding-bottom: 1.5rem;\n }\n .thorium-web-scroll-affordance-wrapper > a {\n box-sizing: border-box;\n border: 1px solid color-mix(in srgb, var(--color-text) 50%, transparent);\n border-radius: 3px;\n padding: 0.75rem;\n text-decoration: none;\n font-weight: bold;\n flex: 1 1 0;\n text-align: left;\n color: var(--color-text);\n font-size: 1rem;\n font-style: normal;\n font-family: inherit;\n }\n .thorium-web-scroll-affordance-wrapper > a:hover {\n background-color: \"color-mix(in srgb, var(--color-text) 15%, transparent)\";\n border: 1px solid var(--color-text);\n }\n .thorium-web-scroll-affordance-wrapper > a:first-child:not(:last-child) {\n text-align: right;\n }\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-prev > span:before {\n content: \"←\";\n float: left;\n margin-right: 10px;\n color: \"color-mix(in srgb, var(--color-text) 50%, transparent)\";\n }\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-prev:hover > span:before,\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-next:hover > span:after {\n color: var(--color-text);\n }\n .thorium-web-scroll-affordance-wrapper > a.thorium-web-scroll-affordance-button-next > span:after {\n content: \"→\";\n float: right;\n margin-left: 10px;\n color: \"color-mix(in srgb, var(--color-text) 50%, transparent)\";\n }`;\n return styleSheet;\n };\n\n public render = (doc: Document) => {\n if (doc) {\n // Prevent duplicates\n this.destroy(doc);\n\n let wrapper: HTMLElement | null = null;\n\n if (this.pref !== ThScrollAffordancePref.none) {\n let prevAnchor: HTMLAnchorElement | undefined;\n let nextAnchor: HTMLAnchorElement | undefined;\n\n if ((this.pref === ThScrollAffordancePref.both || this.pref === ThScrollAffordancePref.prev)) {\n prevAnchor = doc.createElement(\"a\");\n prevAnchor.className = `thorium-web-scroll-affordance-button-prev`;\n prevAnchor.id = `thorium-web-scroll-affordance-button-prev-${this.placement}`;\n prevAnchor.href = ThScrollActions.prev;\n\n // In practice browsers don’t do anything with this? And since the href\n // is a custom scheme, they wouldn’t be able to preload the document\n // that is handled by navigator anyway. So not sure it hurts or has any benefit…\n prevAnchor.rel = \"prev\";\n prevAnchor.setAttribute(\"aria-label\", Locale.reader.navigation.scroll.prevA11yLabel);\n\n prevAnchor.innerHTML = `<span>${Locale.reader.navigation.scroll.prevLabel}</span>`;\n }\n\n if ((this.pref === ThScrollAffordancePref.both || this.pref === ThScrollAffordancePref.next)) {\n nextAnchor = doc.createElement(\"a\");\n nextAnchor.className = `thorium-web-scroll-affordance-button-next`;\n nextAnchor.id = `<a id=\"thorium-web-scroll-affordance-button-next-${this.placement}`;\n nextAnchor.href = ThScrollActions.next;\n\n // In practice browsers don’t do anything with this? And since the href\n // is a custom scheme, they wouldn’t be able to preload the document\n // that is handled by navigator anyway. So not sure it hurts or has any benefit…\n nextAnchor.rel = \"next\";\n nextAnchor.setAttribute(\"aria-label\", Locale.reader.navigation.scroll.nextA11yLabel);\n\n nextAnchor.innerHTML = `<span>${Locale.reader.navigation.scroll.nextLabel}</span>`\n }\n\n if (prevAnchor || nextAnchor) {\n wrapper = doc.createElement(\"nav\");\n wrapper.id = `thorium-web-scroll-affordance-wrapper-${this.placement}`;\n wrapper.className = this.className || \"thorium-web-scroll-affordance-wrapper\";\n wrapper.dataset.readium = \"true\";\n wrapper.setAttribute(\"aria-label\", Locale.reader.navigation.scroll.wrapper);\n\n if (prevAnchor) wrapper.append(prevAnchor);\n if (nextAnchor) wrapper.append(nextAnchor);\n }\n }\n\n if (wrapper) {\n const styleSheet = this.createStyleSheet(this.styleSheetContent);\n doc.head.append(styleSheet);\n this.placement === \"top\" ? doc.body.prepend(wrapper) : doc.body.append(wrapper);\n }\n }\n }\n\n public destroy = (doc: Document) => {\n if (doc) {\n const stylesheet = doc.getElementById(`#${ STYLESHEET_ID }`);\n if (stylesheet) stylesheet.remove();\n\n const wrapper = doc.getElementById(this.id);\n if (wrapper) {\n wrapper.remove();\n }\n }\n }\n}","\"use client\";\n\nimport { useCallback, useMemo, useRef } from \"react\";\n\nimport { ThScrollAffordancePref, ThScrollBackTo } from \"@/preferences/models/enums\";\nimport { ScrollAffordance } from \"./scrollAffordance\";\n\nimport { \n EPUBLayout, \n Link, \n Locator, \n Publication \n} from \"@readium/shared\";\nimport { \n EpubNavigator, \n EpubNavigatorListeners, \n EpubPreferences, \n EpubSettings, \n FrameManager, \n FXLFrameManager, \n IEpubDefaults, \n IEpubPreferences\n} from \"@readium/navigator\";\n\ntype cbb = (ok: boolean) => void;\n\n// Module scoped, singleton instance of navigator\nlet navigatorInstance: EpubNavigator | null = null;\n\n// Scroll Affordances as mutable, otherwise the callbacks\n// will not work for components mounting before load\n// They should not be part of the hook anyway\n// And their existence is due to the lack of Injection API\nlet scrollAffordanceTop: ScrollAffordance | null = null;\nlet scrollAffordanceBottom: ScrollAffordance | null = null;\n\nexport interface EpubNavigatorLoadProps {\n container: HTMLDivElement | null;\n publication: Publication;\n listeners: EpubNavigatorListeners;\n positionsList?: Locator[];\n initialPosition?: Locator;\n preferences?: IEpubPreferences;\n defaults?: IEpubDefaults;\n scrollAffordances?: {\n top?: ThScrollAffordancePref;\n bottom?: ThScrollAffordancePref;\n }\n}\n\nexport const useEpubNavigator = () => {\n const container = useRef<HTMLDivElement | null>(null);\n const containerParent = useRef<HTMLElement | null>(null);\n const publication = useRef<Publication | null>(null);\n\n // Warning: this is using an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const mountScroll = useCallback(() => {\n navigatorInstance?._cframes.forEach((frameManager: FrameManager | FXLFrameManager | undefined) => {\n if (frameManager) { \n scrollAffordanceTop?.render(frameManager.window.document);\n scrollAffordanceBottom?.render(frameManager.window.document)\n }\n });\n }, []);\n\n // Warning: this is using an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const unmountScroll = useCallback(() => {\n navigatorInstance?._cframes.forEach((frameManager: FrameManager | FXLFrameManager | undefined) => {\n if (frameManager) {\n scrollAffordanceTop?.destroy(frameManager.window.document);\n scrollAffordanceBottom?.destroy(frameManager.window.document)\n }\n });\n }, []);\n\n const handleScrollAffordances = useCallback((scroll: boolean) => {\n if (navigatorInstance === null || navigatorInstance.layout === EPUBLayout.fixed) return;\n scroll ? mountScroll() : unmountScroll();\n }, [mountScroll, unmountScroll]);\n\n const submitPreferences = useCallback(async (preferences: IEpubPreferences) => {\n await navigatorInstance?.submitPreferences(new EpubPreferences(preferences));\n }, []);\n\n const getSetting = useCallback(<K extends keyof EpubSettings>(settingKey: K) => {\n return navigatorInstance?.settings[settingKey] as EpubSettings[K];\n }, []);\n\n // Warning: this is using an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const scrollBackTo = useCallback((position: ThScrollBackTo) => {\n if (position !== ThScrollBackTo.untouched) {\n navigatorInstance?._cframes.forEach((frameManager: FrameManager | FXLFrameManager | undefined) => {\n if (frameManager) {\n const scrollingEl = frameManager.window.document.scrollingElement;\n if (position === ThScrollBackTo.top) {\n scrollingEl?.scrollTo(0, 0);\n } else {\n scrollingEl?.scrollTo(0, scrollingEl.scrollHeight);\n }\n }\n });\n }\n }, []);\n\n // [TMP] Working around positionChanged not firing consistently for FXL\n // We’re observing the FXLFramePoolManager spine div element’s style\n // and checking whether its translate3d has changed.\n // Sure IntersectionObserver should be the obvious one to use here,\n // observing iframes instead of the style attribute on the spine element\n // but there’s additional complexity to handle as a spread = 2 iframes\n // And keeping in sync while the FramePool is re-aligning on resize can be suboptimal\n let FXLPositionChangedCallback: ((locator: Locator) => void) | undefined;\n const FXLPositionChanged = useMemo(() => { \n return new MutationObserver((mutationsList: MutationRecord[]) => {\n for (const mutation of mutationsList) {\n const re = /translate3d\\(([^)]+)\\)/;\n const newVal = (mutation.target as HTMLElement).getAttribute(mutation.attributeName as string);\n const oldVal = mutation.oldValue;\n if (newVal?.split(re)[1] !== oldVal?.split(re)[1]) {\n const locator = navigatorInstance?.currentLocator;\n if (locator) {\n FXLPositionChangedCallback?.(locator);\n }\n }\n }\n });\n }, [FXLPositionChangedCallback]);\n\n const EpubNavigatorLoad = useCallback((config: EpubNavigatorLoadProps, cb: Function) => {\n if (config.container) {\n container.current = config.container;\n containerParent.current = container.current? container.current.parentElement : null;\n \n publication.current = config.publication;\n\n if (config.scrollAffordances) {\n if (config.scrollAffordances.top) {\n scrollAffordanceTop = new ScrollAffordance({ pref: config.scrollAffordances.top, placement: \"top\" })\n }\n if (config.scrollAffordances.bottom) {\n scrollAffordanceBottom = new ScrollAffordance({ pref: config.scrollAffordances.bottom, placement: \"bottom\" })\n }\n }\n\n navigatorInstance = new EpubNavigator(\n config.container, \n config.publication, \n config.listeners, \n config.positionsList, \n config.initialPosition, \n { preferences: config.preferences || {}, defaults: config.defaults || {} }\n );\n\n navigatorInstance.load().then(() => {\n cb();\n\n if (navigatorInstance?.layout === EPUBLayout.fixed) {\n // @ts-ignore\n FXLPositionChanged.observe((navigatorInstance?.pool.spineElement as HTMLElement), {\n attributeFilter: [\"style\"], \n attributeOldValue: true\n });\n }\n });\n }\n }, [FXLPositionChanged]);\n\n const EpubNavigatorDestroy = useCallback((cb: Function) => {\n cb();\n\n if (navigatorInstance?.layout === EPUBLayout.fixed) {\n FXLPositionChanged.disconnect();\n }\n navigatorInstance?.destroy;\n }, [FXLPositionChanged]);\n\n const goRight = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goRight(animated, callback);\n }, []);\n\n const goLeft = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goLeft(animated, callback)\n }, []);\n\n const goBackward = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goBackward(animated, callback);\n }, []);\n\n const goForward = useCallback((animated: boolean, callback: cbb) => {\n navigatorInstance?.goForward(animated, callback);\n }, []);\n\n const goLink = useCallback((link: Link, animated: boolean, callback: cbb) => {\n navigatorInstance?.goLink(link, animated, callback);\n }, []);\n\n const go = useCallback((locator: Locator, animated: boolean, callback: cbb) => {\n navigatorInstance?.go(locator, animated, callback);\n }, []);\n\n const navLayout = useCallback(() => {\n return navigatorInstance?.layout;\n }, []);\n\n const currentLocator = useCallback(() => {\n return navigatorInstance?.currentLocator;\n }, []);\n\n const currentPositions = useCallback(() => {\n return navigatorInstance?.currentPositionNumbers;\n }, []);\n\n // Warning: this is an internal member that will become private, do not rely on it\n // See https://github.com/edrlab/thorium-web/issues/25\n const getCframes = useCallback(() => {\n return navigatorInstance?._cframes;\n }, []);\n\n return { \n EpubNavigatorLoad, \n EpubNavigatorDestroy, \n goRight, \n goLeft, \n goBackward, \n goForward,\n goLink, \n go, \n handleScrollAffordances,\n scrollBackTo, \n navLayout, \n currentLocator,\n currentPositions,\n preferencesEditor: navigatorInstance?.preferencesEditor,\n getSetting,\n submitPreferences,\n getCframes,\n onFXLPositionChange: (cb: (locator: Locator) => void) => {\n FXLPositionChangedCallback = cb;\n }\n }\n}"]}
@@ -2,15 +2,15 @@ import { require_debounce, useAppSelector, useAppDispatch, setColumnCount, setFo
2
2
  export { ThStoreProvider, actionsSlice, activateDockPanel, collapseDockPanel, deactivateDockPanel, dockAction, expandDockPanel, makeStore, publicationSlice, readerSlice, setActionOpen, setArrows, setBreakpoint, setColorScheme, setColumnCount, setContrast, setDirection, setDockPanelWidth, setFXL, setFontFamily, setFontSize, setFontWeight, setForcedColors, setFullscreen, setHovering, setHyphens, setImmersive, setLayoutStrategy, setLetterSpacing, setLineHeight, setLineLength, setLoading, setMonochrome, setOverflow, setParagraphIndent, setParagraphSpacing, setPlatformModifier, setPositionsList, setProgression, setPublicationEnd, setPublicationStart, setPublisherStyles, setRTL, setReducedMotion, setReducedTransparency, setRunningHead, setScroll, setSettingsContainer, setTextAlign, setTextNormalization, setTheme, setTmpLineLengths, setTmpMaxChars, setTmpMinChars, setTocEntry, setTocTree, setWordSpacing, settingsSlice, themeSlice, toggleActionOpen, toggleImmersive, useAppDispatch, useAppSelector, useAppStore } from '../../chunk-IUF5GAPA.mjs';
3
3
  import { defaultFontFamilyOptions, usePreferences, defaultLetterSpacing, defaultLineHeights, defaultParagraphIndent, defaultParagraphSpacing, defaultSpacingSettingsSubpanel, defaultSpacingSettingsMain, defaultTextSettingsSubpanel, defaultTextSettingsMain, usePreferenceKeys, buildThemeObject, defaultWordSpacing, defaultFontSize } from '../../chunk-4BUYRCGX.mjs';
4
4
  export { ThPreferencesProvider, usePreferences, useTheming } from '../../chunk-4BUYRCGX.mjs';
5
- import { ThRadioGroup, ThDropdown, ThSlider, ThSwitch, ThNumberField, ThSettingsWrapper, ThActionButton, ThMenu, ThCollapsibleActionsBar, ThMenuItem, ThPopover, ThContainerHeader, ThNavigationButton, ThContainerBody, ThBottomSheet, ThCloseButton, ThModal, ThDockedPanel, ThTypedComponentRenderer, useActions, ThForm, ThFormNumberField, ThFormSearchField, ThFormTextField, ThLoader, ThHeader, ThRunningHead, ThFooter, ThProgression } from '../../chunk-SG5SZZVH.mjs';
5
+ import { ThRadioGroup, ThDropdown, ThSlider, ThSwitch, ThNumberField, ThSettingsWrapper, ThActionButton, ThMenu, ThCollapsibleActionsBar, ThMenuItem, ThPopover, ThContainerHeader, ThNavigationButton, ThContainerBody, ThBottomSheet, ThCloseButton, ThModal, ThDockedPanel, ThTypedComponentRenderer, useActions, ThForm, ThFormNumberField, ThFormSearchField, ThFormTextField, ThLoader, ThHeader, ThRunningHead, ThFooter, ThProgression } from '../../chunk-2U455VSY.mjs';
6
6
  import '../../chunk-MLEYTQGK.mjs';
7
7
  import { makeBreakpointsMap, localData, isKeyboardTriggered, isActiveElement, isInteractiveElement } from '../../chunk-4DAERVPF.mjs';
8
8
  export { isActiveElement, isInteractiveElement, isKeyboardTriggered, localData, makeBreakpointsMap } from '../../chunk-4DAERVPF.mjs';
9
9
  export { propsToCSSVars } from '../../chunk-TTGURRX3.mjs';
10
10
  import { isIOSish, getPlatformModifier, buildShortcut, metaKeys } from '../../chunk-IEYR7QV7.mjs';
11
11
  export { UnstableShortcutMetaKeywords, UnstableShortcutRepresentation, buildShortcut, defaultPlatformModifier, getPlatform, getPlatformModifier, isIOSish, isIpadOS, isMacish, metaKeys } from '../../chunk-IEYR7QV7.mjs';
12
- import { useEpubNavigator, en_default, useFullscreen, usePrevious, TH_CUSTOM_SCHEME, ThScrollActions } from '../../chunk-CW72NB4V.mjs';
13
- export { useEpubNavigator } from '../../chunk-CW72NB4V.mjs';
12
+ import { useEpubNavigator, en_default, useFullscreen, usePrevious, TH_CUSTOM_SCHEME, ThScrollActions } from '../../chunk-JS5WI5D4.mjs';
13
+ export { useEpubNavigator } from '../../chunk-JS5WI5D4.mjs';
14
14
  import '../../chunk-KBKVDSTL.mjs';
15
15
  import '../../chunk-NQ2ZSGCX.mjs';
16
16
  import { ThDockingTypes, ThSheetTypes } from '../../chunk-PGRUW4ME.mjs';
@@ -1,4 +1,4 @@
1
- export { ThActionButton, ThActionsBar, ThActionsTriggerVariant, ThBottomSheet, ThCloseButton, ThCollapsibleActionsBar, ThContainerBody, ThContainerHeader, ThContainerHeaderWithClose, ThContainerHeaderWithPrevious, ThDockedPanel, ThDragIndicatorButton, ThDropdown, ThDropdownButton, ThFooter, ThForm, ThFormNumberField, ThFormSearchField, ThFormTextField, ThHeader, ThLoader, ThMenu, ThMenuButton, ThMenuItem, ThModal, ThNavigationButton, ThNumberField, ThPopover, ThProgression, ThRadioGroup, ThRunningHead, ThSettingsWrapper, ThSettingsWrapperButton, ThSlider, ThSwitch, ThTypedComponentRenderer, useActions, useFirstFocusable } from '../../chunk-SG5SZZVH.mjs';
1
+ export { ThActionButton, ThActionsBar, ThActionsTriggerVariant, ThBottomSheet, ThCloseButton, ThCollapsibleActionsBar, ThContainerBody, ThContainerHeader, ThContainerHeaderWithClose, ThContainerHeaderWithPrevious, ThDockedPanel, ThDragIndicatorButton, ThDropdown, ThDropdownButton, ThFooter, ThForm, ThFormNumberField, ThFormSearchField, ThFormTextField, ThHeader, ThLoader, ThMenu, ThMenuButton, ThMenuItem, ThModal, ThNavigationButton, ThNumberField, ThPopover, ThProgression, ThRadioGroup, ThRunningHead, ThSettingsWrapper, ThSettingsWrapperButton, ThSlider, ThSwitch, ThTypedComponentRenderer, useActions, useFirstFocusable } from '../../chunk-2U455VSY.mjs';
2
2
  export { ThCollapsibilityVisibility, useCollapsibility } from '../../chunk-MLEYTQGK.mjs';
3
3
  import '../../chunk-3QS3WKRC.mjs';
4
4
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
- export { useEpubNavigator, useFullscreen, useIsClient, usePrevious } from '../../chunk-CW72NB4V.mjs';
1
+ export { useEpubNavigator, useFullscreen, useIsClient, usePrevious } from '../../chunk-JS5WI5D4.mjs';
2
2
  export { useBreakpoints, useForcedColors, useMonochrome, useReducedMotion, useReducedTransparency } from '../../chunk-KBKVDSTL.mjs';
3
3
  export { ThColorScheme, ThContrast, useColorScheme, useContrast, useMediaQuery } from '../../chunk-NQ2ZSGCX.mjs';
4
4
  import '../../chunk-PGRUW4ME.mjs';
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "bugs": {
21
21
  "url": "https://github.com/edrlab/thorium-web/issues"
22
22
  },
23
- "version": "0.10.0",
23
+ "version": "0.11.0",
24
24
  "private": false,
25
25
  "files": [
26
26
  "./dist"
@@ -44,6 +44,7 @@
44
44
  "bundle": "tsup --config tsup.config.ts"
45
45
  },
46
46
  "peerDependencies": {
47
+ "@readium/css": ">=2.0.0-beta.13",
47
48
  "@readium/navigator": ">=2.0.0-beta.2",
48
49
  "@readium/navigator-html-injectables": ">=2.0.0-beta.1",
49
50
  "@readium/shared": "^1.2.1",