@meonode/ui 0.3.18 → 0.4.0

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.
@@ -15,7 +15,7 @@
15
15
  * })
16
16
  * ```
17
17
  */
18
- export declare const Fragment: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").FragmentProps>, AdditionalProps> | undefined) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").FragmentProps>>) & {
18
+ export declare const Fragment: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").FragmentProps>, AdditionalProps> | undefined, deps?: import("../node.type").DependencyList | undefined) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").FragmentProps>>) & {
19
19
  element: import("react").ExoticComponent<import("react").FragmentProps>;
20
20
  };
21
21
  /**
@@ -32,7 +32,7 @@ export declare const Fragment: (<AdditionalProps extends Record<string, any> = R
32
32
  * })
33
33
  * ```
34
34
  */
35
- export declare const Activity: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").ActivityProps>, AdditionalProps>) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").ActivityProps>>) & {
35
+ export declare const Activity: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").ActivityProps>, AdditionalProps>, deps?: import("../node.type").DependencyList | undefined) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").ActivityProps>>) & {
36
36
  element: import("react").ExoticComponent<import("react").ActivityProps>;
37
37
  };
38
38
  /**
@@ -49,7 +49,7 @@ export declare const Activity: (<AdditionalProps extends Record<string, any> = R
49
49
  * })
50
50
  * ```
51
51
  */
52
- export declare const Suspense: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").SuspenseProps>, AdditionalProps> | undefined) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").SuspenseProps>>) & {
52
+ export declare const Suspense: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").SuspenseProps>, AdditionalProps> | undefined, deps?: import("../node.type").DependencyList | undefined) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").SuspenseProps>>) & {
53
53
  element: import("react").ExoticComponent<import("react").SuspenseProps>;
54
54
  };
55
55
  //# sourceMappingURL=react.node.d.ts.map
@@ -2,7 +2,7 @@ import _ThemeProvider from '../components/theme-provider.client.js';
2
2
  /**
3
3
  * A component that provides a theme to its children.
4
4
  */
5
- export declare const ThemeProvider: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: import("../node.type").MergedProps<typeof _ThemeProvider, AdditionalProps>) => import("../node.type").NodeInstance<typeof _ThemeProvider>) & {
5
+ export declare const ThemeProvider: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: import("../node.type").MergedProps<typeof _ThemeProvider, AdditionalProps>, deps?: import("../node.type").DependencyList | undefined) => import("../node.type").NodeInstance<typeof _ThemeProvider>) & {
6
6
  element: typeof _ThemeProvider;
7
7
  };
8
8
  //# sourceMappingURL=theme-provider.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type ReactElement } from 'react';
2
- import type { Children, FinalNodeProps, HasRequiredProps, MergedProps, NodeElementType, NodeInstance, NodePortal, NodeProps, PropsOf } from './node.type.js';
2
+ import type { Children, FinalNodeProps, HasRequiredProps, MergedProps, NodeElementType, NodeInstance, NodePortal, NodeProps, PropsOf, DependencyList } from './node.type.js';
3
3
  /**
4
4
  * The core abstraction of the MeoNode library. It wraps a React element or component,
5
5
  * providing a unified interface for processing props, normalizing children, and handling styles.
@@ -15,16 +15,30 @@ export declare class BaseNode<E extends NodeElementType> implements NodeInstance
15
15
  private _props?;
16
16
  private _portalDOMElement;
17
17
  private _portalReactRoot;
18
+ private _deps?;
19
+ private _stableKey;
18
20
  private static _isServer;
19
21
  private static _propProcessingCache;
22
+ private static _elementCache;
20
23
  private static _isValidElement;
21
- constructor(element: E, rawProps?: Partial<NodeProps<E>>);
24
+ private static readonly CACHE_SIZE_LIMIT = 500;
25
+ private static readonly CACHE_CLEANUP_BATCH = 50;
26
+ constructor(element: E, rawProps?: Partial<NodeProps<E>>, deps?: DependencyList);
22
27
  /**
23
28
  * Lazily processes and retrieves the final, normalized props for the node.
24
29
  * The props are processed only once and then cached for subsequent accesses.
25
30
  * @getter props
26
31
  */
27
32
  get props(): FinalNodeProps;
33
+ /**
34
+ * Returns the dependency list associated with this node.
35
+ * Used by the renderer to decide if the node (and subtree) should update.
36
+ * Mirrors React hook semantics: `undefined` means always update; when an
37
+ * array is provided a shallow comparison against previous deps determines
38
+ * whether a re-render is required.
39
+ * @getter deps
40
+ */
41
+ get dependencies(): DependencyList | undefined;
28
42
  /**
29
43
  * A fast, non-cryptographic hash function (FNV-1a) used to generate a unique signature for a set of props.
30
44
  * This is significantly faster than `JSON.stringify` for creating cache keys.
@@ -32,23 +46,35 @@ export declare class BaseNode<E extends NodeElementType> implements NodeInstance
32
46
  */
33
47
  private static _hashString;
34
48
  /**
35
- * Creates a unique, stable signature from a set of props. This signature is used as a key for caching computed CSS props.
36
- * It serializes only primitive values and the structure of objects/arrays to ensure speed and stability.
49
+ * Creates a unique, stable signature from the element type and props.
50
+ * This signature includes the element's type to prevent collisions between different components
51
+ * and handles primitive values in arrays and objects for better caching.
37
52
  * @method _createPropSignature
38
53
  */
39
54
  private static _createPropSignature;
40
55
  /**
41
- * Retrieves computed CSS props from the cache if available. If not, it computes them,
42
- * adds them to the cache, and then returns them. An LRU-like mechanism is used to prevent the cache from growing indefinitely.
56
+ * Retrieves computed CSS props from the cache with LRU tracking.
57
+ * Access time and hit count are tracked for smarter eviction.
43
58
  * @method _getCachedCssProps
44
59
  */
45
60
  private static _getCachedCssProps;
46
61
  /**
47
- * The main prop processing pipeline. It orchestrates splitting props, generating cache signatures,
48
- * retrieving cached CSS props, computing DOM props, and normalizing children.
62
+ * Implements an LRU eviction strategy that removes multiple entries at once.
63
+ * It uses a scoring system where older and less frequently used entries have a higher eviction priority.
64
+ * @method _evictLRUEntries
65
+ */
66
+ private static _evictLRUEntries;
67
+ /**
68
+ * The main prop processing pipeline, which now passes the element type for improved caching.
49
69
  * @method _processProps
50
70
  */
