isomorfeus-preact 10.6.2 → 10.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/lib/preact/version.rb +1 -1
  3. data/node_modules/.package-lock.json +3 -3
  4. data/node_modules/preact/LICENSE +21 -21
  5. data/node_modules/preact/README.md +187 -187
  6. data/node_modules/preact/compat/dist/compat.js +1 -1
  7. data/node_modules/preact/compat/dist/compat.js.map +1 -1
  8. data/node_modules/preact/compat/dist/compat.mjs +1 -1
  9. data/node_modules/preact/compat/dist/compat.module.js +1 -1
  10. data/node_modules/preact/compat/dist/compat.module.js.map +1 -1
  11. data/node_modules/preact/compat/dist/compat.umd.js +1 -1
  12. data/node_modules/preact/compat/dist/compat.umd.js.map +1 -1
  13. data/node_modules/preact/compat/jsx-dev-runtime.js +1 -1
  14. data/node_modules/preact/compat/jsx-dev-runtime.mjs +1 -1
  15. data/node_modules/preact/compat/jsx-runtime.js +1 -1
  16. data/node_modules/preact/compat/jsx-runtime.mjs +1 -1
  17. data/node_modules/preact/compat/package.json +19 -19
  18. data/node_modules/preact/compat/scheduler.js +15 -15
  19. data/node_modules/preact/compat/scheduler.mjs +23 -23
  20. data/node_modules/preact/compat/server.js +15 -15
  21. data/node_modules/preact/compat/server.mjs +4 -4
  22. data/node_modules/preact/compat/src/Children.js +21 -21
  23. data/node_modules/preact/compat/src/PureComponent.js +15 -15
  24. data/node_modules/preact/compat/src/forwardRef.js +51 -51
  25. data/node_modules/preact/compat/src/index.d.ts +141 -141
  26. data/node_modules/preact/compat/src/index.js +187 -187
  27. data/node_modules/preact/compat/src/internal.d.ts +47 -47
  28. data/node_modules/preact/compat/src/memo.js +34 -34
  29. data/node_modules/preact/compat/src/portals.js +80 -80
  30. data/node_modules/preact/compat/src/render.js +230 -226
  31. data/node_modules/preact/compat/src/suspense-list.d.ts +14 -14
  32. data/node_modules/preact/compat/src/suspense-list.js +126 -126
  33. data/node_modules/preact/compat/src/suspense.d.ts +15 -15
  34. data/node_modules/preact/compat/src/suspense.js +270 -270
  35. data/node_modules/preact/compat/src/util.js +28 -28
  36. data/node_modules/preact/compat/test-utils.js +1 -1
  37. data/node_modules/preact/debug/dist/debug.js.map +1 -1
  38. data/node_modules/preact/debug/dist/debug.module.js.map +1 -1
  39. data/node_modules/preact/debug/dist/debug.umd.js.map +1 -1
  40. data/node_modules/preact/debug/package.json +18 -18
  41. data/node_modules/preact/debug/src/check-props.js +54 -54
  42. data/node_modules/preact/debug/src/component-stack.js +146 -146
  43. data/node_modules/preact/debug/src/constants.js +3 -3
  44. data/node_modules/preact/debug/src/debug.js +442 -442
  45. data/node_modules/preact/debug/src/index.js +6 -6
  46. data/node_modules/preact/debug/src/internal.d.ts +82 -82
  47. data/node_modules/preact/debug/src/util.js +11 -11
  48. data/node_modules/preact/devtools/dist/devtools.js +1 -1
  49. data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
  50. data/node_modules/preact/devtools/dist/devtools.mjs +1 -1
  51. data/node_modules/preact/devtools/dist/devtools.module.js +1 -1
  52. data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
  53. data/node_modules/preact/devtools/dist/devtools.umd.js +1 -1
  54. data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
  55. data/node_modules/preact/devtools/package.json +16 -16
  56. data/node_modules/preact/devtools/src/devtools.js +10 -10
  57. data/node_modules/preact/devtools/src/index.d.ts +8 -8
  58. data/node_modules/preact/devtools/src/index.js +15 -15
  59. data/node_modules/preact/dist/preact.js.map +1 -1
  60. data/node_modules/preact/dist/preact.min.js.map +1 -1
  61. data/node_modules/preact/dist/preact.module.js.map +1 -1
  62. data/node_modules/preact/dist/preact.umd.js.map +1 -1
  63. data/node_modules/preact/hooks/dist/hooks.js +1 -1
  64. data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
  65. data/node_modules/preact/hooks/dist/hooks.mjs +1 -1
  66. data/node_modules/preact/hooks/dist/hooks.module.js +1 -1
  67. data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
  68. data/node_modules/preact/hooks/dist/hooks.umd.js +1 -1
  69. data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
  70. data/node_modules/preact/hooks/package.json +26 -26
  71. data/node_modules/preact/hooks/src/index.d.ts +139 -139
  72. data/node_modules/preact/hooks/src/index.js +388 -387
  73. data/node_modules/preact/hooks/src/internal.d.ts +75 -75
  74. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
  75. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
  76. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
  77. data/node_modules/preact/jsx-runtime/package.json +19 -19
  78. data/node_modules/preact/jsx-runtime/src/index.d.ts +50 -50
  79. data/node_modules/preact/jsx-runtime/src/index.js +77 -77
  80. data/node_modules/preact/package.json +287 -287
  81. data/node_modules/preact/src/cjs.js +3 -3
  82. data/node_modules/preact/src/clone-element.js +34 -34
  83. data/node_modules/preact/src/component.js +225 -225
  84. data/node_modules/preact/src/constants.js +3 -3
  85. data/node_modules/preact/src/create-context.js +68 -68
  86. data/node_modules/preact/src/create-element.js +98 -98
  87. data/node_modules/preact/src/diff/catch-error.js +38 -38
  88. data/node_modules/preact/src/diff/children.js +335 -335
  89. data/node_modules/preact/src/diff/index.js +516 -516
  90. data/node_modules/preact/src/diff/props.js +158 -158
  91. data/node_modules/preact/src/index.d.ts +310 -310
  92. data/node_modules/preact/src/index.js +13 -13
  93. data/node_modules/preact/src/internal.d.ts +146 -146
  94. data/node_modules/preact/src/jsx.d.ts +1005 -1005
  95. data/node_modules/preact/src/options.js +16 -16
  96. data/node_modules/preact/src/render.js +75 -75
  97. data/node_modules/preact/src/util.js +27 -27
  98. data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -1
  99. data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -1
  100. data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -1
  101. data/node_modules/preact/test-utils/package.json +19 -19
  102. data/node_modules/preact/test-utils/src/index.d.ts +3 -3
  103. data/node_modules/preact/test-utils/src/index.js +117 -117
  104. data/package.json +1 -1
  105. metadata +17 -37
  106. data/node_modules/preact/compat/dist/compat.mjs.map +0 -1
  107. data/node_modules/preact/compat/dist/compat.modern.js +0 -2
  108. data/node_modules/preact/compat/dist/compat.modern.js.map +0 -1
  109. data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
  110. data/node_modules/preact/debug/dist/debug.modern.js +0 -2
  111. data/node_modules/preact/debug/dist/debug.modern.js.map +0 -1
  112. data/node_modules/preact/devtools/dist/devtools.mjs.map +0 -1
  113. data/node_modules/preact/devtools/dist/devtools.modern.js +0 -2
  114. data/node_modules/preact/devtools/dist/devtools.modern.js.map +0 -1
  115. data/node_modules/preact/dist/index.d.ts +0 -1295
  116. data/node_modules/preact/dist/preact.mjs.map +0 -1
  117. data/node_modules/preact/hooks/dist/hooks.mjs.map +0 -1
  118. data/node_modules/preact/hooks/dist/hooks.modern.js +0 -2
  119. data/node_modules/preact/hooks/dist/hooks.modern.js.map +0 -1
  120. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs.map +0 -1
  121. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js +0 -2
  122. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js.map +0 -1
  123. data/node_modules/preact/test-utils/dist/testUtils.mjs.map +0 -1
  124. data/node_modules/preact/test-utils/dist/testUtils.modern.js +0 -2
  125. data/node_modules/preact/test-utils/dist/testUtils.modern.js.map +0 -1
