@cleanweb/oore 2.0.0-alpha.32 → 2.0.0-alpha.34

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.
@@ -9,5 +9,6 @@ export declare function useDebouncedState<T extends any>(init: T, config: TDelay
9
9
  flush: (isEager?: true) => void;
10
10
  pause(): void;
11
11
  resume(): void;
12
+ paused: boolean;
12
13
  }, T];
13
14
  export {};
@@ -24,7 +24,9 @@ function useDebouncedState(init, config) {
24
24
  _setter.flush = debouncedSetter.flush;
25
25
  _setter.pause = () => setPaused(true);
26
26
  _setter.resume = () => setPaused(false);
27
+ _setter.paused = paused;
27
28
  return _setter;
28
29
  }, [enableStaging, debouncedSetter]);
30
+ setter.paused = paused;
29
31
  return [debouncedValue, setter, stagedValue];
30
32
  }
@@ -85,7 +85,9 @@ 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 = any> = ReactElement<P>;
88
+ export type TypedNode<P, T extends JSXTagLike> = Omit<ReactElement<P>, 'type'> & {
89
+ type: T;
90
+ };
89
91
  export type TSlotNode<TSlotted extends SlottedComponent, Key extends keyof TSlotted['Slots'] = keyof TSlotted['Slots']> = (TypedNode<ComponentProps<TSlotted['Slots'][Key]>, TSlotted['Slots'][Key]>);
90
92
  /**
91
93
  * A record of slot aliases mapped to the corresponding `ReactNode`(s)
@@ -9,5 +9,6 @@ export declare function useDebouncedState<T extends any>(init: T, config: TDelay
9
9
  flush: (isEager?: true) => void;
10
10
  pause(): void;
11
11
  resume(): void;
12
+ paused: boolean;
12
13
  }, T];
13
14
  export {};
@@ -21,7 +21,9 @@ export function useDebouncedState(init, config) {
21
21
  _setter.flush = debouncedSetter.flush;
22
22
  _setter.pause = () => setPaused(true);
23
23
  _setter.resume = () => setPaused(false);
24
+ _setter.paused = paused;
24
25
  return _setter;
25
26
  }, [enableStaging, debouncedSetter]);
27
+ setter.paused = paused;
26
28
  return [debouncedValue, setter, stagedValue];
27
29
  }
@@ -85,7 +85,9 @@ 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 = any> = ReactElement<P>;
88
+ export type TypedNode<P, T extends JSXTagLike> = Omit<ReactElement<P>, 'type'> & {
89
+ type: T;
90
+ };
89
91
  export type TSlotNode<TSlotted extends SlottedComponent, Key extends keyof TSlotted['Slots'] = keyof TSlotted['Slots']> = (TypedNode<ComponentProps<TSlotted['Slots'][Key]>, TSlotted['Slots'][Key]>);
90
92
  /**
91
93
  * A record of slot aliases mapped to the corresponding `ReactNode`(s)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleanweb/oore",
3
- "version": "2.0.0-alpha.32",
3
+ "version": "2.0.0-alpha.34",
4
4
  "description": "A library of helpers for writing cleaner React function components with object-oriented patterns.",
5
5
  "engines": {
6
6
  "node": ">=22"