@meonode/ui 0.2.11 → 0.2.12
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 +6 -0
- package/dist/core.node.d.ts +0 -2
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +4 -6
- package/dist/helper/node.helper.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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.12] - 2025-09-11
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **core.node**: Removed the child processing cache to fix a critical bug that caused infinite page loads in server-side rendering environments.
|
|
12
|
+
- **helper**: Corrected the element type retrieval logic within the hashing function used for child node processing.
|
|
13
|
+
|
|
8
14
|
## [0.2.11] - 2025-09-11
|
|
9
15
|
|
|
10
16
|
### Enhanced
|
package/dist/core.node.d.ts
CHANGED
|
@@ -27,8 +27,6 @@ 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 on the server (uses stringified keys for effective caching) */
|
|
31
|
-
private static _childProcessingCache;
|
|
32
30
|
/**
|
|
33
31
|
* Constructs a new BaseNode instance.
|
|
34
32
|
*
|
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":"AACA,OAAc,EAAgD,KAAK,WAAW,EAA4B,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAA;AAC1J,OAAO,KAAK,EACV,WAA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,sBAAsB,GAAG,UAAU,CAAC,GAAG,sBAAsB,GACpG,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GACxC,CAAC,CAAC,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjE,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,EACrC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,UAAU,CAAC,KACrD,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,GACtC,CAAC,CAAC,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjE,QAAQ,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE,EACtC,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,UAAU,CAAC,KACtD,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAQzC"}
|
package/dist/core.node.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Child node processing and management
|
|
7
7
|
* - Style processing with theme variables
|
|
8
8
|
* @template E The type of React element or component this node represents
|
|
9
|
-
*/export class BaseNode{/**
|
|
9
|
+
*/export class BaseNode{/** Hash of the current children and theme to detect changes *//** Cache for normalized children *//**
|
|
10
10
|
* Constructs a new BaseNode instance.
|
|
11
11
|
*
|
|
12
12
|
* This constructor initializes a node with a given React element or component type
|
|
@@ -76,10 +76,8 @@ return _objectSpread(_objectSpread({ref:b,key:c,nodetheme:j,theme:f,css:_objectS
|
|
|
76
76
|
* @param theme The theme to propagate to the children.
|
|
77
77
|
* @returns The processed children, ready to be normalized for rendering.
|
|
78
78
|
* @private
|
|
79
|
-
*/_processChildren(a,b){var c=this;
|
|
80
|
-
|
|
81
|
-
// Processing children on the client is fast enough and avoids complex, buggy cache logic.
|
|
82
|
-
return Array.isArray(a)?a.map(function(a,d){return c._processRawNode(a,b,d)}):this._processRawNode(a,b)}}/**
|
|
79
|
+
*/_processChildren(a,b){var c=this;return a?Array.isArray(a)?a.map(function(a,d){return c._processRawNode(a,b,d)}):this._processRawNode(a,b):void 0;// No caching on the client, as it was ineffective and complex.
|
|
80
|
+
}/**
|
|
83
81
|
* Renders a processed `NodeElement` into a `ReactNode`, applying a theme and key if necessary.
|
|
84
82
|
*
|
|
85
83
|
* This static method centralizes the logic for converting various types of processed elements
|
|
@@ -208,7 +206,7 @@ return j=this.element===Fragment||isFragment(this.element)?{key:e}:_objectSpread
|
|
|
208
206
|
* @param props The props for the node (optional).
|
|
209
207
|
* @param additionalProps Additional props to merge into the node (optional).
|
|
210
208
|
* @returns A new `BaseNode` instance as a `NodeInstance<E>`.
|
|
211
|
-
*/
|
|
209
|
+
*/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)}/**
|
|
212
210
|
* Creates a curried node factory for a given React element or component type.
|
|
213
211
|
*
|
|
214
212
|
* Returns a function that, when called with props, produces a `BaseNode` instance.
|
|
@@ -128,4 +128,4 @@ minWidth:0},d)};/**
|
|
|
128
128
|
* @param children The child nodes to hash, which can be a single node or an array of nodes.
|
|
129
129
|
* @param theme An optional theme object or string to include in the hash.
|
|
130
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
|
|
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}
|
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.
|
|
4
|
+
"version": "0.2.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|