@meonode/ui 1.1.1 → 1.1.3

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/cjs/components/html.node.cjs +1 -0
  3. package/dist/cjs/components/meonode-unmounter.client.cjs +2 -0
  4. package/dist/cjs/components/react.node.cjs +1 -0
  5. package/dist/cjs/components/registry.client.cjs +2 -0
  6. package/dist/cjs/components/styled-renderer.client.cjs +2 -0
  7. package/dist/cjs/components/theme-provider.cjs +1 -0
  8. package/dist/cjs/components/theme-provider.client.cjs +2 -0
  9. package/dist/cjs/core.node.cjs +1 -0
  10. package/dist/cjs/helper/common.helper.cjs +1 -0
  11. package/dist/cjs/hoc/component.hoc.cjs +1 -0
  12. package/dist/cjs/hoc/portal.hoc.cjs +1 -0
  13. package/dist/cjs/hook/useTheme.cjs +2 -0
  14. package/dist/cjs/main.cjs +1 -0
  15. package/dist/cjs/nextjs-registry/index.cjs +1 -0
  16. package/dist/cjs/util/mount-tracker.util.cjs +1 -0
  17. package/dist/cjs/util/navigation-cache-manager.util.cjs +1 -0
  18. package/dist/cjs/util/node.util.cjs +1 -0
  19. package/dist/cjs/util/theme.util.cjs +1 -0
  20. package/dist/esm/components/meonode-unmounter.client.d.ts.map +1 -1
  21. package/dist/esm/components/meonode-unmounter.client.js +1 -1
  22. package/dist/esm/core.node.d.ts +2 -1
  23. package/dist/esm/core.node.d.ts.map +1 -1
  24. package/dist/esm/core.node.js +1 -1
  25. package/dist/esm/helper/common.helper.d.ts +0 -7
  26. package/dist/esm/helper/common.helper.d.ts.map +1 -1
  27. package/dist/esm/helper/common.helper.js +1 -1
  28. package/dist/esm/helper/react-is.helper.d.ts +0 -12
  29. package/dist/esm/helper/react-is.helper.d.ts.map +1 -1
  30. package/dist/esm/hoc/portal.hoc.d.ts.map +1 -1
  31. package/dist/esm/hoc/portal.hoc.js +1 -1
  32. package/dist/esm/hook/index.d.ts +0 -1
  33. package/dist/esm/hook/index.d.ts.map +1 -1
  34. package/dist/esm/main.js +1 -1
  35. package/dist/esm/types/node.type.d.ts +14 -11
  36. package/dist/esm/types/node.type.d.ts.map +1 -1
  37. package/dist/esm/util/node.util.d.ts +2 -2
  38. package/dist/esm/util/node.util.d.ts.map +1 -1
  39. package/dist/esm/util/node.util.js +1 -1
  40. package/package.json +29 -25
  41. package/dist/cjs/components/html.node.js +0 -1
  42. package/dist/cjs/components/meonode-unmounter.client.js +0 -2
  43. package/dist/cjs/components/react.node.js +0 -1
  44. package/dist/cjs/components/registry.client.js +0 -2
  45. package/dist/cjs/components/styled-renderer.client.js +0 -2
  46. package/dist/cjs/components/theme-provider.client.js +0 -2
  47. package/dist/cjs/components/theme-provider.js +0 -1
  48. package/dist/cjs/core.node.js +0 -1
  49. package/dist/cjs/helper/common.helper.js +0 -1
  50. package/dist/cjs/hoc/component.hoc.js +0 -1
  51. package/dist/cjs/hoc/portal.hoc.js +0 -1
  52. package/dist/cjs/hook/usePortal.js +0 -2
  53. package/dist/cjs/hook/useTheme.js +0 -2
  54. package/dist/cjs/main.js +0 -1
  55. package/dist/cjs/nextjs-registry/index.js +0 -1
  56. package/dist/cjs/util/mount-tracker.util.js +0 -1
  57. package/dist/cjs/util/navigation-cache-manager.util.js +0 -1
  58. package/dist/cjs/util/node.util.js +0 -1
  59. package/dist/cjs/util/theme.util.js +0 -1
  60. package/dist/esm/hook/usePortal.d.ts +0 -12
  61. package/dist/esm/hook/usePortal.d.ts.map +0 -1
  62. package/dist/esm/hook/usePortal.js +0 -2
  63. /package/dist/cjs/{client.js → client.cjs} +0 -0
  64. /package/dist/cjs/constant/{common.const.js → common.const.cjs} +0 -0
  65. /package/dist/cjs/constant/{css-properties.const.js → css-properties.const.cjs} +0 -0
  66. /package/dist/cjs/helper/{react-is.helper.js → react-is.helper.cjs} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,46 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.1.3] - 2026-02-15
