@meonode/ui 0.2.14 → 0.2.15

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
@@ -5,71 +5,107 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.15] - 2025-09-12
9
+
10
+ ### Added
11
+
12
+ - **feat(cache)**: implement hybrid caching strategy for processed children using WeakMap and Map to improve performance
13
+ and memory management
14
+ - **feat(helper)**: implement nodeSignature for stable signatures and improve createStableHash with bounded traversal
15
+ - **feat(helper)**: enhance ObjHelper.stringify method for deterministic serialization with sorted keys and special type
16
+ handling
17
+
18
+ ### Refactor
19
+
20
+ - **refactor**: improve type definitions and error handling in rendering methods
21
+
22
+ ### Test
23
+
24
+ - **test(tests)**: add performance tests for rendering a single-page layout in React
25
+ - **test**: add cleanup after each test and verify component display names for debugging
26
+
8
27
  ## [0.2.14] - 2025-09-12
9
28
 
10
29
  ### Added
30
+
11
31
  - **feat**: Add `Container` alias for `Div` to simplify general-purpose container usage.
12
32
  - **feat**: Add caching for processed children to optimize performance in `BaseNode` class.
13
33
 
14
34
  ### Removed
35
+
15
36
  - **feat**: Remove `shallowEqual` utility function from `common.helper.ts`.
16
37
 
17
38
  ### Fixed
39
+
18
40
  - **feat**: Improve performance by optimizing existing key checks and handling null values in rendering functions.
19
41
 
20
42
  ## [0.2.13] - 2025-09-11
21
43
 
22
44
  ### Added
45
+
23
46
  - **feat**: Add pre-commit hook for linting and testing, update package.json scripts.
24
47
  - **feat**: Add Jest configuration and setup for testing with TypeScript.
25
48
  - **test**: Add comprehensive tests for BaseNode core functionality.
26
49
 
27
50
  ### Fixed
28
- - **core**: Remove stylable elements from NO_STYLE_TAGS to ensure only non-visual/metadata tags are excluded from CSS styling.
51
+
52
+ - **core**: Remove stylable elements from NO_STYLE_TAGS to ensure only non-visual/metadata tags are excluded from CSS
53
+ styling.
29
54
 
30
55
  ## [0.2.12] - 2025-09-11
31
56
 
32
57
  ### Fixed
33
- - **core.node**: Removed the child processing cache to fix a critical bug that caused infinite page loads in server-side rendering environments.
58
+
59
+ - **core.node**: Removed the child processing cache to fix a critical bug that caused infinite page loads in server-side
60
+ rendering environments.
34
61
  - **helper**: Corrected the element type retrieval logic within the hashing function used for child node processing.
35
62
 
36
63
  ## [0.2.11] - 2025-09-11
37
64
 
38
65
  ### Enhanced
39
- - **core.node**: Significantly improved JSDoc documentation for the `BaseNode` class, providing better clarity on prop processing, child handling, and rendering logic.
40
- - **core.node**: Overhauled the child processing and caching mechanism to improve server-side performance and resolve a memory leak. This includes a move from object stringification to a more performant hashing strategy for cache keys and the introduction of a cache management policy.
66
+
67
+ - **core.node**: Significantly improved JSDoc documentation for the `BaseNode` class, providing better clarity on prop
68
+ processing, child handling, and rendering logic.
69
+ - **core.node**: Overhauled the child processing and caching mechanism to improve server-side performance and resolve a
70
+ memory leak. This includes a move from object stringification to a more performant hashing strategy for cache keys and
71
+ the introduction of a cache management policy.
41
72
 
42
73
  ### Fixed
74
+
43
75
  - **helper**: Corrected an issue in flexbox style processing where an unnecessary string check was performed.
44
76
  - **core.node**: Updated a function placeholder to adhere to the unused parameter naming convention.
45
77
 
46
78
  ## [0.2.10] - 2025-09-10
47
79
 
48
80
  ### Added
49
- - **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM. This abstracts away the need to manually use `react-dom/client`.
50
- - **Before**:
51
- ```typescript
52
- import { createRoot } from 'react-dom/client';
53
- import { Div } from '@meonode/ui';
54
81
 
55
- const container = document.getElementById('root');
56
- const root = createRoot(container);
57
- root.render(Div({ children: 'Hello' }).render());
58
- ```
59
- - **After**:
60
- ```typescript
61
- import { Div } from '@meonode/ui';
62
- import { render } from '@meonode/ui/client';
63
-
64
- const container = document.getElementById('root');
65
- render(Div({ children: 'Hello' }), container);
66
- ```
82
+ - **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM.
83
+ This abstracts away the need to manually use `react-dom/client`.
84
+ - **Before**:
85
+ ```typescript
86
+ import { createRoot } from 'react-dom/client';
87
+ import { Div } from '@meonode/ui';
88
+
89
+ const container = document.getElementById('root');
90
+ const root = createRoot(container);
91
+ root.render(Div({ children: 'Hello' }).render());
92
+ ```
93
+ - **After**:
94
+ ```typescript
95
+ import { Div } from '@meonode/ui';
96
+ import { render } from '@meonode/ui/client';
97
+
98
+ const container = document.getElementById('root');
99
+ render(Div({ children: 'Hello' }), container);
100
+ ```
67
101
  - **constants**: add `NO_STYLE_TAGS` array and `noStyleTagsSet` for quick lookup of tags that should not receive styles
68
102
 
69
103
  ### Enhanced
104
+
70
105
  - **core**: enhance `StyledRenderer` integration to check for no-style tags
71
106
 
72
107
  ### Changed
108
+
73
109
  - **helper**: update CSS property set to use constants and add no-style tag check
74
110
  - **package**: update dependencies to latest versions
75
111
  - **directory**: rename `data` directory to `constants` for clarity
@@ -78,14 +114,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
78
114
  ## [0.2.9] - 2025-09-05
79
115
 
80
116
  ### Fixed
117
+
81
118
  - **core.types**: corrected `MergedProps` definition to restore proper TypeScript inference and props autocomplete
82
- - Fixes regression from v0.2.8 where `createNode` and `createChildrenFirstNode` lost autocomplete for props due to incorrect `MergedProps` typing
119
+ - Fixes regression from v0.2.8 where `createNode` and `createChildrenFirstNode` lost autocomplete for props due to
120
+ incorrect `MergedProps` typing
83
121
 
84
122
  ## [0.2.8] - 2025-09-05
85
123
 
86
124
  ### Changed
125
+
87
126
  - **core.node**: refactor props handling to use a single utility type:
