@diplodoc/client 0.0.3 → 0.0.4

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.
@@ -0,0 +1,18 @@
1
+ import { ReactElement } from 'react';
2
+ import { DocLeadingPageData, DocPageData, Lang, Router } from '@doc-tools/components';
3
+ import '../../interceptors/leading-page-links';
4
+ import '@diplodoc/openapi-extension/runtime/styles';
5
+ import '@doc-tools/components/styles/themes.scss';
6
+ import '@doc-tools/components/styles/default.scss';
7
+ import '@doc-tools/components/styles/typography.scss';
8
+ import '@doc-tools/transform/dist/css/yfm.css';
9
+ import './App.scss';
10
+ export interface DocProps {
11
+ data: DocLeadingPageData | DocPageData;
12
+ }
13
+ export interface AppProps {
14
+ lang: Lang;
15
+ router: Router;
16
+ }
17
+ export type DocInnerProps = DocProps & AppProps;
18
+ export declare function App(props: DocInnerProps): ReactElement;
@@ -0,0 +1,3 @@
1
+ import { DocInnerProps } from './components/App/App';
2
+ declare let render: (props: DocInnerProps) => string;
3
+ export { render };
File without changes
@@ -0,0 +1,13 @@
1
+ import { TextSizes, Theme } from '@doc-tools/components';
2
+ export declare function getDocSettings(): {
3
+ theme: Theme;
4
+ textSize: TextSizes;
5
+ showMiniToc: boolean;
6
+ wideFormat: boolean;
7
+ fullScreen: boolean;
8
+ };
9
+ export declare function getSetting(name: string): string | null;
10
+ export declare function saveSetting<T>(name: string, value: T): void;
11
+ export declare function strToBoolean(str: string | boolean): boolean;
12
+ export declare function withSavingSetting<T>(settingName: string, onChange: (value: T) => void): (value: T) => void;
13
+ export declare function updateRootClassName(theme: Theme, isMobile?: boolean): void;
package/package.json CHANGED
@@ -1,30 +1,29 @@
1
1
  {
2
2
  "name": "@diplodoc/client",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "build": "webpack",
8
- "prepublish": "npm run build"
7
+ "build": "webpack && tsc --emitDeclarationOnly --outDir build",
8
+ "prepublishOnly": "rm -rf build && npm ci && npm run build"
9
9
  },
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "exports": {
13
13
  ".": {
14
14
  "node": "./build/app.server.js",
15
+ "types": "./build/index.d.ts",
15
16
  "default": "./build/app.client.js"
16
17
  }
17
18
  },
18
- "peerDependencies": {
19
- "react": ">=16",
20
- "react-dom": ">=16"
21
- },
22
19
  "dependencies": {
23
- "@diplodoc/mermaid-extension": "0.0.4",
20
+ "@diplodoc/mermaid-extension": "^0.0.5",
24
21
  "@diplodoc/openapi-extension": "^1.2.3",
25
22
  "@doc-tools/components": "^2.8.0",
26
23
  "@doc-tools/transform": "^3.0.2",
27
24
  "@gravity-ui/uikit": "^4.14.0",
25
+ "react": "^18.2.0",
26
+ "react-dom": "^18.2.0",
28
27
  "url": "^0.11.0"
29
28
  },
30
29
  "devDependencies": {
@@ -51,8 +50,6 @@
51
50
  "lint-staged": "^13.2.2",
52
51
  "mini-css-extract-plugin": "^2.7.6",
53
52
  "prop-types": "^15.8.1",
54
- "react": "^18.2.0",
55
- "react-dom": "^18.2.0",
56
53
  "react-svg-loader": "^3.0.3",
57
54
  "sass": "^1.62.1",
58
55
  "sass-loader": "^13.3.1",
@@ -65,7 +62,7 @@
65
62
  "overrides": {
66
63
  "@doc-tools/components": "^2.8.0",
67
64
  "@doc-tools/transform": "^3.0.2",
68
- "react": ">=16",
69
- "react-dom": ">=16"
65
+ "react": "^18.2.0",
66
+ "react-dom": "^18.2.0"
70
67
  }
71
68
  }