@dr.pogodin/react-utils 1.26.0 → 1.26.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.
Files changed (29) hide show
  1. package/build/development/shared/components/ScalableRect/index.js +1 -1
  2. package/build/development/shared/components/ScalableRect/index.js.map +1 -1
  3. package/build/development/shared/components/Throbber/index.js.map +1 -1
  4. package/build/development/web.bundle.js +1 -1
  5. package/build/production/shared/components/ScalableRect/index.js +1 -1
  6. package/build/production/shared/components/ScalableRect/index.js.map +1 -1
  7. package/build/production/shared/components/Throbber/index.js.map +1 -1
  8. package/build/production/web.bundle.js +1 -1
  9. package/build/production/web.bundle.js.map +1 -1
  10. package/build/types-code/shared/components/Throbber/index.d.ts +1 -0
  11. package/config/babel/node-ssr.d.ts +17 -0
  12. package/config/babel/node-ssr.js +91 -0
  13. package/config/babel/webpack.d.ts +40 -0
  14. package/config/babel/webpack.js +107 -0
  15. package/config/webpack/app-base.d.ts +140 -0
  16. package/config/webpack/app-base.js +313 -0
  17. package/config/webpack/app-development.d.ts +13 -0
  18. package/config/webpack/app-development.js +69 -0
  19. package/config/webpack/app-production.d.ts +16 -0
  20. package/config/webpack/app-production.js +57 -0
  21. package/config/webpack/lib-base.d.ts +20 -0
  22. package/config/webpack/lib-base.js +154 -0
  23. package/config/webpack/lib-development.d.ts +5 -0
  24. package/config/webpack/lib-development.js +33 -0
  25. package/config/webpack/lib-production.d.ts +5 -0
  26. package/config/webpack/lib-production.js +40 -0
  27. package/package.json +3 -3
  28. package/src/shared/components/ScalableRect/index.tsx +1 -1
  29. package/src/shared/components/Throbber/index.tsx +1 -0
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // Development Webpack config for ReactJS libraries.
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const path_1 = __importDefault(require("path"));
8
+ const webpack_1 = __importDefault(require("webpack"));
9
+ const webpack_merge_1 = require("webpack-merge");
10
+ const lib_base_1 = __importDefault(require("./lib-base"));
11
+ function configFactory(ops) {
12
+ return (0, webpack_merge_1.merge)((0, lib_base_1.default)(Object.assign(Object.assign({}, ops), { babelEnv: 'development', cssLocalIdent: '[package]___[path][name]___[local]___[hash:base64:6]', mode: 'development', outputPath: path_1.default.resolve(__dirname, ops.context, 'build/development') })), {
13
+ plugins: [
14
+ new webpack_1.default.DefinePlugin({
15
+ // Dev. build of the library wraps modules inside eval() statements,
16
+ // hiding BUILD_INFO literals from the host code's Webpack build, thus
17
+ // leaving them undefined. As a work around, let's get it via global
18
+ // window object.
19
+ BUILD_INFO: 'window.__DEV_BUILD_INFO__',
20
+ 'process.env.BABEL_ENV': JSON.stringify('development'),
21
+ 'process.env.NODE_ENV': JSON.stringify('development'),
22
+ 'process.env.REACT_GLOBAL_STATE_DEBUG': JSON.stringify(true),
23
+ }),
24
+ ],
25
+ snapshot: {
26
+ // This enforces Webpack to watch for possible changes in node_modules
27
+ // dependencies, which is a great convenience in library-centric dev
28
+ // workflows.
29
+ managedPaths: [],
30
+ },
31
+ });
32
+ }
33
+ exports.default = configFactory;
@@ -0,0 +1,5 @@
1
+ import webpack from 'webpack';
2
+ import { type OptionsT as BaseOptionsT } from './lib-base';
3
+ type OptionsT = BaseOptionsT;
4
+ export default function configFactory(ops: OptionsT): webpack.Configuration;
5
+ export {};
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ // Production Webpack config for ReactJS libraries.
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const path_1 = __importDefault(require("path"));
8
+ const css_minimizer_webpack_plugin_1 = __importDefault(require("css-minimizer-webpack-plugin"));
9
+ const webpack_1 = __importDefault(require("webpack"));
10
+ const webpack_merge_1 = require("webpack-merge");
11
+ const lib_base_1 = __importDefault(require("./lib-base"));
12
+ function configFactory(ops) {
13
+ const baseConfig = (0, lib_base_1.default)(Object.assign(Object.assign({}, ops), { babelEnv: 'production', cssLocalIdent: '[hash:base64:6]', mode: 'production', outputPath: path_1.default.resolve(__dirname, ops.context, 'build/production') }));
14
+ return (0, webpack_merge_1.merge)(baseConfig, {
15
+ devtool: 'source-map',
16
+ optimization: {
17
+ minimizer: [
18
+ '...',
19
+ new css_minimizer_webpack_plugin_1.default({
20
+ minimizerOptions: {
21
+ preset: ['default', {
22
+ /* Due to the way our styles are organized, these dangerous
23
+ * optimizations can break our styles, thus they are disabled. */
24
+ discardUnused: false,
25
+ reduceIdents: false,
26
+ zindex: false,
27
+ }],
28
+ },
29
+ }),
30
+ ],
31
+ },
32
+ plugins: [
33
+ new webpack_1.default.DefinePlugin({
34
+ 'process.env.BABEL_ENV': JSON.stringify('production'),
35
+ 'process.env.NODE_ENV': JSON.stringify('production'),
36
+ }),
37
+ ],
38
+ });
39
+ }
40
+ exports.default = configFactory;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.26.0",
2
+ "version": "1.26.2",
3
3
  "bin": {
4
4
  "react-utils-build": "bin/build.js",
5
5
  "react-utils-setup": "bin/setup.js"
@@ -83,8 +83,8 @@
83
83
  "@types/supertest": "^2.0.15",
84
84
  "@types/uuid": "^9.0.6",
85
85
  "@types/webpack": "^5.28.4",
86
- "@typescript-eslint/eslint-plugin": "^6.8.0",
87
- "@typescript-eslint/parser": "^6.8.0",
86
+ "@typescript-eslint/eslint-plugin": "^6.9.0",
87
+ "@typescript-eslint/parser": "^6.9.0",
88
88
  "autoprefixer": "^10.4.16",
89
89
  "babel-jest": "^29.7.0",
90
90
  "babel-loader": "^9.1.3",
@@ -72,7 +72,7 @@ ScalableRect.propTypes = {
72
72
  }
73
73
 
74
74
  // If given, "ratio" must have "H:W" format.
75
- if (!ratio.match(/\d\.\d+/)) {
75
+ if (!ratio.match(/\d+:\d+/)) {
76
76
  return Error('"ratio" prop must have "H:W" format');
77
77
  }
78
78
 
@@ -4,6 +4,7 @@ import defaultTheme from './theme.scss';
4
4
 
5
5
  type PropsT = {
6
6
  theme: Theme & {
7
+ bouncing?: string;
7
8
  container?: string;
8
9
  circle?: string;
9
10
  };