@asaleh37/ui-base 1.2.11 → 1.2.12

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": "@asaleh37/ui-base",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -73,7 +73,8 @@
73
73
  "typescript": "~5.7.2",
74
74
  "typescript-eslint": "^8.22.0",
75
75
  "vite": "^6.1.0",
76
- "zod": "^3.24.2"
76
+ "zod": "^3.24.2",
77
+ "global": "^4.4.0"
77
78
  },
78
79
  "peerDependencies": {
79
80
  "@emotion/cache": "^11.14.0",
@@ -117,10 +118,10 @@
117
118
  "rollup-plugin-postcss": "^4.0.2",
118
119
  "stylis": "^4.3.6",
119
120
  "stylis-plugin-rtl": "^2.1.1",
120
- "zod": "^3.24.2"
121
+ "zod": "^3.24.2",
122
+ "global": "^4.4.0"
121
123
  },
122
124
  "dependencies": {
123
- "@rollup/plugin-json": "^6.1.0",
124
- "global": "^4.4.0"
125
+ "@rollup/plugin-json": "^6.1.0"
125
126
  }
126
127
  }
@@ -19,11 +19,6 @@ library.add(fab);
19
19
  library.add(far);
20
20
  library.add(fas);
21
21
 
22
- // Polyfill for global in case it's not defined (for browser/Vite compatibility)
23
- if (typeof global === "undefined") {
24
- global = globalThis;
25
- }
26
-
27
22
  export const BaseApp: React.FC<AppInfo> = (props) => {
28
23
  const systemReducers = {
29
24
  AppLayout: AppLayoutReducer,
@@ -1,3 +1,7 @@
1
+ // Polyfill for global in case it's not defined (for browser/Vite compatibility)
2
+ if (typeof global === "undefined") {
3
+ global = globalThis;
4
+ }
1
5
  export * from "./BaseApp";
2
6
  export * from "@mui/material";
3
7
  export * from "zod";
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Editor } from "draft-js";
1
2
  export * from "./components";
2
3
  export * from "./hooks";
3
4
  export * from "./util";
package/vite.config.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  import { defineConfig } from "vite";
2
2
  import react from "@vitejs/plugin-react";
3
- import rollupNodePolyFill from 'rollup-plugin-polyfill-node';
4
-
3
+ import rollupNodePolyFill from "rollup-plugin-polyfill-node";
5
4
 
6
5
  // https://vite.dev/config/
7
6
  export default defineConfig({
8
7
  plugins: [react()],
9
8
  define: {
10
- global: 'globalThis', // Fix for global
9
+ global: "globalThis", // Fix for global
11
10
  },
12
11
  optimizeDeps: {
13
- include: ['fbjs'],
12
+ include: ["fbjs"],
14
13
  },
15
14
  build: {
16
15
  rollupOptions: {
16
+ external: ["react", "react-dom"], // 👈 keep react peer
17
17
  plugins: [rollupNodePolyFill()],
18
18
  },
19
19
  },
@@ -21,4 +21,3 @@ export default defineConfig({
21
21
  port: 3000,
22
22
  },
23
23
  });
24
-