remote-reload-utils 0.0.13 → 0.0.14

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/dist/main.js CHANGED
@@ -1,5 +1,19 @@
1
1
  import { createInstance } from "@module-federation/enhanced/runtime";
2
2
  import react, { Suspense, lazy, useCallback, useEffect, useState } from "react";
3
+ var __webpack_modules__ = {
4
+ "./src/styles/index.css": function() {}
5
+ };
6
+ var __webpack_module_cache__ = {};
7
+ function __webpack_require__(moduleId) {
8
+ var cachedModule = __webpack_module_cache__[moduleId];
9
+ if (void 0 !== cachedModule) return cachedModule.exports;
10
+ var module = __webpack_module_cache__[moduleId] = {
11
+ exports: {}
12
+ };
13
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
14
+ return module.exports;
15
+ }
16
+ __webpack_require__("./src/styles/index.css");
3
17
  async function loadReactVersion(version) {
4
18
  const runtime = await createInstance({
5
19
  name: `react_${version}_runtime`,
@@ -722,19 +736,14 @@ class ErrorBoundary extends react.Component {
722
736
  if (void 0 !== this.props.fallback) return this.props.fallback;
723
737
  return /*#__PURE__*/ react.createElement("div", {
724
738
  role: "alert",
725
- style: {
726
- padding: '16px',
727
- border: '1px solid #ffcccc',
728
- backgroundColor: '#fff5f5',
729
- borderRadius: '4px'
730
- }
731
- }, /*#__PURE__*/ react.createElement("h3", null, "Something went wrong"), /*#__PURE__*/ react.createElement("p", null, this.state.error.message), /*#__PURE__*/ react.createElement("button", {
739
+ className: "p-4 border border-red-200 bg-red-50 rounded-lg"
740
+ }, /*#__PURE__*/ react.createElement("h3", {
741
+ className: "text-lg font-semibold mb-2"
742
+ }, "Something went wrong"), /*#__PURE__*/ react.createElement("p", {
743
+ className: "text-red-700"
744
+ }, this.state.error.message), /*#__PURE__*/ react.createElement("button", {
732
745
  onClick: this.handleReset,
733
- style: {
734
- marginTop: '8px',
735
- padding: '8px 16px',
736
- cursor: 'pointer'
737
- }
746
+ className: "mt-3 px-4 py-2 text-sm font-medium text-white bg-red-600 rounded hover:bg-red-700 cursor-pointer transition-colors"
738
747
  }, "Try again"));
739
748
  }
740
749
  return this.props.children;
@@ -825,7 +834,9 @@ function RemoteModuleRenderer({ pkg, version, moduleName, scopeName, loadingFall
825
834
  }, /*#__PURE__*/ react.createElement("div", {
826
835
  className: "loading-spinner",
827
836
  "aria-hidden": "true"
828
- }), /*#__PURE__*/ react.createElement("span", null, "Loading ", moduleName, "...")));
837
+ }), /*#__PURE__*/ react.createElement("span", {
838
+ className: "text-gray-600"
839
+ }, "Loading ", moduleName, "...")));
829
840
  if (moduleState.error) {
830
841
  if ('function' == typeof errorFallback) return /*#__PURE__*/ react.createElement(react.Fragment, null, errorFallback(moduleState.error, handleRetry));
831
842
  if (void 0 !== errorFallback) return /*#__PURE__*/ react.createElement(react.Fragment, null, errorFallback);
@@ -1,4 +1,4 @@
1
- import { ModuleFederationRuntimePlugin } from "@module-federation/enhanced/runtime";
1
+ import { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
2
2
  export { type ModuleFederationRuntimePlugin };
3
3
  export interface LoadRemoteOptions {
4
4
  name: string;
package/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "remote-reload-utils",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "type": "module",
5
5
  "description": "Utilities for remote reload in Module Federation & React Component",
6
6
  "exports": {
7
7
  ".": {
8
- "types": "./dist/index.d.ts",
9
- "import": "./dist/main.js",
10
- "require": "./dist/main.cjs"
8
+ "import": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/main.js"
11
+ },
12
+ "require": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/main.cjs"
15
+ }
11
16
  }
12
17
  },
13
18
  "main": "./dist/main.cjs",
@@ -46,13 +51,16 @@
46
51
  "devDependencies": {
47
52
  "@biomejs/biome": "2.0.6",
48
53
  "@rslib/core": "0.17.0",
54
+ "@tailwindcss/postcss": "^4.2.1",
49
55
  "@types/node": "^22.17.2",
50
56
  "@types/react": "^18.2.0",
51
57
  "@types/react-dom": "^18.2.0",
52
58
  "@vitest/ui": "^2.1.8",
53
59
  "base-biome-config": "0.0.8",
54
60
  "happy-dom": "^20.8.4",
61
+ "postcss": "^8.5.8",
55
62
  "rsbuild-plugin-publint": "^0.3.3",
63
+ "tailwindcss": "^4.2.1",
56
64
  "typescript": "^5.9.2",
57
65
  "vitest": "^2.1.8"
58
66
  },