@legendapp/state 0.20.6-next.3 → 0.20.6-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/react-components.js
CHANGED
|
@@ -7,7 +7,7 @@ var react = require('@legendapp/state/react');
|
|
|
7
7
|
const bindables = new Set(['input', 'textarea', 'select']);
|
|
8
8
|
const bindInfo = { value: { handler: 'onChange', getValue: (e) => e.target.value, defaultValue: '' } };
|
|
9
9
|
const bindInfoInput = Object.assign({ checked: { handler: 'onChange', getValue: (e) => e.target.checked } }, bindInfo);
|
|
10
|
-
const
|
|
10
|
+
const Legend = new Proxy({}, {
|
|
11
11
|
get(target, p) {
|
|
12
12
|
if (!target[p]) {
|
|
13
13
|
target[p] = react.reactive(p, bindables.has(p) && (p === 'input' ? bindInfoInput : bindInfo));
|
|
@@ -28,5 +28,5 @@ Object.defineProperty(exports, 'reactiveObserver', {
|
|
|
28
28
|
enumerable: true,
|
|
29
29
|
get: function () { return react.reactiveObserver; }
|
|
30
30
|
});
|
|
31
|
-
exports.
|
|
31
|
+
exports.Legend = Legend;
|
|
32
32
|
//# sourceMappingURL=react-components.js.map
|
package/react-components.mjs
CHANGED
|
@@ -4,7 +4,7 @@ export { observer, reactive, reactiveObserver } from '@legendapp/state/react';
|
|
|
4
4
|
const bindables = new Set(['input', 'textarea', 'select']);
|
|
5
5
|
const bindInfo = { value: { handler: 'onChange', getValue: (e) => e.target.value, defaultValue: '' } };
|
|
6
6
|
const bindInfoInput = Object.assign({ checked: { handler: 'onChange', getValue: (e) => e.target.checked } }, bindInfo);
|
|
7
|
-
const
|
|
7
|
+
const Legend = new Proxy({}, {
|
|
8
8
|
get(target, p) {
|
|
9
9
|
if (!target[p]) {
|
|
10
10
|
target[p] = reactive(p, bindables.has(p) && (p === 'input' ? bindInfoInput : bindInfo));
|
|
@@ -13,5 +13,5 @@ const legend = new Proxy({}, {
|
|
|
13
13
|
},
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
export {
|
|
16
|
+
export { Legend };
|
|
17
17
|
//# sourceMappingURL=react-components.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShapeWith$ } from '@legendapp/state/react';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
declare type FCReactive<P> = FC<P & ShapeWith$<P>>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const Legend: {
|
|
5
5
|
a: FCReactive<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>>;
|
|
6
6
|
abbr: FCReactive<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
7
7
|
address: FCReactive<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
|