@cleanweb/oore 2.0.0-alpha.30 → 2.0.0-alpha.32
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/_cjs/helpers/debounce/{react.d.ts → react-state.d.ts} +1 -1
- package/build/_cjs/helpers/debounce/{react.js → react-state.js} +1 -1
- package/build/_cjs/helpers/index.d.ts +1 -1
- package/build/_cjs/helpers/index.js +1 -1
- package/build/_cjs/slots/types.d.ts +2 -2
- package/build/helpers/debounce/{react.d.ts → react-state.d.ts} +1 -1
- package/build/helpers/debounce/{react.js → react-state.js} +1 -1
- package/build/helpers/index.d.ts +1 -1
- package/build/helpers/index.js +1 -1
- package/build/slots/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useDebouncedState = useDebouncedState;
|
|
4
|
-
const react_1 = require("react
|
|
4
|
+
const react_1 = require("react");
|
|
5
5
|
const _1 = require("./index.js");
|
|
6
6
|
function useDebouncedState(init, config) {
|
|
7
7
|
const [debouncedValue, setDebouncedValue] = (0, react_1.useState)(init);
|
|
@@ -7,7 +7,7 @@ export * from './rerender.js';
|
|
|
7
7
|
export * from './use-component/index.js';
|
|
8
8
|
export * from './object-gate.js';
|
|
9
9
|
export * from './debounce/index.js';
|
|
10
|
-
export * from './debounce/react.js';
|
|
10
|
+
export * from './debounce/react-state.js';
|
|
11
11
|
export * from './type-guards.js';
|
|
12
12
|
/**
|
|
13
13
|
* An empty function.
|
|
@@ -24,7 +24,7 @@ __exportStar(require("./rerender.js"), exports);
|
|
|
24
24
|
__exportStar(require("./use-component/index.js"), exports);
|
|
25
25
|
__exportStar(require("./object-gate.js"), exports);
|
|
26
26
|
__exportStar(require("./debounce/index.js"), exports);
|
|
27
|
-
__exportStar(require("./debounce/react.js"), exports);
|
|
27
|
+
__exportStar(require("./debounce/react-state.js"), exports);
|
|
28
28
|
__exportStar(require("./type-guards.js"), exports);
|
|
29
29
|
/**
|
|
30
30
|
* An empty function.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode, ComponentType,
|
|
1
|
+
import type { ReactElement, ReactNode, ComponentType, JSX } from 'react';
|
|
2
2
|
/** @todo ComponentType force children to be ReactNode, but custom components can have any children type. */
|
|
3
3
|
type JSXTagLike = string | keyof JSX.IntrinsicElements | ComponentType<any>;
|
|
4
4
|
/** This fixes overly narrow T type used by React's ComponentProps type. */
|
|
@@ -85,7 +85,7 @@ export type SlottedComponent<TOwner extends object = ComponentType<any>, TSlots
|
|
|
85
85
|
Slots: TSlots;
|
|
86
86
|
requiredSlotAliases?: Array<keyof TSlots>;
|
|
87
87
|
};
|
|
88
|
-
export type TypedNode<P, T extends JSXTagLike
|
|
88
|
+
export type TypedNode<P, T extends JSXTagLike = any> = ReactElement<P>;
|
|
89
89
|
export type TSlotNode<TSlotted extends SlottedComponent, Key extends keyof TSlotted['Slots'] = keyof TSlotted['Slots']> = (TypedNode<ComponentProps<TSlotted['Slots'][Key]>, TSlotted['Slots'][Key]>);
|
|
90
90
|
/**
|
|
91
91
|
* A record of slot aliases mapped to the corresponding `ReactNode`(s)
|
package/build/helpers/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export * from './rerender.js';
|
|
|
7
7
|
export * from './use-component/index.js';
|
|
8
8
|
export * from './object-gate.js';
|
|
9
9
|
export * from './debounce/index.js';
|
|
10
|
-
export * from './debounce/react.js';
|
|
10
|
+
export * from './debounce/react-state.js';
|
|
11
11
|
export * from './type-guards.js';
|
|
12
12
|
/**
|
|
13
13
|
* An empty function.
|
package/build/helpers/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export * from './rerender.js';
|
|
|
7
7
|
export * from './use-component/index.js';
|
|
8
8
|
export * from './object-gate.js';
|
|
9
9
|
export * from './debounce/index.js';
|
|
10
|
-
export * from './debounce/react.js';
|
|
10
|
+
export * from './debounce/react-state.js';
|
|
11
11
|
export * from './type-guards.js';
|
|
12
12
|
/**
|
|
13
13
|
* An empty function.
|
package/build/slots/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode, ComponentType,
|
|
1
|
+
import type { ReactElement, ReactNode, ComponentType, JSX } from 'react';
|
|
2
2
|
/** @todo ComponentType force children to be ReactNode, but custom components can have any children type. */
|
|
3
3
|
type JSXTagLike = string | keyof JSX.IntrinsicElements | ComponentType<any>;
|
|
4
4
|
/** This fixes overly narrow T type used by React's ComponentProps type. */
|
|
@@ -85,7 +85,7 @@ export type SlottedComponent<TOwner extends object = ComponentType<any>, TSlots
|
|
|
85
85
|
Slots: TSlots;
|
|
86
86
|
requiredSlotAliases?: Array<keyof TSlots>;
|
|
87
87
|
};
|
|
88
|
-
export type TypedNode<P, T extends JSXTagLike
|
|
88
|
+
export type TypedNode<P, T extends JSXTagLike = any> = ReactElement<P>;
|
|
89
89
|
export type TSlotNode<TSlotted extends SlottedComponent, Key extends keyof TSlotted['Slots'] = keyof TSlotted['Slots']> = (TypedNode<ComponentProps<TSlotted['Slots'][Key]>, TSlotted['Slots'][Key]>);
|
|
90
90
|
/**
|
|
91
91
|
* A record of slot aliases mapped to the corresponding `ReactNode`(s)
|
package/package.json
CHANGED