@meonode/ui 0.1.39 → 0.1.40

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.js CHANGED
@@ -185,13 +185,12 @@ if(c instanceof BaseNode){var d,e,f=(null===(d=c.rawProps)||void 0===d?void 0:d.
185
185
  var c,d=void 0,e=null;// Parse arguments to determine which overload is being used
186
186
  if("function"==typeof b&&(a instanceof BaseNode||Array.isArray(a)&&a.every(function(a){return a instanceof BaseNode})))// Overload 1: Portal(providers, component) - Fixed providers
187
187
  d=Array.isArray(a)?a:[a],c=b;else if("function"==typeof a&&b===void 0)// Overload 2: Portal(component) - Dynamic providers via props
188
- c=a;else throw new Error("Invalid arguments for Portal HOC. Use Portal(component) or Portal(providersArrayOrNodeInstance, component).");// Control object passed to portal content for cleanup
189
- var f={unmount:function unmount(){e&&(e.unmount(),e=null)}},g=function Renderer(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.nodetheme,d=_objectWithoutProperties(a,_excluded4),e=c(_objectSpread(_objectSpread({},d),{},{portal:f}));// Handle BaseNode results by properly applying the theme
190
- if(e instanceof BaseNode){var g,h,i=(null===(g=e.rawProps)||void 0===g?void 0:g.nodetheme)||(null===(h=e.rawProps)||void 0===h?void 0:h.theme)||a.nodetheme;return Node(e.element,_objectSpread(_objectSpread({},e.rawProps),{},{nodetheme:i})).render()}return e};// Renderer function that executes portal content with control object
191
- // Return launcher function that creates and manages the portal instance
188
+ c=a;else throw new Error("Invalid arguments for Portal HOC. Use Portal(component) or Portal(providersArrayOrNodeInstance, component).");// Renderer function that executes portal content with control object
189
+ var f=function Renderer(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.nodetheme,d=_objectWithoutProperties(a,_excluded4),f=c(_objectSpread(_objectSpread({},d),{},{portal:e}));// Handle BaseNode results by properly applying the theme
190
+ if(f instanceof BaseNode){var g,h,i=(null===(g=f.rawProps)||void 0===g?void 0:g.nodetheme)||(null===(h=f.rawProps)||void 0===h?void 0:h.theme)||a.nodetheme;return Node(f.element,_objectSpread(_objectSpread({},f.rawProps),{},{nodetheme:i})).render()}return f};// Return launcher function that creates and manages the portal instance
192
191
  return function(a){var b,c=void 0;// Combine fixed and dynamic providers in the correct order
193
192
  d?c=d:a.providers&&(c=Array.isArray(a.providers)?a.providers:[a.providers]);// Extract props needed for portal setup vs content
194
- var f=a.providers,h=a.nodetheme,i=_objectWithoutProperties(a,_excluded5),j=_objectSpread(_objectSpread({},i),{},{nodetheme:h}),k=Node(g,j);// Create node for portal content with renderer
193
+ var g=a.providers,h=a.nodetheme,i=_objectWithoutProperties(a,_excluded5),j=_objectSpread(_objectSpread({},i),{},{nodetheme:h}),k=Node(f,j);// Create node for portal content with renderer
195
194
  // Wrap content with providers if any exist
196
195
  return b=c&&0<c.length?c.reduceRight(function(a,b){var c,d;// Validate each provider is a proper NodeInstance
197
196
  return b instanceof BaseNode?Node(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{children:a,nodetheme:(null===(c=b.rawProps)||void 0===c?void 0:c.nodetheme)||(null===(d=b.rawProps)||void 0===d?void 0:d.theme)||h})):(console.warn("Portal: Item in providers array is not a valid NodeInstance. Skipping.",b),a)},k):k,e=b.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 with built-in theming, prop separation, and dynamic children handling.",
4
- "version": "0.1.39",
4
+ "version": "0.1.40",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",