51
71
  private _processProps;
72
+ /**
73
+ * Determines if a node should update based on its dependency array.
74
+ * Uses a shallow comparison, similar to React's `useMemo` and `useCallback`.
75
+ * @method _shouldNodeUpdate
76
+ */
77
+ private static _shouldNodeUpdate;
52
78
  /**
53
79
  * Processes the `children` prop of a node. It handles single children, arrays of children,
54
80
  * and function-as-a-child render props, passing them to `_processRawNode` for normalization.
@@ -79,7 +105,9 @@ export declare class BaseNode<E extends NodeElementType> implements NodeInstance
79
105
  */
80
106
  private static _renderProcessedNode;
81
107
  /**
82
- * Renders the `BaseNode` and its entire subtree into a ReactElement.
108
+ * Renders the `BaseNode` and its entire subtree into a ReactElement, with support for opt-in reactivity
109
+ * via dependency arrays and inherited blocking.
110
+ *
83
111
  * This method uses an **iterative (non-recursive) approach** with a manual work stack.
84
112
  * This is a crucial architectural choice to prevent "Maximum call stack size exceeded" errors
85
113
  * when rendering very deeply nested component trees, a common limitation of naive recursive rendering.
@@ -90,7 +118,7 @@ export declare class BaseNode<E extends NodeElementType> implements NodeInstance
90
118
  * It then collects the rendered children from a temporary map and creates its own React element.
91
119
  * @method render
92
120
  */
93
- render(): ReactElement<FinalNodeProps>;
121
+ render(parentBlocked?: boolean): ReactElement<FinalNodeProps>;
94
122
  /**
95
123
  * Ensures that the necessary DOM element and React root are available for portal rendering.
96
124
  * This is only executed on the client-side.
@@ -104,8 +132,7 @@ export declare class BaseNode<E extends NodeElementType> implements NodeInstance
104
132
  */
105
133
  toPortal(): NodePortal;
106
134
  /**
107
- * A static method to clear all internal caches. This is primarily useful for testing
108
- * to ensure that tests run in a clean, isolated state.
135
+ * A static method to clear all internal caches.
109
136
  * @method clearCaches
110
137
  */
111
138
  static clearCaches(): void;
@@ -115,15 +142,15 @@ export declare class BaseNode<E extends NodeElementType> implements NodeInstance
115
142
  * It's the simplest way to wrap a component or element.
116
143
  * @function Node
117
144
  */
118
- export declare function Node<AdditionalProps extends Record<string, any>, E extends NodeElementType>(element: E, props?: MergedProps<E, AdditionalProps>, additionalProps?: AdditionalProps): NodeInstance<E>;
145
+ export declare function Node<AdditionalProps extends Record<string, any>, E extends NodeElementType>(element: E, props?: MergedProps<E, AdditionalProps>, deps?: DependencyList): NodeInstance<E>;
119
146
  /**
120
147
  * Creates a curried node factory for a given React element or component type.
121
148
  * This is useful for creating reusable, specialized factory functions (e.g., `const Div = createNode('div')`).
122
149
  * @function createNode
123
150
  */
124
- export declare function createNode<AdditionalInitialProps extends Record<string, any>, E extends NodeElementType>(element: E, initialProps?: MergedProps<E, AdditionalInitialProps>): HasRequiredProps<PropsOf<E>> extends true ? (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: MergedProps<E, AdditionalProps>) => NodeInstance<E>) & {
151
+ export declare function createNode<AdditionalInitialProps extends Record<string, any>, E extends NodeElementType>(element: E, initialProps?: MergedProps<E, AdditionalInitialProps>): HasRequiredProps<PropsOf<E>> extends true ? (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: MergedProps<E, AdditionalProps>, deps?: DependencyList) => NodeInstance<E>) & {
125
152
  element: E;
126
- } : (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: MergedProps<E, AdditionalProps>) => NodeInstance<E>) & {
153
+ } : (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: MergedProps<E, AdditionalProps>, deps?: DependencyList) => NodeInstance<E>) & {
127
154
  element: E;
128
155
  };
129
156
  /**
@@ -131,9 +158,9 @@ export declare function createNode<AdditionalInitialProps extends Record<string,
131
158
  * This provides a more ergonomic API for components that primarily wrap content (e.g., `P('Some text')`).
132
159
  * @function createChildrenFirstNode
133
160
  */
134
- export declare function createChildrenFirstNode<AdditionalInitialProps extends Record<string, any>, E extends NodeElementType>(element: E, initialProps?: Omit<NodeProps<E>, keyof AdditionalInitialProps | 'children'> & AdditionalInitialProps): HasRequiredProps<PropsOf<E>> extends true ? (<AdditionalProps extends Record<string, any> = Record<string, any>>(children: Children, props: Omit<MergedProps<E, AdditionalProps>, 'children'>) => NodeInstance<E>) & {
161
+ export declare function createChildrenFirstNode<AdditionalInitialProps extends Record<string, any>, E extends NodeElementType>(element: E, initialProps?: Omit<NodeProps<E>, keyof AdditionalInitialProps | 'children'> & AdditionalInitialProps): HasRequiredProps<PropsOf<E>> extends true ? (<AdditionalProps extends Record<string, any> = Record<string, any>>(children: Children, props: Omit<MergedProps<E, AdditionalProps>, 'children'>, deps?: DependencyList) => NodeInstance<E>) & {
135
162
  element: E;
136
- } : (<AdditionalProps extends Record<string, any> = Record<string, any>>(children?: Children, props?: Omit<MergedProps<E, AdditionalProps>, 'children'>) => NodeInstance<E>) & {
163
+ } : (<AdditionalProps extends Record<string, any> = Record<string, any>>(children?: Children, props?: Omit<MergedProps<E, AdditionalProps>, 'children'>, deps?: DependencyList) => NodeInstance<E>) & {
137
164
  element: E;
138
165
  };
139
166
  //# sourceMappingURL=core.node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AAAA,OAAc,EAKZ,KAAK,YAAY,EAKlB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EAEd,gBAAgB,EAChB,WAAW,EAEX,eAAe,EAEf,YAAY,EACZ,UAAU,EACV,SAAS,EAET,OAAO,EACR,MAAM,mBAAmB,CAAA;AAO1B;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,eAAe,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IAClE,OAAO,EAAE,CAAC,CAAA;IACV,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CA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GAIG;AACH,wBAAgB,uBAAuB,CAAC,sBAAsB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,eAAe,EACnH,OAAO,EAAE,CAAC,EACV,YAAY,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,sBAAsB,GAAG,UAAU,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,59 +1,95 @@
1
- var _excluded=["ref","key","children","css","props","disableEmotion"],_excluded2=["style"],_excluded3=["children","key","css","nativeProps","disableEmotion"];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 _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,Fragment}from"react";import{isNodeInstance}from"./helper/node.helper.js";import{isForwardRef,isFragment,isMemo,isReactClassComponent,isValidElementType}from"./helper/react-is.helper.js";import{createRoot}from"react-dom/client";import{getComponentType,getCSSProps,getDOMProps,getElementTypeName,hasNoStyleTag,omitUndefined}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";/**
1
+ var _excluded=["key","children","ref"],_excluded2=["ref","key","children","css","props","disableEmotion"],_excluded3=["style"],_excluded4=["children","key","css","nativeProps","disableEmotion"],_excluded5=["deps"];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 _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 _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 _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 _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 React,{createElement,isValidElement,Fragment}from"react";import{isNodeInstance}from"./helper/node.helper.js";import{isForwardRef,isFragment,isMemo,isReactClassComponent,isValidElementType}from"./helper/react-is.helper.js";import{createRoot}from"react-dom/client";import{getComponentType,getCSSProps,getDOMProps,getElementTypeName,hasNoStyleTag,omitUndefined}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.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.
5
5
  * It uses an iterative rendering approach to handle deeply nested structures without causing stack overflows.
