@edrlab/thorium-web 1.0.0-beta.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{actionsReducer-ZN1H6lWp.d.mts → actionsReducer-CpRAplzM.d.mts} +1 -1
  2. package/dist/{chunk-NA3KMUS4.mjs → chunk-2KTSTQ62.mjs} +7 -7
  3. package/dist/chunk-2KTSTQ62.mjs.map +1 -0
  4. package/dist/{chunk-ITT2P3LQ.mjs → chunk-7PVZJQXV.mjs} +3 -3
  5. package/dist/{chunk-ITT2P3LQ.mjs.map → chunk-7PVZJQXV.mjs.map} +1 -1
  6. package/dist/{chunk-SN7KBNGK.mjs → chunk-DSQWBBAX.mjs} +3 -3
  7. package/dist/{chunk-SN7KBNGK.mjs.map → chunk-DSQWBBAX.mjs.map} +1 -1
  8. package/dist/{chunk-DYR64DDH.mjs → chunk-EDUSR3DX.mjs} +21 -3
  9. package/dist/chunk-EDUSR3DX.mjs.map +1 -0
  10. package/dist/{chunk-HUMV6I5L.mjs → chunk-KJMXTNYK.mjs} +3 -2
  11. package/dist/chunk-KJMXTNYK.mjs.map +1 -0
  12. package/dist/{chunk-MS2TXXYX.mjs → chunk-R5KZTO4S.mjs} +3 -3
  13. package/dist/{chunk-MS2TXXYX.mjs.map → chunk-R5KZTO4S.mjs.map} +1 -1
  14. package/dist/{chunk-WTRUE2ES.mjs → chunk-ZZS7TTFX.mjs} +4 -3
  15. package/dist/chunk-ZZS7TTFX.mjs.map +1 -0
  16. package/dist/components/Epub/index.d.mts +8 -8
  17. package/dist/components/Epub/index.mjs +64 -49
  18. package/dist/components/Epub/index.mjs.map +1 -1
  19. package/dist/{const-PMmwYJND.d.mts → const-CWJ3Tl-E.d.mts} +4 -3
  20. package/dist/core/Components/index.d.mts +8 -3
  21. package/dist/core/Components/index.mjs +2 -2
  22. package/dist/core/Helpers/index.d.mts +2 -2
  23. package/dist/core/Helpers/index.mjs +2 -2
  24. package/dist/core/Hooks/index.d.mts +3 -3
  25. package/dist/core/Hooks/index.mjs +2 -2
  26. package/dist/{enums-zr26wZEt.d.mts → enums-C9lRPPoF.d.mts} +1 -0
  27. package/dist/i18n/index.mjs +3 -3
  28. package/dist/lib/index.d.mts +5 -5
  29. package/dist/lib/index.mjs +2 -2
  30. package/dist/preferences/index.d.mts +6 -6
  31. package/dist/preferences/index.mjs +2 -2
  32. package/dist/{useBreakpoints-D4hBQiGq.d.mts → useBreakpoints-cngn8st0.d.mts} +1 -1
  33. package/dist/{useEpubNavigator-DFRJ_tHa.d.mts → useEpubNavigator-DpvqVgNu.d.mts} +2 -2
  34. package/dist/{usePreferences-DN1ACFM8.d.mts → usePreferences-D81fL5N6.d.mts} +1 -1
  35. package/package.json +27 -36
  36. package/dist/chunk-DYR64DDH.mjs.map +0 -1
  37. package/dist/chunk-HUMV6I5L.mjs.map +0 -1
  38. package/dist/chunk-NA3KMUS4.mjs.map +0 -1
  39. package/dist/chunk-WTRUE2ES.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
2
- import { a as ThDockingKeys } from './enums-zr26wZEt.mjs';
2
+ import { a as ThDockingKeys } from './enums-C9lRPPoF.mjs';
3
3
 
4
4
  type PrimitiveType = number | string | boolean;
5
5
  /** Object types that should never be mapped */
@@ -1,5 +1,5 @@
1
1
  import { useState, useLayoutEffect, useCallback, useEffect, useRef, useMemo } from 'react';
2
- import { EPUBLayout, Link, Locator } from '@readium/shared';
2
+ import { Layout, Link, Locator } from '@readium/shared';
3
3
  import { EpubPreferences, EpubNavigator } from '@readium/navigator';
4
4
 
5
5
  // src/core/Hooks/useFullscreen.ts
