isomorfeus-preact 10.6.11 → 10.6.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/browser/event.rb +2 -0
- data/lib/isomorfeus/preact_view_helper.rb +3 -2
- data/lib/isomorfeus/props/validate_hash_proxy.rb +1 -1
- data/lib/isomorfeus/props/validator.rb +6 -4
- data/lib/isomorfeus-preact.rb +3 -3
- data/lib/isomorfeus_preact/lucid_component/api.rb +1 -1
- data/lib/isomorfeus_preact/lucid_component/initializer.rb +2 -2
- data/lib/isomorfeus_preact/lucid_func/initializer.rb +1 -1
- data/lib/isomorfeus_preact/preact/function_component/initializer.rb +1 -1
- data/lib/preact/component/api.rb +1 -1
- data/lib/preact/component/callbacks.rb +6 -6
- data/lib/preact/component/initializer.rb +2 -2
- data/lib/preact/component/native_component_constructor.rb +1 -1
- data/lib/preact/props.rb +51 -0
- data/lib/preact/state.rb +67 -0
- data/lib/preact/version.rb +1 -1
- data/lib/preact.rb +2 -2
- 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 +229 -230
- 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.map +1 -1
- data/node_modules/preact/dist/preact.min.js.map +1 -1
- data/node_modules/preact/dist/preact.module.js.map +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 +386 -388
- 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 +291 -287
- 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 +8 -8
- data/lib/preact/component/props.rb +0 -55
- data/lib/preact/component/state.rb +0 -58
@@ -1,75 +1,75 @@
|
|
1
|
-
import {
|
2
|
-
Component as PreactComponent,
|
3
|
-
PreactContext
|
4
|
-
} from '../../src/internal';
|
5
|
-
import { Reducer } from '.';
|
6
|
-
|
7
|
-
export { PreactContext };
|
8
|
-
|
9
|
-
/**
|
10
|
-
* The type of arguments passed to a Hook function. While this type is not
|
11
|
-
* strictly necessary, they are given a type name to make it easier to read
|
12
|
-
* the following types and trace the flow of data.
|
13
|
-
*/
|
14
|
-
export type HookArgs = any;
|
15
|
-
|
16
|
-
/**
|
17
|
-
* The return type of a Hook function. While this type is not
|
18
|
-
* strictly necessary, they are given a type name to make it easier to read
|
19
|
-
* the following types and trace the flow of data.
|
20
|
-
*/
|
21
|
-
export type HookReturnValue = any;
|
22
|
-
|
23
|
-
/** The public function a user invokes to use a Hook */
|
24
|
-
export type Hook = (...args: HookArgs[]) => HookReturnValue;
|
25
|
-
|
26
|
-
// Hook tracking
|
27
|
-
|
28
|
-
export interface ComponentHooks {
|
29
|
-
/** The list of hooks a component uses */
|
30
|
-
_list: HookState[];
|
31
|
-
/** List of Effects to be invoked after the next frame is rendered */
|
32
|
-
_pendingEffects: EffectHookState[];
|
33
|
-
}
|
34
|
-
|
35
|
-
export interface Component extends PreactComponent<any, any> {
|
36
|
-
__hooks?: ComponentHooks;
|
37
|
-
}
|
38
|
-
|
39
|
-
export type HookState =
|
40
|
-
| EffectHookState
|
41
|
-
| MemoHookState
|
42
|
-
| ReducerHookState
|
43
|
-
| ContextHookState
|
44
|
-
| ErrorBoundaryHookState;
|
45
|
-
|
46
|
-
export type Effect = () => void | Cleanup;
|
47
|
-
export type Cleanup = () => void;
|
48
|
-
|
49
|
-
export interface EffectHookState {
|
50
|
-
_value?: Effect;
|
51
|
-
_args?: any[];
|
52
|
-
_cleanup?: Cleanup | void;
|
53
|
-
}
|
54
|
-
|
55
|
-
export interface MemoHookState {
|
56
|
-
_value?: any;
|
57
|
-
_args?: any[];
|
58
|
-
_factory?: () => any;
|
59
|
-
}
|
60
|
-
|
61
|
-
export interface ReducerHookState {
|
62
|
-
_value?: any;
|
63
|
-
_component?: Component;
|
64
|
-
_reducer?: Reducer<any, any>;
|
65
|
-
}
|
66
|
-
|
67
|
-
export interface ContextHookState {
|
68
|
-
/** Whether this hooks as subscribed to updates yet */
|
69
|
-
_value?: boolean;
|
70
|
-
_context?: PreactContext;
|
71
|
-
}
|
72
|
-
|
73
|
-
export interface ErrorBoundaryHookState {
|
74
|
-
_value?: (error: any) => void;
|
75
|
-
}
|
1
|
+
import {
|
2
|
+
Component as PreactComponent,
|
3
|
+
PreactContext
|
4
|
+
} from '../../src/internal';
|
5
|
+
import { Reducer } from '.';
|
6
|
+
|
7
|
+
export { PreactContext };
|
8
|
+
|
9
|
+
/**
|
10
|
+
* The type of arguments passed to a Hook function. While this type is not
|
11
|
+
* strictly necessary, they are given a type name to make it easier to read
|
12
|
+
* the following types and trace the flow of data.
|
13
|
+
*/
|
14
|
+
export type HookArgs = any;
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The return type of a Hook function. While this type is not
|
18
|
+
* strictly necessary, they are given a type name to make it easier to read
|
19
|
+
* the following types and trace the flow of data.
|
20
|
+
*/
|
21
|
+
export type HookReturnValue = any;
|
22
|
+
|
23
|
+
/** The public function a user invokes to use a Hook */
|
24
|
+
export type Hook = (...args: HookArgs[]) => HookReturnValue;
|
25
|
+
|
26
|
+
// Hook tracking
|
27
|
+
|
28
|
+
export interface ComponentHooks {
|
29
|
+
/** The list of hooks a component uses */
|
30
|
+
_list: HookState[];
|
31
|
+
/** List of Effects to be invoked after the next frame is rendered */
|
32
|
+
_pendingEffects: EffectHookState[];
|
33
|
+
}
|
34
|
+
|
35
|
+
export interface Component extends PreactComponent<any, any> {
|
36
|
+
__hooks?: ComponentHooks;
|
37
|
+
}
|
38
|
+
|
39
|
+
export type HookState =
|
40
|
+
| EffectHookState
|
41
|
+
| MemoHookState
|
42
|
+
| ReducerHookState
|
43
|
+
| ContextHookState
|
44
|
+
| ErrorBoundaryHookState;
|
45
|
+
|
46
|
+
export type Effect = () => void | Cleanup;
|
47
|
+
export type Cleanup = () => void;
|
48
|
+
|
49
|
+
export interface EffectHookState {
|
50
|
+
_value?: Effect;
|
51
|
+
_args?: any[];
|
52
|
+
_cleanup?: Cleanup | void;
|
53
|
+
}
|
54
|
+
|
55
|
+
export interface MemoHookState {
|
56
|
+
_value?: any;
|
57
|
+
_args?: any[];
|
58
|
+
_factory?: () => any;
|
59
|
+
}
|
60
|
+
|
61
|
+
export interface ReducerHookState {
|
62
|
+
_value?: any;
|
63
|
+
_component?: Component;
|
64
|
+
_reducer?: Reducer<any, any>;
|
65
|
+
}
|
66
|
+
|
67
|
+
export interface ContextHookState {
|
68
|
+
/** Whether this hooks as subscribed to updates yet */
|
69
|
+
_value?: boolean;
|
70
|
+
_context?: PreactContext;
|
71
|
+
}
|
72
|
+
|
73
|
+
export interface ErrorBoundaryHookState {
|
74
|
+
_value?: (error: any) => void;
|
75
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"jsxRuntime.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\
|
1
|
+
{"version":3,"file":"jsxRuntime.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nlet vnodeId = 0;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {string} [__source]\n * @param {string} [__self]\n */\nfunction createVNode(type, props, key, __source, __self) {\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = {},\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'ref') {\n\t\t\tref = props[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (typeof normalizedProps[i] === 'undefined') {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment\n};\n"],"names":["vnodeId","createVNode","type","props","key","__source","__self","ref","i","normalizedProps","vnode","undefined","constructor","defaultProps","options"],"mappings":"wBAIIA,EAAU,EAqBd,SAASC,EAAYC,EAAMC,EAAOC,EAAKC,EAAUC,OAK/CC,EACAC,EAFGC,EAAkB,OAGjBD,KAAKL,EACA,OAALK,EACHD,EAAMJ,EAAMK,GAEZC,EAAgBD,GAAKL,EAAMK,OAIvBE,EAAQ,CACbR,KAAAA,EACAC,MAAOM,EACPL,IAAAA,EACAG,IAAAA,MACW,QACF,SACD,MACF,cACII,MACE,SACA,KACZC,iBAAaD,QACAX,EACbK,SAAAA,EACAC,OAAAA,MAKmB,mBAATJ,IAAwBK,EAAML,EAAKW,kBACxCL,KAAKD,OACyB,IAAvBE,EAAgBD,KAC1BC,EAAgBD,GAAKD,EAAIC,WAIxBM,UAAQJ,OAAOI,UAAQJ,MAAMA,GAC1BA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"jsxRuntime.module.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\
|
1
|
+
{"version":3,"file":"jsxRuntime.module.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nlet vnodeId = 0;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {string} [__source]\n * @param {string} [__self]\n */\nfunction createVNode(type, props, key, __source, __self) {\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = {},\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'ref') {\n\t\t\tref = props[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (typeof normalizedProps[i] === 'undefined') {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment\n};\n"],"names":["vnodeId","createVNode","type","props","key","__source","__self","ref","i","normalizedProps","vnode","undefined","constructor","defaultProps","options"],"mappings":"4EAIA,IAAIA,EAAU,EAqBd,SAASC,EAAYC,EAAMC,EAAOC,EAAKC,EAAUC,OAK/CC,EACAC,EAFGC,EAAkB,OAGjBD,KAAKL,EACA,OAALK,EACHD,EAAMJ,EAAMK,GAEZC,EAAgBD,GAAKL,EAAMK,OAIvBE,EAAQ,CACbR,KAAAA,EACAC,MAAOM,EACPL,IAAAA,EACAG,IAAAA,MACW,QACF,SACD,MACF,cACII,MACE,SACA,KACZC,iBAAaD,QACAX,EACbK,SAAAA,EACAC,OAAAA,MAKmB,mBAATJ,IAAwBK,EAAML,EAAKW,kBACxCL,KAAKD,OACyB,IAAvBE,EAAgBD,KAC1BC,EAAgBD,GAAKD,EAAIC,WAIxBM,EAAQJ,OAAOI,EAAQJ,MAAMA,GAC1BA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"jsxRuntime.umd.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\
|
1
|
+
{"version":3,"file":"jsxRuntime.umd.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nlet vnodeId = 0;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {string} [__source]\n * @param {string} [__self]\n */\nfunction createVNode(type, props, key, __source, __self) {\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = {},\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'ref') {\n\t\t\tref = props[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (typeof normalizedProps[i] === 'undefined') {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment\n};\n"],"names":["vnodeId","createVNode","type","props","key","__source","__self","ref","i","normalizedProps","vnode","undefined","constructor","defaultProps","options"],"mappings":"sNAIA,IAAIA,EAAU,EAqBd,SAASC,EAAYC,EAAMC,EAAOC,EAAKC,EAAUC,OAK/CC,EACAC,EAFGC,EAAkB,OAGjBD,KAAKL,EACA,OAALK,EACHD,EAAMJ,EAAMK,GAEZC,EAAgBD,GAAKL,EAAMK,OAIvBE,EAAQ,CACbR,KAAAA,EACAC,MAAOM,EACPL,IAAAA,EACAG,IAAAA,MACW,QACF,SACD,MACF,cACII,MACE,SACA,KACZC,iBAAaD,QACAX,EACbK,SAAAA,EACAC,OAAAA,MAKmB,mBAATJ,IAAwBK,EAAML,EAAKW,kBACxCL,KAAKD,OACyB,IAAvBE,EAAgBD,KAC1BC,EAAgBD,GAAKD,EAAIC,WAIxBM,UAAQJ,OAAOI,UAAQJ,MAAMA,GAC1BA"}
|
@@ -1,19 +1,19 @@
|
|
1
|
-
{
|
2
|
-
"name": "jsx-runtime",
|
3
|
-
"amdName": "jsxRuntime",
|
4
|
-
"version": "1.0.0",
|
5
|
-
"private": true,
|
6
|
-
"description": "Preact JSX runtime",
|
7
|
-
"main": "dist/jsxRuntime.js",
|
8
|
-
"module": "dist/jsxRuntime.module.js",
|
9
|
-
"umd:main": "dist/jsxRuntime.umd.js",
|
10
|
-
"source": "src/index.js",
|
11
|
-
"types": "src/index.d.ts",
|
12
|
-
"license": "MIT",
|
13
|
-
"peerDependencies": {
|
14
|
-
"preact": "^10.0.0"
|
15
|
-
},
|
16
|
-
"mangle": {
|
17
|
-
"regex": "^_"
|
18
|
-
}
|
19
|
-
}
|
1
|
+
{
|
2
|
+
"name": "jsx-runtime",
|
3
|
+
"amdName": "jsxRuntime",
|
4
|
+
"version": "1.0.0",
|
5
|
+
"private": true,
|
6
|
+
"description": "Preact JSX runtime",
|
7
|
+
"main": "dist/jsxRuntime.js",
|
8
|
+
"module": "dist/jsxRuntime.module.js",
|
9
|
+
"umd:main": "dist/jsxRuntime.umd.js",
|
10
|
+
"source": "src/index.js",
|
11
|
+
"types": "src/index.d.ts",
|
12
|
+
"license": "MIT",
|
13
|
+
"peerDependencies": {
|
14
|
+
"preact": "^10.0.0"
|
15
|
+
},
|
16
|
+
"mangle": {
|
17
|
+
"regex": "^_"
|
18
|
+
}
|
19
|
+
}
|
@@ -1,50 +1,50 @@
|
|
1
|
-
export { Fragment } from '../../';
|
2
|
-
import {
|
3
|
-
ComponentType,
|
4
|
-
ComponentChild,
|
5
|
-
ComponentChildren,
|
6
|
-
VNode,
|
7
|
-
Attributes
|
8
|
-
} from '../../';
|
9
|
-
import { JSXInternal } from '../../src/jsx';
|
10
|
-
|
11
|
-
export function jsx(
|
12
|
-
type: string,
|
13
|
-
props: JSXInternal.HTMLAttributes &
|
14
|
-
JSXInternal.SVGAttributes &
|
15
|
-
Record<string, any> & { children?: ComponentChild },
|
16
|
-
key?: string
|
17
|
-
): VNode<any>;
|
18
|
-
export function jsx<P>(
|
19
|
-
type: ComponentType<P>,
|
20
|
-
props: Attributes & P & { children?: ComponentChild },
|
21
|
-
key?: string
|
22
|
-
): VNode<any>;
|
23
|
-
|
24
|
-
export function jsxs(
|
25
|
-
type: string,
|
26
|
-
props: JSXInternal.HTMLAttributes &
|
27
|
-
JSXInternal.SVGAttributes &
|
28
|
-
Record<string, any> & { children?: ComponentChild[] },
|
29
|
-
key?: string
|
30
|
-
): VNode<any>;
|
31
|
-
export function jsxs<P>(
|
32
|
-
type: ComponentType<P>,
|
33
|
-
props: Attributes & P & { children?: ComponentChild[] },
|
34
|
-
key?: string
|
35
|
-
): VNode<any>;
|
36
|
-
|
37
|
-
export function jsxDEV(
|
38
|
-
type: string,
|
39
|
-
props: JSXInternal.HTMLAttributes &
|
40
|
-
JSXInternal.SVGAttributes &
|
41
|
-
Record<string, any> & { children?: ComponentChildren },
|
42
|
-
key?: string
|
43
|
-
): VNode<any>;
|
44
|
-
export function jsxDEV<P>(
|
45
|
-
type: ComponentType<P>,
|
46
|
-
props: Attributes & P & { children?: ComponentChildren },
|
47
|
-
key?: string
|
48
|
-
): VNode<any>;
|
49
|
-
|
50
|
-
export { JSXInternal as JSX };
|
1
|
+
export { Fragment } from '../../';
|
2
|
+
import {
|
3
|
+
ComponentType,
|
4
|
+
ComponentChild,
|
5
|
+
ComponentChildren,
|
6
|
+
VNode,
|
7
|
+
Attributes
|
8
|
+
} from '../../';
|
9
|
+
import { JSXInternal } from '../../src/jsx';
|
10
|
+
|
11
|
+
export function jsx(
|
12
|
+
type: string,
|
13
|
+
props: JSXInternal.HTMLAttributes &
|
14
|
+
JSXInternal.SVGAttributes &
|
15
|
+
Record<string, any> & { children?: ComponentChild },
|
16
|
+
key?: string
|
17
|
+
): VNode<any>;
|
18
|
+
export function jsx<P>(
|
19
|
+
type: ComponentType<P>,
|
20
|
+
props: Attributes & P & { children?: ComponentChild },
|
21
|
+
key?: string
|
22
|
+
): VNode<any>;
|
23
|
+
|
24
|
+
export function jsxs(
|
25
|
+
type: string,
|
26
|
+
props: JSXInternal.HTMLAttributes &
|
27
|
+
JSXInternal.SVGAttributes &
|
28
|
+
Record<string, any> & { children?: ComponentChild[] },
|
29
|
+
key?: string
|
30
|
+
): VNode<any>;
|
31
|
+
export function jsxs<P>(
|
32
|
+
type: ComponentType<P>,
|
33
|
+
props: Attributes & P & { children?: ComponentChild[] },
|
34
|
+
key?: string
|
35
|
+
): VNode<any>;
|
36
|
+
|
37
|
+
export function jsxDEV(
|
38
|
+
type: string,
|
39
|
+
props: JSXInternal.HTMLAttributes &
|
40
|
+
JSXInternal.SVGAttributes &
|
41
|
+
Record<string, any> & { children?: ComponentChildren },
|
42
|
+
key?: string
|
43
|
+
): VNode<any>;
|
44
|
+
export function jsxDEV<P>(
|
45
|
+
type: ComponentType<P>,
|
46
|
+
props: Attributes & P & { children?: ComponentChildren },
|
47
|
+
key?: string
|
48
|
+
): VNode<any>;
|
49
|
+
|
50
|
+
export { JSXInternal as JSX };
|
@@ -1,77 +1,77 @@
|
|
1
|
-
import { options, Fragment } from 'preact';
|
2
|
-
|
3
|
-
/** @typedef {import('preact').VNode} VNode */
|
4
|
-
|
5
|
-
let vnodeId = 0;
|
6
|
-
|
7
|
-
/**
|
8
|
-
* @fileoverview
|
9
|
-
* This file exports various methods that implement Babel's "automatic" JSX runtime API:
|
10
|
-
* - jsx(type, props, key)
|
11
|
-
* - jsxs(type, props, key)
|
12
|
-
* - jsxDEV(type, props, key, __source, __self)
|
13
|
-
*
|
14
|
-
* The implementation of createVNode here is optimized for performance.
|
15
|
-
* Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3
|
16
|
-
*/
|
17
|
-
|
18
|
-
/**
|
19
|
-
* JSX.Element factory used by Babel's {runtime:"automatic"} JSX transform
|
20
|
-
* @param {VNode['type']} type
|
21
|
-
* @param {VNode['props']} props
|
22
|
-
* @param {VNode['key']} [key]
|
23
|
-
* @param {string} [__source]
|
24
|
-
* @param {string} [__self]
|
25
|
-
*/
|
26
|
-
function createVNode(type, props, key, __source, __self) {
|
27
|
-
// We'll want to preserve `ref` in props to get rid of the need for
|
28
|
-
// forwardRef components in the future, but that should happen via
|
29
|
-
// a separate PR.
|
30
|
-
let normalizedProps = {},
|
31
|
-
ref,
|
32
|
-
i;
|
33
|
-
for (i in props) {
|
34
|
-
if (i == 'ref') {
|
35
|
-
ref = props[i];
|
36
|
-
} else {
|
37
|
-
normalizedProps[i] = props[i];
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
const vnode = {
|
42
|
-
type,
|
43
|
-
props: normalizedProps,
|
44
|
-
key,
|
45
|
-
ref,
|
46
|
-
_children: null,
|
47
|
-
_parent: null,
|
48
|
-
_depth: 0,
|
49
|
-
_dom: null,
|
50
|
-
_nextDom: undefined,
|
51
|
-
_component: null,
|
52
|
-
_hydrating: null,
|
53
|
-
constructor: undefined,
|
54
|
-
_original: --vnodeId,
|
55
|
-
__source,
|
56
|
-
__self
|
57
|
-
};
|
58
|
-
|
59
|
-
// If a Component VNode, check for and apply defaultProps.
|
60
|
-
// Note: `type` is often a String, and can be `undefined` in development.
|
61
|
-
if (typeof type === 'function' && (ref = type.defaultProps)) {
|
62
|
-
for (i in ref)
|
63
|
-
if (typeof normalizedProps[i] === 'undefined') {
|
64
|
-
normalizedProps[i] = ref[i];
|
65
|
-
}
|
66
|
-
}
|
67
|
-
|
68
|
-
if (options.vnode) options.vnode(vnode);
|
69
|
-
return vnode;
|
70
|
-
}
|
71
|
-
|
72
|
-
export {
|
73
|
-
createVNode as jsx,
|
74
|
-
createVNode as jsxs,
|
75
|
-
createVNode as jsxDEV,
|
76
|
-
Fragment
|
77
|
-
};
|
1
|
+
import { options, Fragment } from 'preact';
|
2
|
+
|
3
|
+
/** @typedef {import('preact').VNode} VNode */
|
4
|
+
|
5
|
+
let vnodeId = 0;
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @fileoverview
|
9
|
+
* This file exports various methods that implement Babel's "automatic" JSX runtime API:
|
10
|
+
* - jsx(type, props, key)
|
11
|
+
* - jsxs(type, props, key)
|
12
|
+
* - jsxDEV(type, props, key, __source, __self)
|
13
|
+
*
|
14
|
+
* The implementation of createVNode here is optimized for performance.
|
15
|
+
* Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3
|
16
|
+
*/
|
17
|
+
|
18
|
+
/**
|
19
|
+
* JSX.Element factory used by Babel's {runtime:"automatic"} JSX transform
|
20
|
+
* @param {VNode['type']} type
|
21
|
+
* @param {VNode['props']} props
|
22
|
+
* @param {VNode['key']} [key]
|
23
|
+
* @param {string} [__source]
|
24
|
+
* @param {string} [__self]
|
25
|
+
*/
|
26
|
+
function createVNode(type, props, key, __source, __self) {
|
27
|
+
// We'll want to preserve `ref` in props to get rid of the need for
|
28
|
+
// forwardRef components in the future, but that should happen via
|
29
|
+
// a separate PR.
|
30
|
+
let normalizedProps = {},
|
31
|
+
ref,
|
32
|
+
i;
|
33
|
+
for (i in props) {
|
34
|
+
if (i == 'ref') {
|
35
|
+
ref = props[i];
|
36
|
+
} else {
|
37
|
+
normalizedProps[i] = props[i];
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
const vnode = {
|
42
|
+
type,
|
43
|
+
props: normalizedProps,
|
44
|
+
key,
|
45
|
+
ref,
|
46
|
+
_children: null,
|
47
|
+
_parent: null,
|
48
|
+
_depth: 0,
|
49
|
+
_dom: null,
|
50
|
+
_nextDom: undefined,
|
51
|
+
_component: null,
|
52
|
+
_hydrating: null,
|
53
|
+
constructor: undefined,
|
54
|
+
_original: --vnodeId,
|
55
|
+
__source,
|
56
|
+
__self
|
57
|
+
};
|
58
|
+
|
59
|
+
// If a Component VNode, check for and apply defaultProps.
|
60
|
+
// Note: `type` is often a String, and can be `undefined` in development.
|
61
|
+
if (typeof type === 'function' && (ref = type.defaultProps)) {
|
62
|
+
for (i in ref)
|
63
|
+
if (typeof normalizedProps[i] === 'undefined') {
|
64
|
+
normalizedProps[i] = ref[i];
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
if (options.vnode) options.vnode(vnode);
|
69
|
+
return vnode;
|
70
|
+
}
|
71
|
+
|
72
|
+
export {
|
73
|
+
createVNode as jsx,
|
74
|
+
createVNode as jsxs,
|
75
|
+
createVNode as jsxDEV,
|
76
|
+
Fragment
|
77
|
+
};
|