@meonode/ui 0.4.6 → 0.4.7

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,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.4.7] - 2025-11-17
6
+
7
+ ### Fixes
8
+ - **core/cache:** optimize navigation cache debounce timing and enhance stableKey handling ([`fff6f207`](https://github.com/l7aromeo/meonode-ui/commit/fff6f2070a06cc5ad461a2f992b111fb957fae6f))
9
+ - Adjust navigation cleanup debounce duration dynamically based on cache size for better performance.
10
+ - Change stableKey and _lastSignature to be optional to better represent their possible undefined state.
11
+ - Refactor _getStableKey to return undefined on server instead of empty string.
12
+ - Optimize critical props extraction by introducing NodeUtil.extractCriticalProps helper.
13
+ - Improve client-side caching logic to avoid lookups when stableKey is absent.
14
+ - Remove unused imports and redundant code in node.util.ts; improve shallowEqual implementation.
15
+ - Update createPropSignature to return undefined on server and use getElementTypeName directly.
16
+ - Add detailed comments and refine hashString combining FNV-1a and djb2 hashes for robustness.
17
+
5
18
  ## [0.4.6] - 2025-11-17
6
19
 
7
20
  ### Fixes
@@ -15,9 +15,9 @@ export declare class BaseNode<E extends NodeElementType> {
15
15
  readonly isBaseNode: boolean;
16
16
  private _props?;
17
17
  private readonly _deps?;
18
- stableKey: string;
18
+ stableKey?: string;
19
19
  private _lastPropsRef;
20
- private _lastSignature;
20
+ private _lastSignature?;
21
21
  static elementCache: Map<string, ElementCacheEntry>;
22
22
  static propProcessingCache: Map<string, PropProcessingCache>;
23
23
  static scheduledCleanup: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EAKlB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEX,eAA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U,CAAC,GAAG,sBAAsB,GACpG,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GACxC,CAAC,CAAC,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjE,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,UAAU,CAAC,EACxD,IAAI,CAAC,EAAE,cAAc,KAClB,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,GACtC,CAAC,CAAC,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjE,QAAQ,CAAC,EAAE,QAAQ,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,UAAU,CAAC,EACzD,IAAI,CAAC,EAAE,cAAc,KAClB,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAQzC"}
package/dist/core.node.js CHANGED
@@ -1,4 +1,4 @@
1
- var _BaseNode,_excluded=["ref","children"],_excluded2=["key"],_excluded3=["children","key","css","nativeProps","disableEmotion"];function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _createForOfIteratorHelper(b,c){var d="undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(!d){if(Array.isArray(b)||(d=_unsupportedIterableToArray(b))||c&&b&&"number"==typeof b.length){d&&(b=d);var e=0,f=function F(){};return{s:f,n:function n(){return e>=b.length?{done:!0}:{done:!1,value:b[e++]}},e:function e(a){throw a},f:f}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g,h=!0,i=!1;return{s:function s(){d=d.call(b)},n:function n(){var a=d.next();return h=a.done,a},e:function e(a){i=!0,g=a},f:function f(){try{h||null==d["return"]||d["return"]()}finally{if(i)throw g}}}}function _unsupportedIterableToArray(b,c){if(b){if("string"==typeof b)return _arrayLikeToArray(b,c);var a={}.toString.call(b).slice(8,-1);return"Object"===a&&b.constructor&&(a=b.constructor.name),"Map"===a||"Set"===a?Array.from(b):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(b,c):void 0}}function _arrayLikeToArray(b,c){(null==c||c>b.length)&&(c=b.length);for(var d=0,f=Array(c);d<c;d++)f[d]=b[d];return f}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import{createElement,isValidElement,Fragment}from"react";import{isFragment,isValidElementType}from"./helper/react-is.helper.js";import{getComponentType,getElementTypeName,hasNoStyleTag}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";import{__DEBUG__}from"./constants/common.const.js";import{MountTrackerUtil}from"./util/mount-tracker.util.js";import MeoNodeUnmounter from"./components/meonode-unmounter.client.js";import{NavigationCacheManagerUtil}from"./util/navigation-cache-manager.util.js";import{NodeUtil}from"./util/node.util.js";import{ThemeUtil}from"./util/theme.util.js";/**
1
+ var _BaseNode,_excluded=["ref","children"],_excluded2=["key"],_excluded3=["children","key","css","nativeProps","disableEmotion"];function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import{createElement,isValidElement,Fragment}from"react";import{isFragment,isValidElementType}from"./helper/react-is.helper.js";import{getComponentType,getElementTypeName,hasNoStyleTag}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";import{__DEBUG__}from"./constants/common.const.js";import{MountTrackerUtil}from"./util/mount-tracker.util.js";import MeoNodeUnmounter from"./components/meonode-unmounter.client.js";import{NavigationCacheManagerUtil}from"./util/navigation-cache-manager.util.js";import{NodeUtil}from"./util/node.util.js";import{ThemeUtil}from"./util/theme.util.js";/**
2
2
  * The core abstraction of the MeoNode library. It wraps a React element or component,
3
3
  * providing a unified interface for processing props, normalizing children, and handling styles.
4
4
  * This class is central to the library's ability to offer a JSX-free, fluent API for building UIs.
@@ -6,7 +6,7 @@ var _BaseNode,_excluded=["ref","children"],_excluded2=["key"],_excluded3=["child
6
6
  * @class BaseNode
7
7
  * @template E - The type of React element or component this node represents.
8
8
  */export class BaseNode{constructor(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length?arguments[2]:void 0;// Element type validation is performed once at construction to prevent invalid nodes from being created.
9
- if(_defineProperty(this,"instanceId",Math.random().toString(36).slice(2)+Date.now().toString(36)),_defineProperty(this,"rawProps",{}),_defineProperty(this,"isBaseNode",!0),_defineProperty(this,"stableKey",""),_defineProperty(this,"_lastPropsRef",null),_defineProperty(this,"_lastSignature",""),!isValidElementType(a)){var d=getComponentType(a);throw new Error("Invalid element type: ".concat(d," provided!"))}this.element=a,this.rawProps=b,this._deps=c;// Extract commonly handled props; the remaining `propsForSignature` are used to compute a stable hash.
9
+ if(_defineProperty(this,"instanceId",Math.random().toString(36).slice(2)+Date.now().toString(36)),_defineProperty(this,"rawProps",{}),_defineProperty(this,"isBaseNode",!0),_defineProperty(this,"_lastPropsRef",null),!isValidElementType(a)){var d=getComponentType(a);throw new Error("Invalid element type: ".concat(d," provided!"))}this.element=a,this.rawProps=b,this._deps=c;// Extract commonly handled props; the remaining `propsForSignature` are used to compute a stable hash.
10
10
  var e=b.ref,f=b.children,g=_objectWithoutProperties(b,_excluded);// Generate or get cached stable key
11
11
  this.stableKey=this._getStableKey(g),NodeUtil.isServer||BaseNode._navigationStarted||(NavigationCacheManagerUtil.getInstance().start(),BaseNode._navigationStarted=!0)}/**
12
12
  * Lazily processes and retrieves the final, normalized props for the node.
@@ -30,7 +30,7 @@ this.stableKey=this._getStableKey(g),NodeUtil.isServer||BaseNode._navigationStar
30
30
  * @param key Key passed for prefix if exist
31
31
  * @param props The props object to create a signature for.
32
32
  * @returns A compact string signature suitable for use as a cache key.
33
- */_getStableKey(a){var b=a.key,c=_objectWithoutProperties(a,_excluded2);if(NodeUtil.isServer)return"";if(c===this._lastPropsRef)return this._lastSignature;if(this._lastPropsRef&&NodeUtil.shallowEqual(c,this._lastPropsRef))return this._lastPropsRef=c,this._lastSignature;var d=Object.keys(c),e=d.length;if(100<e){var f,g={_keyCount:e},h=0,i=_createForOfIteratorHelper(d);try{for(i.s();!(f=i.n()).done;){var j=f.value;if(h>=50)break;(NodeUtil.isStyleProp(j)||"css"===j||"className"===j||j.startsWith("on"))&&(g[j]=c[j],h++)}}catch(a){i.e(a)}finally{i.f()}this._lastSignature=NodeUtil.createPropSignature(this.element,g),__DEBUG__&&200<e&&console.warn("MeoNode: Large props (".concat(e," keys) on \"").concat(getElementTypeName(this.element),"\". Consider splitting."))}else this._lastSignature=NodeUtil.createPropSignature(this.element,c);return this._lastPropsRef=c,void 0!==b&&null!==b?"".concat(b+"",":").concat(this._lastSignature):this._lastSignature}/**
33
+ */_getStableKey(a){var b=a.key,c=_objectWithoutProperties(a,_excluded2);if(!NodeUtil.isServer){if(c===this._lastPropsRef)return this._lastSignature;if(this._lastPropsRef&&NodeUtil.shallowEqual(c,this._lastPropsRef))return this._lastPropsRef=c,this._lastSignature;var d=Object.keys(c),e=d.length;if(100<e){var f=NodeUtil.extractCriticalProps(c,d);this._lastSignature=NodeUtil.createPropSignature(this.element,f),__DEBUG__&&200<e&&console.warn("MeoNode: Large props (".concat(e," keys) on \"").concat(getElementTypeName(this.element),"\". Consider splitting."))}else this._lastSignature=NodeUtil.createPropSignature(this.element,c);return this._lastPropsRef=c,void 0!==b&&null!==b?"".concat(b+"",":").concat(this._lastSignature):this._lastSignature}}/**
34
34
  * FinalizationRegistry for cleaning up `elementCache` entries when the associated `BaseNode` instance
35
35
  * is garbage-collected. This helps prevent memory leaks by ensuring that cache entries for
36
36
  * unreferenced nodes are eventually removed.
@@ -52,8 +52,8 @@ this.stableKey=this._getStableKey(g),NodeUtil.isServer||BaseNode._navigationStar
52
52
  * 2. **Complete Phase:** After all of a node's descendants have been rendered, the loop returns to the node.
53
53
  * It then collects the rendered children from a temporary map and creates its own React element.
54
54
  * @method render
55
- */render(){var a=!!(0<arguments.length&&arguments[0]!==void 0)&&arguments[0];NodeUtil.isServer||MountTrackerUtil.trackMount(this.stableKey);// On server we never reuse cached elements because that can cause hydration mismatches.
56
- var b=NodeUtil.isServer?void 0:BaseNode.elementCache.get(this.stableKey),c=NodeUtil.shouldNodeUpdate(null===b||void 0===b?void 0:b.prevDeps,this._deps,a);// Decide whether this node (and its subtree) should update given dependency arrays.
55
+ */render(){var a=!!(0<arguments.length&&arguments[0]!==void 0)&&arguments[0];!NodeUtil.isServer&&this.stableKey&&MountTrackerUtil.trackMount(this.stableKey);// On server, we never reuse cached elements because that can cause hydration mismatches.
56
+ var b=NodeUtil.isServer||!this.stableKey?void 0:BaseNode.elementCache.get(this.stableKey),c=NodeUtil.shouldNodeUpdate(null===b||void 0===b?void 0:b.prevDeps,this._deps,a);// Decide whether this node (and its subtree) should update given dependency arrays.
57
57
  // Fast return: if nothing should update and we have a cached element, reuse it.
58
58
  if(!c&&null!==b&&void 0!==b&&b.renderedElement)return b.accessCount+=1,b.renderedElement;// When this node doesn't need update, its children are considered "blocked" and may be skipped.
59
59
  // Work stack for iterative, non-recursive traversal.
@@ -61,7 +61,7 @@ if(!c&&null!==b&&void 0!==b&&b.renderedElement)return b.accessCount+=1,b.rendere
61
61
  // Map to collect rendered React elements for processed BaseNode instances.
62
62
  // Iterative depth-first traversal with explicit begin/complete phases to avoid recursion.
63
63
  for(var d=[{node:this,isProcessed:!1,blocked:!c}],e=new Map;0<d.length;){var f=d[d.length-1],g=f.node,h=f.isProcessed,j=f.blocked;if(!h){f.isProcessed=!0;var k=g.props.children;if(k)// Only consider BaseNode children for further traversal; primitives and React elements are terminal.
64
- for(var l=(Array.isArray(k)?k:[k]).filter(NodeUtil.isNodeInstance),m=l.length-1;0<=m;m--){var n=l[m],o=NodeUtil.isServer?void 0:BaseNode.elementCache.get(n.stableKey),p=NodeUtil.shouldNodeUpdate(null===o||void 0===o?void 0:o.prevDeps,n._deps,j);// Respect server/client differences for child cache lookup.
64
+ for(var l=(Array.isArray(k)?k:[k]).filter(NodeUtil.isNodeInstance),m=l.length-1;0<=m;m--){var n=l[m],o=NodeUtil.isServer||!n.stableKey?void 0:BaseNode.elementCache.get(n.stableKey),p=NodeUtil.shouldNodeUpdate(null===o||void 0===o?void 0:o.prevDeps,n._deps,j);// Respect server/client differences for child cache lookup.
65
65
  // Determine whether the child should update given its deps and the parent's blocked state.
66
66
  // If child doesn't need update and has cached element, reuse it immediately (no push).
67
67
  if(!p&&null!==o&&void 0!==o&&o.renderedElement){e.set(n,o.renderedElement);continue}// Otherwise push child for processing; childBlocked inherits parent's blocked state.
@@ -71,10 +71,10 @@ var z=_objectSpread(_objectSpread({},x),{},{key:t},v),A=void 0;// Handle fragmen
71
71
  if(g.element===Fragment||isFragment(g.element))A=createElement(g.element,{key:t},...y);else{// StyledRenderer for emotion-based styling unless explicitly disabled or no styles are present.
72
72
  // StyledRenderer handles SSR hydration and emotion CSS injection when css prop exists or element has style tags.
73
73
  var B=!w&&(u||!hasNoStyleTag(g.element));A=B?createElement(StyledRenderer,_objectSpread(_objectSpread({element:g.element},z),{},{css:u,suppressHydrationWarning:!0}),...y):createElement(g.element,z,...y)}// Cache the generated element on client-side to speed up future renders.
74
- if(!NodeUtil.isServer){var C=BaseNode.elementCache.get(g.stableKey);if(C)C.prevDeps=g._deps,C.renderedElement=A,C.accessCount+=1;else{// Create new cache entry and register for cleanup
74
+ if(!NodeUtil.isServer&&g.stableKey){var C=BaseNode.elementCache.get(g.stableKey);if(C)C.prevDeps=g._deps,C.renderedElement=A,C.accessCount+=1;else{// Create new cache entry and register for cleanup
75
75
  var D={prevDeps:g._deps,renderedElement:A,nodeRef:new WeakRef(g),createdAt:Date.now(),accessCount:1,instanceId:g.instanceId};BaseNode.elementCache.set(g.stableKey,D),BaseNode.cacheCleanupRegistry.register(g,{cacheKey:g.stableKey,instanceId:g.instanceId},g)}}// Store the rendered element so parent nodes can reference it.
76
76
  e.set(g,A)}}// Get the final rendered element for the root node of this render cycle.
77
- var E=e.get(this);return NodeUtil.isServer?E:createElement(MeoNodeUnmounter,{stableKey:this.stableKey},E)}/**
77
+ var E=e.get(this);return!NodeUtil.isServer&&this.stableKey?createElement(MeoNodeUnmounter,{stableKey:this.stableKey},E):E}/**
78
78
  * Renders the node into a React Portal, mounting it directly under `document.body`.
79
79
  * Returns a handle with `update` and `unmount` methods to control the portal's lifecycle.
80
80
  * @method toPortal
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-cache-manager.util.d.ts","sourceRoot":"","sources":["../../src/util/navigation-cache-manager.util.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,qBAAa,0BAA0B;IACrC,OAAO,eAAiB;IAExB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA0C;IAClE,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAwC;IACzE,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAA2C;IAC/E,OAAO,CAAC,MAAM,CAAC,UAAU,CAAQ;IAEjC,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,eAAe,CAAY;IAEnC,OAAc,WAAW,IAAI,0BAA0B,CAKtD;IAED;;OAEG;IACI,KAAK,SAaX;IAED;;;OAGG;IACH,OAAO,CAAC,KAAK;IAkBb;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAyBxB;IAED;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAW1B"}
1
+ {"version":3,"file":"navigation-cache-manager.util.d.ts","sourceRoot":"","sources":["../../src/util/navigation-cache-manager.util.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,qBAAa,0BAA0B;IACrC,OAAO,eAAiB;IAExB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA0C;IAClE,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAwC;IACzE,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAA2C;IAC/E,OAAO,CAAC,MAAM,CAAC,UAAU,CAAQ;IAEjC,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,eAAe,CAAY;IAEnC,OAAc,WAAW,IAAI,0BAA0B,CAKtD;IAED;;OAEG;IACI,KAAK,SAaX;IAED;;;OAGG;IACH,OAAO,CAAC,KAAK;IAkBb;;OAEG;IACH,OAAO,CAAC,iBAAiB,CA4BxB;IAED;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAW1B"}
@@ -2,8 +2,8 @@ function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof
2
2
  * Lightweight navigation handler that clears cache on SPA navigation.
3
3
  */export class NavigationCacheManagerUtil{constructor(){var a=this;/**
4
4
  * Debounced navigation handler. Clears mounted element cache and props cache.
5
- */_defineProperty(this,"_isListening",!1),_defineProperty(this,"_cleanupTimeout",null),_defineProperty(this,"_handleNavigation",function(){a._cleanupTimeout&&clearTimeout(a._cleanupTimeout),a._cleanupTimeout=setTimeout(function(){var a=BaseNode.propProcessingCache.size,b=0;// Only clean UNMOUNTED elements
6
- BaseNode.elementCache.keys().forEach(function(a){MountTrackerUtil.mountedNodes.has(a)||(BaseNode.elementCache["delete"](a),b++)}),200<a&&BaseNode.propProcessingCache.clear(),__DEBUG__&&console.log("[MeoNode] Navigation: cleared ".concat(b," unmounted elements, ").concat(a," props entries"))},100)})}static getInstance(){return this._instance||(this._instance=new NavigationCacheManagerUtil),this._instance}/**
5
+ */_defineProperty(this,"_isListening",!1),_defineProperty(this,"_cleanupTimeout",null),_defineProperty(this,"_handleNavigation",function(){a._cleanupTimeout&&clearTimeout(a._cleanupTimeout);var b=BaseNode.elementCache.size,c=100>b?50:500>b?100:200;a._cleanupTimeout=setTimeout(function(){var a=BaseNode.propProcessingCache.size,b=0;// Only clean UNMOUNTED elements
6
+ BaseNode.elementCache.keys().forEach(function(a){MountTrackerUtil.mountedNodes.has(a)||(BaseNode.elementCache["delete"](a),b++)}),200<a&&BaseNode.propProcessingCache.clear(),__DEBUG__&&console.log("[MeoNode] Navigation: cleared ".concat(b," unmounted elements, ").concat(a," props entries"))},c)})}static getInstance(){return this._instance||(this._instance=new NavigationCacheManagerUtil),this._instance}/**
7
7
  * Start listening for navigation events. Idempotent.
8
8
  */start(){this._isListening||"undefined"==typeof window||(// Setup automatic cleanup on page unload
9
9
  this._isListening=!0,window.addEventListener("popstate",this._handleNavigation),this._patchHistoryMethods(),this._setupAutoCleanup(),__DEBUG__&&console.log("[MeoNode] NavigationCacheManagerUtil started"))}/**
@@ -1,5 +1,5 @@
1
1
  import React, { type ReactNode } from 'react';
2
- import type { FunctionRendererProps, NodeElement, NodeElementType, NodeFunction, NodeInstance, DependencyList, NodePortal, FinalNodeProps } from '../types/node.type.js';
2
+ import type { FunctionRendererProps, NodeElement, NodeElementType, NodeFunction, NodeInstance, NodeProps, DependencyList, NodePortal, FinalNodeProps } from '../types/node.type.js';
3
3
  /**
4
4
  * NodeUtil provides a collection of static utility methods and properties
5
5
  * used internally by BaseNode for various tasks such as hashing, shallow comparison,
@@ -9,11 +9,11 @@ import type { FunctionRendererProps, NodeElement, NodeElementType, NodeFunction,
9
9
  export declare class NodeUtil {
10
10
  private constructor();
11
11
  static isServer: boolean;
12
- private static _elementIdMap;
13
- private static _elementIdCounter;
14
12
  private static _functionSignatureCache;
15
13
  private static readonly CACHE_SIZE_LIMIT = 500;
16
14
  private static readonly CACHE_CLEANUP_BATCH = 50;
15
+ private static readonly CRITICAL_PROP_PREFIXES;
16
+ private static readonly CRITICAL_PROPS;
17
17
  static portalInfrastructure: WeakMap<NodeInstance, {
18
18
  domElement: HTMLDivElement;
19
19
  reactRoot: NodePortal & {
@@ -32,17 +32,13 @@ export declare class NodeUtil {
32
32
  * @returns True if the object is a NodeInstance, false otherwise.
33
33
  */
34
34
  static isNodeInstance: (obj: unknown) => obj is NodeInstance;
35
- static isStyleProp: (k: string) => boolean;
36
- /**
37
- * FNV-1a hash function.
38
- * @method fnv1aHash
39
- */
40
- static fnv1aHash(str: string): number;
41
35
  /**
42
- * djb2 hash function.
43
- * @method djb2Hash
36
+ * Determines if a given string `k` is a valid CSS style property.
37
+ * This check is performed only on the client-side by checking if the property exists in `document.body.style`.
38
+ * On the server-side, it always returns `false`.
39
+ * @param k The string to check.
44
40
  */
45
- static djb2Hash(str: string): number;
41
+ static isStyleProp: (k: string) => boolean;
46
42
  /**
47
43
  * Combines FNV-1a and djb2 hash functions for a more robust signature.
48
44
  * @method hashString
@@ -53,21 +49,21 @@ export declare class NodeUtil {
53
49
  * @method shallowEqual
54
50
  */
55
51
  static shallowEqual(a: Record<string, any>, b: Record<string, any>): boolean;
56
- /**
57
- * Generates a stable identifier for the given element type.
58
- * For primitive types (strings), it returns the string itself.
59
- * For component types (functions, classes, exotic components), it generates
60
- * and caches a unique ID using a WeakMap to ensure stability across calls.
61
- * @method getStableElementId
62
- */
63
- static getStableElementId(element: NodeElementType): string | undefined;
64
52
  /**
65
53
  * Creates a unique, stable signature from the element type and props.
66
54
  * This signature includes the element's type to prevent collisions between different components
67
55
  * and handles primitive values in arrays and objects for better caching.
68
56
  * @method createPropSignature
69
57
  */
70
- static createPropSignature(element: NodeElementType, props: Record<string, any>): string;
58
+ static createPropSignature(element: NodeElementType, props: Record<string, any>): string | undefined;
59
+ /**
60
+ * Extracts "critical" props from a given set of props. Critical props are those
61
+ * that are frequently used for styling or event handling, such as `on*` handlers,
62
+ * `aria-*` attributes, `data-*` attributes, `css`, `className`, and `style`.
63
+ * This method is used to optimize prop processing by focusing on props that are
64
+ * most likely to influence rendering or behavior.
65
+ */
66
+ static extractCriticalProps(props: Record<string, any>, keys: string[]): Record<string, any>;
71
67
  /**
72
68
  * Retrieves computed CSS props from the cache with LRU tracking.
73
69
  * Access time and hit count are tracked for smarter eviction.
@@ -87,7 +83,7 @@ export declare class NodeUtil {
87
83
  * generates a signature for caching, and assembles the final props object.
88
84
  * @method processProps
89
85
  */
90
- static processProps(element: NodeElementType, rawProps: Partial<any> | undefined, stableKey: string): FinalNodeProps;
86
+ static processProps(element: NodeElementType, rawProps?: Partial<NodeProps<NodeElementType>>, stableKey?: string): FinalNodeProps;
91
87
  /**
92
88
  * Processes and normalizes children of the node.
93
89
  * 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,EAA6C,MAAM,OAAO,CAAA;AAC/H,OAAO,KAAK,EACV,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EAEZ,cAAc,EACd,UAAU,EACV,cAAc,EAEf,MAAM,yBAAyB,CAAA;AAOhC;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB,OAAO,eAAiB;IAExB,OAAc,QAAQ,UAAgC;IACtD,OAAO,CAAC,MAAM,CAAC,aAAa,CAA6B;IACzD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAI;IAGpC,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAA6B;IAGnE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,OAAM;IAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,MAAK;IAGhD,OAAc,oBAAoB;;;;;OAM/B;IAEH;;;;;;;;;;OAUG;IACH,OAAc,cAAc,wCAS3B;IAED,OAAc,WAAW,yBAAgH;IAEzI;;;OAGG;IACH,OAAc,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO3C;IAED;;;OAGG;IACH,OAAc,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM1C;IAED;;;OAGG;IACH,OAAc,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI5C;IAED;;;OAGG;IACH,OAAc,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAKlF;IAED;;;;;;OAMG;IACH,OAAc,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAW7E;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;IACH,OAAc,eAAe,CAAC,CAAC,SAAS,YAAY,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,YAAY,CAAC,CAAC,CAAC,CAU5G;IAED;;;;;;;;;;;;;OAaG;IACH,OAAc,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,YAAY,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CA0DrJ;IAED;;;;;;;;;OASG;IACH,OAAc,mBAAmB,CAAC,EAChC,gBAAgB,EAChB,SAAS,EACT,cAAc,EACf,EAAE;QACD,gBAAgB,EAAE,WAAW,CAAA;QAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,cAAc,CAAC,EAAE,OAAO,CAAA;KACzB,wUA8BA;IAED;;;;OAIG;IACH,OAAc,0BAA0B,CAAC,IAAI,EAAE,YAAY,WA0C1D;IAED,OAAc,kBAAkB,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,SAAS,EAAE,GAAG,CAAA;KAAE,QAgBrF;CACF"}
@@ -1,40 +1,33 @@
1
- var _NodeUtil,_excluded=["ref","key","children","css","props","disableEmotion"],_excluded2=["style"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(b,c){var d=null==b?null:"undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(null!=d){var g,h,j,k,l=[],a=!0,m=!1;try{if(j=(d=d.call(b)).next,0===c){if(Object(d)!==d)return;a=!1}else for(;!(a=(g=j.call(d)).done)&&(l.push(g.value),l.length!==c);a=!0);}catch(a){m=!0,h=a}finally{try{if(!a&&null!=d["return"]&&(k=d["return"](),Object(k)!==k))return}finally{if(m)throw h}}return l}}function _arrayWithHoles(a){if(Array.isArray(a))return a}function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _createForOfIteratorHelper(b,c){var d="undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(!d){if(Array.isArray(b)||(d=_unsupportedIterableToArray(b))||c&&b&&"number"==typeof b.length){d&&(b=d);var e=0,f=function F(){};return{s:f,n:function n(){return e>=b.length?{done:!0}:{done:!1,value:b[e++]}},e:function e(a){throw a},f:f}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g,h=!0,i=!1;return{s:function s(){d=d.call(b)},n:function n(){var a=d.next();return h=a.done,a},e:function e(a){i=!0,g=a},f:function f(){try{h||null==d["return"]||d["return"]()}finally{if(i)throw g}}}}function _unsupportedIterableToArray(b,c){if(b){if("string"==typeof b)return _arrayLikeToArray(b,c);var a={}.toString.call(b).slice(8,-1);return"Object"===a&&b.constructor&&(a=b.constructor.name),"Map"===a||"Set"===a?Array.from(b):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(b,c):void 0}}function _arrayLikeToArray(b,c){(null==c||c>b.length)&&(c=b.length);for(var d=0,f=Array(c);d<c;d++)f[d]=b[d];return f}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{createElement,isValidElement,StrictMode}from"react";import{isForwardRef,isMemo,isReactClassComponent}from"../helper/react-is.helper.js";import{getCSSProps,getDOMProps,getElementTypeName,omitUndefined}from"../helper/common.helper.js";import{__DEBUG__}from"../constants/common.const.js";import{BaseNode}from"../core.node.js";import{createRoot}from"react-dom/client";/**
1
+ var _NodeUtil,_excluded=["ref","key","children","css","props","disableEmotion"],_excluded2=["style"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(b,c){var d=null==b?null:"undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(null!=d){var g,h,j,k,l=[],a=!0,m=!1;try{if(j=(d=d.call(b)).next,0===c){if(Object(d)!==d)return;a=!1}else for(;!(a=(g=j.call(d)).done)&&(l.push(g.value),l.length!==c);a=!0);}catch(a){m=!0,h=a}finally{try{if(!a&&null!=d["return"]&&(k=d["return"](),Object(k)!==k))return}finally{if(m)throw h}}return l}}function _arrayWithHoles(a){if(Array.isArray(a))return a}function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _createForOfIteratorHelper(b,c){var d="undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(!d){if(Array.isArray(b)||(d=_unsupportedIterableToArray(b))||c&&b&&"number"==typeof b.length){d&&(b=d);var e=0,f=function F(){};return{s:f,n:function n(){return e>=b.length?{done:!0}:{done:!1,value:b[e++]}},e:function e(a){throw a},f:f}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g,h=!0,i=!1;return{s:function s(){d=d.call(b)},n:function n(){var a=d.next();return h=a.done,a},e:function e(a){i=!0,g=a},f:function f(){try{h||null==d["return"]||d["return"]()}finally{if(i)throw g}}}}function _unsupportedIterableToArray(b,c){if(b){if("string"==typeof b)return _arrayLikeToArray(b,c);var a={}.toString.call(b).slice(8,-1);return"Object"===a&&b.constructor&&(a=b.constructor.name),"Map"===a||"Set"===a?Array.from(b):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(b,c):void 0}}function _arrayLikeToArray(b,c){(null==c||c>b.length)&&(c=b.length);for(var d=0,f=Array(c);d<c;d++)f[d]=b[d];return f}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{createElement,isValidElement}from"react";import{isForwardRef,isMemo,isReactClassComponent}from"../helper/react-is.helper.js";import{getCSSProps,getDOMProps,getElementTypeName,omitUndefined}from"../helper/common.helper.js";import{__DEBUG__}from"../constants/common.const.js";import{BaseNode}from"../core.node.js";import{createRoot}from"react-dom/client";/**
2
2
  * NodeUtil provides a collection of static utility methods and properties
3
3
  * used internally by BaseNode for various tasks such as hashing, shallow comparison,
4
4
  * and stable element ID generation. This centralizes common helper functions,
5
5
  * improving modularity and maintainability of the core library.
6
- */export class NodeUtil{constructor(){}/**
7
- * FNV-1a hash function.
8
- * @method fnv1aHash
9
- */static fnv1aHash(a){// FNV offset basis
10
- for(var b=Math.imul,c=2166136261,d=0;d<a.length;d++)c^=a.charCodeAt(d),c=b(c,16777619);return c>>>0;// Convert to unsigned 32-bit integer
11
- }/**
12
- * djb2 hash function.
13
- * @method djb2Hash
14
- */static djb2Hash(a){for(var b=5381,c=0;c<a.length;c++)b=33*b^a.charCodeAt(c);return b>>>0;// Convert to unsigned 32-bit integer
15
- }/**
6
+ */export class NodeUtil{constructor(){}// Determines if the current environment is server-side (Node.js) or client-side (browser).
7
+ /**
16
8
  * Combines FNV-1a and djb2 hash functions for a more robust signature.
17
9
  * @method hashString
18
- */static hashString(a){var b=NodeUtil.fnv1aHash(a),c=NodeUtil.djb2Hash(a);return"".concat(b.toString(36),"_").concat(c.toString(36));// Combine and convert to base36
19
- }/**
10
+ */static hashString(a){// FNV offset basis
11
+ // djb2 init
12
+ for(var b=Math.imul,c,d=2166136261,e=5381,f=0;f<a.length;f++)// FNV-1a
13
+ // djb2
14
+ c=a.charCodeAt(f),d^=c,d=b(d,16777619),e=33*e^c;return"".concat((d>>>0).toString(36),"_").concat((e>>>0).toString(36))}/**
20
15
  * Performs a shallow equality check between two objects.
21
16
  * @method shallowEqual
22
- */static shallowEqual(c,a){var b=Object.keys(c),d=Object.keys(a);return!(b.length!==d.length)&&b.every(function(b){return c[b]===a[b]})}/**
23
- * Generates a stable identifier for the given element type.
24
- * For primitive types (strings), it returns the string itself.
25
- * For component types (functions, classes, exotic components), it generates
26
- * and caches a unique ID using a WeakMap to ensure stability across calls.
27
- * @method getStableElementId
28
- */static getStableElementId(a){if(!NodeUtil.isServer)return a===StrictMode?StrictMode.name:"string"==typeof a?a:(NodeUtil._elementIdMap.has(a)||NodeUtil._elementIdMap.set({elementName:getElementTypeName(a)},"Component_".concat(NodeUtil._elementIdCounter++)),NodeUtil._elementIdMap.get(a));// Client-side: Use WeakMap to maintain stable IDs across calls
29
- }/**
17
+ */static shallowEqual(c,a){if(c===a)return!0;var b=0,d=0;for(var e in c){if(!(e in a)||c[e]!==a[e])return!1;b++}for(var f in a)d++;return b===d}/**
30
18
  * Creates a unique, stable signature from the element type and props.
31
19
  * This signature includes the element's type to prevent collisions between different components
32
20
  * and handles primitive values in arrays and objects for better caching.
33
21
  * @method createPropSignature
34
- */static createPropSignature(a,b){if(NodeUtil.isServer)return"";// Safe element identification that works with Next.js Client Components
35
- var c=NodeUtil.getStableElementId(a),d=Object.keys(b).sort(),e=["".concat(c,":")];if("function"==typeof a){var f=NodeUtil._functionSignatureCache.get(a);f||(f=NodeUtil.hashString(a.toString()),NodeUtil._functionSignatureCache.set(a,f)),e.push(f)}var g,h=_createForOfIteratorHelper(d);try{for(h.s();!(g=h.n()).done;){var i=g.value,j=b[i],k=void 0,l=_typeof(j);if("string"===l||"number"===l||"boolean"===l)k="".concat(i,":").concat(j,";");else if(null===j)k="".concat(i,":null;");else if(j===void 0)k="".concat(i,":undefined;");else if(Array.isArray(j)){// Hash primitive values in arrays for better cache hits
22
+ */static createPropSignature(a,b){if(!NodeUtil.isServer){var c=getElementTypeName(a),d=Object.keys(b).sort(),e=["".concat(c,":")];if("function"==typeof a){var f=NodeUtil._functionSignatureCache.get(a);f||(f=NodeUtil.hashString(a.toString()),NodeUtil._functionSignatureCache.set(a,f)),e.push(f)}var g,h=_createForOfIteratorHelper(d);try{for(h.s();!(g=h.n()).done;){var i=g.value,j=b[i],k=void 0,l=_typeof(j);if("string"===l||"number"===l||"boolean"===l)k="".concat(i,":").concat(j,";");else if(null===j)k="".concat(i,":null;");else if(void 0===j)k="".concat(i,":undefined;");else if(Array.isArray(j)){// Hash primitive values in arrays for better cache hits
36
23
  var m=j.filter(function(a){var b=_typeof(a);return"string"===b||"number"===b||"boolean"===b||null===a});k=m.length===j.length?"".concat(i,":[").concat(m.join(","),"];"):"".concat(i,":[").concat(j.length,"];")}else if(j&&j.isBaseNode)k="".concat(i,":").concat(j.stableKey,";");else{// Include sorted keys for object structure signature
37
- var n=Object.keys(j).sort();k="".concat(i,":{").concat(n.join(","),"};")}e.push(k)}}catch(a){h.e(a)}finally{h.f()}return NodeUtil.hashString(e.join(","))}/**
24
+ var n=Object.keys(j).sort();k="".concat(i,":{").concat(n.join(","),"};")}e.push(k)}}catch(a){h.e(a)}finally{h.f()}return NodeUtil.hashString(e.join(","))}}/**
25
+ * Extracts "critical" props from a given set of props. Critical props are those
26
+ * that are frequently used for styling or event handling, such as `on*` handlers,
27
+ * `aria-*` attributes, `data-*` attributes, `css`, `className`, and `style`.
28
+ * This method is used to optimize prop processing by focusing on props that are
29
+ * most likely to influence rendering or behavior.
30
+ */static extractCriticalProps(a,b){var c,d={_keyCount:b.length},e=0,f=_createForOfIteratorHelper(b);try{var g=function _loop(){var b=c.value;return 50<=e?1:void((NodeUtil.CRITICAL_PROPS.has(b)||NodeUtil.isStyleProp(b)||Array.from(NodeUtil.CRITICAL_PROP_PREFIXES).some(function(a){return b.startsWith(a)}))&&(d[b]=a[b],e++))};for(f.s();!(c=f.n()).done&&!g(););}catch(a){f.e(a)}finally{f.f()}return d}/**
38
31
  * Retrieves computed CSS props from the cache with LRU tracking.
39
32
  * Access time and hit count are tracked for smarter eviction.
40
33
  * @method getCachedCssProps
@@ -159,6 +152,7 @@ var h=document.createElement("div");document.body.appendChild(h);var i=createRoo
159
152
  };return e={domElement:h,reactRoot:j},NodeUtil.portalInfrastructure.set(a,e),BaseNode.portalCleanupRegistry.register(a,{domElement:h,reactRoot:j},a),!0}static cleanupPortalInfra(a){try{var b;null!==(b=a.reactRoot)&&void 0!==b&&b.unmount&&a.reactRoot.unmount()}catch(a){__DEBUG__&&console.error("Portal cleanup error:",a)}try{var c;null!==(c=a.domElement)&&void 0!==c&&c.isConnected&&a.domElement.remove()}catch(a){__DEBUG__&&console.error("DOM removal error:",a)}}}// Unique ID generation for elements
160
153
  // Cache configuration
161
154
  // Clean up 50 entries at once when limit hit
155
+ // Critical props for signature generation and shallow comparison
162
156
  // Portal infrastructure using WeakMap for memory-safe management
163
157
  /**
164
158
  * Type guard to check if an object is a NodeInstance.
@@ -170,4 +164,9 @@ var h=document.createElement("div");document.body.appendChild(h);var i=createRoo
170
164
  * - and an 'isBaseNode' property.
171
165
  * @param obj The object to check.
172
166
  * @returns True if the object is a NodeInstance, false otherwise.
173
- */_NodeUtil=NodeUtil,_defineProperty(NodeUtil,"isServer","undefined"==typeof window),_defineProperty(NodeUtil,"_elementIdMap",new WeakMap),_defineProperty(NodeUtil,"_elementIdCounter",0),_defineProperty(NodeUtil,"_functionSignatureCache",new WeakMap),_defineProperty(NodeUtil,"CACHE_SIZE_LIMIT",500),_defineProperty(NodeUtil,"CACHE_CLEANUP_BATCH",50),_defineProperty(NodeUtil,"portalInfrastructure",new WeakMap),_defineProperty(NodeUtil,"isNodeInstance",function(a){return"object"===_typeof(a)&&null!==a&&"element"in a&&"function"==typeof a.render&&"function"==typeof a.toPortal&&"isBaseNode"in a}),_defineProperty(NodeUtil,"isStyleProp",_NodeUtil.isServer||"undefined"==typeof document?function(){return!1}:function(a){return a in document.body.style});
167
+ *//**
168
+ * Determines if a given string `k` is a valid CSS style property.
169
+ * This check is performed only on the client-side by checking if the property exists in `document.body.style`.
170
+ * On the server-side, it always returns `false`.
171
+ * @param k The string to check.
172
+ */_NodeUtil=NodeUtil,_defineProperty(NodeUtil,"isServer","undefined"==typeof window),_defineProperty(NodeUtil,"_functionSignatureCache",new WeakMap),_defineProperty(NodeUtil,"CACHE_SIZE_LIMIT",500),_defineProperty(NodeUtil,"CACHE_CLEANUP_BATCH",50),_defineProperty(NodeUtil,"CRITICAL_PROP_PREFIXES",new Set(["on","aria","data"])),_defineProperty(NodeUtil,"CRITICAL_PROPS",new Set(["css","className","disableEmotion","props"])),_defineProperty(NodeUtil,"portalInfrastructure",new WeakMap),_defineProperty(NodeUtil,"isNodeInstance",function(a){return"object"===_typeof(a)&&null!==a&&"element"in a&&"function"==typeof a.render&&"function"==typeof a.toPortal&&"isBaseNode"in a}),_defineProperty(NodeUtil,"isStyleProp",_NodeUtil.isServer||"undefined"==typeof document?function(){return!1}:function(a){return a in document.body.style});
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.6",
4
+ "version": "0.4.7",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",