@@ -80,7 +80,7 @@ var useTimeline = ({
80
80
  positionsList,
81
81
  onChange
82
82
  }) => {
83
- const layout = publication?.metadata.getPresentation()?.layout || EPUBLayout.reflowable;
83
+ const layout = publication?.metadata.effectiveLayout || Layout.reflowable;
84
84
  const [timelineItems, setTimelineItems] = useState({});
85
85
  const [tocTree, setTocTree] = useState([]);
86
86
  const [currentTocEntry, setCurrentTocEntry] = useState(null);
@@ -131,7 +131,7 @@ var useTimeline = ({
131
131
  setCurrentTocEntry(currentMatch.id);
132
132
  return;
133
133
  }
134
- if (layout === EPUBLayout.fixed) {
134
+ if (layout === Layout.fixed) {
135
135
  const positions = currentPositions;
136
136
  if (positions && positions.length === 2) {
137
137
  const otherPosition = positions[0] === locator.locations.position ? positions[1] : positions[0];
@@ -305,7 +305,7 @@ var useEpubNavigator = () => {
305
305
  );
306
306
  navigatorInstance.load().then(() => {
307
307
  cb();
308
- if (navigatorInstance?.layout === EPUBLayout.fixed) {
308
+ if (navigatorInstance?.layout === Layout.fixed) {
309
309
  FXLPositionChanged.observe(navigatorInstance?.pool.spineElement, {
310
310
  attributeFilter: ["style"],
311
311
  attributeOldValue: true
@@ -316,7 +316,7 @@ var useEpubNavigator = () => {
316
316
  }, [FXLPositionChanged]);
317
317
  const EpubNavigatorDestroy = useCallback((cb) => {
318
318
  cb();
319
- if (navigatorInstance?.layout === EPUBLayout.fixed) {
319
+ if (navigatorInstance?.layout === Layout.fixed) {
320
320
  FXLPositionChanged.disconnect();
321
321
  }
322
322
  navigatorInstance?.destroy;
@@ -413,5 +413,5 @@ var useEpubNavigator = () => {
413
413
  };
414
414
 
415
415
  export { useEpubNavigator, useFullscreen, useIsClient, useLocalStorage, usePrevious, useTimeline };
416
- //# sourceMappingURL=chunk-NA3KMUS4.mjs.map
417
- //# sourceMappingURL=chunk-NA3KMUS4.mjs.map
416
+ //# sourceMappingURL=chunk-2KTSTQ62.mjs.map
417
+ //# sourceMappingURL=chunk-2KTSTQ62.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/Hooks/useIsClient.ts","../src/core/Hooks/useFullscreen.ts","../src/core/Hooks/useLocalStorage.ts","../src/core/Hooks/usePrevious.ts","../src/core/Hooks/useTimeline.ts","../src/core/Hooks/Epub/useEpubNavigator.ts"],"names":["useState","useEffect","useRef","useCallback","positionsList","timelineItems","currentItem","Layout","currentLocator"],"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,EACrD,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,QAAA;AACT;;;ACPO,IAAM,aAAA,GAAgB,CAAC,QAAA,KAA+C;AAC3E,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAIA,SAAS,KAAK,CAAA;AACtD,EAAA,MAAM,WAAW,WAAA,EAAY;AAE7B,EAAA,MAAM,gBAAA,GAAmB,YAAY,MAAM;AACzC,IAAA,IAAI,CAAC,QAAA,EAAU;AAEf,IAAA,IAAI,CAAC,SAAS,iBAAA,EAAmB;AAC/B,MAAA,QAAA,CAAS,gBAAgB,iBAAA,EAAkB;AAAA,IAC7C,CAAA,MAAA,IAAW,SAAS,cAAA,EAAgB;AAClC,MAAA,QAAA,CAAS,cAAA,EAAe;AAAA,IAC1B;AAAA,EACF,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,aAAa,MAAM;AACvB,MAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,QAAA,CAAS,iBAAiB,CAAA;AAC/C,MAAA,eAAA,CAAgB,IAAI,CAAA;AACpB,MAAA,QAAA,IAAY,SAAS,IAAI,CAAA;AAAA,IAC3B,CAAA;AACA,IAAA,QAAA,CAAS,gBAAA,CAAiB,oBAAoB,UAAU,CAAA;AAExD,IAAA,OAAO,MAAM;AACX,MAAA,QAAA,CAAS,mBAAA,CAAoB,oBAAoB,UAAU,CAAA;AAAA,IAC7D,CAAA;AAAA,EACF,CAAA,EAA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,aAAA;AAAA,EAC5B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,MAAM,WAAA,GAAcA,YAAY,MAAM;AACpC,IAAA,OAAO,iBAAA,EAAmB,WAAA;AAAA,EAC5B,CAAA,EAAG,EAAE,CAAA;AAIL,EAAA,MAAM,UAAA,GAAaA,YAAY,MAAM;AACnC,IAAA,OAAO,iBAAA,EAAmB,QAAA;AAAA,EAC5B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO;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,SAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,WAAA;AAAA,IACA,gBAAA;AAAA,IACA,aAAA;AAAA,IACA,YAAA;AAAA,IACA,aAAA;AAAA,IACA,WAAA;AAAA,IACA,mBAAmB,iBAAA,EAAmB,iBAAA;AAAA,IACtC,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA;AAAA,IACA,mBAAA,EAAqB,CAAC,EAAA,KAAmC;AACvD,MAAA,0BAAA,GAA6B,EAAA;AAAA,IAC/B;AAAA,GACF;AACF","file":"chunk-2KTSTQ62.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, useState } from \"react\";\n\nexport const useLocalStorage = (key: string) => {\n const [localData, setLocalData] = useState<any>(null);\n const cachedLocalData = useRef<any>(null);\n\n const setValue = (newValue: any) => {\n setLocalData(newValue);\n localStorage.setItem(key, JSON.stringify(newValue));\n };\n\n const getValue = () => {\n if (localData !== null) return localData;\n const value = localStorage.getItem(key);\n return value ? JSON.parse(value) : null;\n };\n\n const clearValue = () => {\n setLocalData(null);\n localStorage.removeItem(key);\n };\n\n useEffect(() => {\n cachedLocalData.current = localData;\n }, [localData])\n\n return {\n setLocalData: setValue,\n getLocalData: getValue,\n clearLocalData: clearValue,\n localData,\n cachedLocalData\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","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { Layout, Link, Locator, Publication } from \"@readium/shared\";\n\nexport interface TocItem {\n id: string;\n href: string;\n title?: string;\n children?: TocItem[];\n position?: number;\n}\n\nexport interface TimelineItem {\n href: string;\n title?: string;\n fragments?: string[];\n positionRange?: [number, number?];\n progressionRange?: [number, number?];\n totalProgressionRange?: [number, number?];\n children?: TimelineItem[];\n}\n\nexport interface UnstableTimeline {\n items?: {\n [href: string]: TimelineItem;\n };\n toc?: {\n tree?: TocItem[];\n currentEntry?: string | null;\n };\n currentItem?: TimelineItem | null;\n previousItem?: TimelineItem | null;\n nextItem?: TimelineItem | null;\n}\n\nexport const useTimeline = ({\n publication, \n currentLocation, \n currentPositions,\n positionsList,\n onChange\n}: {\n publication: Publication | null, \n currentLocation?: Locator, \n currentPositions: number[],\n positionsList: Locator[],\n onChange?: (timeline: UnstableTimeline) => void\n}): UnstableTimeline => {\n const layout = publication?.metadata.effectiveLayout || Layout.reflowable;\n\n // Convert all refs to state\n const [timelineItems, setTimelineItems] = useState<{ [href: string]: TimelineItem }>({});\n const [tocTree, setTocTree] = useState<TocItem[]>([]);\n const [currentTocEntry, setCurrentTocEntry] = useState<string | null>(null);\n const [currentItem, setCurrentItem] = useState<TimelineItem | null>(null);\n const [previousItem, setPreviousItem] = useState<TimelineItem | null>(null);\n const [nextItem, setNextItem] = useState<TimelineItem | null>(null);\n\n // Keep idCounter as ref since it's just a counter\n const idCounterRef = useRef(0);\n\n const buildTocTree = useCallback((\n links: Link[],\n idGenerator: () => string,\n positionsList?: Locator[]\n ): TocItem[] => {\n return links.map((link) => {\n // Generate a new ID for the current Link\n const newId = idGenerator();\n \n // Create a plain object for compatibility with Tree components\n let href = link.href;\n const fragmentIndex = href.indexOf(\"#\");\n if (fragmentIndex !== -1) {\n const baseHref = href.substring(0, fragmentIndex);\n const duplicateLink = links.find((l) => l.href.startsWith(baseHref) && l.href !== href);\n if (!duplicateLink) {\n href = baseHref;\n }\n }\n \n const treeNode: TocItem = {\n id: newId,\n href: href,\n title: link.title,\n position: positionsList?.find((position) => position.href === href)?.locations.position\n };\n \n // Recursively process children if they exist\n if (link.children) {\n treeNode.children = buildTocTree(link.children.items, idGenerator, positionsList);\n }\n \n return treeNode;\n });\n }, []);\n\n const handleTocEntryOnNav = useCallback((locator?: Locator) => {\n if (!locator || !tocTree.length) return;\n\n const findMatch = (items: TocItem[], link?: Link): TocItem | undefined => {\n for (const item of items) {\n if (item.href === link?.href) {\n return item;\n }\n if (item.children) {\n const match = findMatch(item.children, link);\n if (match) return match;\n }\n }\n return undefined;\n };\n\n const currentMatch = findMatch(tocTree, new Link(locator));\n if (currentMatch) {\n setCurrentTocEntry(currentMatch.id);\n return;\n }\n\n // If we're in FXL and didn't find a match, try to find a match for the other position in the spread\n if (layout === Layout.fixed) {\n const positions = currentPositions;\n if (positions && positions.length === 2) {\n const otherPosition = positions[0] === locator.locations.position ? positions[1] : positions[0];\n const otherPositionInList = positionsList.find((pos: Locator) => pos.locations.position === otherPosition);\n if (otherPositionInList) {\n const match = findMatch(tocTree, new Link(otherPositionInList));\n if (match) {\n setCurrentTocEntry(match.id);\n return;\n }\n }\n }\n }\n\n // If no match, try to find a match for other positions\n const otherPositions = currentPositions.filter(pos => pos !== locator.locations.position);\n for (const otherPosition of otherPositions) {\n const otherPositionInList = positionsList.find((pos: Locator) => pos.locations.position === otherPosition);\n if (otherPositionInList) {\n const match = findMatch(tocTree, new Link(otherPositionInList));\n if (match) {\n setCurrentTocEntry(match.id);\n return;\n }\n }\n }\n }, [tocTree, currentPositions, positionsList, layout]);\n\n const buildTimelineItems = useCallback(() => {\n const timelineItems: { [href: string]: TimelineItem } = {};\n const readingOrder = publication?.readingOrder?.items || [];\n \n // Helper function to get URL base (without params and fragment)\n const getBaseUrl = (url: string): string => {\n const [base] = url.split('#');\n const [path] = base.split('?');\n return path;\n };\n\n // Process reading order items\n for (const item of readingOrder) {\n const toc = publication?.toc?.items || [];\n const flatToc = toc.flatMap(t => [t, ...(t.children?.items || [])]);\n\n // Find all matching TOC items (with or without fragment)\n const matchingTocItems = flatToc.filter(t => {\n const baseHref = getBaseUrl(t.href);\n const baseItemHref = getBaseUrl(item.href);\n return baseHref === baseItemHref;\n });\n\n // Create timeline item with all matching titles\n const timelineItem: TimelineItem = {\n href: item.href,\n title: matchingTocItems[0]?.title || \"\",\n fragments: matchingTocItems\n .map(t => t.href.split('#')[1])\n .filter(Boolean),\n children: matchingTocItems[0]?.children?.items?.map(child => ({\n title: child.title,\n href: child.href\n })) || []\n };\n\n timelineItems[item.href] = timelineItem;\n }\n \n // Then add position and progression information from positionsList\n for (const item of readingOrder) {\n const timelineItem = timelineItems[item.href];\n if (!timelineItem) continue;\n\n const positions = positionsList\n .filter(p => p.href === item.href)\n .sort((a, b) => (a.locations.position || 0) - (b.locations.position || 0));\n \n if (positions.length > 0) {\n const start = positions[0].locations;\n const end = positions.length > 1 \n ? positions[positions.length - 1].locations \n : undefined;\n \n timelineItem.positionRange = start.position !== undefined \n ? [start.position, end?.position] \n : undefined;\n \n timelineItem.progressionRange = start.progression !== undefined \n ? [start.progression, end?.progression] \n : undefined;\n \n timelineItem.totalProgressionRange = start.totalProgression !== undefined \n ? [start.totalProgression, end?.totalProgression] \n : undefined;\n }\n }\n\n return timelineItems;\n }, [publication?.readingOrder?.items, publication?.toc?.items, positionsList]);\n\n // Callback to update previous and next items\n const updateTimelineItems = useCallback(() => {\n if (!currentLocation || !timelineItems) {\n setPreviousItem(null);\n setNextItem(null);\n setCurrentItem(null);\n return;\n }\n\n const currentItem = timelineItems[currentLocation.href];\n if (!currentItem) {\n setPreviousItem(null);\n setNextItem(null);\n setCurrentItem(null);\n return;\n }\n\n setCurrentItem(currentItem);\n\n const timelineItemsArray = Object.values(timelineItems);\n const currentIndex = timelineItemsArray.findIndex(item => item.href === currentLocation.href);\n\n if (currentIndex === -1) {\n setPreviousItem(null);\n setNextItem(null);\n } else {\n setPreviousItem(currentIndex > 0 ? timelineItemsArray[currentIndex - 1] : null);\n setNextItem(currentIndex < timelineItemsArray.length - 1 ? timelineItemsArray[currentIndex + 1] : null);\n }\n }, [currentLocation, timelineItems]);\n\n useEffect(() => {\n if (!publication) return;\n \n const idGenerator = () => `toc-${ ++idCounterRef.current }`;\n setTocTree(buildTocTree(publication.toc?.items || [], idGenerator, positionsList));\n setTimelineItems(buildTimelineItems());\n }, [publication, positionsList, buildTocTree, buildTimelineItems]);\n\n useEffect(() => {\n if (!tocTree.length || !timelineItems) return;\n\n // If we have a current location, use it\n if (currentLocation) {\n handleTocEntryOnNav(currentLocation);\n }\n // Otherwise, use the first TOC entry\n else if (tocTree.length > 0) {\n handleTocEntryOnNav(new Locator({ href: tocTree[0].href, type: \"\" }));\n }\n\n updateTimelineItems();\n }, [currentLocation, tocTree, timelineItems, handleTocEntryOnNav, updateTimelineItems]);\n\n // Effect to handle onChange when state changes\n useEffect(() => {\n if (!onChange) return;\n\n const timeline: UnstableTimeline = {\n items: timelineItems,\n toc: {\n tree: tocTree,\n currentEntry: currentTocEntry\n },\n currentItem,\n previousItem,\n nextItem\n };\n\n onChange(timeline);\n }, [timelineItems, currentItem, tocTree, currentTocEntry, previousItem, nextItem, onChange]);\n\n return {\n items: timelineItems,\n toc: {\n tree: tocTree,\n currentEntry: currentTocEntry\n },\n currentItem,\n previousItem,\n nextItem\n };\n};","\"use client\";\n\nimport { useCallback, useMemo, useRef } from \"react\";\n\nimport { \n Layout, \n Link, \n Locator, \n Publication \n} from \"@readium/shared\";\nimport { \n EpubNavigator, \n EpubNavigatorListeners, \n EpubPreferences, \n EpubSettings, \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\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}\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 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 // [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 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 === Layout.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 === Layout.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 getLocatorAtOffset = useCallback((offset: number) => {\n const readingOrder = navigatorInstance?.publication?.readingOrder;\n if (!readingOrder) return null;\n\n const currentLocator = navigatorInstance?.currentLocator;\n if (!currentLocator) return null;\n\n const currentLocatorIndex = readingOrder.findIndexWithHref(currentLocator.href);\n if (currentLocatorIndex === -1) return null;\n \n const newIndex = currentLocatorIndex + offset;\n if (newIndex < 0 || newIndex >= readingOrder.items.length) return null;\n \n return readingOrder.items[newIndex];\n }, []);\n\n const previousLocator = useCallback(() => {\n const link = getLocatorAtOffset(-1);\n if (!link) return null;\n return navigatorInstance?.publication?.manifest?.locatorFromLink(link);\n }, [getLocatorAtOffset]);\n\n const nextLocator = useCallback(() => {\n const link = getLocatorAtOffset(1);\n if (!link) return null;\n return navigatorInstance?.publication?.manifest?.locatorFromLink(link);\n }, [getLocatorAtOffset]);\n\n const currentPositions = useCallback(() => {\n return navigatorInstance?.viewport?.positions;\n }, []);\n\n const canGoBackward = useCallback(() => {\n return navigatorInstance?.canGoBackward;\n }, []);\n\n const canGoForward = useCallback(() => {\n return navigatorInstance?.canGoForward;\n }, []);\n\n const isScrollStart = useCallback(() => {\n return navigatorInstance?.isScrollStart;\n }, []);\n\n const isScrollEnd = useCallback(() => {\n return navigatorInstance?.isScrollEnd;\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 navLayout, \n currentLocator,\n previousLocator,\n nextLocator,\n currentPositions,\n canGoBackward,\n canGoForward,\n isScrollStart,\n isScrollEnd,\n preferencesEditor: navigatorInstance?.preferencesEditor,\n getSetting,\n submitPreferences,\n getCframes,\n onFXLPositionChange: (cb: (locator: Locator) => void) => {\n FXLPositionChangedCallback = cb;\n }\n }\n}"]}
@@ -1,4 +1,4 @@
1
- import { usePreferences } from './chunk-WTRUE2ES.mjs';
1
+ import { usePreferences } from './chunk-ZZS7TTFX.mjs';
2
2
  import { initReactI18next, I18nextProvider, useTranslation } from 'react-i18next';
3
3
  export { Trans } from 'react-i18next';
4
4
  import { useState, useEffect } from 'react';
@@ -80,5 +80,5 @@ var useI18n = (ns = "thorium-web") => {
80
80
  };
81
81
 
82
82
  export { DEFAULT_CONFIG, ThI18nProvider, initI18n, useI18n };
83
- //# sourceMappingURL=chunk-ITT2P3LQ.mjs.map
84
- //# sourceMappingURL=chunk-ITT2P3LQ.mjs.map
83
+ //# sourceMappingURL=chunk-7PVZJQXV.mjs.map
84
+ //# sourceMappingURL=chunk-7PVZJQXV.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/i18n/config.ts","../src/i18n/ThI18nProvider.tsx","../src/i18n/useI18n.ts"],"names":["i18n"],"mappings":";;;;;;;;;;AAMO,IAAM,cAAA,GAA8B;AAAA,EACzC,WAAA,EAAa,IAAA;AAAA,EACb,IAAA,EAAM,KAAA;AAAA,EACN,wBAAA,EAA0B,IAAA;AAAA,EAC1B,SAAA,EAAW;AAAA,IACT,KAAA,EAAO,CAAC,WAAW,CAAA;AAAA,IACnB,QAAQ;AAAC,GACX;AAAA,EACA,aAAA,EAAe;AAAA,IACb,WAAA,EAAa;AAAA,GACf;AAAA,EACA,OAAA,EAAS;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,EAAA,EAAI,CAAC,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IAAM,OAAA,GAAU,CAAC,EAAA,GAAa,aAAA,KAAkB;AACrD,EAAA,MAAM,EAAE,CAAA,EAAG,IAAA,EAAAA,OAAM,KAAA,EAAM,GAAI,eAAe,EAAE,CAAA;AAG5C,EAAA,MAAM,cAAA,GAAiB,CAAC,GAAA,KAAgB;AACtC,IAAA,OAAOA,KAAAA,CAAK,eAAe,GAAG,CAAA;AAAA,EAChC,CAAA;AAEA,EAAA,OAAO;AAAA;AAAA,IAEL,CAAA;AAAA;AAAA,IAEA,IAAA,EAAAA,KAAAA;AAAA;AAAA,IAEA,KAAA;AAAA;AAAA,IAEA,iBAAiBA,KAAAA,CAAK,QAAA;AAAA;AAAA,IAEtB,WAAWA,KAAAA,CAAK,SAAA;AAAA;AAAA,IAEhB;AAAA,GACF;AACF","file":"chunk-ITT2P3LQ.mjs","sourcesContent":["import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport Backend from \"i18next-http-backend\";\nimport { InitOptions } from \"i18next\";\n\nexport const DEFAULT_CONFIG: InitOptions = {\n fallbackLng: \"en\",\n load: \"all\",\n nonExplicitSupportedLngs: true,\n detection: {\n order: [\"navigator\"],\n caches: []\n },\n interpolation: {\n escapeValue: false\n },\n backend: {\n loadPath: \"/locales/{{lng}}/{{ns}}.json\"\n },\n ns: [\"thorium-web\"],\n defaultNS: \"thorium-web\"\n};\n\nexport const initI18n = async (options: Partial<InitOptions> = {}) => {\n if (i18n.isInitialized) {\n return i18n;\n }\n\n return i18n\n .use(Backend)\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n ...DEFAULT_CONFIG,\n ...options\n });\n};\n\nexport { i18n };","\"use client\";\n\nimport React, { ReactNode, useEffect, useState } from \"react\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { i18n, initI18n } from \"./config\";\nimport { InitOptions } from \"i18next\";\nimport { usePreferences } from \"@/preferences\";\n\nexport type ThI18nProviderProps = {\n children: ReactNode;\n} & Partial<InitOptions>;\n\nexport const ThI18nProvider = ({\n children,\n ...options\n}: ThI18nProviderProps) => {\n const RSPrefs = usePreferences();\n const [isInitialized, setIsInitialized] = useState(false);\n \n useEffect(() => {\n if (!i18n.isInitialized) { \n initI18n({\n ...options,\n lng: RSPrefs?.locale || options.lng,\n }).then(() => setIsInitialized(true));\n }\n });\n\n useEffect(() => {\n if (isInitialized && RSPrefs?.locale) {\n i18n.changeLanguage(RSPrefs.locale);\n }\n }, [RSPrefs?.locale, isInitialized]);\n\n if (!isInitialized) {\n return null;\n }\n\n return <I18nextProvider i18n={ i18n }>{ children }</I18nextProvider>;\n};\n\nexport default ThI18nProvider;\n","import { useTranslation } from \"react-i18next\";\n\n/**\n * Hook to access the i18n instance and translation functions\n * @param ns The namespace to use for translations (defaults to DEFAULT_NAMESPACE)\n * @returns Translation functions and i18n instance\n */\nexport const useI18n = (ns: string = \"thorium-web\") => {\n const { t, i18n, ready } = useTranslation(ns);\n \n // Helper function to change language\n const changeLanguage = (lng: string) => {\n return i18n.changeLanguage(lng);\n };\n\n return {\n // Translation function\n t,\n // i18n instance\n i18n,\n // Whether translations are loaded\n ready,\n // Current language\n currentLanguage: i18n.language,\n // List of available languages\n languages: i18n.languages,\n // Function to change language\n changeLanguage\n };\n};\n"]}
1
+ {"version":3,"sources":["../src/i18n/config.ts","../src/i18n/ThI18nProvider.tsx","../src/i18n/useI18n.ts"],"names":["i18n"],"mappings":";;;;;;;;;;AAMO,IAAM,cAAA,GAA8B;AAAA,EACzC,WAAA,EAAa,IAAA;AAAA,EACb,IAAA,EAAM,KAAA;AAAA,EACN,wBAAA,EAA0B,IAAA;AAAA,EAC1B,SAAA,EAAW;AAAA,IACT,KAAA,EAAO,CAAC,WAAW,CAAA;AAAA,IACnB,QAAQ;AAAC,GACX;AAAA,EACA,aAAA,EAAe;AAAA,IACb,WAAA,EAAa;AAAA,GACf;AAAA,EACA,OAAA,EAAS;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AA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A,EAAU,CAAA;AACpD;AChCO,IAAM,OAAA,GAAU,CAAC,EAAA,GAAa,aAAA,KAAkB;AACrD,EAAA,MAAM,EAAE,CAAA,EAAG,IAAA,EAAAA,OAAM,KAAA,EAAM,GAAI,eAAe,EAAE,CAAA;AAG5C,EAAA,MAAM,cAAA,GAAiB,CAAC,GAAA,KAAgB;AACtC,IAAA,OAAOA,KAAAA,CAAK,eAAe,GAAG,CAAA;AAAA,EAChC,CAAA;AAEA,EAAA,OAAO;AAAA;AAAA,IAEL,CAAA;AAAA;AAAA,IAEA,IAAA,EAAAA,KAAAA;AAAA;AAAA,IAEA,KAAA;AAAA;AAAA,IAEA,iBAAiBA,KAAAA,CAAK,QAAA;AAAA;AAAA,IAEtB,WAAWA,KAAAA,CAAK,SAAA;AAAA;AAAA,IAEhB;AAAA,GACF;AACF","file":"chunk-7PVZJQXV.mjs","sourcesContent":["import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport Backend from \"i18next-http-backend\";\nimport { InitOptions } from \"i18next\";\n\nexport const DEFAULT_CONFIG: InitOptions = {\n fallbackLng: \"en\",\n load: \"all\",\n nonExplicitSupportedLngs: true,\n detection: {\n order: [\"navigator\"],\n caches: []\n },\n interpolation: {\n escapeValue: false\n },\n backend: {\n loadPath: \"/locales/{{lng}}/{{ns}}.json\"\n },\n ns: [\"thorium-web\"],\n defaultNS: \"thorium-web\"\n};\n\nexport const initI18n = async (options: Partial<InitOptions> = {}) => {\n if (i18n.isInitialized) {\n return i18n;\n }\n\n return i18n\n .use(Backend)\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n ...DEFAULT_CONFIG,\n ...options\n });\n};\n\nexport { i18n };","\"use client\";\n\nimport React, { ReactNode, useEffect, useState } from \"react\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { i18n, initI18n } from \"./config\";\nimport { InitOptions } from \"i18next\";\nimport { usePreferences } from \"@/preferences\";\n\nexport type ThI18nProviderProps = {\n children: ReactNode;\n} & Partial<InitOptions>;\n\nexport const ThI18nProvider = ({\n children,\n ...options\n}: ThI18nProviderProps) => {\n const RSPrefs = usePreferences();\n const [isInitialized, setIsInitialized] = useState(false);\n \n useEffect(() => {\n if (!i18n.isInitialized) { \n initI18n({\n ...options,\n lng: RSPrefs?.locale || options.lng,\n }).then(() => setIsInitialized(true));\n }\n });\n\n useEffect(() => {\n if (isInitialized && RSPrefs?.locale) {\n i18n.changeLanguage(RSPrefs.locale);\n }\n }, [RSPrefs?.locale, isInitialized]);\n\n if (!isInitialized) {\n return null;\n }\n\n return <I18nextProvider i18n={ i18n }>{ children }</I18nextProvider>;\n};\n\nexport default ThI18nProvider;\n","import { useTranslation } from \"react-i18next\";\n\n/**\n * Hook to access the i18n instance and translation functions\n * @param ns The namespace to use for translations (defaults to DEFAULT_NAMESPACE)\n * @returns Translation functions and i18n instance\n */\nexport const useI18n = (ns: string = \"thorium-web\") => {\n const { t, i18n, ready } = useTranslation(ns);\n \n // Helper function to change language\n const changeLanguage = (lng: string) => {\n return i18n.changeLanguage(lng);\n };\n\n return {\n // Translation function\n t,\n // i18n instance\n i18n,\n // Whether translations are loaded\n ready,\n // Current language\n currentLanguage: i18n.language,\n // List of available languages\n languages: i18n.languages,\n // Function to change language\n changeLanguage\n };\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { ThBreakpoints } from './chunk-HUMV6I5L.mjs';
1
+ import { ThBreakpoints } from './chunk-KJMXTNYK.mjs';
2
2
 
3
3
  // src/core/Helpers/breakpointsMap.ts
4
4
  var makeBreakpointsMap = ({
@@ -64,5 +64,5 @@ var isInteractiveElement = (element) => {
64
64
  };
65
65
 
66
66
  export { isActiveElement, isInteractiveElement, isKeyboardTriggered, makeBreakpointsMap };
67
- //# sourceMappingURL=chunk-SN7KBNGK.mjs.map
68
- //# sourceMappingURL=chunk-SN7KBNGK.mjs.map
67
+ //# sourceMappingURL=chunk-DSQWBBAX.mjs.map
68
+ //# sourceMapp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,OAAO,IAAA,IAAQ,QAAA,CAAS,IAAA,EAAM,EAAE,CAAA,IAAK,CAAA;AAAA,IACvC;AAEA,IAAA,IAAI,OAAA,CAAQ,QAAA,EAAU,OAAO,OAAA,CAAQ,QAAA,IAAY,CAAA;AACjD,IAAA,IAAI,SAAA,CAAU,QAAA,CAAS,OAAA,CAAQ,OAAO,GAAG,OAAO,IAAA;AAAA,EAClD;AAEA,EAAA,OAAO,KAAA;AACT","file":"chunk-SN7KBNGK.mjs","sourcesContent":["\"use client\";\n\nimport { ThBreakpoints } from \"@/preferences/models/enums\";\nimport { BreakpointsMap } from \"@/core/Hooks/useBreakpoints\";\n\nexport const makeBreakpointsMap = <T>({\n defaultValue,\n fromEnum,\n pref,\n disabledValue,\n}: {\n defaultValue: T;\n fromEnum: any;\n pref?: BreakpointsMap<T> | boolean;\n disabledValue?: T;\n}): Required<BreakpointsMap<T>> => {\n \n const isValidType = (t: string) => {\n return Object.values(fromEnum).includes(t);\n };\n\n const breakpointsMap: Required<BreakpointsMap<T>> = {\n [ThBreakpoints.compact]: defaultValue,\n [ThBreakpoints.medium]: defaultValue,\n [ThBreakpoints.expanded]: defaultValue,\n [ThBreakpoints.large]: defaultValue,\n [ThBreakpoints.xLarge]: defaultValue\n };\n\n if (typeof pref === \"boolean\" || pref instanceof Boolean) {\n if (!pref && disabledValue) {\n Object.values(ThBreakpoints).forEach((key) => {\n breakpointsMap[key] = disabledValue;\n });\n }\n } else if (typeof pref === \"string\" && isValidType(pref)) {\n Object.values(ThBreakpoints).forEach((key) => {\n breakpointsMap[key] = pref;\n });\n } else if (typeof pref === \"object\") {\n Object.entries(pref).forEach(([key, value]) => {\n if (value && isValidType(value.toString())) {\n breakpointsMap[key as ThBreakpoints] = value;\n }\n });\n }\n\n return breakpointsMap;\n};","\"use client\";\n\nexport const isActiveElement = (el: Element | undefined | null) => {\n if (el) return document.activeElement === el;\n return false;\n}\n\nexport const isKeyboardTriggered = (el: Element | undefined | null) => {\n if (el) return el.matches(\":focus-visible\");\n return false;\n}\n\nexport const isInteractiveElement = (element: Element | null) => {\n const iElements = [\"A\", \"AREA\", \"BUTTON\", \"DETAILS\", \"INPUT\", \"SELECT\", \"TEXTAREA\"];\n const iRoles = [\"dialog\", \"radiogroup\", \"radio\", \"menu\", \"menuitem\"]\n\n if (element && (element instanceof HTMLElement || element instanceof SVGElement)) {\n if (element.closest(\"[inert]\")) return false;\n if (element.hasAttribute(\"disabled\")) return false;\n if (element.role && iRoles.includes(element.role)) return true;\n\n // Panel Resize Handler cos’ of typo on tabIndex/tabindex\n if (element.hasAttribute(\"tabindex\")) {\n const attr = element.getAttribute(\"tabindex\");\n return attr && parseInt(attr, 10) >= 0;\n }\n\n if (element.tabIndex) return element.tabIndex >= 0;\n if (iElements.includes(element.tagName)) return true;\n }\n\n return false;\n}"]}
1
+ {"version":3,"sources":["../src/core/Helpers/breakpointsMap.ts","../src/core/Helpers/focusUtilities.ts"],"names":[],"mappings":";;;AAKO,IAAM,qBAAqB,CAAI;AAAA,EACpC,YAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,KAKmC;AAEjC,EAAA,MAAM,WAAA,GAAc,CAAC,CAAA,KAAc;AACjC,IAAA,OAAO,MAAA,CAAO,MAAA,CAAO,QAAQ,CAAA,CAAE,SAAS,CAAC,CAAA;AAAA,EAC3C,CAAA;AAEA,EAAA,MAAM,cAAA,GAA8C;AAAA,IAClD,2BAAyB,YAAA;AAAA,IACzB,yBAAwB,YAAA;AAAA,IACxB,6BAA0B,YAAA;AAAA,IAC1B,uBAAuB,YAAA;AAAA,IACvB,yBAAwB;AAAA,GAC1B;AAEA,EAAA,IAAI,OAAO,IAAA,KAAS,SAAA,IAAa,IAAA,YAAgB,OAAA,EAAS;AACxD,IAAA,IAAI,CAAC,QAAQ,aAAA,EAAe;AAC1B,MAAA,MAAA,CAAO,MAAA,CAAO,aAAa,CAAA,CAAE,OAAA,CAAQ,CAAC,GAAA,KAAQ;AAC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AEnE,EAAA,IAAI,OAAA,KAAY,OAAA,YAAmB,WAAA,IAAe,OAAA,YAAmB,UAAA,CAAA,EAAa;AAChF,IAAA,IAAI,OAAA,CAAQ,OAAA,CAAQ,SAAS,CAAA,EAAG,OAAO,KAAA;AACvC,IAAA,IAAI,OAAA,CAAQ,YAAA,CAAa,UAAU,CAAA,EAAG,OAAO,KAAA;AAC7C,IAAA,IAAI,QAAQ,IAAA,IAAQ,MAAA,CAAO,SAAS,OAAA,CAAQ,IAAI,GAAG,OAAO,IAAA;AAG1D,IAAA,IAAI,OAAA,CAAQ,YAAA,CAAa,UAAU,CAAA,EAAG;AACpC,MAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,YAAA,CAAa,UAAU,CAAA;AAC5C,MAAA,OAAO,IAAA,IAAQ,QAAA,CAAS,IAAA,EAAM,EAAE,CAAA,IAAK,CAAA;AAAA,IACvC;AAEA,IAAA,IAAI,OAAA,CAAQ,QAAA,EAAU,OAAO,OAAA,CAAQ,QAAA,IAAY,CAAA;AACjD,IAAA,IAAI,SAAA,CAAU,QAAA,CAAS,OAAA,CAAQ,OAAO,GAAG,OAAO,IAAA;AAAA,EAClD;AAEA,EAAA,OAAO,KAAA;AACT","file":"chunk-DSQWBBAX.mjs","sourcesContent":["\"use client\";\n\nimport { ThBreakpoints } from \"@/preferences/models/enums\";\nimport { BreakpointsMap } from \"@/core/Hooks/useBreakpoints\";\n\nexport const makeBreakpointsMap = <T>({\n defaultValue,\n fromEnum,\n pref,\n disabledValue,\n}: {\n defaultValue: T;\n fromEnum: any;\n pref?: BreakpointsMap<T> | boolean;\n disabledValue?: T;\n}): Required<BreakpointsMap<T>> => {\n \n const isValidType = (t: string) => {\n return Object.values(fromEnum).includes(t);\n };\n\n const breakpointsMap: Required<BreakpointsMap<T>> = {\n [ThBreakpoints.compact]: defaultValue,\n [ThBreakpoints.medium]: defaultValue,\n [ThBreakpoints.expanded]: defaultValue,\n [ThBreakpoints.large]: defaultValue,\n [ThBreakpoints.xLarge]: defaultValue\n };\n\n if (typeof pref === \"boolean\" || pref instanceof Boolean) {\n if (!pref && disabledValue) {\n Object.values(ThBreakpoints).forEach((key) => {\n breakpointsMap[key] = disabledValue;\n });\n }\n } else if (typeof pref === \"string\" && isValidType(pref)) {\n Object.values(ThBreakpoints).forEach((key) => {\n breakpointsMap[key] = pref;\n });\n } else if (typeof pref === \"object\") {\n Object.entries(pref).forEach(([key, value]) => {\n if (value && isValidType(value.toString())) {\n breakpointsMap[key as ThBreakpoints] = value;\n }\n });\n }\n\n return breakpointsMap;\n};","\"use client\";\n\nexport const isActiveElement = (el: Element | undefined | null) => {\n if (el) return document.activeElement === el;\n return false;\n}\n\nexport const isKeyboardTriggered = (el: Element | undefined | null) => {\n if (el) return el.matches(\":focus-visible\");\n return false;\n}\n\nexport const isInteractiveElement = (element: Element | null) => {\n const iElements = [\"A\", \"AREA\", \"BUTTON\", \"DETAILS\", \"INPUT\", \"SELECT\", \"TEXTAREA\"];\n const iRoles = [\"dialog\", \"radiogroup\", \"radio\", \"menu\", \"menuitem\"]\n\n if (element && (element instanceof HTMLElement || element instanceof SVGElement)) {\n if (element.closest(\"[inert]\")) return false;\n if (element.hasAttribute(\"disabled\")) return false;\n if (element.role && iRoles.includes(element.role)) return true;\n\n // Panel Resize Handler cos’ of typo on tabIndex/tabindex\n if (element.hasAttribute(\"tabindex\")) {\n const attr = element.getAttribute(\"tabindex\");\n return attr && parseInt(attr, 10) >= 0;\n }\n\n if (element.tabIndex) return element.tabIndex >= 0;\n if (iElements.includes(element.tagName)) return true;\n }\n\n return false;\n}"]}
@@ -848,6 +848,24 @@ var ThLink = ({
848
848
  );
849
849
  }
850
850
  };
851
+ var ThBackArrow = ({
852
+ ref,
853
+ href,
854
+ "aria-label": ariaLabel,
855
+ direction,
856
+ ...props
857
+ }) => {
858
+ return /* @__PURE__ */ jsx(
859
+ ThLink,
860
+ {
861
+ href,
862
+ ref,
863
+ "aria-label": ariaLabel,
864
+ ...props,
865
+ children: direction === "right" ? /* @__PURE__ */ jsx(arrow_forward_default, { "aria-hidden": "true", focusable: "false" }) : /* @__PURE__ */ jsx(arrow_back_default, { "aria-hidden": "true", focusable: "false" })
866
+ }
867
+ );
868
+ };
851
869
  var SvgHome = (props) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "Inherit", ...props, children: /* @__PURE__ */ jsx("path", { d: "M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z" }) });
852
870
  var home_default = SvgHome;
853
871
  var ThHome = ({
@@ -1365,6 +1383,6 @@ var ThGrid = ({
1365
1383
  );
1366
1384
  };
1367
1385
 
1368
- export { ThActionButton, ThActionsBar, ThActionsTriggerVariant, ThBottomSheet, ThCloseButton, ThCollapsibleActionsBar, ThContainerBody, ThContainerHeader, ThContainerHeaderWithClose, ThContainerHeaderWithPrevious, ThDockedPanel, ThDragIndicatorButton, ThDropdown, ThDropdownButton, ThFooter, ThForm, ThFormNumberField, ThFormSearchField, ThFormTextField, ThGrid, ThHeader, ThHome, ThInteractiveOverlay, ThLibrary, ThLink, ThLoader, ThMenu, ThMenuButton, ThMenuItem, ThModal, ThNavigationButton, ThNumberField, ThPagination, ThPopover, ThProgression, ThRadioGroup, ThRunningHead, ThSettingsWrapper, ThSettingsWrapperButton, ThSlider, ThSwitch, ThTypedComponentRenderer, useActions, useFirstFocusable };
1369
- //# sourceMappingURL=chunk-DYR64DDH.mjs.map
1370
- //# sourceMappingURL=chunk-DYR64DDH.mjs.map
1386
+ export { ThActionButton, ThActionsBar, ThActionsTriggerVariant, ThBackArrow, ThBottomSheet, ThCloseButton, ThCollapsibleActionsBar, ThContainerBody, ThContainerHeader, ThContainerHeaderWithClose, ThContainerHeaderWithPrevious, ThDockedPanel, ThDragIndicatorButton, ThDropdown, ThDropdownButton, ThFooter, ThForm, ThFormNumberField, ThFormSearchField, ThFormTextField, ThGrid, ThHeader, ThHome, ThInteractiveOverlay, ThLibrary, ThLink, ThLoader, ThMenu, ThMenuButton, ThMenuItem, ThModal, ThNavigationButton, ThNumberField, ThPagination, ThPopover, ThProgression, ThRadioGroup, ThRunningHead, ThSettingsWrapper, ThSettingsWrapperButton, ThSlider, ThSwitch, ThTypedComponentRenderer, useActions, useFirstFocusable };
1387
+ //# sourceMappingURL=chunk-EDUSR3DX.mjs.map
1388
+ //# sourceMappingURL=chunk-EDUSR3DX.mjs.map
@@ -0,0 +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/assets/icons/arrow_back.svg","../src/core/Components/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/Links/ThLink.tsx","../src/core/Components/Links/ThBackArrow.tsx","../src/core/Components/Links/assets/icons/home.svg","../src/core/Components/Links/ThHome.tsx","../src/core/Components/Links/assets/icons/newsstand.svg","../src/core/Components/Links/ThLibrary.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/ThInteractiveOverlay.tsx","../src/core/Components/Reader/ThPagination.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","../src/core/Components/ThGrid.tsx"],"names":["ThActionsTriggerVariant","jsx","jsxs","Fragment","React","useObjectRef","Button","useRef","input","element","Popover","Dialog","useEffect","FocusScope","Label","Input","Text","FieldError","TooltipTrigger","Tooltip","NumberField","Heading","createElement"],"mappings":";;;;;;;;;;AASO,IAAM,UAAA,GAAa,CAAqC,SAAA,KAA2B;AACxF,EAAA,MAAM,WAAW,MAAM;AACrB,IAAA,MAAM,OAAY,EAAC;AAEnB,IAAA,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,CAAE,OAAA,CAAQ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C,CAAA;AAAA,UACC,8BACAA,GAAAA;AAAA,YAAC,uBAAA;AAAA,YAAA;AAAA,cACG,GAAG,SAAA,EAAW;AAAA;AAAA;AAClB;AAAA;AAAA,KAEJ,EACA,CAAA;AAAA,EAEJ;AACF;AC/DO,IAAM,SAAS,CAAoB;AAAA,EACxC,GAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAsB;AACpB,EAAA,uBACEA,GAAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACL,KAAA,EAAO;AAAA,QACL,GAAG,KAAA,CAAM,KAAA;AAAA,QACT,SAAA,EAAW,MAAA;AAAA,QACX,MAAA,EAAQ,CAAA;AAAA,QACR,OAAA,EAAS,CAAA;AAAA,QACT,OAAA,EAAS,MAAA;AAAA,QACT,SAAA,EAAW,YAAA;AAAA,QACX,qBAAqB,CAAA,mCAAA,EAAsC,OAAO,gBAAgB,QAAA,GAAW,WAAA,GAAc,cAAc,IAAI,CAAA,QAAA,CAAA;AAAA,QAC7H,GAAA,EAAK,OAAO,GAAA,KAAQ,QAAA,GAAW,MAAM,GAAA,GAAM;AAAA,OAC7C;AAAA,MAEE,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,qBACjBA,GAAAA,CAAC,IAAA,EAAA,EACG,QAAA,EAAA,UAAA,CAAW,IAAA,EAAM,KAAK,CAAA,EAAA,EADhB,KAEV,CACD;AAAA;AAAA,GACH;AAEJ","file":"chunk-EDUSR3DX.mjs","sourcesContent":["\"use client\";\n\nimport { ActionStateObject } from \"@/lib/actionsReducer\";\nimport { ThDockingKeys } from \"@/preferences/models/enums\";\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 const docking = value?.docking;\n if (docking === ThDockingKeys.start || docking === ThDockingKeys.end) {\n docked.push(key as K);\n }\n });\n\n return docked;\n };\n\n const anyDocked = () => {\n return Object.values(actionMap).some((value) => {\n const docking = value?.docking;\n return docking === ThDockingKeys.start || docking === ThDockingKeys.end;\n });\n };\n\n const isDocked = (key?: K | null) => {\n if (!key) return false;\n const docking = actionMap[key]?.docking;\n return docking === ThDockingKeys.start || docking === ThDockingKeys.end;\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 { ThBottomSheetDetent } from \"@/preferences/preferences\";\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 detent,\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 detent?: ThBottomSheetDetent;\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 detent === \"full-height\" &&\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, detent]);\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 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 detent={ detent }\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 { Link, LinkProps, Tooltip, TooltipProps, TooltipTrigger } from \"react-aria-components\";\nimport { WithRef } from \"../customTypes\";\nimport { TooltipTriggerProps } from \"react-aria\";\n\nexport interface ThLinkProps extends LinkProps {\n ref?: React.ForwardedRef<HTMLAnchorElement>;\n href: string;\n children: React.ReactNode;\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 interface ThLinkIconProps extends Omit<ThLinkProps, \"children\"> {\n \"aria-label\": string;\n}\n\nexport const ThLink = ({ \n ref,\n href,\n children,\n compounds,\n ...props \n}: ThLinkProps) => {\n if (compounds) {\n return (\n <TooltipTrigger\n { ...compounds.tooltipTrigger }\n >\n <Link \n href={ href }\n ref={ ref }\n { ...props }\n >\n { children }\n </Link>\n <Tooltip\n arrowBoundaryOffset={ 0 }\n { ...compounds.tooltip }\n >\n { compounds.label }\n </Tooltip>\n </TooltipTrigger>\n );\n } else {\n return (\n <Link \n href={ href }\n ref={ ref }\n { ...props }\n >\n { children }\n </Link>\n );\n }\n};","\"use client\";\n\nimport ArrowBackIcon from \"../assets/icons/arrow_back.svg\";\nimport ArrowForwardIcon from \"../assets/icons/arrow_forward.svg\";\n\nimport { ThLink, ThLinkIconProps } from \"./ThLink\";\n\nexport interface ThBackArrowProps extends ThLinkIconProps {\n direction?: \"left\" | \"right\";\n}\n\nexport const ThBackArrow = ({\n ref,\n href,\n \"aria-label\": ariaLabel,\n direction,\n ...props\n}: ThBackArrowProps) => {\n return (\n <ThLink \n href={ href }\n ref={ ref }\n aria-label={ ariaLabel }\n { ...props }\n >\n { direction === \"right\"\n ? <ArrowForwardIcon aria-hidden=\"true\" focusable=\"false\" />\n : <ArrowBackIcon aria-hidden=\"true\" focusable=\"false\" />\n }\n </ThLink>\n );\n};","import * as React from \"react\";\nconst SvgHome = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z\" /></svg>;\nexport default SvgHome;","\"use client\";\n\nimport HomeIcon from \"./assets/icons/home.svg\";\n\nimport { ThLink, ThLinkIconProps } from \"./ThLink\";\n\nexport const ThHome = ({\n ref,\n href,\n \"aria-label\": ariaLabel,\n ...props\n}: ThLinkIconProps) => {\n return (\n <ThLink \n href={ href }\n ref={ ref }\n aria-label={ ariaLabel }\n { ...props }\n >\n <HomeIcon aria-hidden=\"true\" focusable=\"false\" />\n </ThLink>\n );\n};","import * as React from \"react\";\nconst SvgNewsstand = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M80-160v-80h800v80H80Zm80-160v-320h80v320h-80Zm160 0v-480h80v480h-80Zm160 0v-480h80v480h-80Zm280 0L600-600l70-40 160 280-70 40Z\" /></svg>;\nexport default SvgNewsstand;","\"use client\";\n\nimport LibraryIcon from \"./assets/icons/newsstand.svg\";\n\nimport { ThLink, ThLinkIconProps } from \"./ThLink\";\n\nexport const ThLibrary = ({\n ref,\n href,\n \"aria-label\": ariaLabel,\n ...props\n}: ThLinkIconProps) => {\n return (\n <ThLink \n href={ href }\n ref={ ref }\n aria-label={ ariaLabel }\n { ...props }\n >\n <LibraryIcon aria-hidden=\"true\" focusable=\"false\" />\n </ThLink>\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<HTMLDivElement>;\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}","export interface ThInteractiveOverlayProps extends React.HTMLAttributes<HTMLDivElement> {\n ref?: React.ForwardedRef<HTMLDivElement>;\n isActive: boolean;\n children?: never;\n}\n\n// This is meant to mount invisible zones that can be hovered, clicked, etc.\nexport const ThInteractiveOverlay = ({ \n ref,\n isActive,\n className,\n style,\n ...props \n}: ThInteractiveOverlayProps) => {\n const defaultStyles: React.CSSProperties = {\n opacity: 0,\n zIndex: 10000,\n pointerEvents: \"auto\",\n };\n\n const mergedStyles = className \n ? undefined \n : {\n ...defaultStyles,\n ...style\n };\n\n if (isActive) {\n return (\n <div \n ref={ ref } \n className={ className }\n style={ mergedStyles }\n { ...props }\n ></div>\n )\n }\n}","\"use client\";\n\nimport React, { ComponentType, SVGProps } from \"react\";\n\nimport { Button, ButtonProps } from \"react-aria-components\";\nimport { WithRef } from \"../customTypes\";\n\nimport ArrowBack from \"../assets/icons/arrow_back.svg\";\nimport ArrowForward from \"../assets/icons/arrow_forward.svg\";\n\nexport interface ThPaginationLinkProps {\n icon?: ComponentType<SVGProps<SVGElement>> | null;\n node: React.ReactNode;\n onPress: () => void;\n}\n\nexport interface ThPaginationProps extends React.HTMLAttributes<HTMLDivElement> {\n ref?: React.RefObject<HTMLDivElement>;\n direction?: \"left\" | \"right\";\n children?: React.ReactNode;\n links?: {\n previous?: ThPaginationLinkProps;\n next?: ThPaginationLinkProps;\n };\n compounds?: {\n /**\n * Props for the list item element wrapping links and children\n */\n listItem?: React.HTMLAttributes<HTMLLIElement>;\n /**\n * Props for the previous button element\n */\n previousButton?: Exclude<WithRef<ButtonProps, HTMLButtonElement>, \"type\">;\n /**\n * Props for the next button element\n */\n nextButton?: Exclude<WithRef<ButtonProps, HTMLButtonElement>, \"type\">;\n };\n}\n\nexport const ThPagination = ({\n ref,\n direction = \"left\",\n links,\n compounds,\n children,\n ...props\n}: ThPaginationProps) => {\n if (!links) {\n return null;\n }\n\n const { previous, next } = links;\n\n return (\n <nav\n ref={ ref }\n { ...props }\n >\n { previous && (\n <li { ...compounds?.listItem }>\n <Button\n { ...compounds?.previousButton }\n type=\"button\"\n onPress={ previous.onPress }\n >\n { previous.icon \n ? <previous.icon aria-hidden=\"true\" focusable=\"false\" /> \n : direction === \"left\"\n ? <ArrowBack aria-hidden=\"true\" focusable=\"false\" />\n : <ArrowForward aria-hidden=\"true\" focusable=\"false\" />\n }\n { previous.node }\n </Button>\n </li>\n )}\n\n { children && (\n <li { ...compounds?.listItem }>\n { children }\n </li>\n )}\n\n { next && (\n <li { ...compounds?.listItem }>\n <Button\n { ...compounds?.nextButton }\n type=\"button\"\n onPress={ next.onPress }\n >\n { next.node }\n \n { next.icon \n ? <next.icon aria-hidden=\"true\" focusable=\"false\" /> \n : direction === \"left\"\n ? <ArrowForward aria-hidden=\"true\" focusable=\"false\" />\n : <ArrowBack aria-hidden=\"true\" focusable=\"false\" />\n }\n </Button>\n </li>\n )}\n </nav>\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 isDisabled={ item.isDisabled }\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}","\"use client\";\n\nimport React from \"react\";\nimport { HTMLAttributesWithRef } from \"./customTypes\";\n\nexport interface ThGridProps<T> extends HTMLAttributesWithRef<HTMLUListElement> {\n items: T[];\n children?: never;\n renderItem: (item: T, index: number) => React.ReactNode;\n columnWidth?: number | string;\n gap?: number | string;\n}\n\nexport const ThGrid = <T extends unknown>({\n ref,\n items,\n renderItem,\n columnWidth,\n gap,\n ...props\n}: ThGridProps<T>) => {\n return (\n <ul \n ref={ ref } \n { ...props }\n style={{\n ...props.style,\n listStyle: \"none\",\n margin: 0,\n padding: 0,\n display: \"grid\",\n boxSizing: \"border-box\",\n gridTemplateColumns: `repeat(auto-fill, minmax(min(100%, ${typeof columnWidth === 'string' ? columnWidth : columnWidth + 'px'}), 1fr))`,\n gap: typeof gap === 'string' ? gap : gap + 'px'\n }}\n >\n { items.map((item, index) => (\n <li key={ index }>\n { renderItem(item, index) }\n </li>\n )) }\n </ul>\n );\n};"]}
@@ -26,6 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
 
27
27
  // src/preferences/models/enums.ts
28
28
  var ThBackLinkVariant = /* @__PURE__ */ ((ThBackLinkVariant2) => {
29
+ ThBackLinkVariant2["arrow"] = "arrow";
29
30
  ThBackLinkVariant2["home"] = "home";
30
31
  ThBackLinkVariant2["library"] = "library";
31
32
  ThBackLinkVariant2["custom"] = "custom";
@@ -160,5 +161,5 @@ var ThLineHeightOptions = /* @__PURE__ */ ((ThLineHeightOptions2) => {
160
161
  })(ThLineHeightOptions || {});
161
162
 
162
163
  export { ThActionsKeys, ThBackLinkVariant, ThBreakpoints, ThDockingKeys, ThDockingTypes, ThLayoutDirection, ThLayoutOptions, ThLayoutUI, ThLineHeightOptions, ThSettingsContainerKeys, ThSettingsKeys, ThSettingsRangeVariant, ThSheetHeaderVariant, ThSheetTypes, ThSpacingSettingsKeys, ThTextAlignOptions, ThTextSettingsKeys, ThThemeKeys, __commonJS, __toESM };
163
- //# sourceMappingURL=chunk-HUMV6I5L.mjs.map
164
- //# sourceMappingURL=chunk-HUMV6I5L.mjs.map
164
+ //# sourceMappingURL=chunk-KJMXTNYK.mjs.map
165
+ //# sourceMappingURL=chunk-KJMXTNYK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/preferences/models/enums.ts"],"names":["ThBackLinkVariant","ThLayoutUI","ThActionsKeys","ThBreakpoints","ThDockingKeys","ThDockingTypes","ThSettingsKeys","ThTextSettingsKeys","ThSpacingSettingsKeys","ThSettingsContainerKeys","ThSettingsRangeVariant","ThSheetTypes","ThSheetHeaderVariant","ThThemeKeys","ThLayoutDirection","ThLayoutOptions","ThTextAlignOptions","ThLineHeightOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACL,EAAAA,mBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,mBAAA,QAAA,CAAA,GAAS,QAAA;AAJC,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA;AAOL,IAAK,UAAA,qBAAAC,WAAAA,KAAL;AACL,EAAAA,YAAA,SAAA,CAAA,GAAU,YAAA;AACV,EAAAA,YAAA,SAAA,CAAA,GAAU,YAAA;AAFA,EAAA,OAAAA,WAAAA;AAAA,CAAA,EAAA,UAAA,IAAA,EAAA;AAKL,IAAK,aAAA,qBAAAC,cAAAA,KAAL;AACL,EAAAA,eAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,eAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,eAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,eAAA,KAAA,CAAA,GAAM,KAAA;AAJI,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA;AAOL,IAAK,aAAA,qBAAAC,cAAAA,KAAL;AACL,EAAAA,eAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,eAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,eAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,eAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,eAAA,QAAA,CAAA,GAAS,QAAA;AALC,EA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BAAAA,KAAL;AACL,EAAAA,iBAAA,QAAA,CAAA,GAAS,eAAA;AACT,EAAAA,iBAAA,WAAA,CAAA,GAAY,aAAA;AAFF,EAAA,OAAAA,gBAAAA;AAAA,CAAA,EAAA,eAAA,IAAA,EAAA;AAKL,IAAK,kBAAA,qBAAAC,mBAAAA,KAAL;AACL,EAAAA,oBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,oBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,oBAAA,SAAA,CAAA,GAAU,SAAA;AAHA,EAAA,OAAAA,mBAAAA;AAAA,CAAA,EAAA,kBAAA,IAAA,EAAA;AAML,IAAK,mBAAA,qBAAAC,oBAAAA,KAAL;AACL,EAAAA,qBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,qBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,qBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,qBAAA,OAAA,CAAA,GAAQ,OAAA;AAJE,EAAA,OAAAA,oBAAAA;AAAA,CAAA,EAAA,mBAAA,IAAA,EAAA","file":"chunk-KJMXTNYK.mjs","sourcesContent":["\"use client\";\n\nexport enum ThBackLinkVariant {\n arrow = \"arrow\",\n home = \"home\",\n library = \"library\",\n custom = \"custom\"\n}\n\nexport enum ThLayoutUI {\n stacked = \"stacked-ui\",\n layered = \"layered-ui\"\n}\n\nexport enum ThActionsKeys {\n fullscreen = \"fullscreen\",\n jumpToPosition = \"jumpToPosition\",\n settings = \"settings\",\n toc = \"toc\"\n}\n\nexport enum ThBreakpoints {\n compact = \"compact\",\n medium = \"medium\",\n expanded = \"expanded\",\n large = \"large\",\n xLarge = \"xLarge\"\n}\n\nexport enum ThDockingKeys {\n start = \"dockingStart\",\n end = \"dockingEnd\",\n transient = \"dockingTransient\"\n}\n\nexport enum ThDockingTypes {\n none = \"none\",\n both = \"both\",\n start = \"start\",\n end = \"end\"\n}\n\nexport enum ThSettingsKeys {\n columns = \"columns\",\n fontFamily = \"fontFamily\",\n fontWeight = \"fontWeight\",\n hyphens = \"hyphens\",\n layout = \"layout\",\n letterSpacing = \"letterSpacing\",\n lineHeight = \"lineHeight\",\n paragraphIndent = \"paragraphIndent\",\n paragraphSpacing = \"paragraphSpacing\",\n publisherStyles = \"publisherStyles\",\n spacingGroup = \"spacingGroup\",\n textAlign = \"textAlign\",\n textGroup = \"textGroup\",\n textNormalize = \"textNormalize\",\n theme = \"theme\",\n wordSpacing = \"wordSpacing\",\n zoom = \"zoom\"\n}\n\nexport enum ThTextSettingsKeys {\n fontFamily = \"fontFamily\",\n fontWeight = \"fontWeight\",\n hyphens = \"hyphens\",\n textAlign = \"textAlign\",\n textNormalize = \"textNormalize\"\n}\n\nexport enum ThSpacingSettingsKeys {\n letterSpacing = \"letterSpacing\",\n lineHeight = \"lineHeight\",\n paragraphIndent = \"paragraphIndent\",\n paragraphSpacing = \"paragraphSpacing\",\n publisherStyles = \"publisherStyles\",\n wordSpacing = \"wordSpacing\"\n}\n\nexport enum ThSettingsContainerKeys {\n initial = \"initial\",\n text = \"text\",\n spacing = \"spacing\"\n}\n\nexport enum ThSettingsRangeVariant {\n slider = \"slider\",\n numberField = \"numberField\"\n}\n\nexport enum ThSheetTypes {\n popover = \"popover\",\n fullscreen = \"fullscreen\",\n dockedStart = \"docked start\",\n dockedEnd = \"docked end\",\n bottomSheet = \"bottomSheet\"\n}\n\nexport enum ThSheetHeaderVariant {\n close = \"close\",\n previous = \"previous\"\n}\n\nexport enum ThThemeKeys {\n light = \"light\",\n sepia = \"sepia\",\n dark = \"dark\",\n paper = \"paper\",\n contrast1 = \"contrast1\",\n contrast2 = \"contrast2\",\n contrast3 = \"contrast3\"\n}\n\nexport enum ThLayoutDirection {\n rtl = \"rtl\",\n ltr = \"ltr\"\n}\n\nexport enum ThLayoutOptions { \n scroll = \"scroll_option\",\n paginated = \"page_option\"\n}\n\nexport enum ThTextAlignOptions {\n publisher = \"publisher\",\n start = \"start\",\n justify = \"justify\"\n}\n\nexport enum ThLineHeightOptions {\n publisher = \"publisher\",\n small = \"small\",\n medium = \"medium\",\n large = \"large\"\n}"]}
@@ -1,5 +1,5 @@
1
1
  import { defaultPlatformModifier } from './chunk-IEYR7QV7.mjs';
2
- import { __commonJS, __toESM } from './chunk-HUMV6I5L.mjs';
2
+ import { __commonJS, __toESM } from './chunk-KJMXTNYK.mjs';
3
3
  import { useRef } from 'react';
4
4
  import { useDispatch, useSelector, useStore, Provider } from 'react-redux';
5
5
  import { createSlice, configureStore } from '@reduxjs/toolkit';
@@ -693,5 +693,5 @@ var useAppSelector = useSelector;
693
693
  var useAppStore = useStore;
694
694
 
695
695
  export { ThStoreProvider, actionsSlice, activateDockPanel, collapseDockPanel, deactivateDockPanel, dockAction, expandDockPanel, makeStore, publicationSlice, readerSlice, require_debounce, setActionOpen, setArrows, setBreakpoint, setColorScheme, setColumnCount, setContrast, setDirection, setDockPanelWidth, setFXL, setFontFamily, setFontSize, setFontWeight, setForcedColors, setFullscreen, setHovering, setHyphens, setImmersive, setLetterSpacing, setLineHeight, setLineLength, setLoading, setMonochrome, setOverflow, setParagraphIndent, setParagraphSpacing, setPlatformModifier, setPositionsList, setProgression, setPublicationEnd, setPublicationStart, setPublisherStyles, setRTL, setReducedMotion, setReducedTransparency, setRunningHead, setScroll, setScrollAffordance, setSettingsContainer, setTextAlign, setTextNormalization, setTheme, setTimeline, setTocEntry, setTocTree, setWordSpacing, settingsSlice, themeSlice, toggleActionOpen, toggleImmersive, useAppDispatch, useAppSelector, useAppStore };
696
- //# sourceMappingURL=chunk-MS2TXXYX.mjs.map
697
- //# sourceMappingURL=chunk-MS2TXXYX.mjs.map
696
+ //# sourceMappingURL=chunk-R5KZTO4S.mjs.map
697
+ //# sourceMappingURL=chunk-R5KZTO4S.mjs.map