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.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/lib/browser/event.rb +2 -0
  3. data/lib/isomorfeus/preact_view_helper.rb +3 -2
  4. data/lib/isomorfeus/props/validate_hash_proxy.rb +1 -1
  5. data/lib/isomorfeus/props/validator.rb +6 -4
  6. data/lib/isomorfeus-preact.rb +3 -3
  7. data/lib/isomorfeus_preact/lucid_component/api.rb +1 -1
  8. data/lib/isomorfeus_preact/lucid_component/initializer.rb +2 -2
  9. data/lib/isomorfeus_preact/lucid_func/initializer.rb +1 -1
  10. data/lib/isomorfeus_preact/preact/function_component/initializer.rb +1 -1
  11. data/lib/preact/component/api.rb +1 -1
  12. data/lib/preact/component/callbacks.rb +6 -6
  13. data/lib/preact/component/initializer.rb +2 -2
  14. data/lib/preact/component/native_component_constructor.rb +1 -1
  15. data/lib/preact/props.rb +51 -0
  16. data/lib/preact/state.rb +67 -0
  17. data/lib/preact/version.rb +1 -1
  18. data/lib/preact.rb +2 -2
  19. data/node_modules/.package-lock.json +3 -3
  20. data/node_modules/preact/LICENSE +21 -21
  21. data/node_modules/preact/README.md +187 -187
  22. data/node_modules/preact/compat/dist/compat.js +1 -1
  23. data/node_modules/preact/compat/dist/compat.js.map +1 -1
  24. data/node_modules/preact/compat/dist/compat.mjs +1 -1
  25. data/node_modules/preact/compat/dist/compat.module.js +1 -1
  26. data/node_modules/preact/compat/dist/compat.module.js.map +1 -1
  27. data/node_modules/preact/compat/dist/compat.umd.js +1 -1
  28. data/node_modules/preact/compat/dist/compat.umd.js.map +1 -1
  29. data/node_modules/preact/compat/jsx-dev-runtime.js +1 -1
  30. data/node_modules/preact/compat/jsx-dev-runtime.mjs +1 -1
  31. data/node_modules/preact/compat/jsx-runtime.js +1 -1
  32. data/node_modules/preact/compat/jsx-runtime.mjs +1 -1
  33. data/node_modules/preact/compat/package.json +19 -19
  34. data/node_modules/preact/compat/scheduler.js +15 -15
  35. data/node_modules/preact/compat/scheduler.mjs +23 -23
  36. data/node_modules/preact/compat/server.js +15 -15
  37. data/node_modules/preact/compat/server.mjs +4 -4
  38. data/node_modules/preact/compat/src/Children.js +21 -21
  39. data/node_modules/preact/compat/src/PureComponent.js +15 -15
  40. data/node_modules/preact/compat/src/forwardRef.js +51 -51
  41. data/node_modules/preact/compat/src/index.d.ts +141 -141
  42. data/node_modules/preact/compat/src/index.js +187 -187
  43. data/node_modules/preact/compat/src/internal.d.ts +47 -47
  44. data/node_modules/preact/compat/src/memo.js +34 -34
  45. data/node_modules/preact/compat/src/portals.js +80 -80
  46. data/node_modules/preact/compat/src/render.js +229 -230
  47. data/node_modules/preact/compat/src/suspense-list.d.ts +14 -14
  48. data/node_modules/preact/compat/src/suspense-list.js +126 -126
  49. data/node_modules/preact/compat/src/suspense.d.ts +15 -15
  50. data/node_modules/preact/compat/src/suspense.js +270 -270
  51. data/node_modules/preact/compat/src/util.js +28 -28
  52. data/node_modules/preact/compat/test-utils.js +1 -1
  53. data/node_modules/preact/debug/dist/debug.js.map +1 -1
  54. data/node_modules/preact/debug/dist/debug.module.js.map +1 -1
  55. data/node_modules/preact/debug/dist/debug.umd.js.map +1 -1
  56. data/node_modules/preact/debug/package.json +18 -18
  57. data/node_modules/preact/debug/src/check-props.js +54 -54
  58. data/node_modules/preact/debug/src/component-stack.js +146 -146
  59. data/node_modules/preact/debug/src/constants.js +3 -3
  60. data/node_modules/preact/debug/src/debug.js +442 -442
  61. data/node_modules/preact/debug/src/index.js +6 -6
  62. data/node_modules/preact/debug/src/internal.d.ts +82 -82
  63. data/node_modules/preact/debug/src/util.js +11 -11
  64. data/node_modules/preact/devtools/dist/devtools.js +1 -1
  65. data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
  66. data/node_modules/preact/devtools/dist/devtools.mjs +1 -1
  67. data/node_modules/preact/devtools/dist/devtools.module.js +1 -1
  68. data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
  69. data/node_modules/preact/devtools/dist/devtools.umd.js +1 -1
  70. data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
  71. data/node_modules/preact/devtools/package.json +16 -16
  72. data/node_modules/preact/devtools/src/devtools.js +10 -10
  73. data/node_modules/preact/devtools/src/index.d.ts +8 -8
  74. data/node_modules/preact/devtools/src/index.js +15 -15
  75. data/node_modules/preact/dist/preact.js.map +1 -1
  76. data/node_modules/preact/dist/preact.min.js.map +1 -1
  77. data/node_modules/preact/dist/preact.module.js.map +1 -1
  78. data/node_modules/preact/dist/preact.umd.js.map +1 -1
  79. data/node_modules/preact/hooks/dist/hooks.js +1 -1
  80. data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
  81. data/node_modules/preact/hooks/dist/hooks.mjs +1 -1
  82. data/node_modules/preact/hooks/dist/hooks.module.js +1 -1
  83. data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
  84. data/node_modules/preact/hooks/dist/hooks.umd.js +1 -1
  85. data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
  86. data/node_modules/preact/hooks/package.json +26 -26
  87. data/node_modules/preact/hooks/src/index.d.ts +139 -139
  88. data/node_modules/preact/hooks/src/index.js +386 -388
  89. data/node_modules/preact/hooks/src/internal.d.ts +75 -75
  90. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
  91. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
  92. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
  93. data/node_modules/preact/jsx-runtime/package.json +19 -19
  94. data/node_modules/preact/jsx-runtime/src/index.d.ts +50 -50
  95. data/node_modules/preact/jsx-runtime/src/index.js +77 -77
  96. data/node_modules/preact/package.json +291 -287
  97. data/node_modules/preact/src/cjs.js +3 -3
  98. data/node_modules/preact/src/clone-element.js +34 -34
  99. data/node_modules/preact/src/component.js +225 -225
  100. data/node_modules/preact/src/constants.js +3 -3
  101. data/node_modules/preact/src/create-context.js +68 -68
  102. data/node_modules/preact/src/create-element.js +98 -98
  103. data/node_modules/preact/src/diff/catch-error.js +38 -38
  104. data/node_modules/preact/src/diff/children.js +335 -335
  105. data/node_modules/preact/src/diff/index.js +516 -516
  106. data/node_modules/preact/src/diff/props.js +158 -158
  107. data/node_modules/preact/src/index.d.ts +310 -310
  108. data/node_modules/preact/src/index.js +13 -13
  109. data/node_modules/preact/src/internal.d.ts +146 -146
  110. data/node_modules/preact/src/jsx.d.ts +1005 -1005
  111. data/node_modules/preact/src/options.js +16 -16
  112. data/node_modules/preact/src/render.js +75 -75
  113. data/node_modules/preact/src/util.js +27 -27
  114. data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -1
  115. data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -1
  116. data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -1
  117. data/node_modules/preact/test-utils/package.json +19 -19
  118. data/node_modules/preact/test-utils/src/index.d.ts +3 -3
  119. data/node_modules/preact/test-utils/src/index.js +117 -117
  120. data/package.json +1 -1
  121. metadata +8 -8
  122. data/lib/preact/component/props.rb +0 -55
  123. data/lib/preact/component/state.rb +0 -58
@@ -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.4",n.options,{Fragment:n.Fragment,Component:n.Component}),exports.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e};
1
+ var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.5",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';\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
+ {"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.5', options, {\n\t\t\tFragment,\n\t\t\tComponent\n\t\t});\n\t}\n}\n","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"],"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.4",n,{Fragment:o,Component:e});export{t as addHookName};
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.5",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.4",n,{Fragment:o,Component:e});export{t as addHookName};
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.5",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';\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
+ {"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.5', options, {\n\t\t\tFragment,\n\t\t\tComponent\n\t\t});\n\t}\n}\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.4",n.options,{Fragment:n.Fragment,Component:n.Component}),e.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}});
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.5",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';\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
+ {"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.5', options, {\n\t\t\tFragment,\n\t\t\tComponent\n\t\t});\n\t}\n}\n","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"],"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.4', options, {
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.5', 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
+ }