@nypl/web-reader 0.1.4 → 0.2.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/cjs/ServiceWorker/sw.js +2 -0
  2. package/dist/cjs/ServiceWorker/sw.js.map +7 -0
  3. package/dist/cjs/index.js +683 -0
  4. package/dist/cjs/index.js.map +7 -0
  5. package/dist/esm/ServiceWorker/sw.js +1263 -0
  6. package/dist/esm/ServiceWorker/sw.js.map +7 -0
  7. package/dist/esm/index.js +88803 -0
  8. package/dist/esm/index.js.map +7 -0
  9. package/dist/html-styles.css +2 -0
  10. package/dist/html-styles.css.map +7 -0
  11. package/dist/pdf-styles.css +2 -0
  12. package/dist/pdf-styles.css.map +7 -0
  13. package/dist/{HtmlReader → types/HtmlReader}/HtmlReaderContent.d.ts +3 -3
  14. package/dist/{HtmlReader → types/HtmlReader}/index.d.ts +22 -22
  15. package/dist/{HtmlReader → types/HtmlReader}/injectables.d.ts +30 -30
  16. package/dist/{PdfReader → types/PdfReader}/index.d.ts +11 -12
  17. package/dist/{PdfReader → types/PdfReader}/useMeasure.d.ts +7 -4
  18. package/dist/{ServiceWorker → types/ServiceWorker}/client.d.ts +9 -9
  19. package/dist/{ServiceWorker → types/ServiceWorker}/constants.d.ts +3 -3
  20. package/{src/ServiceWorker/index.ts → dist/types/ServiceWorker/index.d.ts} +0 -0
  21. package/dist/{ServiceWorker → types/ServiceWorker}/sw.d.ts +7 -7
  22. package/dist/{ServiceWorker → types/ServiceWorker}/types.d.ts +3 -3
  23. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/ConformsTo.d.ts +3 -3
  24. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Contributor.d.ts +17 -17
  25. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/EpubExtension.d.ts +47 -47
  26. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/LanguageMap.d.ts +3 -3
  27. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Metadata.d.ts +46 -46
  28. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/OPDSLink.d.ts +63 -63
  29. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/PresentationHints.d.ts +53 -53
  30. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/ReadiumLink.d.ts +58 -58
  31. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Subject.d.ts +16 -16
  32. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/WebpubManifest.d.ts +14 -14
  33. package/dist/{constants.d.ts → types/constants.d.ts} +2 -2
  34. package/dist/{index.d.ts → types/index.d.ts} +7 -7
  35. package/dist/{types.d.ts → types/types.d.ts} +66 -66
  36. package/dist/{ui → types/ui}/Button.d.ts +9 -7
  37. package/dist/{ui → types/ui}/Header.d.ts +6 -6
  38. package/dist/{ui → types/ui}/HtmlSettings.d.ts +9 -9
  39. package/dist/{ui → types/ui}/PageButton.d.ts +7 -7
  40. package/dist/{ui → types/ui}/PdfSettings.d.ts +9 -9
  41. package/dist/{ui → types/ui}/SettingsButton.d.ts +5 -5
  42. package/dist/{ui → types/ui}/TableOfContent.d.ts +7 -7
  43. package/dist/{ui → types/ui}/ToggleButton.d.ts +10 -10
  44. package/dist/{ui → types/ui}/ToggleGroup.d.ts +8 -8
  45. package/dist/{ui → types/ui}/constants.d.ts +1 -1
  46. package/dist/{ui → types/ui}/hooks/useColorModeValue.d.ts +7 -7
  47. package/dist/{ui → types/ui}/hooks/useContainerWidth.d.ts +6 -6
  48. package/dist/{ui → types/ui}/hooks/useEventListener.d.ts +8 -8
  49. package/dist/{ui → types/ui}/manager.d.ts +9 -9
  50. package/dist/{ui → types/ui}/nypl-base-theme/components/button.d.ts +94 -94
  51. package/dist/{ui → types/ui}/nypl-base-theme/components/checkbox.d.ts +41 -41
  52. package/dist/{ui → types/ui}/nypl-base-theme/components/form-error.d.ts +14 -14
  53. package/dist/{ui → types/ui}/nypl-base-theme/components/form-label.d.ts +14 -14
  54. package/dist/{ui → types/ui}/nypl-base-theme/components/form.d.ts +15 -15
  55. package/dist/{ui → types/ui}/nypl-base-theme/components/input.d.ts +107 -107
  56. package/dist/{ui → types/ui}/nypl-base-theme/components/text-area.d.ts +34 -34
  57. package/dist/{ui → types/ui}/nypl-base-theme/foundations/breakpoints.d.ts +8 -8
  58. package/dist/{ui → types/ui}/nypl-base-theme/foundations/colors.d.ts +3 -3
  59. package/dist/{ui → types/ui}/nypl-base-theme/foundations/global.d.ts +13 -13
  60. package/dist/{ui → types/ui}/nypl-base-theme/foundations/radii.d.ts +12 -12
  61. package/dist/{ui → types/ui}/nypl-base-theme/foundations/spacing.d.ts +49 -49
  62. package/dist/{ui → types/ui}/nypl-base-theme/foundations/typography.d.ts +10 -10
  63. package/dist/{ui → types/ui}/nypl-base-theme/index.d.ts +6 -6
  64. package/dist/{ui → types/ui}/nypl-base-theme/types.d.ts +1 -1
  65. package/dist/{ui → types/ui}/theme/components/button.d.ts +78 -78
  66. package/dist/{ui → types/ui}/theme/components/text.d.ts +20 -20
  67. package/dist/{ui → types/ui}/theme/foundations/colors.d.ts +3 -3
  68. package/dist/{ui → types/ui}/theme/index.d.ts +11 -11
  69. package/dist/{ui → types/ui}/theme/types.d.ts +1 -1
  70. package/dist/{useWebReader.d.ts → types/useWebReader.d.ts} +7 -7
  71. package/dist/{utils → types/utils}/decryptAxisNow.d.ts +0 -0
  72. package/dist/{utils → types/utils}/fetch.d.ts +4 -4
  73. package/dist/{utils → types/utils}/getColor.d.ts +2 -2
  74. package/dist/{utils → types/utils}/toggleFullScreen.d.ts +5 -5
  75. package/package.json +21 -33
  76. package/dist/ServiceWorker/index.d.ts +0 -1
  77. package/dist/index.js +0 -8
  78. package/dist/web-reader.cjs.development.js +0 -3363
  79. package/dist/web-reader.cjs.development.js.map +0 -1
  80. package/dist/web-reader.cjs.production.min.js +0 -2
  81. package/dist/web-reader.cjs.production.min.js.map +0 -1
  82. package/dist/web-reader.esm.js +0 -3356
  83. package/dist/web-reader.esm.js.map +0 -1
  84. package/src/HtmlReader/HtmlReaderContent.tsx +0 -19
  85. package/src/HtmlReader/index.tsx +0 -262
  86. package/src/HtmlReader/injectables.ts +0 -26
  87. package/src/PdfReader/index.tsx +0 -492
  88. package/src/PdfReader/useMeasure.tsx +0 -68
  89. package/src/ServiceWorker/client.ts +0 -106
  90. package/src/ServiceWorker/constants.ts +0 -4
  91. package/src/ServiceWorker/sw.ts +0 -84
  92. package/src/ServiceWorker/types.ts +0 -3
  93. package/src/WebpubManifestTypes/ConformsTo.ts +0 -9
  94. package/src/WebpubManifestTypes/Contributor.ts +0 -24
  95. package/src/WebpubManifestTypes/EpubExtension.ts +0 -48
  96. package/src/WebpubManifestTypes/LanguageMap.ts +0 -5
  97. package/src/WebpubManifestTypes/Metadata.ts +0 -48
  98. package/src/WebpubManifestTypes/OPDSLink.ts +0 -251
  99. package/src/WebpubManifestTypes/PresentationHints.ts +0 -54
  100. package/src/WebpubManifestTypes/ReadiumLink.ts +0 -61
  101. package/src/WebpubManifestTypes/Subject.ts +0 -20
  102. package/src/WebpubManifestTypes/WebpubManifest.ts +0 -15
  103. package/src/constants.ts +0 -3
  104. package/src/index.tsx +0 -25
  105. package/src/types.ts +0 -94
  106. package/src/ui/Button.tsx +0 -12
  107. package/src/ui/Header.tsx +0 -89
  108. package/src/ui/HtmlSettings.tsx +0 -97
  109. package/src/ui/PageButton.tsx +0 -39
  110. package/src/ui/PdfSettings.tsx +0 -85
  111. package/src/ui/SettingsButton.tsx +0 -71
  112. package/src/ui/TableOfContent.tsx +0 -144
  113. package/src/ui/ToggleButton.tsx +0 -60
  114. package/src/ui/ToggleGroup.tsx +0 -41
  115. package/src/ui/constants.ts +0 -2
  116. package/src/ui/hooks/useColorModeValue.tsx +0 -19
  117. package/src/ui/hooks/useContainerWidth.ts +0 -24
  118. package/src/ui/hooks/useEventListener.ts +0 -26
  119. package/src/ui/manager.tsx +0 -73
  120. package/src/ui/nypl-base-theme/components/button.ts +0 -117
  121. package/src/ui/nypl-base-theme/components/checkbox.ts +0 -45
  122. package/src/ui/nypl-base-theme/components/form-error.ts +0 -15
  123. package/src/ui/nypl-base-theme/components/form-label.ts +0 -15
  124. package/src/ui/nypl-base-theme/components/form.ts +0 -16
  125. package/src/ui/nypl-base-theme/components/input.ts +0 -101
  126. package/src/ui/nypl-base-theme/components/text-area.ts +0 -17
  127. package/src/ui/nypl-base-theme/foundations/breakpoints.ts +0 -10
  128. package/src/ui/nypl-base-theme/foundations/colors.ts +0 -136
  129. package/src/ui/nypl-base-theme/foundations/global.ts +0 -16
  130. package/src/ui/nypl-base-theme/foundations/radii.ts +0 -13
  131. package/src/ui/nypl-base-theme/foundations/spacing.ts +0 -58
  132. package/src/ui/nypl-base-theme/foundations/typography.ts +0 -43
  133. package/src/ui/nypl-base-theme/index.ts +0 -42
  134. package/src/ui/nypl-base-theme/types.ts +0 -1
  135. package/src/ui/theme/components/button.ts +0 -85
  136. package/src/ui/theme/components/text.ts +0 -24
  137. package/src/ui/theme/foundations/colors.ts +0 -10
  138. package/src/ui/theme/index.ts +0 -34
  139. package/src/ui/theme/types.ts +0 -1
  140. package/src/useWebReader.tsx +0 -105
  141. package/src/utils/decryptAxisNow.ts +0 -45
  142. package/src/utils/fetch.ts +0 -13
  143. package/src/utils/getColor.ts +0 -14
  144. package/src/utils/toggleFullScreen.ts +0 -71
