@meonode/ui 0.1.71 → 0.1.72
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/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +8 -10
- package/package.json +1 -1
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,EAAsG,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjJ,OAAO,KAAK,EAAE,cAAc,EAAyB,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAGzI,OAAO,EAAc,KAAK,IAAI,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAExE;;;;;;;;GAQG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IACnF,+EAA+E;IACxE,OAAO,EAAE,CAAC,CAAA;IAEjB,kFAAkF;IAC3E,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAK;IAErC,wFAAwF;IACjF,KAAK,EAAE,cAAc,CAAA;IAE5B,SAAgB,UAAU,QAAO;IAEjC,OAAO,CAAC,iBAAiB,CAA8B;IACvD,OAAO,CAAC,gBAAgB,CAA4B;IAEpD;;;;;;;;OAQG;gBACS,OAAO,EAAE,CAAC,EAAE,QAAQ,GAAE,YAAY,CAAC,CAAC,CAAM;IA4CtD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IA8B5B;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AACA,OAAc,EAAsG,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjJ,OAA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AAK,GAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAU1G"}
|
package/dist/core.node.js
CHANGED
|
@@ -50,20 +50,18 @@ i&&!g?h=0:j&&!g&&(h=0)}return _objectSpread({flex:c,flexShrink:h,minHeight:0,min
|
|
|
50
50
|
* @returns A new object with all theme variables resolved to their values
|
|
51
51
|
*/_resolveObjWithTheme(a,b){var c;// Early return if no theme or empty object
|
|
52
52
|
if(!b||0===Object.keys(a).length)return a;// Merge parent theme with current theme
|
|
53
|
-
var d=_objectSpread(_objectSpread({},null===(c=this.rawProps)||void 0===c?void 0:c.nodetheme),b),e=
|
|
53
|
+
var d=_objectSpread(_objectSpread({},null===(c=this.rawProps)||void 0===c?void 0:c.nodetheme),b),e=function resolveRecursively(a,b){// Prevent processing same object multiple times
|
|
54
54
|
if(b.has(a))return a;// Track this object to detect circular references
|
|
55
|
-
b.add(a);var c={};for(var
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
if("
|
|
59
|
-
if("string"==typeof h&&h.includes("theme.")){var i=h;i=i.replace(/theme\.([a-zA-Z0-9_.-]+)/g,function(a,b){var c=getValueByPath(d,b);// Only convert string/number theme values
|
|
55
|
+
b.add(a);var c={};for(var f in a){var g=a[f];// Skip functions and non-plain objects to prevent unintended flattening or
|
|
56
|
+
// modification of complex instances like React components, DOM elements, or Date objects.
|
|
57
|
+
if("function"==typeof g||g&&"object"===_typeof(g)&&!Array.isArray(g)&&Object.getPrototypeOf(g)!==Object.prototype){c[f]=g;continue}// Resolve theme variables in string values
|
|
58
|
+
if("string"==typeof g&&g.includes("theme.")){var h=g;h=h.replace(/theme\.([a-zA-Z0-9_.-]+)/g,function(a,b){var c=getValueByPath(d,b);// Only convert string/number theme values
|
|
60
59
|
return void 0!==c&&null!==c?"object"===_typeof(c)&&!Array.isArray(c)&&"default"in c?c["default"]:c:a;// Keep original if no valid theme value found
|
|
61
|
-
}),c[
|
|
62
|
-
else c[
|
|
63
|
-
/**
|
|
60
|
+
}),c[f]=h}// Recursively process nested objects
|
|
61
|
+
else c[f]=g&&"object"===_typeof(g)&&!Array.isArray(g)?e(g,b):g}return c};/**
|
|
64
62
|
* Recursively resolves theme variables in an object, tracking visited objects
|
|
65
63
|
* to prevent infinite recursion with circular references.
|
|
66
|
-
*/return
|
|
64
|
+
*/return e(a,new Set)}/**
|
|
67
65
|
* Renders a processed NodeElement into a ReactNode, applying theme and key if needed.
|
|
68
66
|
*
|
|
69
67
|
* Handles the following cases:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meonode/ui",
|
|
3
3
|
"description": "A structured approach to component composition with built-in theming, prop separation, and dynamic children handling.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.72",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|