6
6
  * @class BaseNode
7
7
  * @template E - The type of React element or component this node represents.
8
- */export class BaseNode{constructor(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};// Element type validation is performed once at construction to prevent invalid nodes from being created.
9
- if(_defineProperty(this,"rawProps",{}),_defineProperty(this,"isBaseNode",!0),_defineProperty(this,"_portalDOMElement",null),_defineProperty(this,"_portalReactRoot",null),!BaseNode._isValidElement(a)){var c=getComponentType(a);throw new Error("Invalid element type: ".concat(c," provided!"))}this.element=a,this.rawProps=b}/**
8
+ */export class BaseNode{// Clean up 50 entries at once when limit hit
9
+ 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.
10
+ if(_defineProperty(this,"rawProps",{}),_defineProperty(this,"isBaseNode",!0),_defineProperty(this,"_portalDOMElement",null),_defineProperty(this,"_portalReactRoot",null),!BaseNode._isValidElement(a)){var d=getComponentType(a);throw new Error("Invalid element type: ".concat(d," provided!"))}this.element=a,this.rawProps=b,this._deps=c;// Generate an initial stable key for internal caching.
11
+ // This key is based on the element type and other props (excluding children, ref, and the React 'key' prop).
12
+ var e=b.key,f=b.children,g=b.ref,h=_objectWithoutProperties(b,_excluded);this._stableKey=BaseNode._createPropSignature(a,h),void 0!==e&&null!==e&&(this._stableKey="".concat(e+"",":").concat(this._stableKey))}/**
10
13
  * Lazily processes and retrieves the final, normalized props for the node.
11
14
  * The props are processed only once and then cached for subsequent accesses.
12
15
  * @getter props
13
- */get props(){return this._props||(this._props=this._processProps()),this._props}// --- Prop Caching and Processing ---
16
+ */get props(){return this._props||(this._props=this._processProps()),this._props}/**
17
+ * Returns the dependency list associated with this node.
18
+ * Used by the renderer to decide if the node (and subtree) should update.
19
+ * Mirrors React hook semantics: `undefined` means always update; when an
20
+ * array is provided a shallow comparison against previous deps determines
21
+ * whether a re-render is required.
22
+ * @getter deps
23
+ */get dependencies(){return this._deps}// --- Enhanced Prop Caching and Processing ---
14
24
  /**
15
25
  * A fast, non-cryptographic hash function (FNV-1a) used to generate a unique signature for a set of props.
16
26
  * This is significantly faster than `JSON.stringify` for creating cache keys.
17
27
  * @method _hashString
18
28
  */static _hashString(a){// FNV offset basis
19
29
  for(var b=Math.imul,c=2166136261,d=0;d<a.length;d++)c^=a.charCodeAt(d),c=b(c,16777619);return(c>>>0).toString(36)}/**
20
- * Creates a unique, stable signature from a set of props. This signature is used as a key for caching computed CSS props.
21
- * It serializes only primitive values and the structure of objects/arrays to ensure speed and stability.
30
+ * Creates a unique, stable signature from the element type and props.
31
+ * This signature includes the element's type to prevent collisions between different components
32
+ * and handles primitive values in arrays and objects for better caching.
22
33
  * @method _createPropSignature
23
- */static _createPropSignature(a){var b,c=Object.keys(a).sort(),d="",e=_createForOfIteratorHelper(c);try{for(e.s();!(b=e.n()).done;){var f=b.value,g=a[f],h=void 0,i=_typeof(g);h="string"===i||"number"===i||"boolean"===i?"".concat(f,":").concat(g,";"):null===g?"".concat(f,":null;"):void 0===g?"".concat(f,":undefined;"):Array.isArray(g)?"".concat(f,":[").concat(g.length,"];"):"".concat(f,":{").concat(Object.keys(g).length,"};"),d+=h}}catch(a){e.e(a)}finally{e.f()}return BaseNode._hashString(d)}/**
24
- * Retrieves computed CSS props from the cache if available. If not, it computes them,
25
- * adds them to the cache, and then returns them. An LRU-like mechanism is used to prevent the cache from growing indefinitely.
34
+ */static _createPropSignature(a,b){// Safe element identification that works with Next.js Client Components
35
+ var c;try{c="string"==typeof a?a:"function"==typeof a?a.name||"Component":a&&"object"===_typeof(a)?a.displayName||a.name||"ExoticComponent":"Unknown"}catch(a){// Fallback for Client Components that throw when accessed
36
+ // Use a generic identifier - this is safe because we still have props in the signature
37
+ c="ClientComponent"}var d,e=Object.keys(b).sort(),f="".concat(c,":"),g=_createForOfIteratorHelper(e);try{for(g.s();!(d=g.n()).done;){var h=d.value,i=b[h],j=void 0,k=_typeof(i);if("string"===k||"number"===k||"boolean"===k)j="".concat(h,":").concat(i,";");else if(null===i)j="".concat(h,":null;");else if(i===void 0)j="".concat(h,":undefined;");else if(Array.isArray(i)){// Hash primitive values in arrays for better cache hits
38
+ var l=i.filter(function(a){var b=_typeof(a);return"string"===b||"number"===b||"boolean"===b||null===a});j=l.length===i.length?"".concat(h,":[").concat(l.join(","),"];"):"".concat(h,":[").concat(i.length,"];")}else{// Include sorted keys for object structure signature
39
+ var m=Object.keys(i).sort();j="".concat(h,":{").concat(m.join(","),"};")}f+=j}}catch(a){g.e(a)}finally{g.f()}return BaseNode._hashString(f)}/**
40
+ * Retrieves computed CSS props from the cache with LRU tracking.
41
+ * Access time and hit count are tracked for smarter eviction.
26
42
  * @method _getCachedCssProps
27
- */static _getCachedCssProps(a,b){var c=BaseNode._propProcessingCache.get(b);if(c)return{cssProps:c.cssProps};var d=getCSSProps(a);// LRU-like cache eviction policy.
28
- if(BaseNode._propProcessingCache.set(b,{cssProps:d,signature:b}),500<BaseNode._propProcessingCache.size){var e=BaseNode._propProcessingCache.keys().next().value;e&&BaseNode._propProcessingCache["delete"](e)}return{cssProps:d}}/**
29
- * The main prop processing pipeline. It orchestrates splitting props, generating cache signatures,
30
- * retrieving cached CSS props, computing DOM props, and normalizing children.
43
+ */static _getCachedCssProps(a,b){var c=BaseNode._propProcessingCache.get(b);if(c)return c.lastAccess=Date.now(),c.hitCount++,{cssProps:c.cssProps};var d=getCSSProps(a);return BaseNode._propProcessingCache.set(b,{cssProps:d,signature:b,lastAccess:Date.now(),hitCount:1}),BaseNode._propProcessingCache.size>BaseNode.CACHE_SIZE_LIMIT&&BaseNode._evictLRUEntries(),{cssProps:d}}/**
44
+ * Implements an LRU eviction strategy that removes multiple entries at once.
45
+ * It uses a scoring system where older and less frequently used entries have a higher eviction priority.
46
+ * @method _evictLRUEntries
47
+ */static _evictLRUEntries(){var a,b=Date.now(),c=[],d=_createForOfIteratorHelper(BaseNode._propProcessingCache.entries());// Calculate eviction scores for all entries
48
+ try{for(d.s();!(a=d.n()).done;){var e=_slicedToArray(a.value,2),f=e[0],g=e[1],h=b-g.lastAccess,j=g.hitCount,k=h/1e3+1e3/(j+1);// Score: older age + lower frequency = higher score (more likely to evict)
49
+ // Normalize: age in seconds, frequency as inverse
50
+ c.push({key:f,score:k})}// Sort by score (highest = most evictable)
51
+ }catch(a){d.e(a)}finally{d.f()}c.sort(function(c,a){return a.score-c.score});// Remove top N entries
52
+ for(var l=Math.min(BaseNode.CACHE_CLEANUP_BATCH,c.length),m=0;m<l;m++)BaseNode._propProcessingCache["delete"](c[m].key)}/**
53
+ * The main prop processing pipeline, which now passes the element type for improved caching.
31
54
  * @method _processProps
32
- */_processProps(){var a=this.rawProps,b=a.ref,c=a.key,d=a.children,e=a.css,f=a.props,g=void 0===f?{}:f,h=a.disableEmotion,i=_objectWithoutProperties(a,_excluded);// --- Fast Path Optimization ---
33
- if(0===Object.keys(i).length&&!e)return omitUndefined({ref:b,key:c,css:{},style:g.style,disableEmotion:h,nativeProps:omitUndefined(g),children:this._processChildren(d,h)});// --- Hybrid Caching Strategy ---
34
- var j={},k={};// 1. Categorize props into cacheable (primitives) and non-cacheable (objects/functions).
35
- for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)){var m=i[l],n=_typeof(m);"string"===n||"number"===n||"boolean"===n?j[l]=m:k[l]=m}// 2. Cache only the CSS props derived from primitive values.
36
- var o=BaseNode._createPropSignature(j),p=BaseNode._getCachedCssProps(j,o),q=p.cssProps,r=getCSSProps(k),s=getDOMProps(i),t=_objectSpread(_objectSpread(_objectSpread({},q),r),e),u=this._processChildren(d,h);// 3. Process non-cacheable props on every render to ensure correctness for functions and objects.
55
+ */_processProps(){var a=this.rawProps,b=a.ref,c=a.key,d=a.children,e=a.css,f=a.props,g=void 0===f?{}:f,h=a.disableEmotion,i=_objectWithoutProperties(a,_excluded2),j=g;// --- Fast Path Optimization ---
56
+ if(0===Object.keys(i).length&&!e)return omitUndefined({ref:b,key:c,style:j.style,disableEmotion:h,deps:this._deps,nativeProps:omitUndefined(j),children:this._processChildren(d,h)});// --- Hybrid Caching Strategy ---
57
+ var k={},l={};// 1. Categorize props into cacheable (primitives) and non-cacheable (objects/functions).
58
+ for(var m in i)if(Object.prototype.hasOwnProperty.call(i,m)){var n=i[m],o=_typeof(n);"string"===o||"number"===o||"boolean"===o?k[m]=n:l[m]=n}// 2. Pass element type to signature generation
59
+ var p=BaseNode._createPropSignature(this.element,k),q=BaseNode._getCachedCssProps(k,p),r=q.cssProps,s=getCSSProps(l),t=getDOMProps(i),u=_objectSpread(_objectSpread(_objectSpread({},r),s),e),v=this._processChildren(d,h,this._stableKey);// 3. Process non-cacheable props on every render to ensure correctness for functions and objects.
37
60
  // DOM props are always processed fresh.
38
61
  // 4. Assemble the final CSS object.
39
62
  // --- Child Normalization ---
40
63
  // --- Final Assembly ---
41
- return omitUndefined(_objectSpread(_objectSpread({ref:b,key:c,css:t,style:g.style},s),{},{disableEmotion:h,nativeProps:omitUndefined(g),children:u}))}// --- Child Processing ---
64
+ return omitUndefined(_objectSpread(_objectSpread({ref:b,key:c,css:u,style:j.style},t),{},{disableEmotion:h,deps:this._deps,nativeProps:omitUndefined(j),children:v}))}/**
65
+ * Determines if a node should update based on its dependency array.
66
+ * Uses a shallow comparison, similar to React's `useMemo` and `useCallback`.
67
+ * @method _shouldNodeUpdate
68
+ */static _shouldNodeUpdate(a,b,c){// SSR has no concept of re-renders, so deps system doesn't apply
69
+ return!!BaseNode._isServer||!c&&(!(void 0!==b)||!(void 0!==a)||b.length!==a.length||!!b.some(function(b,c){return!Object.is(b,a[c])}));// No deps array means always update.
70
+ // First render for this keyed component, or no previous deps.
71
+ // Length change means update.
72
+ // Shallow compare deps. If any have changed, update.
73
+ // Deps are the same, no update needed.
74
+ }// --- Child Processing ---
42
75
  /**
43
76
  * Processes the `children` prop of a node. It handles single children, arrays of children,
44
77
  * and function-as-a-child render props, passing them to `_processRawNode` for normalization.
45
78
  * @method _processChildren
46
- */_processChildren(a,b){return a?"function"==typeof a?a:Array.isArray(a)?a.map(function(a){return BaseNode._processRawNode(a,b)}):BaseNode._processRawNode(a,b):void 0}/**
79
+ */_processChildren(a,b,c){return a?"function"==typeof a?a:Array.isArray(a)?a.map(function(a,d){return BaseNode._processRawNode(a,b,"".concat(c,"_").concat(d))}):BaseNode._processRawNode(a,b,c):void 0}/**
47
80
  * The core normalization function for a single child. It takes any valid `NodeElement`
48
81
  * (primitive, React element, function, `BaseNode` instance) and converts it into a standardized `BaseNode`
49
82
  * instance if it isn't one already. This ensures a consistent structure for the iterative renderer.
50
83
  * @method _processRawNode
51
- */static _processRawNode(a,b){// Primitives and null/undefined are returned as-is.
52
- if(null===a||a===void 0||"string"==typeof a||"number"==typeof a||"boolean"==typeof a)return a;// If it's already a BaseNode, just ensure the `disableEmotion` flag is propagated.
53
- if(isNodeInstance(a))return b&&!a.rawProps.disableEmotion?new BaseNode(a.element,_objectSpread(_objectSpread({},a.rawProps),{},{disableEmotion:!0})):a;// Handle function-as-a-child (render props).
54
- if(BaseNode._isFunctionChild(a))return new BaseNode(BaseNode._functionRenderer,{props:{render:a,disableEmotion:b}});// Handle standard React elements.
55
- if(isValidElement(a)){var c=a.props,d=c.style,e=_objectWithoutProperties(c,_excluded2),f=_objectSpread(_objectSpread({},e),d||{});return new BaseNode(a.type,_objectSpread(_objectSpread(_objectSpread({},f),null!==a.key&&void 0!==a.key?{key:a.key}:{}),{},{disableEmotion:b}))}// Handle component classes and memos.
56
- return isReactClassComponent(a)||isMemo(a)||isForwardRef(a)?new BaseNode(a,{disableEmotion:b}):a instanceof React.Component?BaseNode._processRawNode(a.render(),b):a;// Handle component instances.
84
+ */static _processRawNode(a,b,c){// Primitives and null/undefined are returned as-is.
85
+ if(null===a||a===void 0||"string"==typeof a||"number"==typeof a||"boolean"==typeof a)return a;// If it's already a BaseNode, clone it with a positional key if available.
86
+ if(isNodeInstance(a)){var d=c||b&&!a.rawProps.disableEmotion;if(d){// Create a new BaseNode instance.
87
+ var e=new BaseNode(a.element,a.rawProps,a.dependencies);// Augment the internal _stableKey with positional information.
88
+ // This is purely for BaseNode's internal caching, not for React's 'key' prop.
89
+ return e._stableKey="".concat(c,":").concat(e._stableKey),b&&!e.rawProps.disableEmotion&&(e.rawProps.disableEmotion=!0),e}return a}// Handle function-as-a-child (render props).
90
+ if(BaseNode._isFunctionChild(a))return new BaseNode(BaseNode._functionRenderer,{props:{render:a,disableEmotion:b}},void 0);// Handle standard React elements.
91
+ if(isValidElement(a)){var f=a.props,g=f.style,h=_objectWithoutProperties(f,_excluded3),i=_objectSpread(_objectSpread({},h),g||{});return new BaseNode(a.type,_objectSpread(_objectSpread(_objectSpread({},i),null!==a.key&&void 0!==a.key?{key:a.key}:{}),{},{disableEmotion:b}),void 0)}// Handle component classes and memos.
92
+ return isReactClassComponent(a)||isMemo(a)||isForwardRef(a)?new BaseNode(a,{disableEmotion:b},void 0):a instanceof React.Component?BaseNode._processRawNode(a.render(),b,c):a;// Handle component instances.
57
93
  }/**
58
94
  * A helper to reliably identify if a given function is a "function-as-a-child" (render prop)
59
95
  * rather than a standard Function Component.
@@ -61,12 +97,14 @@ return isReactClassComponent(a)||isMemo(a)||isForwardRef(a)?new BaseNode(a,{disa
61
97
  */static _isFunctionChild(a){if("function"!=typeof a||isReactClassComponent(a)||isMemo(a)||isForwardRef(a))return!1;try{return!(a.prototype&&"function"==typeof a.prototype.render)}catch(a){return!0}}/**
62
98
  * A wrapper component that executes a function-as-a-child and processes its return value.
63
99
  * @method _functionRenderer
64
- */static _functionRenderer(a){var b,c=a.render,d=a.disableEmotion;try{b=c()}catch(a){b=null}if(null===b||b===void 0)return b;if(isNodeInstance(b))return d&&!b.rawProps.disableEmotion?new BaseNode(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{disableEmotion:!0})).render():b.render();if(Array.isArray(b))return b.map(function(a,b){return BaseNode._renderProcessedNode({processedElement:BaseNode._processRawNode(a,d),passedKey:"".concat(getElementTypeName(a),"-").concat(b)})});if(b instanceof React.Component)return BaseNode._renderProcessedNode({processedElement:BaseNode._processRawNode(b.render(),d),disableEmotion:d});if("string"==typeof b||"number"==typeof b||"boolean"==typeof b)return b;var e=BaseNode._processRawNode(b,d);return e?BaseNode._renderProcessedNode({processedElement:e,disableEmotion:d}):b}/**
100
+ */static _functionRenderer(a){var b,c=a.render,d=a.disableEmotion;try{b=c()}catch(a){b=null}if(null===b||b===void 0)return b;if(isNodeInstance(b))return d&&!b.rawProps.disableEmotion?new BaseNode(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{disableEmotion:!0})).render():b.render();if(Array.isArray(b)){var e=function safeGetKey(a,b){try{return"".concat(getElementTypeName(a),"-").concat(b)}catch(a){return"item-".concat(b)}};return b.map(function(a,b){return BaseNode._renderProcessedNode({processedElement:BaseNode._processRawNode(a,d),passedKey:e(a,b)})})}if(b instanceof React.Component)return BaseNode._renderProcessedNode({processedElement:BaseNode._processRawNode(b.render(),d),disableEmotion:d});if("string"==typeof b||"number"==typeof b||"boolean"==typeof b)return b;var f=BaseNode._processRawNode(b,d);return f?BaseNode._renderProcessedNode({processedElement:f,disableEmotion:d}):b}/**
65
101
  * A legacy helper for the recursive child processing path. This is primarily used by `_functionRenderer`.
66
102
  * @method _renderProcessedNode
67
- */static _renderProcessedNode(a){var b=a.processedElement,c=a.passedKey,d=a.disableEmotion,e={};if(void 0!==c&&(e.key=c),isNodeInstance(b)){var f,g=null===(f=b.rawProps)||void 0===f?void 0:f.key;return b.rawProps.disableEmotion=d,g===c?b.render():new BaseNode(b.element,_objectSpread(_objectSpread({},b.rawProps),e)).render()}return isReactClassComponent(b)?new BaseNode(b,_objectSpread(_objectSpread({},e),{},{disableEmotion:d})).render():b instanceof React.Component?b.render():"function"==typeof b?createElement(b,{key:c}):b}// --- Iterative Renderer ---
103
+ */static _renderProcessedNode(a){var b=a.processedElement,c=a.passedKey,d=a.disableEmotion,e={};if(void 0!==c&&(e.key=c),isNodeInstance(b)){var f,g=null===(f=b.rawProps)||void 0===f?void 0:f.key;return b.rawProps.disableEmotion=d,g===c?b.render():new BaseNode(b.element,_objectSpread(_objectSpread({},b.rawProps),e)).render()}return isReactClassComponent(b)?new BaseNode(b,_objectSpread(_objectSpread({},e),{},{disableEmotion:d})).render():b instanceof React.Component?b.render():"function"==typeof b?createElement(b,{key:c}):b}// --- Iterative Renderer with Deps Support ---
68
104
  /**
69
- * Renders the `BaseNode` and its entire subtree into a ReactElement.
105
+ * Renders the `BaseNode` and its entire subtree into a ReactElement, with support for opt-in reactivity
106
+ * via dependency arrays and inherited blocking.
107
+ *
70
108
  * This method uses an **iterative (non-recursive) approach** with a manual work stack.
71
109
  * This is a crucial architectural choice to prevent "Maximum call stack size exceeded" errors
72
110
  * when rendering very deeply nested component trees, a common limitation of naive recursive rendering.
@@ -76,14 +114,12 @@ return isReactClassComponent(a)||isMemo(a)||isForwardRef(a)?new BaseNode(a,{disa
76
114
  * 2. **Complete Phase:** After all of a node's descendants have been rendered, the loop returns to the node.
77
115
  * It then collects the rendered children from a temporary map and creates its own React element.
78
116
  * @method render
79
- */render(){for(var a=[{node:this,isProcessed:!1}],b=new Map;0<a.length;){var c=a[a.length-1],d=c.node,e=c.isProcessed;// Peek at the top of the stack
80
- if(!e){c.isProcessed=!0;var f=d.props.children;if(f)// Push children in reverse order to maintain the correct processing sequence.
81
- for(var g=(Array.isArray(f)?f:[f]).filter(isNodeInstance),h=g.length-1;0<=h;h--)a.push({node:g[h],isProcessed:!1})}else{a.pop();// Pop the completed work.
82
- var j=d.props,k=j.children,l=j.key,m=j.css,n=j.nativeProps,o=j.disableEmotion,p=_objectWithoutProperties(j,_excluded3),q=[];// Collect rendered children from the map.
83
- k&&(q=(Array.isArray(k)?k:[k]).map(function(a){return isNodeInstance(a)?b.get(a):isValidElement(a)?a:a}));var r=_objectSpread(_objectSpread({},p),{},{key:l},n),s=void 0;// Handle special cases like Fragment.
84
- if(d.element===Fragment||isFragment(d.element))s=createElement(d.element,{key:l},...q);else{// Determine if the component should be styled with Emotion.
85
- var t=m&&!o&&!hasNoStyleTag(d.element);s=t?createElement(StyledRenderer,_objectSpread(_objectSpread({element:d.element},r),{},{css:m,suppressHydrationWarning:!0}),...q):createElement(d.element,r,...q)}// Store the final rendered element in the map for its parent to retrieve.
86
- b.set(d,s)}}return b.get(this)}// --- Portal System ---
117
+ */render(){var a=!!(0<arguments.length&&arguments[0]!==void 0)&&arguments[0],b=this._stableKey,c=BaseNode._isServer?void 0:BaseNode._elementCache.get(b),d=BaseNode._shouldNodeUpdate(null===c||void 0===c?void 0:c.prevDeps,this._deps,a);// Skip cache lookup on server-side
118
+ // Server side rendering is always a fresh render, no cached elements should exist
119
+ if(!d&&null!==c&&void 0!==c&&c.cachedElement)return c.cachedElement;for(var e=[{node:this,isProcessed:!1,blocked:!d}],f=new Map;0<e.length;){var g=e[e.length-1],h=g.node,j=g.isProcessed,k=g.blocked;if(!j){g.isProcessed=!0;var l=h.props.children;if(l)for(var m=(Array.isArray(l)?l:[l]).filter(isNodeInstance),n=m.length-1;0<=n;n--){var o=m[n],p=o._stableKey,q=BaseNode._isServer?void 0:BaseNode._elementCache.get(p),r=BaseNode._shouldNodeUpdate(null===q||void 0===q?void 0:q.prevDeps,o._deps,k);// Skip cache lookup for children on server-side
120
+ if(!r&&null!==q&&void 0!==q&&q.cachedElement){f.set(o,q.cachedElement);continue}var s=k||!r;e.push({node:o,isProcessed:!1,blocked:s})}}else{e.pop();var t=h.props,u=t.children,v=t.key,w=t.css,x=t.nativeProps,y=t.disableEmotion,z=_objectWithoutProperties(t,_excluded4),A=[];u&&(A=(Array.isArray(u)?u:[u]).map(function(a){return isNodeInstance(a)?f.get(a):isValidElement(a)?a:a}));var B=_objectSpread(_objectSpread({},z),{},{key:v},x),C=void 0;if(h.element===Fragment||isFragment(h.element))C=createElement(h.element,{key:v},...A);else{var D=w&&!y&&!hasNoStyleTag(h.element);C=D?createElement(StyledRenderer,_objectSpread(_objectSpread({element:h.element},B),{},{css:w,suppressHydrationWarning:!0}),...A):createElement(h.element,B,...A)}// Only cache on client-side
121
+ // Server-side cache would pollute and cause hydration mismatches
122
+ BaseNode._isServer||BaseNode._elementCache.set(h._stableKey,{prevDeps:h._deps,cachedElement:C}),f.set(h,C)}}return f.get(this)}// --- Portal System ---
87
123
  /**
88
124
  * Ensures that the necessary DOM element and React root are available for portal rendering.
89
125
  * This is only executed on the client-side.
@@ -93,20 +129,19 @@ b.set(d,s)}}return b.get(this)}// --- Portal System ---
93
129
  * Returns a handle with `update` and `unmount` methods to control the portal's lifecycle.
94
130
  * @method toPortal
95
131
  */toPortal(){var a=this;if(!this._ensurePortalInfrastructure()||!this._portalReactRoot)throw new Error("toPortal() can only be called in a client-side environment where document.body is available.");(function renderCurrent(){try{a._portalReactRoot.render(a.render())}catch(a){/* empty */}})();try{var b=this._portalReactRoot.unmount.bind(this._portalReactRoot),c=this._portalReactRoot;return c.update=function(b){try{if(!a._portalReactRoot)return;var c=isNodeInstance(b)?b.render():b;a._portalReactRoot.render(c)}catch(a){/* empty */}},c.unmount=function(){try{b()}catch(a){/* empty */}if(a._portalDOMElement){try{a._portalDOMElement.parentNode&&a._portalDOMElement.parentNode.removeChild(a._portalDOMElement)}catch(a){/* empty */}a._portalDOMElement=null}a._portalReactRoot=null},c}catch(a){return this._portalReactRoot}}/**
96
- * A static method to clear all internal caches. This is primarily useful for testing
97
- * to ensure that tests run in a clean, isolated state.
132
+ * A static method to clear all internal caches.
98
133
  * @method clearCaches
99
- */static clearCaches(){BaseNode._propProcessingCache.clear()}}// --- Factory Functions ---
134
+ */static clearCaches(){BaseNode._propProcessingCache.clear(),BaseNode._elementCache.clear()}}// --- Factory Functions ---
100
135
  /**
101
136
  * The primary factory function for creating a `BaseNode` instance.
102
137
  * It's the simplest way to wrap a component or element.
103
138
  * @function Node
104
- */_defineProperty(BaseNode,"_isServer","undefined"==typeof window),_defineProperty(BaseNode,"_propProcessingCache",new Map),_defineProperty(BaseNode,"_isValidElement",isValidElementType);export function Node(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},d=_objectSpread(_objectSpread({},b),c);return new BaseNode(a,d)}/**
139
+ */_defineProperty(BaseNode,"_isServer","undefined"==typeof window),_defineProperty(BaseNode,"_propProcessingCache",new Map),_defineProperty(BaseNode,"_elementCache",new Map),_defineProperty(BaseNode,"_isValidElement",isValidElementType),_defineProperty(BaseNode,"CACHE_SIZE_LIMIT",500),_defineProperty(BaseNode,"CACHE_CLEANUP_BATCH",50);export function Node(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},c=2<arguments.length?arguments[2]:void 0,d=b,e=d.deps,f=_objectWithoutProperties(d,_excluded5);return new BaseNode(a,f,c)}/**
105
140
  * Creates a curried node factory for a given React element or component type.
106
141
  * This is useful for creating reusable, specialized factory functions (e.g., `const Div = createNode('div')`).
107
142
  * @function createNode
108
- */export function createNode(a,b){var c=function Instance(c){return Node(a,_objectSpread(_objectSpread({},b),c))};return c.element=a,c}/**
143
+ */export function createNode(a,b){var c=function Instance(c,d){return Node(a,_objectSpread(_objectSpread({},b),c),d)};return c.element=a,c}/**
109
144
  * Creates a node factory function where the first argument is `children` and the second is `props`.
110
145
  * This provides a more ergonomic API for components that primarily wrap content (e.g., `P('Some text')`).
111
146
  * @function createChildrenFirstNode
112
- */export function createChildrenFirstNode(a,b){var c=function Instance(c,d){return Node(a,_objectSpread(_objectSpread(_objectSpread({},b),d),{},{children:c}))};return c.element=a,c}
147
+ */export function createChildrenFirstNode(a,b){var c=function Instance(c,d,e){return Node(a,_objectSpread(_objectSpread(_objectSpread({},b),d),{},{children:c}),e)};return c.element=a,c}
@@ -1,4 +1,4 @@
1
- import type { Children, ComponentNode, HasCSSCompatibleStyleProp } from '../node.type.js';
1
+ import type { Children, ComponentNode, DependencyList, HasCSSCompatibleStyleProp } from '../node.type.js';
2
2
  import { type CSSProperties, type ReactElement } from 'react';
