@cleanweb/oore 2.0.0-beta.5 → 2.0.0-beta.7
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/build/slots/hook.d.ts +1 -1
- package/build/slots/hook.js +1 -0
- package/build/slots/types.d.ts +1 -1
- package/package.json +1 -1
package/build/slots/hook.d.ts
CHANGED
|
@@ -17,4 +17,4 @@ export declare const isPortalChild: (child: ReactNode) => child is ReactPortal;
|
|
|
17
17
|
* @see {@link SlotComponent} for more on how to use the returned slot nodes.
|
|
18
18
|
*/
|
|
19
19
|
export declare const useSlots: IUseSlots;
|
|
20
|
-
export type { SlottedComponent, TSlotsRecord, PotentialSlotComponent, } from './types';
|
|
20
|
+
export type { SlottedComponent, TSlotsRecord, SlotComponent, PotentialSlotComponent, } from './types';
|
package/build/slots/hook.js
CHANGED
|
@@ -96,6 +96,7 @@ var useSlots = function (children, Caller) {
|
|
|
96
96
|
});
|
|
97
97
|
return aliasLookup;
|
|
98
98
|
}, [Caller.Slots]);
|
|
99
|
+
// @todo Expose original source order of `children` with respect to slot aliases.
|
|
99
100
|
var result = (0, react_1.useMemo)(function () {
|
|
100
101
|
var _a;
|
|
101
102
|
var slotNodes = {};
|
package/build/slots/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode, ComponentType, ReactPortal } from 'react';
|
|
1
|
+
import type { ReactElement, ReactNode, ComponentType, ReactPortal, JSX } from 'react';
|
|
2
2
|
type JSXTagLike = string | keyof JSX.IntrinsicElements | ComponentType<any>;
|
|
3
3
|
/** This fixes overly narrow T type used by React's ComponentProps type. */
|
|
4
4
|
export type ComponentProps<T extends JSXTagLike> = (T extends ComponentType<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : {});
|