88
- - `MergedProps<E, AdditionalProps>` — merges `NodeProps<E>` with custom props, giving precedence to overlapping keys from `AdditionalProps`.
127
+ - `MergedProps<E, AdditionalProps>` — merges `NodeProps<E>` with custom props, giving precedence to overlapping keys
128
+ from `AdditionalProps`.
89
129
  - Simplifies and unifies the typing system for node factories (`createNode`, `createChildrenFirstNode`).
90
130
  - Improves developer experience when working with prebuilt components:
91
131
  - Example:
@@ -100,11 +140,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
100
140
  onChange: ({ target }) => console.log(target.value),
101
141
  })
102
142
  ```
103
- Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys overlap.
143
+ Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys
144
+ overlap.
104
145
 
105
146
  - **helpers**: reorganize helper files and update import paths
106
147
 
107
148
  ### Fixed
149
+
108
150
  - **styled-renderer**: make `children` prop optional in `StyledRendererProps`
109
151
 
110
152
  ## [0.2.7] - 2025-09-04
@@ -116,7 +158,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116
158
  ## [0.2.6] - 2025-09-04
117
159
 
118
160
  - **deps**: update TypeScript ESLint, native-preview, and jsdoc to latest versions
119
- - **core.node**: improve generateIndexedKeyIfNeeded to accept object parameters and enhance key uniqueness with children count
161
+ - **core.node**: improve generateIndexedKeyIfNeeded to accept object parameters and enhance key uniqueness with children
162
+ count
120
163
  - **imports**: update import paths to include file extensions for compatibility
121
164
 
122
165
  ## [0.2.5] - 2025-09-03
@@ -126,6 +169,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
126
169
  ## [0.2.4] - 2025-09-02
127
170
 
128
171
  ### Added
172
+
129
173
  - **core**: Exposed the original element via the created Node for easier access and debugging.
130
174
  ```typescript
131
175
  import { createNode } from "@meonode/ui";
@@ -140,49 +184,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
140
184
  ## [0.2.3] - 2025-09-01
141
185
 
142
186
  ### Fixed
187
+
143
188
  - **types**: Remove forbidden css import to resolve RSC error
144
189
 
145
190
  ### Changed
191
+
146
192
  - **package**: Bump version to 0.2.3
147
193
 
148
194
  ## [0.2.2] - 2025-09-01
149
195
 
150
196
  ### Added
197
+
151
198
  - **core**: Include nativeProps in props extraction for improved component flexibility
152
199
 
153
200
  ### Enhanced
201
+
154
202
  - **types**: Enhance StyledRendererProps and FinalNodeProps for improved type safety
155
203
 
156
204
  ### Changed
205
+
157
206
  - **package**: Bump version to 0.2.2
158
207
 
159
208
  ## [0.2.1] - 2025-09-01
160
209
 
161
210
  ### Changed
211
+
162
212
  - **types**: Update CSS type from CSSObject to CSSInterpolation for better compatibility
163
213
  - **package**: Bump version to 0.2.1
164
214
 
165
215
  ## [0.2.0] - 2025-08-31
166
216
 
167
217
  ### Added
218
+
168
219
  - **docs**: Add badges for NPM version, license, and bundle size to README
169
220
 
170
221
  ### Enhanced
222
+
171
223
  - **docs**: Update installation instructions and enhance clarity in core concepts
172
224
  - **docs**: Enhance documentation with new examples and improved clarity
173
225
 
174
226
  ### Removed
227
+
175
228
  - **package**: Remove deprecated hook entry from package.json
176
229
 
177
230
  ### Fixed
231
+
178
232
  - **core.node**: Add suppressHydrationWarning to propsForCreateElement
179
233
 
180
234
  ### Changed
235
+
181
236
  - **package**: Bump version to 0.2.0
182
237
 
183
238
  ## [0.1.121] - 2025-08-30
184
239
 
185
240
  ### Changed
241
+
186
242
  - **core.node**: Simplify style resolution and improve prop handling
187
243
  - **StyledRenderer**: Remove unused style prop and simplify component
188
244
  - **package**: Bump version to 0.1.121
@@ -190,6 +246,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
190
246
  ## [0.1.120] - 2025-08-30
191
247
 
192
248
  ### Added
249
+
193
250
  - **styles**: Add Emotion support and Next.js style registry integration
194
251
  - Add @emotion/react and @emotion/cache dependencies
195
252
  - Add StyledRenderer and StyleRegistry components for Emotion
@@ -197,37 +254,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
197
254
  - Add nextjs-registry export for Next.js style registry
198
255
 
199
256
  ### Enhanced
257
+
200
258
  - **core**: Enhance style handling with StyledRenderer for Emotion support
201
259
 
202
260
  ### Fixed
261
+
203
262
  - **deps**: Update peerDependencies for Emotion and React to use version constraints
204
263
  - **deps**: Update @types/react and @types/react-dom to latest versions
205
264
 
206
265
  ### Changed
266
+
207
267
  - **package**: Update peerDependencies for @emotion/cache
208
268
  - **package**: Bump version to 0.1.120
209
269
 
210
270
  ## [0.1.118] - 2025-08-30
211
271
 
212
272
  ### Fixed
273
+
213
274
  - **deps**: Update peerDependencies for Emotion and React to use version constraints
214
275
 
215
276
  ### Changed
277
+
216
278
  - **package**: Bump version to 0.1.118
217
279
 
218
280
  ## [0.1.117] - 2025-08-30
219
281
 
220
282
  ### Added
283
+
221
284
  - **flexbox**: Improve default style resolution and add flex shorthand parser
222
285
  - Add parseFlexShorthand to extract flex-grow, shrink, and basis
223
286
  - Enhance resolveDefaultStyle to respect explicit flex/flexShrink values
224
287
  - Improve handling of minHeight, minWidth, and flexShrink for flex items
225
288
 
226
289
  ### Enhanced
290
+
227
291
  - **core**: Refine type of finalChildren for improved type safety
228
292
  - **docs**: Update documentation for clarity on flexbox scrolling fixes
229
293
 
230
294
  ### Changed
295
+
231
296
  - **core**: Move comments position for better readability
232
297
  - **imports**: Remove .js extensions from internal imports
233
298
  - **package**: Bump version to 0.1.117
@@ -235,6 +300,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
235
300
  ## [0.1.116] - 2025-08-27
236
301
 
237
302
  ### Changed
303
+
238
304
  - **package**: Bump version to 0.1.116
239
305
 
240
306
  ---
