@diplodoc/client 0.0.1 → 0.0.2

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": "@diplodoc/client",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,31 +13,19 @@
13
13
  ".": {
14
14
  "node": "./build/app.server.js",
15
15
  "default": "./build/app.client.js"
16
- },
17
- "./includer": {
18
- "node": "./includer/index.js"
19
- },
20
- "./runtime": {
21
- "production": "./runtime/index.min.js",
22
- "development": "./runtime/index.js",
23
- "default": "./runtime/index.min.js"
24
- },
25
- "./runtime/styles": {
26
- "production": "./runtime/index.min.css",
27
- "development": "./runtime/index.css",
28
- "default": "./runtime/index.min.css"
29
16
  }
30
17
  },
18
+ "peerDependencies": {
19
+ "react": ">=16",
20
+ "react-dom": ">=16"
21
+ },
31
22
  "dependencies": {
32
23
  "@diplodoc/mermaid-extension": "0.0.4",
33
- "@diplodoc/openapi-extension": "^1.0.19",
24
+ "@diplodoc/openapi-extension": "^1.2.3",
34
25
  "@doc-tools/components": "^2.8.0",
35
26
  "@doc-tools/transform": "^3.0.2",
36
27
  "@gravity-ui/uikit": "^4.14.0",
37
- "react": "^18.2.0",
38
- "react-dom": "^18.2.0",
39
- "url": "^0.11.0",
40
- "webpack-bundle-analyzer": "^4.8.0"
28
+ "url": "^0.11.0"
41
29
  },
42
30
  "devDependencies": {
43
31
  "@babel/core": "^7.22.1",
@@ -62,13 +50,22 @@
62
50
  "husky": "^8.0.3",
63
51
  "lint-staged": "^13.2.2",
64
52
  "mini-css-extract-plugin": "^2.7.6",
65
- "node-sass": "^9.0.0",
66
53
  "prop-types": "^15.8.1",
54
+ "react": "^18.2.0",
55
+ "react-dom": "^18.2.0",
67
56
  "react-svg-loader": "^3.0.3",
57
+ "sass": "^1.62.1",
68
58
  "sass-loader": "^13.3.1",
69
59
  "style-loader": "^3.3.3",
70
60
  "typescript": "^5.0.4",
71
61
  "webpack": "^5.84.1",
62
+ "webpack-bundle-analyzer": "^4.9.0",
72
63
  "webpack-cli": "^5.1.1"
64
+ },
65
+ "overrides": {
66
+ "@doc-tools/components": "^2.8.0",
67
+ "@doc-tools/transform": "^3.0.2",
68
+ "react": "^18.2.0",
69
+ "react-dom": "^18.2.0"
73
70
  }
74
71
  }
package/tsconfig.json DELETED
@@ -1,36 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "esnext",
4
- "esModuleInterop": true,
5
- "pretty": true,
6
- "newLine": "lf",
7
- "stripInternal": true,
8
- "strict": true,
9
- "noImplicitReturns": true,
10
- "noUnusedLocals": true,
11
- "noUnusedParameters": true,
12
- "noFallthroughCasesInSwitch": true,
13
- "noEmitOnError": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "skipLibCheck": true,
16
- "experimentalDecorators": true,
17
- "allowJs": true,
18
- "target": "es2020",
19
- "moduleResolution": "node",
20
- "declaration": false,
21
- "outDir": "build",
22
- "jsx": "react",
23
- "baseUrl": ".",
24
- "paths": {
25
- "*": ["./src/app/*"]
26
- }
27
- },
28
- "include": ["src"],
29
- "exclude": ["node_modules"],
30
- "types": ["node"],
31
- "ts-node": {
32
- "compilerOptions": {
33
- "module": "CommonJS"
34
- }
35
- }
36
- }
package/webpack.config.js DELETED
@@ -1,91 +0,0 @@
1
- const {resolve} = require('path');
2
- const {DefinePlugin} = require('webpack');
3
- // const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');
4
-
5
- function config({isServer}) {
6
- return {
7
- mode: 'development',
8
- target: isServer ? 'node' : 'web',
9
- devtool: 'inline-source-map',
10
- entry: './src/index.tsx',
11
- externals: isServer ? {
12
- 'react': 'react',
13
- 'react-dom': 'react-dom',
14
- } : {},
15
- output: {
16
- path: resolve(__dirname, 'build'),
17
- filename: isServer ? 'app.server.js' : 'app.client.js',
18
- libraryTarget: 'commonjs2'
19
- },
20
- resolve: {
21
- alias: isServer ? {} : {
22
- react: require.resolve('react'),
23
- },
24
- extensions: ['.tsx', '.ts', '.js', '.scss'],
25
- },
26
- plugins: [
27
- new DefinePlugin({
28
- 'process.env': {
29
- BROWSER: !isServer
30
- }
31
- }),
32
- // new BundleAnalyzerPlugin({
33
- // analyzerMode: 'static',
34
- // openAnalyzer: false,
35
- // reportFilename: (isServer ? 'server-' : 'client-') + 'stats.html',
36
- // })
37
- ],
38
- module: {
39
- rules: [
40
- {
41
- test: /\.[tj]sx?$/,
42
- use: ['babel-loader'],
43
- include: [
44
- resolve(__dirname, 'src'),
45
- require.resolve('@diplodoc/mermaid-extension'),
46
- ],
47
- }, {
48
- test: /\.s?css$/,
49
- use: [
50
- {
51
- loader: 'style-loader',
52
- options: {
53
- insert: function insertBeforeAt(element) {
54
- /* eslint-env browser */
55
- const parent = document.querySelector('head');
56
- const target = document.querySelector('#custom-style');
57
-
58
- const lastInsertedElement =
59
- window._lastElementInsertedByStyleLoader;
60
-
61
- if (!lastInsertedElement) {
62
- parent.insertBefore(element, target);
63
- } else if (lastInsertedElement.nextSibling) {
64
- parent.insertBefore(
65
- element,
66
- lastInsertedElement.nextSibling,
67
- );
68
- } else {
69
- parent.appendChild(element);
70
- }
71
-
72
- window._lastElementInsertedByStyleLoader = element;
73
- },
74
- },
75
- },
76
- {loader: 'css-loader'},
77
- {loader: 'sass-loader'},
78
- ],
79
- }, {
80
- test: /\.svg$/,
81
- loader: 'react-svg-loader',
82
- },
83
- ],
84
- },
85
- };
86
- }
87
-
88
- module.exports = [
89
- config({ isServer: false }),
90
- config({ isServer: true }),
91
- ];