@meonode/ui 0.4.12 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.4.13] - 2025-11-23
6
+
7
+ ### Fix
8
+ - **props**: improve prop handling and prevent leakage ([`73cc696`](https://github.com/l7aromeo/meonode-ui/commit/73cc696b3df8c1bd2ddef789de58febc6cd2f1c5))
9
+ - This commit refactors prop handling within the MeoNode ecosystem to ensure that internal processing props are not leaked to the DOM.
10
+ - Key changes:
11
+ - The `MeoNodeUnmounter` is updated to correctly isolate and pass through props intended for the underlying DOM element, improving compatibility with libraries like MUI.
12
+ - Internal props such as `node`, `css`, and `disableEmotion` are now explicitly prevented from being rendered as HTML attributes.
13
+ - Added comprehensive tests to verify that standard HTML attributes are passed through while internal props are successfully filtered out.
14
+ - This improves the robustness and predictability of component rendering.
15
+
16
+ ### Test
17
+ - **props**: add tests for prop handling and leakage ([`a508e10`](https://github.com/l7aromeo/meonode-ui/commit/a508e107539d9ce84e8d99b63a0af329b28f3249))
18
+ - Added new tests to verify that component props are correctly passed as HTML attributes, handle createNode and Node() correctly, and crucially, that internal MeoNode props are not leaked to the DOM.
19
+
20
+ ### Chore
21
+ - **core**: remove unnecessary type assertion from finalChildren assignment ([`827b3ef`](https://github.com/l7aromeo/meonode-ui/commit/827b3ef4490bca08d58ef5fe1fd885aadbbb1524))
22
+
5
23
  ## [0.4.12] - 2025-11-21
6
24
 
7
25
  ### Feat
@@ -1,2 +1,2 @@
1
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({node:n,children:s,...u}){const a=e.useEffectEvent(()=>{n.stableKey&&(r.BaseNode.elementCache.delete(n.stableKey),t.MountTrackerUtil.mountedNodes.has(n.stableKey)&&t.MountTrackerUtil.untrackMount(n.stableKey),r.BaseNode.cacheCleanupRegistry.unregister(n)),n.lastSignature=void 0});return e.useEffect(()=>()=>a(),[]),e.isValidElement(s)?e.cloneElement(s,u):s};
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,...s}){const{node:u,...a}=s,l=e.useEffectEvent(()=>{u.stableKey&&(r.BaseNode.elementCache.delete(u.stableKey),t.MountTrackerUtil.mountedNodes.has(u.stableKey)&&t.MountTrackerUtil.untrackMount(u.stableKey),r.BaseNode.cacheCleanupRegistry.unregister(u)),u.lastSignature=void 0});return e.useEffect(()=>()=>l(),[]),e.isValidElement(n)&&Object.keys(a).length>0?e.cloneElement(n,a):n};
@@ -17,7 +17,7 @@ import type { NodeInstance } from '../types/node.type.js';
17
17
  * @param {ReactNode} [props.children] The children to be rendered by this component.
18
18
  * @returns {ReactNode} The `children` passed to the component.
19
19
  */
20
- export default function MeoNodeUnmounter({ node, children, ...rest }: {
20
+ export default function MeoNodeUnmounter({ children, ...props }: {
21
21
  node: NodeInstance;
22
22
  children?: ReactNode;
23
23
  }): ReactNode;
@@ -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,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CA0B7H"}
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,CAgCxH"}
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{useEffectEvent as e,useEffect as t,isValidElement as r,cloneElement as o}from"react";import{MountTrackerUtil as a}from"../util/mount-tracker.util.js";import{BaseNode as n}from"../core.node.js";function s({node:s,children:l,...u}){const i=e(()=>{s.stableKey&&(n.elementCache.delete(s.stableKey),a.mountedNodes.has(s.stableKey)&&a.untrackMount(s.stableKey),n.cacheCleanupRegistry.unregister(s)),s.lastSignature=void 0});return t(()=>()=>i(),[]),r(l)?o(l,u):l}export{s as default};
2
+ import{useEffectEvent as e,useEffect as t,isValidElement as r,cloneElement as o}from"react";import{MountTrackerUtil as n}from"../util/mount-tracker.util.js";import{BaseNode as a}from"../core.node.js";function s({children:s,...l}){const{node:u,...c}=l,i=e(()=>{u.stableKey&&(a.elementCache.delete(u.stableKey),n.mountedNodes.has(u.stableKey)&&n.untrackMount(u.stableKey),a.cacheCleanupRegistry.unregister(u)),u.lastSignature=void 0});return t(()=>()=>i(),[]),r(s)&&Object.keys(c).length>0?o(s,c):s}export{s as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
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": "0.4.12",
4
+ "version": "0.4.13",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",