@@ -1 +1 @@
1
- "use client";var _excluded=["element","css","children"];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 _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)}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}import{jsx}from"@emotion/react";export default function StyledRenderer(a){var b=a.element,c=a.css,d=a.children,e=_objectWithoutProperties(a,_excluded);return jsx(b,_objectSpread(_objectSpread({},e),{},{css:c}),d)}
1
+ "use client";var _excluded=["element","css","children"];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 _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)}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}import{jsx}from"@emotion/react";export default function StyledRenderer(a){var b=a.element,c=a.css,d=a.children,e=_objectWithoutProperties(a,_excluded);return jsx(b,_objectSpread(_objectSpread({},e),{},{css:c}),d)}StyledRenderer.displayName="Styled";
@@ -1,5 +1,5 @@
1
- import { type ElementType, type ReactNode, type ReactElement } from 'react';
2
- import type { MergedProps, FinalNodeProps, HasRequiredProps, NodeElement, NodeInstance, NodeProps, PropsOf, RawNodeProps, Theme } from './node.type.js';
1
+ import React, { type ElementType, type ReactElement, type ReactNode } from 'react';
2
+ import type { FinalNodeProps, HasRequiredProps, MergedProps, NodeElement, NodeInstance, NodeProps, PropsOf, RawNodeProps, Theme } from './node.type.js';
3
3
  import { type Root as ReactDOMRoot } from 'react-dom/client';
4
4
  /**
5
5
  * Represents a node in a React component tree with theme and styling capabilities.
@@ -27,8 +27,18 @@ export declare class BaseNode<E extends NodeElement> implements NodeInstance<E>
27
27
  private _childrenHash?;
28
28
  /** Cache for normalized children */
29
29
  private _normalizedChildren?;
30
- /** Cache for processed children to avoid redundant processing */
31
- private static _processedChildrenCache;
30
+ /**
31
+ * WeakMap cache for processed children, keyed by object/array identity for GC friendliness.
32
+ * Each entry stores the hash, processed children, and a server-side flag.
33
+ */
34
+ private static _processedChildrenWeakCache;
35
+ /**
36
+ * Map cache for processed children, keyed by a stable string signature.
37
+ * Used for non-object cases or as a fallback. Each entry stores the processed children and a server-side flag.
38
+ */
39
+ private static _processedChildrenMapCache;
40
+ /** Maximum number of entries in the Map cache to prevent unbounded growth */
41
+ private static readonly _MAX_PROCESSED_CHILDREN_CACHE = 1000;
32
42
  /**
33
43
  * Constructs a new BaseNode instance.
34
44
  *
@@ -62,21 +72,42 @@ export declare class BaseNode<E extends NodeElement> implements NodeInstance<E>
62
72
  */
63
73
  private _processProps;
64
74
  /**
65
- * Attempts to retrieve cached processed children based on the current children and theme.
66
- * This method uses a WeakMap for client-side caching and skips caching on the server.
67
- * @param children
68
- * @param theme
75
+ * Deeply clones processed children before returning them from cache so that each parent receives
76
+ * independent `BaseNode` instances (prevents sharing cycles and mutation bugs).
77
+ *
78
+ * - If the input is an array, each child is cloned recursively.
79
+ * - If the input is a `BaseNode`, a new instance is created with the same element and copied rawProps.
80
+ * - For other objects/primitives, the value is returned as-is (they are immutable or safe to reuse).
81
+ *
82
+ * This ensures that cached children are never shared between different parents in the React tree.
83
+ * @param processed The processed child or array of children to clone.
84
+ * @returns A deep clone of the processed children, safe for use in multiple parents.
85
+ * @private
86
+ */
87
+ private static _cloneProcessedChildren;
88
+ /**
89
+ * Retrieves cached processed children for a given set of `children` and an optional `theme`.
90
+ *
91
+ * - Skips caching entirely when executed on the server (returns `null`).
92
+ * - Uses a **WeakMap** for identity-based caching when `children` is an object or array,
93
+ * ensuring garbage collection safety.
94
+ * - Falls back to a **Map** keyed by a stable hash of `children` and `theme`
95
+ * for value-based caching.
96
+ * - Only returns cached entries that are **not server-side**.
97
+ * @param children The child node(s) to resolve cached results for.
98
+ * @param theme The theme context that may influence child processing.
99
+ * @returns A cloned version of the cached processed children if available, otherwise `null`.
69
100
  * @private
70
101
  */
71
102
  private _getCachedChildren;
72
103
  /**
73
104
  * Caches processed children for a given set of children and theme.
74
- * This method stores the processed ReactNode in a WeakMap for client-side caching,
75
- * avoiding redundant processing of the same children-theme combination.
76
- * No caching is performed on the server to avoid memory leaks.
105
+ * This method stores the processed NodeElement(s) in a Map keyed by a stable hash.
106
+ * The cache is bounded to avoid unbounded memory growth.
107
+ * No caching is performed on the server to avoid RSC issues.
77
108
  * @param children The original children to cache.
78
109
  * @param theme The theme associated with the children.
79
- * @param processed The processed ReactNode to cache.
110
+ * @param processed The processed NodeElement(s) to cache.
80
111
  * @private
81
112
  */
82
113
  private _setCachedChildren;
@@ -85,7 +116,7 @@ export declare class BaseNode<E extends NodeElement> implements NodeInstance<E>
85
116
  * and propagating the provided theme.
86
117
  *
87
118
  * This method ensures consistent theme handling for all children and optimizes performance
88
- * using caching strategies: a WeakMap for client-side and no caching for server-side.
119
+ * using caching strategies: a Map for client-side and no caching for server-side.
89
120
  *
90
121
  * - If `children` is an array, each child is processed individually.
91
122
  * - If `children` is a single node, it is processed directly.
@@ -114,7 +145,7 @@ export declare class BaseNode<E extends NodeElement> implements NodeInstance<E>
114
145
  * @private
115
146
  * @static
116
147
  */
117
- static _renderProcessedNode(processedElement: NodeElement, passedTheme: Theme | undefined, passedKey: string | undefined): ReactNode;
148
+ static _renderProcessedNode(processedElement: NodeElement, passedTheme: Theme | undefined, passedKey: string | undefined): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
118
149
  /**
119
150
  * Renders the output of a function-as-a-child, ensuring theme propagation.
120
151
  *
@@ -194,7 +225,7 @@ export declare class BaseNode<E extends NodeElement> implements NodeInstance<E>
194
225
  * @returns The rendered `ReactElement`.
195
226
  * @throws {Error} If the node's `element` is not a valid React element type.
196
227
  */
