isomorfeus-preact 10.8.0 → 10.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isomorfeus_preact/preact/function_component/api.rb +24 -0
  3. data/lib/preact/version.rb +1 -1
  4. data/node_modules/.package-lock.json +5 -7
  5. data/node_modules/preact/compat/dist/compat.js +2 -2
  6. data/node_modules/preact/compat/dist/compat.js.map +1 -1
  7. data/node_modules/preact/compat/dist/compat.mjs +2 -2
  8. data/node_modules/preact/compat/dist/compat.module.js +2 -2
  9. data/node_modules/preact/compat/dist/compat.module.js.map +1 -1
  10. data/node_modules/preact/compat/dist/compat.umd.js +2 -2
  11. data/node_modules/preact/compat/dist/compat.umd.js.map +1 -1
  12. data/node_modules/preact/compat/src/index.d.ts +164 -155
  13. data/node_modules/preact/compat/src/index.js +223 -187
  14. data/node_modules/preact/compat/src/render.js +238 -238
  15. data/node_modules/preact/debug/dist/debug.js +2 -2
  16. data/node_modules/preact/debug/dist/debug.js.map +1 -1
  17. data/node_modules/preact/debug/dist/debug.mjs +2 -2
  18. data/node_modules/preact/debug/dist/debug.module.js +2 -2
  19. data/node_modules/preact/debug/dist/debug.module.js.map +1 -1
  20. data/node_modules/preact/debug/dist/debug.umd.js +2 -2
  21. data/node_modules/preact/debug/dist/debug.umd.js.map +1 -1
  22. data/node_modules/preact/debug/src/debug.js +437 -444
  23. data/node_modules/preact/devtools/dist/devtools.js +2 -2
  24. data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
  25. data/node_modules/preact/devtools/dist/devtools.mjs +2 -2
  26. data/node_modules/preact/devtools/dist/devtools.module.js +2 -2
  27. data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
  28. data/node_modules/preact/devtools/dist/devtools.umd.js +2 -2
  29. data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
  30. data/node_modules/preact/devtools/src/devtools.js +10 -10
  31. data/node_modules/preact/hooks/dist/hooks.js +2 -2
  32. data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
  33. data/node_modules/preact/hooks/dist/hooks.mjs +2 -2
  34. data/node_modules/preact/hooks/dist/hooks.module.js +2 -2
  35. data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
  36. data/node_modules/preact/hooks/dist/hooks.umd.js +2 -2
  37. data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
  38. data/node_modules/preact/hooks/src/index.js +417 -404
  39. data/node_modules/preact/hooks/src/internal.d.ts +3 -0
  40. data/node_modules/preact/package.json +304 -304
  41. data/node_modules/preact/src/jsx.d.ts +1014 -1013
  42. data/package.json +1 -1
  43. metadata +4 -4
