@topwrite/reader 1.0.22-alpha.2 → 1.0.22-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.
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/types/components/asset.d.ts +10 -0
- package/types/components/html/attachment.d.ts +1 -1
- package/types/components/html/audio.d.ts +1 -1
- package/types/components/html/img.d.ts +1 -1
- package/types/components/html/video.d.ts +1 -1
- package/types/models/page.d.ts +6 -7
- package/types/typings.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topwrite/reader",
|
|
3
|
-
"version": "1.0.22-alpha.
|
|
3
|
+
"version": "1.0.22-alpha.3+3be1f30",
|
|
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.
|
|
21
|
+
"@topwrite/common": "^1.0.20-alpha.3+3be1f30",
|
|
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": "
|
|
56
|
+
"gitHead": "3be1f30450dc6e47d8ba20991a6fefc7f92d06c3"
|
|
57
57
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Element = 't-attachment' | 'img' | 'video' | 'audio';
|
|
3
|
+
interface Props {
|
|
4
|
+
element: Element;
|
|
5
|
+
src?: string;
|
|
6
|
+
}
|
|
7
|
+
export default function Asset({ element, src, ...props }: Props): import("react").ReactElement<{
|
|
8
|
+
src: string | undefined;
|
|
9
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AttachmentHTMLAttributes } from 'react';
|
|
2
|
-
export default function Attachment(
|
|
2
|
+
export default function Attachment(props: AttachmentHTMLAttributes<HTMLAttachmentElement>): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AudioHTMLAttributes } from 'react';
|
|
2
|
-
export default function Audio(
|
|
2
|
+
export default function Audio(props: AudioHTMLAttributes<HTMLAudioElement>): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ImgHTMLAttributes } from 'react';
|
|
2
|
-
export default function Img(
|
|
2
|
+
export default function Img(props: ImgHTMLAttributes<HTMLImageElement>): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { VideoHTMLAttributes } from 'react';
|
|
2
|
-
export default function Video(
|
|
2
|
+
export default function Video(props: VideoHTMLAttributes<HTMLVideoElement>): JSX.Element;
|
package/types/models/page.d.ts
CHANGED
|
@@ -2,26 +2,25 @@ import { ActionsType, Model, RequestConfig, RequestInstance } from '@topwrite/co
|
|
|
2
2
|
interface PageState {
|
|
3
3
|
loading: boolean;
|
|
4
4
|
error?: Error;
|
|
5
|
-
options: RequestConfig;
|
|
6
5
|
request: RequestInstance;
|
|
6
|
+
config: RequestConfig;
|
|
7
7
|
}
|
|
8
|
+
declare type Interceptors = RequestInstance['interceptors'];
|
|
8
9
|
declare class Page extends Model<PageState> {
|
|
9
10
|
initialState: {
|
|
10
11
|
loading: boolean;
|
|
11
|
-
options: {};
|
|
12
12
|
request: import("axios").AxiosInstance;
|
|
13
|
+
config: {};
|
|
13
14
|
};
|
|
14
15
|
subscription({ fetch }: ActionsType<Page>): void;
|
|
15
16
|
fetch(pathname: string): AsyncGenerator<import("redux").AnyAction | Generator<import("redux").AnyAction, PageState, unknown>, any, {
|
|
16
|
-
options: any;
|
|
17
17
|
request: any;
|
|
18
|
+
config: any;
|
|
18
19
|
}>;
|
|
19
|
-
intercept(
|
|
20
|
+
intercept(handler: (interceptors: Interceptors) => void): Generator<Generator<import("redux").AnyAction, PageState, unknown>, void, {
|
|
20
21
|
request: any;
|
|
21
22
|
}>;
|
|
22
|
-
|
|
23
|
-
options: any;
|
|
24
|
-
}>;
|
|
23
|
+
updateConfig(updater: (config: RequestConfig) => void): Generator<import("redux").AnyAction, void, unknown>;
|
|
25
24
|
}
|
|
26
25
|
export declare const page: Page;
|
|
27
26
|
export {};
|