197
- render(): ReactElement;
228
+ render(): ReactElement<FinalNodeProps>;
198
229
  /**
199
230
  * Ensures the necessary DOM elements for portal rendering are created and attached.
200
231
  *
@@ -233,7 +264,7 @@ export declare function Node<AdditionalProps extends Record<string, any>, E exte
233
264
  /**
234
265
  * Creates a curried node factory for a given React element or component type.
235
266
  *
236
- * Returns a function that, when called with props, produces a `BaseNode` instance.
267
+ * Returns a function that, when called with props, produces a `NodeInstance<E>`.
237
268
  * Useful for creating reusable node factories for specific components or element types.
238
269
  * @template AdditionalInitialProps Additional initial props to merge with node props.
239
270
  * @template E The React element or component type.
@@ -1 +1 @@
1
- {"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AACA,OAAc,EAAgD,KAAK,WAAW,EAA4B,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAA;AAC1J,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EAEd,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,OAAO,EACP,YAAY,EACZ,KAAK,EACN,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAc,KAAK,IAAI,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAKxE;;;;;;;;GAQG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,WAAW,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IACrE,+EAA+E;IACxE,OAAO,EAAE,CAAC,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AE,UAAU,CAAC,KACtD,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAQzC"}
package/dist/core.node.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var _excluded=["ref","key","children","nodetheme","theme","props"],_excluded2=["style"],_excluded3=["style","css"],_excluded4=["style"],_excluded5=["children","key","nativeProps"];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 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 _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 _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,{Fragment,createElement,isValidElement}from"react";import{createStableHash,isNodeInstance,resolveDefaultStyle}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}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";import{resolveObjWithTheme}from"./helper/theme.helper.js";/**
1
+ "use strict";var _excluded=["ref","key","children","nodetheme","theme","props"],_excluded2=["style"],_excluded3=["style","css"],_excluded4=["style"],_excluded5=["children","key","nativeProps"];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 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 _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 _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,Fragment,isValidElement}from"react";import{createStableHash,isNodeInstance,resolveDefaultStyle}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}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";import{resolveObjWithTheme}from"./helper/theme.helper.js";/**
2
2
  * Represents a node in a React component tree with theme and styling capabilities.
3
3
  * This class wraps React elements and handles:
4
4
  * - Props processing and normalization
@@ -67,29 +67,52 @@ return a}),this.element=a,this.rawProps=c}/**
67
67
  var a=this.rawProps,b=a.ref,c=a.key,d=a.children,e=a.nodetheme,f=a.theme,g=a.props,h=void 0===g?{}:g,i=_objectWithoutProperties(a,_excluded),j=f||e,k=h,l=k.style,m=_objectWithoutProperties(k,_excluded2),n=resolveObjWithTheme(i,j),o=resolveObjWithTheme(l,j),p=n.style,q=n.css,r=_objectWithoutProperties(n,_excluded3),s=getCSSProps(r),t=getDOMProps(r),u=resolveDefaultStyle(_objectSpread(_objectSpread({},s),p)),v=this._processChildren(d,j);// Process children while maintaining theme inheritance
68
68
  // Combine processed props into final normalized form
69
69
  return _objectSpread(_objectSpread({ref:b,key:c,nodetheme:j,theme:f,css:_objectSpread(_objectSpread({},u),q),style:o},t),{},{nativeProps:m,children:v})}/**
70
- * Attempts to retrieve cached processed children based on the current children and theme.
71
- * This method uses a WeakMap for client-side caching and skips caching on the server.
72
- * @param children
73
- * @param theme
70
+ * Deeply clones processed children before returning them from cache so that each parent receives
71
+ * independent `BaseNode` instances (prevents sharing cycles and mutation bugs).
72
+ *
73
+ * - If the input is an array, each child is cloned recursively.
74
+ * - If the input is a `BaseNode`, a new instance is created with the same element and copied rawProps.
75
+ * - For other objects/primitives, the value is returned as-is (they are immutable or safe to reuse).
76
+ *
77
+ * This ensures that cached children are never shared between different parents in the React tree.
78
+ * @param processed The processed child or array of children to clone.
79
+ * @returns A deep clone of the processed children, safe for use in multiple parents.
80
+ * @private
81
+ */static _cloneProcessedChildren(a){var b=function cloneOne(a){return a instanceof BaseNode?new BaseNode(a.element,_objectSpread({},a.rawProps)):a;// NodeInstance returns its own instances when render() is called - we avoid calling render here.
82
+ // For other objects/primitives, return as-is (they are immutable or safe to reuse).
83
+ };return Array.isArray(a)?a.map(function(a){return b(a)}):b(a)}/**
84
+ * Retrieves cached processed children for a given set of `children` and an optional `theme`.
85
+ *
86
+ * - Skips caching entirely when executed on the server (returns `null`).
87
+ * - Uses a **WeakMap** for identity-based caching when `children` is an object or array,
88
+ * ensuring garbage collection safety.
89
+ * - Falls back to a **Map** keyed by a stable hash of `children` and `theme`
90
+ * for value-based caching.
91
+ * - Only returns cached entries that are **not server-side**.
92
+ * @param children The child node(s) to resolve cached results for.
93
+ * @param theme The theme context that may influence child processing.
94
+ * @returns A cloned version of the cached processed children if available, otherwise `null`.
74
95
  * @private
75
- */_getCachedChildren(a,b){// Only cache on client-side, and with server-side detection
76
- if("undefined"==typeof window)return null;// No server caching
77
- var c=BaseNode._processedChildrenCache.get({children:a,theme:b}),d=createStableHash(a,b);return(null===c||void 0===c?void 0:c.hash)!==d||c.isServerSide?null:c.children}/**
96
+ */_getCachedChildren(a,b){if("undefined"==typeof window)return null;// No server caching
97
+ // Compute hash once
98
+ var c=createStableHash(a,b);// If children is an object (array or object), try identity-keyed WeakMap first
99
+ if(a&&"object"===_typeof(a)){var d=BaseNode._processedChildrenWeakCache.get(a);if(d&&d.hash===c&&!d.isServerSide)return BaseNode._cloneProcessedChildren(d.children)}// Fallback to string-hash Map cache
100
+ var e=BaseNode._processedChildrenMapCache.get(c);return e&&!e.isServerSide?BaseNode._cloneProcessedChildren(e.children):null}/**
78
101
  * Caches processed children for a given set of children and theme.
79
- * This method stores the processed ReactNode in a WeakMap for client-side caching,
80
- * avoiding redundant processing of the same children-theme combination.
81
- * No caching is performed on the server to avoid memory leaks.
102
+ * This method stores the processed NodeElement(s) in a Map keyed by a stable hash.
103
+ * The cache is bounded to avoid unbounded memory growth.
104
+ * No caching is performed on the server to avoid RSC issues.
82
105
  * @param children The original children to cache.
83
106
  * @param theme The theme associated with the children.
84
- * @param processed The processed ReactNode to cache.
107
+ * @param processed The processed NodeElement(s) to cache.
85
108
  * @private
86
- */_setCachedChildren(a,b,c){// Only cache on client-side to avoid RSC issues
87
- if("undefined"!=typeof window){var d=createStableHash(a,b);BaseNode._processedChildrenCache.set({children:a,theme:b},{hash:d,children:c,isServerSide:!1})}}/**
109
+ */_setCachedChildren(a,b,c){if("undefined"!=typeof window){var d=createStableHash(a,b);if(a&&"object"===_typeof(a))return void BaseNode._processedChildrenWeakCache.set(a,{hash:d,children:c,isServerSide:!1});// Manage bounded Map cache (FIFO eviction)
110
+ if(BaseNode._processedChildrenMapCache.has(d))return void BaseNode._processedChildrenMapCache.set(d,{children:c,isServerSide:!1});if(BaseNode._processedChildrenMapCache.size>=BaseNode._MAX_PROCESSED_CHILDREN_CACHE){var e=BaseNode._processedChildrenMapCache.keys().next().value;void 0!==e&&BaseNode._processedChildrenMapCache["delete"](e)}BaseNode._processedChildrenMapCache.set(d,{children:c,isServerSide:!1})}}/**
88
111
  * Recursively processes raw children, converting them into `BaseNode` instances as needed
89
112
  * and propagating the provided theme.
90
113
  *
91
114
  * This method ensures consistent theme handling for all children and optimizes performance
92
- * using caching strategies: a WeakMap for client-side and no caching for server-side.
115
+ * using caching strategies: a Map for client-side and no caching for server-side.
93
116
  *
94
117
  * - If `children` is an array, each child is processed individually.
95
118
  * - If `children` is a single node, it is processed directly.
@@ -200,7 +223,9 @@ return a}/**
200
223
  var c=this.props,d=c.children,e=c.key,f=c.nativeProps,g=_objectWithoutProperties(c,_excluded5),h=void 0;if(void 0!==d&&null!==d){if(!this._normalizedChildren||this._childrenHash!==createStableHash(d,this.props.nodetheme||this.props.theme))if(!Array.isArray(d))this._normalizedChildren=this._normalizeChild(d);else if(0<d.length){var i=d.map(function(b){return a._normalizeChild(b)});this._normalizedChildren=i.every(function(a){return null===a||void 0===a})?void 0:i}else this._normalizedChildren=void 0;h=this._normalizedChildren}// Prepare props for React.createElement
201
224
  var j;// If the element has a `css` prop and has style tag, render using the `StyledRenderer` component
202
225
  // This enables emotion-based style handling for the element
203
- return j=this.element===Fragment||isFragment(this.element)?{key:e}:_objectSpread(_objectSpread(_objectSpread({},g),{},{key:e},f),{},{suppressHydrationWarning:!0}),this.element&&!hasNoStyleTag(this.element)&&j.css?createElement(StyledRenderer,_objectSpread({element:this.element},j),h):createElement(this.element,j,h)}/**
226
+ if(j=this.element===Fragment||isFragment(this.element)?{key:e}:_objectSpread(_objectSpread(_objectSpread({},g),{},{key:e},f),{},{suppressHydrationWarning:!0}),this.element&&!hasNoStyleTag(this.element)&&j.css){var k=_objectSpread({element:this.element},j);try{var l=getElementTypeName(k.element);StyledRenderer.displayName="Styled(".concat(l,")")}catch(a){// swallow: displayName is not critical
227
+ }return createElement(StyledRenderer,k,h)}try{this.element.displayName=getElementTypeName(this.element)}catch(a){// swallow: displayName is not critical
228
+ }return createElement(this.element,j,h)}/**
204
229
  * Ensures the necessary DOM elements for portal rendering are created and attached.
205
230
  *
206
231
  * On the client-side, this method checks for or creates a `div` element appended
@@ -234,10 +259,10 @@ if(this._portalDOMElement||(this._portalDOMElement=document.createElement("div")
234
259
  * @param props The props for the node (optional).
235
260
  * @param additionalProps Additional props to merge into the node (optional).
236
261
  * @returns A new `BaseNode` instance as a `NodeInstance<E>`.
237
- */_defineProperty(BaseNode,"_processedChildrenCache",new WeakMap);export function Node(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},d=_objectSpread(_objectSpread({},b),c);return d.theme&&!d.nodetheme&&(d.nodetheme=d.theme),new BaseNode(a,d)}/**
262
+ */_defineProperty(BaseNode,"_processedChildrenWeakCache",new WeakMap),_defineProperty(BaseNode,"_processedChildrenMapCache",new Map),_defineProperty(BaseNode,"_MAX_PROCESSED_CHILDREN_CACHE",1e3);export function Node(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},d=_objectSpread(_objectSpread({},b),c);return d.theme&&!d.nodetheme&&(d.nodetheme=d.theme),new BaseNode(a,d)}/**
238
263
  * Creates a curried node factory for a given React element or component type.
239
264
  *
240
- * Returns a function that, when called with props, produces a `BaseNode` instance.
265
+ * Returns a function that, when called with props, produces a `NodeInstance<E>`.
241
266
  * Useful for creating reusable node factories for specific components or element types.
242
267
  * @template AdditionalInitialProps Additional initial props to merge with node props.
243
268
  * @template E The React element or component type.
@@ -894,24 +894,13 @@ export declare const resolveDefaultStyle: (style: CSSProperties) => {
894
894
  minWidth: import("csstype").Property.MinWidth<string | number>;
895
895
  };
896
896
  /**
897
- * Creates a stable hash string based on the provided children and optional theme.
897
+ * Public: createStableHash
898
+ * Produces a deterministic string signature for children + theme.
899
+ * Keep traversal limited so it is cheap in large trees.
898
900
  *
899
- * This function generates a hash that represents the structure and types of the given
900
- * children nodes, along with an optional theme. The hash is designed to be stable across
901
- * renders, meaning that the same input will always produce the same hash output.
902
- *
903
- * The hashing strategy includes:
904
- * - For arrays of children, it includes the length and samples the types of the first few children.
905
- * - For single child nodes, it includes the type of the node.
906
- * - For primitive values (strings, numbers, etc.), it includes their type.
907
- * - If a theme is provided, it includes a stringified version of the theme.
908
- *
909
- * This approach avoids deep traversal of potentially large or complex node trees,
910
- * focusing instead on key characteristics that are likely to change when the structure
911
- * or content changes.
912
- * @param children The child nodes to hash, which can be a single node or an array of nodes.
913
- * @param theme An optional theme object or string to include in the hash.
914
- * @returns A stable hash string representing the structure and types of the children and theme.
901
+ * If you prefer a shorter hashed output, wrap the returned string in a lightweight
902
+ * hash function (fnv1a, xxhash, etc.). Returning the full signature is useful
903
+ * for debugging and deterministic comparisons.
915
904
  */
