@meonode/ui 0.1.80 → 0.1.81
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.
|
@@ -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,
|
|
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){
|
|
28
|
-
|
|
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.
|
|
4
|
+
"version": "0.1.81",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|