@@ -1,66 +1,66 @@
1
- /// <reference types="react" />
2
- import { WebpubManifest } from './WebpubManifestTypes/WebpubManifest';
3
- export { WebpubManifest };
4
- export declare const EpubMimeType = "application/epub";
5
- export declare const WebpubMimeType = "application/webpub";
6
- export declare type ColorMode = 'night' | 'sepia' | 'day';
7
- export declare type FontFamily = 'publisher' | 'serif' | 'sans-serif' | 'open-dyslexic';
8
- export declare type Navigator = {
9
- goForward: () => void;
10
- goBackward: () => void;
11
- setColorMode: (mode: ColorMode) => Promise<void>;
12
- setScroll: (val: 'scrolling' | 'paginated') => Promise<void>;
13
- increaseFontSize: () => Promise<void>;
14
- decreaseFontSize: () => Promise<void>;
15
- setFontFamily: (family: FontFamily) => Promise<void>;
16
- goToPage: (href: string) => void;
17
- };
18
- export declare type PdfNavigator = Navigator;
19
- export declare type HtmlNavigator = Navigator;
20
- export declare type ReaderState = {
21
- colorMode: ColorMode;
22
- isScrolling: boolean;
23
- fontSize: number;
24
- fontFamily: FontFamily;
25
- currentTocUrl: string | null;
26
- };
27
- export declare type PdfReaderState = ReaderState;
28
- export declare type HtmlReaderState = ReaderState;
29
- export declare type InactiveReader = null;
30
- export declare type LoadingReader = {
31
- isLoading: true;
32
- content: JSX.Element;
33
- navigator: null;
34
- state: null;
35
- manifest: null;
36
- type: null;
37
- };
38
- declare type CommonReader = {
39
- isLoading: false;
40
- content: JSX.Element;
41
- manifest: WebpubManifest;
42
- };
43
- export declare type PDFActiveReader = CommonReader & {
44
- state: PdfReaderState;
45
- navigator: PdfNavigator;
46
- type: 'PDF';
47
- };
48
- export declare type HTMLActiveReader = CommonReader & {
49
- state: HtmlReaderState;
50
- navigator: HtmlNavigator;
51
- type: 'HTML';
52
- };
53
- export declare type ActiveReader = PDFActiveReader | HTMLActiveReader;
54
- export declare type ReaderReturn = InactiveReader | LoadingReader | ActiveReader;
55
- export declare type GetContent = (href: string) => Promise<string>;
56
- export declare type UseWebReaderArguments = {
57
- webpubManifestUrl: string;
58
- proxyUrl?: string;
59
- getContent?: GetContent;
60
- };
61
- export declare type ActiveReaderArguments = UseWebReaderArguments & {
62
- manifest: WebpubManifest;
63
- };
64
- export declare type InactiveReaderArguments = undefined;
65
- export declare type ReaderArguments = ActiveReaderArguments | InactiveReaderArguments;
66
- export declare type GetColor = (light: string, dark: string, sepia: string) => string;
1
+ /// <reference types="react" />
2
+ import { WebpubManifest } from './WebpubManifestTypes/WebpubManifest';
3
+ export { WebpubManifest };
4
+ export declare const EpubMimeType = "application/epub";
5
+ export declare const WebpubMimeType = "application/webpub";
6
+ export declare type ColorMode = 'night' | 'sepia' | 'day';
7
+ export declare type FontFamily = 'publisher' | 'serif' | 'sans-serif' | 'open-dyslexic';
8
+ export declare type Navigator = {
9
+ goForward: () => void;
10
+ goBackward: () => void;
11
+ setColorMode: (mode: ColorMode) => Promise<void>;
12
+ setScroll: (val: 'scrolling' | 'paginated') => Promise<void>;
13
+ increaseFontSize: () => Promise<void>;
14
+ decreaseFontSize: () => Promise<void>;
15
+ setFontFamily: (family: FontFamily) => Promise<void>;
16
+ goToPage: (href: string) => void;
17
+ };
18
+ export declare type PdfNavigator = Navigator;
19
+ export declare type HtmlNavigator = Navigator;
20
+ export declare type ReaderState = {
21
+ colorMode: ColorMode;
22
+ isScrolling: boolean;
23
+ fontSize: number;
24
+ fontFamily: FontFamily;
25
+ currentTocUrl: string | null;
26
+ };
27
+ export declare type PdfReaderState = ReaderState;
28
+ export declare type HtmlReaderState = ReaderState;
29
+ export declare type InactiveReader = null;
30
+ export declare type LoadingReader = {
31
+ isLoading: true;
32
+ content: JSX.Element;
33
+ navigator: null;
34
+ state: null;
35
+ manifest: null;
36
+ type: null;
37
+ };
38
+ declare type CommonReader = {
39
+ isLoading: false;
40
+ content: JSX.Element;
41
+ manifest: WebpubManifest;
42
+ };
43
+ export declare type PDFActiveReader = CommonReader & {
44
+ state: PdfReaderState;
45
+ navigator: PdfNavigator;
46
+ type: 'PDF';
47
+ };
48
+ export declare type HTMLActiveReader = CommonReader & {
49
+ state: HtmlReaderState;
50
+ navigator: HtmlNavigator;
51
+ type: 'HTML';
52
+ };
53
+ export declare type ActiveReader = PDFActiveReader | HTMLActiveReader;
54
+ export declare type ReaderReturn = InactiveReader | LoadingReader | ActiveReader;
55
+ export declare type GetContent = (href: string) => Promise<string>;
56
+ export declare type UseWebReaderArguments = {
57
+ webpubManifestUrl: string;
58
+ proxyUrl?: string;
59
+ getContent?: GetContent;
60
+ };
61
+ export declare type ActiveReaderArguments = UseWebReaderArguments & {
62
+ manifest: WebpubManifest;
63
+ };
64
+ export declare type InactiveReaderArguments = undefined;
65
+ export declare type ReaderArguments = ActiveReaderArguments | InactiveReaderArguments;
66
+ export declare type GetColor = (light: string, dark: string, sepia: string) => string;
@@ -1,7 +1,9 @@
1
- import React from 'react';
2
- import { Button as ChakraButton } from '@chakra-ui/react';
3
- export declare type ButtonProps = React.ComponentPropsWithRef<typeof ChakraButton>;
4
- declare const Button: React.ForwardRefExoticComponent<Pick<Pick<import("@chakra-ui/react").MergeWithAs<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, any, import("@chakra-ui/react").ButtonProps, React.ElementType<any>>, string | number | symbol> & {
5
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
6
- }, string | number | symbol> & React.RefAttributes<HTMLButtonElement>>;
7
- export default Button;
1
+ import React from 'react';
2
+ import { Button as ChakraButton } from '@chakra-ui/react';
3
+ export declare type ButtonProps = React.ComponentPropsWithRef<typeof ChakraButton>;
4
+ declare const Button: React.ForwardRefExoticComponent<Pick<Pick<import("@chakra-ui/react").OmitCommonProps<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import("@chakra-ui/react").ButtonProps> & import("@chakra-ui/react").ButtonProps & import("@chakra-ui/react").OmitCommonProps<any, keyof import("@chakra-ui/react").ButtonProps> & {
5
+ as?: import("@chakra-ui/react").As<any> | undefined;
6
+ }, string | number | symbol> & {
7
+ ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
8
+ }, string | number | symbol> & React.RefAttributes<HTMLButtonElement>>;
9
+ export default Button;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { ActiveReader } from '../types';
3
- export declare type HeaderProps = ActiveReader & {
4
- headerLeft?: React.ReactNode;
5
- };
6
- export default function Header(props: HeaderProps): React.ReactElement;
1
+ import React from 'react';
2
+ import { ActiveReader } from '../types';
3
+ export declare type HeaderProps = ActiveReader & {
4
+ headerLeft?: React.ReactNode;
5
+ };
6
+ export default function Header(props: HeaderProps): React.ReactElement;
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
2
- import { HtmlNavigator, HtmlReaderState } from '../types';
3
- declare type HtmlSettingsProps = {
4
- navigator: HtmlNavigator;
5
- readerState: HtmlReaderState;
6
- paginationValue: string;
7
- };
8
- export default function HtmlSettings(props: HtmlSettingsProps): React.ReactElement;
9
- export {};
1
+ import * as React from 'react';
2
+ import { HtmlNavigator, HtmlReaderState } from '../types';
3
+ declare type HtmlSettingsProps = {
4
+ navigator: HtmlNavigator;
5
+ readerState: HtmlReaderState;
6
+ paginationValue: string;
7
+ };
8
+ export default function HtmlSettings(props: HtmlSettingsProps): React.ReactElement;
9
+ export {};
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { Button } from '@chakra-ui/react';
3
- export declare type PageButtonProps = React.ComponentPropsWithoutRef<typeof Button> & {
4
- children: React.ReactNode;
5
- };
6
- declare function PageButton(props: React.PropsWithoutRef<PageButtonProps>): React.ReactElement;
7
- export default PageButton;
1
+ import React from 'react';
2
+ import { Button } from '@chakra-ui/react';
3
+ export declare type PageButtonProps = React.ComponentPropsWithoutRef<typeof Button> & {
4
+ children: React.ReactNode;
5
+ };
6
+ declare function PageButton(props: React.PropsWithoutRef<PageButtonProps>): React.ReactElement;
7
+ export default PageButton;
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
2
- import { PdfNavigator, PdfReaderState } from '../types';
3
- declare type PdfSettingsProps = {
4
- navigator: PdfNavigator;
5
- readerState: PdfReaderState;
6
- paginationValue: string;
7
- };
8
- export default function PdfSettings(props: PdfSettingsProps): React.ReactElement;
9
- export {};
1
+ import * as React from 'react';
2
+ import { PdfNavigator, PdfReaderState } from '../types';
3
+ declare type PdfSettingsProps = {
4
+ navigator: PdfNavigator;
5
+ readerState: PdfReaderState;
6
+ paginationValue: string;
7
+ };
8
+ export default function PdfSettings(props: PdfSettingsProps): React.ReactElement;
9
+ export {};
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { PDFActiveReader, HTMLActiveReader } from '../types';
3
- declare type SettingsCardProps = Pick<PDFActiveReader, 'navigator' | 'state' | 'type'> | Pick<HTMLActiveReader, 'navigator' | 'state' | 'type'>;
4
- export default function SettingsCard(props: SettingsCardProps): React.ReactElement;
5
- export {};
1
+ import * as React from 'react';
2
+ import { PDFActiveReader, HTMLActiveReader } from '../types';
3
+ declare type SettingsCardProps = Pick<PDFActiveReader, 'navigator' | 'state' | 'type'> | Pick<HTMLActiveReader, 'navigator' | 'state' | 'type'>;
4
+ export default function SettingsCard(props: SettingsCardProps): React.ReactElement;
5
+ export {};
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { Navigator, ReaderState, WebpubManifest } from '../types';
3
- export default function TableOfContent({ navigator, manifest, readerState, }: {
4
- navigator: Navigator;
5
- manifest: WebpubManifest;
6
- readerState: ReaderState;
7
- }): React.ReactElement;
1
+ import React from 'react';
2
+ import { Navigator, ReaderState, WebpubManifest } from '../types';
3
+ export default function TableOfContent({ navigator, manifest, readerState, }: {
4
+ navigator: Navigator;
5
+ manifest: WebpubManifest;
6
+ readerState: ReaderState;
7
+ }): React.ReactElement;
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { Box as ChakraBox } from '@chakra-ui/react';
3
- import { ColorMode } from '../types';
4
- export interface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof ChakraBox> {
5
- isChecked?: false;
6
- colorMode?: ColorMode;
7
- value: string;
8
- }
9
- declare function ToggleButton(props: React.PropsWithoutRef<ToggleButtonProps>): React.ReactElement;
10
- export default ToggleButton;
1
+ import React from 'react';
2
+ import { Box as ChakraBox } from '@chakra-ui/react';
3
+ import { ColorMode } from '../types';
4
+ export interface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof ChakraBox> {
5
+ isChecked?: false;
6
+ colorMode?: ColorMode;
7
+ value: string;
8
+ }
9
+ declare function ToggleButton(props: React.PropsWithoutRef<ToggleButtonProps>): React.ReactElement;
10
+ export default ToggleButton;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { UseRadioGroupProps } from '@chakra-ui/react';
3
- declare type ToggleGroupProps = Omit<UseRadioGroupProps, 'value' | 'defaultValue'> & {
4
- value: string;
5
- label: string;
6
- };
7
- declare const ToggleGroup: React.FC<ToggleGroupProps>;
8
- export default ToggleGroup;
1
+ import React from 'react';
2
+ import { UseRadioGroupProps } from '@chakra-ui/react';
3
+ declare type ToggleGroupProps = Omit<UseRadioGroupProps, 'value' | 'defaultValue'> & {
4
+ value: string;
5
+ label: string;
6
+ };
7
+ declare const ToggleGroup: React.FC<ToggleGroupProps>;
8
+ export default ToggleGroup;
@@ -1 +1 @@
1
- export declare const HEADER_HEIGHT = 48;
1
+ export declare const HEADER_HEIGHT = 48;
@@ -1,7 +1,7 @@
1
- import { Theme } from '@emotion/react';
2
- import { ColorMode } from '../../types';
3
- export interface ColorModeTheme extends Theme {
4
- currentColorMode: ColorMode;
5
- }
6
- declare const useColorModeValue: (light: string, dark: string, sepia: string) => string;
7
- export default useColorModeValue;
1
+ import { Theme } from '@emotion/react';
2
+ import { ColorMode } from '../../types';
3
+ export interface ColorModeTheme extends Theme {
4
+ currentColorMode: ColorMode;
5
+ }
6
+ declare const useColorModeValue: (light: string, dark: string, sepia: string) => string;
7
+ export default useColorModeValue;
@@ -1,6 +1,6 @@
1
- /**
2
- * Returns the interior width of the container in pixels.
3
- *
4
- * @returns {number} Width of the container in pixels
5
- */
6
- export default function useContainerWidth(containerId: string): number;
1
+ /**
2
+ * Returns the interior width of the container in pixels.
3
+ *
4
+ * @returns {number} Width of the container in pixels
5
+ */
6
+ export default function useContainerWidth(containerId: string): number;
@@ -1,8 +1,8 @@
1
- /**
2
- * Adds event listener to a given element.
3
- *
4
- * @param {HTMLElement} element Element to attach the listener to
5
- * @param {string} type Event type
6
- * @param {Function} listener Event listener
7
- */
8
- export default function useEventListener(element: HTMLElement | Window, type: string, listener: () => void): void;
1
+ /**
2
+ * Adds event listener to a given element.
3
+ *
4
+ * @param {HTMLElement} element Element to attach the listener to
5
+ * @param {string} type Event type
6
+ * @param {Function} listener Event listener
7
+ */
8
+ export default function useEventListener(element: HTMLElement | Window, type: string, listener: () => void): void;
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
2
- import { ReaderReturn } from '../types';
3
- /**
4
- * The default Manager UI. This will be broken into individual components
5
- * that can be imported and used separately or in a customized setup.
6
- * It takes the return value of useWebReader as props
7
- */
8
- declare const ManagerUI: React.FC<ReaderReturn>;
9
- export default ManagerUI;
1
+ import * as React from 'react';
2
+ import { ReaderReturn } from '../types';
3
+ /**
4
+ * The default Manager UI. This will be broken into individual components
5
+ * that can be imported and used separately or in a customized setup.
6
+ * It takes the return value of useWebReader as props
7
+ */
8
+ declare const ManagerUI: React.FC<ReaderReturn>;
9
+ export default ManagerUI;
@@ -1,94 +1,94 @@
1
- import { Dict } from '../types';
2
- declare const ButtonStyle: {
3
- baseStyle: {
4
- borderRadius: string;
5
- fontWeight: string;
6
- };
7
- sizes: {
8
- lg: {
9
- h: number;
10
- minW: number;
11
- fontSize: string;
12
- px: number;
13
- };
14
- md: {
15
- h: string;
16
- minW: number;
17
- fontSize: string;
18
- px: number;
19
- };
20
- sm: {
21
- h: number;
22
- minW: number;
23
- fontSize: string;
24
- px: number;
25
- };
26
- xs: {
27
- h: number;
28
- minW: number;
29
- fontSize: string;
30
- px: number;
31
- };
32
- };
33
- variants: {
34
- pill: {
35
- border: string;
36
- borderColor: string;
37
- borderRadius: string;
38
- height: number;
39
- px: number;
40
- fontSize: string;
41
- my: string;
42
- };
43
- solid: typeof variantSolid;
44
- secondary: {
45
- border: string;
46
- borderColor: string;
47
- _hover: {
48
- bg: string;
49
- borderColor: string;
50
- };
51
- };
52
- };
53
- defaultProps: {
54
- size: string;
55
- variant: string;
56
- colorScheme: string;
57
- };
58
- };
59
- declare function variantSolid(props: Dict): {
60
- _hover: {
61
- _disabled: {
62
- bg: string;
63
- color: string;
64
- };
65
- };
66
- _disabled: {
67
- bg: string;
68
- color: string;
69
- };
70
- bg: string;
71
- _active: {
72
- bg: string;
73
- };
74
- color?: undefined;
75
- hoverBg?: undefined;
76
- activeBg?: undefined;
77
- } | {
78
- _hover: {
79
- _disabled: {
80
- bg: string;
81
- color: string;
82
- };
83
- };
84
- _disabled: {
85
- bg: string;
86
- color: string;
87
- };
88
- bg: string;
89
- color: string;
90
- hoverBg: string;
91
- activeBg: string;
92
- _active?: undefined;
93
- };
94
- export default ButtonStyle;
1
+ import { Dict } from '../types';
2
+ declare const ButtonStyle: {
3
+ baseStyle: {
4
+ borderRadius: string;
5
+ fontWeight: string;
6
+ };
7
+ sizes: {
8
+ lg: {
9
+ h: number;
10
+ minW: number;
11
+ fontSize: string;
12
+ px: number;
13
+ };
14
+ md: {
15
+ h: string;
16
+ minW: number;
17
+ fontSize: string;
18
+ px: number;
19
+ };
20
+ sm: {
21
+ h: number;
22
+ minW: number;
23
+ fontSize: string;
24
+ px: number;
25
+ };
26
+ xs: {
27
+ h: number;
28
+ minW: number;
29
+ fontSize: string;
30
+ px: number;
31
+ };
32
+ };
33
+ variants: {
34
+ pill: {
35
+ border: string;
36
+ borderColor: string;
37
+ borderRadius: string;
38
+ height: number;
39
+ px: number;
40
+ fontSize: string;
41
+ my: string;
42
+ };
43
+ solid: typeof variantSolid;
44
+ secondary: {
45
+ border: string;
46
+ borderColor: string;
47
+ _hover: {
48
+ bg: string;
49
+ borderColor: string;
50
+ };
51
+ };
52
+ };
53
+ defaultProps: {
54
+ size: string;
55
+ variant: string;
56
+ colorScheme: string;
57
+ };
58
+ };
59
+ declare function variantSolid(props: Dict): {
60
+ _hover: {
61
+ _disabled: {
62
+ bg: string;
63
+ color: string;
64
+ };
65
+ };
66
+ _disabled: {
67
+ bg: string;
68
+ color: string;
69
+ };
70
+ bg: string;
71
+ _active: {
72
+ bg: string;
73
+ };
74
+ color?: undefined;
75
+ hoverBg?: undefined;
76
+ activeBg?: undefined;
77
+ } | {
78
+ _hover: {
79
+ _disabled: {
80
+ bg: string;
81
+ color: string;
82
+ };
83
+ };
84
+ _disabled: {
85
+ bg: string;
86
+ color: string;
87
+ };
88
+ bg: string;
89
+ color: string;
90
+ hoverBg: string;
91
+ activeBg: string;
92
+ _active?: undefined;
93
+ };
94
+ export default ButtonStyle;
@@ -1,41 +1,41 @@
1
- declare const Checkbox: {
2
- baseStyle: {
3
- control: {
4
- borderColor: string;
5
- _hover: {
6
- bg: string;
7
- _disabled: {
8
- bg: string;
9
- };
10
- };
11
- _checked: {
12
- bg: string;
13
- color: string;
14
- borderColor: string;
15
- _hover: {
16
- bg: string;
17
- borderColor: string;
18
- };
19
- };
20
- _disabled: {
21
- bg: string;
22
- borderColor: string;
23
- };
24
- };
25
- label: {
26
- userSelect: string;
27
- fontWeight: string;
28
- _disabled: {
29
- color: string;
30
- opacity: number;
31
- };
32
- };
33
- };
34
- sizes: {};
35
- variants: {};
36
- defaultProps: {
37
- size: string;
38
- colorScheme: string;
39
- };
40
- };
41
- export default Checkbox;
1
+ declare const Checkbox: {
2
+ baseStyle: {
3
+ control: {
4
+ borderColor: string;
5
+ _hover: {
6
+ bg: string;
7
+ _disabled: {
8
+ bg: string;
9
+ };
10
+ };
11
+ _checked: {
12
+ bg: string;
13
+ color: string;
14
+ borderColor: string;
15
+ _hover: {
16
+ bg: string;
17
+ borderColor: string;
18
+ };
19
+ };
20
+ _disabled: {
21
+ bg: string;
22
+ borderColor: string;
23
+ };
24
+ };
25
+ label: {
26
+ userSelect: string;
27
+ fontWeight: string;
28
+ _disabled: {
29
+ color: string;
30
+ opacity: number;
31
+ };
32
+ };
33
+ };
34
+ sizes: {};
35
+ variants: {};
36
+ defaultProps: {
37
+ size: string;
38
+ colorScheme: string;
39
+ };
40
+ };
41
+ export default Checkbox;