@meonode/ui 0.1.111 → 0.1.112
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/hoc/portal.hoc.js +5 -5
- package/package.json +1 -1
package/dist/hoc/portal.hoc.js
CHANGED
|
@@ -58,16 +58,16 @@ var f=function Renderer(){var a=0<arguments.length&&arguments[0]!==void 0?argume
|
|
|
58
58
|
}));// Ensures that the theme is correctly applied if the result is a BaseNode.
|
|
59
59
|
if(f instanceof BaseNode){var g,h;return Node(f.element,_objectSpread(_objectSpread({},f.rawProps),{},{nodetheme:(null===(g=f.rawProps)||void 0===g?void 0:g.nodetheme)||(null===(h=f.rawProps)||void 0===h?void 0:h.theme)||a.nodetheme})).render()}return f};// --- Portal Launcher Function (Returned to User) ---
|
|
60
60
|
// This is the function that developers call to actually create and manage a portal instance.
|
|
61
|
-
return function Func(
|
|
61
|
+
return function Func(){// --- Helper for Deep Content Injection ---
|
|
62
62
|
// Recursively injects content into the deepest child of a provider chain.
|
|
63
63
|
function injectContentDeeply(a,b,c){var d,e,f,g=null===(d=a.rawProps)||void 0===d?void 0:d.children;// If no children, or children is not a NodeInstance, inject directly
|
|
64
64
|
if(!g||!(g instanceof BaseNode)){var h,i;return Node(a.element,_objectSpread(_objectSpread({},a.rawProps),{},{children:b,nodetheme:(null===(h=a.rawProps)||void 0===h?void 0:h.nodetheme)||(null===(i=a.rawProps)||void 0===i?void 0:i.theme)||c}))}// Recursively inject into the deepest node
|
|
65
65
|
var j=injectContentDeeply(g,b);return Node(a.element,_objectSpread(_objectSpread({},a.rawProps),{},{children:j,nodetheme:(null===(e=a.rawProps)||void 0===e?void 0:e.nodetheme)||(null===(f=a.rawProps)||void 0===f?void 0:f.theme)||c}))}// --- Provider Wrapping Logic ---
|
|
66
66
|
// Iterates through the combined providers (fixed + dynamic) to wrap the content.
|
|
67
67
|
// Providers are applied in reverse order to ensure the innermost content is wrapped by the outermost provider.
|
|
68
|
-
var b,c=[];// Combine fixed and dynamic providers
|
|
69
|
-
|
|
68
|
+
var a,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},c=[];// Combine fixed and dynamic providers
|
|
69
|
+
b.provider&&c.push(b.provider);var g=[...(null!==d&&void 0!==d?d:[]),...c],h=b.provider,i=b.nodetheme,j=_objectWithoutProperties(b,_excluded2),k=_objectSpread(_objectSpread({},j),{},{nodetheme:i}),l=Node(f,k);// Separates props for the portal's content from internal props like 'provider' or 'nodetheme'.
|
|
70
70
|
// Creates the base node for the portal's content.
|
|
71
|
-
return
|
|
71
|
+
return a=0<g.length?g.reduceRight(function(a,b){var c,d,e;if(!(b instanceof BaseNode))return console.warn("Portal: Item in provider is not a valid NodeInstance. Skipping.",b),a;var f=(null===(c=b.rawProps)||void 0===c?void 0:c.children)instanceof BaseNode;// If the provider already has nested children, inject content deeply.
|
|
72
72
|
// Otherwise, simply set currentWrappedContent as its direct child.
|
|
73
|
-
return f?injectContentDeeply(b,a,i):Node(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{children:a,nodetheme:(null===(d=b.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=b.rawProps)||void 0===e?void 0:e.theme)||i}))},l):l,e=
|
|
73
|
+
return f?injectContentDeeply(b,a,i):Node(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{children:a,nodetheme:(null===(d=b.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=b.rawProps)||void 0===e?void 0:e.theme)||i}))},l):l,e=a.toPortal(),e}}
|
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.1.
|
|
4
|
+
"version": "0.1.112",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|