@meonode/ui 0.1.102 → 0.1.103
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.
|
@@ -14,7 +14,7 @@ import { type CSSProperties, type ReactNode } from 'react';
|
|
|
14
14
|
*
|
|
15
15
|
* If the component supports inline styles (determined via `HasCSSCompatibleStyleProp`), the props also allow `CSSProperties`.
|
|
16
16
|
*/
|
|
17
|
-
type
|
|
17
|
+
export type ComponentNodeProps<TProps> = TProps extends undefined ? Partial<{
|
|
18
18
|
children: NodeElement | NodeElement[];
|
|
19
19
|
theme: Theme;
|
|
20
20
|
}> : TProps & (HasCSSCompatibleStyleProp<TProps> extends true ? CSSProperties : object) & Partial<{
|
|
@@ -36,7 +36,7 @@ type ComponentProps<TProps> = TProps extends undefined ? Partial<{
|
|
|
36
36
|
* Title({ children: 'Hello' })
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
|
-
export declare function Component<TProps extends undefined>(component:
|
|
39
|
+
export declare function Component<TProps extends undefined>(component: (props: ComponentNodeProps<TProps>) => ComponentNode): (props?: ComponentNodeProps<TProps>) => ReactNode | Promise<Awaited<ReactNode>>;
|
|
40
40
|
/**
|
|
41
41
|
* Creates a component from a function that uses a defined props interface.
|
|
42
42
|
* @template TProps Props interface expected by the component.
|
|
@@ -59,6 +59,5 @@ export declare function Component<TProps extends undefined>(component: <TActualP
|
|
|
59
59
|
* Button({ label: 'Click me', onClick: () => alert('clicked')})
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
|
-
export declare function Component<TProps extends Record<string, any>>(component:
|
|
63
|
-
export {};
|
|
62
|
+
export declare function Component<TProps extends Record<string, any>>(component: (props: ComponentNodeProps<TProps>) => ComponentNode): (props: ComponentNodeProps<TProps>) => ReactNode | Promise<Awaited<ReactNode>>;
|
|
64
63
|
//# 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":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAClG,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,
|
|
1
|
+
{"version":3,"file":"component.hoc.d.ts","sourceRoot":"","sources":["../../src/hoc/component.hoc.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAClG,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,kBAAkB,CAAC,MAAM,IAAI,MAAM,SAAS,SAAS,GAC7D,OAAO,CAAC;IACN,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,CAAA;IACrC,KAAK,EAAE,KAAK,CAAA;CACb,CAAC,GACF,MAAM,GACJ,CAAC,yBAAyB,CAAC,MAAM,CAAC,SAAS,IAAI,GAAG,aAAa,GAAG,MAAM,CAAC,GACzE,OAAO,CAAC;IACN,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IACxC,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,CAAA;IACrC,KAAK,EAAE,KAAK,CAAA;CACb,CAAC,CAAA;AAER;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,MAAM,SAAS,SAAS,EAChD,SAAS,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAAK,aAAa,GAC9D,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAAK,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAA;AAElF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1D,SAAS,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAAK,aAAa,GAC9D,CAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAAK,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAA"}
|
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.103",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|