@bpmn-io/properties-panel 3.13.0 → 3.14.0
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/dist/assets/properties-panel.css +0 -4
- package/dist/index.esm.js +31 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +66 -63
- package/dist/index.js.map +1 -1
- package/package.json +27 -30
- package/preact/README.md +2 -2
- package/preact/compat/LICENSE +21 -0
- package/preact/compat/dist/compat.js +1 -1
- package/preact/compat/dist/compat.js.map +1 -1
- package/preact/compat/dist/compat.mjs +1 -1
- package/preact/compat/dist/compat.module.js +1 -1
- package/preact/compat/dist/compat.module.js.map +1 -1
- package/preact/compat/dist/compat.umd.js +1 -1
- package/preact/compat/dist/compat.umd.js.map +1 -1
- package/preact/compat/server.browser.js +7 -0
- package/preact/compat/server.mjs +7 -0
- package/preact/compat/src/index.d.ts +22 -8
- package/preact/compat/src/index.js +35 -3
- package/preact/compat/src/portals.js +26 -35
- package/preact/compat/src/suspense.js +9 -6
- package/preact/compat/src/util.js +0 -5
- package/preact/debug/LICENSE +21 -0
- package/preact/debug/dist/debug.js +1 -1
- package/preact/debug/dist/debug.js.map +1 -1
- package/preact/debug/dist/debug.mjs +1 -1
- package/preact/debug/dist/debug.module.js +1 -1
- package/preact/debug/dist/debug.module.js.map +1 -1
- package/preact/debug/dist/debug.umd.js +1 -1
- package/preact/debug/dist/debug.umd.js.map +1 -1
- package/preact/debug/src/debug.js +124 -42
- package/preact/devtools/LICENSE +21 -0
- package/preact/devtools/dist/devtools.js +1 -1
- package/preact/devtools/dist/devtools.js.map +1 -1
- package/preact/devtools/dist/devtools.mjs +1 -1
- package/preact/devtools/dist/devtools.module.js +1 -1
- package/preact/devtools/dist/devtools.module.js.map +1 -1
- package/preact/devtools/dist/devtools.umd.js +1 -1
- package/preact/devtools/dist/devtools.umd.js.map +1 -1
- package/preact/devtools/src/devtools.js +1 -1
- package/preact/dist/preact.js +1 -1
- package/preact/dist/preact.js.map +1 -1
- package/preact/dist/preact.min.js +1 -1
- package/preact/dist/preact.min.js.map +1 -1
- package/preact/dist/preact.min.module.js +1 -1
- package/preact/dist/preact.min.module.js.map +1 -1
- package/preact/dist/preact.min.umd.js +1 -1
- package/preact/dist/preact.min.umd.js.map +1 -1
- package/preact/dist/preact.mjs +1 -1
- package/preact/dist/preact.module.js +1 -1
- package/preact/dist/preact.module.js.map +1 -1
- package/preact/dist/preact.umd.js +1 -1
- package/preact/dist/preact.umd.js.map +1 -1
- package/preact/hooks/LICENSE +21 -0
- package/preact/jsx-runtime/LICENSE +21 -0
- package/preact/jsx-runtime/dist/jsxRuntime.js +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.mjs +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.module.js +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.umd.js +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
- package/preact/jsx-runtime/src/index.d.ts +10 -0
- package/preact/jsx-runtime/src/index.js +113 -4
- package/preact/jsx-runtime/src/utils.js +36 -0
- package/preact/package.json +4 -3
- package/preact/src/clone-element.js +6 -4
- package/preact/src/component.js +34 -28
- package/preact/src/constants.js +13 -1
- package/preact/src/create-context.js +3 -3
- package/preact/src/create-element.js +14 -11
- package/preact/src/diff/catch-error.js +11 -7
- package/preact/src/diff/children.js +321 -218
- package/preact/src/diff/index.js +188 -142
- package/preact/src/diff/props.js +31 -38
- package/preact/src/index.d.ts +38 -19
- package/preact/src/index.js +1 -1
- package/preact/src/internal.d.ts +183 -153
- package/preact/src/jsx.d.ts +883 -19
- package/preact/src/options.js +1 -1
- package/preact/src/render.js +11 -11
- package/preact/src/util.js +2 -2
- package/preact/test-utils/dist/testUtils.js +1 -1
- package/preact/test-utils/dist/testUtils.js.map +1 -1
- package/preact/test-utils/dist/testUtils.mjs +1 -1
- package/preact/test-utils/dist/testUtils.module.js +1 -1
- package/preact/test-utils/dist/testUtils.module.js.map +1 -1
- package/preact/test-utils/dist/testUtils.umd.js +1 -1
- package/preact/test-utils/dist/testUtils.umd.js.map +1 -1
- package/preact/test-utils/src/index.js +13 -5
package/preact/src/index.d.ts
CHANGED
|
@@ -194,7 +194,10 @@ export function createElement(
|
|
|
194
194
|
ClassAttributes<HTMLInputElement>)
|
|
195
195
|
| null,
|
|
196
196
|
...children: ComponentChildren[]
|
|
197
|
-
): VNode<
|
|
197
|
+
): VNode<
|
|
198
|
+
| JSXInternal.DOMAttributes<HTMLInputElement> &
|
|
199
|
+
ClassAttributes<HTMLInputElement>
|
|
200
|
+
>;
|
|
198
201
|
export function createElement<
|
|
199
202
|
P extends JSXInternal.HTMLAttributes<T>,
|
|
200
203
|
T extends HTMLElement
|
|
@@ -202,7 +205,7 @@ export function createElement<
|
|
|
202
205
|
type: keyof JSXInternal.IntrinsicElements,
|
|
203
206
|
props: (ClassAttributes<T> & P) | null,
|
|
204
207
|
...children: ComponentChildren[]
|
|
205
|
-
): VNode<
|
|
208
|
+
): VNode<ClassAttributes<T> & P>;
|
|
206
209
|
export function createElement<
|
|
207
210
|
P extends JSXInternal.SVGAttributes<T>,
|
|
208
211
|
T extends HTMLElement
|
|
@@ -210,7 +213,7 @@ export function createElement<
|
|
|
210
213
|
type: keyof JSXInternal.IntrinsicElements,
|
|
211
214
|
props: (ClassAttributes<T> & P) | null,
|
|
212
215
|
...children: ComponentChildren[]
|
|
213
|
-
): VNode<
|
|
216
|
+
): VNode<ClassAttributes<T> & P>;
|
|
214
217
|
export function createElement<T extends HTMLElement>(
|
|
215
218
|
type: string,
|
|
216
219
|
props:
|
|
@@ -219,12 +222,14 @@ export function createElement<T extends HTMLElement>(
|
|
|
219
222
|
JSXInternal.SVGAttributes)
|
|
220
223
|
| null,
|
|
221
224
|
...children: ComponentChildren[]
|
|
222
|
-
): VNode<
|
|
225
|
+
): VNode<
|
|
226
|
+
ClassAttributes<T> & JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes
|
|
227
|
+
>;
|
|
223
228
|
export function createElement<P>(
|
|
224
229
|
type: ComponentType<P>,
|
|
225
230
|
props: (Attributes & P) | null,
|
|
226
231
|
...children: ComponentChildren[]
|
|
227
|
-
): VNode<
|
|
232
|
+
): VNode<P>;
|
|
228
233
|
export namespace createElement {
|
|
229
234
|
export import JSX = JSXInternal;
|
|
230
235
|
}
|
|
@@ -236,7 +241,10 @@ export function h(
|
|
|
236
241
|
ClassAttributes<HTMLInputElement>)
|
|
237
242
|
| null,
|
|
238
243
|
...children: ComponentChildren[]
|
|
239
|
-
): VNode<
|
|
244
|
+
): VNode<
|
|
245
|
+
| JSXInternal.DOMAttributes<HTMLInputElement> &
|
|
246
|
+
ClassAttributes<HTMLInputElement>
|
|
247
|
+
>;
|
|
240
248
|
export function h<
|
|
241
249
|
P extends JSXInternal.HTMLAttributes<T>,
|
|
242
250
|
T extends HTMLElement
|
|
@@ -244,7 +252,7 @@ export function h<
|
|
|
244
252
|
type: keyof JSXInternal.IntrinsicElements,
|
|
245
253
|
props: (ClassAttributes<T> & P) | null,
|
|
246
254
|
...children: ComponentChildren[]
|
|
247
|
-
): VNode<
|
|
255
|
+
): VNode<ClassAttributes<T> & P>;
|
|
248
256
|
export function h<
|
|
249
257
|
P extends JSXInternal.SVGAttributes<T>,
|
|
250
258
|
T extends HTMLElement
|
|
@@ -252,7 +260,7 @@ export function h<
|
|
|
252
260
|
type: keyof JSXInternal.IntrinsicElements,
|
|
253
261
|
props: (ClassAttributes<T> & P) | null,
|
|
254
262
|
...children: ComponentChildren[]
|
|
255
|
-
): VNode<
|
|
263
|
+
): VNode<ClassAttributes<T> & P>;
|
|
256
264
|
export function h<T extends HTMLElement>(
|
|
257
265
|
type: string,
|
|
258
266
|
props:
|
|
@@ -261,12 +269,17 @@ export function h<T extends HTMLElement>(
|
|
|
261
269
|
JSXInternal.SVGAttributes)
|
|
262
270
|
| null,
|
|
263
271
|
...children: ComponentChildren[]
|
|
264
|
-
): VNode<
|
|
272
|
+
): VNode<
|
|
273
|
+
| (ClassAttributes<T> &
|
|
274
|
+
JSXInternal.HTMLAttributes &
|
|
275
|
+
JSXInternal.SVGAttributes)
|
|
276
|
+
| null
|
|
277
|
+
>;
|
|
265
278
|
export function h<P>(
|
|
266
279
|
type: ComponentType<P>,
|
|
267
280
|
props: (Attributes & P) | null,
|
|
268
281
|
...children: ComponentChildren[]
|
|
269
|
-
): VNode<
|
|
282
|
+
): VNode<Attributes & P>;
|
|
270
283
|
export namespace h {
|
|
271
284
|
export import JSX = JSXInternal;
|
|
272
285
|
}
|
|
@@ -274,15 +287,15 @@ export namespace h {
|
|
|
274
287
|
//
|
|
275
288
|
// Preact render
|
|
276
289
|
// -----------------------------------
|
|
277
|
-
|
|
278
290
|
interface ContainerNode {
|
|
279
|
-
nodeType:
|
|
280
|
-
parentNode:
|
|
281
|
-
firstChild:
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
291
|
+
readonly nodeType: number;
|
|
292
|
+
readonly parentNode: ContainerNode | null;
|
|
293
|
+
readonly firstChild: ContainerNode | null;
|
|
294
|
+
readonly childNodes: ArrayLike<ContainerNode>;
|
|
295
|
+
|
|
296
|
+
insertBefore(node: ContainerNode, child: ContainerNode | null): ContainerNode;
|
|
297
|
+
appendChild(node: ContainerNode): ContainerNode;
|
|
298
|
+
removeChild(child: ContainerNode): ContainerNode;
|
|
286
299
|
}
|
|
287
300
|
|
|
288
301
|
export function render(vnode: ComponentChild, parent: ContainerNode): void;
|
|
@@ -336,6 +349,12 @@ export interface Options {
|
|
|
336
349
|
_addHookName?(name: string | number): void;
|
|
337
350
|
__suspenseDidResolve?(vnode: VNode, cb: () => void): void;
|
|
338
351
|
// __canSuspenseResolve?(vnode: VNode, cb: () => void): void;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Customize attribute serialization when a precompiled JSX transform
|
|
355
|
+
* is used.
|
|
356
|
+
*/
|
|
357
|
+
attr?(name: string, value: any): string | void;
|
|
339
358
|
}
|
|
340
359
|
|
|
341
360
|
export const options: Options;
|
|
@@ -361,7 +380,7 @@ export interface PreactConsumer<T> extends Consumer<T> {}
|
|
|
361
380
|
export interface Provider<T>
|
|
362
381
|
extends FunctionComponent<{
|
|
363
382
|
value: T;
|
|
364
|
-
children
|
|
383
|
+
children?: ComponentChildren;
|
|
365
384
|
}> {}
|
|
366
385
|
export interface PreactProvider<T> extends Provider<T> {}
|
|
367
386
|
export type ContextType<C extends Context<any>> = C extends Context<infer T>
|
package/preact/src/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export {
|
|
|
6
6
|
createRef,
|
|
7
7
|
isValidElement
|
|
8
8
|
} from './create-element';
|
|
9
|
-
export { Component } from './component';
|
|
9
|
+
export { BaseComponent as Component } from './component';
|
|
10
10
|
export { cloneElement } from './clone-element';
|
|
11
11
|
export { createContext } from './create-context';
|
|
12
12
|
export { toChildArray } from './diff/children';
|
package/preact/src/internal.d.ts
CHANGED
|
@@ -1,156 +1,186 @@
|
|
|
1
1
|
import * as preact from './index';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
vnode: ComponentChild,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
3
|
+
declare global {
|
|
4
|
+
export enum HookType {
|
|
5
|
+
useState = 1,
|
|
6
|
+
useReducer = 2,
|
|
7
|
+
useEffect = 3,
|
|
8
|
+
useLayoutEffect = 4,
|
|
9
|
+
useRef = 5,
|
|
10
|
+
useImperativeHandle = 6,
|
|
11
|
+
useMemo = 7,
|
|
12
|
+
useCallback = 8,
|
|
13
|
+
useContext = 9,
|
|
14
|
+
useErrorBoundary = 10,
|
|
15
|
+
// Not a real hook, but the devtools treat is as such
|
|
16
|
+
useDebugvalue = 11
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface DevSource {
|
|
20
|
+
fileName: string;
|
|
21
|
+
lineNumber: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ErrorInfo {
|
|
25
|
+
componentStack?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Options extends preact.Options {
|
|
29
|
+
/** Attach a hook that is invoked before render, mainly to check the arguments. */
|
|
30
|
+
_root?(vnode: ComponentChild, parent: preact.ContainerNode): void;
|
|
31
|
+
/** Attach a hook that is invoked before a vnode is diffed. */
|
|
32
|
+
_diff?(vnode: VNode): void;
|
|
33
|
+
/** Attach a hook that is invoked after a tree was mounted or was updated. */
|
|
34
|
+
_commit?(vnode: VNode, commitQueue: Component[]): void;
|
|
35
|
+
/** Attach a hook that is invoked before a vnode has rendered. */
|
|
36
|
+
_render?(vnode: VNode): void;
|
|
37
|
+
/** Attach a hook that is invoked before a hook's state is queried. */
|
|
38
|
+
_hook?(component: Component, index: number, type: HookType): void;
|
|
39
|
+
/** Bypass effect execution. Currenty only used in devtools for hooks inspection */
|
|
40
|
+
_skipEffects?: boolean;
|
|
41
|
+
/** Attach a hook that is invoked after an error is caught in a component but before calling lifecycle hooks */
|
|
42
|
+
_catchError(
|
|
43
|
+
error: any,
|
|
44
|
+
vnode: VNode,
|
|
45
|
+
oldVNode?: VNode | undefined,
|
|
46
|
+
errorInfo?: ErrorInfo | undefined
|
|
47
|
+
): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type ComponentChild =
|
|
51
|
+
| VNode<any>
|
|
52
|
+
| string
|
|
53
|
+
| number
|
|
54
|
+
| boolean
|
|
55
|
+
| null
|
|
56
|
+
| undefined;
|
|
57
|
+
export type ComponentChildren = ComponentChild[] | ComponentChild;
|
|
58
|
+
|
|
59
|
+
export interface FunctionComponent<P = {}>
|
|
60
|
+
extends preact.FunctionComponent<P> {
|
|
61
|
+
// Internally, createContext uses `contextType` on a Function component to
|
|
62
|
+
// implement the Consumer component
|
|
63
|
+
contextType?: PreactContext;
|
|
64
|
+
|
|
65
|
+
// Internally, createContext stores a ref to the context object on the Provider
|
|
66
|
+
// Function component to help devtools
|
|
67
|
+
_contextRef?: PreactContext;
|
|
68
|
+
|
|
69
|
+
// Define these properties as undefined on FunctionComponent to get rid of
|
|
70
|
+
// some errors in `diff()`
|
|
71
|
+
getDerivedStateFromProps?: undefined;
|
|
72
|
+
getDerivedStateFromError?: undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ComponentClass<P = {}> extends preact.ComponentClass<P> {
|
|
76
|
+
_contextRef?: any;
|
|
77
|
+
|
|
78
|
+
// Override public contextType with internal PreactContext type
|
|
79
|
+
contextType?: PreactContext;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Redefine ComponentType using our new internal FunctionComponent interface above
|
|
83
|
+
export type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
|
|
84
|
+
|
|
85
|
+
export interface PreactElement extends preact.ContainerNode {
|
|
86
|
+
// SVG detection
|
|
87
|
+
readonly ownerSVGElement?: SVGElement['ownerSVGElement'];
|
|
88
|
+
// Property used to update Text nodes
|
|
89
|
+
data?: CharacterData['data'];
|
|
90
|
+
// Property to set __dangerouslySetInnerHTML
|
|
91
|
+
innerHTML?: Element['innerHTML'];
|
|
92
|
+
|
|
93
|
+
// Attribute reading and setting
|
|
94
|
+
readonly attributes?: Element['attributes'];
|
|
95
|
+
setAttribute?: Element['setAttribute'];
|
|
96
|
+
removeAttribute?: Element['removeAttribute'];
|
|
97
|
+
|
|
98
|
+
// Event listeners
|
|
99
|
+
addEventListener?: Element['addEventListener'];
|
|
100
|
+
removeEventListener?: Element['removeEventListener'];
|
|
101
|
+
|
|
102
|
+
// Setting styles
|
|
103
|
+
readonly style?: CSSStyleDeclaration;
|
|
104
|
+
|
|
105
|
+
// nextSibling required for inserting nodes
|
|
106
|
+
readonly nextSibling: ContainerNode | null;
|
|
107
|
+
|
|
108
|
+
// Used to match DOM nodes to VNodes during hydration. Note: doesn't exist
|
|
109
|
+
// on Text nodes
|
|
110
|
+
readonly localName?: string;
|
|
111
|
+
|
|
112
|
+
// Input handling
|
|
113
|
+
value?: HTMLInputElement['value'];
|
|
114
|
+
checked?: HTMLInputElement['checked'];
|
|
115
|
+
|
|
116
|
+
// Internal properties
|
|
117
|
+
_children?: VNode<any> | null;
|
|
118
|
+
/** Event listeners to support event delegation */
|
|
119
|
+
_listeners?: Record<string, (e: Event) => void>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface PreactEvent extends Event {
|
|
123
|
+
_dispatched?: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// We use the `current` property to differentiate between the two kinds of Refs so
|
|
127
|
+
// internally we'll define `current` on both to make TypeScript happy
|
|
128
|
+
type RefObject<T> = { current: T | null };
|
|
129
|
+
type RefCallback<T> = { (instance: T | null): void; current: undefined };
|
|
130
|
+
type Ref<T> = RefObject<T> | RefCallback<T>;
|
|
131
|
+
|
|
132
|
+
export interface VNode<P = {}> extends preact.VNode<P> {
|
|
133
|
+
// Redefine type here using our internal ComponentType type, and specify
|
|
134
|
+
// string has an undefined `defaultProps` property to make TS happy
|
|
135
|
+
type: (string & { defaultProps: undefined }) | ComponentType<P>;
|
|
136
|
+
props: P & { children: ComponentChildren };
|
|
137
|
+
ref?: Ref<any> | null;
|
|
138
|
+
_children: Array<VNode<any>> | null;
|
|
139
|
+
_parent: VNode | null;
|
|
140
|
+
_depth: number | null;
|
|
141
|
+
/**
|
|
142
|
+
* The [first (for Fragments)] DOM child of a VNode
|
|
143
|
+
*/
|
|
144
|
+
_dom: PreactElement | null;
|
|
145
|
+
/**
|
|
146
|
+
* The last dom child of a Fragment, or components that return a Fragment
|
|
147
|
+
*/
|
|
148
|
+
_nextDom: PreactElement | null | undefined;
|
|
149
|
+
_component: Component | null;
|
|
150
|
+
constructor: undefined;
|
|
151
|
+
_original: number;
|
|
152
|
+
_index: number;
|
|
153
|
+
_flags: number;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface Component<P = {}, S = {}> extends preact.Component<P, S> {
|
|
157
|
+
// When component is functional component, this is reset to functional component
|
|
158
|
+
constructor: ComponentType<P>;
|
|
159
|
+
state: S; // Override Component["state"] to not be readonly for internal use, specifically Hooks
|
|
160
|
+
base?: PreactElement;
|
|
161
|
+
|
|
162
|
+
_dirty: boolean;
|
|
163
|
+
_force?: boolean;
|
|
164
|
+
_renderCallbacks: Array<() => void>; // Only class components
|
|
165
|
+
_stateCallbacks: Array<() => void>; // Only class components
|
|
166
|
+
_globalContext?: any;
|
|
167
|
+
_vnode?: VNode<P> | null;
|
|
168
|
+
_nextState?: S | null; // Only class components
|
|
169
|
+
/** Only used in the devtools to later dirty check if state has changed */
|
|
170
|
+
_prevState?: S | null;
|
|
171
|
+
/**
|
|
172
|
+
* Pointer to the parent dom node. This is only needed for top-level Fragment
|
|
173
|
+
* components or array returns.
|
|
174
|
+
*/
|
|
175
|
+
_parentDom?: PreactElement | null;
|
|
176
|
+
// Always read, set only when handling error
|
|
177
|
+
_processingException?: Component<any, any> | null;
|
|
178
|
+
// Always read, set only when handling error. This is used to indicate at diffTime to set _processingException
|
|
179
|
+
_pendingError?: Component<any, any> | null;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface PreactContext extends preact.Context<any> {
|
|
183
|
+
_id: string;
|
|
184
|
+
_defaultValue: any;
|
|
185
|
+
}
|
|
156
186
|
}
|