@meonode/ui 0.4.6 → 0.4.8
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 +57 -0
- 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/constants/common.const.js +1 -1
- package/dist/constants/css-properties.const.js +1 -1
- package/dist/core.node.d.ts +10 -10
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +39 -37
- 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/nextjs-registry/index.d.ts +1 -1
- package/dist/nextjs-registry/index.js +1 -1
- package/dist/types/node.type.d.ts +5 -0
- 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 +22 -26
- package/dist/util/node.util.d.ts.map +1 -1
- package/dist/util/node.util.js +75 -69
- 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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.4.8] - 2025-11-18
|
|
6
|
+
|
|
7
|
+
### Feat
|
|
8
|
+
- **client**: add generic type parameter to render function for stronger type safety ([`90a770e`](https://github.com/l7aromeo/meonode-ui/commit/90a770e))
|
|
9
|
+
- **core**: improve BaseNode rendering with iterative traversal and memory optimizations ([`1d5330a`](https://github.com/l7aromeo/meonode-ui/commit/1d5330a))
|
|
10
|
+
- Introduce WorkItem interface to represent nodes in the iterative work stack during BaseNode rendering.
|
|
11
|
+
- Replace recursive render traversal with an iterative depth-first approach using a preallocated workStack array for better performance and reduced call stack usage.
|
|
12
|
+
- Implement dynamic resizing of workStack array to handle arbitrary tree sizes efficiently.
|
|
13
|
+
- Update BaseNode’s internal caching fields (`lastPropsRef` and `lastSignature`) to be public and consistently used for stable key generation.
|
|
14
|
+
- Modify MeoNodeUnmounter component to accept BaseNode instance and clear its `lastPropsRef` and `lastSignature` on unmount to prevent memory leaks.
|
|
15
|
+
- Refine type annotations across node utilities and factory functions for stronger type safety (`Record<string, unknown>` instead of `any`).
|
|
16
|
+
- Optimize critical prop extraction logic by replacing Set and startsWith checks with faster inline charCode comparisons.
|
|
17
|
+
- Clean up and clarify utility methods related to prop signature creation, shallow equality, and portal management.
|
|
18
|
+
- Improve node.util.ts by adjusting caching strategies, prop categorization, and React element handling for better robustness and maintainability.
|
|
19
|
+
|
|
20
|
+
### Fixes
|
|
21
|
+
- **navigation-cache-manager**: add proper typing and global window declaration for cleanup flag ([`6180d40`](https://github.com/l7aromeo/meonode-ui/commit/6180d40))
|
|
22
|
+
|
|
23
|
+
### Refactor
|
|
24
|
+
- improve typings and type safety in theme util and styled renderer ([`dbe1f33`](https://github.com/l7aromeo/meonode-ui/commit/dbe1f33))
|
|
25
|
+
- Added explicit TypeScript types (e.g., CssProp, Record<string, unknown>) for variables and function signatures in `styled-renderer.client.ts` and `theme.util.ts`.
|
|
26
|
+
- Updated cache maps to use more precise generic types for better type inference and safety.
|
|
27
|
+
- Enhanced `resolveObjWithTheme` and related theme resolution logic with stronger typing and nullish coalescing.
|
|
28
|
+
- Improved error handling for invalid theme path values.
|
|
29
|
+
- Applied copy-on-write pattern with properly typed arrays and objects during theme resolution.
|
|
30
|
+
- Strengthened type guards, e.g., `isPlainObject` type predicate.
|
|
31
|
+
- Minor fixes to variable declarations with explicit types for clarity and consistency.
|
|
32
|
+
|
|
33
|
+
### Chore
|
|
34
|
+
- **babel**: update preset-env targets and expand plugin exclusions ([`f38cd24`](https://github.com/l7aromeo/meonode-ui/commit/f38cd24))
|
|
35
|
+
- Set preset-env targets to support ES modules
|
|
36
|
+
- Enable bugfixes option
|
|
37
|
+
- Add multiple plugins to exclude list for better optimization
|
|
38
|
+
- Clean up formatting of root, alias, extensions, and exclude fields
|
|
39
|
+
|
|
40
|
+
### Test
|
|
41
|
+
- **performance**: add comprehensive performance tests and metrics reporting ([`c3d7a81`](https://github.com/l7aromeo/meonode-ui/commit/c3d7a81))
|
|
42
|
+
- Add detailed performance tests measuring render times for realistic layouts, 10,000 flat nodes, and 10,000 deeply nested nodes.
|
|
43
|
+
- Introduce a heavy state changes test to detect memory leaks and ensure responsiveness under frequent updates.
|
|
44
|
+
- Collect and log performance metrics including median render times and memory usage for analysis.
|
|
45
|
+
- Add tests for stableKey generation performance with identical, shallowly equal, unique, large, and complex CSS props.
|
|
46
|
+
- Enhance test suite with CSS styling for better visualization and interaction during tests.
|
|
47
|
+
- Improve cleanup and reporting to avoid resource leaks and provide clearer performance insights.
|
|
48
|
+
|
|
49
|
+
## [0.4.7] - 2025-11-17
|
|
50
|
+
|
|
51
|
+
### Fixes
|
|
52
|
+
- **core/cache:** optimize navigation cache debounce timing and enhance stableKey handling ([`fff6f207`](https://github.com/l7aromeo/meonode-ui/commit/fff6f2070a06cc5ad461a2f992b111fb957fae6f))
|
|
53
|
+
- Adjust navigation cleanup debounce duration dynamically based on cache size for better performance.
|
|
54
|
+
- Change stableKey and _lastSignature to be optional to better represent their possible undefined state.
|
|
55
|
+
- Refactor _getStableKey to return undefined on server instead of empty string.
|
|
56
|
+
- Optimize critical props extraction by introducing NodeUtil.extractCriticalProps helper.
|
|
57
|
+
- Improve client-side caching logic to avoid lookups when stableKey is absent.
|
|
58
|
+
- Remove unused imports and redundant code in node.util.ts; improve shallowEqual implementation.
|
|
59
|
+
- Update createPropSignature to return undefined on server and use getElementTypeName directly.
|
|
60
|
+
- Add detailed comments and refine hashString combining FNV-1a and djb2 hashes for robustness.
|
|
61
|
+
|
|
5
62
|
## [0.4.6] - 2025-11-17
|
|
6
63
|
|
|
7
64
|
### Fixes
|
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}
|