@xh/hoist-dev-utils 12.0.0 → 12.1.0

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.
@@ -77,6 +77,7 @@ try {
77
77
  * adding a mobile app to a device home screen, as well as "installing" an app via Chrome's "create shortcut"
78
78
  * option. See https://developer.mozilla.org/en-US/docs/Web/Manifest for options.
79
79
  * @param {string} [env.preloadBackgroundColor] - background color to use for the preloader spinner. Defaults to white.
80
+ * @param {string} [env.preloadSpinnerColor] - stroke color for the preloader spinner SVG. Defaults to a neutral gray (#888).
80
81
  * @param {string[]} [env.targetBrowsers] - array of browserslist queries specifying target browsers for Babel and CSS
81
82
  * transpiling and processing.
82
83
  * @param {Object} [env.babelPresetEnvOptions] - options to spread onto / override defaults passed here to the Babel
@@ -136,6 +137,7 @@ async function configureWebpack(env) {
136
137
  favicon = env.favicon || null,
137
138
  manifestConfig = env.manifestConfig || {},
138
139
  preloadBackgroundColor = env.preloadBackgroundColor || 'white',
140
+ preloadSpinnerColor = env.preloadSpinnerColor || '#888',
139
141
  stats = env.stats || 'errors-only',
140
142
  infrastructureLoggingLevel = env.infrastructureLoggingLevel || 'error',
141
143
  targetBrowsers = env.targetBrowsers || [
@@ -657,7 +659,8 @@ async function configureWebpack(env) {
657
659
  styleTags,
658
660
  scriptTags,
659
661
  clientAppName,
660
- preloadBackgroundColor
662
+ preloadBackgroundColor,
663
+ preloadSpinnerColor
661
664
  };
662
665
  },
663
666
  // No need to minify the HTML itself
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist-dev-utils",
3
- "version": "12.0.0",
3
+ "version": "12.1.0",
4
4
  "description": "Utilities for configuring builds of Hoist-React client applications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "@types/react": "18.x",
25
25
  "@types/react-dom": "18.x",
26
26
  "@xh/eslint-config": "^7.0",
27
- "autoprefixer": "~10.4.18",
27
+ "autoprefixer": "~10.5.0",
28
28
  "babel-loader": "~10.1.1",
29
29
  "babel-plugin-transform-imports": "~2.0.0",
30
30
  "case-sensitive-paths-webpack-plugin": "~2.4.0",
@@ -34,21 +34,21 @@
34
34
  "file-loader": "~6.2.0",
35
35
  "html-webpack-plugin": "~5.6.0",
36
36
  "html-webpack-tags-plugin": "~3.0.2",
37
- "lodash": "~4.17.21",
37
+ "lodash": "4.x",
38
38
  "mini-css-extract-plugin": "~2.10.1",
39
39
  "postcss": "~8.5.3",
40
40
  "postcss-flexbugs-fixes": "~5.0.2",
41
41
  "postcss-loader": "~8.2.0",
42
42
  "rimraf": "~6.1.2",
43
- "sass-embedded": "~1.98.0",
43
+ "sass-embedded": "~1.99.0",
44
44
  "sass-loader": "~16.0.4",
45
45
  "sass-material-colors": "~0.0.5",
46
46
  "style-loader": "~4.0.0",
47
- "terser-webpack-plugin": "~5.4.0",
47
+ "terser-webpack-plugin": "~5.5.0",
48
48
  "type-fest": "5.x",
49
49
  "url-loader": "~4.1.1",
50
- "webpack": "~5.105.4",
51
- "webpack-bundle-analyzer": "~5.2.0",
50
+ "webpack": "~5.106.2",
51
+ "webpack-bundle-analyzer": "~5.3.0",
52
52
  "webpack-cli": "~7.0.0",
53
53
  "webpack-dev-server": "~5.2.0",
54
54
  "webpackbar": "~7.0.0"
package/static/index.html CHANGED
@@ -9,6 +9,15 @@
9
9
  <% } %>
10
10
  <title><%= htmlWebpackPlugin.options.title %></title>
11
11
  <%= styleTags %>
12
+ <style>
13
+ @keyframes xh-preload-spin { to { transform: rotate(360deg); } }
14
+ #xh-preload-spinner svg {
15
+ width: 50px;
16
+ height: 50px;
17
+ animation: xh-preload-spin 2s linear infinite;
18
+ transform-origin: center;
19
+ }
20
+ </style>
12
21
  </head>
13
22
  <body class="xh-app" style="margin: 0">
14
23
 
@@ -17,7 +26,9 @@
17
26
  </noscript>
18
27
 
19
28
  <div id="xh-preload-spinner" style="height: 100vh; width: 100vw; display: flex; align-items: center; justify-content: center; background-color: <%= preloadBackgroundColor %>">
20
- <img src="<%= webpackConfig.output.publicPath %>public/spinner.png" style="width: 50px; height: 50px;">
29
+ <svg viewBox="0 0 24 24" fill="none" stroke="<%= preloadSpinnerColor %>" stroke-width="1.5" stroke-linecap="round" aria-hidden="true">
30
+ <circle cx="12" cy="12" r="9" stroke-dasharray="42 56"/>
31
+ </svg>
21
32
  </div>
22
33
 
23
34
  <div id="xh-root"></div>