@@ -1,155 +1,164 @@
1
- import * as _hooks from '../../hooks';
2
- import * as preact from '../../src';
3
- import { JSXInternal } from '../../src/jsx';
4
- import * as _Suspense from './suspense';
5
- import * as _SuspenseList from './suspense-list';
6
-
7
- // export default React;
8
- export = React;
9
- export as namespace React;
10
- declare namespace React {
11
- // Export JSX
12
- export import JSX = JSXInternal;
13
-
14
- // Hooks
15
- export import CreateHandle = _hooks.CreateHandle;
16
- export import EffectCallback = _hooks.EffectCallback;
17
- export import Inputs = _hooks.Inputs;
18
- export import PropRef = _hooks.PropRef;
19
- export import Reducer = _hooks.Reducer;
20
- export import Ref = _hooks.Ref;
21
- export import StateUpdater = _hooks.StateUpdater;
22
- export import useCallback = _hooks.useCallback;
23
- export import useContext = _hooks.useContext;
24
- export import useDebugValue = _hooks.useDebugValue;
25
- export import useEffect = _hooks.useEffect;
26
- export import useImperativeHandle = _hooks.useImperativeHandle;
27
- export import useLayoutEffect = _hooks.useLayoutEffect;
28
- export import useMemo = _hooks.useMemo;
29
- export import useReducer = _hooks.useReducer;
30
- export import useRef = _hooks.useRef;
31
- export import useState = _hooks.useState;
32
-
33
- // Preact Defaults
34
- export import ContextType = preact.ContextType;
35
- export import RefObject = preact.RefObject;
36
- export import Component = preact.Component;
37
- export import FunctionComponent = preact.FunctionComponent;
38
- export import FC = preact.FunctionComponent;
39
- export import createContext = preact.createContext;
40
- export import createRef = preact.createRef;
41
- export import Fragment = preact.Fragment;
42
- export import createElement = preact.createElement;
43
- export import cloneElement = preact.cloneElement;
44
- export import ComponentProps = preact.ComponentProps;
45
-
46
- // Suspense
47
- export import Suspense = _Suspense.Suspense;
48
- export import lazy = _Suspense.lazy;
49
- export import SuspenseList = _SuspenseList.SuspenseList;
50
-
51
- // Compat
52
- export import StrictMode = preact.Fragment;
53
- export const version: string;
54
-
55
- // HTML
56
- export import HTMLAttributes = JSXInternal.HTMLAttributes;
57
- export import DetailedHTMLProps = JSXInternal.DetailedHTMLProps;
58
- export import CSSProperties = JSXInternal.CSSProperties;
59
-
60
- // Events
61
- export import TargetedEvent = JSXInternal.TargetedEvent;
62
- export import ChangeEvent = JSXInternal.TargetedEvent;
63
- export import ChangeEventHandler = JSXInternal.GenericEventHandler;
64
-
65
- export function createPortal(
66
- vnode: preact.VNode,
67
- container: Element
68
- ): preact.VNode<any>;
69
-
70
- export function render(
71
- vnode: preact.VNode<any>,
72
- parent: Element,
73
- callback?: () => void
74
- ): Component | null;
75
-
76
- export function hydrate(
77
- vnode: preact.VNode<any>,
78
- parent: Element,
79
- callback?: () => void
80
- ): Component | null;
81
-
82
- export function unmountComponentAtNode(
83
- container: Element | Document | ShadowRoot | DocumentFragment
84
- ): boolean;
85
-
86
- export function createFactory(
87
- type: preact.VNode<any>['type']
88
- ): (
89
- props?: any,
90
- ...children: preact.ComponentChildren[]
91
- ) => preact.VNode<any>;
92
- export function isValidElement(element: any): boolean;
93
- export function findDOMNode(
94
- component: preact.Component | Element
95
- ): Element | null;
96
-
97
- export abstract class PureComponent<P = {}, S = {}> extends preact.Component<
98
- P,
99
- S
100
- > {
101
- isPureReactComponent: boolean;
102
- }
103
-
104
- export function memo<P = {}>(
105
- component: preact.FunctionalComponent<P>,
106
- comparer?: (prev: P, next: P) => boolean
107
- ): preact.FunctionComponent<P>;
108
- export function memo<C extends preact.FunctionalComponent<any>>(
109
- component: C,
110
- comparer?: (
111
- prev: preact.ComponentProps<C>,
112
- next: preact.ComponentProps<C>
113
- ) => boolean
114
- ): C;
115
-
116
- export interface ForwardFn<P = {}, T = any> {
117
- (props: P, ref: Ref<T>): preact.ComponentChild;
118
- displayName?: string;
119
- }
120
-
121
- export function forwardRef<R, P = {}>(
122
- fn: ForwardFn<P, R>
123
- ): preact.FunctionalComponent<Omit<P, 'ref'> & { ref?: preact.Ref<R> }>;
124
-
125
- export function unstable_batchedUpdates(
126
- callback: (arg?: any) => void,
127
- arg?: any
128
- ): void;
129
-
130
- export const Children: {
131
- map<T extends preact.ComponentChild, R>(
132
- children: T | T[],
133
- fn: (child: T, i: number) => R
134
- ): R[];
135
- forEach<T extends preact.ComponentChild>(
136
- children: T | T[],
137
- fn: (child: T, i: number) => void
138
- ): void;
139
- count: (children: preact.ComponentChildren) => number;
140
- only: (children: preact.ComponentChildren) => preact.ComponentChild;
141
- toArray: (children: preact.ComponentChildren) => preact.VNode<{}>[];
142
- };
143
-
144
- // scheduler
145
- export const unstable_ImmediatePriority: number;
146
- export const unstable_UserBlockingPriority: number;
147
- export const unstable_NormalPriority: number;
148
- export const unstable_LowPriority: number;
149
- export const unstable_IdlePriority: number;
150
- export function unstable_runWithPriority(
151
- priority: number,
152
- callback: () => void
153
- ): void;
154
- export const unstable_now: () => number;
155
- }
1
+ import * as _hooks from '../../hooks';
2
+ import * as preact from '../../src';
3
+ import { JSXInternal } from '../../src/jsx';
4
+ import * as _Suspense from './suspense';
5
+ import * as _SuspenseList from './suspense-list';
6
+
7
+ // export default React;
8
+ export = React;
9
+ export as namespace React;
10
+ declare namespace React {
11
+ // Export JSX
12
+ export import JSX = JSXInternal;
13
+
14
+ // Hooks
15
+ export import CreateHandle = _hooks.CreateHandle;
16
+ export import EffectCallback = _hooks.EffectCallback;
17
+ export import Inputs = _hooks.Inputs;
18
+ export import PropRef = _hooks.PropRef;
19
+ export import Reducer = _hooks.Reducer;
20
+ export import Ref = _hooks.Ref;
21
+ export import StateUpdater = _hooks.StateUpdater;
22
+ export import useCallback = _hooks.useCallback;
23
+ export import useContext = _hooks.useContext;
24
+ export import useDebugValue = _hooks.useDebugValue;
25
+ export import useEffect = _hooks.useEffect;
26
+ export import useImperativeHandle = _hooks.useImperativeHandle;
27
+ export import useLayoutEffect = _hooks.useLayoutEffect;
28
+ export import useMemo = _hooks.useMemo;
29
+ export import useReducer = _hooks.useReducer;
30
+ export import useRef = _hooks.useRef;
31
+ export import useState = _hooks.useState;
32
+ // React 18 hooks
33
+ export import useInsertionEffect = _hooks.useLayoutEffect;
34
+ export function useTransition(): [false, typeof startTransition];
35
+ export function useDeferredValue<T = any>(val: T): T;
36
+ export function useSyncExternalStore<T>(
37
+ subscribe: (flush: () => void) => () => void,
38
+ getSnapshot: () => T
39
+ ): T;
40
+
41
+ // Preact Defaults
42
+ export import ContextType = preact.ContextType;
43
+ export import RefObject = preact.RefObject;
44
+ export import Component = preact.Component;
45
+ export import FunctionComponent = preact.FunctionComponent;
46
+ export import FC = preact.FunctionComponent;
47
+ export import createContext = preact.createContext;
48
+ export import createRef = preact.createRef;
49
+ export import Fragment = preact.Fragment;
50
+ export import createElement = preact.createElement;
51
+ export import cloneElement = preact.cloneElement;
52
+ export import ComponentProps = preact.ComponentProps;
53
+
54
+ // Suspense
55
+ export import Suspense = _Suspense.Suspense;
56
+ export import lazy = _Suspense.lazy;
57
+ export import SuspenseList = _SuspenseList.SuspenseList;
58
+
59
+ // Compat
60
+ export import StrictMode = preact.Fragment;
61
+ export const version: string;
62
+ export function startTransition(cb: () => void): void;
63
+
64
+ // HTML
65
+ export import HTMLAttributes = JSXInternal.HTMLAttributes;
66
+ export import DetailedHTMLProps = JSXInternal.DetailedHTMLProps;
67
+ export import CSSProperties = JSXInternal.CSSProperties;
68
+
69
+ // Events
70
+ export import TargetedEvent = JSXInternal.TargetedEvent;
71
+ export import ChangeEvent = JSXInternal.TargetedEvent;
72
+ export import ChangeEventHandler = JSXInternal.GenericEventHandler;
73
+
74
+ export function createPortal(
75
+ vnode: preact.VNode,
76
+ container: Element
77
+ ): preact.VNode<any>;
78
+
79
+ export function render(
80
+ vnode: preact.VNode<any>,
81
+ parent: Element,
82
+ callback?: () => void
83
+ ): Component | null;
84
+
85
+ export function hydrate(
86
+ vnode: preact.VNode<any>,
87
+ parent: Element,
88
+ callback?: () => void
89
+ ): Component | null;
90
+
91
+ export function unmountComponentAtNode(
92
+ container: Element | Document | ShadowRoot | DocumentFragment
93
+ ): boolean;
94
+
95
+ export function createFactory(
96
+ type: preact.VNode<any>['type']
97
+ ): (
98
+ props?: any,
99
+ ...children: preact.ComponentChildren[]
100
+ ) => preact.VNode<any>;
101
+ export function isValidElement(element: any): boolean;
102
+ export function findDOMNode(
103
+ component: preact.Component | Element
104
+ ): Element | null;
105
+
106
+ export abstract class PureComponent<P = {}, S = {}> extends preact.Component<
107
+ P,
108
+ S
109
+ > {
110
+ isPureReactComponent: boolean;
111
+ }
112
+
113
+ export function memo<P = {}>(
114
+ component: preact.FunctionalComponent<P>,
115
+ comparer?: (prev: P, next: P) => boolean
116
+ ): preact.FunctionComponent<P>;
117
+ export function memo<C extends preact.FunctionalComponent<any>>(
118
+ component: C,
119
+ comparer?: (
120
+ prev: preact.ComponentProps<C>,
121
+ next: preact.ComponentProps<C>
122
+ ) => boolean
123
+ ): C;
124
+
125
+ export interface ForwardFn<P = {}, T = any> {
126
+ (props: P, ref: Ref<T>): preact.ComponentChild;
127
+ displayName?: string;
128
+ }
129
+
130
+ export function forwardRef<R, P = {}>(
131
+ fn: ForwardFn<P, R>
132
+ ): preact.FunctionalComponent<Omit<P, 'ref'> & { ref?: preact.Ref<R> }>;
133
+
134
+ export function unstable_batchedUpdates(
135
+ callback: (arg?: any) => void,
136
+ arg?: any
137
+ ): void;
138
+
139
+ export const Children: {
140
+ map<T extends preact.ComponentChild, R>(
141
+ children: T | T[],
142
+ fn: (child: T, i: number) => R
143
+ ): R[];
144
+ forEach<T extends preact.ComponentChild>(
145
+ children: T | T[],
146
+ fn: (child: T, i: number) => void
147
+ ): void;
148
+ count: (children: preact.ComponentChildren) => number;
149
+ only: (children: preact.ComponentChildren) => preact.ComponentChild;
150
+ toArray: (children: preact.ComponentChildren) => preact.VNode<{}>[];
151
+ };
152
+
153
+ // scheduler
154
+ export const unstable_ImmediatePriority: number;
155
+ export const unstable_UserBlockingPriority: number;
156
+ export const unstable_NormalPriority: number;
157
+ export const unstable_LowPriority: number;
158
+ export const unstable_IdlePriority: number;
159
+ export function unstable_runWithPriority(
160
+ priority: number,
161
+ callback: () => void
162
+ ): void;
163
+ export const unstable_now: () => number;
164
+ }