reaxify 0.0.93 → 0.0.94

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.
@@ -1 +1 @@
1
- "use client";"use strict";const n=require("react"),u=require("react-dom"),d=require("../../helpers/randomID.cjs.js");function i({children:r}){const[t,o]=n.useState(null);return n.useLayoutEffect(()=>{const e=document.createElement("div"),c=d();return e.id=c,document.body.appendChild(e),o(e),()=>{document.body.removeChild(e)}},[]),t?u.createPortal(r,t):null}module.exports=i;
1
+ "use client";"use strict";const t=require("../../stores/portalElement.cjs.js"),n=require("react"),c=require("react-dom");function s({children:r}){const e=n.useSyncExternalStore(t.subscribe,t.getElement);return e?c.createPortal(r,e):null}module.exports=s;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,sCAczD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,sCAOzD"}
@@ -1,16 +1,14 @@
1
1
  "use client";
2
- import { useState as d, useLayoutEffect as m } from "react";
3
- import { createPortal as u } from "react-dom";
4
- import l from "../../helpers/randomID.es.js";
5
- function f({ children: o }) {
6
- const [t, n] = d(null);
7
- return m(() => {
8
- const e = document.createElement("div"), r = l();
9
- return e.id = r, document.body.appendChild(e), n(e), () => {
10
- document.body.removeChild(e);
11
- };
12
- }, []), t ? u(o, t) : null;
2
+ import t from "../../stores/portalElement.es.js";
3
+ import { useSyncExternalStore as o } from "react";
4
+ import { createPortal as n } from "react-dom";
5
+ function a({ children: r }) {
6
+ const e = o(
7
+ t.subscribe,
8
+ t.getElement
9
+ );
10
+ return e ? n(r, e) : null;
13
11
  }
14
12
  export {
15
- f as default
13
+ a as default
16
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGzD,OAAO,EAGL,YAAY,EAMb,MAAM,OAAO,CAAC;AAKf,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AACpD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;CAC9B,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,KAAK,EACL,KAAc,EACd,SAAiB,EACjB,QAAc,EACd,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC,2CAgJxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGzD,OAAO,EAGL,YAAY,EAMb,MAAM,OAAO,CAAC;AAKf,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AACpD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,QAAQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;CAC9B,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,KAAK,EACL,KAAc,EACd,SAAiB,EACjB,QAAc,EACd,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC,2CAgJxC"}
package/dist/reaxify.css CHANGED
@@ -1 +1 @@
1
- /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */body:has([data-open=true]){overscroll-behavior:none;overflow:hidden}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=password]::-ms-reveal{display:none!important}input[type=password]::-ms-clear{display:none!important}input[type=password]::-webkit-clear-button{display:none!important}input[type=password]::-webkit-credentials-auto-fill-button{display:none!important}input[type=password]{-webkit-text-security:disc}textarea::-webkit-scrollbar{display:none}textarea{-ms-overflow-style:none;scrollbar-width:none}strong,b{font-weight:700}.animate-linear-progress-1{animation:3.2s cubic-bezier(.65,.815,.735,.395) infinite linear-progress-1}.animate-linear-progress-2{animation:3.2s cubic-bezier(.165,.84,.44,1) 1.2s infinite linear-progress-2}@keyframes linear-progress-1{0%{width:35%;inset-inline-start:-35%}60%{width:100%;inset-inline-start:100%}to{width:100%;inset-inline-start:100%}}@keyframes linear-progress-2{0%{width:100%;inset-inline-start:-200%}60%{width:10%;inset-inline-start:107%}to{width:10%;inset-inline-start:107%}}
1
+ /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */html:has([role=menu][data-open=true]){scrollbar-gutter:stable}body:has([data-open=true]){overscroll-behavior:none;overflow:hidden}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=password]::-ms-reveal{display:none!important}input[type=password]::-ms-clear{display:none!important}input[type=password]::-webkit-clear-button{display:none!important}input[type=password]::-webkit-credentials-auto-fill-button{display:none!important}input[type=password]{-webkit-text-security:disc}textarea::-webkit-scrollbar{display:none}textarea{-ms-overflow-style:none;scrollbar-width:none}strong,b{font-weight:700}.animate-linear-progress-1{animation:3.2s cubic-bezier(.65,.815,.735,.395) infinite linear-progress-1}.animate-linear-progress-2{animation:3.2s cubic-bezier(.165,.84,.44,1) 1.2s infinite linear-progress-2}@keyframes linear-progress-1{0%{width:35%;inset-inline-start:-35%}60%{width:100%;inset-inline-start:100%}to{width:100%;inset-inline-start:100%}}@keyframes linear-progress-2{0%{width:100%;inset-inline-start:-200%}60%{width:10%;inset-inline-start:107%}to{width:10%;inset-inline-start:107%}}
@@ -0,0 +1,2 @@
1
+ export { default as portalElementStore } from './portalElement';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ "use client";"use strict";const d=require("../helpers/randomID.cjs.js"),n=d(),r=new Set,o={getElement:()=>{const e=document.getElementById(n);if(e)return e;const t=document.createElement("div");return t.dataset.name="portal",t.id=n,document.body.appendChild(t),t},subscribe:e=>(r.add(e),()=>{r.delete(e)})};module.exports=o;
@@ -0,0 +1,6 @@
1
+ declare const portalElementStore: {
2
+ getElement: () => HTMLElement;
3
+ subscribe: (cb: VoidFunction) => () => void;
4
+ };
5
+ export default portalElementStore;
6
+ //# sourceMappingURL=portalElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portalElement.d.ts","sourceRoot":"","sources":["../../src/stores/portalElement.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,kBAAkB;;oBAUN,YAAY;CAM7B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import o from "../helpers/randomID.es.js";
3
+ const n = o(), d = /* @__PURE__ */ new Set(), l = {
4
+ getElement: () => {
5
+ const e = document.getElementById(n);
6
+ if (e) return e;
7
+ const t = document.createElement("div");
8
+ return t.dataset.name = "portal", t.id = n, document.body.appendChild(t), t;
9
+ },
10
+ subscribe: (e) => (d.add(e), () => {
11
+ d.delete(e);
12
+ })
13
+ };
14
+ export {
15
+ l as default
16
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reaxify",
3
3
  "private": false,
4
- "version": "0.0.93",
4
+ "version": "0.0.94",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [