isomorfeus-preact 10.6.1 → 10.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) 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 +1 -1
  60. data/node_modules/preact/dist/preact.js.map +1 -1
  61. data/node_modules/preact/dist/preact.min.js +1 -1
  62. data/node_modules/preact/dist/preact.min.js.map +1 -1
  63. data/node_modules/preact/dist/preact.mjs +1 -1
  64. data/node_modules/preact/dist/preact.module.js +1 -1
  65. data/node_modules/preact/dist/preact.module.js.map +1 -1
  66. data/node_modules/preact/dist/preact.umd.js +1 -1
  67. data/node_modules/preact/dist/preact.umd.js.map +1 -1
  68. data/node_modules/preact/hooks/dist/hooks.js +1 -1
  69. data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
  70. data/node_modules/preact/hooks/dist/hooks.mjs +1 -1
  71. data/node_modules/preact/hooks/dist/hooks.module.js +1 -1
  72. data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
  73. data/node_modules/preact/hooks/dist/hooks.umd.js +1 -1
  74. data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
  75. data/node_modules/preact/hooks/package.json +26 -26
  76. data/node_modules/preact/hooks/src/index.d.ts +139 -139
  77. data/node_modules/preact/hooks/src/index.js +388 -379
  78. data/node_modules/preact/hooks/src/internal.d.ts +75 -75
  79. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
  80. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
  81. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
  82. data/node_modules/preact/jsx-runtime/package.json +19 -19
  83. data/node_modules/preact/jsx-runtime/src/index.d.ts +50 -50
  84. data/node_modules/preact/jsx-runtime/src/index.js +77 -77
  85. data/node_modules/preact/package.json +287 -281
  86. data/node_modules/preact/src/cjs.js +3 -3
  87. data/node_modules/preact/src/clone-element.js +34 -34
  88. data/node_modules/preact/src/component.js +225 -225
  89. data/node_modules/preact/src/constants.js +3 -3
  90. data/node_modules/preact/src/create-context.js +68 -68
  91. data/node_modules/preact/src/create-element.js +98 -98
  92. data/node_modules/preact/src/diff/catch-error.js +38 -38
  93. data/node_modules/preact/src/diff/children.js +335 -335
  94. data/node_modules/preact/src/diff/index.js +516 -516
  95. data/node_modules/preact/src/diff/props.js +158 -158
  96. data/node_modules/preact/src/index.d.ts +310 -310
  97. data/node_modules/preact/src/index.js +13 -13
  98. data/node_modules/preact/src/internal.d.ts +146 -146
  99. data/node_modules/preact/src/jsx.d.ts +1005 -1005
  100. data/node_modules/preact/src/options.js +16 -16
  101. data/node_modules/preact/src/render.js +75 -75
  102. data/node_modules/preact/src/util.js +27 -27
  103. data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -1
  104. data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -1
  105. data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -1
  106. data/node_modules/preact/test-utils/package.json +19 -19
  107. data/node_modules/preact/test-utils/src/index.d.ts +3 -3
  108. data/node_modules/preact/test-utils/src/index.js +117 -117
  109. data/package.json +1 -1
  110. metadata +17 -37
  111. data/node_modules/preact/compat/dist/compat.mjs.map +0 -1
  112. data/node_modules/preact/compat/dist/compat.modern.js +0 -2
  113. data/node_modules/preact/compat/dist/compat.modern.js.map +0 -1
  114. data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
  115. data/node_modules/preact/debug/dist/debug.modern.js +0 -2
  116. data/node_modules/preact/debug/dist/debug.modern.js.map +0 -1
  117. data/node_modules/preact/devtools/dist/devtools.mjs.map +0 -1
  118. data/node_modules/preact/devtools/dist/devtools.modern.js +0 -2
  119. data/node_modules/preact/devtools/dist/devtools.modern.js.map +0 -1
  120. data/node_modules/preact/dist/index.d.ts +0 -1295
  121. data/node_modules/preact/dist/preact.mjs.map +0 -1
  122. data/node_modules/preact/hooks/dist/hooks.mjs.map +0 -1
  123. data/node_modules/preact/hooks/dist/hooks.modern.js +0 -2
  124. data/node_modules/preact/hooks/dist/hooks.modern.js.map +0 -1
  125. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs.map +0 -1
  126. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js +0 -2
  127. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js.map +0 -1
  128. data/node_modules/preact/test-utils/dist/testUtils.mjs.map +0 -1
  129. data/node_modules/preact/test-utils/dist/testUtils.modern.js +0 -2
  130. data/node_modules/preact/test-utils/dist/testUtils.modern.js.map +0 -1
