@topwrite/reader 1.0.68-alpha.4 → 1.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/267-efd799.js +1 -0
- package/dist/387-f82649.js +2 -0
- package/dist/387-f82649.js.map +1 -0
- package/dist/449-ad0329.js +2 -0
- package/dist/{809-2eaa99.js.map → 449-ad0329.js.map} +1 -1
- package/dist/454-b0e4b2.js +2 -0
- package/dist/{843-6bc79e.js.map → 454-b0e4b2.js.map} +1 -1
- package/dist/561-70f145.js +8 -0
- package/dist/561-70f145.js.map +1 -0
- package/dist/659-ecffed.js +2 -0
- package/dist/659-ecffed.js.map +1 -0
- package/dist/7-b07a36.js +1 -0
- package/dist/index.js +335 -16
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/types/components/anchor.d.ts +7 -7
- package/types/components/app.d.ts +1 -1
- package/types/components/article.d.ts +8 -8
- package/types/components/asset.d.ts +6 -6
- package/types/components/breadcrumb.d.ts +8 -8
- package/types/components/catalog.d.ts +35 -35
- package/types/components/html/a.d.ts +2 -2
- package/types/components/html/attachment.d.ts +2 -2
- package/types/components/html/audio.d.ts +2 -2
- package/types/components/html/img.d.ts +2 -2
- package/types/components/html/video.d.ts +2 -2
- package/types/components/link.d.ts +7 -7
- package/types/components/loading-bar/index.d.ts +1 -1
- package/types/components/loading-bar/loading-bar.d.ts +2 -2
- package/types/components/logo.d.ts +6 -6
- package/types/components/markdown.d.ts +5 -5
- package/types/components/menu.d.ts +14 -14
- package/types/components/nav-link.d.ts +7 -7
- package/types/components/page-loader.d.ts +1 -1
- package/types/components/page.d.ts +1 -1
- package/types/components/powered-by.d.ts +5 -5
- package/types/components/search/ask-box/form.d.ts +5 -5
- package/types/components/search/ask-box/index.d.ts +5 -5
- package/types/components/search/ask-box/screens/error-screen.d.ts +1 -1
- package/types/components/search/ask-box/screens/start-screen.d.ts +1 -1
- package/types/components/search/ask-box/state.d.ts +5 -5
- package/types/components/search/constants.d.ts +1 -1
- package/types/components/search/doc-search-button.d.ts +3 -3
- package/types/components/search/doc-search-modal.d.ts +4 -4
- package/types/components/search/doc-search.d.ts +8 -8
- package/types/components/search/footer.d.ts +1 -1
- package/types/components/search/hooks/use-keyboard-events.d.ts +9 -9
- package/types/components/search/hooks/use-trap-focus.d.ts +5 -5
- package/types/components/search/icons/ask-icon.d.ts +1 -1
- package/types/components/search/icons/content-icon.d.ts +1 -1
- package/types/components/search/icons/control-key-icon.d.ts +1 -1
- package/types/components/search/icons/error-icon.d.ts +1 -1
- package/types/components/search/icons/go-to-external-icon.d.ts +1 -1
- package/types/components/search/icons/index.d.ts +12 -12
- package/types/components/search/icons/loading-icon.d.ts +1 -1
- package/types/components/search/icons/no-results-icon.d.ts +1 -1
- package/types/components/search/icons/recent-icon.d.ts +1 -1
- package/types/components/search/icons/reset-icon.d.ts +1 -1
- package/types/components/search/icons/search-icon.d.ts +1 -1
- package/types/components/search/icons/select-icon.d.ts +1 -1
- package/types/components/search/icons/star-icon.d.ts +1 -1
- package/types/components/search/index.d.ts +2 -2
- package/types/components/search/mode-provider.d.ts +5 -5
- package/types/components/search/search-box/form.d.ts +5 -5
- package/types/components/search/search-box/index.d.ts +5 -5
- package/types/components/search/search-box/results.d.ts +13 -13
- package/types/components/search/search-box/screens/error-screen.d.ts +1 -1
- package/types/components/search/search-box/screens/no-result-screen.d.ts +1 -1
- package/types/components/search/search-box/screens/results-screen.d.ts +13 -13
- package/types/components/search/search-box/screens/start-screen.d.ts +5 -5
- package/types/components/search/search-box/state.d.ts +7 -7
- package/types/components/to-first-article.d.ts +2 -2
- package/types/hello.d.ts +1 -1
- package/types/index.d.ts +29 -28
- package/types/lib/bootstrap.d.ts +3 -3
- package/types/lib/date.d.ts +6 -6
- package/types/lib/extend-entities.d.ts +6 -6
- package/types/lib/history.d.ts +18 -18
- package/types/lib/use-article.d.ts +7 -7
- package/types/lib/use-asset-url.d.ts +1 -1
- package/types/lib/use-asset.d.ts +4 -4
- package/types/lib/use-css.d.ts +8 -8
- package/types/lib/use-file.d.ts +1 -1
- package/types/lib/use-in-preview.d.ts +1 -1
- package/types/lib/use-lock-body-scroll.d.ts +1 -1
- package/types/lib/use-logo.d.ts +7 -7
- package/types/lib/use-title.d.ts +1 -1
- package/types/lib/use-window-scroll.d.ts +2 -2
- package/types/lib/use-window-size.d.ts +4 -4
- package/types/models/ask.d.ts +18 -18
- package/types/models/book.d.ts +5 -5
- package/types/models/index.d.ts +4 -4
- package/types/models/page.d.ts +28 -28
- package/types/models/search.d.ts +22 -22
- package/types/typings.d.ts +39 -39
- package/dist/267-b06d72.js +0 -1
- package/dist/387-02d8b5.js +0 -2
- package/dist/387-02d8b5.js.map +0 -1
- package/dist/452-089cc0.js +0 -8
- package/dist/452-089cc0.js.map +0 -1
- package/dist/7-646b8c.js +0 -1
- package/dist/809-2eaa99.js +0 -2
- package/dist/843-6bc79e.js +0 -2
- package/dist/945-956f08.js +0 -2
- package/dist/945-956f08.js.map +0 -1
- /package/dist/{809.css → 449.css} +0 -0
- /package/dist/{843.css → 454.css} +0 -0
- /package/dist/{945.css → 659.css} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ResultItem } from '../results';
|
|
2
|
-
import { SearchResult } from '../../../../models/search';
|
|
3
|
-
interface ResultsScreenProps {
|
|
4
|
-
activeIndex?: number;
|
|
5
|
-
onItemClick: (item: SearchResult) => void;
|
|
6
|
-
onActive: (index: number) => void;
|
|
7
|
-
collections: {
|
|
8
|
-
title: string;
|
|
9
|
-
items: ResultItem[];
|
|
10
|
-
}[];
|
|
11
|
-
}
|
|
12
|
-
export declare function ResultsScreen({ collections, ...props }: ResultsScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
1
|
+
import { ResultItem } from '../results';
|
|
2
|
+
import { SearchResult } from '../../../../models/search';
|
|
3
|
+
interface ResultsScreenProps {
|
|
4
|
+
activeIndex?: number;
|
|
5
|
+
onItemClick: (item: SearchResult) => void;
|
|
6
|
+
onActive: (index: number) => void;
|
|
7
|
+
collections: {
|
|
8
|
+
title: string;
|
|
9
|
+
items: ResultItem[];
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export declare function ResultsScreen({ collections, ...props }: ResultsScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
interface StartScreenProps {
|
|
2
|
-
hasCollections: boolean;
|
|
3
|
-
}
|
|
4
|
-
export declare function StartScreen(props: StartScreenProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
-
export {};
|
|
1
|
+
interface StartScreenProps {
|
|
2
|
+
hasCollections: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function StartScreen(props: StartScreenProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SearchResult } from '../../../models/search';
|
|
2
|
-
export interface StateProps {
|
|
3
|
-
activeIndex?: number;
|
|
4
|
-
onItemClick: (item: SearchResult) => void;
|
|
5
|
-
onActive: (index: number) => void;
|
|
6
|
-
}
|
|
7
|
-
export default function State(props: StateProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { SearchResult } from '../../../models/search';
|
|
2
|
+
export interface StateProps {
|
|
3
|
+
activeIndex?: number;
|
|
4
|
+
onItemClick: (item: SearchResult) => void;
|
|
5
|
+
onActive: (index: number) => void;
|
|
6
|
+
}
|
|
7
|
+
export default function State(props: StateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
export default function ToFirstArticle({ children }: PropsWithChildren<any>): any;
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export default function ToFirstArticle({ children }: PropsWithChildren<any>): any;
|
package/types/hello.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const logHello: () => void;
|
|
1
|
+
export declare const logHello: () => void;
|
package/types/index.d.ts
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import './typings';
|
|
2
|
-
import './lib/date';
|
|
3
|
-
export * from '@topwrite/common';
|
|
4
|
-
export { default as bootstrap } from './lib/bootstrap';
|
|
5
|
-
export { history } from './lib/history';
|
|
6
|
-
export { default as useTitle } from './lib/use-title';
|
|
7
|
-
export { default as useFile } from './lib/use-file';
|
|
8
|
-
export { default as useAssetUrl } from './lib/use-asset-url';
|
|
9
|
-
export { default as useAsset } from './lib/use-asset';
|
|
10
|
-
export { default as useLogo } from './lib/use-logo';
|
|
11
|
-
export { default as useArticle, usePrevArticle, useNextArticle } from './lib/use-article';
|
|
12
|
-
export { default as useWindowSize, windowSizes } from './lib/use-window-size';
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as
|
|
21
|
-
export { default as
|
|
22
|
-
export { default as
|
|
23
|
-
export { default as
|
|
24
|
-
export { default as
|
|
25
|
-
export { default as
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as
|
|
28
|
-
export
|
|
1
|
+
import './typings';
|
|
2
|
+
import './lib/date';
|
|
3
|
+
export * from '@topwrite/common';
|
|
4
|
+
export { default as bootstrap } from './lib/bootstrap';
|
|
5
|
+
export { history } from './lib/history';
|
|
6
|
+
export { default as useTitle } from './lib/use-title';
|
|
7
|
+
export { default as useFile } from './lib/use-file';
|
|
8
|
+
export { default as useAssetUrl } from './lib/use-asset-url';
|
|
9
|
+
export { default as useAsset } from './lib/use-asset';
|
|
10
|
+
export { default as useLogo } from './lib/use-logo';
|
|
11
|
+
export { default as useArticle, usePrevArticle, useNextArticle } from './lib/use-article';
|
|
12
|
+
export { default as useWindowSize, windowSizes } from './lib/use-window-size';
|
|
13
|
+
export { default as useWindowScroll } from './lib/use-window-scroll';
|
|
14
|
+
export { default as useLockBodyScroll } from './lib/use-lock-body-scroll';
|
|
15
|
+
export { default as useInPreview } from './lib/use-in-preview';
|
|
16
|
+
export { default as PoweredBy } from './components/powered-by';
|
|
17
|
+
export { default as Logo } from './components/logo';
|
|
18
|
+
export { default as Link } from './components/link';
|
|
19
|
+
export { default as NavLink } from './components/nav-link';
|
|
20
|
+
export { default as Search } from './components/search';
|
|
21
|
+
export { default as LoadingBar } from './components/loading-bar';
|
|
22
|
+
export { default as Anchor } from './components/anchor';
|
|
23
|
+
export { default as Article } from './components/article';
|
|
24
|
+
export { default as Catalog, type CatalogProps, CatalogItems } from './components/catalog';
|
|
25
|
+
export { default as Markdown } from './components/markdown';
|
|
26
|
+
export { default as Breadcrumb } from './components/breadcrumb';
|
|
27
|
+
export { default as PageLoader } from './components/page-loader';
|
|
28
|
+
export { default as ToFirstArticle } from './components/to-first-article';
|
|
29
|
+
export type { SearchHandler, SearchResult } from './models/search';
|
package/types/lib/bootstrap.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import './extend-entities';
|
|
2
|
-
declare const _default: () => void;
|
|
3
|
-
export default _default;
|
|
1
|
+
import './extend-entities';
|
|
2
|
+
declare const _default: () => void;
|
|
3
|
+
export default _default;
|
package/types/lib/date.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Date {
|
|
3
|
-
format(fmt: string): string;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
export {};
|
|
1
|
+
declare global {
|
|
2
|
+
interface Date {
|
|
3
|
+
format(fmt: string): string;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { immerable } from 'immer';
|
|
2
|
-
declare module '@topwrite/common' {
|
|
3
|
-
interface File {
|
|
4
|
-
[immerable]: boolean;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
import { immerable } from 'immer';
|
|
2
|
+
declare module '@topwrite/common' {
|
|
3
|
+
interface File {
|
|
4
|
+
[immerable]: boolean;
|
|
5
|
+
}
|
|
6
|
+
}
|
package/types/lib/history.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { History as H, Listener, To } from 'history';
|
|
2
|
-
export declare class History {
|
|
3
|
-
history: H;
|
|
4
|
-
constructor();
|
|
5
|
-
get location(): {
|
|
6
|
-
toString(): string;
|
|
7
|
-
state: unknown;
|
|
8
|
-
key: string;
|
|
9
|
-
pathname: string;
|
|
10
|
-
search: string;
|
|
11
|
-
hash: string;
|
|
12
|
-
};
|
|
13
|
-
listen(listener: Listener): () => void;
|
|
14
|
-
replace(location: To): void;
|
|
15
|
-
push(location: To): void;
|
|
16
|
-
}
|
|
17
|
-
export declare let history: History;
|
|
18
|
-
export declare function createHistory(): History;
|
|
1
|
+
import { History as H, Listener, To } from 'history';
|
|
2
|
+
export declare class History {
|
|
3
|
+
history: H;
|
|
4
|
+
constructor();
|
|
5
|
+
get location(): {
|
|
6
|
+
toString(): string;
|
|
7
|
+
state: unknown;
|
|
8
|
+
key: string;
|
|
9
|
+
pathname: string;
|
|
10
|
+
search: string;
|
|
11
|
+
hash: string;
|
|
12
|
+
};
|
|
13
|
+
listen(listener: Listener): () => void;
|
|
14
|
+
replace(location: To): void;
|
|
15
|
+
push(location: To): void;
|
|
16
|
+
}
|
|
17
|
+
export declare let history: History;
|
|
18
|
+
export declare function createHistory(): History;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SummaryArticle } from '@topwrite/common';
|
|
3
|
-
export declare const ArticleContext: import("react").Context<SummaryArticle | undefined>;
|
|
4
|
-
export default function useArticle(): SummaryArticle | undefined;
|
|
5
|
-
export declare function useNextArticle(): SummaryArticle | undefined;
|
|
6
|
-
export declare function usePrevArticle(): SummaryArticle | undefined;
|
|
7
|
-
export declare function usePart(): import("@topwrite/common").SummaryPart | undefined;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SummaryArticle } from '@topwrite/common';
|
|
3
|
+
export declare const ArticleContext: import("react").Context<SummaryArticle | undefined>;
|
|
4
|
+
export default function useArticle(): SummaryArticle | undefined;
|
|
5
|
+
export declare function useNextArticle(): SummaryArticle | undefined;
|
|
6
|
+
export declare function usePrevArticle(): SummaryArticle | undefined;
|
|
7
|
+
export declare function usePart(): import("@topwrite/common").SummaryPart | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useAssetUrl(filename: string): string;
|
|
1
|
+
export default function useAssetUrl(filename: string): string;
|
package/types/lib/use-asset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function useAsset(): {
|
|
2
|
-
getUrl: (filename: string) => string;
|
|
3
|
-
upload: (_file: File, _onProgress?: ((event: ProgressEvent) => void) | undefined) => Promise<string>;
|
|
4
|
-
};
|
|
1
|
+
export default function useAsset(): {
|
|
2
|
+
getUrl: (filename: string) => string;
|
|
3
|
+
upload: (_file: File, _onProgress?: ((event: ProgressEvent) => void) | undefined) => Promise<string>;
|
|
4
|
+
};
|
package/types/lib/use-css.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export declare const CssContext: import("react").Context<string | undefined>;
|
|
3
|
-
interface Props {
|
|
4
|
-
readonly children: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare function CssProvider({ children }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export default function useCss(): string | undefined;
|
|
8
|
-
export {};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const CssContext: import("react").Context<string | undefined>;
|
|
3
|
+
interface Props {
|
|
4
|
+
readonly children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function CssProvider({ children }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default function useCss(): string | undefined;
|
|
8
|
+
export {};
|
package/types/lib/use-file.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useFile(): import("@topwrite/common").File;
|
|
1
|
+
export default function useFile(): import("@topwrite/common").File;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useInPreview(): boolean;
|
|
1
|
+
export default function useInPreview(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useLockBodyScroll(lock?: boolean, reset?: boolean): void;
|
|
1
|
+
export default function useLockBodyScroll(lock?: boolean, reset?: boolean): void;
|
package/types/lib/use-logo.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface Props {
|
|
3
|
-
readonly children: ReactNode;
|
|
4
|
-
}
|
|
5
|
-
export declare function LogoProvider({ children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default function useLogo(): string;
|
|
7
|
-
export {};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function LogoProvider({ children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default function useLogo(): string;
|
|
7
|
+
export {};
|
package/types/lib/use-title.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useTitle(): string;
|
|
1
|
+
export default function useTitle(): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useWindowScroll: (fps?: number) => number;
|
|
2
|
-
export default useWindowScroll;
|
|
1
|
+
export declare const useWindowScroll: (fps?: number) => number;
|
|
2
|
+
export default useWindowScroll;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type WindowSize = 'desktop' | 'mobile';
|
|
2
|
-
export declare const windowSizes: Record<string, WindowSize>;
|
|
3
|
-
export default function useWindowSize(): WindowSize;
|
|
4
|
-
export {};
|
|
1
|
+
type WindowSize = 'desktop' | 'mobile';
|
|
2
|
+
export declare const windowSizes: Record<string, WindowSize>;
|
|
3
|
+
export default function useWindowSize(): WindowSize;
|
|
4
|
+
export {};
|
package/types/models/ask.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Model } from '@topwrite/common';
|
|
2
|
-
export type AskHandler = (keyword: string, part?: string) => Promise<ReadableStreamDefaultReader> | ReadableStreamDefaultReader;
|
|
3
|
-
interface AskState {
|
|
4
|
-
enable: boolean;
|
|
5
|
-
handler?: AskHandler;
|
|
6
|
-
status: 'idle' | 'loading' | 'stalled' | 'error';
|
|
7
|
-
query: string;
|
|
8
|
-
part?: string;
|
|
9
|
-
answer: string;
|
|
10
|
-
}
|
|
11
|
-
declare class Ask extends Model<AskState> {
|
|
12
|
-
initialState: AskState;
|
|
13
|
-
fetch(query: string): AsyncGenerator<import("redux").AnyAction, void, unknown>;
|
|
14
|
-
setPart(part?: string): Generator<import("redux").AnyAction, void, unknown>;
|
|
15
|
-
setHandler(handler?: AskHandler): Generator<import("redux").AnyAction, void, unknown>;
|
|
16
|
-
}
|
|
17
|
-
export declare const ask: Ask;
|
|
18
|
-
export {};
|
|
1
|
+
import { Model } from '@topwrite/common';
|
|
2
|
+
export type AskHandler = (keyword: string, part?: string) => Promise<ReadableStreamDefaultReader> | ReadableStreamDefaultReader;
|
|
3
|
+
interface AskState {
|
|
4
|
+
enable: boolean;
|
|
5
|
+
handler?: AskHandler;
|
|
6
|
+
status: 'idle' | 'loading' | 'stalled' | 'error';
|
|
7
|
+
query: string;
|
|
8
|
+
part?: string;
|
|
9
|
+
answer: string;
|
|
10
|
+
}
|
|
11
|
+
declare class Ask extends Model<AskState> {
|
|
12
|
+
initialState: AskState;
|
|
13
|
+
fetch(query: string): AsyncGenerator<import("redux").AnyAction, void, unknown>;
|
|
14
|
+
setPart(part?: string): Generator<import("redux").AnyAction, void, unknown>;
|
|
15
|
+
setHandler(handler?: AskHandler): Generator<import("redux").AnyAction, void, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export declare const ask: Ask;
|
|
18
|
+
export {};
|
package/types/models/book.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Book as BookType, Model } from '@topwrite/common';
|
|
2
|
-
declare class Book extends Model<BookType> {
|
|
3
|
-
}
|
|
4
|
-
export declare const book: Book;
|
|
5
|
-
export {};
|
|
1
|
+
import { Book as BookType, Model } from '@topwrite/common';
|
|
2
|
+
declare class Book extends Model<BookType> {
|
|
3
|
+
}
|
|
4
|
+
export declare const book: Book;
|
|
5
|
+
export {};
|
package/types/models/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { book } from './book';
|
|
2
|
-
export { page } from './page';
|
|
3
|
-
export { search } from './search';
|
|
4
|
-
export { ask } from './ask';
|
|
1
|
+
export { book } from './book';
|
|
2
|
+
export { page } from './page';
|
|
3
|
+
export { search } from './search';
|
|
4
|
+
export { ask } from './ask';
|
package/types/models/page.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ActionsType, File, Model, RequestConfig, RequestInstance } from '@topwrite/common';
|
|
2
|
-
interface PageState {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
error?: Error;
|
|
5
|
-
request: RequestInstance;
|
|
6
|
-
config: RequestConfig;
|
|
7
|
-
file: File;
|
|
8
|
-
lfs?: {
|
|
9
|
-
url: string;
|
|
10
|
-
files: {
|
|
11
|
-
[index: string]: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
type Interceptors = RequestInstance['interceptors'];
|
|
16
|
-
declare class Page extends Model<PageState> {
|
|
17
|
-
initialState: {
|
|
18
|
-
loading: boolean;
|
|
19
|
-
request: import("axios").AxiosInstance;
|
|
20
|
-
config: {};
|
|
21
|
-
};
|
|
22
|
-
subscription({ fetch }: ActionsType<Page>): void;
|
|
23
|
-
fetch(pathname: string): AsyncGenerator<import("redux").AnyAction, void, unknown>;
|
|
24
|
-
intercept(handler: (interceptors: Interceptors) => void): Generator<import("redux").AnyAction, void, unknown>;
|
|
25
|
-
updateConfig(updater: (config: RequestConfig) => void): Generator<import("redux").AnyAction, void, unknown>;
|
|
26
|
-
}
|
|
27
|
-
export declare const page: Page;
|
|
28
|
-
export {};
|
|
1
|
+
import { ActionsType, File, Model, RequestConfig, RequestInstance } from '@topwrite/common';
|
|
2
|
+
interface PageState {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error?: Error;
|
|
5
|
+
request: RequestInstance;
|
|
6
|
+
config: RequestConfig;
|
|
7
|
+
file: File;
|
|
8
|
+
lfs?: {
|
|
9
|
+
url: string;
|
|
10
|
+
files: {
|
|
11
|
+
[index: string]: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
type Interceptors = RequestInstance['interceptors'];
|
|
16
|
+
declare class Page extends Model<PageState> {
|
|
17
|
+
initialState: {
|
|
18
|
+
loading: boolean;
|
|
19
|
+
request: import("axios").AxiosInstance;
|
|
20
|
+
config: {};
|
|
21
|
+
};
|
|
22
|
+
subscription({ fetch }: ActionsType<Page>): void;
|
|
23
|
+
fetch(pathname: string): AsyncGenerator<import("redux").AnyAction, void, unknown>;
|
|
24
|
+
intercept(handler: (interceptors: Interceptors) => void): Generator<import("redux").AnyAction, void, unknown>;
|
|
25
|
+
updateConfig(updater: (config: RequestConfig) => void): Generator<import("redux").AnyAction, void, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export declare const page: Page;
|
|
28
|
+
export {};
|
package/types/models/search.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Model } from '@topwrite/common';
|
|
2
|
-
export interface SearchResult {
|
|
3
|
-
title: string;
|
|
4
|
-
path: string;
|
|
5
|
-
body?: string;
|
|
6
|
-
}
|
|
7
|
-
export type SearchHandler = (keyword: string, part?: string) => Promise<SearchResult[]> | SearchResult[];
|
|
8
|
-
interface SearchState {
|
|
9
|
-
handler?: SearchHandler;
|
|
10
|
-
results: SearchResult[];
|
|
11
|
-
part?: string;
|
|
12
|
-
query: string;
|
|
13
|
-
status: 'loading' | 'error' | 'idle';
|
|
14
|
-
}
|
|
15
|
-
declare class Search extends Model<SearchState> {
|
|
16
|
-
initialState: SearchState;
|
|
17
|
-
fetch(query: string): AsyncGenerator<import("redux").AnyAction, void, unknown>;
|
|
18
|
-
setPart(part?: string): Generator<import("redux").AnyAction, void, unknown>;
|
|
19
|
-
setHandler(handler?: SearchHandler): Generator<import("redux").AnyAction, void, unknown>;
|
|
20
|
-
}
|
|
21
|
-
export declare const search: Search;
|
|
22
|
-
export {};
|
|
1
|
+
import { Model } from '@topwrite/common';
|
|
2
|
+
export interface SearchResult {
|
|
3
|
+
title: string;
|
|
4
|
+
path: string;
|
|
5
|
+
body?: string;
|
|
6
|
+
}
|
|
7
|
+
export type SearchHandler = (keyword: string, part?: string) => Promise<SearchResult[]> | SearchResult[];
|
|
8
|
+
interface SearchState {
|
|
9
|
+
handler?: SearchHandler;
|
|
10
|
+
results: SearchResult[];
|
|
11
|
+
part?: string;
|
|
12
|
+
query: string;
|
|
13
|
+
status: 'loading' | 'error' | 'idle';
|
|
14
|
+
}
|
|
15
|
+
declare class Search extends Model<SearchState> {
|
|
16
|
+
initialState: SearchState;
|
|
17
|
+
fetch(query: string): AsyncGenerator<import("redux").AnyAction, void, unknown>;
|
|
18
|
+
setPart(part?: string): Generator<import("redux").AnyAction, void, unknown>;
|
|
19
|
+
setHandler(handler?: SearchHandler): Generator<import("redux").AnyAction, void, unknown>;
|
|
20
|
+
}
|
|
21
|
+
export declare const search: Search;
|
|
22
|
+
export {};
|
package/types/typings.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Actions, AnyAction, ComponentDescriptorType, States } from '@topwrite/common';
|
|
2
|
-
import * as models from './models';
|
|
3
|
-
import { ComponentProps } from 'react';
|
|
4
|
-
import Markdown from './components/markdown';
|
|
5
|
-
import { MenuItemProps, MenuProps } from './components/menu';
|
|
6
|
-
import Color from 'color';
|
|
7
|
-
type Models = typeof models;
|
|
8
|
-
declare module '@topwrite/common' {
|
|
9
|
-
function useSelector<T extends keyof Models>(model: T): States<T, Models>[T];
|
|
10
|
-
function useActions<T extends keyof Models>(model: T): Actions<T, Models>[T];
|
|
11
|
-
function useModel<T extends keyof Models>(model: T): [States<T, Models>[T], Actions<T, Models>[T]];
|
|
12
|
-
interface Model {
|
|
13
|
-
getState<T extends keyof Models>(model: T): Generator<AnyAction, States<T, Models>[T]>;
|
|
14
|
-
}
|
|
15
|
-
interface OptionsStateType {
|
|
16
|
-
preview: boolean;
|
|
17
|
-
poweredBy: false | {
|
|
18
|
-
name: string;
|
|
19
|
-
link: string;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
interface ComponentsMap {
|
|
23
|
-
'page': ComponentDescriptorType;
|
|
24
|
-
'page:menu': ComponentDescriptorType<MenuProps>;
|
|
25
|
-
'page:menu:item': ComponentDescriptorType<MenuItemProps>;
|
|
26
|
-
'page:article:before': ComponentDescriptorType;
|
|
27
|
-
'page:article:after': ComponentDescriptorType;
|
|
28
|
-
'page:article:aside:before': ComponentDescriptorType;
|
|
29
|
-
'page:article:aside:after': ComponentDescriptorType;
|
|
30
|
-
'page:article:markdown': ComponentDescriptorType<ComponentProps<typeof Markdown>>;
|
|
31
|
-
'page:asset': ComponentDescriptorType;
|
|
32
|
-
}
|
|
33
|
-
interface OptionsStateType {
|
|
34
|
-
}
|
|
35
|
-
interface ThemeType {
|
|
36
|
-
primaryColor: Color;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
1
|
+
import { Actions, AnyAction, ComponentDescriptorType, States } from '@topwrite/common';
|
|
2
|
+
import * as models from './models';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
import Markdown from './components/markdown';
|
|
5
|
+
import { MenuItemProps, MenuProps } from './components/menu';
|
|
6
|
+
import Color from 'color';
|
|
7
|
+
type Models = typeof models;
|
|
8
|
+
declare module '@topwrite/common' {
|
|
9
|
+
function useSelector<T extends keyof Models>(model: T): States<T, Models>[T];
|
|
10
|
+
function useActions<T extends keyof Models>(model: T): Actions<T, Models>[T];
|
|
11
|
+
function useModel<T extends keyof Models>(model: T): [States<T, Models>[T], Actions<T, Models>[T]];
|
|
12
|
+
interface Model {
|
|
13
|
+
getState<T extends keyof Models>(model: T): Generator<AnyAction, States<T, Models>[T]>;
|
|
14
|
+
}
|
|
15
|
+
interface OptionsStateType {
|
|
16
|
+
preview: boolean;
|
|
17
|
+
poweredBy: false | {
|
|
18
|
+
name: string;
|
|
19
|
+
link: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface ComponentsMap {
|
|
23
|
+
'page': ComponentDescriptorType;
|
|
24
|
+
'page:menu': ComponentDescriptorType<MenuProps>;
|
|
25
|
+
'page:menu:item': ComponentDescriptorType<MenuItemProps>;
|
|
26
|
+
'page:article:before': ComponentDescriptorType;
|
|
27
|
+
'page:article:after': ComponentDescriptorType;
|
|
28
|
+
'page:article:aside:before': ComponentDescriptorType;
|
|
29
|
+
'page:article:aside:after': ComponentDescriptorType;
|
|
30
|
+
'page:article:markdown': ComponentDescriptorType<ComponentProps<typeof Markdown>>;
|
|
31
|
+
'page:asset': ComponentDescriptorType;
|
|
32
|
+
}
|
|
33
|
+
interface OptionsStateType {
|
|
34
|
+
}
|
|
35
|
+
interface ThemeType {
|
|
36
|
+
primaryColor: Color;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export {};
|
package/dist/267-b06d72.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_topwrite_reader=self.webpackChunk_topwrite_reader||[]).push([[267],{3267:e=>{e.exports=JSON.parse('{"2QzYmY":"取消","47GdDb":"关闭","4R5GEq":"首页","51pt/B":"未命名分组","FDRhoz":"发送","IHXx7d":"本文档使用 {link} 构建","OyX2KZ":"问一个问题...","U3+qBB":"搜索文档...","Z+slnL":"没有结果:","fTNnxP":"回到顶部","inUHj3":"选中","k+fk3r":"导航","lLNl8o":"智问","lXhmij":"没有最近搜索","n24ytq":"未命名文档","xUjLTE":"搜索","zg86wv":"我是一个智能AI助理,你可以向我提问关于本文档的任何问题"}')}}]);
|
package/dist/387-02d8b5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_topwrite_reader=self.webpackChunk_topwrite_reader||[]).push([[387],{387:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e){return e&&e.__esModule?e:{default:e}}var i=n(2),a=o(i),u=o(n(3)),c=o(n(12)),l=o(n(17)),s=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,i);if(void 0!==u){if("value"in u)return u.value;var c=u.get;if(void 0===c)return;return c.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,u=l=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments),this.state={size:0,disappearDelayHide:!1,percent:0,appearDelayWidth:0}}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.show;e.change&&(t?this.show():this.hide())}},{key:"shouldComponentUpdate",value:function(e,t){return e.change||!(0,c.default)(t,this.state)}},{key:"show",value:function(){var e=this,t=this.state,n=t.size,r=t.percent,o=0===n;r=this.calculatePercent(r),this.setState({size:++n,appearDelayWidth:o,percent:r}),o&&setTimeout((function(){e.setState({appearDelayWidth:!1})}))}},{key:"hide",value:function(){var e=this,t=this.state.size;--t<0?this.setState({size:0}):(this.setState({size:0,disappearDelayHide:!0,percent:1}),setTimeout((function(){e.setState({disappearDelayHide:!1,percent:0})}),500))}},{key:"getBarStyle",value:function(){var e=this.state,t=e.disappearDelayHide,n=e.appearDelayWidth,r=e.percent;return{background:this.props.color,width:n?0:100*r+"%",display:t||r>0?"block":"none"}}},{key:"getSpinnerStyle",value:function(){return{display:this.state.size>0?"block":"none",borderColor:this.props.color}}},{key:"calculatePercent",value:function(e){return e=e||0,e+=e>=0&&e<.25?(3*Math.random()+10)/100:e>=.25&&e<.65?3*Math.random()/100:e>=.65&&e<.9?2*Math.random()/100:e>=.9&&e<.99?.005:0}},{key:"render",value:function(){return a.default.createElement("div",null,a.default.createElement("div",{className:l.default.loading},a.default.createElement("div",{className:l.default.bar,style:this.getBarStyle()},a.default.createElement("div",{className:l.default.peg}))),this.props.showSpinner&&a.default.createElement("div",{className:l.default.spinner},a.default.createElement("div",{className:l.default.icon,style:this.getSpinnerStyle()})))}}],[{key:"propTypes",value:{change:u.default.bool,color:u.default.string.isRequired,show:u.default.bool,showSpinner:u.default.bool},enumerable:!0},{key:"defaultProps",value:{change:!0,showSpinner:!0},enumerable:!0}]),t}(i.Component);t.default=s,e.exports=t.default},function(t,n){t.exports=e},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(5)((function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}),!0)}else e.exports=n(11)()}).call(t,n(4))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],s=!1,f=-1;function p(){s&&c&&(s=!1,c.length?l=c.concat(l):f=-1,l.length&&d())}function d(){if(!s){var e=u(p);s=!0;for(var t=l.length;t;){for(c=l,l=[];++f<t;)c&&c[f].run();f=-1,t=l.length}c=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new y(e,t)),1!==l.length||s||u(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(t){"use strict";var r=n(6),o=n(7),i=n(8),a=n(9),u=n(10);e.exports=function(e,n){var c="function"==typeof Symbol&&Symbol.iterator,l="@@iterator",s="<<anonymous>>",f={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:y(r.thatReturnsNull),arrayOf:function(e){return y((function(t,n,r,o,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u))return new d("Invalid "+o+" `"+i+"` of type `"+b(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var l=e(u,c,r,o,i+"["+c+"]",a);if(l instanceof Error)return l}return null}))},element:y((function(t,n,r,o,i){var a=t[n];return e(a)?null:new d("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement.")})),instanceOf:function(e){return y((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||s;return new d("Invalid "+o+" `"+i+"` of type `"+((u=t[n]).constructor&&u.constructor.name?u.constructor.name:s)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var u;return null}))},node:y((function(e,t,n,r,o){return h(e[t])?null:new d("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return y((function(t,n,r,o,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],c=b(u);if("object"!==c)return new d("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var l in u)if(u.hasOwnProperty(l)){var s=e(u,l,r,o,i+"."+l,a);if(s instanceof Error)return s}return null}))},oneOf:function(e){return Array.isArray(e)?y((function(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(p(a,e[u]))return null;return new d("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")})):("production"!==t.env.NODE_ENV&&i(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",g(o),n),r.thatReturnsNull}return y((function(t,n,r,o,i){for(var u=0;u<e.length;u++)if(null==(0,e[u])(t,n,r,o,i,a))return null;return new d("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return y((function(t,n,r,o,i){var u=t[n],c=b(u);if("object"!==c)return new d("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var s=e[l];if(s){var f=s(u,l,r,o,i+"."+l,a);if(f)return f}}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){this.message=e,this.stack=""}function y(e){if("production"!==t.env.NODE_ENV)var r={},u=0;function c(c,l,f,p,y,v,h){if(p=p||s,v=v||f,h!==a)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var b=p+":"+f;!r[b]&&u<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",v,p),r[b]=!0,u++)}return null==l[f]?c?null===l[f]?new d("The "+y+" `"+v+"` is marked as required in `"+p+"`, but its value is `null`."):new d("The "+y+" `"+v+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(l,f,p,y,v)}var l=c.bind(null,!1);return l.isRequired=c.bind(null,!0),l}function v(e){return y((function(t,n,r,o,i,a){var u=t[n];return b(u)!==e?new d("Invalid "+o+" `"+i+"` of type `"+m(u)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function h(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(h);if(null===t||e(t))return!0;var n=function(e){var t=e&&(c&&e[c]||e[l]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!h(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!h(i[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function m(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return d.prototype=Error.prototype,f.checkPropTypes=u,f.PropTypes=f,f}}).call(t,n(4))},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";var n=function(e){};"production"!==t.env.NODE_ENV&&(n=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=function(e,t,r,o,i,a,u,c){if(n(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,o,i,a,u,c],f=0;(l=new Error(t.replace(/%s/g,(function(){return s[f++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}}).call(t,n(4))},function(e,t,n){(function(t){"use strict";var r=n(6);if("production"!==t.env.NODE_ENV){var o=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return n[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};r=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];o.apply(void 0,[t].concat(r))}}}e.exports=r}).call(t,n(4))},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(function(t){"use strict";if("production"!==t.env.NODE_ENV)var r=n(7),o=n(8),i=n(9),a={};e.exports=function(e,n,u,c,l){if("production"!==t.env.NODE_ENV)for(var s in e)if(e.hasOwnProperty(s)){var f;try{r("function"==typeof e[s],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",c||"React class",u,s),f=e[s](n,s,c,u,null,i)}catch(e){f=e}if(o(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",u,s,typeof f),f instanceof Error&&!(f.message in a)){a[f.message]=!0;var p=l?l():"";o(!1,"Failed %s type: %s%s",u,f.message,null!=p?p:"")}}}}).call(t,n(4))},function(e,t,n){"use strict";var r=n(6),o=n(7),i=n(9);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e,t,n,o){var i=n?n.call(o,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var a=r(e),u=r(t),c=a.length;if(c!==u.length)return!1;o=o||null;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s<c;s++){var f=a[s];if(!l(f))return!1;var p=e[f],d=t[f],y=n?n.call(o,p,d,f):void 0;if(!1===y||void 0===y&&p!==d)return!1}return!0}},function(e,t,n){var r,o=n(14),i=n(15),a=n(16),u=/^\d+$/,c=Object.prototype.hasOwnProperty,l=o(Object,"keys"),s=9007199254740991,f=(r="length",function(e){return null==e?void 0:e[r]});function p(e,t){return e="number"==typeof e||u.test(e)?+e:-1,t=null==t?s:t,e>-1&&e%1==0&&e<t}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function y(e){for(var t=function(e){if(null==e)return[];v(e)||(e=Object(e));var t=e.length;t=t&&d(t)&&(a(e)||i(e))&&t||0;for(var n=e.constructor,r=-1,o="function"==typeof n&&n.prototype===e,u=Array(t),l=t>0;++r<t;)u[r]=r+"";for(var s in e)l&&p(s,t)||"constructor"==s&&(o||!c.call(e,s))||u.push(s);return u}(e),n=t.length,r=n&&e.length,o=!!r&&d(r)&&(a(e)||i(e)),u=-1,l=[];++u<n;){var s=t[u];(o&&p(s,r)||c.call(e,s))&&l.push(s)}return l}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var h=l?function(e){var t,n=null==e?void 0:e.constructor;return"function"==typeof n&&n.prototype===e||"function"!=typeof e&&null!=(t=e)&&d(f(t))?y(e):v(e)?l(e):[]}:y;e.exports=h},function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/,o=Object.prototype,i=Function.prototype.toString,a=o.hasOwnProperty,u=o.toString,c=RegExp("^"+i.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e,t){var o=null==e?void 0:e[t];return function(e){return null!=e&&(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&u.call(e)==n}(e)?c.test(i.call(e)):function(e){return!!e&&"object"==typeof e}(e)&&r.test(e))}(o)?o:void 0}},function(e,t){var n=9007199254740991,r="[object Function]",o="[object GeneratorFunction]",i=Object.prototype,a=i.hasOwnProperty,u=i.toString,c=i.propertyIsEnumerable;e.exports=function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?u.call(e):"";return t==r||t==o}(e)}(e)}(e)&&a.call(e,"callee")&&(!c.call(e,"callee")||"[object Arguments]"==u.call(e))}},function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;function o(e){return!!e&&"object"==typeof e}var i,a,u,c=Object.prototype,l=Function.prototype.toString,s=c.hasOwnProperty,f=c.toString,p=RegExp("^"+l.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d=(a="isArray",function(e){return null!=e&&(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&f.call(e)==n}(e)?p.test(l.call(e)):o(e)&&r.test(e))}(u=null==(i=Array)?void 0:i[a])?u:void 0),y=d||function(e){return o(e)&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&"[object Array]"==f.call(e)};e.exports=y},function(e,t){e.exports={loading:"Loading__loading___1m_fZ",bar:"Loading__bar___21yOt",peg:"Loading__peg___3Y_28",spinner:"Loading__spinner___11Pm4",icon:"Loading__icon___3OOyu","loading-bar-spinner":"Loading__loading-bar-spinner___1hKY9"}}])},e.exports=r(n(7363))}}]);
|
|
2
|
-
//# sourceMappingURL=387-02d8b5.js.map
|