@viasoftbr/shared-ui 0.0.2 → 0.0.4

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/services.js CHANGED
@@ -2833,10 +2833,9 @@ var fetchApi = {
2833
2833
  }
2834
2834
  }
2835
2835
  };
2836
- var serverOrigin = apiOrigin;
2837
2836
  function buildWsUrl(path = "/") {
2838
2837
  try {
2839
- const origin2 = new URL(serverOrigin);
2838
+ const origin2 = new URL(apiOrigin);
2840
2839
  origin2.protocol = origin2.protocol === "https:" ? "wss:" : "ws:";
2841
2840
  if (!path.startsWith("/"))
2842
2841
  path = "/" + path;
@@ -3237,7 +3236,6 @@ export {
3237
3236
  metadataLoader,
3238
3237
  registry,
3239
3238
  saveConfig,
3240
- serverOrigin,
3241
3239
  setAccessToken,
3242
3240
  setRefreshToken,
3243
3241
  subscribeToWebsocket,
package/dist/types.cjs ADDED
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/types/index.ts
21
+ var types_exports = {};
22
+ __export(types_exports, {
23
+ Role: () => Role
24
+ });
25
+ module.exports = __toCommonJS(types_exports);
26
+
27
+ // src/types/auth.ts
28
+ var Role = /* @__PURE__ */ ((Role2) => {
29
+ Role2["Admin"] = "admin";
30
+ Role2["Operator"] = "operator";
31
+ Role2["SuperAdmin"] = "superadmin";
32
+ Role2["ReadOnly"] = "readonly";
33
+ return Role2;
34
+ })(Role || {});
package/package.json CHANGED
@@ -1,34 +1,46 @@
1
1
  {
2
2
  "name": "@viasoftbr/shared-ui",
3
- "version": "0.0.2",
4
3
  "description": "Shared frontend utilities, components and i18n for Viasoft plugins and micro-frontends",
5
4
  "type": "module",
6
5
  "main": "dist/index.js",
6
+ "module": "./dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "version": "0.0.4",
8
9
  "exports": {
9
- ".": {
10
+ ".": {
10
11
  "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs",
11
13
  "types": "./dist/index.d.ts"
12
14
  },
13
15
  "./index": {
14
16
  "import": "./dist/index.js",
17
+ "require": "./dist/index.cjs",
15
18
  "types": "./dist/index.d.ts"
16
19
  },
17
20
  "./context": {
18
- "import": "./dist/context.js",
19
- "types": "./dist/context.d.ts"
21
+ "import": "./dist/context.js",
22
+ "require": "./dist/context.cjs",
23
+ "types": "./dist/context/index.d.ts"
20
24
  },
21
25
  "./components": {
22
- "import": "./dist/components.js",
23
- "types": "./dist/components.d.ts"
26
+ "import": "./dist/components.js",
27
+ "require": "./dist/components.cjs",
28
+ "types": "./dist/components/index.d.ts"
29
+ },
30
+ "./services": {
31
+ "import": "./dist/services.js",
32
+ "require": "./dist/services.cjs",
33
+ "types": "./dist/services/index.d.ts"
24
34
  },
25
35
  "./types": {
26
- "import": "./dist/types.js",
27
- "types": "./dist/types.d.ts"
36
+ "import": "./dist/types.js",
37
+ "require": "./dist/types.cjs",
38
+ "types": "./dist/types/index.d.ts"
28
39
  },
29
40
  "./i18n": {
30
- "import": "./dist/i18n.js",
31
- "types": "./dist/i18n.d.ts"
41
+ "import": "./dist/i18n.js",
42
+ "require": "./dist/i18n.cjs",
43
+ "types": "./dist/i18n.d.ts"
32
44
  },
33
45
  "./jsmpeg": {
34
46
  "default": "./dist/jsmpeg.vu.min.js"
@@ -47,12 +59,24 @@
47
59
  },
48
60
  "devDependencies": {
49
61
  "@types/react": "^19.2.13",
62
+ "@tanstack/react-query": "^5.90.10",
50
63
  "esbuild": "^0.20.0",
51
64
  "typescript": "^5.0.0"
52
65
  },
53
66
  "files": [
54
67
  "dist"
55
68
  ],
69
+ "overrides": {
70
+ "use-sync-external-store": "1.6.0"
71
+ },
72
+ "resolutions": {
73
+ "use-sync-external-store": "1.6.0"
74
+ },
75
+ "pnpm": {
76
+ "overrides": {
77
+ "use-sync-external-store": "1.6.0"
78
+ }
79
+ },
56
80
  "keywords": [
57
81
  "viasoft",
58
82
  "shared",
@@ -69,7 +93,7 @@
69
93
  "dependencies": {
70
94
  "@headlessui/react": "^2.2.9",
71
95
  "@reduxjs/toolkit": "^2.10.1",
72
- "@tanstack/react-query": "^5.90.10",
96
+
73
97
  "@types/react-dom": "^19.2.3",
74
98
  "@viasoftbr/shared-utils": "^0.0.1",
75
99
  "axios": "^1.13.2",
@@ -83,6 +107,7 @@
83
107
  "react-router-dom": "^6.20.1",
84
108
  "react-tooltip": "^5.30.0",
85
109
  "redux-batch-middleware": "^0.2.0",
110
+ "use-sync-external-store": "1.6.0",
86
111
  "tailwind-scrollbar": "^4.0.2"
87
112
  },
88
113
  "repository": {