isomorfeus-preact 10.6.0 → 10.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/preact/version.rb +1 -1
- data/node_modules/.package-lock.json +3 -3
- data/node_modules/preact/LICENSE +21 -21
- data/node_modules/preact/README.md +187 -187
- data/node_modules/preact/compat/dist/compat.js +1 -1
- data/node_modules/preact/compat/dist/compat.js.map +1 -1
- data/node_modules/preact/compat/dist/compat.mjs +1 -1
- data/node_modules/preact/compat/dist/compat.module.js +1 -1
- data/node_modules/preact/compat/dist/compat.module.js.map +1 -1
- data/node_modules/preact/compat/dist/compat.umd.js +1 -1
- data/node_modules/preact/compat/dist/compat.umd.js.map +1 -1
- data/node_modules/preact/compat/jsx-dev-runtime.js +1 -1
- data/node_modules/preact/compat/jsx-dev-runtime.mjs +1 -1
- data/node_modules/preact/compat/jsx-runtime.js +1 -1
- data/node_modules/preact/compat/jsx-runtime.mjs +1 -1
- data/node_modules/preact/compat/package.json +19 -19
- data/node_modules/preact/compat/scheduler.js +15 -15
- data/node_modules/preact/compat/scheduler.mjs +23 -23
- data/node_modules/preact/compat/server.js +15 -15
- data/node_modules/preact/compat/server.mjs +4 -4
- data/node_modules/preact/compat/src/Children.js +21 -21
- data/node_modules/preact/compat/src/PureComponent.js +15 -15
- data/node_modules/preact/compat/src/forwardRef.js +51 -51
- data/node_modules/preact/compat/src/index.d.ts +141 -141
- data/node_modules/preact/compat/src/index.js +187 -187
- data/node_modules/preact/compat/src/internal.d.ts +47 -47
- data/node_modules/preact/compat/src/memo.js +34 -34
- data/node_modules/preact/compat/src/portals.js +80 -80
- data/node_modules/preact/compat/src/render.js +230 -226
- data/node_modules/preact/compat/src/suspense-list.d.ts +14 -14
- data/node_modules/preact/compat/src/suspense-list.js +126 -126
- data/node_modules/preact/compat/src/suspense.d.ts +15 -15
- data/node_modules/preact/compat/src/suspense.js +270 -270
- data/node_modules/preact/compat/src/util.js +28 -28
- data/node_modules/preact/compat/test-utils.js +1 -1
- data/node_modules/preact/debug/dist/debug.js.map +1 -1
- data/node_modules/preact/debug/dist/debug.module.js.map +1 -1
- data/node_modules/preact/debug/dist/debug.umd.js.map +1 -1
- data/node_modules/preact/debug/package.json +18 -18
- data/node_modules/preact/debug/src/check-props.js +54 -54
- data/node_modules/preact/debug/src/component-stack.js +146 -146
- data/node_modules/preact/debug/src/constants.js +3 -3
- data/node_modules/preact/debug/src/debug.js +442 -442
- data/node_modules/preact/debug/src/index.js +6 -6
- data/node_modules/preact/debug/src/internal.d.ts +82 -82
- data/node_modules/preact/debug/src/util.js +11 -11
- data/node_modules/preact/devtools/dist/devtools.js +1 -1
- data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
- data/node_modules/preact/devtools/dist/devtools.mjs +1 -1
- data/node_modules/preact/devtools/dist/devtools.module.js +1 -1
- data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
- data/node_modules/preact/devtools/dist/devtools.umd.js +1 -1
- data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
- data/node_modules/preact/devtools/package.json +16 -16
- data/node_modules/preact/devtools/src/devtools.js +10 -10
- data/node_modules/preact/devtools/src/index.d.ts +8 -8
- data/node_modules/preact/devtools/src/index.js +15 -15
- data/node_modules/preact/dist/preact.js +1 -1
- data/node_modules/preact/dist/preact.js.map +1 -1
- data/node_modules/preact/dist/preact.min.js +1 -1
- data/node_modules/preact/dist/preact.min.js.map +1 -1
- data/node_modules/preact/dist/preact.mjs +1 -1
- data/node_modules/preact/dist/preact.module.js +1 -1
- data/node_modules/preact/dist/preact.module.js.map +1 -1
- data/node_modules/preact/dist/preact.umd.js +1 -1
- data/node_modules/preact/dist/preact.umd.js.map +1 -1
- data/node_modules/preact/hooks/dist/hooks.js +1 -1
- data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
- data/node_modules/preact/hooks/dist/hooks.mjs +1 -1
- data/node_modules/preact/hooks/dist/hooks.module.js +1 -1
- data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
- data/node_modules/preact/hooks/dist/hooks.umd.js +1 -1
- data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
- data/node_modules/preact/hooks/package.json +26 -26
- data/node_modules/preact/hooks/src/index.d.ts +139 -139
- data/node_modules/preact/hooks/src/index.js +388 -379
- data/node_modules/preact/hooks/src/internal.d.ts +75 -75
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
- data/node_modules/preact/jsx-runtime/package.json +19 -19
- data/node_modules/preact/jsx-runtime/src/index.d.ts +50 -50
- data/node_modules/preact/jsx-runtime/src/index.js +77 -77
- data/node_modules/preact/package.json +287 -281
- data/node_modules/preact/src/cjs.js +3 -3
- data/node_modules/preact/src/clone-element.js +34 -34
- data/node_modules/preact/src/component.js +225 -225
- data/node_modules/preact/src/constants.js +3 -3
- data/node_modules/preact/src/create-context.js +68 -68
- data/node_modules/preact/src/create-element.js +98 -98
- data/node_modules/preact/src/diff/catch-error.js +38 -38
- data/node_modules/preact/src/diff/children.js +335 -335
- data/node_modules/preact/src/diff/index.js +516 -516
- data/node_modules/preact/src/diff/props.js +158 -158
- data/node_modules/preact/src/index.d.ts +310 -310
- data/node_modules/preact/src/index.js +13 -13
- data/node_modules/preact/src/internal.d.ts +146 -146
- data/node_modules/preact/src/jsx.d.ts +1005 -1005
- data/node_modules/preact/src/options.js +16 -16
- data/node_modules/preact/src/render.js +75 -75
- data/node_modules/preact/src/util.js +27 -27
- data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -1
- data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -1
- data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -1
- data/node_modules/preact/test-utils/package.json +19 -19
- data/node_modules/preact/test-utils/src/index.d.ts +3 -3
- data/node_modules/preact/test-utils/src/index.js +117 -117
- data/package.json +1 -1
- metadata +15 -35
- data/node_modules/preact/compat/dist/compat.mjs.map +0 -1
- data/node_modules/preact/compat/dist/compat.modern.js +0 -2
- data/node_modules/preact/compat/dist/compat.modern.js.map +0 -1
- data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
- data/node_modules/preact/debug/dist/debug.modern.js +0 -2
- data/node_modules/preact/debug/dist/debug.modern.js.map +0 -1
- data/node_modules/preact/devtools/dist/devtools.mjs.map +0 -1
- data/node_modules/preact/devtools/dist/devtools.modern.js +0 -2
- data/node_modules/preact/devtools/dist/devtools.modern.js.map +0 -1
- data/node_modules/preact/dist/index.d.ts +0 -1295
- data/node_modules/preact/dist/preact.mjs.map +0 -1
- data/node_modules/preact/hooks/dist/hooks.mjs.map +0 -1
- data/node_modules/preact/hooks/dist/hooks.modern.js +0 -2
- data/node_modules/preact/hooks/dist/hooks.modern.js.map +0 -1
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs.map +0 -1
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js +0 -2
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js.map +0 -1
- data/node_modules/preact/test-utils/dist/testUtils.mjs.map +0 -1
- data/node_modules/preact/test-utils/dist/testUtils.modern.js +0 -2
- data/node_modules/preact/test-utils/dist/testUtils.modern.js.map +0 -1
@@ -1,6 +1,6 @@
|
|
1
|
-
import { initDebug } from './debug';
|
2
|
-
import 'preact/devtools';
|
3
|
-
|
4
|
-
initDebug();
|
5
|
-
|
6
|
-
export { resetPropWarnings } from './check-props';
|
1
|
+
import { initDebug } from './debug';
|
2
|
+
import 'preact/devtools';
|
3
|
+
|
4
|
+
initDebug();
|
5
|
+
|
6
|
+
export { resetPropWarnings } from './check-props';
|
@@ -1,82 +1,82 @@
|
|
1
|
-
import { Component, PreactElement, VNode, Options } from '../../src/internal';
|
2
|
-
|
3
|
-
export { Component, PreactElement, VNode, Options };
|
4
|
-
|
5
|
-
export interface DevtoolsInjectOptions {
|
6
|
-
/** 1 = DEV, 0 = production */
|
7
|
-
bundleType: 1 | 0;
|
8
|
-
/** The devtools enable different features for different versions of react */
|
9
|
-
version: string;
|
10
|
-
/** Informative string, currently unused in the devtools */
|
11
|
-
rendererPackageName: string;
|
12
|
-
/** Find the root dom node of a vnode */
|
13
|
-
findHostInstanceByFiber(vnode: VNode): HTMLElement | null;
|
14
|
-
/** Find the closest vnode given a dom node */
|
15
|
-
findFiberByHostInstance(instance: HTMLElement): VNode | null;
|
16
|
-
}
|
17
|
-
|
18
|
-
export interface DevtoolsUpdater {
|
19
|
-
setState(objOrFn: any): void;
|
20
|
-
forceUpdate(): void;
|
21
|
-
setInState(path: Array<string | number>, value: any): void;
|
22
|
-
setInProps(path: Array<string | number>, value: any): void;
|
23
|
-
setInContext(): void;
|
24
|
-
}
|
25
|
-
|
26
|
-
export type NodeType = 'Composite' | 'Native' | 'Wrapper' | 'Text';
|
27
|
-
|
28
|
-
export interface DevtoolData {
|
29
|
-
nodeType: NodeType;
|
30
|
-
// Component type
|
31
|
-
type: any;
|
32
|
-
name: string;
|
33
|
-
ref: any;
|
34
|
-
key: string | number;
|
35
|
-
updater: DevtoolsUpdater | null;
|
36
|
-
text: string | number | null;
|
37
|
-
state: any;
|
38
|
-
props: any;
|
39
|
-
children: VNode[] | string | number | null;
|
40
|
-
publicInstance: PreactElement | Text | Component;
|
41
|
-
memoizedInteractions: any[];
|
42
|
-
|
43
|
-
actualDuration: number;
|
44
|
-
actualStartTime: number;
|
45
|
-
treeBaseDuration: number;
|
46
|
-
}
|
47
|
-
|
48
|
-
export type EventType =
|
49
|
-
| 'unmount'
|
50
|
-
| 'rootCommitted'
|
51
|
-
| 'root'
|
52
|
-
| 'mount'
|
53
|
-
| 'update'
|
54
|
-
| 'updateProfileTimes';
|
55
|
-
|
56
|
-
export interface DevtoolsEvent {
|
57
|
-
data?: DevtoolData;
|
58
|
-
internalInstance: VNode;
|
59
|
-
renderer: string;
|
60
|
-
type: EventType;
|
61
|
-
}
|
62
|
-
|
63
|
-
export interface DevtoolsHook {
|
64
|
-
_renderers: Record<string, any>;
|
65
|
-
_roots: Set<VNode>;
|
66
|
-
on(ev: string, listener: () => void): void;
|
67
|
-
emit(ev: string, data?: object): void;
|
68
|
-
helpers: Record<string, any>;
|
69
|
-
getFiberRoots(rendererId: string): Set<any>;
|
70
|
-
inject(config: DevtoolsInjectOptions): string;
|
71
|
-
onCommitFiberRoot(rendererId: string, root: VNode): void;
|
72
|
-
onCommitFiberUnmount(rendererId: string, vnode: VNode): void;
|
73
|
-
}
|
74
|
-
|
75
|
-
export interface DevtoolsWindow extends Window {
|
76
|
-
/**
|
77
|
-
* If the devtools extension is installed it will inject this object into
|
78
|
-
* the dom. This hook handles all communications between preact and the
|
79
|
-
* devtools panel.
|
80
|
-
*/
|
81
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__?: DevtoolsHook;
|
82
|
-
}
|
1
|
+
import { Component, PreactElement, VNode, Options } from '../../src/internal';
|
2
|
+
|
3
|
+
export { Component, PreactElement, VNode, Options };
|
4
|
+
|
5
|
+
export interface DevtoolsInjectOptions {
|
6
|
+
/** 1 = DEV, 0 = production */
|
7
|
+
bundleType: 1 | 0;
|
8
|
+
/** The devtools enable different features for different versions of react */
|
9
|
+
version: string;
|
10
|
+
/** Informative string, currently unused in the devtools */
|
11
|
+
rendererPackageName: string;
|
12
|
+
/** Find the root dom node of a vnode */
|
13
|
+
findHostInstanceByFiber(vnode: VNode): HTMLElement | null;
|
14
|
+
/** Find the closest vnode given a dom node */
|
15
|
+
findFiberByHostInstance(instance: HTMLElement): VNode | null;
|
16
|
+
}
|
17
|
+
|
18
|
+
export interface DevtoolsUpdater {
|
19
|
+
setState(objOrFn: any): void;
|
20
|
+
forceUpdate(): void;
|
21
|
+
setInState(path: Array<string | number>, value: any): void;
|
22
|
+
setInProps(path: Array<string | number>, value: any): void;
|
23
|
+
setInContext(): void;
|
24
|
+
}
|
25
|
+
|
26
|
+
export type NodeType = 'Composite' | 'Native' | 'Wrapper' | 'Text';
|
27
|
+
|
28
|
+
export interface DevtoolData {
|
29
|
+
nodeType: NodeType;
|
30
|
+
// Component type
|
31
|
+
type: any;
|
32
|
+
name: string;
|
33
|
+
ref: any;
|
34
|
+
key: string | number;
|
35
|
+
updater: DevtoolsUpdater | null;
|
36
|
+
text: string | number | null;
|
37
|
+
state: any;
|
38
|
+
props: any;
|
39
|
+
children: VNode[] | string | number | null;
|
40
|
+
publicInstance: PreactElement | Text | Component;
|
41
|
+
memoizedInteractions: any[];
|
42
|
+
|
43
|
+
actualDuration: number;
|
44
|
+
actualStartTime: number;
|
45
|
+
treeBaseDuration: number;
|
46
|
+
}
|
47
|
+
|
48
|
+
export type EventType =
|
49
|
+
| 'unmount'
|
50
|
+
| 'rootCommitted'
|
51
|
+
| 'root'
|
52
|
+
| 'mount'
|
53
|
+
| 'update'
|
54
|
+
| 'updateProfileTimes';
|
55
|
+
|
56
|
+
export interface DevtoolsEvent {
|
57
|
+
data?: DevtoolData;
|
58
|
+
internalInstance: VNode;
|
59
|
+
renderer: string;
|
60
|
+
type: EventType;
|
61
|
+
}
|
62
|
+
|
63
|
+
export interface DevtoolsHook {
|
64
|
+
_renderers: Record<string, any>;
|
65
|
+
_roots: Set<VNode>;
|
66
|
+
on(ev: string, listener: () => void): void;
|
67
|
+
emit(ev: string, data?: object): void;
|
68
|
+
helpers: Record<string, any>;
|
69
|
+
getFiberRoots(rendererId: string): Set<any>;
|
70
|
+
inject(config: DevtoolsInjectOptions): string;
|
71
|
+
onCommitFiberRoot(rendererId: string, root: VNode): void;
|
72
|
+
onCommitFiberUnmount(rendererId: string, vnode: VNode): void;
|
73
|
+
}
|
74
|
+
|
75
|
+
export interface DevtoolsWindow extends Window {
|
76
|
+
/**
|
77
|
+
* If the devtools extension is installed it will inject this object into
|
78
|
+
* the dom. This hook handles all communications between preact and the
|
79
|
+
* devtools panel.
|
80
|
+
*/
|
81
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__?: DevtoolsHook;
|
82
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
/**
|
2
|
-
* Assign properties from `props` to `obj`
|
3
|
-
* @template O, P The obj and props types
|
4
|
-
* @param {O} obj The object to copy properties to
|
5
|
-
* @param {P} props The object to copy properties from
|
6
|
-
* @returns {O & P}
|
7
|
-
*/
|
8
|
-
export function assign(obj, props) {
|
9
|
-
for (let i in props) obj[i] = props[i];
|
10
|
-
return /** @type {O & P} */ (obj);
|
11
|
-
}
|
1
|
+
/**
|
2
|
+
* Assign properties from `props` to `obj`
|
3
|
+
* @template O, P The obj and props types
|
4
|
+
* @param {O} obj The object to copy properties to
|
5
|
+
* @param {P} props The object to copy properties from
|
6
|
+
* @returns {O & P}
|
7
|
+
*/
|
8
|
+
export function assign(obj, props) {
|
9
|
+
for (let i in props) obj[i] = props[i];
|
10
|
+
return /** @type {O & P} */ (obj);
|
11
|
+
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.
|
1
|
+
var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.4",n.options,{Fragment:n.Fragment,Component:n.Component}),exports.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e};
|
2
2
|
//# sourceMappingURL=devtools.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"devtools.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.6.
|
1
|
+
{"version":3,"file":"devtools.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\r\n\r\nexport function initDevTools() {\r\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\r\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.6.4', options, {\r\n\t\t\tFragment,\r\n\t\t\tComponent\r\n\t\t});\r\n\t}\r\n}\r\n","import { options } from 'preact';\r\nimport { initDevTools } from './devtools';\r\n\r\ninitDevTools();\r\n\r\n/**\r\n * Display a custom label for a custom hook for the devtools panel\r\n * @type {<T>(value: T, name: string) => T}\r\n */\r\nexport function addHookName(value, name) {\r\n\tif (options._addHookName) {\r\n\t\toptions._addHookName(name);\r\n\t}\r\n\treturn value;\r\n}\r\n"],"names":["window","__PREACT_DEVTOOLS__","attachPreact","options","Fragment","Component","value","name"],"mappings":"wBAGsB,oBAAVA,QAAyBA,OAAOC,qBAC1CD,OAAOC,oBAAoBC,aAAa,SAAUC,UAAS,CAC1DC,SAAAA,WACAC,UAAAA,kCCGI,SAAqBC,EAAOC,UAC9BJ,eACHA,cAAqBI,GAEfD"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.
|
1
|
+
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.4",n,{Fragment:o,Component:e});export{t as addHookName};
|
2
2
|
//# sourceMappingURL=devtools.module.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.
|
1
|
+
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.4",n,{Fragment:o,Component:e});export{t as addHookName};
|
2
2
|
//# sourceMappingURL=devtools.module.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"devtools.module.js","sources":["../src/index.js","../src/devtools.js"],"sourcesContent":["import { options } from 'preact';\nimport { initDevTools } from './devtools';\n\ninitDevTools();\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, name: string) => T}\n */\nexport function addHookName(value, name) {\n\tif (options._addHookName) {\n\t\toptions._addHookName(name);\n\t}\n\treturn value;\n}\n","import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.6.
|
1
|
+
{"version":3,"file":"devtools.module.js","sources":["../src/index.js","../src/devtools.js"],"sourcesContent":["import { options } from 'preact';\r\nimport { initDevTools } from './devtools';\r\n\r\ninitDevTools();\r\n\r\n/**\r\n * Display a custom label for a custom hook for the devtools panel\r\n * @type {<T>(value: T, name: string) => T}\r\n */\r\nexport function addHookName(value, name) {\r\n\tif (options._addHookName) {\r\n\t\toptions._addHookName(name);\r\n\t}\r\n\treturn value;\r\n}\r\n","import { options, Fragment, Component } from 'preact';\r\n\r\nexport function initDevTools() {\r\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\r\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.6.4', options, {\r\n\t\t\tFragment,\r\n\t\t\tComponent\r\n\t\t});\r\n\t}\r\n}\r\n"],"names":["addHookName","value","name","options","window","__PREACT_DEVTOOLS__","attachPreact","Fragment","Component"],"mappings":"8DASO,SAASA,EAAYC,EAAOC,UAC9BC,OACHA,MAAqBD,GAEfD,ECVc,oBAAVG,QAAyBA,OAAOC,qBAC1CD,OAAOC,oBAAoBC,aAAa,SAAUH,EAAS,CAC1DI,SAAAA,EACAC,UAAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.4",n.options,{Fragment:n.Fragment,Component:n.Component}),e.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}});
|
2
2
|
//# sourceMappingURL=devtools.umd.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"devtools.umd.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.6.
|
1
|
+
{"version":3,"file":"devtools.umd.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\r\n\r\nexport function initDevTools() {\r\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\r\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.6.4', options, {\r\n\t\t\tFragment,\r\n\t\t\tComponent\r\n\t\t});\r\n\t}\r\n}\r\n","import { options } from 'preact';\r\nimport { initDevTools } from './devtools';\r\n\r\ninitDevTools();\r\n\r\n/**\r\n * Display a custom label for a custom hook for the devtools panel\r\n * @type {<T>(value: T, name: string) => T}\r\n */\r\nexport function addHookName(value, name) {\r\n\tif (options._addHookName) {\r\n\t\toptions._addHookName(name);\r\n\t}\r\n\treturn value;\r\n}\r\n"],"names":["window","__PREACT_DEVTOOLS__","attachPreact","options","Fragment","Component","value","name"],"mappings":"0NAGsB,oBAAVA,QAAyBA,OAAOC,qBAC1CD,OAAOC,oBAAoBC,aAAa,SAAUC,UAAS,CAC1DC,SAAAA,WACAC,UAAAA,4BCGI,SAAqBC,EAAOC,UAC9BJ,eACHA,cAAqBI,GAEfD"}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
{
|
2
|
-
"name": "preact-devtools",
|
3
|
-
"amdName": "preactDevtools",
|
4
|
-
"version": "1.0.0",
|
5
|
-
"private": true,
|
6
|
-
"description": "Preact bridge for Preact devtools",
|
7
|
-
"main": "dist/devtools.js",
|
8
|
-
"module": "dist/devtools.module.js",
|
9
|
-
"umd:main": "dist/devtools.umd.js",
|
10
|
-
"source": "src/index.js",
|
11
|
-
"license": "MIT",
|
12
|
-
"types": "src/index.d.ts",
|
13
|
-
"peerDependencies": {
|
14
|
-
"preact": "^10.0.0"
|
15
|
-
}
|
16
|
-
}
|
1
|
+
{
|
2
|
+
"name": "preact-devtools",
|
3
|
+
"amdName": "preactDevtools",
|
4
|
+
"version": "1.0.0",
|
5
|
+
"private": true,
|
6
|
+
"description": "Preact bridge for Preact devtools",
|
7
|
+
"main": "dist/devtools.js",
|
8
|
+
"module": "dist/devtools.module.js",
|
9
|
+
"umd:main": "dist/devtools.umd.js",
|
10
|
+
"source": "src/index.js",
|
11
|
+
"license": "MIT",
|
12
|
+
"types": "src/index.d.ts",
|
13
|
+
"peerDependencies": {
|
14
|
+
"preact": "^10.0.0"
|
15
|
+
}
|
16
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { options, Fragment, Component } from 'preact';
|
2
|
-
|
3
|
-
export function initDevTools() {
|
4
|
-
if (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {
|
5
|
-
window.__PREACT_DEVTOOLS__.attachPreact('10.6.
|
6
|
-
Fragment,
|
7
|
-
Component
|
8
|
-
});
|
9
|
-
}
|
10
|
-
}
|
1
|
+
import { options, Fragment, Component } from 'preact';
|
2
|
+
|
3
|
+
export function initDevTools() {
|
4
|
+
if (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {
|
5
|
+
window.__PREACT_DEVTOOLS__.attachPreact('10.6.4', options, {
|
6
|
+
Fragment,
|
7
|
+
Component
|
8
|
+
});
|
9
|
+
}
|
10
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
/**
|
2
|
-
* Customize the displayed name of a useState, useReducer or useRef hook
|
3
|
-
* in the devtools panel.
|
4
|
-
*
|
5
|
-
* @param value Wrapped native hook.
|
6
|
-
* @param name Custom name
|
7
|
-
*/
|
8
|
-
export function addHookName<T>(value: T, name: string): T;
|
1
|
+
/**
|
2
|
+
* Customize the displayed name of a useState, useReducer or useRef hook
|
3
|
+
* in the devtools panel.
|
4
|
+
*
|
5
|
+
* @param value Wrapped native hook.
|
6
|
+
* @param name Custom name
|
7
|
+
*/
|
8
|
+
export function addHookName<T>(value: T, name: string): T;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { options } from 'preact';
|
2
|
-
import { initDevTools } from './devtools';
|
3
|
-
|
4
|
-
initDevTools();
|
5
|
-
|
6
|
-
/**
|
7
|
-
* Display a custom label for a custom hook for the devtools panel
|
8
|
-
* @type {<T>(value: T, name: string) => T}
|
9
|
-
*/
|
10
|
-
export function addHookName(value, name) {
|
11
|
-
if (options._addHookName) {
|
12
|
-
options._addHookName(name);
|
13
|
-
}
|
14
|
-
return value;
|
15
|
-
}
|
1
|
+
import { options } from 'preact';
|
2
|
+
import { initDevTools } from './devtools';
|
3
|
+
|
4
|
+
initDevTools();
|
5
|
+
|
6
|
+
/**
|
7
|
+
* Display a custom label for a custom hook for the devtools panel
|
8
|
+
* @type {<T>(value: T, name: string) => T}
|
9
|
+
*/
|
10
|
+
export function addHookName(value, name) {
|
11
|
+
if (options._addHookName) {
|
12
|
+
options._addHookName(name);
|
13
|
+
}
|
14
|
+
return value;
|
15
|
+
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var n,l,u,t,i,o,r,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function h(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return p(l,f,i,o,null)}function p(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null==r&&null!=l.vnode&&l.vnode(f),f}function y(n){return n.children}function d(n,l){this.props=n,this.context=l}function _(n,l){if(null==l)return n.__?_(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?_(n):null}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function x(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!b.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)(b)}function b(){for(var n;b.__r=i.length;)n=i.sort(function(n,l){return n.__v.__b-l.__v.__b}),i=[],n.some(function(n){var l,u,t,i,o,r;n.__d&&(o=(i=(l=n).__v).__e,(r=l.__P)&&(u=[],(t=a({},i)).__v=i.__v+1,I(r,i,t,l.__n,void 0!==r.ownerSVGElement,null!=i.__h?[o]:null,u,null==o?_(i):o,i.__h),N(u,i),i.__e!=o&&k(i)))})}function m(n,l,u,t,i,o,r,f,s,a){var v,h,d,k,x,b,m,A=t&&t.__k||c,P=A.length;for(u.__k=[],v=0;v<l.length;v++)if(null!=(k=u.__k[v]=null==(k=l[v])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?p(null,k,null,null,k):Array.isArray(k)?p(y,{children:k},null,null,null):k.__b>0?p(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=A[v])||d&&k.key==d.key&&k.type===d.type)A[v]=void 0;else for(h=0;h<P;h++){if((d=A[h])&&k.key==d.key&&k.type===d.type){A[h]=void 0;break}d=null}I(n,k,d=d||e,i,o,r,f,s,a),x=k.__e,(h=k.ref)&&d.ref!=h&&(m||(m=[]),d.ref&&m.push(d.ref,null,k),m.push(h,k.__c||x,k)),null!=x?(null==b&&(b=x),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=g(k,s,n):s=w(n,k,d,A,x,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_(d))}for(u.__e=b,v=P;v--;)null!=A[v]&&("function"==typeof u.type&&null!=A[v].__e&&A[v].__e==u.__d&&(u.__d=_(t,v+1)),z(A[v],A[v]));if(m)for(v=0;v<m.length;v++)j(m[v],m[++v],m[++v])}function g(n,l,u){for(var t,i=n.__k,o=0;i&&o<i.length;o++)(t=i[o])&&(t.__=n,l="function"==typeof t.type?g(t,l,u):w(u,t,t,i,t.__e,l));return l}function w(n,l,u,t,i,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||i!=o||null==i.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(i),r=null;else{for(f=o,e=0;(f=f.nextSibling)&&e<t.length;e+=2)if(f==i)break n;n.insertBefore(i,o),r=o}return void 0!==r?r:i.nextSibling}function A(n,l,u,t,i){var o;for(o in u)"children"===o||"key"===o||o in l||C(n,o,null,u[o],t);for(o in l)i&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||C(n,o,l[o],u[o],t)}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px"}function C(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||P(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||P(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t||n.addEventListener(l,o?H:$,o):n.removeEventListener(l,o?H:$,o);else if("dangerouslySetInnerHTML"!==l){if(i)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function $(n){this.l[n.type+!1](l.event?l.event(n):n)}function H(n){this.l[n.type+!0](l.event?l.event(n):n)}function I(n,u,t,i,o,r,f,e,c){var s,v,h,p,_,k,x,b,g,w,A,P=u.type;if(void 0!==u.constructor)return null;null!=t.__h&&(c=t.__h,e=u.__e=t.__e,u.__h=null,r=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(b=u.props,g=(s=P.contextType)&&i[s.__c],w=s?g?g.props.value:s.__:i,t.__c?x=(v=u.__c=t.__c).__=v.__E:("prototype"in P&&P.prototype.render?u.__c=v=new P(b,w):(u.__c=v=new d(b,w),v.constructor=P,v.render=L),g&&g.sub(v),v.props=b,v.state||(v.state={}),v.context=w,v.__n=i,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=a({},v.__s)),a(v.__s,P.getDerivedStateFromProps(b,v.__s))),p=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else{if(null==P.getDerivedStateFromProps&&b!==p&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(b,w),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(b,v.__s,w)||u.__v===t.__v){v.props=b,v.state=v.__s,u.__v!==t.__v&&(v.__d=!1),v.__v=u,u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),v.__h.length&&f.push(v);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(b,v.__s,w),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(p,_,k)})}v.context=w,v.props=b,v.state=v.__s,(s=l.__r)&&s(u),v.__d=!1,v.__v=u,v.__P=n,s=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(i=a(a({},i),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(p,_)),A=null!=s&&s.type===y&&null==s.key?s.props.children:s,m(n,Array.isArray(A)?A:[A],u,t,i,o,r,f,e,c),v.base=u.__e,u.__h=null,v.__h.length&&f.push(v),x&&(v.__E=v.__=null),v.__e=!1}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=T(t.__e,u,t,i,o,r,f,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l.__e(n,u,t)}}function N(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function T(l,u,t,i,o,r,f,c){var s,a,h,p=t.props,y=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"localName"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(y);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,y.is&&y),r=null,c=!1}if(null===d)p===y||c&&l.data===y||(l.data=y);else{if(r=r&&n.call(l.childNodes),a=(p=t.props||e).dangerouslySetInnerHTML,h=y.dangerouslySetInnerHTML,!c){if(null!=r)for(p={},k=0;k<l.attributes.length;k++)p[l.attributes[k].name]=l.attributes[k].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""))}if(A(l,y,p,o,c),h)u.__k=[];else if(k=u.props.children,m(l,Array.isArray(k)?k:[k],u,t,i,o&&"foreignObject"!==d,r,f,r?r[0]:t.__k&&_(t,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&v(r[k]);c||("value"in y&&void 0!==(k=y.value)&&(k!==p.value||k!==l.value||"progress"===d&&!k)&&C(l,"value",k,p.value,!1),"checked"in y&&void 0!==(k=y.checked)&&k!==l.checked&&C(l,"checked",k,p.checked,!1))}return l}function j(n,u,t){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function z(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||j(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&z(i[o],u,"function"!=typeof n.type);t||null==n.__e||v(n.__e),n.__e=n.__d=void 0}function L(n,l,u){return this.constructor(n,u)}function M(u,t,i){var o,r,f;l.__&&l.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],I(t,u=(!o&&i||t).__k=h(y,null,[u]),r||e,e,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o),N(f,u)}n=c.slice,l={__e:function(n,l){for(var u,t,i;l=l.__;)if((u=l.__c)&&!u.__)try{if((t=u.constructor)&&null!=t.getDerivedStateFromError&&(u.setState(t.getDerivedStateFromError(n)),i=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),i=u.__d),i)return u.__E=u}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},d.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),x(this))},d.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),x(this))},d.prototype.render=y,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b.__r=0,f=0,exports.render=M,exports.hydrate=function n(l,u){M(l,u,n)},exports.createElement=h,exports.h=h,exports.Fragment=y,exports.createRef=function(){return{current:null}},exports.isValidElement=t,exports.Component=d,exports.cloneElement=function(l,u,t){var i,o,r,f=a({},l.props);for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),p(l.type,f,i||l.key,o||l.ref,null)},exports.createContext=function(n,l){var u={__c:l="__cC"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(x)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u},exports.toChildArray=function n(l,u){return u=u||[],null==l||"boolean"==typeof l||(Array.isArray(l)?l.some(function(l){n(l,u)}):u.push(l)),u},exports.options=l;
|
1
|
+
var n,l,u,t,i,r,o,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function h(l,u,t){var i,r,o,f={};for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,i,r,null)}function p(n,t,i,r,o){var f={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function y(n){return n.children}function d(n,l){this.props=n,this.context=l}function _(n,l){if(null==l)return n.__?_(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?_(n):null}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function x(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!b.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(b)}function b(){for(var n;b.__r=i.length;)n=i.sort(function(n,l){return n.__v.__b-l.__v.__b}),i=[],n.some(function(n){var l,u,t,i,r,o;n.__d&&(r=(i=(l=n).__v).__e,(o=l.__P)&&(u=[],(t=a({},i)).__v=i.__v+1,I(o,i,t,l.__n,void 0!==o.ownerSVGElement,null!=i.__h?[r]:null,u,null==r?_(i):r,i.__h),T(u,i),i.__e!=r&&k(i)))})}function m(n,l,u,t,i,r,o,f,s,a){var v,h,d,k,x,b,m,A=t&&t.__k||c,P=A.length;for(u.__k=[],v=0;v<l.length;v++)if(null!=(k=u.__k[v]=null==(k=l[v])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?p(null,k,null,null,k):Array.isArray(k)?p(y,{children:k},null,null,null):k.__b>0?p(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=A[v])||d&&k.key==d.key&&k.type===d.type)A[v]=void 0;else for(h=0;h<P;h++){if((d=A[h])&&k.key==d.key&&k.type===d.type){A[h]=void 0;break}d=null}I(n,k,d=d||e,i,r,o,f,s,a),x=k.__e,(h=k.ref)&&d.ref!=h&&(m||(m=[]),d.ref&&m.push(d.ref,null,k),m.push(h,k.__c||x,k)),null!=x?(null==b&&(b=x),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=g(k,s,n):s=w(n,k,d,A,x,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_(d))}for(u.__e=b,v=P;v--;)null!=A[v]&&("function"==typeof u.type&&null!=A[v].__e&&A[v].__e==u.__d&&(u.__d=_(t,v+1)),L(A[v],A[v]));if(m)for(v=0;v<m.length;v++)z(m[v],m[++v],m[++v])}function g(n,l,u){for(var t,i=n.__k,r=0;i&&r<i.length;r++)(t=i[r])&&(t.__=n,l="function"==typeof t.type?g(t,l,u):w(u,t,t,i,t.__e,l));return l}function w(n,l,u,t,i,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||i!=r||null==i.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(i),o=null;else{for(f=r,e=0;(f=f.nextSibling)&&e<t.length;e+=2)if(f==i)break n;n.insertBefore(i,r),o=r}return void 0!==o?o:i.nextSibling}function A(n,l,u,t,i){var r;for(r in u)"children"===r||"key"===r||r in l||C(n,r,null,u[r],t);for(r in l)i&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||C(n,r,l[r],u[r],t)}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px"}function C(n,l,u,t,i){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||P(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||P(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t||n.addEventListener(l,r?H:$,r):n.removeEventListener(l,r?H:$,r);else if("dangerouslySetInnerHTML"!==l){if(i)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function $(n){this.l[n.type+!1](l.event?l.event(n):n)}function H(n){this.l[n.type+!0](l.event?l.event(n):n)}function I(n,u,t,i,r,o,f,e,c){var s,v,h,p,_,k,x,b,g,w,A,P=u.type;if(void 0!==u.constructor)return null;null!=t.__h&&(c=t.__h,e=u.__e=t.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(b=u.props,g=(s=P.contextType)&&i[s.__c],w=s?g?g.props.value:s.__:i,t.__c?x=(v=u.__c=t.__c).__=v.__E:("prototype"in P&&P.prototype.render?u.__c=v=new P(b,w):(u.__c=v=new d(b,w),v.constructor=P,v.render=M),g&&g.sub(v),v.props=b,v.state||(v.state={}),v.context=w,v.__n=i,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=a({},v.__s)),a(v.__s,P.getDerivedStateFromProps(b,v.__s))),p=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else{if(null==P.getDerivedStateFromProps&&b!==p&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(b,w),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(b,v.__s,w)||u.__v===t.__v){v.props=b,v.state=v.__s,u.__v!==t.__v&&(v.__d=!1),v.__v=u,u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),v.__h.length&&f.push(v);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(b,v.__s,w),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(p,_,k)})}v.context=w,v.props=b,v.state=v.__s,(s=l.__r)&&s(u),v.__d=!1,v.__v=u,v.__P=n,s=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(i=a(a({},i),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(p,_)),A=null!=s&&s.type===y&&null==s.key?s.props.children:s,m(n,Array.isArray(A)?A:[A],u,t,i,r,o,f,e,c),v.base=u.__e,u.__h=null,v.__h.length&&f.push(v),x&&(v.__E=v.__=null),v.__e=!1}else null==o&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=j(t.__e,u,t,i,r,o,f,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l.__e(n,u,t)}}function T(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function j(l,u,t,i,r,o,f,c){var s,a,h,p=t.props,y=u.props,d=u.type,k=0;if("svg"===d&&(r=!0),null!=o)for(;k<o.length;k++)if((s=o[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[k]=null;break}if(null==l){if(null===d)return document.createTextNode(y);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,y.is&&y),o=null,c=!1}if(null===d)p===y||c&&l.data===y||(l.data=y);else{if(o=o&&n.call(l.childNodes),a=(p=t.props||e).dangerouslySetInnerHTML,h=y.dangerouslySetInnerHTML,!c){if(null!=o)for(p={},k=0;k<l.attributes.length;k++)p[l.attributes[k].name]=l.attributes[k].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""))}if(A(l,y,p,r,c),h)u.__k=[];else if(k=u.props.children,m(l,Array.isArray(k)?k:[k],u,t,i,r&&"foreignObject"!==d,o,f,o?o[0]:t.__k&&_(t,0),c),null!=o)for(k=o.length;k--;)null!=o[k]&&v(o[k]);c||("value"in y&&void 0!==(k=y.value)&&(k!==p.value||k!==l.value||"progress"===d&&!k)&&C(l,"value",k,p.value,!1),"checked"in y&&void 0!==(k=y.checked)&&k!==l.checked&&C(l,"checked",k,p.checked,!1))}return l}function z(n,u,t){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function L(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||z(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&L(i[r],u,"function"!=typeof n.type);t||null==n.__e||v(n.__e),n.__e=n.__d=void 0}function M(n,l,u){return this.constructor(n,u)}function N(u,t,i){var r,o,f;l.__&&l.__(u,t),o=(r="function"==typeof i)?null:i&&i.__k||t.__k,f=[],I(t,u=(!r&&i||t).__k=h(y,null,[u]),o||e,e,void 0!==t.ownerSVGElement,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,f,!r&&i?i:o?o.__e:t.firstChild,r),T(f,u)}n=c.slice,l={__e:function(n,l){for(var u,t,i;l=l.__;)if((u=l.__c)&&!u.__)try{if((t=u.constructor)&&null!=t.getDerivedStateFromError&&(u.setState(t.getDerivedStateFromError(n)),i=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),i=u.__d),i)return u.__E=u}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},d.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),x(this))},d.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),x(this))},d.prototype.render=y,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b.__r=0,f=0,exports.render=N,exports.hydrate=function n(l,u){N(l,u,n)},exports.createElement=h,exports.h=h,exports.Fragment=y,exports.createRef=function(){return{current:null}},exports.isValidElement=t,exports.Component=d,exports.cloneElement=function(l,u,t){var i,r,o,f=a({},l.props);for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:f[o]=u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),p(l.type,f,i||l.key,r||l.ref,null)},exports.createContext=function(n,l){var u={__c:l="__cC"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(x)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u},exports.toChildArray=function n(l,u){return u=u||[],null==l||"boolean"==typeof l||(Array.isArray(l)?l.some(function(l){n(l,u)}):u.push(l)),u},exports.options=l;
|
2
2
|
//# sourceMappingURL=preact.js.map
|