3
3
  /**
4
4
  * Props definition for components wrapped using the `Component` higher-order function.
@@ -33,7 +33,7 @@ export type ComponentNodeProps<TProps> = TProps extends undefined ? Partial<{
33
33
  * Title({ children: 'Hello' })
34
34
  * ```
35
35
  */
36
- export declare function Component<TProps extends undefined>(component: (props: ComponentNodeProps<TProps>) => ComponentNode): (props?: ComponentNodeProps<TProps>) => ReactElement | Promise<Awaited<ReactElement>>;
36
+ export declare function Component<TProps extends undefined>(component: (props: ComponentNodeProps<TProps>) => ComponentNode): (props?: ComponentNodeProps<TProps>, deps?: DependencyList) => ReactElement | Promise<Awaited<ReactElement>>;
37
37
  /**
38
38
  * Creates a component from a function that uses a defined props interface.
39
39
  * @template TProps Props interface expected by the component.
@@ -56,5 +56,5 @@ export declare function Component<TProps extends undefined>(component: (props: C
56
56
  * Button({ label: 'Click me', onClick: () => alert('clicked')})
57
57
  * ```
58
58
  */
59
- export declare function Component<TProps extends Record<string, any>>(component: (props: ComponentNodeProps<TProps>) => ComponentNode): (props: ComponentNodeProps<TProps>) => ReactElement | Promise<Awaited<ReactElement>>;
59
+ export declare function Component<TProps extends Record<string, any>>(component: (props: ComponentNodeProps<TProps>) => ComponentNode): (props: ComponentNodeProps<TProps>, deps?: DependencyList) => ReactElement | Promise<Awaited<ReactElement>>;
60
60
  //# sourceMappingURL=component.hoc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.hoc.d.ts","sourceRoot":"","sources":["../../src/hoc/component.hoc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC3F,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAA;AAI7E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB,CAAC,MAAM,IAAI,MAAM,SAAS,SAAS,GAC7D,OAAO,CAAC;IACN,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAC,GACF,MAAM,GACJ,CAAC,yBAAyB,CAAC,MAAM,CAAC,SAAS,IAAI,GAAG,aAAa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ACzE,OAAO,CAAC;IACN,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IACxC,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAC,CAAA;AAER;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,MAAM,SAAS,SAAS,EAChD,SAAS,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAAK,aAAa,GAC9D,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc,KAAK,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAA;AAE/G;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1D,SAAS,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAAK,aAAa,GAC9D,CAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc,KAAK,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAA"}