@@ -1,146 +1,146 @@
1
- import * as preact from './index';
2
-
3
- export enum HookType {
4
- useState = 1,
5
- useReducer = 2,
6
- useEffect = 3,
7
- useLayoutEffect = 4,
8
- useRef = 5,
9
- useImperativeHandle = 6,
10
- useMemo = 7,
11
- useCallback = 8,
12
- useContext = 9,
13
- useErrorBoundary = 10,
14
- // Not a real hook, but the devtools treat is as such
15
- useDebugvalue = 11
16
- }
17
-
18
- export interface DevSource {
19
- fileName: string;
20
- lineNumber: number;
21
- }
22
-
23
- export interface Options extends preact.Options {
24
- /** Attach a hook that is invoked before render, mainly to check the arguments. */
25
- _root?(
26
- vnode: ComponentChild,
27
- parent: Element | Document | ShadowRoot | DocumentFragment
28
- ): void;
29
- /** Attach a hook that is invoked before a vnode is diffed. */
30
- _diff?(vnode: VNode): void;
31
- /** Attach a hook that is invoked after a tree was mounted or was updated. */
32
- _commit?(vnode: VNode, commitQueue: Component[]): void;
33
- /** Attach a hook that is invoked before a vnode has rendered. */
34
- _render?(vnode: VNode): void;
35
- /** Attach a hook that is invoked before a hook's state is queried. */
36
- _hook?(component: Component, index: number, type: HookType): void;
37
- /** Bypass effect execution. Currenty only used in devtools for hooks inspection */
38
- _skipEffects?: boolean;
39
- /** Attach a hook that is invoked after an error is caught in a component but before calling lifecycle hooks */
40
- _catchError(error: any, vnode: VNode, oldVNode?: VNode | undefined): void;
41
- }
42
-
43
- export type ComponentChild =
44
- | VNode<any>
45
- | string
46
- | number
47
- | boolean
48
- | null
49
- | undefined;
50
- export type ComponentChildren = ComponentChild[] | ComponentChild;
51
-
52
- export interface FunctionComponent<P = {}> extends preact.FunctionComponent<P> {
53
- // Internally, createContext uses `contextType` on a Function component to
54
- // implement the Consumer component
55
- contextType?: PreactContext;
56
-
57
- // Internally, createContext stores a ref to the context object on the Provider
58
- // Function component to help devtools
59
- _contextRef?: PreactContext;
60
-
61
- // Define these properties as undefined on FunctionComponent to get rid of
62
- // some errors in `diff()`
63
- getDerivedStateFromProps?: undefined;
64
- getDerivedStateFromError?: undefined;
65
- }
66
-
67
- export interface ComponentClass<P = {}> extends preact.ComponentClass<P> {
68
- _contextRef?: any;
69
-
70
- // Override public contextType with internal PreactContext type
71
- contextType?: PreactContext;
72
- }
73
-
74
- // Redefine ComponentType using our new internal FunctionComponent interface above
75
- export type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
76
-
77
- export interface PreactElement extends HTMLElement {
78
- _children?: VNode<any> | null;
79
- /** Event listeners to support event delegation */
80
- _listeners?: Record<string, (e: Event) => void>;
81
-
82
- // Preact uses this attribute to detect SVG nodes
83
- ownerSVGElement?: SVGElement | null;
84
-
85
- // style: HTMLElement["style"]; // From HTMLElement
86
-
87
- data?: string | number; // From Text node
88
- }
89
-
90
- // We use the `current` property to differentiate between the two kinds of Refs so
91
- // internally we'll define `current` on both to make TypeScript happy
92
- type RefObject<T> = { current: T | null };
93
- type RefCallback<T> = { (instance: T | null): void; current: undefined };
94
- type Ref<T> = RefObject<T> | RefCallback<T>;
95
-
96
- export interface VNode<P = {}> extends preact.VNode<P> {
97
- // Redefine type here using our internal ComponentType type
98
- type: string | ComponentType<P>;
99
- props: P & { children: ComponentChildren };
100
- ref?: Ref<any> | null;
101
- _children: Array<VNode<any>> | null;
102
- _parent: VNode | null;
103
- _depth: number | null;
104
- /**
105
- * The [first (for Fragments)] DOM child of a VNode
106
- */
107
- _dom: PreactElement | null;
108
- /**
109
- * The last dom child of a Fragment, or components that return a Fragment
110
- */
111
- _nextDom: PreactElement | null;
112
- _component: Component | null;
113
- _hydrating: boolean | null;
114
- constructor: undefined;
115
- _original: number;
116
- }
117
-
118
- export interface Component<P = {}, S = {}> extends preact.Component<P, S> {
119
- // When component is functional component, this is reset to functional component
120
- constructor: ComponentType<P>;
121
- state: S; // Override Component["state"] to not be readonly for internal use, specifically Hooks
122
- base?: PreactElement;
123
-
124
- _dirty: boolean;
125
- _force?: boolean;
126
- _renderCallbacks: Array<() => void>; // Only class components
127
- _globalContext?: any;
128
- _vnode?: VNode<P> | null;
129
- _nextState?: S | null; // Only class components
130
- /** Only used in the devtools to later dirty check if state has changed */
131
- _prevState?: S | null;
132
- /**
133
- * Pointer to the parent dom node. This is only needed for top-level Fragment
134
- * components or array returns.
135
- */
136
- _parentDom?: PreactElement | null;
137
- // Always read, set only when handling error
138
- _processingException?: Component<any, any> | null;
139
- // Always read, set only when handling error. This is used to indicate at diffTime to set _processingException
140
- _pendingError?: Component<any, any> | null;
141
- }
142
-
143
- export interface PreactContext extends preact.Context<any> {
144
- _id: string;
145
- _defaultValue: any;
146
- }
1
+ import * as preact from './index';
2
+
3
+ export enum HookType {
4
+ useState = 1,
5
+ useReducer = 2,
6
+ useEffect = 3,
7
+ useLayoutEffect = 4,
8
+ useRef = 5,
9
+ useImperativeHandle = 6,
10
+ useMemo = 7,
11
+ useCallback = 8,
12
+ useContext = 9,
13
+ useErrorBoundary = 10,
14
+ // Not a real hook, but the devtools treat is as such
15
+ useDebugvalue = 11
16
+ }
17
+
18
+ export interface DevSource {
19
+ fileName: string;
20
+ lineNumber: number;
21
+ }
22
+
23
+ export interface Options extends preact.Options {
24
+ /** Attach a hook that is invoked before render, mainly to check the arguments. */
25
+ _root?(
26
+ vnode: ComponentChild,
27
+ parent: Element | Document | ShadowRoot | DocumentFragment
28
+ ): void;
29
+ /** Attach a hook that is invoked before a vnode is diffed. */
30
+ _diff?(vnode: VNode): void;
31
+ /** Attach a hook that is invoked after a tree was mounted or was updated. */
32
+ _commit?(vnode: VNode, commitQueue: Component[]): void;
33
+ /** Attach a hook that is invoked before a vnode has rendered. */
34
+ _render?(vnode: VNode): void;
35
+ /** Attach a hook that is invoked before a hook's state is queried. */
36
+ _hook?(component: Component, index: number, type: HookType): void;
37
+ /** Bypass effect execution. Currenty only used in devtools for hooks inspection */
38
+ _skipEffects?: boolean;
39
+ /** Attach a hook that is invoked after an error is caught in a component but before calling lifecycle hooks */
40
+ _catchError(error: any, vnode: VNode, oldVNode?: VNode | undefined): void;
41
+ }
42
+
43
+ export type ComponentChild =
44
+ | VNode<any>
45
+ | string
46
+ | number
47
+ | boolean
48
+ | null
49
+ | undefined;
50
+ export type ComponentChildren = ComponentChild[] | ComponentChild;
51
+
52
+ export interface FunctionComponent<P = {}> extends preact.FunctionComponent<P> {
53
+ // Internally, createContext uses `contextType` on a Function component to
54
+ // implement the Consumer component
55
+ contextType?: PreactContext;
56
+
57
+ // Internally, createContext stores a ref to the context object on the Provider
58
+ // Function component to help devtools
59
+ _contextRef?: PreactContext;
60
+
61
+ // Define these properties as undefined on FunctionComponent to get rid of
62
+ // some errors in `diff()`
63
+ getDerivedStateFromProps?: undefined;
64
+ getDerivedStateFromError?: undefined;
65
+ }
66
+
67
+ export interface ComponentClass<P = {}> extends preact.ComponentClass<P> {
68
+ _contextRef?: any;
69
+
70
+ // Override public contextType with internal PreactContext type
71
+ contextType?: PreactContext;
72
+ }
73
+
74
+ // Redefine ComponentType using our new internal FunctionComponent interface above
75
+ export type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
76
+
77
+ export interface PreactElement extends HTMLElement {
78
+ _children?: VNode<any> | null;
79
+ /** Event listeners to support event delegation */
80
+ _listeners?: Record<string, (e: Event) => void>;
81
+
82
+ // Preact uses this attribute to detect SVG nodes
83
+ ownerSVGElement?: SVGElement | null;
84
+
85
+ // style: HTMLElement["style"]; // From HTMLElement
86
+
87
+ data?: string | number; // From Text node
88
+ }
89
+
90
+ // We use the `current` property to differentiate between the two kinds of Refs so
91
+ // internally we'll define `current` on both to make TypeScript happy
92
+ type RefObject<T> = { current: T | null };
93
+ type RefCallback<T> = { (instance: T | null): void; current: undefined };
94
+ type Ref<T> = RefObject<T> | RefCallback<T>;
95
+
96
+ export interface VNode<P = {}> extends preact.VNode<P> {
97
+ // Redefine type here using our internal ComponentType type
98
+ type: string | ComponentType<P>;
99
+ props: P & { children: ComponentChildren };
100
+ ref?: Ref<any> | null;
101
+ _children: Array<VNode<any>> | null;
102
+ _parent: VNode | null;
103
+ _depth: number | null;
104
+ /**
105
+ * The [first (for Fragments)] DOM child of a VNode
106
+ */
107
+ _dom: PreactElement | null;
108
+ /**
109
+ * The last dom child of a Fragment, or components that return a Fragment
110
+ */
111
+ _nextDom: PreactElement | null;
112
+ _component: Component | null;
113
+ _hydrating: boolean | null;
114
+ constructor: undefined;
115
+ _original: number;
116
+ }
117
+
118
+ export interface Component<P = {}, S = {}> extends preact.Component<P, S> {
119
+ // When component is functional component, this is reset to functional component
120
+ constructor: ComponentType<P>;
121
+ state: S; // Override Component["state"] to not be readonly for internal use, specifically Hooks
122
+ base?: PreactElement;
123
+
124
+ _dirty: boolean;
125
+ _force?: boolean;
126
+ _renderCallbacks: Array<() => void>; // Only class components
127
+ _globalContext?: any;
128
+ _vnode?: VNode<P> | null;
129
+ _nextState?: S | null; // Only class components
130
+ /** Only used in the devtools to later dirty check if state has changed */
131
+ _prevState?: S | null;
132
+ /**
133
+ * Pointer to the parent dom node. This is only needed for top-level Fragment
134
+ * components or array returns.
135
+ */
136
+ _parentDom?: PreactElement | null;
137
+ // Always read, set only when handling error
138
+ _processingException?: Component<any, any> | null;
139
+ // Always read, set only when handling error. This is used to indicate at diffTime to set _processingException
140
+ _pendingError?: Component<any, any> | null;
141
+ }
142
+
143
+ export interface PreactContext extends preact.Context<any> {
144
+ _id: string;
145
+ _defaultValue: any;
146
+ }