@meonode/ui 0.4.8 → 0.4.10
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/components/meonode-unmounter.client.d.ts.map +1 -1
- package/dist/components/meonode-unmounter.client.js +1 -1
- package/dist/constant/common.const.d.ts.map +1 -0
- package/dist/constant/css-properties.const.d.ts.map +1 -0
- package/dist/core.node.d.ts +4 -1
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +34 -26
- package/dist/helper/common.helper.js +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -1
- package/dist/types/node.type.d.ts +1 -1
- package/dist/types/node.type.d.ts.map +1 -1
- package/dist/util/mount-tracker.util.js +1 -1
- package/dist/util/navigation-cache-manager.util.js +1 -1
- package/dist/util/node.util.d.ts +8 -5
- package/dist/util/node.util.d.ts.map +1 -1
- package/dist/util/node.util.js +28 -38
- package/package.json +11 -8
- package/dist/constants/common.const.d.ts.map +0 -1
- package/dist/constants/css-properties.const.d.ts.map +0 -1
- /package/dist/{constants → constant}/common.const.d.ts +0 -0
- /package/dist/{constants → constant}/common.const.js +0 -0
- /package/dist/{constants → constant}/css-properties.const.d.ts +0 -0
- /package/dist/{constants → constant}/css-properties.const.js +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.10
|
|
6
|
+
|
|
7
|
+
### Fix
|
|
8
|
+
- **unmounter**: prevent redundant FinalizationRegistry callbacks ([`59f5adf`](https://github.com/l7aromeo/meonode-ui/commit/59f5adf2f553aa49a88d1b44366b004d829ca107))
|
|
9
|
+
- Explicitly unregister node from cacheCleanupRegistry on unmount
|
|
10
|
+
- Prevents double cleanup when node is both unmounted and GC'd
|
|
11
|
+
- Improves cleanup efficiency and reduces unnecessary registry callbacks
|
|
12
|
+
|
|
13
|
+
### Perf
|
|
14
|
+
- **util**: optimize prop processing and child handling ([`be26488`](https://github.com/l7aromeo/meonode-ui/commit/be26488e304629dd13851dfcaa7fedf43ad8b5c3))
|
|
15
|
+
- Conditional sort: only sort keys if length > 1 (eliminates unnecessary sorts)
|
|
16
|
+
- Replace for...in with Object.keys() iteration for better performance and safety
|
|
17
|
+
- Add fast path for single child processing (non-array or 1-element array)
|
|
18
|
+
- Avoid unnecessary array operations for common single-child case
|
|
19
|
+
- Performance impact:
|
|
20
|
+
- Reduced CPU overhead for small prop objects
|
|
21
|
+
- Faster iteration with Object.keys() vs for...in
|
|
22
|
+
- Eliminates array map() call for single child components
|
|
23
|
+
|
|
24
|
+
- **core**: add exception safety and optimize render method ([`5aad000`](https://github.com/l7aromeo/meonode-ui/commit/5aad000335ff29f078a9d40192d5a70fe9b61d12))
|
|
25
|
+
- Wrap render logic in try-finally to ensure renderContext is always released
|
|
26
|
+
- Null out workStack slots before releasing to help GC
|
|
27
|
+
- Pre-allocate finalChildren array to avoid resizing during iteration
|
|
28
|
+
- Replace non-null assertion with explicit error handling for better debugging
|
|
29
|
+
- Add object pooling for workStack and renderedElements (reduces GC pressure)
|
|
30
|
+
- Pool capped at 50 contexts with 2048-item limit to prevent memory issues
|
|
31
|
+
- Exception safety ensures cleanup even if rendering throws
|
|
32
|
+
|
|
33
|
+
### Test
|
|
34
|
+
- **perf**: add React comparison tests with memory tracking ([`bc66d54`](https://github.com/l7aromeo/meonode-ui/commit/bc66d540c4ffa4ad083322dbdbc201f652ea5314))
|
|
35
|
+
- Add comprehensive performance comparison between React.createElement and MeoNode
|
|
36
|
+
- Test both flat (10k nodes) and nested (5k nodes) structures
|
|
37
|
+
- Include memory usage measurements (initial + after 100 updates)
|
|
38
|
+
- Reduce nested nodes from 10k to 5k to prevent stack overflow with StyledRenderer
|
|
39
|
+
- Add table output with time and memory columns for clear comparison
|
|
40
|
+
- Add GC availability warning for accurate measurements
|
|
41
|
+
- Provides detailed performance and memory behavior insights during re-renders
|
|
42
|
+
- Avoids stack overflow in deeply nested test scenarios
|
|
43
|
+
|
|
44
|
+
- **performance**: enhance performance metrics report formatting and adjust thresholds ([`6f3abe4`](https://github.com/l7aromeo/meonode-ui/commit/6f3abe4442938aa6cd414341fdf2aba25a9ece58))
|
|
45
|
+
- Improve table formatting for performance metrics
|
|
46
|
+
- Adjust test thresholds based on optimization results
|
|
47
|
+
- Enhanced reporting for better visibility into performance characteristics
|
|
48
|
+
|
|
49
|
+
## [0.4.9] - 2025-11-19
|
|
50
|
+
|
|
51
|
+
### Feat
|
|
52
|
+
- **build**: add support for @tests alias and include tests folder in build and test configs ([`4dfd165`](https://github.com/l7aromeo/meonode-ui/commit/4dfd165fa52f93fe63ac7338344b91dfa5622c4b))
|
|
53
|
+
|
|
54
|
+
### Perf
|
|
55
|
+
- **core**: optimize rendering, caching, and memory management ([`4f599be`](https://github.com/l7aromeo/meonode-ui/commit/4f599be44458fef208a30849545606b060c4ec6b))
|
|
56
|
+
- 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.
|
|
57
|
+
- Optimizes stable key generation by removing expensive shallow equality checks in favor of strict reference equality, significantly speeding up prop processing for cached components.
|
|
58
|
+
- 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.
|
|
59
|
+
- Introduces CSS object hashing to accelerate prop signature generation, avoiding costly serialization of large style objects.
|
|
60
|
+
- Fixes several memory leaks by ensuring proper cleanup of node properties (lastSignature, lastPropsObj) and unregistering nodes from the cache cleanup registry upon eviction.
|
|
61
|
+
- Decouples element cache deletion from mount tracking to prevent race conditions and ensure reliable cleanup during component unmounting.
|
|
62
|
+
|
|
63
|
+
### Refactor
|
|
64
|
+
- **build**: rename constants directory from constants to constant and update imports accordingly ([`9531947`](https://github.com/l7aromeo/meonode-ui/commit/9531947af9b304c11c0865e8deafa1a633220753))
|
|
65
|
+
|
|
66
|
+
### Test
|
|
67
|
+
- **perf**: overhaul performance test suite ([`e3bd6ac`](https://github.com/l7aromeo/meonode-ui/commit/e3bd6ac6ceca474f935da644ff0c23b2f1de7692))
|
|
68
|
+
- Introduces a new, structured performance reporting system using cli-table3 for clear, grouped metrics.
|
|
69
|
+
- Refactors the entire performance test suite into logical groups: Layout Rendering, Memory Management, and Prop Processing.
|
|
70
|
+
- Adds comprehensive memory leak detection tests for heavy state changes and repeated mount/unmount cycles, using forced garbage collection for more accurate heap analysis.
|
|
71
|
+
- Extracts the large, complex CSS object into a dedicated test constant for better separation of concerns.
|
|
72
|
+
- Updates memoization tests to align with the new, weighted LRU cache eviction scoring.
|
|
73
|
+
|
|
74
|
+
### Chore
|
|
75
|
+
- **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))
|
|
76
|
+
|
|
5
77
|
## [0.4.8] - 2025-11-18
|
|
6
78
|
|
|
7
79
|
### Feat
|
|
@@ -815,4 +887,4 @@ All notable changes to this project will be documented in this file.
|
|
|
815
887
|
- This changelog covers the most recent development history available
|
|
816
888
|
- The project focuses on building React UIs with type-safe fluency without JSX syntax
|
|
817
889
|
- Recent development has emphasized Emotion integration, type safety improvements, and enhanced flexbox support
|
|
818
|
-
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
|
890
|
+
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meonode-unmounter.client.d.ts","sourceRoot":"","sources":["../../src/components/meonode-unmounter.client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"meonode-unmounter.client.d.ts","sourceRoot":"","sources":["../../src/components/meonode-unmounter.client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAsBpH"}
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* @param {NodeInstance} props.node The BaseNode instance associated with this component.
|
|
13
13
|
* @param {ReactNode} [props.children] The children to be rendered by this component.
|
|
14
14
|
* @returns {ReactNode} The `children` passed to the component.
|
|
15
|
-
*/export default function MeoNodeUnmounter({node:a,children:b}){const c=useEffectEvent(()=>{a.stableKey&&
|
|
15
|
+
*/export default function MeoNodeUnmounter({node:a,children:b}){const c=useEffectEvent(()=>{a.stableKey&&(BaseNode.elementCache.delete(a.stableKey),MountTrackerUtil.mountedNodes.has(a.stableKey)&&MountTrackerUtil.untrackMount(a.stableKey),BaseNode.cacheCleanupRegistry.unregister(a)),a.lastSignature=void 0});return useEffect(()=>()=>c(),[]),b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.const.d.ts","sourceRoot":"","sources":["../../src/constant/common.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,uOAwBhB,CAAA;AAEV,eAAO,MAAM,cAAc,uPAAyB,CAAA;AACpD,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA;AAEhD,eAAO,IAAI,SAAS,SAAQ,CAAA;AAE5B,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,QAK5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-properties.const.d.ts","sourceRoot":"","sources":["../../src/constant/css-properties.const.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,k0ZAirBT,CAAA;AAEV,eAAe,aAAa,CAAA"}
|
package/dist/core.node.d.ts
CHANGED
|
@@ -16,12 +16,15 @@ export declare class BaseNode<E extends NodeElementType = NodeElementType> {
|
|
|
16
16
|
private _props?;
|
|
17
17
|
private readonly _deps?;
|
|
18
18
|
stableKey?: string;
|
|
19
|
-
|
|
19
|
+
lastPropsObj?: Record<string, unknown>;
|
|
20
20
|
lastSignature?: string;
|
|
21
21
|
static elementCache: Map<string, ElementCacheEntry>;
|
|
22
22
|
static propProcessingCache: Map<string, PropProcessingCache>;
|
|
23
23
|
static scheduledCleanup: boolean;
|
|
24
24
|
private static _navigationStarted;
|
|
25
|
+
private static renderContextPool;
|
|
26
|
+
private static acquireRenderContext;
|
|
27
|
+
private static releaseRenderContext;
|
|
25
28
|
constructor(element: E, rawProps?: Partial<NodeProps<E>>, deps?: DependencyList);
|
|
26
29
|
/**
|
|
27
30
|
* Lazily processes and retrieves the final, normalized props for the node.
|
package/dist/core.node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEX,eAAe,EACf,YAAY,EACZ,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,OAAO,EA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,KAClB,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,GACtC,CAAC,CAAC,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,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,12 +1,12 @@
|
|
|
1
|
-
const _excluded=["ref","children"],_excluded2=["key"],_excluded3=["children","key","css","nativeProps","disableEmotion"];var _BaseNode;function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import{createElement,Fragment,isValidElement}from"react";import{isFragment,isValidElementType}from"./helper/react-is.helper.js";import{getComponentType,getElementTypeName,hasNoStyleTag}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";import{__DEBUG__}from"./
|
|
1
|
+
const _excluded=["ref","children"],_excluded2=["key"],_excluded3=["children","key","css","nativeProps","disableEmotion"];var _BaseNode;function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import{createElement,Fragment,isValidElement}from"react";import{isFragment,isValidElementType}from"./helper/react-is.helper.js";import{getComponentType,getElementTypeName,hasNoStyleTag}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";import{__DEBUG__}from"./constant/common.const.js";import{MountTrackerUtil}from"./util/mount-tracker.util.js";import MeoNodeUnmounter from"./components/meonode-unmounter.client.js";import{NavigationCacheManagerUtil}from"./util/navigation-cache-manager.util.js";import{NodeUtil}from"./util/node.util.js";import{ThemeUtil}from"./util/theme.util.js";/**
|
|
2
2
|
* The core abstraction of the MeoNode library. It wraps a React element or component,
|
|
3
3
|
* providing a unified interface for processing props, normalizing children, and handling styles.
|
|
4
4
|
* This class is central to the library's ability to offer a JSX-free, fluent API for building UIs.
|
|
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,b={},c){// Element type validation is performed once at construction to prevent invalid nodes from being created.
|
|
9
|
-
if(_defineProperty(this,"instanceId",Math.random().toString(36).slice(2)+Date.now().toString(36)),_defineProperty(this,"rawProps",{}),_defineProperty(this,"isBaseNode",!0)
|
|
8
|
+
*/export class BaseNode{static acquireRenderContext(){const a=BaseNode.renderContextPool;return 0<a.length?a.pop():{workStack:Array(512),renderedElements:new Map}}static releaseRenderContext(a){50>BaseNode.renderContextPool.length&&2048>a.workStack.length&&(a.workStack.length=0,a.renderedElements.clear(),BaseNode.renderContextPool.push(a))}constructor(a,b={},c){// Element type validation is performed once at construction to prevent invalid nodes from being created.
|
|
9
|
+
if(_defineProperty(this,"instanceId",Math.random().toString(36).slice(2)+Date.now().toString(36)),_defineProperty(this,"rawProps",{}),_defineProperty(this,"isBaseNode",!0),!isValidElementType(a)){const b=getComponentType(a);throw new Error(`Invalid element type: ${b} provided!`)}this.element=a,this.rawProps=b,this._deps=c;// Extract commonly handled props; the remaining `propsForSignature` are used to compute a stable hash.
|
|
10
10
|
const{ref:d,children:e}=b,f=_objectWithoutProperties(b,_excluded);// Generate or get cached stable key
|
|
11
11
|
this.stableKey=this._getStableKey(f),NodeUtil.isServer||BaseNode._navigationStarted||(NavigationCacheManagerUtil.getInstance().start(),BaseNode._navigationStarted=!0)}/**
|
|
12
12
|
* Lazily processes and retrieves the final, normalized props for the node.
|
|
@@ -30,7 +30,7 @@ this.stableKey=this._getStableKey(f),NodeUtil.isServer||BaseNode._navigationStar
|
|
|
30
30
|
* @param key Key passed for prefix if exist
|
|
31
31
|
* @param props The props object to create a signature for.
|
|
32
32
|
* @returns A compact string signature suitable for use as a cache key.
|
|
33
|
-
*/_getStableKey(a){let{key:b}=a,c=_objectWithoutProperties(a,_excluded2);if(NodeUtil.isServer)return;if(
|
|
33
|
+
*/_getStableKey(a){let{key:b}=a,c=_objectWithoutProperties(a,_excluded2);if(NodeUtil.isServer)return;if(this.lastPropsObj===c)return this.lastSignature;this.lastPropsObj=c;const d=Object.keys(c),e=d.length;if(100<e){const a=NodeUtil.extractCriticalProps(c,d);this.lastSignature=NodeUtil.createPropSignature(this.element,a),__DEBUG__&&200<e&&console.warn(`MeoNode: Large props (${e} keys) on "${getElementTypeName(this.element)}". Consider splitting.`)}else this.lastSignature=NodeUtil.createPropSignature(this.element,c);return b!==void 0&&null!==b?`${b+""}:${this.lastSignature}`:this.lastSignature}/**
|
|
34
34
|
* FinalizationRegistry for cleaning up `elementCache` entries when the associated `BaseNode` instance
|
|
35
35
|
* is garbage-collected. This helps prevent memory leaks by ensuring that cache entries for
|
|
36
36
|
* unreferenced nodes are eventually removed.
|
|
@@ -38,8 +38,7 @@ this.stableKey=this._getStableKey(f),NodeUtil.isServer||BaseNode._navigationStar
|
|
|
38
38
|
* The held value must include `cacheKey` which is used to identify and delete the corresponding
|
|
39
39
|
* entry from `BaseNode.elementCache`.
|
|
40
40
|
* @public
|
|
41
|
-
|
|
42
|
-
/**
|
|
41
|
+
*//**
|
|
43
42
|
* Renders the `BaseNode` and its entire subtree into a ReactElement, with support for opt-in reactivity
|
|
44
43
|
* via dependency arrays and inherited blocking.
|
|
45
44
|
*
|
|
@@ -56,27 +55,36 @@ this.stableKey=this._getStableKey(f),NodeUtil.isServer||BaseNode._navigationStar
|
|
|
56
55
|
const b=NodeUtil.isServer||!this.stableKey?void 0:BaseNode.elementCache.get(this.stableKey),c=NodeUtil.shouldNodeUpdate(b?.prevDeps,this._deps,a);// Decide whether this node (and its subtree) should update given dependency arrays.
|
|
57
56
|
// Fast return: if nothing should update and we have a cached element, reuse it.
|
|
58
57
|
if(!c&&b?.renderedElement)return b.accessCount+=1,b.renderedElement;// When this node doesn't need update, its children are considered "blocked" and may be skipped.
|
|
59
|
-
const d=
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
for(;
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
const d=BaseNode.acquireRenderContext();// Acquire context from pool to reduce allocation pressure
|
|
59
|
+
let{workStack:e}=d;const{renderedElements:f}=d;let g=0;try{// Fast capacity check with exponential growth
|
|
60
|
+
const a=a=>{if(a>e.length){// Double capacity or use exact requirement (whichever is larger)
|
|
61
|
+
const b=Math.max(a,e.length<<1),c=Array(b);// Manual copy is faster than Array methods for primitive/object arrays
|
|
62
|
+
for(let a=0;a<g;a++)c[a]=e[a];e=c}};// Push initial work item
|
|
63
|
+
// Iterative depth-first traversal with explicit begin/complete phases to avoid recursion.
|
|
64
|
+
for(e[g++]={node:this,isProcessed:!1,blocked:!c};0<g;){const b=e[g-1];if(!b){g--;continue}const{node:c,isProcessed:d,blocked:h}=b;if(!d){b.isProcessed=!0;const d=c.props.children;if(d){// Only consider BaseNode children for further traversal; primitives and React elements are terminal.
|
|
65
|
+
const b=(Array.isArray(d)?d:[d]).filter(NodeUtil.isNodeInstance),c=g+b.length;// --- Check capacity ONCE before loop ---
|
|
66
|
+
a(c);for(let a=b.length-1;0<=a;a--){const c=b[a],d=NodeUtil.isServer||!c.stableKey?void 0:BaseNode.elementCache.get(c.stableKey),i=NodeUtil.shouldNodeUpdate(d?.prevDeps,c._deps,h);// Respect server/client differences for child cache lookup.
|
|
66
67
|
// Determine whether the child should update given its deps and the parent's blocked state.
|
|
67
68
|
// If child doesn't need update and has cached element, reuse it immediately (no push).
|
|
68
|
-
if(!i&&
|
|
69
|
-
|
|
70
|
-
const a=
|
|
69
|
+
if(!i&&d?.renderedElement){f.set(c,d.renderedElement);continue}// Otherwise push child for processing; childBlocked inherits parent's blocked state.
|
|
70
|
+
const j=h||!i;e[g++]={node:c,isProcessed:!1,blocked:j}}}}else{g--;// Extract node props. Non-present props default to undefined via destructuring.
|
|
71
|
+
const a=c.props,{children:b,key:d,css:e,nativeProps:h,disableEmotion:i}=a,j=_objectWithoutProperties(a,_excluded3);let k=[];if(b){// Convert child placeholders into concrete React nodes:
|
|
72
|
+
// - If it's a BaseNode, lookup its rendered ReactElement from the map.
|
|
73
|
+
// - If it's already a React element, use it directly.
|
|
74
|
+
// - Otherwise treat as primitive ReactNode.
|
|
75
|
+
const a=Array.isArray(b)?b:[b],c=a.length;// Pre-allocate array to avoid resizing during iteration
|
|
76
|
+
k=Array(c);for(let b=0;b<c;b++){const c=a[b];if(NodeUtil.isNodeInstance(c)){const a=f.get(c);if(!a)throw new Error(`[MeoNode] Missing rendered element for child node: ${c.stableKey}`);k[b]=a}else k[b]=isValidElement(c)?c:c}}// Merge element props: explicit other props + DOM native props + React key.
|
|
71
77
|
const l=_objectSpread(_objectSpread({},j),{},{key:d},h);let m;// Handle fragments specially: create fragment element with key and children.
|
|
72
|
-
if(
|
|
78
|
+
if(c.element===Fragment||isFragment(c.element))m=createElement(c.element,{key:d},...k);else{// StyledRenderer for emotion-based styling unless explicitly disabled or no styles are present.
|
|
73
79
|
// StyledRenderer handles SSR hydration and emotion CSS injection when css prop exists or element has style tags.
|
|
74
|
-
const a=!i&&(
|
|
75
|
-
if(!NodeUtil.isServer&&
|
|
76
|
-
const a={prevDeps:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
+
const a=!i&&(e||!hasNoStyleTag(c.element));m=a?createElement(StyledRenderer,_objectSpread(_objectSpread({element:c.element},l),{},{css:e,suppressHydrationWarning:!0}),...k):createElement(c.element,l,...k)}// Cache the generated element on client-side to speed up future renders.
|
|
81
|
+
if(!NodeUtil.isServer&&c.stableKey){const a=BaseNode.elementCache.get(c.stableKey);if(a)a.prevDeps=c._deps,a.renderedElement=m,a.accessCount+=1;else{// Create new cache entry and register for cleanup
|
|
82
|
+
const a={prevDeps:c._deps,renderedElement:m,nodeRef:new WeakRef(c),createdAt:Date.now(),accessCount:1,instanceId:c.instanceId};// Set new cache entry
|
|
83
|
+
BaseNode.elementCache.set(c.stableKey,a),BaseNode.cacheCleanupRegistry.register(c,{cacheKey:c.stableKey,instanceId:c.instanceId},c)}}// Store the rendered element so parent nodes can reference it.
|
|
84
|
+
f.set(c,m)}}// Get the final rendered element for the root node of this render cycle.
|
|
85
|
+
const b=f.get(this);return!NodeUtil.isServer&&this.stableKey?createElement(MeoNodeUnmounter,{node:this},b):b}finally{// Always release context back to pool, even if an exception occurred
|
|
86
|
+
// Null out workStack slots to help GC before releasing
|
|
87
|
+
for(let a=0;a<g;a++)e[a]=null;BaseNode.releaseRenderContext({workStack:e,renderedElements:f})}}/**
|
|
80
88
|
* Renders the node into a React Portal, mounting it directly under `document.body`.
|
|
81
89
|
* Returns a handle with `update` and `unmount` methods to control the portal's lifecycle.
|
|
82
90
|
* @method toPortal
|
|
@@ -94,9 +102,9 @@ try{b?.isConnected&&f()}catch(a){__DEBUG__&&console.error("[MeoNode] Portal unmo
|
|
|
94
102
|
* the associated nodes are collected.
|
|
95
103
|
* @method clearCaches
|
|
96
104
|
*/static clearCaches(){// Collect all cache keys first
|
|
97
|
-
const a=Array.from(BaseNode.elementCache.keys());__DEBUG__&&console.log(`[MeoNode] clearCaches: Clearing ${a.length} entries`);// Call onEvict for all entries (idempotent)
|
|
105
|
+
const a=Array.from(BaseNode.elementCache.keys());__DEBUG__&&console.log(`[MeoNode] clearCaches: Clearing ${a.length} entries`);// Call onEvict for all entries (idempotent) and clear node properties
|
|
98
106
|
for(const b of a){const a=BaseNode.elementCache.get(b);if(a){// Try to unregister from FinalizationRegistry
|
|
99
|
-
const c=a.nodeRef?.deref();if(c)try{BaseNode.cacheCleanupRegistry.unregister(c)}catch(a){__DEBUG__&&console.warn(`[MeoNode] Could not unregister ${b} from FinalizationRegistry`)}}}// Clear all caches
|
|
107
|
+
const c=a.nodeRef?.deref();if(c)try{BaseNode.cacheCleanupRegistry.unregister(c),c.lastSignature=void 0,c.lastPropsObj=void 0}catch(a){__DEBUG__&&console.warn(`[MeoNode] Could not unregister ${b} from FinalizationRegistry`)}}}// Clear all caches
|
|
100
108
|
// Clear mount tracking
|
|
101
109
|
BaseNode.propProcessingCache.clear(),BaseNode.elementCache.clear(),ThemeUtil.clearThemeCache(),MountTrackerUtil.cleanup(),__DEBUG__&&console.log("[MeoNode] All caches cleared")}// --- Utilities ---
|
|
102
110
|
}// --- Factory Functions ---
|
|
@@ -104,7 +112,7 @@ BaseNode.propProcessingCache.clear(),BaseNode.elementCache.clear(),ThemeUtil.cle
|
|
|
104
112
|
* The primary factory function for creating a `BaseNode` instance.
|
|
105
113
|
* It's the simplest way to wrap a component or element.
|
|
106
114
|
* @function Node
|
|
107
|
-
*/_BaseNode=BaseNode,_defineProperty(BaseNode,"elementCache",new Map),_defineProperty(BaseNode,"propProcessingCache",new Map),_defineProperty(BaseNode,"scheduledCleanup",!1),_defineProperty(BaseNode,"_navigationStarted",!1),_defineProperty(BaseNode,"cacheCleanupRegistry",new FinalizationRegistry(a=>{const{cacheKey:b,instanceId:c}=a,d=_BaseNode.elementCache.get(b);
|
|
115
|
+
*/_BaseNode=BaseNode,_defineProperty(BaseNode,"elementCache",new Map),_defineProperty(BaseNode,"propProcessingCache",new Map),_defineProperty(BaseNode,"scheduledCleanup",!1),_defineProperty(BaseNode,"_navigationStarted",!1),_defineProperty(BaseNode,"renderContextPool",[]),_defineProperty(BaseNode,"cacheCleanupRegistry",new FinalizationRegistry(a=>{const{cacheKey:b,instanceId:c}=a,d=_BaseNode.elementCache.get(b);d?.instanceId===c&&_BaseNode.elementCache.delete(b),MountTrackerUtil.mountedNodes.has(b)&&MountTrackerUtil.untrackMount(b)})),_defineProperty(BaseNode,"portalCleanupRegistry",new FinalizationRegistry(a=>{const{domElement:b,reactRoot:c}=a;__DEBUG__&&console.log("[MeoNode] FinalizationRegistry auto-cleaning portal");// Guard: Check if already unmounted
|
|
108
116
|
try{c&&"function"==typeof c.unmount&&c.unmount()}catch(a){__DEBUG__&&console.error("[MeoNode] Portal auto-cleanup unmount error:",a)}// Guard: Check if DOM element still connected
|
|
109
117
|
try{b?.isConnected&&b.remove()}catch(a){__DEBUG__&&console.error("[MeoNode] Portal auto-cleanup DOM removal error:",a)}}));function Node(a,b={},c){return new BaseNode(a,b,c)}/**
|
|
110
118
|
* Static alias on the `Node` factory for clearing all internal caches used by `BaseNode`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isContextConsumer,isContextProvider,isElement,isForwardRef,isFragment,isLazy,isMemo,isPortal,isProfiler,isReactClassComponent,isStrictMode,isSuspense,isSuspenseList}from"./react-is.helper.js";import cssProperties from"../
|
|
1
|
+
import{isContextConsumer,isContextProvider,isElement,isForwardRef,isFragment,isLazy,isMemo,isPortal,isProfiler,isReactClassComponent,isStrictMode,isSuspense,isSuspenseList}from"./react-is.helper.js";import cssProperties from"../constant/css-properties.const.js";import{noStyleTagsSet}from"../constant/common.const.js";/**
|
|
2
2
|
* Retrieves a deeply nested value from an object using a dot-separated string path.
|
|
3
3
|
*
|
|
4
4
|
* This function traverses an object based on the provided path, which is a
|
package/dist/main.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { setDebugMode } from './
|
|
1
|
+
export { setDebugMode } from './constant/common.const.js';
|
|
2
2
|
export { Node, createNode, createChildrenFirstNode } from './core.node.js';
|
|
3
3
|
export * from './hoc/index.js';
|
|
4
4
|
export * from './types/node.type.js';
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAG5D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAG7E,cAAc,mBAAmB,CAAA;AAGjC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,mCAAmC,CAAA;AAGjD,cAAc,oBAAoB,CAAA"}
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Common
|
|
2
|
-
export{setDebugMode}from"./
|
|
2
|
+
export{setDebugMode}from"./constant/common.const.js";// Core
|
|
3
3
|
export{Node,createNode,createChildrenFirstNode}from"./core.node.js";// High Order Components
|
|
4
4
|
export*from"./hoc/index.js";// Types
|
|
5
5
|
export*from"./types/node.type.js";// Components
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type CSSProperties, type ReactNode, type JSX, type ElementType, type ComponentType, type JSXElementConstructor, type Component, type ExoticComponent, type ReactElement, type FragmentProps, type SuspenseProps, type ActivityProps } from 'react';
|
|
2
|
-
import type { NO_STYLE_TAGS } from '../
|
|
2
|
+
import type { NO_STYLE_TAGS } from '../constant/common.const.js';
|
|
3
3
|
import type { ComponentNodeProps } from '../hoc/component.hoc.js';
|
|
4
4
|
import type { CSSObject, CSSInterpolation } from '@emotion/serialize';
|
|
5
5
|
import { BaseNode } from '../core.node.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.type.d.ts","sourceRoot":"","sources":["../../src/types/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,
|
|
1
|
+
{"version":3,"file":"node.type.d.ts","sourceRoot":"","sources":["../../src/types/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,+BAA+B,CAAA;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,EAAE,QA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ACN,wCAAwC;QACxC,OAAO,EAAE,MAAM,IAAI,CAAA;KACpB,CAAA;CACF;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,eAAe,CAAA;AAEpH;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;CACpC;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAC5E,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,KAC5E,UAAU,CAAA;AAEf;;;;;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;AAEjB,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,YAAY,CAAA;IAClB,WAAW,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;CACjB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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{__DEBUG__}from"../
|
|
1
|
+
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{__DEBUG__}from"../constant/common.const.js";/**
|
|
2
2
|
* MountTrackerUtil keeps track of which BaseNode instances are currently mounted in the DOM.
|
|
3
3
|
* It provides a simple registry for mount/unmount state that other systems
|
|
4
4
|
* (like NavigationCacheManager) can query for safe cache eviction.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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{__DEBUG__}from"../
|
|
1
|
+
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{__DEBUG__}from"../constant/common.const.js";import{BaseNode}from"../core.node.js";import{MountTrackerUtil}from"./mount-tracker.util.js";/**
|
|
2
2
|
* Lightweight navigation handler that clears cache on SPA navigation.
|
|
3
3
|
*/export class NavigationCacheManagerUtil{constructor(){/**
|
|
4
4
|
* Debounced navigation handler. Clears mounted element cache and props cache.
|
package/dist/util/node.util.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class NodeUtil {
|
|
|
13
13
|
private static _functionSignatureCache;
|
|
14
14
|
private static readonly CACHE_SIZE_LIMIT = 500;
|
|
15
15
|
private static readonly CACHE_CLEANUP_BATCH = 50;
|
|
16
|
+
private static _cssCache;
|
|
16
17
|
private static readonly CRITICAL_PROPS;
|
|
17
18
|
static portalInfrastructure: WeakMap<NodeInstance, {
|
|
18
19
|
domElement: HTMLDivElement;
|
|
@@ -44,11 +45,7 @@ export declare class NodeUtil {
|
|
|
44
45
|
* @method hashString
|
|
45
46
|
*/
|
|
46
47
|
static hashString(str: string): string;
|
|
47
|
-
|
|
48
|
-
* Performs a shallow equality check between two objects.
|
|
49
|
-
* @method shallowEqual
|
|
50
|
-
*/
|
|
51
|
-
static shallowEqual(a: Record<string, unknown>, b: Record<string, unknown>): boolean;
|
|
48
|
+
private static hashCSS;
|
|
52
49
|
/**
|
|
53
50
|
* Creates a unique, stable signature from the element type and props.
|
|
54
51
|
* This signature includes the element's type to prevent collisions between different components
|
|
@@ -78,6 +75,12 @@ export declare class NodeUtil {
|
|
|
78
75
|
* @method _evictLRUEntries
|
|
79
76
|
*/
|
|
80
77
|
private static _evictLRUEntries;
|
|
78
|
+
/**
|
|
79
|
+
* Calculates an eviction score based on age and frequency of access.
|
|
80
|
+
* Higher scores mean more likelihood to be evicted.
|
|
81
|
+
* @method _calculateEvictionScore
|
|
82
|
+
*/
|
|
83
|
+
private static _calculateEvictionScore;
|
|
81
84
|
/**
|
|
82
85
|
* The main prop processing pipeline. It separates cacheable and non-cacheable props,
|
|
83
86
|
* generates a signature for caching, and assembles the final props object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.util.d.ts","sourceRoot":"","sources":["../../src/util/node.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyC,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAA;AACnH,OAAO,KAAK,EACV,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,EAEd,UAAU,
|
|
1
|
+
{"version":3,"file":"node.util.d.ts","sourceRoot":"","sources":["../../src/util/node.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyC,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAA;AACnH,OAAO,KAAK,EACV,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,EAEd,UAAU,EAEX,MAAM,yBAAyB,CAAA;AAKhC,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAExD;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB,OAAO,eAAiB;IAGxB,OAAc,QAAQ,UAAgC;IAGtD,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAgC;IAGtE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,OAAM;IAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,MAAK;IAGhD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAgC;IAKxD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAA2D;IAGjG,OAAc,oBAAoB;;;;;OAM/B;IAEH;;;;;;;;;;OAUG;IACH,OAAc,cAAc,wCAS3B;IAED;;;;;OAKG;IACH,OAAc,WAAW,yBAAgH;IAEzI;;;OAGG;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DzG;IAED;;;;OAIG;IACH,OAAc,eAAe,CAAC,CAAC,SAAS,YAAY,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,YAAY,CAAC,CAAC,CAAC,CAU5G;IAED;;;;;;;;;;;;;OAaG;IACH,OAAc,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,YAAY,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CA4DrJ;IAED;;;;;;;;;OASG;IACH,OAAc,mBAAmB,CAAC,EAChC,gBAAgB,EAChB,SAAS,EACT,cAAc,EACf,EAAE;QACD,gBAAgB,EAAE,WAAW,CAAA;QAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,cAAc,CAAC,EAAE,OAAO,CAAA;KACzB,wUA8BA;IAED;;;;OAIG;IACH,OAAc,0BAA0B,CAAC,IAAI,EAAE,YAAY,WA0C1D;IAED,OAAc,kBAAkB,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,QAgBtF;CACF"}
|
package/dist/util/node.util.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded=["ref","key","children","css","props","disableEmotion"],_excluded2=["style"];var _NodeUtil;function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{createElement,isValidElement}from"react";import{isForwardRef,isMemo,isReactClassComponent}from"../helper/react-is.helper.js";import{getCSSProps,getDOMProps,getElementTypeName,omitUndefined}from"../helper/common.helper.js";import{__DEBUG__}from"../
|
|
1
|
+
const _excluded=["ref","key","children","css","props","disableEmotion"],_excluded2=["style"];var _NodeUtil;function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{createElement,isValidElement}from"react";import{isForwardRef,isMemo,isReactClassComponent}from"../helper/react-is.helper.js";import{getCSSProps,getDOMProps,getElementTypeName,omitUndefined}from"../helper/common.helper.js";import{__DEBUG__}from"../constant/common.const.js";import{BaseNode}from"../core.node.js";import{createRoot}from"react-dom/client";/**
|
|
2
2
|
* NodeUtil provides a collection of static utility methods and properties
|
|
3
3
|
* used internally by BaseNode for various tasks such as hashing, shallow comparison,
|
|
4
4
|
* and stable element ID generation. This centralizes common helper functions,
|
|
@@ -11,15 +11,15 @@ const _excluded=["ref","key","children","css","props","disableEmotion"],_exclude
|
|
|
11
11
|
// djb2 init
|
|
12
12
|
for(let d=0;d<a.length;d++){const e=a.charCodeAt(d);// FNV-1a
|
|
13
13
|
// djb2
|
|
14
|
-
b^=e,b=Math.imul(b,16777619),c=33*c^e}return`${(b>>>0).toString(36)}_${(c>>>0).toString(36)}`}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/static shallowEqual(c,a){if(c===a)return!0;let b=0,d=0;for(const d in c){if(!(d in a)||c[d]!==a[d])return!1;b++}for(const b in a)d++;return b===d}/**
|
|
14
|
+
b^=e,b=Math.imul(b,16777619),c=33*c^e}return`${(b>>>0).toString(36)}_${(c>>>0).toString(36)}`}static hashCSS(a){var b=Math.min;const c=this._cssCache.get(a);if(c)return c;// Fast structural hash without full serialization
|
|
15
|
+
const d=Object.keys(a);let e=d.length;for(let c=0;c<b(d.length,10);c++){// Sample first 10
|
|
16
|
+
const b=d[c],f=a[b],g=b.charCodeAt(0);e=(e<<5)-e+g,e&=e,"string"==typeof f&&(e=(e<<5)-e+f.length)}const f=e.toString(36);return this._cssCache.set(a,f),f}/**
|
|
18
17
|
* Creates a unique, stable signature from the element type and props.
|
|
19
18
|
* This signature includes the element's type to prevent collisions between different components
|
|
20
19
|
* and handles primitive values in arrays and objects for better caching.
|
|
21
20
|
* @method createPropSignature
|
|
22
|
-
*/static createPropSignature(a,b){if(NodeUtil.isServer)return;const c=getElementTypeName(a),d=Object.keys(b)
|
|
21
|
+
*/static createPropSignature(a,b){if(NodeUtil.isServer)return;const c=getElementTypeName(a),d=Object.keys(b);// Optimization: Only sort if there's more than one key to ensure stability
|
|
22
|
+
1<d.length&&d.sort();const e=[`${c}:`];if("function"==typeof a){let b=NodeUtil._functionSignatureCache.get(a);b||(b=NodeUtil.hashString(a.toString()),NodeUtil._functionSignatureCache.set(a,b)),e.push(b)}for(const c of d){const a=b[c];let d;const f=typeof a;if("string"==f||"number"===f||"boolean"===f)d=`${c}:${a};`;else if(null===a)d=`${c}:null;`;else if(a===void 0)d=`${c}:undefined;`;else if("css"===c&&"object"==typeof a)d=`css:${this.hashCSS(a)};`;else if(Array.isArray(a)){// Hash primitive values in arrays for better cache hits
|
|
23
23
|
const b=a.filter(a=>{const b=typeof a;return"string"==b||"number"===b||"boolean"===b||null===a});d=b.length===a.length?`${c}:[${b.join(",")}];`:`${c}:[${a.length}];`}else if(a&&a.isBaseNode)d=`${c}:${a.stableKey};`;else{// Include sorted keys for object structure signature
|
|
24
24
|
const b=Object.keys(a).sort();d=`${c}:{${b.join(",")}};`}e.push(d)}return NodeUtil.hashString(e.join(","))}/**
|
|
25
25
|
* Extracts "critical" props from a given set of props. Critical props are those
|
|
@@ -41,31 +41,38 @@ if(100===f&&97===e.charCodeAt(1)&&116===e.charCodeAt(2)&&97===e.charCodeAt(3)){c
|
|
|
41
41
|
* Implements an LRU eviction strategy that removes multiple entries at once.
|
|
42
42
|
* It uses a scoring system where older and less frequently used entries have a higher eviction priority.
|
|
43
43
|
* @method _evictLRUEntries
|
|
44
|
-
*/static _evictLRUEntries(){const a=Date.now(),b=
|
|
45
|
-
for(const[c,d]of BaseNode.propProcessingCache.entries()){const e=
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
*/static _evictLRUEntries(){const a=Date.now(),b=new MinHeap((c,a)=>a.score-c.score);// Create max-heap (using min-heap with inverted comparison) to get highest scores first
|
|
45
|
+
for(const[c,d]of BaseNode.propProcessingCache.entries()){const e=this._calculateEvictionScore(d,a);b.push({key:c,score:e})}// O(log n) eviction of top N entries
|
|
46
|
+
for(let a=0;a<NodeUtil.CACHE_CLEANUP_BATCH;a++){const a=b.pop();if(a)BaseNode.propProcessingCache.delete(a.key);else// No more items to evict
|
|
47
|
+
break}}/**
|
|
48
|
+
* Calculates an eviction score based on age and frequency of access.
|
|
49
|
+
* Higher scores mean more likelihood to be evicted.
|
|
50
|
+
* @method _calculateEvictionScore
|
|
51
|
+
*/static _calculateEvictionScore(a,b){const c=b-a.lastAccess,d=a.hitCount;// Weighted scoring: recency 30%, frequency 70% - favors frequently accessed items
|
|
52
|
+
return .3*(c/1e3)+.7*(1e3/(d+1))}/**
|
|
50
53
|
* The main prop processing pipeline. It separates cacheable and non-cacheable props,
|
|
51
54
|
* generates a signature for caching, and assembles the final props object.
|
|
52
55
|
* @method processProps
|
|
53
56
|
*/static processProps(a,b={},c){const{ref:d,key:e,children:f,css:g,props:i={},disableEmotion:h}=b,j=_objectWithoutProperties(b,_excluded);// --- Fast Path Optimization ---
|
|
54
57
|
if(0===Object.keys(j).length&&!g)return omitUndefined({ref:d,key:e,disableEmotion:h,nativeProps:omitUndefined(i),children:NodeUtil._processChildren(f,h)});// --- Hybrid Caching Strategy ---
|
|
55
|
-
const k={},l={};// 1. Categorize props into cacheable (primitives) and non-cacheable (objects/functions).
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
const k={},l={},m=Object.keys(j);// 1. Categorize props into cacheable (primitives) and non-cacheable (objects/functions).
|
|
59
|
+
// Optimization: Use Object.keys loop instead of for..in for better performance and safety
|
|
60
|
+
for(let d=0;d<m.length;d++){const a=m[d],b=j[a],c=typeof b;"string"===c||"number"===c||"boolean"===c?k[a]=b:l[a]=b}// 2. Pass element type to signature generation
|
|
61
|
+
const n=NodeUtil.createPropSignature(a,k),{cssProps:o}=NodeUtil.getCachedCssProps(k,n),p=getCSSProps(l),q=getDOMProps(j),r=_objectSpread(_objectSpread(_objectSpread({},o),p),g),s=NodeUtil._processChildren(f,h,c);// 3. Process non-cacheable props on every render to ensure correctness for functions and objects.
|
|
58
62
|
// DOM props are always processed fresh.
|
|
59
63
|
// 4. Assemble the final CSS object.
|
|
60
64
|
// --- Child Normalization ---
|
|
61
65
|
// --- Final Assembly ---
|
|
62
|
-
return omitUndefined(_objectSpread(_objectSpread({ref:d,key:e,css:
|
|
66
|
+
return omitUndefined(_objectSpread(_objectSpread({ref:d,key:e,css:r},q),{},{disableEmotion:h,nativeProps:omitUndefined(i),children:s}))}/**
|
|
63
67
|
* Processes and normalizes children of the node.
|
|
64
68
|
* Converts raw children (React elements, primitives, or other BaseNodes) into a consistent format.
|
|
65
69
|
* @param children The raw children to process.
|
|
66
70
|
* @param disableEmotion If true, emotion styling will be disabled for these children.
|
|
67
71
|
* @param parentStableKey The stable key of the parent node, used for generating unique keys for children.
|
|
68
|
-
*/static _processChildren(a,b,c){return a?"function"==typeof a?a:Array.isArray(a)?a.map((a,d)=>NodeUtil.processRawNode(a,b,`${c}_${d}`)):NodeUtil.processRawNode(a,b,c):void 0
|
|
72
|
+
*/static _processChildren(a,b,c){return a?"function"==typeof a?a:Array.isArray(a)?1===a.length?NodeUtil.processRawNode(a[0],b,`${c}_0`):a.map((a,d)=>NodeUtil.processRawNode(a,b,`${c}_${d}`)):NodeUtil.processRawNode(a,b,c):void 0;// Fast path for non-array (single child)
|
|
73
|
+
// Fast path for single element array
|
|
74
|
+
// General case: multiple children
|
|
75
|
+
}/**
|
|
69
76
|
* Determines if a node should update based on its dependency array.
|
|
70
77
|
* Uses a shallow comparison, similar to React's `useMemo` and `useCallback`.
|
|
71
78
|
* @method shouldNodeUpdate
|
|
@@ -156,24 +163,7 @@ return isReactClassComponent(a)?new BaseNode(a,_objectSpread(_objectSpread({},d)
|
|
|
156
163
|
if(b?.domElement?.isConnected&&b?.reactRoot)return!0;// Clean up stale or disconnected infrastructure
|
|
157
164
|
if(b&&(!b.domElement?.isConnected||!b.reactRoot)){try{b.reactRoot?.unmount?.()}catch(a){__DEBUG__&&console.error("MeoNode: Error unmounting stale portal root.",a)}NodeUtil.cleanupPortalInfra(b),NodeUtil.portalInfrastructure.delete(a),b=void 0}// Create new infrastructure
|
|
158
165
|
const c=document.createElement("div");document.body.appendChild(c);const d=createRoot(c),e={render:d.render.bind(d),unmount:d.unmount.bind(d),update:()=>{}// Placeholder, will be overridden
|
|
159
|
-
};return b={domElement:c,reactRoot:e},NodeUtil.portalInfrastructure.set(a,b),BaseNode.portalCleanupRegistry.register(a,{domElement:c,reactRoot:e},a),!0}static cleanupPortalInfra(a){try{a.reactRoot?.unmount&&a.reactRoot.unmount()}catch(a){__DEBUG__&&console.error("Portal cleanup error:",a)}try{a.domElement?.isConnected&&a.domElement.remove()}catch(a){__DEBUG__&&console.error("DOM removal error:",a)}}}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// Portal infrastructure using WeakMap for memory-safe management
|
|
164
|
-
/**
|
|
165
|
-
* Type guard to check if an object is a NodeInstance.
|
|
166
|
-
*
|
|
167
|
-
* A NodeInstance is expected to be a non-null object with:
|
|
168
|
-
* - an 'element' property,
|
|
169
|
-
* - a 'render' method,
|
|
170
|
-
* - a 'toPortal' method,
|
|
171
|
-
* - and an 'isBaseNode' property.
|
|
172
|
-
* @param obj The object to check.
|
|
173
|
-
* @returns True if the object is a NodeInstance, false otherwise.
|
|
174
|
-
*//**
|
|
175
|
-
* Determines if a given string `k` is a valid CSS style property.
|
|
176
|
-
* This check is performed only on the client-side by checking if the property exists in `document.body.style`.
|
|
177
|
-
* On the server-side, it always returns `false`.
|
|
178
|
-
* @param k The string to check.
|
|
179
|
-
*/_NodeUtil=NodeUtil,_defineProperty(NodeUtil,"isServer","undefined"==typeof window),_defineProperty(NodeUtil,"_functionSignatureCache",new WeakMap),_defineProperty(NodeUtil,"CACHE_SIZE_LIMIT",500),_defineProperty(NodeUtil,"CACHE_CLEANUP_BATCH",50),_defineProperty(NodeUtil,"CRITICAL_PROPS",new Set(["css","className","disableEmotion","props"])),_defineProperty(NodeUtil,"portalInfrastructure",new WeakMap),_defineProperty(NodeUtil,"isNodeInstance",a=>"object"==typeof a&&null!==a&&"element"in a&&"function"==typeof a.render&&"function"==typeof a.toPortal&&"isBaseNode"in a),_defineProperty(NodeUtil,"isStyleProp",_NodeUtil.isServer||"undefined"==typeof document?()=>!1:a=>a in document.body.style);
|
|
166
|
+
};return b={domElement:c,reactRoot:e},NodeUtil.portalInfrastructure.set(a,b),BaseNode.portalCleanupRegistry.register(a,{domElement:c,reactRoot:e},a),!0}static cleanupPortalInfra(a){try{a.reactRoot?.unmount&&a.reactRoot.unmount()}catch(a){__DEBUG__&&console.error("Portal cleanup error:",a)}try{a.domElement?.isConnected&&a.domElement.remove()}catch(a){__DEBUG__&&console.error("DOM removal error:",a)}}}/**
|
|
167
|
+
* A min-heap implementation for efficient priority queue operations.
|
|
168
|
+
* Used for O(log n) eviction in the LRU cache system.
|
|
169
|
+
*/_NodeUtil=NodeUtil,_defineProperty(NodeUtil,"isServer","undefined"==typeof window),_defineProperty(NodeUtil,"_functionSignatureCache",new WeakMap),_defineProperty(NodeUtil,"CACHE_SIZE_LIMIT",500),_defineProperty(NodeUtil,"CACHE_CLEANUP_BATCH",50),_defineProperty(NodeUtil,"_cssCache",new WeakMap),_defineProperty(NodeUtil,"CRITICAL_PROPS",new Set(["css","className","disableEmotion","props"])),_defineProperty(NodeUtil,"portalInfrastructure",new WeakMap),_defineProperty(NodeUtil,"isNodeInstance",a=>"object"==typeof a&&null!==a&&"element"in a&&"function"==typeof a.render&&"function"==typeof a.toPortal&&"isBaseNode"in a),_defineProperty(NodeUtil,"isStyleProp",_NodeUtil.isServer||"undefined"==typeof document?()=>!1:a=>a in document.body.style);class MinHeap{constructor(a){_defineProperty(this,"heap",[]),this.comparator=a}size(){return this.heap.length}isEmpty(){return 0===this.size()}push(a){this.heap.push(a),this.bubbleUp()}pop(){if(!this.isEmpty()){this.swap(0,this.size()-1);const a=this.heap.pop();return this.bubbleDown(),a}}peek(){return this.isEmpty()?void 0:this.heap[0]}bubbleUp(a=this.size()-1){for(;0<a;){const b=Math.floor((a-1)/2);if(0>=this.comparator(this.heap[b],this.heap[a]))break;this.swap(b,a),a=b}}bubbleDown(a=0){for(const b=this.size()-1;;){const c=2*a+1,d=2*a+2;let e=a;if(c<=b&&0>this.comparator(this.heap[c],this.heap[e])&&(e=c),d<=b&&0>this.comparator(this.heap[d],this.heap[e])&&(e=d),e===a)break;this.swap(a,e),a=e}}swap(a,b){[this.heap[a],this.heap[b]]=[this.heap[b],this.heap[a]]}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meonode/ui",
|
|
3
3
|
"description": "A structured approach to component composition, direct CSS-first prop styling, built-in theming, smart prop handling (including raw property pass-through), and dynamic children.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|
|
@@ -31,8 +31,10 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"watch:build": "yarn dlx nodemon --watch src --ext ts,tsx,js,json --exec \"yarn build\"",
|
|
33
33
|
"lint": "eslint --fix",
|
|
34
|
-
"test": "NODE_OPTIONS='--expose-gc' node --stack-size=10000 --experimental-vm-modules node_modules/jest/bin/jest.js --ci --verbose",
|
|
35
|
-
"
|
|
34
|
+
"test": "NODE_OPTIONS='--expose-gc' node --stack-size=10000 --experimental-vm-modules node_modules/jest/bin/jest.js --ci --verbose --testPathIgnorePatterns=\"tests/performance.test.ts\"",
|
|
35
|
+
"test:perf": "NODE_OPTIONS='--expose-gc' node --stack-size=10000 --experimental-vm-modules node_modules/jest/bin/jest.js --ci --verbose tests/performance.test.ts",
|
|
36
|
+
"test:all": "NODE_OPTIONS='--expose-gc' node --stack-size=10000 --experimental-vm-modules node_modules/jest/bin/jest.js --ci --verbose",
|
|
37
|
+
"prebuild": "yarn lint && yarn test:all",
|
|
36
38
|
"build": "yarn prebuild && rm -rf ./dist && babel src --out-dir dist --extensions \".ts,.tsx,.js\" && tsgo -p tsconfig.build.json --diagnostics && tsc-alias -p tsconfig.build.json",
|
|
37
39
|
"publish:pre": "./prepublish.sh && yarn build && yarn version -i prerelease && yarn npm publish --tag next",
|
|
38
40
|
"publish:patch": "./prepublish.sh && yarn build && yarn version -i patch && yarn npm publish --tag latest",
|
|
@@ -55,13 +57,14 @@
|
|
|
55
57
|
"@testing-library/jest-dom": "^6.9.1",
|
|
56
58
|
"@testing-library/react": "^16.3.0",
|
|
57
59
|
"@types/jest": "^30.0.0",
|
|
58
|
-
"@types/react": "^19.2.
|
|
60
|
+
"@types/react": "^19.2.6",
|
|
59
61
|
"@types/react-dom": "^19.2.3",
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
61
|
-
"@typescript-eslint/parser": "^8.
|
|
62
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
63
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
64
|
+
"@typescript/native-preview": "^7.0.0-dev.20251118.1",
|
|
63
65
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
64
66
|
"babel-preset-minify": "0.5.2",
|
|
67
|
+
"cli-table3": "^0.6.5",
|
|
65
68
|
"eslint": "^9.39.1",
|
|
66
69
|
"eslint-plugin-jsdoc": "^61.2.1",
|
|
67
70
|
"eslint-plugin-prettier": "^5.5.4",
|
|
@@ -76,7 +79,7 @@
|
|
|
76
79
|
"ts-jest": "^29.4.5",
|
|
77
80
|
"tsc-alias": "^1.8.16",
|
|
78
81
|
"typescript": "^5.9.3",
|
|
79
|
-
"typescript-eslint": "^8.
|
|
82
|
+
"typescript-eslint": "^8.47.0"
|
|
80
83
|
},
|
|
81
84
|
"packageManager": "yarn@4.10.2",
|
|
82
85
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.const.d.ts","sourceRoot":"","sources":["../../src/constants/common.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,uOAwBhB,CAAA;AAEV,eAAO,MAAM,cAAc,uPAAyB,CAAA;AACpD,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA;AAEhD,eAAO,IAAI,SAAS,SAAQ,CAAA;AAE5B,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,QAK5C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-properties.const.d.ts","sourceRoot":"","sources":["../../src/constants/css-properties.const.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,k0ZAirBT,CAAA;AAEV,eAAe,aAAa,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|