@meonode/ui 0.4.7 → 0.4.9
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 +73 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -1
- package/dist/components/html.node.d.ts +139 -139
- package/dist/components/html.node.js +139 -139
- package/dist/components/meonode-unmounter.client.d.ts +6 -3
- package/dist/components/meonode-unmounter.client.d.ts.map +1 -1
- package/dist/components/meonode-unmounter.client.js +4 -2
- package/dist/components/react.node.d.ts +3 -3
- package/dist/components/react.node.js +3 -3
- package/dist/components/registry.client.js +6 -6
- package/dist/components/styled-renderer.client.js +2 -2
- package/dist/components/theme-provider.client.js +2 -2
- package/dist/components/theme-provider.d.ts +1 -1
- package/dist/components/theme-provider.js +1 -1
- package/dist/constant/common.const.d.ts.map +1 -0
- package/dist/constant/common.const.js +1 -0
- package/dist/constant/css-properties.const.d.ts.map +1 -0
- package/dist/constant/css-properties.const.js +1 -0
- package/dist/core.node.d.ts +9 -9
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +44 -39
- package/dist/helper/common.helper.js +9 -9
- package/dist/helper/obj.helper.js +14 -14
- package/dist/helper/react-is.helper.js +21 -21
- package/dist/hoc/component.hoc.js +1 -1
- package/dist/hoc/portal.hoc.js +13 -13
- package/dist/hook/usePortal.js +2 -2
- package/dist/hook/useTheme.js +3 -3
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -1
- package/dist/nextjs-registry/index.d.ts +1 -1
- package/dist/nextjs-registry/index.js +1 -1
- package/dist/types/node.type.d.ts +6 -1
- package/dist/types/node.type.d.ts.map +1 -1
- package/dist/util/mount-tracker.util.js +3 -3
- package/dist/util/navigation-cache-manager.util.d.ts +5 -0
- package/dist/util/navigation-cache-manager.util.d.ts.map +1 -1
- package/dist/util/navigation-cache-manager.util.js +7 -7
- package/dist/util/node.util.d.ts +15 -12
- package/dist/util/node.util.d.ts.map +1 -1
- package/dist/util/node.util.js +67 -75
- package/dist/util/theme.util.d.ts +6 -6
- package/dist/util/theme.util.d.ts.map +1 -1
- package/dist/util/theme.util.js +17 -16
- package/package.json +11 -8
- package/dist/constants/common.const.d.ts.map +0 -1
- package/dist/constants/common.const.js +0 -1
- package/dist/constants/css-properties.const.d.ts.map +0 -1
- package/dist/constants/css-properties.const.js +0 -1
- /package/dist/{constants → constant}/common.const.d.ts +0 -0
- /package/dist/{constants → constant}/css-properties.const.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,78 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.4.9] - 2025-11-19
|
|
6
|
+
|
|
7
|
+
### Feat
|
|
8
|
+
- **build**: add support for @tests alias and include tests folder in build and test configs ([`4dfd165`](https://github.com/l7aromeo/meonode-ui/commit/4dfd165fa52f93fe63ac7338344b91dfa5622c4b))
|
|
9
|
+
|
|
10
|
+
### Perf
|
|
11
|
+
- **core**: optimize rendering, caching, and memory management ([`4f599be`](https://github.com/l7aromeo/meonode-ui/commit/4f599be44458fef208a30849545606b060c4ec6b))
|
|
12
|
+
- Reworks the core rendering loop to use a more efficient, manually-managed work stack with exponential growth, reducing reallocations and improving performance for deep and wide node trees.
|
|
13
|
+
- Optimizes stable key generation by removing expensive shallow equality checks in favor of strict reference equality, significantly speeding up prop processing for cached components.
|
|
14
|
+
- Implements a high-performance MinHeap-based LRU cache eviction strategy for prop processing, replacing a slower sort-based method. This ensures that the most relevant props are kept in the cache with minimal overhead.
|
|
15
|
+
- Introduces CSS object hashing to accelerate prop signature generation, avoiding costly serialization of large style objects.
|
|
16
|
+
- Fixes several memory leaks by ensuring proper cleanup of node properties (lastSignature, lastPropsObj) and unregistering nodes from the cache cleanup registry upon eviction.
|
|
17
|
+
- Decouples element cache deletion from mount tracking to prevent race conditions and ensure reliable cleanup during component unmounting.
|
|
18
|
+
|
|
19
|
+
### Refactor
|
|
20
|
+
- **build**: rename constants directory from constants to constant and update imports accordingly ([`9531947`](https://github.com/l7aromeo/meonode-ui/commit/9531947af9b304c11c0865e8deafa1a633220753))
|
|
21
|
+
|
|
22
|
+
### Test
|
|
23
|
+
- **perf**: overhaul performance test suite ([`e3bd6ac`](https://github.com/l7aromeo/meonode-ui/commit/e3bd6ac6ceca474f935da644ff0c23b2f1de7692))
|
|
24
|
+
- Introduces a new, structured performance reporting system using cli-table3 for clear, grouped metrics.
|
|
25
|
+
- Refactors the entire performance test suite into logical groups: Layout Rendering, Memory Management, and Prop Processing.
|
|
26
|
+
- Adds comprehensive memory leak detection tests for heavy state changes and repeated mount/unmount cycles, using forced garbage collection for more accurate heap analysis.
|
|
27
|
+
- Extracts the large, complex CSS object into a dedicated test constant for better separation of concerns.
|
|
28
|
+
- Updates memoization tests to align with the new, weighted LRU cache eviction scoring.
|
|
29
|
+
|
|
30
|
+
### Chore
|
|
31
|
+
- **deps**: update dependencies including typescript-eslint to 8.47.0 and add cli-table3 0.6.5 ([`6064555`](https://github.com/l7aromeo/meonode-ui/commit/6064555f0108ed47f9b31e98c4758f7449a67ff2))
|
|
32
|
+
|
|
33
|
+
## [0.4.8] - 2025-11-18
|
|
34
|
+
|
|
35
|
+
### Feat
|
|
36
|
+
- **client**: add generic type parameter to render function for stronger type safety ([`90a770e`](https://github.com/l7aromeo/meonode-ui/commit/90a770e))
|
|
37
|
+
- **core**: improve BaseNode rendering with iterative traversal and memory optimizations ([`1d5330a`](https://github.com/l7aromeo/meonode-ui/commit/1d5330a))
|
|
38
|
+
- Introduce WorkItem interface to represent nodes in the iterative work stack during BaseNode rendering.
|
|
39
|
+
- Replace recursive render traversal with an iterative depth-first approach using a preallocated workStack array for better performance and reduced call stack usage.
|
|
40
|
+
- Implement dynamic resizing of workStack array to handle arbitrary tree sizes efficiently.
|
|
41
|
+
- Update BaseNode’s internal caching fields (`lastPropsRef` and `lastSignature`) to be public and consistently used for stable key generation.
|
|
42
|
+
- Modify MeoNodeUnmounter component to accept BaseNode instance and clear its `lastPropsRef` and `lastSignature` on unmount to prevent memory leaks.
|
|
43
|
+
- Refine type annotations across node utilities and factory functions for stronger type safety (`Record<string, unknown>` instead of `any`).
|
|
44
|
+
- Optimize critical prop extraction logic by replacing Set and startsWith checks with faster inline charCode comparisons.
|
|
45
|
+
- Clean up and clarify utility methods related to prop signature creation, shallow equality, and portal management.
|
|
46
|
+
- Improve node.util.ts by adjusting caching strategies, prop categorization, and React element handling for better robustness and maintainability.
|
|
47
|
+
|
|
48
|
+
### Fixes
|
|
49
|
+
- **navigation-cache-manager**: add proper typing and global window declaration for cleanup flag ([`6180d40`](https://github.com/l7aromeo/meonode-ui/commit/6180d40))
|
|
50
|
+
|
|
51
|
+
### Refactor
|
|
52
|
+
- improve typings and type safety in theme util and styled renderer ([`dbe1f33`](https://github.com/l7aromeo/meonode-ui/commit/dbe1f33))
|
|
53
|
+
- Added explicit TypeScript types (e.g., CssProp, Record<string, unknown>) for variables and function signatures in `styled-renderer.client.ts` and `theme.util.ts`.
|
|
54
|
+
- Updated cache maps to use more precise generic types for better type inference and safety.
|
|
55
|
+
- Enhanced `resolveObjWithTheme` and related theme resolution logic with stronger typing and nullish coalescing.
|
|
56
|
+
- Improved error handling for invalid theme path values.
|
|
57
|
+
- Applied copy-on-write pattern with properly typed arrays and objects during theme resolution.
|
|
58
|
+
- Strengthened type guards, e.g., `isPlainObject` type predicate.
|
|
59
|
+
- Minor fixes to variable declarations with explicit types for clarity and consistency.
|
|
60
|
+
|
|
61
|
+
### Chore
|
|
62
|
+
- **babel**: update preset-env targets and expand plugin exclusions ([`f38cd24`](https://github.com/l7aromeo/meonode-ui/commit/f38cd24))
|
|
63
|
+
- Set preset-env targets to support ES modules
|
|
64
|
+
- Enable bugfixes option
|
|
65
|
+
- Add multiple plugins to exclude list for better optimization
|
|
66
|
+
- Clean up formatting of root, alias, extensions, and exclude fields
|
|
67
|
+
|
|
68
|
+
### Test
|
|
69
|
+
- **performance**: add comprehensive performance tests and metrics reporting ([`c3d7a81`](https://github.com/l7aromeo/meonode-ui/commit/c3d7a81))
|
|
70
|
+
- Add detailed performance tests measuring render times for realistic layouts, 10,000 flat nodes, and 10,000 deeply nested nodes.
|
|
71
|
+
- Introduce a heavy state changes test to detect memory leaks and ensure responsiveness under frequent updates.
|
|
72
|
+
- Collect and log performance metrics including median render times and memory usage for analysis.
|
|
73
|
+
- Add tests for stableKey generation performance with identical, shallowly equal, unique, large, and complex CSS props.
|
|
74
|
+
- Enhance test suite with CSS styling for better visualization and interaction during tests.
|
|
75
|
+
- Improve cleanup and reporting to avoid resource leaks and provide clearer performance insights.
|
|
76
|
+
|
|
5
77
|
## [0.4.7] - 2025-11-17
|
|
6
78
|
|
|
7
79
|
### Fixes
|
|
@@ -771,4 +843,4 @@ All notable changes to this project will be documented in this file.
|
|
|
771
843
|
- This changelog covers the most recent development history available
|
|
772
844
|
- The project focuses on building React UIs with type-safe fluency without JSX syntax
|
|
773
845
|
- Recent development has emphasized Emotion integration, type safety improvements, and enhanced flexbox support
|
|
774
|
-
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
|
846
|
+
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { NodeInstance } from './types/node.type.js';
|
|
1
|
+
import type { NodeElementType, NodeInstance } from './types/node.type.js';
|
|
2
2
|
/**
|
|
3
3
|
* Renders a Meonode instance into a DOM container.
|
|
4
4
|
* @param node The Meonode instance to render (e.g., created with Div(), P(), etc.).
|
|
5
5
|
* @param container The DOM element to mount the content into.
|
|
6
6
|
* @returns The React root instance.
|
|
7
7
|
*/
|
|
8
|
-
export declare function render(node: NodeInstance<
|
|
8
|
+
export declare function render<E extends NodeElementType>(node: NodeInstance<E>, container: Element): import("react-dom/client").Root;
|
|
9
9
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG5E;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,mCAI1F"}
|
package/dist/client.js
CHANGED
|
@@ -3,4 +3,4 @@ import{createRoot}from"react-dom/client";/**
|
|
|
3
3
|
* @param node The Meonode instance to render (e.g., created with Div(), P(), etc.).
|
|
4
4
|
* @param container The DOM element to mount the content into.
|
|
5
5
|
* @returns The React root instance.
|
|
6
|
-
*/export function render(a,b){
|
|
6
|
+
*/export function render(a,b){const c=createRoot(b);return c.render(a.render()),c}
|