@@ -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';\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
+ {"version":3,"file":"jsxRuntime.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\r\n\r\n/** @typedef {import('preact').VNode} VNode */\r\n\r\nlet vnodeId = 0;\r\n\r\n/**\r\n * @fileoverview\r\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\r\n * - jsx(type, props, key)\r\n * - jsxs(type, props, key)\r\n * - jsxDEV(type, props, key, __source, __self)\r\n *\r\n * The implementation of createVNode here is optimized for performance.\r\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\r\n */\r\n\r\n/**\r\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\r\n * @param {VNode['type']} type\r\n * @param {VNode['props']} props\r\n * @param {VNode['key']} [key]\r\n * @param {string} [__source]\r\n * @param {string} [__self]\r\n */\r\nfunction createVNode(type, props, key, __source, __self) {\r\n\t// We'll want to preserve `ref` in props to get rid of the need for\r\n\t// forwardRef components in the future, but that should happen via\r\n\t// a separate PR.\r\n\tlet normalizedProps = {},\r\n\t\tref,\r\n\t\ti;\r\n\tfor (i in props) {\r\n\t\tif (i == 'ref') {\r\n\t\t\tref = props[i];\r\n\t\t} else {\r\n\t\t\tnormalizedProps[i] = props[i];\r\n\t\t}\r\n\t}\r\n\r\n\tconst vnode = {\r\n\t\ttype,\r\n\t\tprops: normalizedProps,\r\n\t\tkey,\r\n\t\tref,\r\n\t\t_children: null,\r\n\t\t_parent: null,\r\n\t\t_depth: 0,\r\n\t\t_dom: null,\r\n\t\t_nextDom: undefined,\r\n\t\t_component: null,\r\n\t\t_hydrating: null,\r\n\t\tconstructor: undefined,\r\n\t\t_original: --vnodeId,\r\n\t\t__source,\r\n\t\t__self\r\n\t};\r\n\r\n\t// If a Component VNode, check for and apply defaultProps.\r\n\t// Note: `type` is often a String, and can be `undefined` in development.\r\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\r\n\t\tfor (i in ref)\r\n\t\t\tif (typeof normalizedProps[i] === 'undefined') {\r\n\t\t\t\tnormalizedProps[i] = ref[i];\r\n\t\t\t}\r\n\t}\r\n\r\n\tif (options.vnode) options.vnode(vnode);\r\n\treturn vnode;\r\n}\r\n\r\nexport {\r\n\tcreateVNode as jsx,\r\n\tcreateVNode as jsxs,\r\n\tcreateVNode as jsxDEV,\r\n\tFragment\r\n};\r\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';\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
+ {"version":3,"file":"jsxRuntime.module.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\r\n\r\n/** @typedef {import('preact').VNode} VNode */\r\n\r\nlet vnodeId = 0;\r\n\r\n/**\r\n * @fileoverview\r\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\r\n * - jsx(type, props, key)\r\n * - jsxs(type, props, key)\r\n * - jsxDEV(type, props, key, __source, __self)\r\n *\r\n * The implementation of createVNode here is optimized for performance.\r\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\r\n */\r\n\r\n/**\r\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\r\n * @param {VNode['type']} type\r\n * @param {VNode['props']} props\r\n * @param {VNode['key']} [key]\r\n * @param {string} [__source]\r\n * @param {string} [__self]\r\n */\r\nfunction createVNode(type, props, key, __source, __self) {\r\n\t// We'll want to preserve `ref` in props to get rid of the need for\r\n\t// forwardRef components in the future, but that should happen via\r\n\t// a separate PR.\r\n\tlet normalizedProps = {},\r\n\t\tref,\r\n\t\ti;\r\n\tfor (i in props) {\r\n\t\tif (i == 'ref') {\r\n\t\t\tref = props[i];\r\n\t\t} else {\r\n\t\t\tnormalizedProps[i] = props[i];\r\n\t\t}\r\n\t}\r\n\r\n\tconst vnode = {\r\n\t\ttype,\r\n\t\tprops: normalizedProps,\r\n\t\tkey,\r\n\t\tref,\r\n\t\t_children: null,\r\n\t\t_parent: null,\r\n\t\t_depth: 0,\r\n\t\t_dom: null,\r\n\t\t_nextDom: undefined,\r\n\t\t_component: null,\r\n\t\t_hydrating: null,\r\n\t\tconstructor: undefined,\r\n\t\t_original: --vnodeId,\r\n\t\t__source,\r\n\t\t__self\r\n\t};\r\n\r\n\t// If a Component VNode, check for and apply defaultProps.\r\n\t// Note: `type` is often a String, and can be `undefined` in development.\r\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\r\n\t\tfor (i in ref)\r\n\t\t\tif (typeof normalizedProps[i] === 'undefined') {\r\n\t\t\t\tnormalizedProps[i] = ref[i];\r\n\t\t\t}\r\n\t}\r\n\r\n\tif (options.vnode) options.vnode(vnode);\r\n\treturn vnode;\r\n}\r\n\r\nexport {\r\n\tcreateVNode as jsx,\r\n\tcreateVNode as jsxs,\r\n\tcreateVNode as jsxDEV,\r\n\tFragment\r\n};\r\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';\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
+ {"version":3,"file":"jsxRuntime.umd.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\r\n\r\n/** @typedef {import('preact').VNode} VNode */\r\n\r\nlet vnodeId = 0;\r\n\r\n/**\r\n * @fileoverview\r\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\r\n * - jsx(type, props, key)\r\n * - jsxs(type, props, key)\r\n * - jsxDEV(type, props, key, __source, __self)\r\n *\r\n * The implementation of createVNode here is optimized for performance.\r\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\r\n */\r\n\r\n/**\r\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\r\n * @param {VNode['type']} type\r\n * @param {VNode['props']} props\r\n * @param {VNode['key']} [key]\r\n * @param {string} [__source]\r\n * @param {string} [__self]\r\n */\r\nfunction createVNode(type, props, key, __source, __self) {\r\n\t// We'll want to preserve `ref` in props to get rid of the need for\r\n\t// forwardRef components in the future, but that should happen via\r\n\t// a separate PR.\r\n\tlet normalizedProps = {},\r\n\t\tref,\r\n\t\ti;\r\n\tfor (i in props) {\r\n\t\tif (i == 'ref') {\r\n\t\t\tref = props[i];\r\n\t\t} else {\r\n\t\t\tnormalizedProps[i] = props[i];\r\n\t\t}\r\n\t}\r\n\r\n\tconst vnode = {\r\n\t\ttype,\r\n\t\tprops: normalizedProps,\r\n\t\tkey,\r\n\t\tref,\r\n\t\t_children: null,\r\n\t\t_parent: null,\r\n\t\t_depth: 0,\r\n\t\t_dom: null,\r\n\t\t_nextDom: undefined,\r\n\t\t_component: null,\r\n\t\t_hydrating: null,\r\n\t\tconstructor: undefined,\r\n\t\t_original: --vnodeId,\r\n\t\t__source,\r\n\t\t__self\r\n\t};\r\n\r\n\t// If a Component VNode, check for and apply defaultProps.\r\n\t// Note: `type` is often a String, and can be `undefined` in development.\r\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\r\n\t\tfor (i in ref)\r\n\t\t\tif (typeof normalizedProps[i] === 'undefined') {\r\n\t\t\t\tnormalizedProps[i] = ref[i];\r\n\t\t\t}\r\n\t}\r\n\r\n\tif (options.vnode) options.vnode(vnode);\r\n\treturn vnode;\r\n}\r\n\r\nexport {\r\n\tcreateVNode as jsx,\r\n\tcreateVNode as jsxs,\r\n\tcreateVNode as jsxDEV,\r\n\tFragment\r\n};\r\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
+ };