@@ -47,4 +47,4 @@ import{BaseNode,Node}from"../core.node.js";import{getElementTypeName}from"../hel
47
47
  *//**
48
48
  * Internal implementation of the `Component` HOC.
49
49
  * Handles BaseNode conversion and wrapper creation.
50
- */export function Component(a){function Func(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Node(c,a).render()}var b=getElementTypeName(a),c=function Renderer(b){var c=a(b);return c instanceof BaseNode||isNodeInstance(c)?Node(c.element,c.rawProps).render():c};return c.displayName="Renderer(".concat(b,")"),Func.displayName="Component(".concat(b,")"),Func}
50
+ */export function Component(a){function Func(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},b=1<arguments.length?arguments[1]:void 0;return Node(c,a,b).render()}var b=getElementTypeName(a),c=function Renderer(b){var c=a(b);return c instanceof BaseNode||isNodeInstance(c)?Node(c.element,c.rawProps).render():c};return c.displayName="Renderer(".concat(b,")"),Func.displayName="Component(".concat(b,")"),Func}
@@ -1,5 +1,5 @@
1
1
  import _StyleRegistry from '../components/registry.client.js';
2
- export declare const StyleRegistry: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: import("../node.type").MergedProps<typeof _StyleRegistry, AdditionalProps>) => import("../node.type").NodeInstance<typeof _StyleRegistry>) & {
2
+ export declare const StyleRegistry: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: import("../node.type").MergedProps<typeof _StyleRegistry, AdditionalProps>, deps?: import("../node.type").DependencyList | undefined) => import("../node.type").NodeInstance<typeof _StyleRegistry>) & {
3
3
  element: typeof _StyleRegistry;
4
4
  };
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -6,6 +6,11 @@ type RequiredKeys<T> = {
6
6
  [K in keyof T]-?: object extends Pick<T, K> ? never : K;
7
7
  }[keyof T];
