@topwrite/reader 1.0.32-alpha.1 → 1.0.33-alpha.1

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.32-alpha.1+ec6d314",
3
+ "version": "1.0.33-alpha.1+8b627da",
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.29-alpha.1+ec6d314",
21
+ "@topwrite/common": "^1.0.30-alpha.1+8b627da",
22
22
  "@types/lodash": "^4.14.168",
23
23
  "@types/node": "^16.4.13",
24
24
  "@types/react": "^17.0.4",
@@ -34,6 +34,7 @@
34
34
  "path-browserify": "^1.0.1",
35
35
  "process": "^0.11.10",
36
36
  "query-string": "^7.1.1",
37
+ "rc-tooltip": "^5.1.1",
37
38
  "rimraf": "^3.0.2",
38
39
  "stream-browserify": "^3.0.0",
39
40
  "typescript": "^4.3.5",
@@ -52,5 +53,5 @@
52
53
  "optional": true
53
54
  }
54
55
  },
55
- "gitHead": "ec6d314f6dd90b2cd60b88b8258b99774a934b15"
56
+ "gitHead": "8b627da233ebf2eac043bb87de8fab2282b54bf6"
56
57
  }
@@ -1,8 +1,8 @@
1
1
  import Markdown from './markdown';
2
- import { ComponentProps, ElementType } from 'react';
3
- interface ArticleProps extends Omit<ComponentProps<typeof Markdown>, 'children'> {
2
+ import { ComponentProps } from 'react';
3
+ interface ArticleProps extends Omit<ComponentProps<typeof Markdown>, 'children' | 'as'> {
4
4
  className?: string;
5
- container?: ElementType;
5
+ menu?: boolean;
6
6
  }
7
- export default function Article({ className, header, footer, container, ...props }: ArticleProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
7
+ export default function Article({ className, header, footer, menu, ...props }: ArticleProps): JSX.Element;
8
8
  export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import 'rc-tooltip/assets/bootstrap.css';
3
+ interface MenuProps {
4
+ className?: string;
5
+ }
6
+ export default function Menu({ className }: MenuProps): JSX.Element;
7
+ export {};
@@ -2,5 +2,5 @@
2
2
  interface PoweredByProps {
3
3
  className?: string;
4
4
  }
5
- export default function PoweredBy({ className }: PoweredByProps): JSX.Element;
5
+ export default function PoweredBy({ className }: PoweredByProps): JSX.Element | null;
6
6
  export {};
@@ -1,4 +1 @@
1
- /// <reference types="react" />
2
- export declare const PreviewContext: import("react").Context<boolean>;
3
- export declare const PreviewProvider: import("react").Provider<boolean>;
4
1
  export default function useInPreview(): boolean;
@@ -0,0 +1,2 @@
1
+ export declare const useWindowScroll: (fps?: number) => number;
2
+ export default useWindowScroll;
@@ -10,6 +10,13 @@ declare module '@topwrite/common' {
10
10
  interface Model {
11
11
  getState<T extends keyof Models>(model: T): Generator<AnyAction, States<T, Models>[T]>;
12
12
  }
13
+ interface OptionsStateType {
14
+ preview: boolean;
15
+ poweredBy: false | {
16
+ name: string;
17
+ link: string;
18
+ };
19
+ }
13
20
  interface ComponentsMap {
14
21
  'page': ComponentDescriptorType;
15
22
  'page:article:before': ComponentDescriptorType;