916
905
  export declare function createStableHash(children: NodeElement | NodeElement[], theme?: Theme): string;
917
906
  //# sourceMappingURL=node.helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.helper.d.ts","sourceRoot":"","sources":["../../src/helper/node.helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAIzE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,4CAS1B,CAAA;AA4DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiE/B,CAAA;AAiGD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK,UAIpF"}
@@ -110,22 +110,22 @@ return _objectSpread({flex:c,// Preserve original flex shorthand
110
110
  flexShrink:j,// Apply computed or explicit flexShrink
111
111
  minHeight:0,// Fix flex item scrolling issues
112
112
  minWidth:0},d)};/**
113
- * Creates a stable hash string based on the provided children and optional theme.
113
+ * Create a stable signature for a React node (children) with bounded traversal.
114
+ * This focuses on the structural identity important for rendering decisions:
115
+ * - element type (string or component name)
116
+ * - key (if present)
117
+ * - basic children shape (recursing within limits)
118
+ */function nodeSignature(a){var b=Math.min,c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5,d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:6,e=3<arguments.length&&void 0!==arguments[3]?arguments[3]:new WeakSet;if(null===a)return"null";if(void 0===a)return"undefined";var f=_typeof(a);if("string"===f)return"s:".concat(a);if("number"===f)return"n:".concat(a+"");if("boolean"===f)return"b:".concat(a+"");if("function"===f)return"\u0192()";if("symbol"===f)return"sym:".concat(a+"");// Arrays
119
+ if(Array.isArray(a)){if(0>=c)return"ary[...]";for(var g=[],h=b(a.length,d),j=0;j<h;j++)g.push(nodeSignature(a[j],c-1,d,e));return a.length>d&&g.push("...len:".concat(a.length)),"ary[".concat(g.join(","),"]")}// React element-ish: detect common shapes (type + props)
120
+ if("object"===f&&(Object.prototype.hasOwnProperty.call(a,"type")||Object.prototype.hasOwnProperty.call(a,"props"))){var l,m,n=null!==(l=a.type)&&void 0!==l?l:a,o="";// Type can be string (div) or function/class. Use helper to get name.
121
+ try{o=getElementTypeName(n)}catch(a){try{o=n+""}catch(a){o="unknown"}}var p="key"in a&&void 0!==a.key&&null!==a.key?"#".concat(a.key+""):"",q="props"in a&&"object"===_typeof(a.props)?null!==(m=a.props)&&void 0!==m?m:{}:{},r="";try{r=nodeSignature(q.children,c-1,d,e)}catch(a){r="<err>"}var s=q&&"object"===_typeof(q)&&"id"in q&&q.id?"@id:".concat(q.id+""):"",t=q&&"object"===_typeof(q)&&"className"in q&&q.className?"@class:".concat(q.className+""):"";return"el:".concat(o).concat(p).concat(s).concat(t,"{").concat(r,"}")}// Plain object
122
+ if("object"===f&&a&&"object"===_typeof(a)&&!("type"in a)&&!("props"in a)){if(e.has(a))return"[Circular]";if(e.add(a),0>=c)return"obj[...]";for(var u,v=Object.keys(a).sort(),w=[],x=b(v.length,d),y=0;y<x;y++){u=v[y];try{w.push("".concat(u,":").concat(nodeSignature(a[u],c-1,d,e)))}catch(a){w.push("".concat(u,":<err>"))}}return v.length>d&&w.push("...keys:".concat(v.length)),"obj{".concat(w.join(","),"}")}// Fallback
123
+ try{return"o:".concat(a+"")}catch(a){return"o:<unserializable>"}}/**
124
+ * Public: createStableHash
125
+ * Produces a deterministic string signature for children + theme.
126
+ * Keep traversal limited so it is cheap in large trees.
114
127
  *
115
- * This function generates a hash that represents the structure and types of the given
116
- * children nodes, along with an optional theme. The hash is designed to be stable across
117
- * renders, meaning that the same input will always produce the same hash output.
118
- *
119
- * The hashing strategy includes:
120
- * - For arrays of children, it includes the length and samples the types of the first few children.
121
- * - For single child nodes, it includes the type of the node.
122
- * - For primitive values (strings, numbers, etc.), it includes their type.
123
- * - If a theme is provided, it includes a stringified version of the theme.
124
- *
125
- * This approach avoids deep traversal of potentially large or complex node trees,
126
- * focusing instead on key characteristics that are likely to change when the structure
127
- * or content changes.
128
- * @param children The child nodes to hash, which can be a single node or an array of nodes.
129
- * @param theme An optional theme object or string to include in the hash.
130
- * @returns A stable hash string representing the structure and types of the children and theme.
131
- */export function createStableHash(a,b){var c=Math.min,d="";if(b&&(d+="t:".concat("object"===_typeof(b)?ObjHelper.stringify(b):b+"",";")),Array.isArray(a)){d+="a:".concat(a.length,";");for(var e,f=c(3,a.length),g=0;g<f;g++)e=a[g],d+=e&&"object"===_typeof(e)&&"type"in e?"c".concat(g,":").concat(getElementTypeName(e),";"):"c".concat(g,":").concat(_typeof(e),";")}else d+=a&&"object"===_typeof(a)&&"type"in a?"s:".concat(getElementTypeName(a),";"):"s:".concat(_typeof(a),";");return d}
128
+ * If you prefer a shorter hashed output, wrap the returned string in a lightweight
129
+ * hash function (fnv1a, xxhash, etc.). Returning the full signature is useful
130
+ * for debugging and deterministic comparisons.
131
+ */export function createStableHash(a,b){var c=b?ObjHelper.stringify(b,6):"theme:undefined",d=nodeSignature(a,6,8);return"".concat(c,"|").concat(d)}
@@ -1,5 +1,16 @@
1
1
  export declare class ObjHelper {
2
2
  private constructor();
3
+ /**
4
+ * Build a deterministic, serializable representation of `value`.
5
+ * - sorts plain object keys
6
+ * - preserves encoded placeholders for special types
7
+ * - emits { $type: 'Circular', ref: id } for circular refs
8
+ */
9
+ private static buildSerializable;
10
+ /**
11
+ * Deterministic stringify: first build a canonical serializable structure
12
+ * (with sorted object keys and encoded special types), then JSON.stringify it.
13
+ */
3
14
  static stringify(obj: any, space?: number): string;
4
15
  static parse(str: string): any;
5
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"obj.helper.d.ts","sourceRoot":"","sources":["../../src/helper/obj.helper.ts"],"names":[],"mappings":"AAWA,qBAAa,SAAS;IACpB,OAAO,eAAiB;IAExB,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,SAAI,GAAG,MAAM,CAiD5C;IAED,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CA+C7B;CACF"}
1
+ {"version":3,"file":"obj.helper.d.ts","sourceRoot":"","sources":["../../src/helper/obj.helper.ts"],"names":[],"mappings":"AAWA,qBAAa,SAAS;IACpB,OAAO,eAAiB;IAExB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IA2FhC;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,SAAI,GAAG,MAAM,CAO5C;IAED,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CA+C7B;CACF"}
@@ -1 +1,19 @@
1
- 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)}export class ObjHelper{constructor(){}static stringify(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:2,c=new Map,d=new Map,e=0,f=0,g=function replacer(a,b){if("function"==typeof b)return d.has(b)||d.set(b,f++),{$type:"Function",name:b.name||"",id:d.get(b)};if("symbol"===_typeof(b)){var g;return{$type:"Symbol",key:null!==(g=b.description)&&void 0!==g?g:""}}if("bigint"==typeof b)return{$type:"BigInt",value:b.toString()};if(b instanceof Date)return{$type:"Date",value:b.toISOString()};if(b instanceof RegExp)return{$type:"RegExp",source:b.source,flags:b.flags};if(b instanceof Map)return{$type:"Map",entries:Array.from(b.entries())};if(b instanceof Set)return{$type:"Set",values:Array.from(b.values())};if("object"===_typeof(b)&&null!==b){if(c.has(b))return{$type:"Circular",ref:c.get(b)};c.set(b,e++)}return b};return JSON.stringify(a,g,b)}static parse(a){var b=[],c=function reviver(a,b){if(b&&"object"===_typeof(b)&&"$type"in b)switch(b.$type){case"Function":return function FunctionPlaceholder(){throw new Error("Function placeholder called: ".concat(b.name||"anonymous","#").concat(b.id))};case"Symbol":return Symbol(b.key);case"BigInt":return BigInt(b.value);case"Date":return new Date(b.value);case"RegExp":return new RegExp(b.source,b.flags);case"Map":return new Map(b.entries);case"Set":return new Set(b.values);case"Circular":return{$circularRef:b.ref}}return b},d=JSON.parse(a,c),e=function fixCirculars(a){if(a&&"object"===_typeof(a)){if(a.$circularRef!==void 0)return b[a.$circularRef];if(!b.includes(a)){b.push(a);for(var c,d=0,f=Object.keys(a);d<f.length;d++)c=f[d],a[c]=e(a[c])}}return a};return e(d)}}
1
+ 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)}export class ObjHelper{constructor(){}/**
2
+ * Build a deterministic, serializable representation of `value`.
3
+ * - sorts plain object keys
4
+ * - preserves encoded placeholders for special types
5
+ * - emits { $type: 'Circular', ref: id } for circular refs
6
+ */static buildSerializable(a,b,c,d){// primitives & simple types
7
+ if(null===a||a===void 0)return a;var e=_typeof(a);if("string"===e||"number"===e||"boolean"===e)return a;if("function"===e)return c.has(a)||c.set(a,d.nextFunctionId++),{$type:"Function",name:a.name||"",id:c.get(a)};if("symbol"===e){var f;return{$type:"Symbol",key:null!==(f=a.description)&&void 0!==f?f:""}}if("bigint"===e)return{$type:"BigInt",value:a.toString()};// Date
8
+ if(a instanceof Date)return{$type:"Date",value:a.toISOString()};// RegExp
9
+ if(a instanceof RegExp)return{$type:"RegExp",source:a.source,flags:a.flags};// Map
10
+ if(a instanceof Map){var g,h=[],j=_createForOfIteratorHelper(a.entries());try{for(j.s();!(g=j.n()).done;){var l=_slicedToArray(g.value,2),m=l[0],n=l[1];h.push([ObjHelper.buildSerializable(m,b,c,d),ObjHelper.buildSerializable(n,b,c,d)])}}catch(a){j.e(a)}finally{j.f()}return{$type:"Map",entries:h}}// Set
11
+ if(a instanceof Set){var o,p=[],q=_createForOfIteratorHelper(a.values());try{for(q.s();!(o=q.n()).done;){var r=o.value;p.push(ObjHelper.buildSerializable(r,b,c,d))}}catch(a){q.e(a)}finally{q.f()}return{$type:"Set",values:p}}// Objects and arrays
12
+ if("object"===e){// Circular detection
13
+ if(b.has(a))return{$type:"Circular",ref:b.get(a)};// assign id
14
+ var s=d.nextObjId++;if(b.set(a,s),Array.isArray(a)){for(var t=[],u=0;u<a.length;u++)t.push(ObjHelper.buildSerializable(a[u],b,c,d));return t}// Plain object: sort keys for determinism
15
+ var w,x=Object.keys(a).sort(),y={},z=_createForOfIteratorHelper(x);try{for(z.s();!(w=z.n()).done;){var A=w.value;try{y[A]=ObjHelper.buildSerializable(a[A],b,c,d)}catch(a){y[A]="<unserializable>"}}}catch(a){z.e(a)}finally{z.f()}return y}// Fallback: try to stringify
16
+ try{return a+""}catch(a){return"<unserializable>"}}/**
17
+ * Deterministic stringify: first build a canonical serializable structure
18
+ * (with sorted object keys and encoded special types), then JSON.stringify it.
19
+ */static stringify(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:2,c=new Map,d=new Map,e=ObjHelper.buildSerializable(a,c,d,{nextObjId:0,nextFunctionId:0});return JSON.stringify(e,null,b)}static parse(a){var b=[],c=function reviver(a,b){if(b&&"object"===_typeof(b)&&"$type"in b)switch(b.$type){case"Function":return function FunctionPlaceholder(){throw new Error("Function placeholder called: ".concat(b.name||"anonymous","#").concat(b.id))};case"Symbol":return Symbol(b.key);case"BigInt":return BigInt(b.value);case"Date":return new Date(b.value);case"RegExp":return new RegExp(b.source,b.flags);case"Map":return new Map(b.entries);case"Set":return new Set(b.values);case"Circular":return{$circularRef:b.ref}}return b},d=JSON.parse(a,c),e=function fixCirculars(a){if(a&&"object"===_typeof(a)){if(a.$circularRef!==void 0)return b[a.$circularRef];if(!b.includes(a)){b.push(a);for(var c,d=0,f=Object.keys(a);d<f.length;d++)c=f[d],a[c]=e(a[c])}}return a};return e(d)}}
@@ -1 +1 @@
1
- {"version":3,"file":"component.hoc.d.ts","sourceRoot":"","sources":["../../src/hoc/component.hoc.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACrG,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAA;AAE7E;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,kBAAkB,CAAC,MAAM,IAAI,MAAM,SAAS,SAAS,GAC7D,OAAO,CAAC;IACN,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,CAAA;IACrC,KAAK,EAAE,KAAK,CAAA;CACb,CAAC,GACF,MAAM,GACJ,CAAC,yBAAyB,CAAC,MAAM,CAAC,SAAS,IAAI,GAAG,aAAa,GAAG,MAAM,CAAC,GACzE,OAAO,CAAC;IACN,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CA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AC;IACN,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IACxC,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,CAAA;IACrC,KAAK,EAAE,KAAK,CAAA;CACb,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,KAAK,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAA;AAExF;;;;;;;;;;;;;;;;;;;;;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,KAAK,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- "use strict";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 _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{BaseNode,Node}from"../core.node.js";/**
1
+ "use strict";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 _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{BaseNode,Node}from"../core.node.js";import{getElementTypeName}from"../helper/common.helper.js";/**
2
2
  * Props definition for components wrapped using the `Component` higher-order function.
3
3
  *
4
4
  * This type adapts based on whether the underlying component defines its own props:
@@ -48,4 +48,4 @@
48
48
  *//**
49
49
  * Internal implementation of the `Component` HOC.
50
50
  * Handles theme propagation, BaseNode conversion, and wrapper creation.
51
- */export function Component(a){var b=function Renderer(b){var c=a(b);if(c instanceof BaseNode){var d,e,f=(null===(d=c.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=c.rawProps)||void 0===e?void 0:e.theme)||b.nodetheme||b.theme;return Node(c.element,_objectSpread(_objectSpread({},c.rawProps),{},{nodetheme:f})).render()}return c};return function Func(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return Node(b,a).render()}}
51
+ */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);if(c instanceof BaseNode){var d,e,f=(null===(d=c.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=c.rawProps)||void 0===e?void 0:e.theme)||b.nodetheme||b.theme;return Node(c.element,_objectSpread(_objectSpread({},c.rawProps),{},{nodetheme:f})).render()}return c};return c.displayName="Renderer(".concat(b,")"),Func.displayName="Component(".concat(b,")"),Func}
@@ -1,4 +1,4 @@
1
- import React, { type Attributes as ReactAttributes, type CSSProperties, type ReactNode, type JSX, type ElementType, type ComponentType, type JSXElementConstructor, type Component, type Ref, type ExoticComponent, type FragmentProps, type ReactElement } from 'react';
1
+ import React, { type Attributes as ReactAttributes, type CSSProperties, type ReactNode, type JSX, type ElementType, type ComponentType, type JSXElementConstructor, type Component, type ExoticComponent, type ReactElement } from 'react';
2
2
  import type { Root as ReactDOMRoot } from 'react-dom/client';