6
+
7
+ ### Feat
8
+
9
+ - **hook**: remove deprecated `usePortal` hook and related portal update logic ([`eb40bd1`](https://github.com/l7aromeo/meonode-ui/commit/eb40bd1))
10
+ - Deleted the unstable `usePortal` hook and removed the `update` method from `NodePortal` and `Portal` HOC to streamline the API.
11
+
12
+ ### Refactor
13
+
14
+ - **core**: optimize core logic, instance ID generation, and utility helpers ([`27fdd1b`](https://github.com/l7aromeo/meonode-ui/commit/27fdd1b))
15
+ - Switched `instanceId` to use a static counter for deterministic IDs.
16
+ - Optimized the iterative render loop by reducing array allocations and improving capacity checks.
17
+ - Refactored `NodeUtil.isNodeInstance` to use `instanceof BaseNode` for better performance.
18
+ - Improved `getGlobalState` to use a shared internal scope.
19
+ - Enhanced `NodeUtil` with a weak map cache for function prop hashes.
20
+
21
+ ### Build
22
+
23
+ - **rollup**: update configuration to use `.cjs` extension for CommonJS output ([`7f6a130`](https://github.com/l7aromeo/meonode-ui/commit/7f6a130))
24
+ - Updated `rollup.config.ts` and `package.json` to use `.cjs` for CJS bundles to ensure compatibility in ESM-first environments.
25
+
26
+ ### Chore
27
+
28
+ - **deps**: update dependencies to latest versions ([`f95591e`](https://github.com/l7aromeo/meonode-ui/commit/f95591e))
29
+ - Updated various devDependencies including `typescript-eslint`, `next`, `react`, and `rollup`.
30
+ - **git**: update `.gitignore` to include AI-related directories ([`0607574`](https://github.com/l7aromeo/meonode-ui/commit/0607574))
31
+ - Added `.claude` to the ignore list.
32
+
33
+ ## [1.1.2] - 2025-12-22
34
+
35
+ ### Fix
36
+
37
+ - **types**: fix `ThemedCSSObject` to support nested selectors and theme functions in deeply nested objects ([`f938be5`](https://github.com/l7aromeo/meonode-ui/commit/f938be5ca17cb5af076e567cfb7df8a7df97cf0d))
38
+ - Updated `ThemedCSSObject` to use an intersection type with an index signature, allowing arbitrary string keys (like pseudo-selectors and media queries) to correctly resolve theme functions.
39
+
40
+ ### Chore
41
+
42
+ - **deps**: update dependencies to latest versions ([`51925b1`](https://github.com/l7aromeo/meonode-ui/commit/51925b152ac8406f16ce627adc61ba4c3f442fc7))
43
+ - Updated `next` to `^16.1.0`, `react-router-dom` to `^7.11.0`, `rollup` to `^4.54.0`, `@testing-library/react` to `^16.3.1` and `@typescript/native-preview` to `^7.0.0`.
44
+
5
45
  ## [1.1.1] - 2025-12-05
6
46
 
7
47
  ### Fix
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../core.node.cjs");const r=e.createNode("div"),t=r,o=e.createNode("div",{display:"flex",flexDirection:"column",minHeight:"100dvh",minWidth:"100dvw"}),d=e.createNode("div",{display:"flex",flexDirection:"column"}),s=e.createNode("div",{display:"flex",flexDirection:"row"}),a=e.createNode("div",{display:"grid"}),i=e.createNode("div",{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),p=e.createNode("div",{position:"fixed"}),c=e.createNode("div",{position:"relative"}),x=e.createNode("div",{position:"absolute"}),N=e.createNode("div",{position:"sticky"}),l=e.createNode("div",{position:"static"}),n=e.createChildrenFirstNode("h1"),h=e.createChildrenFirstNode("h2"),C=e.createChildrenFirstNode("h3"),u=e.createChildrenFirstNode("h4"),F=e.createChildrenFirstNode("h5"),g=e.createChildrenFirstNode("h6"),m=e.createChildrenFirstNode("strong"),v=e.createChildrenFirstNode("em"),S=e.createChildrenFirstNode("small"),b=e.createChildrenFirstNode("mark"),f=e.createChildrenFirstNode("span"),y=e.createChildrenFirstNode("p"),D=y,T=e.createChildrenFirstNode("pre"),H=e.createChildrenFirstNode("code"),k=e.createNode("br"),A=e.createNode("ol"),B=e.createNode("ul"),P=e.createNode("li"),R=e.createNode("dl"),G=e.createNode("dt"),L=e.createNode("dd"),M=e.createNode("form"),E=e.createNode("label"),I=e.createNode("input"),O=e.createChildrenFirstNode("button"),j=e.createNode("textarea"),q=e.createNode("select"),w=e.createChildrenFirstNode("option"),U=e.createNode("fieldset"),V=e.createChildrenFirstNode("legend"),W=e.createNode("optgroup"),K=e.createNode("table"),Q=e.createNode("thead"),z=e.createNode("tbody"),J=e.createNode("tfoot"),X=e.createNode("tr"),Y=e.createNode("th"),Z=e.createNode("td"),$=e.createChildrenFirstNode("caption"),_=e.createNode("colgroup"),ee=e.createNode("col"),re=e.createNode("img"),te=e.createNode("video"),oe=e.createNode("audio"),de=e.createNode("picture"),se=e.createNode("source"),ae=e.createNode("track"),ie=e.createNode("canvas"),pe=e.createNode("iframe"),ce=e.createNode("svg"),xe=e.createNode("path"),Ne=e.createNode("circle"),le=e.createNode("ellipse"),ne=e.createNode("line"),he=e.createNode("polyline"),Ce=e.createNode("polygon"),ue=e.createNode("rect"),Fe=e.createNode("use"),ge=e.createNode("defs"),me=e.createNode("linearGradient"),ve=e.createNode("radialGradient"),Se=e.createNode("stop"),be=e.createNode("symbol"),fe=e.createNode("g"),ye=e.createNode("text"),De=e.createNode("tspan"),Te=e.createNode("a"),He=e.createNode("nav"),ke=e.createNode("body"),Ae=e.createNode("main",{display:"flex",flexDirection:"column"}),Be=e.createNode("header"),Pe=e.createNode("footer"),Re=e.createNode("aside"),Ge=e.createNode("section"),Le=e.createNode("article"),Me=e.createNode("figure"),Ee=e.createChildrenFirstNode("figcaption"),Ie=e.createNode("blockquote"),Oe=e.createNode("address"),je=e.createNode("dialog"),qe=e.createNode("details"),we=e.createChildrenFirstNode("summary"),Ue=e.createNode("head"),Ve=e.createNode("html"),We=e.createNode("meta"),Ke=e.createNode("link"),Qe=e.createNode("style"),ze=e.createNode("script"),Je=e.createChildrenFirstNode("title"),Xe=e.createNode("base"),Ye=e.createChildrenFirstNode("abbr"),Ze=e.createChildrenFirstNode("b"),$e=e.createChildrenFirstNode("bdi"),_e=e.createChildrenFirstNode("bdo"),er=e.createChildrenFirstNode("cite"),rr=e.createChildrenFirstNode("data"),tr=e.createChildrenFirstNode("dfn"),or=e.createChildrenFirstNode("i"),dr=e.createChildrenFirstNode("kbd"),sr=e.createChildrenFirstNode("q"),ar=e.createChildrenFirstNode("rp"),ir=e.createChildrenFirstNode("rt"),pr=e.createNode("ruby"),cr=e.createChildrenFirstNode("s"),xr=e.createChildrenFirstNode("samp"),Nr=e.createChildrenFirstNode("sub"),lr=e.createChildrenFirstNode("sup"),nr=e.createChildrenFirstNode("time"),hr=e.createChildrenFirstNode("u"),Cr=e.createChildrenFirstNode("var"),ur=e.createNode("wbr"),Fr=e.createNode("hr"),gr=e.createNode("menu"),mr=e.createNode("search"),vr=e.createNode("embed"),Sr=e.createNode("object"),br=e.createNode("param"),fr=e.createNode("map"),yr=e.createNode("area"),Dr=e.createNode("datalist"),Tr=e.createNode("output"),Hr=e.createNode("progress"),kr=e.createNode("meter"),Ar=e.createNode("noscript"),Br=e.createNode("template"),Pr=e.createNode("hgroup");exports.A=Te,exports.Abbr=Ye,exports.Absolute=x,exports.Address=Oe,exports.Area=yr,exports.Article=Le,exports.Aside=Re,exports.Audio=oe,exports.B=Ze,exports.Base=Xe,exports.Bdi=$e,exports.Bdo=_e,exports.Blockquote=Ie,exports.Body=ke,exports.Br=k,exports.Button=O,exports.Canvas=ie,exports.Caption=$,exports.Center=i,exports.Cite=er,exports.Code=H,exports.Col=ee,exports.Colgroup=_,exports.Column=d,exports.Container=t,exports.Data=rr,exports.Datalist=Dr,exports.Dd=L,exports.Details=qe,exports.Dfn=tr,exports.Dialog=je,exports.Div=r,exports.Dl=R,exports.Dt=G,exports.Em=v,exports.Embed=vr,exports.Fieldset=U,exports.Figcaption=Ee,exports.Figure=Me,exports.Fixed=p,exports.Footer=Pe,exports.Form=M,exports.Grid=a,exports.H1=n,exports.H2=h,exports.H3=C,exports.H4=u,exports.H5=F,exports.H6=g,exports.Head=Ue,exports.Header=Be,exports.Hgroup=Pr,exports.Hr=Fr,exports.Html=Ve,exports.I=or,exports.Iframe=pe,exports.Img=re,exports.Input=I,exports.Kbd=dr,exports.Label=E,exports.Legend=V,exports.Li=P,exports.Link=Ke,exports.Main=Ae,exports.MapElement=fr,exports.Mark=b,exports.Menu=gr,exports.Meta=We,exports.Meter=kr,exports.Nav=He,exports.Noscript=Ar,exports.ObjectElement=Sr,exports.Ol=A,exports.Optgroup=W,exports.Option=w,exports.Output=Tr,exports.P=y,exports.Param=br,exports.Picture=de,exports.Pre=T,exports.Progress=Hr,exports.Q=sr,exports.Relative=c,exports.Root=o,exports.Row=s,exports.Rp=ar,exports.Rt=ir,exports.Ruby=pr,exports.S=cr,exports.Samp=xr,exports.Script=ze,exports.Search=mr,exports.Section=Ge,exports.Select=q,exports.Small=S,exports.Source=se,exports.Span=f,exports.Static=l,exports.Sticky=N,exports.Strong=m,exports.Style=Qe,exports.Sub=Nr,exports.Summary=we,exports.Sup=lr,exports.Svg=ce,exports.SvgCircle=Ne,exports.SvgDefs=ge,exports.SvgEllipse=le,exports.SvgG=fe,exports.SvgLine=ne,exports.SvgLinearGradient=me,exports.SvgPath=xe,exports.SvgPolygon=Ce,exports.SvgPolyline=he,exports.SvgRadialGradient=ve,exports.SvgRect=ue,exports.SvgStop=Se,exports.SvgSymbol=be,exports.SvgText=ye,exports.SvgTspan=De,exports.SvgUse=Fe,exports.Table=K,exports.Tbody=z,exports.Td=Z,exports.Template=Br,exports.Text=D,exports.Textarea=j,exports.Tfoot=J,exports.Th=Y,exports.Thead=Q,exports.Time=nr,exports.Title=Je,exports.Tr=X,exports.Track=ae,exports.U=hr,exports.Ul=B,exports.Var=Cr,exports.Video=te,exports.Wbr=ur;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../util/mount-tracker.util.cjs"),r=require("../core.node.cjs");exports.default=function({children:a,...n}){const{node:c,...l}=n,s=e.useEffectEvent(()=>{if(c.stableKey){r.BaseNode.elementCache.delete(c.stableKey),t.MountTrackerUtil.isMounted(c.stableKey)&&t.MountTrackerUtil.untrackMount(c.stableKey);try{r.BaseNode.cacheCleanupRegistry.unregister(c)}catch{}}c.lastSignature=void 0});return e.useEffect(()=>(c.stableKey&&t.MountTrackerUtil.trackMount(c.stableKey),()=>s()),[]),e.isValidElement(a)&&Object.keys(l).length>0?e.cloneElement(a,l):a};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),r=require("../core.node.cjs");const t=r.createNode(e.Fragment),s=r.createNode(e.Activity),c=r.createNode(e.Suspense);exports.Activity=s,exports.Fragment=t,exports.Suspense=c;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@emotion/react"),t=require("@emotion/cache"),n=require("../core.node.cjs"),o=require("next/navigation.js");exports.default=function({children:s}){const[i]=e.useState(()=>{const e=t({key:"meonode-css"});return e.compat=!0,e});return o.useServerInsertedHTML(()=>{const r=Object.keys(i.inserted).sort(),t=r.map(e=>i.inserted[e]).join(""),n=r.join(" ");return t?e.createElement("style",{"data-emotion":`${i.key} ${n}`,dangerouslySetInnerHTML:{__html:t}}):null}),n.Node(r.CacheProvider,{value:i,children:s}).render()};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@emotion/react"),r=require("./theme-provider.client.cjs"),s=require("../util/theme.util.cjs");function i({element:i,children:l,...o}){const c=e.useContext(r.ThemeContext),n=c?.theme,{css:u,...h}=o;let m=u,a=h;n&&(m=s.ThemeUtil.resolveObjWithTheme(u,n,{processFunctions:!0}),a=s.ThemeUtil.resolveObjWithTheme(h,n,{processFunctions:!1}));const d=s.ThemeUtil.resolveDefaultStyle(m);return t.jsx(i,{...a,css:d},l)}i.displayName="Styled",exports.default=i;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../core.node.cjs"),r=require("./theme-provider.client.cjs");const t=e.createNode(r.default);exports.ThemeProvider=t;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../core.node.cjs");const r=e.createContext(null);exports.ThemeContext=r,exports.default=function({children:o,theme:n}){const[c,u]=e.useState(n);if(!n)throw new Error("`theme` prop must be defined");const d={theme:c,setTheme:e=>{"function"==typeof e&&(e=e(c)),document.cookie=`theme=${e.mode}; path=/;`,u(e)}};return t.Node(r.Provider,{value:d,children:o}).render()};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),t=require("./helper/react-is.helper.cjs"),n=require("./helper/common.helper.cjs"),r=require("./components/styled-renderer.client.cjs"),o=require("./constant/common.const.cjs"),s=require("./util/mount-tracker.util.cjs"),a=require("./components/meonode-unmounter.client.cjs"),l=require("./util/navigation-cache-manager.util.cjs"),i=require("./util/node.util.cjs");const c=Symbol.for("@meonode/ui/BaseNode/elementCache"),d=Symbol.for("@meonode/ui/BaseNode/navigationStarted"),u=Symbol.for("@meonode/ui/BaseNode/renderContextPool"),h=Symbol.for("@meonode/ui/BaseNode/cacheCleanupRegistry"),p=Symbol.for("@meonode/ui/BaseNode/portalCleanupRegistry");class m{static _idCounter=0;instanceId="m"+ ++m._idCounter;element;rawProps={};isBaseNode=!0;_props;_deps;stableKey;lastPropsObj;lastSignature;static get elementCache(){return n.getGlobalState(c,()=>new Map)}static get _navigationStarted(){return n.getGlobalState(d,()=>({value:!1})).value}static set _navigationStarted(e){n.getGlobalState(d,()=>({value:!1})).value=e}static get renderContextPool(){return n.getGlobalState(u,()=>[])}static acquireRenderContext(){const e=m.renderContextPool;return e.length>0?e.pop():{workStack:new Array(512),renderedElements:new Map}}static releaseRenderContext(e){m.renderContextPool.length<50&&e.workStack.length<2048&&(e.workStack.length=0,e.renderedElements.clear(),m.renderContextPool.push(e))}constructor(e,r={},o){if(!t.isValidElementType(e)){const t=n.getComponentType(e);if(i.NodeUtil.isNodeInstance(e))throw new Error("Invalid element type: MeoNode UI instance provided!");throw new Error(`Invalid element type: ${t} provided!`)}this.element=e,this.rawProps=r,this._deps=o;const{ref:s,children:a,...c}=r;this.stableKey=this._getStableKey(c),i.NodeUtil.isServer||m._navigationStarted||(l.NavigationCacheManagerUtil.getInstance().start(),m._navigationStarted=!0)}get props(){return this._props||(this._props=i.NodeUtil.processProps(this.rawProps,this.stableKey)),this._props}get dependencies(){return this._deps}_getStableKey({key:e,...t}){if(i.NodeUtil.isServer)return;if(this.lastPropsObj===t)return this.lastSignature;this.lastPropsObj=t;const r=Object.keys(t),s=r.length;if(s>100){const e=i.NodeUtil.extractCriticalProps(t,r);this.lastSignature=i.NodeUtil.createPropSignature(this.element,e),o.__DEBUG__&&s>200&&console.warn(`MeoNode: Large props (${s} keys) on "${n.getElementTypeName(this.element)}". Consider splitting.`)}else this.lastSignature=i.NodeUtil.createPropSignature(this.element,t);return null!=e?`${String(e)}:${this.lastSignature}`:this.lastSignature}static get cacheCleanupRegistry(){return n.getGlobalState(h,()=>new FinalizationRegistry(e=>{const{cacheKey:t,instanceId:n}=e,r=m.elementCache.get(t);r?.instanceId===n&&m.elementCache.delete(t),s.MountTrackerUtil.isMounted(t)&&s.MountTrackerUtil.untrackMount(t)}))}static get portalCleanupRegistry(){return n.getGlobalState(p,()=>new FinalizationRegistry(e=>{const{domElement:t,reactRoot:n}=e;o.__DEBUG__&&console.log("[MeoNode] FinalizationRegistry auto-cleaning portal");try{n&&"function"==typeof n.unmount&&n.unmount()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal auto-cleanup unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal auto-cleanup DOM removal error:",e)}}))}render(o=!1){const s=i.NodeUtil.shouldCacheElement(this)?m.elementCache.get(this.stableKey):void 0,l=i.NodeUtil.shouldNodeUpdate(s?.prevDeps,this._deps,o);if(!l&&s?.renderedElement)return s.accessCount+=1,s.renderedElement;const c=!l,d=m.acquireRenderContext();let{workStack:u}=d;const{renderedElements:h}=d;let p=0;try{const o=e=>{if(e>u.length){const t=Math.max(e,u.length<<1),n=new Array(t);for(let e=0;e<p;e++)n[e]=u[e];u=n}};for(u[p++]={node:this,isProcessed:!1,blocked:c};p>0;){const s=u[p-1];if(!s){p--;continue}const{node:a,isProcessed:l,blocked:c}=s;if(l){p--;const{children:o,key:s,css:l,nativeProps:c,disableEmotion:d,...u}=a.props;let g=[];if(o){const e=Array.isArray(o)?o:[o],t=e.length;g=new Array(t);for(let n=0;n<t;n++){const t=e[n];if(i.NodeUtil.isNodeInstance(t)){const e=h.get(t);if(!e)throw new Error(`[MeoNode] Missing rendered element for child node: ${t.stableKey}`);g[n]=e}else g[n]=t}}const y={...u,key:s,...c};let _;if(a.element===e.Fragment||t.isFragment(a.element))_=e.createElement(a.element,{key:s},...g);else{_=!d&&(l||!n.hasNoStyleTag(a.element))?e.createElement(r.default,{element:a.element,...y,css:l,suppressHydrationWarning:!0},...g):e.createElement(a.element,y,...g)}if(a!==this&&i.NodeUtil.shouldCacheElement(a)){const e=m.elementCache.get(a.stableKey);if(e)e.prevDeps=a._deps,e.renderedElement=_,e.accessCount+=1;else{const e={prevDeps:a._deps,renderedElement:_,nodeRef:new WeakRef(a),createdAt:Date.now(),accessCount:1,instanceId:a.instanceId};m.elementCache.set(a.stableKey,e),m.cacheCleanupRegistry.register(a,{cacheKey:a.stableKey,instanceId:a.instanceId},a)}}h.set(a,_)}else{s.isProcessed=!0;const e=a.props.children;if(e){const t=Array.isArray(e)?e:[e];let n=0;for(let e=0;e<t.length;e++)i.NodeUtil.isNodeInstance(t[e])&&n++;o(p+n);for(let e=t.length-1;e>=0;e--){const n=t[e];if(!i.NodeUtil.isNodeInstance(n))continue;const r=i.NodeUtil.shouldCacheElement(n)?m.elementCache.get(n.stableKey):void 0,o=i.NodeUtil.shouldNodeUpdate(r?.prevDeps,n._deps,c);if(!o&&r?.renderedElement){h.set(n,r.renderedElement);continue}const s=c||!o;u[p++]={node:n,isProcessed:!1,blocked:s}}}}}let s=h.get(this);if(!i.NodeUtil.isServer&&this.stableKey&&(s=e.createElement(a.default,{node:this},s)),i.NodeUtil.shouldCacheElement(this)){const e=m.elementCache.get(this.stableKey);if(e)e.prevDeps=this._deps,e.renderedElement=s,e.accessCount+=1;else{const e={prevDeps:this._deps,renderedElement:s,nodeRef:new WeakRef(this),createdAt:Date.now(),accessCount:1,instanceId:this.instanceId};m.elementCache.set(this.stableKey,e),m.cacheCleanupRegistry.register(this,{cacheKey:this.stableKey,instanceId:this.instanceId},this)}}return s}finally{for(let e=0;e<p;e++)u[e]=null;m.releaseRenderContext({workStack:u,renderedElements:h})}}toPortal(){if(!i.NodeUtil.ensurePortalInfrastructure(this))throw new Error("toPortal() can only be called in a client-side environment");const e=i.NodeUtil.portalInfrastructure.get(this),{domElement:t,reactRoot:n}=e;(()=>{try{n.render(this.render())}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal render error:",e)}})();let r=!1;const s=n.unmount.bind(n);return n.unmount=()=>{if(r)o.__DEBUG__&&console.warn("[MeoNode] Portal already unmounted");else{r=!0;try{m.portalCleanupRegistry.unregister(this)}catch(e){o.__DEBUG__&&console.warn("[MeoNode] Portal unregister warning:",e)}i.NodeUtil.portalInfrastructure.delete(this);try{t?.isConnected&&s()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal DOM cleanup error:",e)}}},n}static clearCaches(){const e=Array.from(m.elementCache.keys());o.__DEBUG__&&console.log(`[MeoNode] clearCaches: Clearing ${e.length} entries`);for(const t of e){const e=m.elementCache.get(t);if(e){const n=e.nodeRef?.deref();if(n)try{m.cacheCleanupRegistry.unregister(n),n.lastSignature=void 0,n.lastPropsObj=void 0}catch{o.__DEBUG__&&console.warn(`[MeoNode] Could not unregister ${t} from FinalizationRegistry`)}}}m.elementCache.clear(),s.MountTrackerUtil.cleanup(),o.__DEBUG__&&console.log("[MeoNode] All caches cleared")}}function g(e,t={},n){return new m(e,t,n)}g.clearCaches=m.clearCaches,exports.BaseNode=m,exports.Node=g,exports.createChildrenFirstNode=function(e,t){const n=(n,r,o)=>g(e,{...t,...r,children:n},o);return n.element=e,n},exports.createNode=function(e,t){const n=(n,r)=>g(e,{...t,...n},r);return n.element=e,n};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./react-is.helper.cjs"),t=require("../constant/css-properties.const.cjs"),n=require("../constant/common.const.cjs");const r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};const o=t=>e.isForwardRef(t)?"forwardRef":e.isMemo(t)?"memo":e.isFragment(t)?"fragment":e.isPortal(t)?"portal":e.isProfiler(t)?"profiler":e.isStrictMode(t)?"strict-mode":e.isSuspense(t)?"suspense":e.isSuspenseList(t)?"suspense-list":e.isContextConsumer(t)?"context-consumer":e.isContextProvider(t)?"context-provider":e.isLazy(t)?"lazy":e.isElement(t)?"element":e.isReactClassComponent(t)?"class":typeof t;const s=new Set(t.default);exports.CSSPropertySet=s,exports.getCSSProps=function(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&s.has(n)&&(t[n]=e[n]);return t},exports.getComponentType=o,exports.getDOMProps=function(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&!s.has(n)&&(t[n]=e[n]);return t},exports.getElementTypeName=function e(t){function n(e,t){const n=e?.displayName||e?.name;return n&&"render"!==n?n:t}if(null==t)return"UnknownElementType";const r=t,s=o(r);switch(s){case"string":return t;case"class":return n(r,"ClassComponent");case"function":return n(r,"AnonymousFunctionComponent");case"forwardRef":return n(r,"")||n(r.render,"")||"ForwardRefComponent";case"memo":return n(r,"")||(r.type?e(r.type):"MemoComponent");case"element":return e(r.type);case"fragment":return"Fragment";case"portal":return"Portal";case"profiler":return n(r,"Profiler");case"strict-mode":return"StrictMode";case"suspense":return n(r,"Suspense");case"suspense-list":return"SuspenseList";case"context-consumer":return r._context?.displayName?`${r._context.displayName}.Consumer`:"ContextConsumer";case"context-provider":return r._context?.displayName?`${r._context.displayName}.Provider`:"ContextProvider";case"lazy":return n(r,"LazyComponent");case"object":return n(r,"")?n(r,""):"function"==typeof r.render?n(r.render,"ObjectWithRender"):r.type&&r.type!==t?`Wrapped<${e(r.type)}>`:n(r,"ObjectComponent");case"symbol":return"symbol"==typeof t?t.description?.replace(/^react\./,"").split(".").map(e=>e[0]?.toUpperCase()+e.slice(1)).join("")||t.toString():"SymbolComponent";case"unknown":return"UnknownElementType";default:return`UnsupportedType<${s}>`}},exports.getGlobalState=function(e,t){return e in r||(r[e]=t()),r[e]},exports.getValueByPath=(e,t)=>t.split(".").reduce((e,t)=>e&&void 0!==e[t]?e[t]:void 0,e),exports.hasNoStyleTag=function(e){return!(!e||"string"!=typeof e)&&n.noStyleTagsSet.has(e.toLowerCase())},exports.omitUndefined=function(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(t[n]=e[n]);return t};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../core.node.cjs"),r=require("../helper/common.helper.cjs"),n=require("../util/node.util.cjs");exports.Component=function(o){const t=r.getElementTypeName(o),s=r=>{const t=o(r);return t instanceof e.BaseNode||n.NodeUtil.isNodeInstance(t)?e.Node(t.element,t.rawProps).render():t};function i(r={},n){return e.Node(s,r,n).render()}return s.displayName=`Renderer(${t})`,i.displayName=`Component(${t})`,i};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../core.node.cjs");exports.Portal=function(n,o){let r,t,a={unmount:()=>{console.warn("Portal instance not yet created. Cannot unmount.")}};if("function"==typeof o&&n instanceof e.BaseNode)r=[n],t=o;else{if("function"!=typeof n||void 0!==o)throw new Error("Invalid arguments for Portal HOC. Use Portal(component) or Portal(providerNodeInstance, component).");t=n}const i=(n={})=>{const o=t({...n,portal:a});return o instanceof e.BaseNode?o.render():o};return function(n={}){let o;const t=[];n.provider&&t.push(n.provider);const s=[...r??[],...t],{provider:c,...d}=n,l=e.Node(i,d);function u(n,o){const r=n.rawProps?.children;if(!(r&&r instanceof e.BaseNode))return e.Node(n.element,{...n.rawProps,children:o});const t=u(r,o);return e.Node(n.element,{...n.rawProps,children:t})}return o=s.length>0?s.reduceRight((n,o)=>{if(!(o instanceof e.BaseNode))return console.warn("Portal: Item in provider is not a valid NodeInstance. Skipping.",o),n;return o.rawProps?.children instanceof e.BaseNode?u(o,n):e.Node(o.element,{...o.rawProps,children:n})},l):l,a=o.toPortal(),a}};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var e=require("react"),t=require("../components/theme-provider.client.cjs");exports.useTheme=()=>{const s=e.useContext(t.ThemeContext);if(!s)throw new Error("useTheme must be used within a ThemeProvider");const{theme:m}=s;return e.useEffect(()=>{const e=localStorage.getItem("theme");e&&e===m.mode||localStorage.setItem("theme",m.mode);const t=document.documentElement;"dark"===m.mode?(t.setAttribute("data-theme","dark"),t.classList.add("dark-theme"),t.classList.remove("light-theme")):(t.setAttribute("data-theme","light"),t.classList.add("light-theme"),t.classList.remove("dark-theme"))},[m.mode,m.system]),s};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./constant/common.const.cjs"),t=require("./core.node.cjs"),r=require("./hoc/portal.hoc.cjs"),o=require("./hoc/component.hoc.cjs");require("react");var s=require("./components/react.node.cjs"),p=require("./components/html.node.cjs"),x=require("./components/theme-provider.cjs"),a=require("./hook/useTheme.cjs");exports.setDebugMode=e.setDebugMode,exports.Node=t.Node,exports.createChildrenFirstNode=t.createChildrenFirstNode,exports.createNode=t.createNode,exports.Portal=r.Portal,exports.Component=o.Component,exports.Activity=s.Activity,exports.Fragment=s.Fragment,exports.Suspense=s.Suspense,exports.A=p.A,exports.Abbr=p.Abbr,exports.Absolute=p.Absolute,exports.Address=p.Address,exports.Area=p.Area,exports.Article=p.Article,exports.Aside=p.Aside,exports.Audio=p.Audio,exports.B=p.B,exports.Base=p.Base,exports.Bdi=p.Bdi,exports.Bdo=p.Bdo,exports.Blockquote=p.Blockquote,exports.Body=p.Body,exports.Br=p.Br,exports.Button=p.Button,exports.Canvas=p.Canvas,exports.Caption=p.Caption,exports.Center=p.Center,exports.Cite=p.Cite,exports.Code=p.Code,exports.Col=p.Col,exports.Colgroup=p.Colgroup,exports.Column=p.Column,exports.Container=p.Container,exports.Data=p.Data,exports.Datalist=p.Datalist,exports.Dd=p.Dd,exports.Details=p.Details,exports.Dfn=p.Dfn,exports.Dialog=p.Dialog,exports.Div=p.Div,exports.Dl=p.Dl,exports.Dt=p.Dt,exports.Em=p.Em,exports.Embed=p.Embed,exports.Fieldset=p.Fieldset,exports.Figcaption=p.Figcaption,exports.Figure=p.Figure,exports.Fixed=p.Fixed,exports.Footer=p.Footer,exports.Form=p.Form,exports.Grid=p.Grid,exports.H1=p.H1,exports.H2=p.H2,exports.H3=p.H3,exports.H4=p.H4,exports.H5=p.H5,exports.H6=p.H6,exports.Head=p.Head,exports.Header=p.Header,exports.Hgroup=p.Hgroup,exports.Hr=p.Hr,exports.Html=p.Html,exports.I=p.I,exports.Iframe=p.Iframe,exports.Img=p.Img,exports.Input=p.Input,exports.Kbd=p.Kbd,exports.Label=p.Label,exports.Legend=p.Legend,exports.Li=p.Li,exports.Link=p.Link,exports.Main=p.Main,exports.MapElement=p.MapElement,exports.Mark=p.Mark,exports.Menu=p.Menu,exports.Meta=p.Meta,exports.Meter=p.Meter,exports.Nav=p.Nav,exports.Noscript=p.Noscript,exports.ObjectElement=p.ObjectElement,exports.Ol=p.Ol,exports.Optgroup=p.Optgroup,exports.Option=p.Option,exports.Output=p.Output,exports.P=p.P,exports.Param=p.Param,exports.Picture=p.Picture,exports.Pre=p.Pre,exports.Progress=p.Progress,exports.Q=p.Q,exports.Relative=p.Relative,exports.Root=p.Root,exports.Row=p.Row,exports.Rp=p.Rp,exports.Rt=p.Rt,exports.Ruby=p.Ruby,exports.S=p.S,exports.Samp=p.Samp,exports.Script=p.Script,exports.Search=p.Search,exports.Section=p.Section,exports.Select=p.Select,exports.Small=p.Small,exports.Source=p.Source,exports.Span=p.Span,exports.Static=p.Static,exports.Sticky=p.Sticky,exports.Strong=p.Strong,exports.Style=p.Style,exports.Sub=p.Sub,exports.Summary=p.Summary,exports.Sup=p.Sup,exports.Svg=p.Svg,exports.SvgCircle=p.SvgCircle,exports.SvgDefs=p.SvgDefs,exports.SvgEllipse=p.SvgEllipse,exports.SvgG=p.SvgG,exports.SvgLine=p.SvgLine,exports.SvgLinearGradient=p.SvgLinearGradient,exports.SvgPath=p.SvgPath,exports.SvgPolygon=p.SvgPolygon,exports.SvgPolyline=p.SvgPolyline,exports.SvgRadialGradient=p.SvgRadialGradient,exports.SvgRect=p.SvgRect,exports.SvgStop=p.SvgStop,exports.SvgSymbol=p.SvgSymbol,exports.SvgText=p.SvgText,exports.SvgTspan=p.SvgTspan,exports.SvgUse=p.SvgUse,exports.Table=p.Table,exports.Tbody=p.Tbody,exports.Td=p.Td,exports.Template=p.Template,exports.Text=p.Text,exports.Textarea=p.Textarea,exports.Tfoot=p.Tfoot,exports.Th=p.Th,exports.Thead=p.Thead,exports.Time=p.Time,exports.Title=p.Title,exports.Tr=p.Tr,exports.Track=p.Track,exports.U=p.U,exports.Ul=p.Ul,exports.Var=p.Var,exports.Video=p.Video,exports.Wbr=p.Wbr,exports.ThemeProvider=x.ThemeProvider,exports.useTheme=a.useTheme;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../components/registry.client.cjs");const r=require("../core.node.cjs").createNode(e.default);exports.StyleRegistry=r;
@@ -0,0 +1 @@
1
+ "use strict";var t=require("../constant/common.const.cjs");class n{constructor(){}static _mountedCounts=new Map;static _unmountCallCount=new Map;static isMounted(t){return(this._mountedCounts.get(t)||0)>0}static trackMount(n){const o=this._mountedCounts.get(n)||0;this._mountedCounts.set(n,o+1),t.__DEBUG__&&this._unmountCallCount.delete(n)}static untrackMount(n){const o=this._mountedCounts.get(n)||0;if(o>0){const t=o-1;return 0===t?this._mountedCounts.delete(n):this._mountedCounts.set(n,t),t>0}if(t.__DEBUG__){const t=(this._unmountCallCount.get(n)||0)+1;this._unmountCallCount.set(n,t),t>1&&console.warn(`[MeoNode] untrackMount called ${t} times for an already unmounted node: ${n}. This could indicate a memory leak or a bug in a component's lifecycle.`)}return!1}static cleanup(){this._mountedCounts.clear(),t.__DEBUG__&&this._unmountCallCount.clear()}}exports.MountTrackerUtil=n;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../constant/common.const.cjs"),t=require("../core.node.cjs"),i=require("./mount-tracker.util.cjs");class a{constructor(){}static _instance=null;static _originalPushState=null;static _originalReplaceState=null;static _isPatched=!1;_isListening=!1;_cleanupTimeout=null;static getInstance(){return this._instance||(this._instance=new a),this._instance}start(){this._isListening||"undefined"==typeof window||(this._isListening=!0,window.addEventListener("popstate",this._handleNavigation),this._patchHistoryMethods(),this._setupAutoCleanup(),e.__DEBUG__&&console.log("[MeoNode] NavigationCacheManagerUtil started"))}_stop(){this._isListening&&"undefined"!=typeof window&&(window.removeEventListener("popstate",this._handleNavigation),this._cleanupTimeout&&(clearTimeout(this._cleanupTimeout),this._cleanupTimeout=null),this._isListening=!1,e.__DEBUG__&&console.log("[MeoNode] NavigationCacheManagerUtil stopped"))}_handleNavigation=()=>{this._cleanupTimeout&&clearTimeout(this._cleanupTimeout);const a=t.BaseNode.elementCache.size,n=a<100?50:a<500?100:200;this._cleanupTimeout=setTimeout(()=>{let a=0;t.BaseNode.elementCache.keys().forEach(e=>{i.MountTrackerUtil.isMounted(e)||(t.BaseNode.elementCache.delete(e),a++)}),e.__DEBUG__&&console.log(`[MeoNode] Navigation: cleared ${a} unmounted elements`)},n)};_patchHistoryMethods(){a._isPatched||(a._originalPushState=history.pushState,a._originalReplaceState=history.replaceState,history.pushState=(...e)=>{a._originalPushState.apply(history,e),this._handleNavigation()},history.replaceState=(...e)=>{a._originalReplaceState.apply(history,e),this._handleNavigation()},a._isPatched=!0)}_setupAutoCleanup(){window.__MEONODE_CLEANUP_REGISTERED||(window.addEventListener("beforeunload",()=>{this._stop(),t.BaseNode.clearCaches()}),window.__MEONODE_CLEANUP_REGISTERED=!0)}}exports.NavigationCacheManagerUtil=a;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),t=require("../helper/react-is.helper.cjs"),r=require("../helper/common.helper.cjs"),o=require("../constant/common.const.cjs"),n=require("../core.node.cjs"),s=require("react-dom/client");const i=Symbol.for("@meonode/ui/NodeUtil/functionSignatureCache"),a=Symbol.for("@meonode/ui/NodeUtil/portalInfrastructure");class c{constructor(){}static isServer="undefined"==typeof window;static get _functionSignatureCache(){return r.getGlobalState(i,()=>new WeakMap)}static CRITICAL_PROPS=new Set(["css","className","disableEmotion","props"]);static _propFuncCache=new WeakMap;static get portalInfrastructure(){return r.getGlobalState(a,()=>new WeakMap)}static isNodeInstance=e=>e instanceof n.BaseNode;static isStyleProp=c.isServer||"undefined"==typeof document?()=>!1:e=>e in document.body.style;static hashString(e){let t=2166136261,r=5381;for(let o=0;o<e.length;o++){const n=e.charCodeAt(o);t^=n,t=Math.imul(t,16777619),r=Math.imul(r,33)^n}return`${(t>>>0).toString(36)}_${(r>>>0).toString(36)}`}static hashCSS(e){const t=Object.keys(e);let r=t.length;for(let o=0;o<Math.min(t.length,10);o++){const n=t[o],s=e[n];r=(r<<5)-r+n.charCodeAt(0),r&=r,"string"==typeof s&&(r=(r<<5)-r+s.length)}return r.toString(36)}static createPropSignature(e,t){if(c.isServer)return;const o=r.getElementTypeName(e),n=Object.keys(t);n.length>1&&n.sort();const s=[`${o}:`];if("function"==typeof e){let t=c._functionSignatureCache.get(e);t||(t=c.hashString(e.toString()),c._functionSignatureCache.set(e,t)),s.push(t)}for(const e of n){const r=t[e];let o;const n=typeof r;if("string"===n||"number"===n||"boolean"===n)o=`${e}:${r};`;else if(null===r)o=`${e}:null;`;else if(void 0===r)o=`${e}:undefined;`;else if("css"===e&&"object"==typeof r)o=`css:${this.hashCSS(r)};`;else if(Array.isArray(r)){const t=r.filter(e=>{const t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===e});o=t.length===r.length?`${e}:[${t.join(",")}];`:`${e}:[${r.length}];`}else if(r&&r.isBaseNode)o=`${e}:${r.stableKey};`;else if("function"===n){let t=c._propFuncCache.get(r);t||(t=c.hashString(r.toString()),c._propFuncCache.set(r,t)),o=`${e}:${t};`}else{o=`${e}:{${Object.keys(r).sort().join(",")}};`}s.push(o)}return c.hashString(s.join(","))}static extractCriticalProps(e,t){const r={_keyCount:t.length};let o=0;for(const n of t){if(o>=50)break;if(c.CRITICAL_PROPS.has(n)){r[n]=e[n],o++;continue}const s=n.charCodeAt(0);111!==s||110!==n.charCodeAt(1)?!(97===s&&114===n.charCodeAt(1)&&105===n.charCodeAt(2)&&97===n.charCodeAt(3)||100===s&&97===n.charCodeAt(1)&&116===n.charCodeAt(2)&&97===n.charCodeAt(3))?t.length<=100&&c.isStyleProp(n)&&(r[n]=e[n],o++):(r[n]=e[n],o++):(r[n]=e[n],o++)}return r}static processProps(e={},t){const{ref:o,key:n,children:s,css:i,props:a={},disableEmotion:d,...l}=e;if(0===Object.keys(l).length&&!i)return r.omitUndefined({ref:o,key:n,disableEmotion:d,nativeProps:r.omitUndefined(a),children:c._processChildren(s,d)});const u={},p={},f=Object.keys(l);for(let e=0;e<f.length;e++){const t=f[e],r=l[t],o=typeof r;"string"===o||"number"===o||"boolean"===o?u[t]=r:p[t]=r}const m=r.getCSSProps(u),h=r.getCSSProps(p),y=r.getDOMProps(l),g={...m,...h,...i},b=c._processChildren(s,d,t);return r.omitUndefined({ref:o,key:n,css:g,...y,disableEmotion:d,nativeProps:r.omitUndefined(a),children:b})}static _processChildren(e,t,r){if(e)return"function"==typeof e?e:Array.isArray(e)?1===e.length?c.processRawNode(e[0],t,`${r}_0`):e.map((e,o)=>c.processRawNode(e,t,`${r}_${o}`)):c.processRawNode(e,t,r)}static shouldCacheElement(e){return!c.isServer&&!!e.stableKey&&!!e.dependencies}static shouldNodeUpdate(e,t,r){if(c.isServer)return!0;if(r)return!1;if(void 0===t)return!0;if(void 0===e)return!0;if(t.length!==e.length)return!0;for(let r=0;r<t.length;r++)if(!Object.is(t[r],e[r]))return!0;return!1}static processRawNode(r,o,s){if(null==r||"string"==typeof r||"number"==typeof r||"boolean"==typeof r)return r;if(c.isNodeInstance(r)){if(s||o&&!r.rawProps.disableEmotion){const e=new n.BaseNode(r.element,r.rawProps,r.dependencies);return e.stableKey=`${s}:${e.stableKey}`,o&&!e.rawProps.disableEmotion&&(e.rawProps.disableEmotion=!0),e}return r}if(c.isFunctionChild(r))return new n.BaseNode(c.functionRenderer,{props:{render:r,disableEmotion:o}},void 0);if(e.isValidElement(r)){if("string"==typeof r.type){const{style:e,...t}=r.props,s={...t,...e||{}};return new n.BaseNode(r.type,{...s,...null!==r.key&&void 0!==r.key?{key:r.key}:{},disableEmotion:o},void 0)}return new n.BaseNode(r.type,{...r.props,...null!==r.key&&void 0!==r.key?{key:r.key}:{},disableEmotion:o},void 0)}return t.isReactClassComponent(r)||t.isMemo(r)||t.isForwardRef(r)?new n.BaseNode(r,{disableEmotion:o},void 0):r instanceof e.Component?c.processRawNode(r.render(),o,s):r}static isFunctionChild(e){if("function"!=typeof e||t.isReactClassComponent(e)||t.isMemo(e)||t.isForwardRef(e))return!1;try{return!(e.prototype&&"function"==typeof e.prototype.render)}catch(e){return o.__DEBUG__&&console.error("MeoNode: Error checking if a node is a function child.",e),!0}}static functionRenderer({render:t,disableEmotion:s}){let i;try{i=t()}catch(e){o.__DEBUG__&&console.error("MeoNode: Error executing function-as-a-child.",e),i=null}if(null==i||"string"==typeof i||"number"==typeof i||"boolean"==typeof i)return i;if(c.isNodeInstance(i))return s&&!i.rawProps.disableEmotion?new n.BaseNode(i.element,{...i.rawProps,disableEmotion:!0}).render():i.render();if(Array.isArray(i)){const e=(e,t)=>{try{return`${r.getElementTypeName(e)}-${t}`}catch(e){return o.__DEBUG__&&console.error("MeoNode: Could not determine element type name for key in function-as-a-child.",e),`item-${t}`}};return i.map((t,r)=>c.renderProcessedNode({processedElement:c.processRawNode(t,s),passedKey:e(t,r),disableEmotion:s}))}if(i instanceof e.Component)return c.renderProcessedNode({processedElement:c.processRawNode(i.render(),s),disableEmotion:s});const a=c.processRawNode(i,s);return a?c.renderProcessedNode({processedElement:a,disableEmotion:s}):i}static renderProcessedNode({processedElement:r,passedKey:o,disableEmotion:s}){const i={};if(void 0!==o&&(i.key=o),c.isNodeInstance(r)){const e=r.rawProps?.key;return r.rawProps.disableEmotion=s,e===o?r.render():new n.BaseNode(r.element,{...r.rawProps,...i}).render()}return t.isReactClassComponent(r)?new n.BaseNode(r,{...i,disableEmotion:s}).render():r instanceof e.Component?r.render():"function"==typeof r?e.createElement(r,{key:o}):r}static ensurePortalInfrastructure(e){if(c.isServer)return!1;let t=c.portalInfrastructure.get(e);if(t?.domElement?.isConnected&&t?.reactRoot)return!0;if(t&&(!t.domElement?.isConnected||!t.reactRoot)){try{t.reactRoot?.unmount?.()}catch(e){o.__DEBUG__&&console.error("MeoNode: Error unmounting stale portal root.",e)}c.cleanupPortalInfra(t),c.portalInfrastructure.delete(e),t=void 0}const r=document.createElement("div");document.body.appendChild(r);const i=s.createRoot(r),a={render:i.render.bind(i),unmount:i.unmount.bind(i),update:()=>{}};return t={domElement:r,reactRoot:a,instanceId:e.instanceId},c.portalInfrastructure.set(e,t),n.BaseNode.portalCleanupRegistry.register(e,{domElement:r,reactRoot:a},e),!0}static cleanupPortalInfra(e){try{e.reactRoot?.unmount&&e.reactRoot.unmount()}catch(e){o.__DEBUG__&&console.error("Portal cleanup error:",e)}try{e.domElement?.isConnected&&e.domElement.remove()}catch(e){o.__DEBUG__&&console.error("DOM removal error:",e)}}}exports.NodeUtil=c;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../helper/common.helper.cjs");class t{constructor(){}static parseFlexShorthand(e){if(null==e)return null;if("number"==typeof e)return{grow:e,shrink:1,basis:"0%"};if("string"!=typeof e)return null;const t=e.trim().toLowerCase();if(!t)return null;switch(t){case"none":return{grow:0,shrink:0,basis:"auto"};case"auto":return{grow:1,shrink:1,basis:"auto"};case"initial":return{grow:0,shrink:1,basis:"auto"};default:return null}}static isPlainObject=e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype};static resolveObjWithTheme=(r,l,s={})=>{const{processFunctions:n=!1}=s;if(!l||!l.system||"object"!=typeof l.system||0===Object.keys(l.system).length||!r||0===Object.keys(r).length)return r;const i=l.system,o=[{value:r,isProcessed:!1}],a=new Map,c=new Set,u=/theme\.([a-zA-Z0-9_.-]+)/g,f=t=>{u.lastIndex=0;let r=!1;const l=t.replace(u,(t,l)=>{const s=e.getValueByPath(i,l);if(null!=s){if(r=!0,"object"==typeof s){if(!Array.isArray(s)&&"default"in s)return s.default;throw new Error("The provided theme path is invalid!")}return s}return t});return r?l:t};for(;o.length>0;){const e=o[o.length-1],r=e.value;if(t.isPlainObject(r)||Array.isArray(r))if(a.has(r))o.pop();else if(e.isProcessed){o.pop(),c.delete(r);let e=r;if(Array.isArray(r)){let t=null;for(let e=0;e<r.length;e++){const l=r[e],s=a.get(l)??l;s!==l&&(null===t&&(t=[...r]),t[e]=s)}null!==t&&(e=t)}else{let t=null;for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e];let i=a.get(s)??s,o=e;if("string"==typeof e&&e.includes("theme.")&&(o=f(e)),"function"==typeof i&&n){const e=i(l);i="string"==typeof e&&e.includes("theme.")?f(e):e}else"string"==typeof i&&i.includes("theme.")&&(i=f(i));i===s&&o===e||(null===t&&(t={...r}),o!==e&&delete t[e],t[o]=i)}null!==t&&(e=t)}a.set(r,e)}else{e.isProcessed=!0,c.add(r);const l=Array.isArray(r)?r:Object.values(r);for(let e=l.length-1;e>=0;e--){const r=l[e];!t.isPlainObject(r)&&!Array.isArray(r)||c.has(r)||o.push({value:r,isProcessed:!1})}}else o.pop()}return a.get(r)??r};static resolveDefaultStyle=e=>{if(null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e)return{};const{flex:r,...l}=e,s="flex"===l.display||"inline-flex"===l.display,n=!!(l.overflow||l.overflowY||l.overflowX),i=l.flexFlow?.includes("wrap")||"wrap"===l.flexWrap||"wrap-reverse"===l.flexWrap,o="flexShrink"in e&&void 0!==e.flexShrink,a=r?t.parseFlexShorthand(r):null;let c;if(!o)if(a)c=a.shrink;else if(s){if(!n){const e="column"===l.flexDirection||"column-reverse"===l.flexDirection,t="row"===l.flexDirection||"row-reverse"===l.flexDirection||!l.flexDirection;(e&&!i||t&&!i)&&(c=0)}}else c=0;return{flex:r,flexShrink:c,minHeight:0,minWidth:0,...l}}}exports.ThemeUtil=t;
@@ -1 +1 @@
1
- {"version":3,"file":"meonode-unmounter.client.d.ts","sourceRoot":"","sources":["../../../src/components/meonode-unmounter.client.ts"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAG/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CA0CxH"}
1
+ {"version":3,"file":"meonode-unmounter.client.d.ts","sourceRoot":"","sources":["../../../src/components/meonode-unmounter.client.ts"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAG/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CA8CxH"}
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{useEffectEvent as e,useEffect as t,isValidElement as r,cloneElement as a}from"react";import{MountTrackerUtil as n}from"../util/mount-tracker.util.js";import{BaseNode as o}from"../core.node.js";function l({children:l,...s}){const{node:u,...c}=s,i=e(()=>{u.stableKey&&(o.elementCache.delete(u.stableKey),n.isMounted(u.stableKey)&&n.untrackMount(u.stableKey),o.cacheCleanupRegistry.unregister(u)),u.lastSignature=void 0});return t(()=>(u.stableKey&&n.trackMount(u.stableKey),()=>i()),[]),r(l)&&Object.keys(c).length>0?a(l,c):l}export{l as default};
2
+ import{useEffectEvent as e,useEffect as t,isValidElement as r,cloneElement as a}from"react";import{MountTrackerUtil as n}from"../util/mount-tracker.util.js";import{BaseNode as o}from"../core.node.js";function l({children:l,...s}){const{node:c,...i}=s,u=e(()=>{if(c.stableKey){o.elementCache.delete(c.stableKey),n.isMounted(c.stableKey)&&n.untrackMount(c.stableKey);try{o.cacheCleanupRegistry.unregister(c)}catch{}}c.lastSignature=void 0});return t(()=>(c.stableKey&&n.trackMount(c.stableKey),()=>u()),[]),r(l)&&Object.keys(i).length>0?a(l,i):l}export{l as default};
@@ -8,10 +8,11 @@ import type { Children, DependencyList, ElementCacheEntry, FinalNodeProps, HasRe
8
8
  * @template E - The type of React element or component this node represents.
9
9
  */
10
10
  export declare class BaseNode<E extends NodeElementType = NodeElementType> {
11
+ private static _idCounter;
11
12
  instanceId: string;
12
13
  element: E;
13
14
  rawProps: Partial<NodeProps<E>>;
14
- readonly isBaseNode: boolean;
15
+ readonly isBaseNode = true;
15
16
  private _props?;
16
17
  private readonly _deps?;
17
18
  stableKey?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../../src/core.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEX,eAAe,EACf,YAAY,EACZ,UAAU,EACV,SAAS,EACT,OAAO,EAER,MAAM,yBAAyB,CAAA;AAgBhC;;;;;;GAMG;AACH,qBAAa,QAAQ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EAAE,sBAAsB,EAAE,iBAAiB,CAAC,GACvE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GACxC,CAAC,CAAC,eAAe,GAAG,SAAS,EAAE,UAAU,SAAS,MAAM,GAAG,MAAM,EAC/D,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,eAAe,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,EACzE,IAAI,CAAC,EAAE,cAAc,KAClB,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,GACtC,CAAC,CAAC,eAAe,GAAG,SAAS,EAAE,UAAU,SAAS,MAAM,GAAG,MAAM,EAC/D,QAAQ,CAAC,EAAE,QAAQ,EACnB,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,eAAe,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,EAC1E,IAAI,CAAC,EAAE,cAAc,KAClB,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IACtB,OAAO,EAAE,CAAC,CAAA;CACX,CAQJ"}
@@ -1 +1 @@
1
- import{isValidElement as e,Fragment as t,createElement as n}from"react";import{isValidElementType as r,isFragment as o}from"./helper/react-is.helper.js";import{getGlobalState as s,getComponentType as a,hasNoStyleTag as l,getElementTypeName as i}from"./helper/common.helper.js";import c from"./components/styled-renderer.client.js";import{__DEBUG__ as d}from"./constant/common.const.js";import{MountTrackerUtil as h}from"./util/mount-tracker.util.js";import u from"./components/meonode-unmounter.client.js";import{NavigationCacheManagerUtil as m}from"./util/navigation-cache-manager.util.js";import{NodeUtil as p}from"./util/node.util.js";const g=Symbol.for("@meonode/ui/BaseNode/elementCache"),y=Symbol.for("@meonode/ui/BaseNode/navigationStarted"),f=Symbol.for("@meonode/ui/BaseNode/renderContextPool"),C=Symbol.for("@meonode/ui/BaseNode/cacheCleanupRegistry"),w=Symbol.for("@meonode/ui/BaseNode/portalCleanupRegistry");class P{instanceId=Math.random().toString(36).slice(2)+Date.now().toString(36);element;rawProps={};isBaseNode=!0;_props;_deps;stableKey;lastPropsObj;lastSignature;static get elementCache(){return s(g,()=>new Map)}static get _navigationStarted(){return s(y,()=>({value:!1})).value}static set _navigationStarted(e){s(y,()=>({value:!1})).value=e}static get renderContextPool(){return s(f,()=>[])}static acquireRenderContext(){const e=P.renderContextPool;return e.length>0?e.pop():{workStack:new Array(512),renderedElements:new Map}}static releaseRenderContext(e){P.renderContextPool.length<50&&e.workStack.length<2048&&(e.workStack.length=0,e.renderedElements.clear(),P.renderContextPool.push(e))}constructor(e,t={},n){if(!r(e)){const t=a(e);throw new Error(`Invalid element type: ${t} provided!`)}this.element=e,this.rawProps=t,this._deps=n;const{ref:o,children:s,...l}=t;this.stableKey=this._getStableKey(l),p.isServer||P._navigationStarted||(m.getInstance().start(),P._navigationStarted=!0)}get props(){return this._props||(this._props=p.processProps(this.element,this.rawProps,this.stableKey)),this._props}get dependencies(){return this._deps}_getStableKey({key:e,...t}){if(p.isServer)return;if(this.lastPropsObj===t)return this.lastSignature;this.lastPropsObj=t;const n=Object.keys(t),r=n.length;if(r>100){const e=p.extractCriticalProps(t,n);this.lastSignature=p.createPropSignature(this.element,e),d&&r>200&&console.warn(`MeoNode: Large props (${r} keys) on "${i(this.element)}". Consider splitting.`)}else this.lastSignature=p.createPropSignature(this.element,t);return null!=e?`${String(e)}:${this.lastSignature}`:this.lastSignature}static get cacheCleanupRegistry(){return s(C,()=>new FinalizationRegistry(e=>{const{cacheKey:t,instanceId:n}=e,r=P.elementCache.get(t);r?.instanceId===n&&P.elementCache.delete(t),h.isMounted(t)&&h.untrackMount(t)}))}static get portalCleanupRegistry(){return s(w,()=>new FinalizationRegistry(e=>{const{domElement:t,reactRoot:n}=e;d&&console.log("[MeoNode] FinalizationRegistry auto-cleaning portal");try{n&&"function"==typeof n.unmount&&n.unmount()}catch(e){d&&console.error("[MeoNode] Portal auto-cleanup unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){d&&console.error("[MeoNode] Portal auto-cleanup DOM removal error:",e)}}))}render(r=!1){const s=p.shouldCacheElement(this)?P.elementCache.get(this.stableKey):void 0,a=p.shouldNodeUpdate(s?.prevDeps,this._deps,r);if(!a&&s?.renderedElement)return s.accessCount+=1,s.renderedElement;const i=!a,d=P.acquireRenderContext();let{workStack:h}=d;const{renderedElements:m}=d;let g=0;try{const r=e=>{if(e>h.length){const t=Math.max(e,h.length<<1),n=new Array(t);for(let e=0;e<g;e++)n[e]=h[e];h=n}};for(h[g++]={node:this,isProcessed:!1,blocked:i};g>0;){const s=h[g-1];if(!s){g--;continue}const{node:a,isProcessed:i,blocked:d}=s;if(i){g--;const{children:r,key:s,css:i,nativeProps:d,disableEmotion:h,...u}=a.props;let y=[];if(r){const t=Array.isArray(r)?r:[r],n=t.length;y=new Array(n);for(let r=0;r<n;r++){const n=t[r];if(p.isNodeInstance(n)){const e=m.get(n);if(!e)throw new Error(`[MeoNode] Missing rendered element for child node: ${n.stableKey}`);y[r]=e}else e(n),y[r]=n}}const f={...u,key:s,...d};let C;if(a.element===t||o(a.element))C=n(a.element,{key:s},...y);else{C=!h&&(i||!l(a.element))?n(c,{element:a.element,...f,css:i,suppressHydrationWarning:!0},...y):n(a.element,f,...y)}if(a!==this&&p.shouldCacheElement(a)){const e=P.elementCache.get(a.stableKey);if(e)e.prevDeps=a._deps,e.renderedElement=C,e.accessCount+=1;else{const e={prevDeps:a._deps,renderedElement:C,nodeRef:new WeakRef(a),createdAt:Date.now(),accessCount:1,instanceId:a.instanceId};P.elementCache.set(a.stableKey,e),P.cacheCleanupRegistry.register(a,{cacheKey:a.stableKey,instanceId:a.instanceId},a)}}m.set(a,C)}else{s.isProcessed=!0;const e=a.props.children;if(e){const t=(Array.isArray(e)?e:[e]).filter(p.isNodeInstance);r(g+t.length);for(let e=t.length-1;e>=0;e--){const n=t[e],r=p.shouldCacheElement(n)?P.elementCache.get(n.stableKey):void 0,o=p.shouldNodeUpdate(r?.prevDeps,n._deps,d);if(!o&&r?.renderedElement){m.set(n,r.renderedElement);continue}const s=d||!o;h[g++]={node:n,isProcessed:!1,blocked:s}}}}}let s=m.get(this);if(!p.isServer&&this.stableKey&&(s=n(u,{node:this},s)),p.shouldCacheElement(this)){const e=P.elementCache.get(this.stableKey);if(e)e.prevDeps=this._deps,e.renderedElement=s,e.accessCount+=1;else{const e={prevDeps:this._deps,renderedElement:s,nodeRef:new WeakRef(this),createdAt:Date.now(),accessCount:1,instanceId:this.instanceId};P.elementCache.set(this.stableKey,e),P.cacheCleanupRegistry.register(this,{cacheKey:this.stableKey,instanceId:this.instanceId},this)}}return s}finally{for(let e=0;e<g;e++)h[e]=null;P.releaseRenderContext({workStack:h,renderedElements:m})}}toPortal(){if(!p.ensurePortalInfrastructure(this))throw new Error("toPortal() can only be called in a client-side environment");const e=p.portalInfrastructure.get(this),{domElement:t,reactRoot:n}=e;(()=>{try{n.render(this.render())}catch(e){d&&console.error("[MeoNode] Portal render error:",e)}})();let r=!1;const o=n.unmount.bind(n);return n.update=e=>{if(r)d&&console.warn("[MeoNode] Attempt to update already-unmounted portal");else try{const t=p.isNodeInstance(e)?e.render():e;n.render(t)}catch(e){d&&console.error("[MeoNode] Portal update error:",e)}},n.unmount=()=>{if(r)d&&console.warn("[MeoNode] Portal already unmounted");else{r=!0;try{P.portalCleanupRegistry.unregister(this)}catch(e){d&&console.warn("[MeoNode] Portal unregister warning:",e)}p.portalInfrastructure.delete(this);try{t?.isConnected&&o()}catch(e){d&&console.error("[MeoNode] Portal unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){d&&console.error("[MeoNode] Portal DOM cleanup error:",e)}}},n}static clearCaches(){const e=Array.from(P.elementCache.keys());d&&console.log(`[MeoNode] clearCaches: Clearing ${e.length} entries`);for(const t of e){const e=P.elementCache.get(t);if(e){const n=e.nodeRef?.deref();if(n)try{P.cacheCleanupRegistry.unregister(n),n.lastSignature=void 0,n.lastPropsObj=void 0}catch{d&&console.warn(`[MeoNode] Could not unregister ${t} from FinalizationRegistry`)}}}P.elementCache.clear(),h.cleanup(),d&&console.log("[MeoNode] All caches cleared")}}function S(e,t={},n){return new P(e,t,n)}function b(e,t){const n=(n,r)=>S(e,{...t,...n},r);return n.element=e,n}function v(e,t){const n=(n,r,o)=>S(e,{...t,...r,children:n},o);return n.element=e,n}S.clearCaches=P.clearCaches;export{P as BaseNode,S as Node,v as createChildrenFirstNode,b as createNode};
1
+ import{Fragment as e,createElement as t}from"react";import{isValidElementType as n,isFragment as r}from"./helper/react-is.helper.js";import{getGlobalState as o,getComponentType as s,hasNoStyleTag as a,getElementTypeName as i}from"./helper/common.helper.js";import l from"./components/styled-renderer.client.js";import{__DEBUG__ as c}from"./constant/common.const.js";import{MountTrackerUtil as d}from"./util/mount-tracker.util.js";import h from"./components/meonode-unmounter.client.js";import{NavigationCacheManagerUtil as u}from"./util/navigation-cache-manager.util.js";import{NodeUtil as m}from"./util/node.util.js";const p=Symbol.for("@meonode/ui/BaseNode/elementCache"),g=Symbol.for("@meonode/ui/BaseNode/navigationStarted"),y=Symbol.for("@meonode/ui/BaseNode/renderContextPool"),f=Symbol.for("@meonode/ui/BaseNode/cacheCleanupRegistry"),C=Symbol.for("@meonode/ui/BaseNode/portalCleanupRegistry");class w{static _idCounter=0;instanceId="m"+ ++w._idCounter;element;rawProps={};isBaseNode=!0;_props;_deps;stableKey;lastPropsObj;lastSignature;static get elementCache(){return o(p,()=>new Map)}static get _navigationStarted(){return o(g,()=>({value:!1})).value}static set _navigationStarted(e){o(g,()=>({value:!1})).value=e}static get renderContextPool(){return o(y,()=>[])}static acquireRenderContext(){const e=w.renderContextPool;return e.length>0?e.pop():{workStack:new Array(512),renderedElements:new Map}}static releaseRenderContext(e){w.renderContextPool.length<50&&e.workStack.length<2048&&(e.workStack.length=0,e.renderedElements.clear(),w.renderContextPool.push(e))}constructor(e,t={},r){if(!n(e)){const t=s(e);if(m.isNodeInstance(e))throw new Error("Invalid element type: MeoNode UI instance provided!");throw new Error(`Invalid element type: ${t} provided!`)}this.element=e,this.rawProps=t,this._deps=r;const{ref:o,children:a,...i}=t;this.stableKey=this._getStableKey(i),m.isServer||w._navigationStarted||(u.getInstance().start(),w._navigationStarted=!0)}get props(){return this._props||(this._props=m.processProps(this.rawProps,this.stableKey)),this._props}get dependencies(){return this._deps}_getStableKey({key:e,...t}){if(m.isServer)return;if(this.lastPropsObj===t)return this.lastSignature;this.lastPropsObj=t;const n=Object.keys(t),r=n.length;if(r>100){const e=m.extractCriticalProps(t,n);this.lastSignature=m.createPropSignature(this.element,e),c&&r>200&&console.warn(`MeoNode: Large props (${r} keys) on "${i(this.element)}". Consider splitting.`)}else this.lastSignature=m.createPropSignature(this.element,t);return null!=e?`${String(e)}:${this.lastSignature}`:this.lastSignature}static get cacheCleanupRegistry(){return o(f,()=>new FinalizationRegistry(e=>{const{cacheKey:t,instanceId:n}=e,r=w.elementCache.get(t);r?.instanceId===n&&w.elementCache.delete(t),d.isMounted(t)&&d.untrackMount(t)}))}static get portalCleanupRegistry(){return o(C,()=>new FinalizationRegistry(e=>{const{domElement:t,reactRoot:n}=e;c&&console.log("[MeoNode] FinalizationRegistry auto-cleaning portal");try{n&&"function"==typeof n.unmount&&n.unmount()}catch(e){c&&console.error("[MeoNode] Portal auto-cleanup unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){c&&console.error("[MeoNode] Portal auto-cleanup DOM removal error:",e)}}))}render(n=!1){const o=m.shouldCacheElement(this)?w.elementCache.get(this.stableKey):void 0,s=m.shouldNodeUpdate(o?.prevDeps,this._deps,n);if(!s&&o?.renderedElement)return o.accessCount+=1,o.renderedElement;const i=!s,c=w.acquireRenderContext();let{workStack:d}=c;const{renderedElements:u}=c;let p=0;try{const n=e=>{if(e>d.length){const t=Math.max(e,d.length<<1),n=new Array(t);for(let e=0;e<p;e++)n[e]=d[e];d=n}};for(d[p++]={node:this,isProcessed:!1,blocked:i};p>0;){const o=d[p-1];if(!o){p--;continue}const{node:s,isProcessed:i,blocked:c}=o;if(i){p--;const{children:n,key:o,css:i,nativeProps:c,disableEmotion:d,...h}=s.props;let g=[];if(n){const e=Array.isArray(n)?n:[n],t=e.length;g=new Array(t);for(let n=0;n<t;n++){const t=e[n];if(m.isNodeInstance(t)){const e=u.get(t);if(!e)throw new Error(`[MeoNode] Missing rendered element for child node: ${t.stableKey}`);g[n]=e}else g[n]=t}}const y={...h,key:o,...c};let f;if(s.element===e||r(s.element))f=t(s.element,{key:o},...g);else{f=!d&&(i||!a(s.element))?t(l,{element:s.element,...y,css:i,suppressHydrationWarning:!0},...g):t(s.element,y,...g)}if(s!==this&&m.shouldCacheElement(s)){const e=w.elementCache.get(s.stableKey);if(e)e.prevDeps=s._deps,e.renderedElement=f,e.accessCount+=1;else{const e={prevDeps:s._deps,renderedElement:f,nodeRef:new WeakRef(s),createdAt:Date.now(),accessCount:1,instanceId:s.instanceId};w.elementCache.set(s.stableKey,e),w.cacheCleanupRegistry.register(s,{cacheKey:s.stableKey,instanceId:s.instanceId},s)}}u.set(s,f)}else{o.isProcessed=!0;const e=s.props.children;if(e){const t=Array.isArray(e)?e:[e];let r=0;for(let e=0;e<t.length;e++)m.isNodeInstance(t[e])&&r++;n(p+r);for(let e=t.length-1;e>=0;e--){const n=t[e];if(!m.isNodeInstance(n))continue;const r=m.shouldCacheElement(n)?w.elementCache.get(n.stableKey):void 0,o=m.shouldNodeUpdate(r?.prevDeps,n._deps,c);if(!o&&r?.renderedElement){u.set(n,r.renderedElement);continue}const s=c||!o;d[p++]={node:n,isProcessed:!1,blocked:s}}}}}let o=u.get(this);if(!m.isServer&&this.stableKey&&(o=t(h,{node:this},o)),m.shouldCacheElement(this)){const e=w.elementCache.get(this.stableKey);if(e)e.prevDeps=this._deps,e.renderedElement=o,e.accessCount+=1;else{const e={prevDeps:this._deps,renderedElement:o,nodeRef:new WeakRef(this),createdAt:Date.now(),accessCount:1,instanceId:this.instanceId};w.elementCache.set(this.stableKey,e),w.cacheCleanupRegistry.register(this,{cacheKey:this.stableKey,instanceId:this.instanceId},this)}}return o}finally{for(let e=0;e<p;e++)d[e]=null;w.releaseRenderContext({workStack:d,renderedElements:u})}}toPortal(){if(!m.ensurePortalInfrastructure(this))throw new Error("toPortal() can only be called in a client-side environment");const e=m.portalInfrastructure.get(this),{domElement:t,reactRoot:n}=e;(()=>{try{n.render(this.render())}catch(e){c&&console.error("[MeoNode] Portal render error:",e)}})();let r=!1;const o=n.unmount.bind(n);return n.unmount=()=>{if(r)c&&console.warn("[MeoNode] Portal already unmounted");else{r=!0;try{w.portalCleanupRegistry.unregister(this)}catch(e){c&&console.warn("[MeoNode] Portal unregister warning:",e)}m.portalInfrastructure.delete(this);try{t?.isConnected&&o()}catch(e){c&&console.error("[MeoNode] Portal unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){c&&console.error("[MeoNode] Portal DOM cleanup error:",e)}}},n}static clearCaches(){const e=Array.from(w.elementCache.keys());c&&console.log(`[MeoNode] clearCaches: Clearing ${e.length} entries`);for(const t of e){const e=w.elementCache.get(t);if(e){const n=e.nodeRef?.deref();if(n)try{w.cacheCleanupRegistry.unregister(n),n.lastSignature=void 0,n.lastPropsObj=void 0}catch{c&&console.warn(`[MeoNode] Could not unregister ${t} from FinalizationRegistry`)}}}w.elementCache.clear(),d.cleanup(),c&&console.log("[MeoNode] All caches cleared")}}function v(e,t={},n){return new w(e,t,n)}function b(e,t){const n=(n,r)=>v(e,{...t,...n},r);return n.element=e,n}function P(e,t){const n=(n,r,o)=>v(e,{...t,...r,children:n},o);return n.element=e,n}v.clearCaches=w.clearCaches;export{w as BaseNode,v as Node,P as createChildrenFirstNode,b as createNode};
@@ -86,13 +86,6 @@ export declare function getDOMProps<E extends ElementType, T extends ComponentPr
86
86
  * @returns `true` if the tag is in the no-style set, otherwise `false`.
87
87
  */
88
88
  export declare function hasNoStyleTag(tag?: NodeElement): boolean;
89
- /**
90
- * Returns a shallow copy of the object with the specified keys omitted.
91
- * @param obj The source object.
92
- * @param keys The property keys to omit.
93
- * @returns A new object without the omitted keys.
94
- */
95
- export declare function omit<T extends object, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K>;
96
89
  /**
97
90
  * Removes keys from an object whose values are `undefined`.
98
91
  * @param obj The source object.
@@ -1 +1 @@
1
- {"version":3,"file":"common.helper.d.ts","sourceRoot":"","sources":["../../../src/helper/common.helper.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAExF,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAGvE;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAUlE;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,iCAE1B,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,oDAmC5B,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAsFxD;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,MAAM,CAA0B,CAAA;AAEjE;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAU3F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAUjH;AAED;;;;GAIG;AACH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WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAUjH;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,OAAO,CAGxD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAQlE"}
@@ -1 +1 @@
1
- import{isForwardRef as e,isMemo as t,isFragment as n,isPortal as r,isProfiler as o,isStrictMode as s,isSuspense as c,isSuspenseList as p,isContextConsumer as a,isContextProvider as i,isLazy as u,isElement as l,isReactClassComponent as m}from"./react-is.helper.js";import f from"../constant/css-properties.const.js";import{noStyleTagsSet as d}from"../constant/common.const.js";function y(e,t){const n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};return Object.prototype.hasOwnProperty.call(n,e)||(n[e]=t()),n[e]}const w=(e,t)=>t.split(".").reduce((e,t)=>e&&void 0!==e[t]?e[t]:void 0,e),b=f=>e(f)?"forwardRef":t(f)?"memo":n(f)?"fragment":r(f)?"portal":o(f)?"profiler":s(f)?"strict-mode":c(f)?"suspense":p(f)?"suspense-list":a(f)?"context-consumer":i(f)?"context-provider":u(f)?"lazy":l(f)?"element":m(f)?"class":typeof f;function C(e){function t(e,t){const n=e?.displayName||e?.name;return n&&"render"!==n?n:t}if(null==e)return"UnknownElementType";const n=e,r=b(n);switch(r){case"string":return e;case"class":return t(n,"ClassComponent");case"function":return t(n,"AnonymousFunctionComponent");case"forwardRef":return t(n,"")||t(n.render,"")||"ForwardRefComponent";case"memo":return t(n,"")||(n.type?C(n.type):"MemoComponent");case"element":return C(n.type);case"fragment":return"Fragment";case"portal":return"Portal";case"profiler":return t(n,"Profiler");case"strict-mode":return"StrictMode";case"suspense":return t(n,"Suspense");case"suspense-list":return"SuspenseList";case"context-consumer":return n._context?.displayName?`${n._context.displayName}.Consumer`:"ContextConsumer";case"context-provider":return n._context?.displayName?`${n._context.displayName}.Provider`:"ContextProvider";case"lazy":return t(n,"LazyComponent");case"object":return t(n,"")?t(n,""):"function"==typeof n.render?t(n.render,"ObjectWithRender"):n.type&&n.type!==e?`Wrapped<${C(n.type)}>`:t(n,"ObjectComponent");case"symbol":return"symbol"==typeof e?e.description?.replace(/^react\./,"").split(".").map(e=>e[0]?.toUpperCase()+e.slice(1)).join("")||e.toString():"SymbolComponent";case"unknown":return"UnknownElementType";default:return`UnsupportedType<${r}>`}}const h=new Set(f);function j(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&h.has(n)&&(t[n]=e[n]);return t}function x(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&!h.has(n)&&(t[n]=e[n]);return t}function g(e){return!(!e||"string"!=typeof e)&&d.has(e.toLowerCase())}function O(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(t[n]=e[n]);return t}export{h as CSSPropertySet,j as getCSSProps,b as getComponentType,x as getDOMProps,C as getElementTypeName,y as getGlobalState,w as getValueByPath,g as hasNoStyleTag,O as omitUndefined};
1
+ import{isForwardRef as e,isMemo as t,isFragment as n,isPortal as r,isProfiler as o,isStrictMode as s,isSuspense as c,isSuspenseList as a,isContextConsumer as p,isContextProvider as i,isLazy as u,isElement as l,isReactClassComponent as m}from"./react-is.helper.js";import f from"../constant/css-properties.const.js";import{noStyleTagsSet as d}from"../constant/common.const.js";const y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function w(e,t){return e in y||(y[e]=t()),y[e]}const C=(e,t)=>t.split(".").reduce((e,t)=>e&&void 0!==e[t]?e[t]:void 0,e),b=f=>e(f)?"forwardRef":t(f)?"memo":n(f)?"fragment":r(f)?"portal":o(f)?"profiler":s(f)?"strict-mode":c(f)?"suspense":a(f)?"suspense-list":p(f)?"context-consumer":i(f)?"context-provider":u(f)?"lazy":l(f)?"element":m(f)?"class":typeof f;function h(e){function t(e,t){const n=e?.displayName||e?.name;return n&&"render"!==n?n:t}if(null==e)return"UnknownElementType";const n=e,r=b(n);switch(r){case"string":return e;case"class":return t(n,"ClassComponent");case"function":return t(n,"AnonymousFunctionComponent");case"forwardRef":return t(n,"")||t(n.render,"")||"ForwardRefComponent";case"memo":return t(n,"")||(n.type?h(n.type):"MemoComponent");case"element":return h(n.type);case"fragment":return"Fragment";case"portal":return"Portal";case"profiler":return t(n,"Profiler");case"strict-mode":return"StrictMode";case"suspense":return t(n,"Suspense");case"suspense-list":return"SuspenseList";case"context-consumer":return n._context?.displayName?`${n._context.displayName}.Consumer`:"ContextConsumer";case"context-provider":return n._context?.displayName?`${n._context.displayName}.Provider`:"ContextProvider";case"lazy":return t(n,"LazyComponent");case"object":return t(n,"")?t(n,""):"function"==typeof n.render?t(n.render,"ObjectWithRender"):n.type&&n.type!==e?`Wrapped<${h(n.type)}>`:t(n,"ObjectComponent");case"symbol":return"symbol"==typeof e?e.description?.replace(/^react\./,"").split(".").map(e=>e[0]?.toUpperCase()+e.slice(1)).join("")||e.toString():"SymbolComponent";case"unknown":return"UnknownElementType";default:return`UnsupportedType<${r}>`}}const x=new Set(f);function g(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&x.has(n)&&(t[n]=e[n]);return t}function j(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&!x.has(n)&&(t[n]=e[n]);return t}function O(e){return!(!e||"string"!=typeof e)&&d.has(e.toLowerCase())}function v(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(t[n]=e[n]);return t}export{x as CSSPropertySet,g as getCSSProps,b as getComponentType,j as getDOMProps,h as getElementTypeName,w as getGlobalState,C as getValueByPath,O as hasNoStyleTag,v as omitUndefined};
@@ -118,18 +118,6 @@ export declare const isSuspense: (object: unknown) => boolean;
118
118
  * @returns {boolean} - True if `object` is SuspenseList
119
119
  */
120
120
  export declare const isSuspenseList: (object: unknown) => boolean;
121
- /**
122
- * Checks if an object is a React ViewTransition component
123
- * @param {unknown} object Object to check
124
- * @returns {boolean} - True if object is ViewTransition
125
- */
126
- export declare const isViewTransition: (object: unknown) => boolean;
127
- /**
128
- * Checks if an object is a React Activity component
129
- * @param {unknown} object Object to check
130
- * @returns {boolean} - True if object is Activity
131
- */
132
- export declare const isActivity: (object: unknown) => boolean;
133
121
  /**
134
122
  * Checks if a type is a valid React element type that can be rendered.
135
123
  * This includes strings (for DOM elements), functions (for components),
@@ -1 +1 @@
1
- {"version":3,"file":"react-is.helper.d.ts","sourceRoot":"","sources":["../../../src/helper/react-is.helper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eAA2C,CAAA;AAC1E,eAAO,MAAM,iBAAiB,eAA6B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,eAA+B,CAAA;AAC/D,eAAO,MAAM,sBAAsB,eAAkC,CAAA;AACrE,eAAO,MAAM,mBAAmB,eAA+B,CAAA;AAC/D,eAAO,MAAM,mBAAmB,eAA+B,CAAA;AAC/D,eAAO,MAAM,mBAAmB,eAA+B,CAAA;AAC/D,eAAO,MAAM,kBAAkB,eAA8B,CAAA;AAC7D,eAAO,MAAM,sBAAsB,eAAkC,CAAA;AACrE,eAAO,MAAM,mBAAmB,eAA+B,CAAA;AAC/D,eAAO,MAAM,wBAAwB,eAAoC,CAAA;AACzE,eAAO,MAAM,eAAe,eAA2B,CAAA;AACvD,eAAO,MAAM,eAAe,eAA2B,CAAA;AACvD,eAAO,MAAM,0BAA0B,eAAsC,CAAA;AAC7E,eAAO,MAAM,sBAAsB,eAAuC,CAAA;AAC1E,eAAO,MAAM,mBAAmB,eAA+B,CAAA;AAE/D;;;GAGG;AACH,MAAM,MAA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AAM,qBAAqB,8DAQjC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"portal.hoc.d.ts","sourceRoot":"","sources":["../../../src/hoc/portal.hoc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAe,YAAY,EAAyB,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK5J;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EACtF,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAClD,cAAc,CAAC,CAAC,CAAC,CAAA;AAEpB,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EACtF,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAClD,cAAc,CAAC,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"portal.hoc.d.ts","sourceRoot":"","sources":["../../../src/hoc/portal.hoc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAyB,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK/I;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EACtF,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAClD,cAAc,CAAC,CAAC,CAAC,CAAA;AAEpB,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EACtF,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAClD,cAAc,CAAC,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- import{BaseNode as n,Node as e}from"../core.node.js";function o(o,r){let t,a,i={unmount:()=>{console.warn("Portal instance not yet created. Cannot unmount.")},update:n=>{console.warn("Portal instance not yet created. Cannot update.",n)}};if("function"==typeof r&&o instanceof n)t=[o],a=r;else{if("function"!=typeof o||void 0!==r)throw new Error("Invalid arguments for Portal HOC. Use Portal(component) or Portal(providerNodeInstance, component).");a=o}const c=(e={})=>{const o=a({...e,portal:i});return o instanceof n?o.render():o};return function(o={}){let r;const a=[];o.provider&&a.push(o.provider);const s=[...t??[],...a],{provider:l,...d}=o,p=e(c,d);function u(o,r){const t=o.rawProps?.children;if(!(t&&t instanceof n))return e(o.element,{...o.rawProps,children:r});const a=u(t,r);return e(o.element,{...o.rawProps,children:a})}return r=s.length>0?s.reduceRight((o,r)=>{if(!(r instanceof n))return console.warn("Portal: Item in provider is not a valid NodeInstance. Skipping.",r),o;return r.rawProps?.children instanceof n?u(r,o):e(r.element,{...r.rawProps,children:o})},p):p,i=r.toPortal(),i}}export{o as Portal};
1
+ import{BaseNode as n,Node as r}from"../core.node.js";function e(e,o){let t,i,c={unmount:()=>{console.warn("Portal instance not yet created. Cannot unmount.")}};if("function"==typeof o&&e instanceof n)t=[e],i=o;else{if("function"!=typeof e||void 0!==o)throw new Error("Invalid arguments for Portal HOC. Use Portal(component) or Portal(providerNodeInstance, component).");i=e}const a=(r={})=>{const e=i({...r,portal:c});return e instanceof n?e.render():e};return function(e={}){let o;const i=[];e.provider&&i.push(e.provider);const s=[...t??[],...i],{provider:l,...p}=e,d=r(a,p);function u(e,o){const t=e.rawProps?.children;if(!(t&&t instanceof n))return r(e.element,{...e.rawProps,children:o});const i=u(t,o);return r(e.element,{...e.rawProps,children:i})}return o=s.length>0?s.reduceRight((e,o)=>{if(!(o instanceof n))return console.warn("Portal: Item in provider is not a valid NodeInstance. Skipping.",o),e;return o.rawProps?.children instanceof n?u(o,e):r(o.element,{...o.rawProps,children:e})},d):d,c=o.toPortal(),c}}export{e as Portal};
@@ -1,3 +1,2 @@
1
- export * from '../hook/usePortal.js';
2
1
  export * from '../hook/useTheme.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hook/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hook/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
package/dist/esm/main.js CHANGED
@@ -1 +1 @@
1
- export{setDebugMode}from"./constant/common.const.js";export{Node,createChildrenFirstNode,createNode}from"./core.node.js";export{Portal}from"./hoc/portal.hoc.js";export{Component}from"./hoc/component.hoc.js";import"react";export{Activity,Fragment,Suspense}from"./components/react.node.js";export{A,Abbr,Absolute,Address,Area,Article,Aside,Audio,B,Base,Bdi,Bdo,Blockquote,Body,Br,Button,Canvas,Caption,Center,Cite,Code,Col,Colgroup,Column,Container,Data,Datalist,Dd,Details,Dfn,Dialog,Div,Dl,Dt,Em,Embed,Fieldset,Figcaption,Figure,Fixed,Footer,Form,Grid,H1,H2,H3,H4,H5,H6,Head,Header,Hgroup,Hr,Html,I,Iframe,Img,Input,Kbd,Label,Legend,Li,Link,Main,MapElement,Mark,Menu,Meta,Meter,Nav,Noscript,ObjectElement,Ol,Optgroup,Option,Output,P,Param,Picture,Pre,Progress,Q,Relative,Root,Row,Rp,Rt,Ruby,S,Samp,Script,Search,Section,Select,Small,Source,Span,Static,Sticky,Strong,Style,Sub,Summary,Sup,Svg,SvgCircle,SvgDefs,SvgEllipse,SvgG,SvgLine,SvgLinearGradient,SvgPath,SvgPolygon,SvgPolyline,SvgRadialGradient,SvgRect,SvgStop,SvgSymbol,SvgText,SvgTspan,SvgUse,Table,Tbody,Td,Template,Text,Textarea,Tfoot,Th,Thead,Time,Title,Tr,Track,U,Ul,Var,Video,Wbr}from"./components/html.node.js";export{ThemeProvider}from"./components/theme-provider.js";export{usePortal}from"./hook/usePortal.js";export{useTheme}from"./hook/useTheme.js";
1
+ export{setDebugMode}from"./constant/common.const.js";export{Node,createChildrenFirstNode,createNode}from"./core.node.js";export{Portal}from"./hoc/portal.hoc.js";export{Component}from"./hoc/component.hoc.js";import"react";export{Activity,Fragment,Suspense}from"./components/react.node.js";export{A,Abbr,Absolute,Address,Area,Article,Aside,Audio,B,Base,Bdi,Bdo,Blockquote,Body,Br,Button,Canvas,Caption,Center,Cite,Code,Col,Colgroup,Column,Container,Data,Datalist,Dd,Details,Dfn,Dialog,Div,Dl,Dt,Em,Embed,Fieldset,Figcaption,Figure,Fixed,Footer,Form,Grid,H1,H2,H3,H4,H5,H6,Head,Header,Hgroup,Hr,Html,I,Iframe,Img,Input,Kbd,Label,Legend,Li,Link,Main,MapElement,Mark,Menu,Meta,Meter,Nav,Noscript,ObjectElement,Ol,Optgroup,Option,Output,P,Param,Picture,Pre,Progress,Q,Relative,Root,Row,Rp,Rt,Ruby,S,Samp,Script,Search,Section,Select,Small,Source,Span,Static,Sticky,Strong,Style,Sub,Summary,Sup,Svg,SvgCircle,SvgDefs,SvgEllipse,SvgG,SvgLine,SvgLinearGradient,SvgPath,SvgPolygon,SvgPolyline,SvgRadialGradient,SvgRect,SvgStop,SvgSymbol,SvgText,SvgTspan,SvgUse,Table,Tbody,Td,Template,Text,Textarea,Tfoot,Th,Thead,Time,Title,Tr,Track,U,Ul,Var,Video,Wbr}from"./components/html.node.js";export{ThemeProvider}from"./components/theme-provider.js";export{useTheme}from"./hook/useTheme.js";
@@ -1,7 +1,7 @@
1
1
  import React, { type CSSProperties, type ReactNode, type JSX, type ElementType, type ComponentType, type JSXElementConstructor, type Component, type ComponentProps, type ExoticComponent, type ReactElement } from 'react';
2
2
  import type { NO_STYLE_TAGS } from '../constant/common.const.js';
3
3
  import type { ComponentNodeProps } from '../hoc/component.hoc.js';
4
- import type { CSSObject, CSSInterpolation } from '@emotion/serialize';
4
+ import type { CSSInterpolation } from '@emotion/serialize';
5
5
  import { BaseNode } from '../core.node.js';
6
6
  /** Utility to get keys of required properties in a type T */
7
7
  type RequiredKeys<T> = {
@@ -74,10 +74,6 @@ export interface WorkItem {
74
74
  isProcessed: boolean;
75
75
  /** Flag indicating if the node's children should be skipped (blocked) due to memoization. */
76
76
  blocked: boolean;
77
- /** The depth of the node in the tree (for debugging/profiling). */
78
- depth: number;
79
- /** The index of the child in the parent's children array. */
80
- childIndex: number;
81
77
  }
82
78
  /**
83
79
  * Extracts props type from a given element type.
@@ -149,9 +145,21 @@ export type ThemedCSSProperties = {
149
145
  * A themed version of Emotion's `CSSObject` type. It allows property values to be
150
146
  * functions that receive the theme. This is applied recursively to handle
151
147
  * nested objects like pseudo-selectors and media queries.
148
+ *
149
+ * Supports theme functions at any nesting level:
150
+ * ```ts
151
+ * css: {
152
+ * backgroundColor: theme => theme.colors.primary, // ✓ Top level
153
+ * '&:hover': {
154
+ * backgroundColor: theme => theme.colors.hover, // ✓ Nested level
155
+ * }
156
+ * }
157
+ * ```
152
158
  */
153
159
  export type ThemedCSSObject = {
154
- [P in keyof CSSObject]: ThemedValue<CSSObject[P] extends object ? ThemedCSSObject : CSSObject[P]>;
160
+ [P in keyof CSSProperties]?: ThemedValue<CSSProperties[P]>;
161
+ } & {
162
+ [key: string]: ThemedValue<ThemedCSSObject> | ThemedValue<CSSProperties[keyof CSSProperties]> | undefined;
155
163
  };
156
164
  /**
157
165
  * The complete type for the `css` prop, combining Emotion's `CSSInterpolation`
@@ -302,11 +310,6 @@ export interface NodePortal {
302
310
  * This removes the portal container from the document body.
303
311
  */
304
312
  unmount: () => void;
305
- /**
306
- * Updates the content of the portal with a new node.
307
- * @param node The new `NodeElement` to render inside the portal.
308
- */
309
- update: (node: NodeElement) => void;
310
313
  }
311
314
  /**
312
315
  * Function type for creating portal instances.
@@ -1 +1 @@
1
- {"version":3,"file":"node.type.d.ts","sourceRoot":"","sources":["../../../src/types/node.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAM5C,6DAA6D;AAC7D,KAAK,YAAY,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;CACxD,CAAC,MAAM,CAAC,CAAC,CAAA;AAEV,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,IAAI,CAAA;AAE9E;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,EAAE,CAAA;AAE3C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,CAAA;AAM/D;;;GAGG;AACH,MAAM,MAAM,WAAW,CA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GG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAC5E,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,KACvE,UAAU,CAAA"}
@@ -12,6 +12,7 @@ export declare class NodeUtil {
12
12
  static isServer: boolean;
13
13
  private static get _functionSignatureCache();
14
14
  private static readonly CRITICAL_PROPS;
15
+ private static _propFuncCache;
15
16
  /**
16
17
  * Portal infrastructure using WeakMap for memory-safe management.
17
18
  * Stores the DOM element and React root associated with a NodeInstance.
@@ -89,12 +90,11 @@ export declare class NodeUtil {
89
90
  * The main prop processing pipeline. It separates cacheable and non-cacheable props,
90
91
  * generates a signature for caching, and assembles the final props object.
91
92
  * This method applies optimizations like fast-path for simple props and hybrid caching strategy.
92
- * @param element The element type for which props are being processed.
93
93
  * @param rawProps The original props to process.
94
94
  * @param stableKey The stable key used for child normalization (optional).
95
95
  * @returns The processed props object ready for rendering.
96
96
  */
97
- static processProps(_element: NodeElementType, rawProps?: Partial<NodeProps<NodeElementType>>, stableKey?: string): FinalNodeProps;
97
+ static processProps(rawProps?: Partial<NodeProps>, stableKey?: string): FinalNodeProps;
98
98
  /**
99
99
  * Processes and normalizes children of the node.
100
100
  * Converts raw children (React elements, primitives, or other BaseNodes) into a consistent format.
@@ -1 +1 @@
1
- {"version":3,"file":"node.util.d.ts","sourceRoot":"","sources":["../../../src/util/node.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyC,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAA;AACnH,OAAO,KAAK,EACV,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ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AAS,EAAE,IAAI,CAAA;KAAE,QAgBtF;CACF"}
@@ -1 +1 @@
1
- import e,{isValidElement as t,createElement as r}from"react";import{isReactClassComponent as o,isMemo as n,isForwardRef as s}from"../helper/react-is.helper.js";import{getGlobalState as i,getElementTypeName as c,omitUndefined as a,getCSSProps as l,getDOMProps as d}from"../helper/common.helper.js";import{__DEBUG__ as u}from"../constant/common.const.js";import{BaseNode as p}from"../core.node.js";import{createRoot as f}from"react-dom/client";const m=Symbol.for("@meonode/ui/NodeUtil/functionSignatureCache"),y=Symbol.for("@meonode/ui/NodeUtil/portalInfrastructure");class h{constructor(){}static isServer="undefined"==typeof window;static get _functionSignatureCache(){return i(m,()=>new WeakMap)}static CRITICAL_PROPS=new Set(["css","className","disableEmotion","props"]);static get portalInfrastructure(){return i(y,()=>new WeakMap)}static isNodeInstance=e=>"object"==typeof e&&null!==e&&"element"in e&&"function"==typeof e.render&&"function"==typeof e.toPortal&&"isBaseNode"in e;static isStyleProp=h.isServer||"undefined"==typeof document?()=>!1:e=>e in document.body.style;static hashString(e){let t=2166136261,r=5381;for(let o=0;o<e.length;o++){const n=e.charCodeAt(o);t^=n,t=Math.imul(t,16777619),r=33*r^n}return`${(t>>>0).toString(36)}_${(r>>>0).toString(36)}`}static hashCSS(e){const t=Object.keys(e);let r=t.length;for(let o=0;o<Math.min(t.length,10);o++){const n=t[o],s=e[n];r=(r<<5)-r+n.charCodeAt(0),r&=r,"string"==typeof s&&(r=(r<<5)-r+s.length)}return r.toString(36)}static createPropSignature(e,t){if(h.isServer)return;const r=c(e),o=Object.keys(t);o.length>1&&o.sort();const n=[`${r}:`];if("function"==typeof e){let t=h._functionSignatureCache.get(e);t||(t=h.hashString(e.toString()),h._functionSignatureCache.set(e,t)),n.push(t)}for(const e of o){const r=t[e];let o;const s=typeof r;if("string"===s||"number"===s||"boolean"===s)o=`${e}:${r};`;else if(null===r)o=`${e}:null;`;else if(void 0===r)o=`${e}:undefined;`;else if("css"===e&&"object"==typeof r)o=`css:${this.hashCSS(r)};`;else if(Array.isArray(r)){const t=r.filter(e=>{const t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===e});o=t.length===r.length?`${e}:[${t.join(",")}];`:`${e}:[${r.length}];`}else if(r&&r.isBaseNode)o=`${e}:${r.stableKey};`;else if("function"===s)o=`${e}:${h.hashString(r.toString())};`;else{o=`${e}:{${Object.keys(r).sort().join(",")}};`}n.push(o)}return h.hashString(n.join(","))}static extractCriticalProps(e,t){const r={_keyCount:t.length};let o=0;for(const n of t){if(o>=50)break;if(h.CRITICAL_PROPS.has(n)){r[n]=e[n],o++;continue}const s=n.charCodeAt(0);111!==s||110!==n.charCodeAt(1)?!(97===s&&114===n.charCodeAt(1)&&105===n.charCodeAt(2)&&97===n.charCodeAt(3)||100===s&&97===n.charCodeAt(1)&&116===n.charCodeAt(2)&&97===n.charCodeAt(3))?t.length<=100&&h.isStyleProp(n)&&(r[n]=e[n],o++):(r[n]=e[n],o++):(r[n]=e[n],o++)}return r}static processProps(e,t={},r){const{ref:o,key:n,children:s,css:i,props:c={},disableEmotion:u,...p}=t;if(0===Object.keys(p).length&&!i)return a({ref:o,key:n,disableEmotion:u,nativeProps:a(c),children:h._processChildren(s,u)});const f={},m={},y=Object.keys(p);for(let e=0;e<y.length;e++){const t=y[e],r=p[t],o=typeof r;"string"===o||"number"===o||"boolean"===o?f[t]=r:m[t]=r}const{cssProps:b}={cssProps:l(f)},g=l(m),C=d(p),E={...b,...g,...i},P=h._processChildren(s,u,r);return a({ref:o,key:n,css:E,...C,disableEmotion:u,nativeProps:a(c),children:P})}static _processChildren(e,t,r){if(e)return"function"==typeof e?e:Array.isArray(e)?1===e.length?h.processRawNode(e[0],t,`${r}_0`):e.map((e,o)=>h.processRawNode(e,t,`${r}_${o}`)):h.processRawNode(e,t,r)}static shouldCacheElement(e){return!h.isServer&&!!e.stableKey&&!!e.dependencies}static shouldNodeUpdate(e,t,r){return!!h.isServer||!r&&(void 0===t||(void 0===e||(t.length!==e.length||!!t.some((t,r)=>!Object.is(t,e[r])))))}static processRawNode(r,i,c){if(null==r||"string"==typeof r||"number"==typeof r||"boolean"==typeof r)return r;if(h.isNodeInstance(r)){if(c||i&&!r.rawProps.disableEmotion){const e=new p(r.element,r.rawProps,r.dependencies);return e.stableKey=`${c}:${e.stableKey}`,i&&!e.rawProps.disableEmotion&&(e.rawProps.disableEmotion=!0),e}return r}if(h.isFunctionChild(r))return new p(h.functionRenderer,{props:{render:r,disableEmotion:i}},void 0);if(t(r)){if("string"==typeof r.type){const{style:e,...t}=r.props,o={...t,...e||{}};return new p(r.type,{...o,...null!==r.key&&void 0!==r.key?{key:r.key}:{},disableEmotion:i},void 0)}return new p(r.type,{...r.props,...null!==r.key&&void 0!==r.key?{key:r.key}:{},disableEmotion:i},void 0)}return o(r)||n(r)||s(r)?new p(r,{disableEmotion:i},void 0):r instanceof e.Component?h.processRawNode(r.render(),i,c):r}static isFunctionChild(e){if("function"!=typeof e||o(e)||n(e)||s(e))return!1;try{return!(e.prototype&&"function"==typeof e.prototype.render)}catch(e){return u&&console.error("MeoNode: Error checking if a node is a function child.",e),!0}}static functionRenderer({render:t,disableEmotion:r}){let o;try{o=t()}catch(e){u&&console.error("MeoNode: Error executing function-as-a-child.",e),o=null}if(null==o)return o;if(h.isNodeInstance(o))return r&&!o.rawProps.disableEmotion?new p(o.element,{...o.rawProps,disableEmotion:!0}).render():o.render();if(Array.isArray(o)){const e=(e,t)=>{try{return`${c(e)}-${t}`}catch(e){return u&&console.error("MeoNode: Could not determine element type name for key in function-as-a-child.",e),`item-${t}`}};return o.map((t,o)=>h.renderProcessedNode({processedElement:h.processRawNode(t,r),passedKey:e(t,o),disableEmotion:r}))}if(o instanceof e.Component)return h.renderProcessedNode({processedElement:h.processRawNode(o.render(),r),disableEmotion:r});if("string"==typeof o||"number"==typeof o||"boolean"==typeof o)return o;const n=h.processRawNode(o,r);return n?h.renderProcessedNode({processedElement:n,disableEmotion:r}):o}static renderProcessedNode({processedElement:t,passedKey:n,disableEmotion:s}){const i={};if(void 0!==n&&(i.key=n),h.isNodeInstance(t)){const e=t.rawProps?.key;return t.rawProps.disableEmotion=s,e===n?t.render():new p(t.element,{...t.rawProps,...i}).render()}return o(t)?new p(t,{...i,disableEmotion:s}).render():t instanceof e.Component?t.render():"function"==typeof t?r(t,{key:n}):t}static ensurePortalInfrastructure(e){if(h.isServer)return!1;let t=h.portalInfrastructure.get(e);if(t?.domElement?.isConnected&&t?.reactRoot)return!0;if(t&&(!t.domElement?.isConnected||!t.reactRoot)){try{t.reactRoot?.unmount?.()}catch(e){u&&console.error("MeoNode: Error unmounting stale portal root.",e)}h.cleanupPortalInfra(t),h.portalInfrastructure.delete(e),t=void 0}const r=document.createElement("div");document.body.appendChild(r);const o=f(r),n={render:o.render.bind(o),unmount:o.unmount.bind(o),update:()=>{}};return t={domElement:r,reactRoot:n,instanceId:e.instanceId},h.portalInfrastructure.set(e,t),p.portalCleanupRegistry.register(e,{domElement:r,reactRoot:n},e),!0}static cleanupPortalInfra(e){try{e.reactRoot?.unmount&&e.reactRoot.unmount()}catch(e){u&&console.error("Portal cleanup error:",e)}try{e.domElement?.isConnected&&e.domElement.remove()}catch(e){u&&console.error("DOM removal error:",e)}}}export{h as NodeUtil};
1
+ import e,{isValidElement as t,createElement as r}from"react";import{isReactClassComponent as o,isMemo as n,isForwardRef as s}from"../helper/react-is.helper.js";import{getGlobalState as i,getElementTypeName as c,omitUndefined as a,getCSSProps as l,getDOMProps as d}from"../helper/common.helper.js";import{__DEBUG__ as u}from"../constant/common.const.js";import{BaseNode as p}from"../core.node.js";import{createRoot as f}from"react-dom/client";const m=Symbol.for("@meonode/ui/NodeUtil/functionSignatureCache"),h=Symbol.for("@meonode/ui/NodeUtil/portalInfrastructure");class y{constructor(){}static isServer="undefined"==typeof window;static get _functionSignatureCache(){return i(m,()=>new WeakMap)}static CRITICAL_PROPS=new Set(["css","className","disableEmotion","props"]);static _propFuncCache=new WeakMap;static get portalInfrastructure(){return i(h,()=>new WeakMap)}static isNodeInstance=e=>e instanceof p;static isStyleProp=y.isServer||"undefined"==typeof document?()=>!1:e=>e in document.body.style;static hashString(e){let t=2166136261,r=5381;for(let o=0;o<e.length;o++){const n=e.charCodeAt(o);t^=n,t=Math.imul(t,16777619),r=Math.imul(r,33)^n}return`${(t>>>0).toString(36)}_${(r>>>0).toString(36)}`}static hashCSS(e){const t=Object.keys(e);let r=t.length;for(let o=0;o<Math.min(t.length,10);o++){const n=t[o],s=e[n];r=(r<<5)-r+n.charCodeAt(0),r&=r,"string"==typeof s&&(r=(r<<5)-r+s.length)}return r.toString(36)}static createPropSignature(e,t){if(y.isServer)return;const r=c(e),o=Object.keys(t);o.length>1&&o.sort();const n=[`${r}:`];if("function"==typeof e){let t=y._functionSignatureCache.get(e);t||(t=y.hashString(e.toString()),y._functionSignatureCache.set(e,t)),n.push(t)}for(const e of o){const r=t[e];let o;const s=typeof r;if("string"===s||"number"===s||"boolean"===s)o=`${e}:${r};`;else if(null===r)o=`${e}:null;`;else if(void 0===r)o=`${e}:undefined;`;else if("css"===e&&"object"==typeof r)o=`css:${this.hashCSS(r)};`;else if(Array.isArray(r)){const t=r.filter(e=>{const t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===e});o=t.length===r.length?`${e}:[${t.join(",")}];`:`${e}:[${r.length}];`}else if(r&&r.isBaseNode)o=`${e}:${r.stableKey};`;else if("function"===s){let t=y._propFuncCache.get(r);t||(t=y.hashString(r.toString()),y._propFuncCache.set(r,t)),o=`${e}:${t};`}else{o=`${e}:{${Object.keys(r).sort().join(",")}};`}n.push(o)}return y.hashString(n.join(","))}static extractCriticalProps(e,t){const r={_keyCount:t.length};let o=0;for(const n of t){if(o>=50)break;if(y.CRITICAL_PROPS.has(n)){r[n]=e[n],o++;continue}const s=n.charCodeAt(0);111!==s||110!==n.charCodeAt(1)?!(97===s&&114===n.charCodeAt(1)&&105===n.charCodeAt(2)&&97===n.charCodeAt(3)||100===s&&97===n.charCodeAt(1)&&116===n.charCodeAt(2)&&97===n.charCodeAt(3))?t.length<=100&&y.isStyleProp(n)&&(r[n]=e[n],o++):(r[n]=e[n],o++):(r[n]=e[n],o++)}return r}static processProps(e={},t){const{ref:r,key:o,children:n,css:s,props:i={},disableEmotion:c,...u}=e;if(0===Object.keys(u).length&&!s)return a({ref:r,key:o,disableEmotion:c,nativeProps:a(i),children:y._processChildren(n,c)});const p={},f={},m=Object.keys(u);for(let e=0;e<m.length;e++){const t=m[e],r=u[t],o=typeof r;"string"===o||"number"===o||"boolean"===o?p[t]=r:f[t]=r}const h=l(p),b=l(f),g=d(u),C={...h,...b,...s},E=y._processChildren(n,c,t);return a({ref:r,key:o,css:C,...g,disableEmotion:c,nativeProps:a(i),children:E})}static _processChildren(e,t,r){if(e)return"function"==typeof e?e:Array.isArray(e)?1===e.length?y.processRawNode(e[0],t,`${r}_0`):e.map((e,o)=>y.processRawNode(e,t,`${r}_${o}`)):y.processRawNode(e,t,r)}static shouldCacheElement(e){return!y.isServer&&!!e.stableKey&&!!e.dependencies}static shouldNodeUpdate(e,t,r){if(y.isServer)return!0;if(r)return!1;if(void 0===t)return!0;if(void 0===e)return!0;if(t.length!==e.length)return!0;for(let r=0;r<t.length;r++)if(!Object.is(t[r],e[r]))return!0;return!1}static processRawNode(r,i,c){if(null==r||"string"==typeof r||"number"==typeof r||"boolean"==typeof r)return r;if(y.isNodeInstance(r)){if(c||i&&!r.rawProps.disableEmotion){const e=new p(r.element,r.rawProps,r.dependencies);return e.stableKey=`${c}:${e.stableKey}`,i&&!e.rawProps.disableEmotion&&(e.rawProps.disableEmotion=!0),e}return r}if(y.isFunctionChild(r))return new p(y.functionRenderer,{props:{render:r,disableEmotion:i}},void 0);if(t(r)){if("string"==typeof r.type){const{style:e,...t}=r.props,o={...t,...e||{}};return new p(r.type,{...o,...null!==r.key&&void 0!==r.key?{key:r.key}:{},disableEmotion:i},void 0)}return new p(r.type,{...r.props,...null!==r.key&&void 0!==r.key?{key:r.key}:{},disableEmotion:i},void 0)}return o(r)||n(r)||s(r)?new p(r,{disableEmotion:i},void 0):r instanceof e.Component?y.processRawNode(r.render(),i,c):r}static isFunctionChild(e){if("function"!=typeof e||o(e)||n(e)||s(e))return!1;try{return!(e.prototype&&"function"==typeof e.prototype.render)}catch(e){return u&&console.error("MeoNode: Error checking if a node is a function child.",e),!0}}static functionRenderer({render:t,disableEmotion:r}){let o;try{o=t()}catch(e){u&&console.error("MeoNode: Error executing function-as-a-child.",e),o=null}if(null==o||"string"==typeof o||"number"==typeof o||"boolean"==typeof o)return o;if(y.isNodeInstance(o))return r&&!o.rawProps.disableEmotion?new p(o.element,{...o.rawProps,disableEmotion:!0}).render():o.render();if(Array.isArray(o)){const e=(e,t)=>{try{return`${c(e)}-${t}`}catch(e){return u&&console.error("MeoNode: Could not determine element type name for key in function-as-a-child.",e),`item-${t}`}};return o.map((t,o)=>y.renderProcessedNode({processedElement:y.processRawNode(t,r),passedKey:e(t,o),disableEmotion:r}))}if(o instanceof e.Component)return y.renderProcessedNode({processedElement:y.processRawNode(o.render(),r),disableEmotion:r});const n=y.processRawNode(o,r);return n?y.renderProcessedNode({processedElement:n,disableEmotion:r}):o}static renderProcessedNode({processedElement:t,passedKey:n,disableEmotion:s}){const i={};if(void 0!==n&&(i.key=n),y.isNodeInstance(t)){const e=t.rawProps?.key;return t.rawProps.disableEmotion=s,e===n?t.render():new p(t.element,{...t.rawProps,...i}).render()}return o(t)?new p(t,{...i,disableEmotion:s}).render():t instanceof e.Component?t.render():"function"==typeof t?r(t,{key:n}):t}static ensurePortalInfrastructure(e){if(y.isServer)return!1;let t=y.portalInfrastructure.get(e);if(t?.domElement?.isConnected&&t?.reactRoot)return!0;if(t&&(!t.domElement?.isConnected||!t.reactRoot)){try{t.reactRoot?.unmount?.()}catch(e){u&&console.error("MeoNode: Error unmounting stale portal root.",e)}y.cleanupPortalInfra(t),y.portalInfrastructure.delete(e),t=void 0}const r=document.createElement("div");document.body.appendChild(r);const o=f(r),n={render:o.render.bind(o),unmount:o.unmount.bind(o),update:()=>{}};return t={domElement:r,reactRoot:n,instanceId:e.instanceId},y.portalInfrastructure.set(e,t),p.portalCleanupRegistry.register(e,{domElement:r,reactRoot:n},e),!0}static cleanupPortalInfra(e){try{e.reactRoot?.unmount&&e.reactRoot.unmount()}catch(e){u&&console.error("Portal cleanup error:",e)}try{e.domElement?.isConnected&&e.domElement.remove()}catch(e){u&&console.error("DOM removal error:",e)}}}export{y as NodeUtil};
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@meonode/ui",
3
3
  "description": "A structured approach to component composition, direct CSS-first prop styling, built-in theming, smart prop handling (including raw property pass-through), and dynamic children.",
4
- "version": "1.1.1",
4
+ "version": "1.1.3",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
10
  "import": "./dist/esm/main.js",
11
- "require": "./dist/cjs/main.js",
11
+ "require": "./dist/cjs/main.cjs",
12
12
  "types": "./dist/esm/main.d.ts"
13
13
  },
14
14
  "./client": {
15
15
  "import": "./dist/esm/client.js",
16
- "require": "./dist/cjs/client.js",
16
+ "require": "./dist/cjs/client.cjs",
17
17
  "types": "./dist/esm/client.d.ts"
18
18
  },
19
19
  "./nextjs-registry": {
20
20
  "import": "./dist/esm/nextjs-registry/index.js",
21
- "require": "./dist/cjs/nextjs-registry/index.js",
21
+ "require": "./dist/cjs/nextjs-registry/index.cjs",
22
22
  "types": "./dist/esm/nextjs-registry/index.d.ts"
23
23
  }
24
24
  },
@@ -34,7 +34,7 @@
34
34
  "test": "NODE_OPTIONS='--expose-gc' node --stack-size=10000 --max-old-space-size=8192 --experimental-vm-modules $(yarn bin jest) --ci --verbose --testPathIgnorePatterns=\"tests/performance.test.ts\" --testPathIgnorePatterns=\"tests/react-createelement-comparison.test.ts\"",
35
35
  "test:perf": "NODE_OPTIONS='--expose-gc' node --stack-size=10000 --max-old-space-size=8192 --experimental-vm-modules $(yarn bin jest) --ci --verbose tests/performance.test.ts tests/react-createelement-comparison.test.ts",
36
36
  "test:all": "NODE_OPTIONS='--expose-gc' node --stack-size=10000 --max-old-space-size=8192 --experimental-vm-modules $(yarn bin jest) --ci --verbose",
37
- "prebuild": "yarn lint && yarn tsgo --noEmit && yarn test:all",
37
+ "prebuild": "yarn lint && yarn tsgo --noEmit && yarn test",
38
38
  "build": "yarn prebuild && rm -rf ./dist && rollup -c rollup.config.ts && tsgo -p tsconfig.build.json --diagnostics && tsc-alias -p tsconfig.build.json",
39
39
  "publish:prerelease": "./prepublish.sh && yarn build && yarn version -i prerelease && yarn npm publish --tag next",
40
40
  "publish:patch": "./prepublish.sh && yarn build && yarn version -i patch && yarn npm publish --tag latest",
@@ -47,49 +47,53 @@
47
47
  "@emotion/react": "^11.14.0"
48
48
  },
49
49
  "devDependencies": {
50
+ "@babel/generator": "^7.29.1",
51
+ "@babel/parser": "^7.29.0",
52
+ "@babel/traverse": "^7.29.0",
53
+ "@babel/types": "^7.29.0",
50
54
  "@emotion/cache": "^11.14.0",
51
55
  "@emotion/jest": "^11.14.2",
52
56
  "@emotion/styled": "^11.14.1",
53
- "@eslint/js": "^9.39.1",
54
- "@mui/material": "^7.3.5",
57
+ "@eslint/js": "^9.39.2",
58
+ "@mui/material": "^7.3.8",
55
59
  "@rollup/plugin-commonjs": "^29.0.0",
56
60
  "@rollup/plugin-node-resolve": "^16.0.3",
57
61
  "@rollup/plugin-terser": "^0.4.4",
58
62
  "@rollup/plugin-typescript": "^12.3.0",
59
63
  "@testing-library/dom": "^10.4.1",
60
64
  "@testing-library/jest-dom": "^6.9.1",
61
- "@testing-library/react": "^16.3.0",
65
+ "@testing-library/react": "^16.3.2",
62
66
  "@types/jest": "^30.0.0",
63
- "@types/react": "^19.2.6",
67
+ "@types/react": "^19.2.14",
64
68
  "@types/react-dom": "^19.2.3",
65
69
  "@types/react-router-dom": "^5.3.3",
66
- "@typescript-eslint/eslint-plugin": "^8.47.0",
67
- "@typescript-eslint/parser": "^8.47.0",
68
- "@typescript/native-preview": "^7.0.0-dev.20251121.1",
70
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
71
+ "@typescript-eslint/parser": "^8.55.0",
72
+ "@typescript/native-preview": "^7.0.0-dev.20260214.1",
69
73
  "cli-table3": "^0.6.5",
70
- "eslint": "^9.39.1",
71
- "eslint-plugin-jsdoc": "^61.4.0",
72
- "eslint-plugin-prettier": "^5.5.4",
73
- "eslint-plugin-unused-imports": "^4.3.0",
74
+ "eslint": "^9.39.2",
75
+ "eslint-plugin-jsdoc": "^61.7.1",
76
+ "eslint-plugin-prettier": "^5.5.5",
77
+ "eslint-plugin-unused-imports": "^4.4.1",
74
78
  "husky": "^9.1.7",
75
79
  "jest": "^30.2.0",
76
80
  "jest-environment-jsdom": "^30.2.0",
77
- "next": "^16.0.3",
78
- "prettier": "^3.6.2",
79
- "react": "^19.2.0",
80
- "react-dom": "^19.2.0",
81
- "react-router-dom": "^7.9.6",
82
- "rollup": "^4.53.3",
81
+ "next": "^16.1.6",
82
+ "prettier": "^3.8.1",
83
+ "react": "^19.2.4",
84
+ "react-dom": "^19.2.4",
85
+ "react-router-dom": "^7.13.0",
86
+ "rollup": "^4.57.1",
83
87
  "rollup-plugin-preserve-directives": "^0.4.0",
84
88
  "rollup-plugin-tsconfig-paths": "^1.5.2",
85
- "ts-jest": "^29.4.5",
89
+ "ts-jest": "^29.4.6",
86
90
  "tsc-alias": "^1.8.16",
87
91
  "tslib": "^2.8.1",
88
92
  "typescript": "^5.9.3",
89
- "typescript-eslint": "^8.47.0",
93
+ "typescript-eslint": "^8.55.0",
90
94
  "whatwg-fetch": "^3.6.20"
91
95
  },
92
- "packageManager": "yarn@4.11.0",
96
+ "packageManager": "yarn@4.12.0",
93
97
  "peerDependencies": {
94
98
  "@emotion/cache": ">=11.14.0",
95
99
  "react": ">=19.2.0",
@@ -1 +0,0 @@
1
- "use strict";var e=require("../core.node.js");const r=e.createNode("div"),t=r,o=e.createNode("div",{display:"flex",flexDirection:"column",minHeight:"100dvh",minWidth:"100dvw"}),d=e.createNode("div",{display:"flex",flexDirection:"column"}),s=e.createNode("div",{display:"flex",flexDirection:"row"}),a=e.createNode("div",{display:"grid"}),i=e.createNode("div",{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),p=e.createNode("div",{position:"fixed"}),c=e.createNode("div",{position:"relative"}),x=e.createNode("div",{position:"absolute"}),N=e.createNode("div",{position:"sticky"}),l=e.createNode("div",{position:"static"}),n=e.createChildrenFirstNode("h1"),h=e.createChildrenFirstNode("h2"),C=e.createChildrenFirstNode("h3"),u=e.createChildrenFirstNode("h4"),F=e.createChildrenFirstNode("h5"),g=e.createChildrenFirstNode("h6"),m=e.createChildrenFirstNode("strong"),v=e.createChildrenFirstNode("em"),S=e.createChildrenFirstNode("small"),b=e.createChildrenFirstNode("mark"),f=e.createChildrenFirstNode("span"),y=e.createChildrenFirstNode("p"),D=y,T=e.createChildrenFirstNode("pre"),H=e.createChildrenFirstNode("code"),k=e.createNode("br"),A=e.createNode("ol"),B=e.createNode("ul"),P=e.createNode("li"),R=e.createNode("dl"),G=e.createNode("dt"),L=e.createNode("dd"),M=e.createNode("form"),E=e.createNode("label"),I=e.createNode("input"),O=e.createChildrenFirstNode("button"),j=e.createNode("textarea"),q=e.createNode("select"),w=e.createChildrenFirstNode("option"),U=e.createNode("fieldset"),V=e.createChildrenFirstNode("legend"),W=e.createNode("optgroup"),K=e.createNode("table"),Q=e.createNode("thead"),z=e.createNode("tbody"),J=e.createNode("tfoot"),X=e.createNode("tr"),Y=e.createNode("th"),Z=e.createNode("td"),$=e.createChildrenFirstNode("caption"),_=e.createNode("colgroup"),ee=e.createNode("col"),re=e.createNode("img"),te=e.createNode("video"),oe=e.createNode("audio"),de=e.createNode("picture"),se=e.createNode("source"),ae=e.createNode("track"),ie=e.createNode("canvas"),pe=e.createNode("iframe"),ce=e.createNode("svg"),xe=e.createNode("path"),Ne=e.createNode("circle"),le=e.createNode("ellipse"),ne=e.createNode("line"),he=e.createNode("polyline"),Ce=e.createNode("polygon"),ue=e.createNode("rect"),Fe=e.createNode("use"),ge=e.createNode("defs"),me=e.createNode("linearGradient"),ve=e.createNode("radialGradient"),Se=e.createNode("stop"),be=e.createNode("symbol"),fe=e.createNode("g"),ye=e.createNode("text"),De=e.createNode("tspan"),Te=e.createNode("a"),He=e.createNode("nav"),ke=e.createNode("body"),Ae=e.createNode("main",{display:"flex",flexDirection:"column"}),Be=e.createNode("header"),Pe=e.createNode("footer"),Re=e.createNode("aside"),Ge=e.createNode("section"),Le=e.createNode("article"),Me=e.createNode("figure"),Ee=e.createChildrenFirstNode("figcaption"),Ie=e.createNode("blockquote"),Oe=e.createNode("address"),je=e.createNode("dialog"),qe=e.createNode("details"),we=e.createChildrenFirstNode("summary"),Ue=e.createNode("head"),Ve=e.createNode("html"),We=e.createNode("meta"),Ke=e.createNode("link"),Qe=e.createNode("style"),ze=e.createNode("script"),Je=e.createChildrenFirstNode("title"),Xe=e.createNode("base"),Ye=e.createChildrenFirstNode("abbr"),Ze=e.createChildrenFirstNode("b"),$e=e.createChildrenFirstNode("bdi"),_e=e.createChildrenFirstNode("bdo"),er=e.createChildrenFirstNode("cite"),rr=e.createChildrenFirstNode("data"),tr=e.createChildrenFirstNode("dfn"),or=e.createChildrenFirstNode("i"),dr=e.createChildrenFirstNode("kbd"),sr=e.createChildrenFirstNode("q"),ar=e.createChildrenFirstNode("rp"),ir=e.createChildrenFirstNode("rt"),pr=e.createNode("ruby"),cr=e.createChildrenFirstNode("s"),xr=e.createChildrenFirstNode("samp"),Nr=e.createChildrenFirstNode("sub"),lr=e.createChildrenFirstNode("sup"),nr=e.createChildrenFirstNode("time"),hr=e.createChildrenFirstNode("u"),Cr=e.createChildrenFirstNode("var"),ur=e.createNode("wbr"),Fr=e.createNode("hr"),gr=e.createNode("menu"),mr=e.createNode("search"),vr=e.createNode("embed"),Sr=e.createNode("object"),br=e.createNode("param"),fr=e.createNode("map"),yr=e.createNode("area"),Dr=e.createNode("datalist"),Tr=e.createNode("output"),Hr=e.createNode("progress"),kr=e.createNode("meter"),Ar=e.createNode("noscript"),Br=e.createNode("template"),Pr=e.createNode("hgroup");exports.A=Te,exports.Abbr=Ye,exports.Absolute=x,exports.Address=Oe,exports.Area=yr,exports.Article=Le,exports.Aside=Re,exports.Audio=oe,exports.B=Ze,exports.Base=Xe,exports.Bdi=$e,exports.Bdo=_e,exports.Blockquote=Ie,exports.Body=ke,exports.Br=k,exports.Button=O,exports.Canvas=ie,exports.Caption=$,exports.Center=i,exports.Cite=er,exports.Code=H,exports.Col=ee,exports.Colgroup=_,exports.Column=d,exports.Container=t,exports.Data=rr,exports.Datalist=Dr,exports.Dd=L,exports.Details=qe,exports.Dfn=tr,exports.Dialog=je,exports.Div=r,exports.Dl=R,exports.Dt=G,exports.Em=v,exports.Embed=vr,exports.Fieldset=U,exports.Figcaption=Ee,exports.Figure=Me,exports.Fixed=p,exports.Footer=Pe,exports.Form=M,exports.Grid=a,exports.H1=n,exports.H2=h,exports.H3=C,exports.H4=u,exports.H5=F,exports.H6=g,exports.Head=Ue,exports.Header=Be,exports.Hgroup=Pr,exports.Hr=Fr,exports.Html=Ve,exports.I=or,exports.Iframe=pe,exports.Img=re,exports.Input=I,exports.Kbd=dr,exports.Label=E,exports.Legend=V,exports.Li=P,exports.Link=Ke,exports.Main=Ae,exports.MapElement=fr,exports.Mark=b,exports.Menu=gr,exports.Meta=We,exports.Meter=kr,exports.Nav=He,exports.Noscript=Ar,exports.ObjectElement=Sr,exports.Ol=A,exports.Optgroup=W,exports.Option=w,exports.Output=Tr,exports.P=y,exports.Param=br,exports.Picture=de,exports.Pre=T,exports.Progress=Hr,exports.Q=sr,exports.Relative=c,exports.Root=o,exports.Row=s,exports.Rp=ar,exports.Rt=ir,exports.Ruby=pr,exports.S=cr,exports.Samp=xr,exports.Script=ze,exports.Search=mr,exports.Section=Ge,exports.Select=q,exports.Small=S,exports.Source=se,exports.Span=f,exports.Static=l,exports.Sticky=N,exports.Strong=m,exports.Style=Qe,exports.Sub=Nr,exports.Summary=we,exports.Sup=lr,exports.Svg=ce,exports.SvgCircle=Ne,exports.SvgDefs=ge,exports.SvgEllipse=le,exports.SvgG=fe,exports.SvgLine=ne,exports.SvgLinearGradient=me,exports.SvgPath=xe,exports.SvgPolygon=Ce,exports.SvgPolyline=he,exports.SvgRadialGradient=ve,exports.SvgRect=ue,exports.SvgStop=Se,exports.SvgSymbol=be,exports.SvgText=ye,exports.SvgTspan=De,exports.SvgUse=Fe,exports.Table=K,exports.Tbody=z,exports.Td=Z,exports.Template=Br,exports.Text=D,exports.Textarea=j,exports.Tfoot=J,exports.Th=Y,exports.Thead=Q,exports.Time=nr,exports.Title=Je,exports.Tr=X,exports.Track=ae,exports.U=hr,exports.Ul=B,exports.Var=Cr,exports.Video=te,exports.Wbr=ur;
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../util/mount-tracker.util.js"),r=require("../core.node.js");exports.default=function({children:n,...a}){const{node:l,...s}=a,u=e.useEffectEvent(()=>{l.stableKey&&(r.BaseNode.elementCache.delete(l.stableKey),t.MountTrackerUtil.isMounted(l.stableKey)&&t.MountTrackerUtil.untrackMount(l.stableKey),r.BaseNode.cacheCleanupRegistry.unregister(l)),l.lastSignature=void 0});return e.useEffect(()=>(l.stableKey&&t.MountTrackerUtil.trackMount(l.stableKey),()=>u()),[]),e.isValidElement(n)&&Object.keys(s).length>0?e.cloneElement(n,s):n};
@@ -1 +0,0 @@
1
- "use strict";var e=require("react"),r=require("../core.node.js");const t=r.createNode(e.Fragment),s=r.createNode(e.Activity),c=r.createNode(e.Suspense);exports.Activity=s,exports.Fragment=t,exports.Suspense=c;
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@emotion/react"),t=require("@emotion/cache"),n=require("../core.node.js"),o=require("next/navigation.js");exports.default=function({children:s}){const[i]=e.useState(()=>{const e=t({key:"meonode-css"});return e.compat=!0,e});return o.useServerInsertedHTML(()=>{const r=Object.keys(i.inserted).sort(),t=r.map(e=>i.inserted[e]).join(""),n=r.join(" ");return t?e.createElement("style",{"data-emotion":`${i.key} ${n}`,dangerouslySetInnerHTML:{__html:t}}):null}),n.Node(r.CacheProvider,{value:i,children:s}).render()};
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@emotion/react"),r=require("./theme-provider.client.js"),s=require("../util/theme.util.js");function i({element:i,children:l,...o}){const n=e.useContext(r.ThemeContext),u=n?.theme,{css:c,...h}=o;let m=c,a=h;u&&(m=s.ThemeUtil.resolveObjWithTheme(c,u,{processFunctions:!0}),a=s.ThemeUtil.resolveObjWithTheme(h,u,{processFunctions:!1}));const d=s.ThemeUtil.resolveDefaultStyle(m);return t.jsx(i,{...a,css:d},l)}i.displayName="Styled",exports.default=i;
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../core.node.js");const r=e.createContext(null);exports.ThemeContext=r,exports.default=function({children:o,theme:n}){const[c,u]=e.useState(n);if(!n)throw new Error("`theme` prop must be defined");const d={theme:c,setTheme:e=>{"function"==typeof e&&(e=e(c)),document.cookie=`theme=${e.mode}; path=/;`,u(e)}};return t.Node(r.Provider,{value:d,children:o}).render()};
@@ -1 +0,0 @@
1
- "use strict";var e=require("../core.node.js"),r=require("./theme-provider.client.js");const t=e.createNode(r.default);exports.ThemeProvider=t;
@@ -1 +0,0 @@
1
- "use strict";var e=require("react"),t=require("./helper/react-is.helper.js"),n=require("./helper/common.helper.js"),r=require("./components/styled-renderer.client.js"),o=require("./constant/common.const.js"),s=require("./util/mount-tracker.util.js"),a=require("./components/meonode-unmounter.client.js"),l=require("./util/navigation-cache-manager.util.js"),i=require("./util/node.util.js");const c=Symbol.for("@meonode/ui/BaseNode/elementCache"),d=Symbol.for("@meonode/ui/BaseNode/navigationStarted"),u=Symbol.for("@meonode/ui/BaseNode/renderContextPool"),h=Symbol.for("@meonode/ui/BaseNode/cacheCleanupRegistry"),p=Symbol.for("@meonode/ui/BaseNode/portalCleanupRegistry");class m{instanceId=Math.random().toString(36).slice(2)+Date.now().toString(36);element;rawProps={};isBaseNode=!0;_props;_deps;stableKey;lastPropsObj;lastSignature;static get elementCache(){return n.getGlobalState(c,()=>new Map)}static get _navigationStarted(){return n.getGlobalState(d,()=>({value:!1})).value}static set _navigationStarted(e){n.getGlobalState(d,()=>({value:!1})).value=e}static get renderContextPool(){return n.getGlobalState(u,()=>[])}static acquireRenderContext(){const e=m.renderContextPool;return e.length>0?e.pop():{workStack:new Array(512),renderedElements:new Map}}static releaseRenderContext(e){m.renderContextPool.length<50&&e.workStack.length<2048&&(e.workStack.length=0,e.renderedElements.clear(),m.renderContextPool.push(e))}constructor(e,r={},o){if(!t.isValidElementType(e)){const t=n.getComponentType(e);throw new Error(`Invalid element type: ${t} provided!`)}this.element=e,this.rawProps=r,this._deps=o;const{ref:s,children:a,...c}=r;this.stableKey=this._getStableKey(c),i.NodeUtil.isServer||m._navigationStarted||(l.NavigationCacheManagerUtil.getInstance().start(),m._navigationStarted=!0)}get props(){return this._props||(this._props=i.NodeUtil.processProps(this.element,this.rawProps,this.stableKey)),this._props}get dependencies(){return this._deps}_getStableKey({key:e,...t}){if(i.NodeUtil.isServer)return;if(this.lastPropsObj===t)return this.lastSignature;this.lastPropsObj=t;const r=Object.keys(t),s=r.length;if(s>100){const e=i.NodeUtil.extractCriticalProps(t,r);this.lastSignature=i.NodeUtil.createPropSignature(this.element,e),o.__DEBUG__&&s>200&&console.warn(`MeoNode: Large props (${s} keys) on "${n.getElementTypeName(this.element)}". Consider splitting.`)}else this.lastSignature=i.NodeUtil.createPropSignature(this.element,t);return null!=e?`${String(e)}:${this.lastSignature}`:this.lastSignature}static get cacheCleanupRegistry(){return n.getGlobalState(h,()=>new FinalizationRegistry(e=>{const{cacheKey:t,instanceId:n}=e,r=m.elementCache.get(t);r?.instanceId===n&&m.elementCache.delete(t),s.MountTrackerUtil.isMounted(t)&&s.MountTrackerUtil.untrackMount(t)}))}static get portalCleanupRegistry(){return n.getGlobalState(p,()=>new FinalizationRegistry(e=>{const{domElement:t,reactRoot:n}=e;o.__DEBUG__&&console.log("[MeoNode] FinalizationRegistry auto-cleaning portal");try{n&&"function"==typeof n.unmount&&n.unmount()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal auto-cleanup unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal auto-cleanup DOM removal error:",e)}}))}render(o=!1){const s=i.NodeUtil.shouldCacheElement(this)?m.elementCache.get(this.stableKey):void 0,l=i.NodeUtil.shouldNodeUpdate(s?.prevDeps,this._deps,o);if(!l&&s?.renderedElement)return s.accessCount+=1,s.renderedElement;const c=!l,d=m.acquireRenderContext();let{workStack:u}=d;const{renderedElements:h}=d;let p=0;try{const o=e=>{if(e>u.length){const t=Math.max(e,u.length<<1),n=new Array(t);for(let e=0;e<p;e++)n[e]=u[e];u=n}};for(u[p++]={node:this,isProcessed:!1,blocked:c};p>0;){const s=u[p-1];if(!s){p--;continue}const{node:a,isProcessed:l,blocked:c}=s;if(l){p--;const{children:o,key:s,css:l,nativeProps:c,disableEmotion:d,...u}=a.props;let g=[];if(o){const t=Array.isArray(o)?o:[o],n=t.length;g=new Array(n);for(let r=0;r<n;r++){const n=t[r];if(i.NodeUtil.isNodeInstance(n)){const e=h.get(n);if(!e)throw new Error(`[MeoNode] Missing rendered element for child node: ${n.stableKey}`);g[r]=e}else e.isValidElement(n),g[r]=n}}const _={...u,key:s,...c};let y;if(a.element===e.Fragment||t.isFragment(a.element))y=e.createElement(a.element,{key:s},...g);else{y=!d&&(l||!n.hasNoStyleTag(a.element))?e.createElement(r.default,{element:a.element,..._,css:l,suppressHydrationWarning:!0},...g):e.createElement(a.element,_,...g)}if(a!==this&&i.NodeUtil.shouldCacheElement(a)){const e=m.elementCache.get(a.stableKey);if(e)e.prevDeps=a._deps,e.renderedElement=y,e.accessCount+=1;else{const e={prevDeps:a._deps,renderedElement:y,nodeRef:new WeakRef(a),createdAt:Date.now(),accessCount:1,instanceId:a.instanceId};m.elementCache.set(a.stableKey,e),m.cacheCleanupRegistry.register(a,{cacheKey:a.stableKey,instanceId:a.instanceId},a)}}h.set(a,y)}else{s.isProcessed=!0;const e=a.props.children;if(e){const t=(Array.isArray(e)?e:[e]).filter(i.NodeUtil.isNodeInstance);o(p+t.length);for(let e=t.length-1;e>=0;e--){const n=t[e],r=i.NodeUtil.shouldCacheElement(n)?m.elementCache.get(n.stableKey):void 0,o=i.NodeUtil.shouldNodeUpdate(r?.prevDeps,n._deps,c);if(!o&&r?.renderedElement){h.set(n,r.renderedElement);continue}const s=c||!o;u[p++]={node:n,isProcessed:!1,blocked:s}}}}}let s=h.get(this);if(!i.NodeUtil.isServer&&this.stableKey&&(s=e.createElement(a.default,{node:this},s)),i.NodeUtil.shouldCacheElement(this)){const e=m.elementCache.get(this.stableKey);if(e)e.prevDeps=this._deps,e.renderedElement=s,e.accessCount+=1;else{const e={prevDeps:this._deps,renderedElement:s,nodeRef:new WeakRef(this),createdAt:Date.now(),accessCount:1,instanceId:this.instanceId};m.elementCache.set(this.stableKey,e),m.cacheCleanupRegistry.register(this,{cacheKey:this.stableKey,instanceId:this.instanceId},this)}}return s}finally{for(let e=0;e<p;e++)u[e]=null;m.releaseRenderContext({workStack:u,renderedElements:h})}}toPortal(){if(!i.NodeUtil.ensurePortalInfrastructure(this))throw new Error("toPortal() can only be called in a client-side environment");const e=i.NodeUtil.portalInfrastructure.get(this),{domElement:t,reactRoot:n}=e;(()=>{try{n.render(this.render())}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal render error:",e)}})();let r=!1;const s=n.unmount.bind(n);return n.update=e=>{if(r)o.__DEBUG__&&console.warn("[MeoNode] Attempt to update already-unmounted portal");else try{const t=i.NodeUtil.isNodeInstance(e)?e.render():e;n.render(t)}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal update error:",e)}},n.unmount=()=>{if(r)o.__DEBUG__&&console.warn("[MeoNode] Portal already unmounted");else{r=!0;try{m.portalCleanupRegistry.unregister(this)}catch(e){o.__DEBUG__&&console.warn("[MeoNode] Portal unregister warning:",e)}i.NodeUtil.portalInfrastructure.delete(this);try{t?.isConnected&&s()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal unmount error:",e)}try{t?.isConnected&&t.remove()}catch(e){o.__DEBUG__&&console.error("[MeoNode] Portal DOM cleanup error:",e)}}},n}static clearCaches(){const e=Array.from(m.elementCache.keys());o.__DEBUG__&&console.log(`[MeoNode] clearCaches: Clearing ${e.length} entries`);for(const t of e){const e=m.elementCache.get(t);if(e){const n=e.nodeRef?.deref();if(n)try{m.cacheCleanupRegistry.unregister(n),n.lastSignature=void 0,n.lastPropsObj=void 0}catch{o.__DEBUG__&&console.warn(`[MeoNode] Could not unregister ${t} from FinalizationRegistry`)}}}m.elementCache.clear(),s.MountTrackerUtil.cleanup(),o.__DEBUG__&&console.log("[MeoNode] All caches cleared")}}function g(e,t={},n){return new m(e,t,n)}g.clearCaches=m.clearCaches,exports.BaseNode=m,exports.Node=g,exports.createChildrenFirstNode=function(e,t){const n=(n,r,o)=>g(e,{...t,...r,children:n},o);return n.element=e,n},exports.createNode=function(e,t){const n=(n,r)=>g(e,{...t,...n},r);return n.element=e,n};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./react-is.helper.js"),t=require("../constant/css-properties.const.js"),n=require("../constant/common.const.js");const r=t=>e.isForwardRef(t)?"forwardRef":e.isMemo(t)?"memo":e.isFragment(t)?"fragment":e.isPortal(t)?"portal":e.isProfiler(t)?"profiler":e.isStrictMode(t)?"strict-mode":e.isSuspense(t)?"suspense":e.isSuspenseList(t)?"suspense-list":e.isContextConsumer(t)?"context-consumer":e.isContextProvider(t)?"context-provider":e.isLazy(t)?"lazy":e.isElement(t)?"element":e.isReactClassComponent(t)?"class":typeof t;const o=new Set(t.default);exports.CSSPropertySet=o,exports.getCSSProps=function(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.has(n)&&(t[n]=e[n]);return t},exports.getComponentType=r,exports.getDOMProps=function(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&!o.has(n)&&(t[n]=e[n]);return t},exports.getElementTypeName=function e(t){function n(e,t){const n=e?.displayName||e?.name;return n&&"render"!==n?n:t}if(null==t)return"UnknownElementType";const o=t,s=r(o);switch(s){case"string":return t;case"class":return n(o,"ClassComponent");case"function":return n(o,"AnonymousFunctionComponent");case"forwardRef":return n(o,"")||n(o.render,"")||"ForwardRefComponent";case"memo":return n(o,"")||(o.type?e(o.type):"MemoComponent");case"element":return e(o.type);case"fragment":return"Fragment";case"portal":return"Portal";case"profiler":return n(o,"Profiler");case"strict-mode":return"StrictMode";case"suspense":return n(o,"Suspense");case"suspense-list":return"SuspenseList";case"context-consumer":return o._context?.displayName?`${o._context.displayName}.Consumer`:"ContextConsumer";case"context-provider":return o._context?.displayName?`${o._context.displayName}.Provider`:"ContextProvider";case"lazy":return n(o,"LazyComponent");case"object":return n(o,"")?n(o,""):"function"==typeof o.render?n(o.render,"ObjectWithRender"):o.type&&o.type!==t?`Wrapped<${e(o.type)}>`:n(o,"ObjectComponent");case"symbol":return"symbol"==typeof t?t.description?.replace(/^react\./,"").split(".").map(e=>e[0]?.toUpperCase()+e.slice(1)).join("")||t.toString():"SymbolComponent";case"unknown":return"UnknownElementType";default:return`UnsupportedType<${s}>`}},exports.getGlobalState=function(e,t){const n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};return Object.prototype.hasOwnProperty.call(n,e)||(n[e]=t()),n[e]},exports.getValueByPath=(e,t)=>t.split(".").reduce((e,t)=>e&&void 0!==e[t]?e[t]:void 0,e),exports.hasNoStyleTag=function(e){return!(!e||"string"!=typeof e)&&n.noStyleTagsSet.has(e.toLowerCase())},exports.omitUndefined=function(e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(t[n]=e[n]);return t};
@@ -1 +0,0 @@
1
- "use strict";var e=require("../core.node.js"),r=require("../helper/common.helper.js"),n=require("../util/node.util.js");exports.Component=function(o){const t=r.getElementTypeName(o),s=r=>{const t=o(r);return t instanceof e.BaseNode||n.NodeUtil.isNodeInstance(t)?e.Node(t.element,t.rawProps).render():t};function i(r={},n){return e.Node(s,r,n).render()}return s.displayName=`Renderer(${t})`,i.displayName=`Component(${t})`,i};
@@ -1 +0,0 @@
1
- "use strict";var e=require("../core.node.js");exports.Portal=function(n,o){let r,t,a={unmount:()=>{console.warn("Portal instance not yet created. Cannot unmount.")},update:e=>{console.warn("Portal instance not yet created. Cannot update.",e)}};if("function"==typeof o&&n instanceof e.BaseNode)r=[n],t=o;else{if("function"!=typeof n||void 0!==o)throw new Error("Invalid arguments for Portal HOC. Use Portal(component) or Portal(providerNodeInstance, component).");t=n}const s=(n={})=>{const o=t({...n,portal:a});return o instanceof e.BaseNode?o.render():o};return function(n={}){let o;const t=[];n.provider&&t.push(n.provider);const i=[...r??[],...t],{provider:c,...d}=n,l=e.Node(s,d);function u(n,o){const r=n.rawProps?.children;if(!(r&&r instanceof e.BaseNode))return e.Node(n.element,{...n.rawProps,children:o});const t=u(r,o);return e.Node(n.element,{...n.rawProps,children:t})}return o=i.length>0?i.reduceRight((n,o)=>{if(!(o instanceof e.BaseNode))return console.warn("Portal: Item in provider is not a valid NodeInstance. Skipping.",o),n;return o.rawProps?.children instanceof e.BaseNode?u(o,n):e.Node(o.element,{...o.rawProps,children:n})},l):l,a=o.toPortal(),a}};
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";var r=require("react"),e=require("../core.node.js");exports.usePortal=function(t=[]){const o=r.useRef({}),n=r.useCallback(r=>(o.current.component=r,new Proxy(r,{apply:(r,e,[t])=>(o.current.props=t,r.call(e,t))})),[]);return r.useEffect(()=>{const{portal:r,component:t,props:n}=o.current;r&&t&&r.update(e.Node(t,n))},t),r.useEffect(()=>()=>{o.current.portal?.unmount(),o.current.portal=void 0,o.current.component=void 0,o.current.props=void 0},[]),{portal:o.current.portal,setPortal:r=>o.current.portal=r,createComponent:n}};
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";var e=require("react"),t=require("../components/theme-provider.client.js");exports.useTheme=()=>{const s=e.useContext(t.ThemeContext);if(!s)throw new Error("useTheme must be used within a ThemeProvider");const{theme:m}=s;return e.useEffect(()=>{const e=localStorage.getItem("theme");e&&e===m.mode||localStorage.setItem("theme",m.mode);const t=document.documentElement;"dark"===m.mode?(t.setAttribute("data-theme","dark"),t.classList.add("dark-theme"),t.classList.remove("light-theme")):(t.setAttribute("data-theme","light"),t.classList.add("light-theme"),t.classList.remove("dark-theme"))},[m.mode,m.system]),s};
package/dist/cjs/main.js DELETED
@@ -1 +0,0 @@
1
- "use strict";var e=require("./constant/common.const.js"),t=require("./core.node.js"),r=require("./hoc/portal.hoc.js"),o=require("./hoc/component.hoc.js");require("react");var s=require("./components/react.node.js"),p=require("./components/html.node.js"),x=require("./components/theme-provider.js"),a=require("./hook/usePortal.js"),i=require("./hook/useTheme.js");exports.setDebugMode=e.setDebugMode,exports.Node=t.Node,exports.createChildrenFirstNode=t.createChildrenFirstNode,exports.createNode=t.createNode,exports.Portal=r.Portal,exports.Component=o.Component,exports.Activity=s.Activity,exports.Fragment=s.Fragment,exports.Suspense=s.Suspense,exports.A=p.A,exports.Abbr=p.Abbr,exports.Absolute=p.Absolute,exports.Address=p.Address,exports.Area=p.Area,exports.Article=p.Article,exports.Aside=p.Aside,exports.Audio=p.Audio,exports.B=p.B,exports.Base=p.Base,exports.Bdi=p.Bdi,exports.Bdo=p.Bdo,exports.Blockquote=p.Blockquote,exports.Body=p.Body,exports.Br=p.Br,exports.Button=p.Button,exports.Canvas=p.Canvas,exports.Caption=p.Caption,exports.Center=p.Center,exports.Cite=p.Cite,exports.Code=p.Code,exports.Col=p.Col,exports.Colgroup=p.Colgroup,exports.Column=p.Column,exports.Container=p.Container,exports.Data=p.Data,exports.Datalist=p.Datalist,exports.Dd=p.Dd,exports.Details=p.Details,exports.Dfn=p.Dfn,exports.Dialog=p.Dialog,exports.Div=p.Div,exports.Dl=p.Dl,exports.Dt=p.Dt,exports.Em=p.Em,exports.Embed=p.Embed,exports.Fieldset=p.Fieldset,exports.Figcaption=p.Figcaption,exports.Figure=p.Figure,exports.Fixed=p.Fixed,exports.Footer=p.Footer,exports.Form=p.Form,exports.Grid=p.Grid,exports.H1=p.H1,exports.H2=p.H2,exports.H3=p.H3,exports.H4=p.H4,exports.H5=p.H5,exports.H6=p.H6,exports.Head=p.Head,exports.Header=p.Header,exports.Hgroup=p.Hgroup,exports.Hr=p.Hr,exports.Html=p.Html,exports.I=p.I,exports.Iframe=p.Iframe,exports.Img=p.Img,exports.Input=p.Input,exports.Kbd=p.Kbd,exports.Label=p.Label,exports.Legend=p.Legend,exports.Li=p.Li,exports.Link=p.Link,exports.Main=p.Main,exports.MapElement=p.MapElement,exports.Mark=p.Mark,exports.Menu=p.Menu,exports.Meta=p.Meta,exports.Meter=p.Meter,exports.Nav=p.Nav,exports.Noscript=p.Noscript,exports.ObjectElement=p.ObjectElement,exports.Ol=p.Ol,exports.Optgroup=p.Optgroup,exports.Option=p.Option,exports.Output=p.Output,exports.P=p.P,exports.Param=p.Param,exports.Picture=p.Picture,exports.Pre=p.Pre,exports.Progress=p.Progress,exports.Q=p.Q,exports.Relative=p.Relative,exports.Root=p.Root,exports.Row=p.Row,exports.Rp=p.Rp,exports.Rt=p.Rt,exports.Ruby=p.Ruby,exports.S=p.S,exports.Samp=p.Samp,exports.Script=p.Script,exports.Search=p.Search,exports.Section=p.Section,exports.Select=p.Select,exports.Small=p.Small,exports.Source=p.Source,exports.Span=p.Span,exports.Static=p.Static,exports.Sticky=p.Sticky,exports.Strong=p.Strong,exports.Style=p.Style,exports.Sub=p.Sub,exports.Summary=p.Summary,exports.Sup=p.Sup,exports.Svg=p.Svg,exports.SvgCircle=p.SvgCircle,exports.SvgDefs=p.SvgDefs,exports.SvgEllipse=p.SvgEllipse,exports.SvgG=p.SvgG,exports.SvgLine=p.SvgLine,exports.SvgLinearGradient=p.SvgLinearGradient,exports.SvgPath=p.SvgPath,exports.SvgPolygon=p.SvgPolygon,exports.SvgPolyline=p.SvgPolyline,exports.SvgRadialGradient=p.SvgRadialGradient,exports.SvgRect=p.SvgRect,exports.SvgStop=p.SvgStop,exports.SvgSymbol=p.SvgSymbol,exports.SvgText=p.SvgText,exports.SvgTspan=p.SvgTspan,exports.SvgUse=p.SvgUse,exports.Table=p.Table,exports.Tbody=p.Tbody,exports.Td=p.Td,exports.Template=p.Template,exports.Text=p.Text,exports.Textarea=p.Textarea,exports.Tfoot=p.Tfoot,exports.Th=p.Th,exports.Thead=p.Thead,exports.Time=p.Time,exports.Title=p.Title,exports.Tr=p.Tr,exports.Track=p.Track,exports.U=p.U,exports.Ul=p.Ul,exports.Var=p.Var,exports.Video=p.Video,exports.Wbr=p.Wbr,exports.ThemeProvider=x.ThemeProvider,exports.usePortal=a.usePortal,exports.useTheme=i.useTheme;
@@ -1 +0,0 @@
1
- "use strict";var e=require("../components/registry.client.js");const r=require("../core.node.js").createNode(e.default);exports.StyleRegistry=r;
@@ -1 +0,0 @@
1
- "use strict";var t=require("../constant/common.const.js");class n{constructor(){}static _mountedCounts=new Map;static _unmountCallCount=new Map;static isMounted(t){return(this._mountedCounts.get(t)||0)>0}static trackMount(n){const o=this._mountedCounts.get(n)||0;this._mountedCounts.set(n,o+1),t.__DEBUG__&&this._unmountCallCount.delete(n)}static untrackMount(n){const o=this._mountedCounts.get(n)||0;if(o>0){const t=o-1;return 0===t?this._mountedCounts.delete(n):this._mountedCounts.set(n,t),t>0}if(t.__DEBUG__){const t=(this._unmountCallCount.get(n)||0)+1;this._unmountCallCount.set(n,t),t>1&&console.warn(`[MeoNode] untrackMount called ${t} times for an already unmounted node: ${n}. This could indicate a memory leak or a bug in a component's lifecycle.`)}return!1}static cleanup(){this._mountedCounts.clear(),t.__DEBUG__&&this._unmountCallCount.clear()}}exports.MountTrackerUtil=n;
@@ -1 +0,0 @@
1
- "use strict";var e=require("../constant/common.const.js"),t=require("../core.node.js"),i=require("./mount-tracker.util.js");class a{constructor(){}static _instance=null;static _originalPushState=null;static _originalReplaceState=null;static _isPatched=!1;_isListening=!1;_cleanupTimeout=null;static getInstance(){return this._instance||(this._instance=new a),this._instance}start(){this._isListening||"undefined"==typeof window||(this._isListening=!0,window.addEventListener("popstate",this._handleNavigation),this._patchHistoryMethods(),this._setupAutoCleanup(),e.__DEBUG__&&console.log("[MeoNode] NavigationCacheManagerUtil started"))}_stop(){this._isListening&&"undefined"!=typeof window&&(window.removeEventListener("popstate",this._handleNavigation),this._cleanupTimeout&&(clearTimeout(this._cleanupTimeout),this._cleanupTimeout=null),this._isListening=!1,e.__DEBUG__&&console.log("[MeoNode] NavigationCacheManagerUtil stopped"))}_handleNavigation=()=>{this._cleanupTimeout&&clearTimeout(this._cleanupTimeout);const a=t.BaseNode.elementCache.size,n=a<100?50:a<500?100:200;this._cleanupTimeout=setTimeout(()=>{let a=0;t.BaseNode.elementCache.keys().forEach(e=>{i.MountTrackerUtil.isMounted(e)||(t.BaseNode.elementCache.delete(e),a++)}),e.__DEBUG__&&console.log(`[MeoNode] Navigation: cleared ${a} unmounted elements`)},n)};_patchHistoryMethods(){a._isPatched||(a._originalPushState=history.pushState,a._originalReplaceState=history.replaceState,history.pushState=(...e)=>{a._originalPushState.apply(history,e),this._handleNavigation()},history.replaceState=(...e)=>{a._originalReplaceState.apply(history,e),this._handleNavigation()},a._isPatched=!0)}_setupAutoCleanup(){window.__MEONODE_CLEANUP_REGISTERED||(window.addEventListener("beforeunload",()=>{this._stop(),t.BaseNode.clearCaches()}),window.__MEONODE_CLEANUP_REGISTERED=!0)}}exports.NavigationCacheManagerUtil=a;
@@ -1 +0,0 @@
1
- "use strict";var e=require("react"),t=require("../helper/react-is.helper.js"),o=require("../helper/common.helper.js"),r=require("../constant/common.const.js"),n=require("../core.node.js"),s=require("react-dom/client");const i=Symbol.for("@meonode/ui/NodeUtil/functionSignatureCache"),a=Symbol.for("@meonode/ui/NodeUtil/portalInfrastructure");class c{constructor(){}static isServer="undefined"==typeof window;static get _functionSignatureCache(){return o.getGlobalState(i,()=>new WeakMap)}static CRITICAL_PROPS=new Set(["css","className","disableEmotion","props"]);static get portalInfrastructure(){return o.getGlobalState(a,()=>new WeakMap)}static isNodeInstance=e=>"object"==typeof e&&null!==e&&"element"in e&&"function"==typeof e.render&&"function"==typeof e.toPortal&&"isBaseNode"in e;static isStyleProp=c.isServer||"undefined"==typeof document?()=>!1:e=>e in document.body.style;static hashString(e){let t=2166136261,o=5381;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t^=n,t=Math.imul(t,16777619),o=33*o^n}return`${(t>>>0).toString(36)}_${(o>>>0).toString(36)}`}static hashCSS(e){const t=Object.keys(e);let o=t.length;for(let r=0;r<Math.min(t.length,10);r++){const n=t[r],s=e[n];o=(o<<5)-o+n.charCodeAt(0),o&=o,"string"==typeof s&&(o=(o<<5)-o+s.length)}return o.toString(36)}static createPropSignature(e,t){if(c.isServer)return;const r=o.getElementTypeName(e),n=Object.keys(t);n.length>1&&n.sort();const s=[`${r}:`];if("function"==typeof e){let t=c._functionSignatureCache.get(e);t||(t=c.hashString(e.toString()),c._functionSignatureCache.set(e,t)),s.push(t)}for(const e of n){const o=t[e];let r;const n=typeof o;if("string"===n||"number"===n||"boolean"===n)r=`${e}:${o};`;else if(null===o)r=`${e}:null;`;else if(void 0===o)r=`${e}:undefined;`;else if("css"===e&&"object"==typeof o)r=`css:${this.hashCSS(o)};`;else if(Array.isArray(o)){const t=o.filter(e=>{const t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===e});r=t.length===o.length?`${e}:[${t.join(",")}];`:`${e}:[${o.length}];`}else if(o&&o.isBaseNode)r=`${e}:${o.stableKey};`;else if("function"===n)r=`${e}:${c.hashString(o.toString())};`;else{r=`${e}:{${Object.keys(o).sort().join(",")}};`}s.push(r)}return c.hashString(s.join(","))}static extractCriticalProps(e,t){const o={_keyCount:t.length};let r=0;for(const n of t){if(r>=50)break;if(c.CRITICAL_PROPS.has(n)){o[n]=e[n],r++;continue}const s=n.charCodeAt(0);111!==s||110!==n.charCodeAt(1)?!(97===s&&114===n.charCodeAt(1)&&105===n.charCodeAt(2)&&97===n.charCodeAt(3)||100===s&&97===n.charCodeAt(1)&&116===n.charCodeAt(2)&&97===n.charCodeAt(3))?t.length<=100&&c.isStyleProp(n)&&(o[n]=e[n],r++):(o[n]=e[n],r++):(o[n]=e[n],r++)}return o}static processProps(e,t={},r){const{ref:n,key:s,children:i,css:a,props:d={},disableEmotion:l,...u}=t;if(0===Object.keys(u).length&&!a)return o.omitUndefined({ref:n,key:s,disableEmotion:l,nativeProps:o.omitUndefined(d),children:c._processChildren(i,l)});const p={},f={},m=Object.keys(u);for(let e=0;e<m.length;e++){const t=m[e],o=u[t],r=typeof o;"string"===r||"number"===r||"boolean"===r?p[t]=o:f[t]=o}const{cssProps:y}={cssProps:o.getCSSProps(p)},h=o.getCSSProps(f),g=o.getDOMProps(u),b={...y,...h,...a},C=c._processChildren(i,l,r);return o.omitUndefined({ref:n,key:s,css:b,...g,disableEmotion:l,nativeProps:o.omitUndefined(d),children:C})}static _processChildren(e,t,o){if(e)return"function"==typeof e?e:Array.isArray(e)?1===e.length?c.processRawNode(e[0],t,`${o}_0`):e.map((e,r)=>c.processRawNode(e,t,`${o}_${r}`)):c.processRawNode(e,t,o)}static shouldCacheElement(e){return!c.isServer&&!!e.stableKey&&!!e.dependencies}static shouldNodeUpdate(e,t,o){return!!c.isServer||!o&&(void 0===t||(void 0===e||(t.length!==e.length||!!t.some((t,o)=>!Object.is(t,e[o])))))}static processRawNode(o,r,s){if(null==o||"string"==typeof o||"number"==typeof o||"boolean"==typeof o)return o;if(c.isNodeInstance(o)){if(s||r&&!o.rawProps.disableEmotion){const e=new n.BaseNode(o.element,o.rawProps,o.dependencies);return e.stableKey=`${s}:${e.stableKey}`,r&&!e.rawProps.disableEmotion&&(e.rawProps.disableEmotion=!0),e}return o}if(c.isFunctionChild(o))return new n.BaseNode(c.functionRenderer,{props:{render:o,disableEmotion:r}},void 0);if(e.isValidElement(o)){if("string"==typeof o.type){const{style:e,...t}=o.props,s={...t,...e||{}};return new n.BaseNode(o.type,{...s,...null!==o.key&&void 0!==o.key?{key:o.key}:{},disableEmotion:r},void 0)}return new n.BaseNode(o.type,{...o.props,...null!==o.key&&void 0!==o.key?{key:o.key}:{},disableEmotion:r},void 0)}return t.isReactClassComponent(o)||t.isMemo(o)||t.isForwardRef(o)?new n.BaseNode(o,{disableEmotion:r},void 0):o instanceof e.Component?c.processRawNode(o.render(),r,s):o}static isFunctionChild(e){if("function"!=typeof e||t.isReactClassComponent(e)||t.isMemo(e)||t.isForwardRef(e))return!1;try{return!(e.prototype&&"function"==typeof e.prototype.render)}catch(e){return r.__DEBUG__&&console.error("MeoNode: Error checking if a node is a function child.",e),!0}}static functionRenderer({render:t,disableEmotion:s}){let i;try{i=t()}catch(e){r.__DEBUG__&&console.error("MeoNode: Error executing function-as-a-child.",e),i=null}if(null==i)return i;if(c.isNodeInstance(i))return s&&!i.rawProps.disableEmotion?new n.BaseNode(i.element,{...i.rawProps,disableEmotion:!0}).render():i.render();if(Array.isArray(i)){const e=(e,t)=>{try{return`${o.getElementTypeName(e)}-${t}`}catch(e){return r.__DEBUG__&&console.error("MeoNode: Could not determine element type name for key in function-as-a-child.",e),`item-${t}`}};return i.map((t,o)=>c.renderProcessedNode({processedElement:c.processRawNode(t,s),passedKey:e(t,o),disableEmotion:s}))}if(i instanceof e.Component)return c.renderProcessedNode({processedElement:c.processRawNode(i.render(),s),disableEmotion:s});if("string"==typeof i||"number"==typeof i||"boolean"==typeof i)return i;const a=c.processRawNode(i,s);return a?c.renderProcessedNode({processedElement:a,disableEmotion:s}):i}static renderProcessedNode({processedElement:o,passedKey:r,disableEmotion:s}){const i={};if(void 0!==r&&(i.key=r),c.isNodeInstance(o)){const e=o.rawProps?.key;return o.rawProps.disableEmotion=s,e===r?o.render():new n.BaseNode(o.element,{...o.rawProps,...i}).render()}return t.isReactClassComponent(o)?new n.BaseNode(o,{...i,disableEmotion:s}).render():o instanceof e.Component?o.render():"function"==typeof o?e.createElement(o,{key:r}):o}static ensurePortalInfrastructure(e){if(c.isServer)return!1;let t=c.portalInfrastructure.get(e);if(t?.domElement?.isConnected&&t?.reactRoot)return!0;if(t&&(!t.domElement?.isConnected||!t.reactRoot)){try{t.reactRoot?.unmount?.()}catch(e){r.__DEBUG__&&console.error("MeoNode: Error unmounting stale portal root.",e)}c.cleanupPortalInfra(t),c.portalInfrastructure.delete(e),t=void 0}const o=document.createElement("div");document.body.appendChild(o);const i=s.createRoot(o),a={render:i.render.bind(i),unmount:i.unmount.bind(i),update:()=>{}};return t={domElement:o,reactRoot:a,instanceId:e.instanceId},c.portalInfrastructure.set(e,t),n.BaseNode.portalCleanupRegistry.register(e,{domElement:o,reactRoot:a},e),!0}static cleanupPortalInfra(e){try{e.reactRoot?.unmount&&e.reactRoot.unmount()}catch(e){r.__DEBUG__&&console.error("Portal cleanup error:",e)}try{e.domElement?.isConnected&&e.domElement.remove()}catch(e){r.__DEBUG__&&console.error("DOM removal error:",e)}}}exports.NodeUtil=c;
@@ -1 +0,0 @@
1
- "use strict";var e=require("../helper/common.helper.js");class t{constructor(){}static parseFlexShorthand(e){if(null==e)return null;if("number"==typeof e)return{grow:e,shrink:1,basis:"0%"};if("string"!=typeof e)return null;const t=e.trim().toLowerCase();if(!t)return null;switch(t){case"none":return{grow:0,shrink:0,basis:"auto"};case"auto":return{grow:1,shrink:1,basis:"auto"};case"initial":return{grow:0,shrink:1,basis:"auto"};default:return null}}static isPlainObject=e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype};static resolveObjWithTheme=(r,l,s={})=>{const{processFunctions:n=!1}=s;if(!l||!l.system||"object"!=typeof l.system||0===Object.keys(l.system).length||!r||0===Object.keys(r).length)return r;const i=l.system,o=[{value:r,isProcessed:!1}],a=new Map,u=new Set,c=/theme\.([a-zA-Z0-9_.-]+)/g,f=t=>{c.lastIndex=0;let r=!1;const l=t.replace(c,(t,l)=>{const s=e.getValueByPath(i,l);if(null!=s){if(r=!0,"object"==typeof s){if(!Array.isArray(s)&&"default"in s)return s.default;throw new Error("The provided theme path is invalid!")}return s}return t});return r?l:t};for(;o.length>0;){const e=o[o.length-1],r=e.value;if(t.isPlainObject(r)||Array.isArray(r))if(a.has(r))o.pop();else if(e.isProcessed){o.pop(),u.delete(r);let e=r;if(Array.isArray(r)){let t=null;for(let e=0;e<r.length;e++){const l=r[e],s=a.get(l)??l;s!==l&&(null===t&&(t=[...r]),t[e]=s)}null!==t&&(e=t)}else{let t=null;for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e];let i=a.get(s)??s,o=e;if("string"==typeof e&&e.includes("theme.")&&(o=f(e)),"function"==typeof i&&n){const e=i(l);i="string"==typeof e&&e.includes("theme.")?f(e):e}else"string"==typeof i&&i.includes("theme.")&&(i=f(i));i===s&&o===e||(null===t&&(t={...r}),o!==e&&delete t[e],t[o]=i)}null!==t&&(e=t)}a.set(r,e)}else{e.isProcessed=!0,u.add(r);const l=Array.isArray(r)?r:Object.values(r);for(let e=l.length-1;e>=0;e--){const r=l[e];!t.isPlainObject(r)&&!Array.isArray(r)||u.has(r)||o.push({value:r,isProcessed:!1})}}else o.pop()}return a.get(r)??r};static resolveDefaultStyle=e=>{if(null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e)return{};const{flex:r,...l}=e,s="flex"===l.display||"inline-flex"===l.display,n=!!(l.overflow||l.overflowY||l.overflowX),i=l.flexFlow?.includes("wrap")||"wrap"===l.flexWrap||"wrap-reverse"===l.flexWrap,o="flexShrink"in e&&void 0!==e.flexShrink,a=r?t.parseFlexShorthand(r):null;let u;if(!o)if(a)u=a.shrink;else if(s){if(!n){const e="column"===l.flexDirection||"column-reverse"===l.flexDirection,t="row"===l.flexDirection||"row-reverse"===l.flexDirection||!l.flexDirection;(e&&!i||t&&!i)&&(u=0)}}else u=0;return{flex:r,flexShrink:u,minHeight:0,minWidth:0,...l}}}exports.ThemeUtil=t;
@@ -1,12 +0,0 @@
1
- import { type ReactElement } from 'react';
2
- import type { NodePortal, PortalProps } from '../types/node.type.js';
3
- /**
4
- * Hook for managing a portal that renders node components outside the React component tree.
5
- * @deprecated This hook is unstable and will likely be removed in future versions
6
- */
7
- export declare function usePortal<T extends any[]>(deps?: T): {
8
- portal: NodePortal | undefined;
9
- setPortal: (p: NodePortal) => NodePortal;
10
- createComponent: <P extends Record<string, any>>(fn: (props: PortalProps<P>) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) => (props: PortalProps<P>) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
11
- };
12
- //# sourceMappingURL=usePortal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePortal.d.ts","sourceRoot":"","sources":["../../../src/hook/usePortal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAA;AACzE,OAAO,KAAK,EAAmB,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAGvF;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,IAAI,GAAE,CAAsB;;;sBAGhC,CAAC;EAgCvC"}
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{useRef as r,useCallback as o,useEffect as t}from"react";import{Node as n}from"../core.node.js";function e(e=[]){const p=r({}),c=o(r=>(p.current.component=r,new Proxy(r,{apply:(r,o,[t])=>(p.current.props=t,r.call(o,t))})),[]);return t(()=>{const{portal:r,component:o,props:t}=p.current;r&&o&&r.update(n(o,t))},e),t(()=>()=>{p.current.portal?.unmount(),p.current.portal=void 0,p.current.component=void 0,p.current.props=void 0},[]),{portal:p.current.portal,setPortal:r=>p.current.portal=r,createComponent:c}}export{e as usePortal};
File without changes