@xylabs/react-portal 10.0.1 → 10.0.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.
package/README.md CHANGED
@@ -1,32 +1,3 @@
1
- [![logo][]](https://xylabs.com)
2
-
3
1
  # @xylabs/react-portal
4
2
 
5
- [![npm][npm-badge]][npm-link]
6
-
7
- > Common React library for all XY Labs projects that use React
8
-
9
- ## Install
10
-
11
- ```sh
12
- npm install {{name}}
13
- ```
14
-
15
- or
16
-
17
- ```sh
18
- yarn add {{name}}
19
- ```
20
-
21
-
22
- ## License
23
-
24
- See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
25
-
26
- ## Credits
27
-
28
- [Made with 🔥 and ❄️ by XY Labs](https://xylabs.com)
29
-
30
- [npm-badge]: https://img.shields.io/npm/v/@xylabs/react-portal.svg
31
- [npm-link]: https://www.npmjs.com/package/@xylabs/react-portal
32
- [logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
3
+ Deprecated compatibility package. Use `@ariestools/sdk-react/portal` instead.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @deprecated Use `@ariestools/sdk-react/portal` instead. `@xylabs/react-portal` is a backward-compatibility shim.
3
+ */
4
+ export * from '@ariestools/sdk-react/portal';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,8BAA8B,CAAA"}
@@ -0,0 +1,3 @@
1
+ // src/index.ts
2
+ export * from "@ariestools/sdk-react/portal";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["/**\n * @deprecated Use `@ariestools/sdk-react/portal` instead. `@xylabs/react-portal` is a backward-compatibility shim.\n */\nexport * from '@ariestools/sdk-react/portal'\n"],
5
+ "mappings": ";AAGA,cAAc;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xylabs/react-portal",
3
- "version": "10.0.1",
4
- "description": "Common React library for all XY Labs projects that use React",
3
+ "version": "10.0.2",
4
+ "description": "DEPRECATED - use @ariestools/sdk-react/portal. Backward-compatibility re-export shim.",
5
5
  "keywords": [
6
6
  "utility",
7
7
  "typescript",
@@ -26,32 +26,76 @@
26
26
  "type": "module",
27
27
  "exports": {
28
28
  ".": {
29
- "types": "./dist/browser/index.d.ts",
30
- "default": "./dist/browser/index.mjs"
29
+ "types": "./dist/neutral/index.d.ts",
30
+ "default": "./dist/neutral/index.mjs"
31
31
  },
32
32
  "./package.json": "./package.json"
33
33
  },
34
34
  "files": [
35
35
  "dist",
36
+ "!**/*.bench.*",
37
+ "!**/*.spec.*",
38
+ "!**/*.test.*",
36
39
  "README.md"
37
40
  ],
41
+ "dependencies": {
42
+ "@ariestools/sdk-react": "~10.0.2"
43
+ },
38
44
  "devDependencies": {
39
- "@types/react": "^19.2.17",
40
- "@types/react-dom": "^19.2.3",
41
- "@xylabs/toolchain": "^8.5.3",
42
- "@xylabs/tsconfig": "^8.5.3",
43
- "@xylabs/tsconfig-dom": "^8.5.3",
44
- "@xylabs/tsconfig-react": "^8.5.3",
45
+ "@ariestools/sdk": "^7.0.4",
46
+ "@mui/icons-material": "^9.1.1",
47
+ "@mui/material": "^9.1.2",
48
+ "@opentelemetry/api": "^1.9.1",
49
+ "@opentelemetry/sdk-trace-base": "^2.8.0",
50
+ "@react-spring/web": "^10.1.2",
51
+ "@xylabs/eth-address": "^7.0.4",
52
+ "@xylabs/pixel": "^7.0.4",
53
+ "@xylabs/toolchain": "^8.5.12",
54
+ "@xylabs/tsconfig": "^8.5.12",
55
+ "async-mutex": "^0.5.0",
56
+ "clsx": "^2.1.1",
45
57
  "eslint": "^10.6.0",
58
+ "ethers": "^6.17.0",
59
+ "lru-cache": "^11.5.1",
60
+ "md5": "^2.3.0",
61
+ "numeral": "^2.0.6",
62
+ "query-string": "^9.4.1",
46
63
  "react": "^19.2.7",
47
64
  "react-dom": "^19.2.7",
48
- "typescript": "^6.0.3"
65
+ "react-router-dom": "^7.18.1",
66
+ "typescript": "^6.0.3",
67
+ "viem": "^2.54.1",
68
+ "zod": "^4.4.3",
69
+ "zustand": "^5.0.14"
49
70
  },
50
71
  "peerDependencies": {
72
+ "@ariestools/sdk": "^7.0",
73
+ "@mui/icons-material": "^9.0",
74
+ "@mui/material": "^9.0",
75
+ "@opentelemetry/api": "^1.9",
76
+ "@opentelemetry/sdk-trace-base": "^2.7",
77
+ "@react-spring/web": "^10.1",
78
+ "@xylabs/eth-address": "^7.0",
79
+ "@xylabs/pixel": "^7.0",
80
+ "async-mutex": "^0.5",
81
+ "clsx": "^2.1",
82
+ "ethers": "^6.16",
83
+ "lru-cache": "^11.3",
84
+ "md5": "^2.3",
85
+ "numeral": "^2.0",
86
+ "query-string": "^9.3",
51
87
  "react": "^19.2",
52
- "react-dom": "^19.2"
88
+ "react-dom": "^19.2",
89
+ "react-router-dom": "^7.15",
90
+ "viem": "^2.48",
91
+ "zod": "^4.4",
92
+ "zustand": "^5.0"
53
93
  },
54
94
  "publishConfig": {
55
95
  "access": "public"
96
+ },
97
+ "deprecated": "Use @ariestools/sdk-react/portal instead. Replace @xylabs/react-portal with @ariestools/sdk-react/portal. This package is a compatibility shim only and will not receive further updates.",
98
+ "engines": {
99
+ "node": ">=18.17.1"
56
100
  }
57
101
  }
@@ -1,3 +0,0 @@
1
- import type { PortalProps } from './PortalProps.ts';
2
- export declare const Portal: React.FC<PortalProps>;
3
- //# sourceMappingURL=Portal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0BxC,CAAA"}
@@ -1,7 +0,0 @@
1
- export interface PortalProps {
2
- children: React.ReactNode;
3
- className?: string;
4
- el?: string;
5
- target?: string;
6
- }
7
- //# sourceMappingURL=PortalProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PortalProps.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/PortalProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -1,3 +0,0 @@
1
- export * from './Portal.tsx';
2
- export * from './PortalProps.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './Portal/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,35 +0,0 @@
1
- // src/components/Portal/Portal.tsx
2
- import { useEffect, useState } from "react";
3
- import { createPortal } from "react-dom";
4
- var Portal = ({
5
- children,
6
- className,
7
- el = "div",
8
- target = "body"
9
- }) => {
10
- const [container] = useState(() => document.createElement(el));
11
- useEffect(() => {
12
- if (className === void 0 || className === "") {
13
- return;
14
- }
15
- container.classList.add(className);
16
- return () => {
17
- container.classList.remove(className);
18
- };
19
- }, [container, className]);
20
- useEffect(() => {
21
- const targetElement = document.querySelector(target);
22
- if (!targetElement) {
23
- console.warn(`Unable to find target element: ${target}`);
24
- }
25
- targetElement?.append(container);
26
- return () => {
27
- container.remove();
28
- };
29
- }, [container, target]);
30
- return createPortal(children, container);
31
- };
32
- export {
33
- Portal
34
- };
35
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/Portal/Portal.tsx"],
4
- "sourcesContent": ["import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PortalProps } from './PortalProps.ts'\n\nexport const Portal: React.FC<PortalProps> = ({\n children, className, el = 'div', target = 'body',\n}: PortalProps) => {\n const [container] = useState(() => document.createElement(el))\n useEffect(() => {\n if (className === undefined || className === '') {\n return\n }\n\n container.classList.add(className)\n return () => {\n container.classList.remove(className)\n }\n }, [container, className])\n useEffect(() => {\n const targetElement = document.querySelector(target)\n if (!targetElement) {\n console.warn(`Unable to find target element: ${target}`)\n }\n targetElement?.append(container)\n return () => {\n container.remove()\n }\n }, [container, target])\n\n return createPortal(children, container)\n}\n"],
5
- "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAItB,IAAM,SAAgC,CAAC;AAAA,EAC5C;AAAA,EAAU;AAAA,EAAW,KAAK;AAAA,EAAO,SAAS;AAC5C,MAAmB;AACjB,QAAM,CAAC,SAAS,IAAI,SAAS,MAAM,SAAS,cAAc,EAAE,CAAC;AAC7D,YAAU,MAAM;AACd,QAAI,cAAc,UAAa,cAAc,IAAI;AAC/C;AAAA,IACF;AAEA,cAAU,UAAU,IAAI,SAAS;AACjC,WAAO,MAAM;AACX,gBAAU,UAAU,OAAO,SAAS;AAAA,IACtC;AAAA,EACF,GAAG,CAAC,WAAW,SAAS,CAAC;AACzB,YAAU,MAAM;AACd,UAAM,gBAAgB,SAAS,cAAc,MAAM;AACnD,QAAI,CAAC,eAAe;AAClB,cAAQ,KAAK,kCAAkC,MAAM,EAAE;AAAA,IACzD;AACA,mBAAe,OAAO,SAAS;AAC/B,WAAO,MAAM;AACX,gBAAU,OAAO;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,CAAC;AAEtB,SAAO,aAAa,UAAU,SAAS;AACzC;",
6
- "names": []
7
- }