3
3
  import type { CSSInterpolation } from '@emotion/serialize';
4
4
  import type { NO_STYLE_TAGS } from './constants/common.const.js';
@@ -17,7 +17,7 @@ export type NonArrayReactNode = Exclude<ReactNode, ReactNode[]>;
17
17
  * Defines the various types that can represent a "node" in the Meonode system.
18
18
  * This includes React elements, components, promises resolving to React nodes, and NodeInstance objects.
19
19
  */
20
- export type NodeElement = ExoticComponent<FragmentProps> | NonArrayReactNode | Promise<Awaited<NonArrayReactNode>> | Component<any, any, any> | ElementType | ComponentType<any> | NodeInstance<any> | ((props?: any) => NonArrayReactNode | Promise<Awaited<NonArrayReactNode>> | Component<any, any, any> | NodeInstance<any> | ComponentNode);
20
+ export type NodeElement = ExoticComponent<any> | NonArrayReactNode | Promise<Awaited<NonArrayReactNode>> | Component<any, any, any> | ElementType | ComponentType<any> | NodeInstance<any> | ((props?: any) => NonArrayReactNode | Promise<Awaited<NonArrayReactNode>> | Component<any, any, any> | NodeInstance<any> | ComponentNode);
21
21
  /**
22
22
  * Forward declaration of the BaseNode interface to avoid circular dependencies.
23
23
  * Defines the core structure and capabilities of a BaseNode instance.
@@ -65,15 +65,18 @@ export type Theme = Partial<{
65
65
  * - Handles theme context propagation
66
66
  * @template E - The element type these props apply to
67
67
  */
