@topwrite/reader 1.0.22-alpha.6 → 1.0.22-alpha.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topwrite/reader",
3
- "version": "1.0.22-alpha.6+e00dc61",
3
+ "version": "1.0.22-alpha.7+c4452be",
4
4
  "author": "yunwuxin <tzzhangyajun@qq.com> (https://github.com/yunwuxin)",
5
5
  "license": "ISC",
6
6
  "types": "types/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "prepack": "yarn run build"
19
19
  },
20
20
  "dependencies": {
21
- "@topwrite/common": "^1.0.20-alpha.6+e00dc61",
21
+ "@topwrite/common": "^1.0.20-alpha.7+c4452be",
22
22
  "@types/lodash": "^4.14.168",
23
23
  "@types/node": "^16.4.13",
24
24
  "@types/react": "^17.0.4",
@@ -53,5 +53,5 @@
53
53
  "optional": true
54
54
  }
55
55
  },
56
- "gitHead": "e00dc612d10aec185bba082a95615435acd6ac4e"
56
+ "gitHead": "c4452be49b282a8696a49f5d491a9cfa6963ac62"
57
57
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface Props {
3
2
  element: 't-attachment' | 'img' | 'video' | 'audio';
4
3
  src?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface LogoProps {
3
2
  className?: string;
4
3
  size?: number;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
- export default function Main(): JSX.Element;
1
+ export default function Main(): JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function Page(): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface PoweredByProps {
3
2
  className?: string;
4
3
  }
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export default function ToFirstArticle({ children }: PropsWithChildren<any>): any;
package/types/index.d.ts CHANGED
@@ -16,5 +16,6 @@ export { default as Article } from './components/article';
16
16
  export { default as Catalog } from './components/catalog';
17
17
  export type { CatalogProps } from './components/catalog';
18
18
  export { default as Markdown } from './components/markdown';
19
+ export { default as ToFirstArticle } from './components/to-first-article';
19
20
  export { Helmet } from 'react-helmet-async';
20
21
  export type { SearchHandler, SearchResult } from './models/search';
@@ -4,7 +4,7 @@ interface PageState {
4
4
  error?: Error;
5
5
  request: RequestInstance;
6
6
  config: RequestConfig;
7
- file: File;
7
+ file?: File;
8
8
  lfs?: {
9
9
  url: string;
10
10
  files: {
@@ -19,7 +19,7 @@ declare class Page extends Model<PageState> {
19
19
  request: import("axios").AxiosInstance;
20
20
  config: {};
21
21
  };
22
- subscription({ fetch }: ActionsType<Page>): void;
22
+ subscription({ fetch }: ActionsType<Page>, state: any): void;
23
23
  fetch(pathname: string): AsyncGenerator<import("redux").AnyAction, void, unknown>;
24
24
  intercept(handler: (interceptors: Interceptors) => void): Generator<import("redux").AnyAction, void, unknown>;
25
25
  updateConfig(updater: (config: RequestConfig) => void): Generator<import("redux").AnyAction, void, unknown>;