@meonode/ui 0.1.70 → 0.1.71
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 -7
- 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,19 +50,20 @@ 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=function resolveRecursively(a,b){// Prevent processing same object multiple times
|
|
53
|
+
var d=_objectSpread(_objectSpread({},null===(c=this.rawProps)||void 0===c?void 0:c.nodetheme),b),e="undefined"!=typeof window,f=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
|
|
55
|
+
b.add(a);var c={};for(var g in a){var h=a[g];// Skip complex objects/functions unless they are specifically targeted for theme resolution,
|
|
56
56
|
// This prevents inadvertently flattening or stripping methods from instances like dayjs, React components, etc.
|
|
57
57
|
// You might need to refine this condition based on what specific types you want to *never* resolve/transform
|
|
58
|
-
if("function"==typeof
|
|
59
|
-
if("string"==typeof
|
|
58
|
+
if("function"==typeof h||e&&h instanceof HTMLElement||h instanceof Date||h&&"object"===_typeof(h)&&!Array.isArray(h)&&Object.getPrototypeOf(h)!==Object.prototype){c[g]=h;continue}// Resolve theme variables in string values
|
|
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
|
|
60
60
|
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[
|
|
61
|
+
}),c[g]=i}// Recursively process nested objects
|
|
62
|
+
else c[g]=h&&"object"===_typeof(h)&&!Array.isArray(h)?f(h,b):h}return c};// Determine if we are in a browser environment
|
|
63
|
+
/**
|
|
63
64
|
* Recursively resolves theme variables in an object, tracking visited objects
|
|
64
65
|
* to prevent infinite recursion with circular references.
|
|
65
|
-
*/return
|
|
66
|
+
*/return f(a,new Set)}/**
|
|
66
67
|
* Renders a processed NodeElement into a ReactNode, applying theme and key if needed.
|
|
67
68
|
*
|
|
68
69
|
* 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.71",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|