@meonode/ui 0.1.80 → 0.1.82

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
@@ -24,7 +24,7 @@ var d=c.ref,e=c.children,f=c.nodetheme,g=c.theme,h=c.props,i=_objectWithoutPrope
24
24
  // Extract remaining props that are valid DOM attributes
25
25
  // Process children while maintaining theme inheritance
26
26
  // Combine processed props into final normalized form
27
- e&&(Array.isArray(e)?s=e.map(function(a,c){return b._processRawNode(a,j,c)}):s=this._processRawNode(e,j)),this.props=_objectSpread(_objectSpread(_objectSpread({},r),m),{},{style:q,ref:d,nodetheme:j,theme:g,children:s})}/**
27
+ e&&(Array.isArray(e)?s=e.map(function(a,c){return b._processRawNode(a,j,c)}):s=this._processRawNode(e,j)),this.props=_objectSpread(_objectSpread(_objectSpread({ref:d,nodetheme:j,theme:g,style:q},r),m),{},{children:s})}/**
28
28
  * Resolves default styles for a given CSSProperties object.
29
29
  * This method ensures that certain default styles, such as `minHeight`, `minWidth`,
30
30
  * and `flexShrink`, are applied based on the provided style properties.
@@ -32,6 +32,6 @@ type ComponentProps<P> = P & {
32
32
  * })
33
33
  * ```
34
34
  */
35
- export declare function Component<P>(component: (props: ComponentProps<P>) => ComponentNode): (props: P) => ReactNode;
35
+ export declare function Component<P>(component: (props: ComponentProps<P>) => ComponentNode): (props: P extends undefined ? undefined : P) => ReactNode;
36
36
  export {};
37
37
  //# sourceMappingURL=component.hoc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.hoc.d.ts","sourceRoot":"","sources":["../../src/hoc/component.hoc.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAS,MAAM,gBAAgB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;;;;GAKG;AACH,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAA;IACpC,QAAQ,CAAC,EAAE,WAAW,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,aAAa,IAgB5D,OAAO,CAAC,eAG9B"}
1
+ {"version":3,"file":"component.hoc.d.ts","sourceRoot":"","sources":["../../src/hoc/component.hoc.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAS,MAAM,gBAAgB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;;;;GAKG;AACH,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAA;IACpC,QAAQ,CAAC,EAAE,WAAW,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,aAAa,IAuB5D,OAAO,CAAC,SAAS,SAAS,GAAG,SAAS,GAAG,CAAC,eAGhE"}
@@ -24,7 +24,11 @@
24
24
  * })
25
25
  * })
26
26
  * ```
27
- */export function Component(a){// Create a wrapper component that handles theme and rendering
28
- var b=function Renderer(b){var c=a(b);// Execute wrapped component
27
+ */export function Component(a){/**
28
+ * Props for the internal Renderer component.
29
+ * - Inherits all props from ComponentProps\<P\>
30
+ * - Adds optional `nodetheme` and `theme` for theme propagation and merging
31
+ */// Create a wrapper component that handles theme and rendering
32
+ var b=function Renderer(){var b=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},c=a(b);// Execute wrapped component
29
33
  // Handle BaseNode results - requires special processing
30
34
  if(c instanceof BaseNode){var d,e;return Node(c.element,_objectSpread(_objectSpread({},c.rawProps),{},{nodetheme:(null===(d=c.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=c.rawProps)||void 0===e?void 0:e.theme)||b.nodetheme||b.theme})).render()}return c};return function Func(a){return Node(b,a).render()}}
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.80",
4
+ "version": "0.1.82",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",