68
- export type FinalNodeProps = ReactAttributes & {
69
- ref?: Ref<unknown>;
70
- style?: CSSProperties;
71
- css?: CSSInterpolation;
72
- children?: NodeElement | NodeElement[];
73
- theme?: Theme;
74
- nodetheme?: Theme;
75
- nativeProps?: Record<string, unknown>;
76
- };
68
+ export type FinalNodeProps = ReactAttributes & Partial<{
69
+ nativeProps: Omit<Omit<PropsOf<NodeElement>, 'children'>, 'style'>;
70
+ key: React.Key | any | null | undefined;
71
+ ref: any | React.Ref<unknown> | undefined;
72
+ style: any;
73
+ css: any;
74
+ children: NodeElement | NodeElement[];
75
+ theme: Partial<{
76
+ [p: string]: any;
77
+ }> | any | undefined;
78
+ nodetheme: Theme;
79
+ }>;
77
80
  /**
78
81
  * Helper type to determine if the props P have a 'style' property
79
82
  * that is compatible with CSSProperties.
@@ -1 +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e,CAAA;AAE9F;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS,eAAe,GACnG,CAAC,KAAK,CAAC,EAAE;IACP,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;CAC7B,KAAK,YAAY,GAAG,IAAI,GACzB,CACE,KAAK,EAAE,CAAC,GAAG;IACT,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;CAC7B,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,KAC/B,YAAY,GAAG,IAAI,CAAA;AAE5B;;;;;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.2.14",
4
+ "version": "0.2.15",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",