8
8
  export type HasRequiredProps<T> = RequiredKeys<T> extends never ? false : true;
9
+ /**
10
+ * A list of dependencies for a memoized value.
11
+ * Mimics React's `DependencyList`.
12
+ */
13
+ export type DependencyList = readonly any[];
9
14
  /** Basic React attributes, currently only includes 'key' */
10
15
  export interface ReactAttributes {
11
16
  key?: string;
@@ -35,6 +40,8 @@ export type Children = NodeElement | NodeElement[];
35
40
  export interface PropProcessingCache {
36
41
  cssProps: Record<string, any>;
37
42
  signature: string;
43
+ lastAccess: number;
44
+ hitCount: number;
38
45
  }
39
46
  /**
40
47
  * Forward declaration of the BaseNode interface to avoid circular dependencies.
@@ -47,6 +54,8 @@ export interface NodeInstance<E extends NodeElement = NodeElement> {
47
54
  /** Original props passed during node construction, preserved for cloning/recreation */
48
55
  readonly rawProps: Partial<NodeProps<E>>;
49
56
  readonly isBaseNode: true;
57
+ /** The dependency list for memoization */
58
+ readonly dependencies: DependencyList | undefined;
50
59
  /** Converts this node instance into a renderable React element/tree */
51
60
  render(): ReactElement;
52
61
  /** Creates Portal-compatible React elements for rendering outside the DOM tree */
@@ -1 +1 @@
1
- {"version":3,"file":"node.type.d.ts","sourceRoot":"","sources":["../src/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,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAIrE,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;AAGV,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,IAAI,CAAA;AAE9E,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IACnC,CAAC,SAAS,eAAe,CAAC,aAAa,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,eAAe,CAAC,aAAa,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,eAAe,CAAC,aAAa,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAE7J;;GAEG;AAC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GAKG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,eAAe,EAAE,MAAM,eAAe,CAAC,GACvJ,eAAe,CAAA"}
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.3.18",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",