@legendapp/state 2.0.0-beta.7 → 2.0.0-beta.8
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/config/enableDirectAccess.js +6 -3
- package/config/enableDirectAccess.js.map +1 -1
- package/config/enableDirectAccess.mjs +7 -4
- package/config/enableDirectAccess.mjs.map +1 -1
- package/config/enableReactDirectRender.d.ts +2 -0
- package/config/enableReactDirectRender.js +78 -0
- package/config/enableReactDirectRender.js.map +1 -0
- package/config/enableReactDirectRender.mjs +75 -0
- package/config/enableReactDirectRender.mjs.map +1 -0
- package/config/enableReactTracking.d.ts +15 -0
- package/config/enableReactTracking.js +47 -0
- package/config/enableReactTracking.js.map +1 -0
- package/config/enableReactTracking.mjs +45 -0
- package/config/enableReactTracking.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +54 -24
- package/index.js.map +1 -1
- package/index.mjs +53 -25
- package/index.mjs.map +1 -1
- package/package.json +11 -1
- package/persist-plugins/firebase.js +2 -2
- package/persist-plugins/firebase.js.map +1 -1
- package/persist-plugins/firebase.mjs +2 -2
- package/persist-plugins/firebase.mjs.map +1 -1
- package/persist-plugins/query.d.ts +1 -3
- package/persist-plugins/query.js +7 -17
- package/persist-plugins/query.js.map +1 -1
- package/persist-plugins/query.mjs +7 -17
- package/persist-plugins/query.mjs.map +1 -1
- package/persist.js +8 -7
- package/persist.js.map +1 -1
- package/persist.mjs +9 -8
- package/persist.mjs.map +1 -1
- package/react-hooks/usePersistedObservable.d.ts +2 -2
- package/react.js +57 -22
- package/react.js.map +1 -1
- package/react.mjs +58 -23
- package/react.mjs.map +1 -1
- package/src/ObservableObject.d.ts +3 -3
- package/src/config/enableReactDirectRender.d.ts +2 -0
- package/src/config/enableReactTracking.d.ts +15 -0
- package/src/createObservable.d.ts +2 -0
- package/src/globals.d.ts +2 -0
- package/src/observable.d.ts +3 -3
- package/src/observableInterfaces.d.ts +27 -18
- package/src/persist/observablePersistRemoteFunctionsAdapter.d.ts +1 -1
- package/src/persist/persistObservable.d.ts +3 -3
- package/src/persist-plugins/query.d.ts +1 -3
- package/src/react/For.d.ts +7 -5
- package/src/react/useMount.d.ts +1 -2
- package/src/react-hooks/usePersistedObservable.d.ts +2 -2
|
@@ -3,15 +3,18 @@
|
|
|
3
3
|
var state = require('@legendapp/state');
|
|
4
4
|
|
|
5
5
|
function enableDirectAccess() {
|
|
6
|
+
const { observableFns, set } = state.internal;
|
|
6
7
|
state.configureLegendState({
|
|
7
8
|
observableProperties: {
|
|
8
9
|
$: {
|
|
9
10
|
get(node) {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
// Get it from the observableFns Map because another config function
|
|
12
|
+
// might have overriden get
|
|
13
|
+
const get = observableFns.get('get');
|
|
14
|
+
return get(node);
|
|
12
15
|
},
|
|
13
16
|
set(node, value) {
|
|
14
|
-
return
|
|
17
|
+
return set(node, value);
|
|
15
18
|
},
|
|
16
19
|
},
|
|
17
20
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enableDirectAccess.js","sources":["../../../../src/config/enableDirectAccess.ts"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"enableDirectAccess.js","sources":["../../../../src/config/enableDirectAccess.ts"],"sourcesContent":[null],"names":["internal","configureLegendState"],"mappings":";;;;SAEgB,kBAAkB,GAAA;AAC9B,IAAA,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,GAAGA,cAAQ,CAAC;AACxC,IAAAC,0BAAoB,CAAC;AACjB,QAAA,oBAAoB,EAAE;AAClB,YAAA,CAAC,EAAE;AACC,gBAAA,GAAG,CAAC,IAAI,EAAA;;;oBAGJ,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,KAAK,CAA6B,CAAC;AACjE,oBAAA,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;iBACpB;gBACD,GAAG,CAAC,IAAI,EAAE,KAAK,EAAA;AACX,oBAAA,OAAO,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;iBAC3B;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA,CAAC,CAAC;AACP;;;;"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { configureLegendState,
|
|
1
|
+
import { configureLegendState, internal } from '@legendapp/state';
|
|
2
2
|
|
|
3
3
|
function enableDirectAccess() {
|
|
4
|
+
const { observableFns, set } = internal;
|
|
4
5
|
configureLegendState({
|
|
5
6
|
observableProperties: {
|
|
6
7
|
$: {
|
|
7
8
|
get(node) {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
// Get it from the observableFns Map because another config function
|
|
10
|
+
// might have overriden get
|
|
11
|
+
const get = observableFns.get('get');
|
|
12
|
+
return get(node);
|
|
10
13
|
},
|
|
11
14
|
set(node, value) {
|
|
12
|
-
return
|
|
15
|
+
return set(node, value);
|
|
13
16
|
},
|
|
14
17
|
},
|
|
15
18
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enableDirectAccess.mjs","sources":["../../../../src/config/enableDirectAccess.ts"],"sourcesContent":[null],"names":[],"mappings":";;SAEgB,kBAAkB,GAAA;AAC9B,IAAA,oBAAoB,CAAC;AACjB,QAAA,oBAAoB,EAAE;AAClB,YAAA,CAAC,EAAE;AACC,gBAAA,GAAG,CAAC,IAAI,EAAA
|
|
1
|
+
{"version":3,"file":"enableDirectAccess.mjs","sources":["../../../../src/config/enableDirectAccess.ts"],"sourcesContent":[null],"names":[],"mappings":";;SAEgB,kBAAkB,GAAA;AAC9B,IAAA,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC;AACxC,IAAA,oBAAoB,CAAC;AACjB,QAAA,oBAAoB,EAAE;AAClB,YAAA,CAAC,EAAE;AACC,gBAAA,GAAG,CAAC,IAAI,EAAA;;;oBAGJ,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,KAAK,CAA6B,CAAC;AACjE,oBAAA,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;iBACpB;gBACD,GAAG,CAAC,IAAI,EAAE,KAAK,EAAA;AACX,oBAAA,OAAO,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;iBAC3B;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA,CAAC,CAAC;AACP;;;;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var state = require('@legendapp/state');
|
|
4
|
+
var react$1 = require('@legendapp/state/react');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
|
|
7
|
+
// V3TODO: Remove this file
|
|
8
|
+
let isEnabled = false;
|
|
9
|
+
function getNodePath(node) {
|
|
10
|
+
const arr = [];
|
|
11
|
+
let n = node;
|
|
12
|
+
while ((n === null || n === void 0 ? void 0 : n.key) !== undefined) {
|
|
13
|
+
arr.splice(0, 0, n.key);
|
|
14
|
+
n = n.parent;
|
|
15
|
+
}
|
|
16
|
+
return arr.join('.');
|
|
17
|
+
}
|
|
18
|
+
// Extracting the forwardRef inspired by https://github.com/mobxjs/mobx/blob/main/packages/mobx-react-lite/src/observer.ts
|
|
19
|
+
const hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
20
|
+
function enableReactDirectRender() {
|
|
21
|
+
if (process.env.NODE_ENV === 'development') {
|
|
22
|
+
console.warn('[legend-state] enableReactDirectRender is deprecated and will be removed in version 3.0. Please convert it from {value} to <Memo>{value}</Memo>. See https://legendapp.com/open-source/state/migrating for more details.');
|
|
23
|
+
}
|
|
24
|
+
if (!isEnabled) {
|
|
25
|
+
isEnabled = true;
|
|
26
|
+
// Rendering observables directly inspired by Preact Signals: https://github.com/preactjs/signals/blob/main/packages/react/src/index.ts
|
|
27
|
+
// Add the extra primitive props so that observables can render directly
|
|
28
|
+
// Memoized component to wrap the observable value
|
|
29
|
+
const Text = react.memo(function Text({ data }) {
|
|
30
|
+
if (process.env.NODE_ENV === 'development') {
|
|
31
|
+
if (state.isObservable(data)) {
|
|
32
|
+
console.warn(`[legend-state] enableReactDirectRender is deprecated and will be removed in version 3.0. Please convert rendering of observable with path ${getNodePath(state.getNode(data))} to <Memo>{value}</Memo>. See https://legendapp.com/open-source/state/migrating for more details.`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return react$1.useSelector(data);
|
|
36
|
+
});
|
|
37
|
+
const ReactTypeofSymbol = hasSymbol ? Symbol.for('react.element') : react.createElement('a').$$typeof;
|
|
38
|
+
const s = state.extraPrimitiveProps;
|
|
39
|
+
const proto = {};
|
|
40
|
+
// Set up activators to activate this node as being used in React
|
|
41
|
+
state.extraPrimitiveActivators.set('$$typeof', true);
|
|
42
|
+
state.extraPrimitiveActivators.set(Symbol.toPrimitive, true);
|
|
43
|
+
// eslint-disable-next-line no-inner-declarations
|
|
44
|
+
function set(key, value) {
|
|
45
|
+
s.set(key, value);
|
|
46
|
+
proto[key] = { configurable: true, value };
|
|
47
|
+
}
|
|
48
|
+
set('$$typeof', ReactTypeofSymbol);
|
|
49
|
+
set('type', Text);
|
|
50
|
+
set('_store', { validated: true });
|
|
51
|
+
set('key', null);
|
|
52
|
+
set('ref', null);
|
|
53
|
+
set('alternate', null);
|
|
54
|
+
set('_owner', null);
|
|
55
|
+
set('_source', null);
|
|
56
|
+
// Set extra props for the proxyHandler to return on primitives
|
|
57
|
+
s.set(Symbol.toPrimitive, (_, value) => value);
|
|
58
|
+
s.set('props', (obs) => ({ data: obs }));
|
|
59
|
+
// Set extra props for ObservablePrimitive to return on primitives
|
|
60
|
+
proto[Symbol.toPrimitive] = {
|
|
61
|
+
configurable: true,
|
|
62
|
+
get() {
|
|
63
|
+
return this.peek();
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
proto.props = {
|
|
67
|
+
configurable: true,
|
|
68
|
+
get() {
|
|
69
|
+
return { data: this };
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
Object.defineProperties(state.ObservablePrimitiveClass.prototype, proto);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
exports.enableReactDirectRender = enableReactDirectRender;
|
|
77
|
+
exports.hasSymbol = hasSymbol;
|
|
78
|
+
//# sourceMappingURL=enableReactDirectRender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enableReactDirectRender.js","sources":["../../../../src/config/enableReactDirectRender.ts"],"sourcesContent":[null],"names":["memo","isObservable","getNode","useSelector","createElement","extraPrimitiveProps","extraPrimitiveActivators","ObservablePrimitiveClass"],"mappings":";;;;;;AAYA;AAEA,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,WAAW,CAAC,IAAe,EAAA;IAChC,MAAM,GAAG,GAAwB,EAAE,CAAC;IACpC,IAAI,CAAC,GAAG,IAAI,CAAC;IACb,OAAO,CAAA,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,GAAG,MAAK,SAAS,EAAE;QACzB,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AACxB,QAAA,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;AAChB,KAAA;AACD,IAAA,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;AACO,MAAM,SAAS,GAAkB,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,IAAI;SAEpE,uBAAuB,GAAA;AACnC,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;AACxC,QAAA,OAAO,CAAC,IAAI,CACR,0NAA0N,CAC7N,CAAC;AACL,KAAA;IACD,IAAI,CAAC,SAAS,EAAE;QACZ,SAAS,GAAG,IAAI,CAAC;;;;QAKjB,MAAM,IAAI,GAAGA,UAAI,CAAC,SAAS,IAAI,CAAC,EAAE,IAAI,EAAgC,EAAA;AAClE,YAAA,IAAI,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I,CAAC,CAAC;AACvB,QAAA,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpB,QAAA,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;;AAGrB,QAAA,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAM,EAAE,KAAU,KAAK,KAAK,CAAC,CAAC;AACzD,QAAA,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,GAAQ,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;;AAE9C,QAAA,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG;AACxB,YAAA,YAAY,EAAE,IAAI;YAClB,GAAG,GAAA;AACC,gBAAA,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;aACtB;SACJ,CAAC;QACF,KAAK,CAAC,KAAK,GAAG;AACV,YAAA,YAAY,EAAE,IAAI;YAClB,GAAG,GAAA;AACC,gBAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;aACzB;SACJ,CAAC;QAEF,MAAM,CAAC,gBAAgB,CAACC,8BAAwB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACtE,KAAA;AACL;;;;;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { isObservable, getNode, extraPrimitiveActivators, ObservablePrimitiveClass, extraPrimitiveProps } from '@legendapp/state';
|
|
2
|
+
import { useSelector } from '@legendapp/state/react';
|
|
3
|
+
import { memo, createElement } from 'react';
|
|
4
|
+
|
|
5
|
+
// V3TODO: Remove this file
|
|
6
|
+
let isEnabled = false;
|
|
7
|
+
function getNodePath(node) {
|
|
8
|
+
const arr = [];
|
|
9
|
+
let n = node;
|
|
10
|
+
while ((n === null || n === void 0 ? void 0 : n.key) !== undefined) {
|
|
11
|
+
arr.splice(0, 0, n.key);
|
|
12
|
+
n = n.parent;
|
|
13
|
+
}
|
|
14
|
+
return arr.join('.');
|
|
15
|
+
}
|
|
16
|
+
// Extracting the forwardRef inspired by https://github.com/mobxjs/mobx/blob/main/packages/mobx-react-lite/src/observer.ts
|
|
17
|
+
const hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
18
|
+
function enableReactDirectRender() {
|
|
19
|
+
if (process.env.NODE_ENV === 'development') {
|
|
20
|
+
console.warn('[legend-state] enableReactDirectRender is deprecated and will be removed in version 3.0. Please convert it from {value} to <Memo>{value}</Memo>. See https://legendapp.com/open-source/state/migrating for more details.');
|
|
21
|
+
}
|
|
22
|
+
if (!isEnabled) {
|
|
23
|
+
isEnabled = true;
|
|
24
|
+
// Rendering observables directly inspired by Preact Signals: https://github.com/preactjs/signals/blob/main/packages/react/src/index.ts
|
|
25
|
+
// Add the extra primitive props so that observables can render directly
|
|
26
|
+
// Memoized component to wrap the observable value
|
|
27
|
+
const Text = memo(function Text({ data }) {
|
|
28
|
+
if (process.env.NODE_ENV === 'development') {
|
|
29
|
+
if (isObservable(data)) {
|
|
30
|
+
console.warn(`[legend-state] enableReactDirectRender is deprecated and will be removed in version 3.0. Please convert rendering of observable with path ${getNodePath(getNode(data))} to <Memo>{value}</Memo>. See https://legendapp.com/open-source/state/migrating for more details.`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return useSelector(data);
|
|
34
|
+
});
|
|
35
|
+
const ReactTypeofSymbol = hasSymbol ? Symbol.for('react.element') : createElement('a').$$typeof;
|
|
36
|
+
const s = extraPrimitiveProps;
|
|
37
|
+
const proto = {};
|
|
38
|
+
// Set up activators to activate this node as being used in React
|
|
39
|
+
extraPrimitiveActivators.set('$$typeof', true);
|
|
40
|
+
extraPrimitiveActivators.set(Symbol.toPrimitive, true);
|
|
41
|
+
// eslint-disable-next-line no-inner-declarations
|
|
42
|
+
function set(key, value) {
|
|
43
|
+
s.set(key, value);
|
|
44
|
+
proto[key] = { configurable: true, value };
|
|
45
|
+
}
|
|
46
|
+
set('$$typeof', ReactTypeofSymbol);
|
|
47
|
+
set('type', Text);
|
|
48
|
+
set('_store', { validated: true });
|
|
49
|
+
set('key', null);
|
|
50
|
+
set('ref', null);
|
|
51
|
+
set('alternate', null);
|
|
52
|
+
set('_owner', null);
|
|
53
|
+
set('_source', null);
|
|
54
|
+
// Set extra props for the proxyHandler to return on primitives
|
|
55
|
+
s.set(Symbol.toPrimitive, (_, value) => value);
|
|
56
|
+
s.set('props', (obs) => ({ data: obs }));
|
|
57
|
+
// Set extra props for ObservablePrimitive to return on primitives
|
|
58
|
+
proto[Symbol.toPrimitive] = {
|
|
59
|
+
configurable: true,
|
|
60
|
+
get() {
|
|
61
|
+
return this.peek();
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
proto.props = {
|
|
65
|
+
configurable: true,
|
|
66
|
+
get() {
|
|
67
|
+
return { data: this };
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
Object.defineProperties(ObservablePrimitiveClass.prototype, proto);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { enableReactDirectRender, hasSymbol };
|
|
75
|
+
//# sourceMappingURL=enableReactDirectRender.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enableReactDirectRender.mjs","sources":["../../../../src/config/enableReactDirectRender.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAYA;AAEA,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,WAAW,CAAC,IAAe,EAAA;IAChC,MAAM,GAAG,GAAwB,EAAE,CAAC;IACpC,IAAI,CAAC,GAAG,IAAI,CAAC;IACb,OAAO,CAAA,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,GAAG,MAAK,SAAS,EAAE;QACzB,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AACxB,QAAA,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;AAChB,KAA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
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type TrackingType } from '@legendapp/state';
|
|
2
|
+
interface ReactTrackingOptions {
|
|
3
|
+
auto?: boolean;
|
|
4
|
+
warnUnobserved?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function enableReactTracking({ auto, warnUnobserved }: ReactTrackingOptions): void;
|
|
7
|
+
import type { GetOptions } from '@legendapp/state';
|
|
8
|
+
declare module '@legendapp/state' {
|
|
9
|
+
interface ObservableBaseFns<T> {
|
|
10
|
+
get(options?: TrackingType | (GetOptions & {
|
|
11
|
+
suspense?: boolean;
|
|
12
|
+
})): T;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var state = require('@legendapp/state');
|
|
4
|
+
var react$1 = require('@legendapp/state/react');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
|
|
7
|
+
const ReactRenderContext = react.createContext(0);
|
|
8
|
+
function needsSelector() {
|
|
9
|
+
// If we're already tracking then we definitely don't need useSelector
|
|
10
|
+
if (!state.tracking.current) {
|
|
11
|
+
try {
|
|
12
|
+
// If there's no dispatcher we're definitely not in React
|
|
13
|
+
// This is an optimization to not need to run useContext. If in a future React version
|
|
14
|
+
// this works differently we can change it or just remove it.
|
|
15
|
+
const dispatcher = react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher.current;
|
|
16
|
+
if (dispatcher) {
|
|
17
|
+
// If there's a dispatcher then we may be inside of a hook.
|
|
18
|
+
// Attempt a useContext hook, which will throw an error if outside of render.
|
|
19
|
+
react.useContext(ReactRenderContext);
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch (_a) { } // eslint-disable-line no-empty
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
function enableReactTracking({ auto, warnUnobserved }) {
|
|
28
|
+
const { get } = state.internal;
|
|
29
|
+
state.configureLegendState({
|
|
30
|
+
observableFunctions: {
|
|
31
|
+
get: (node, options) => {
|
|
32
|
+
if (needsSelector()) {
|
|
33
|
+
if (auto) {
|
|
34
|
+
return react$1.useSelector(() => get(node, options), state.isObject(options) ? options : undefined);
|
|
35
|
+
}
|
|
36
|
+
else if (process.env.NODE_ENV === 'development' && warnUnobserved) {
|
|
37
|
+
console.warn('[legend-state] Detected a `get()` call in an unobserved component. You may want to wrap it in observer: https://legendapp.com/open-source/state/react-api/#observer-hoc');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return get(node, options);
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.enableReactTracking = enableReactTracking;
|
|
47
|
+
//# sourceMappingURL=enableReactTracking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enableReactTracking.js","sources":["../../../../src/config/enableReactTracking.ts"],"sourcesContent":[null],"names":["createContext","tracking","ReactInternals","useContext","internal","configureLegendState","useSelector","isObject"],"mappings":";;;;;;AAaA,MAAM,kBAAkB,GAAGA,mBAAa,CAAC,CAAC,CAAC,CAAC;AAE5C,SAAS,aAAa,GAAA;;AAElB,IAAA,IAAI,CAACC,cAAQ,CAAC,OAAO,EAAE;QACnB,IAAI;;;;AAIA,YAAA,MAAM,UAAU,GAAGC,wDAAc,CAAC,sBAAsB,CAAC,OAAO,CAAC;AACjE,YAAA,IAAI,UAAU,EAAE;;;gBAGZC,gBAAU,CAAC,kBAAkB,CAAC,CAAC;AAC/B,gBAAA,OAAO,IAAI,CAAC;AACf,aAAA;AACJ,SAAA;QAAC,OAAM,EAAA,EAAA,GAAE;AACb,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACjB,CAAC;SAOe,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAwB,EAAA;AAC9E,IAAA,MAAM,EAAE,GAAG,EAAE,GAAGC,cAAQ,CAAC;AAEzB,IAAAC,0BAAoB,CAAC;AACjB,QAAA,mBAAmB,EAAE;AACjB,YAAA,GAAG,EAAE,CAAC,IAAe,EAAE,OAA0D,KAAI;gBACjF,IAAI,aAAa,EAAE,EAAE;AACjB,oBAAA,IAAI,IAAI,EAAE;wBACN,OAAOC,mBAAW,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,EAAEC,cAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AACzF,qBAAA;yBAAM,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,cAAc,EAAE;AACjE,wBAAA,OAAO,CAAC,IAAI,CACR,yKAAyK,CAC5K,CAAC;AACL,qBAAA;AACJ,iBAAA;AACD,gBAAA,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;aAC7B;AACJ,SAAA;AACJ,KAAA,CAAC,CAAC;AACP;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { configureLegendState, isObject, tracking, internal } from '@legendapp/state';
|
|
2
|
+
import { useSelector } from '@legendapp/state/react';
|
|
3
|
+
import { createContext, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, useContext } from 'react';
|
|
4
|
+
|
|
5
|
+
const ReactRenderContext = createContext(0);
|
|
6
|
+
function needsSelector() {
|
|
7
|
+
// If we're already tracking then we definitely don't need useSelector
|
|
8
|
+
if (!tracking.current) {
|
|
9
|
+
try {
|
|
10
|
+
// If there's no dispatcher we're definitely not in React
|
|
11
|
+
// This is an optimization to not need to run useContext. If in a future React version
|
|
12
|
+
// this works differently we can change it or just remove it.
|
|
13
|
+
const dispatcher = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher.current;
|
|
14
|
+
if (dispatcher) {
|
|
15
|
+
// If there's a dispatcher then we may be inside of a hook.
|
|
16
|
+
// Attempt a useContext hook, which will throw an error if outside of render.
|
|
17
|
+
useContext(ReactRenderContext);
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
catch (_a) { } // eslint-disable-line no-empty
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
function enableReactTracking({ auto, warnUnobserved }) {
|
|
26
|
+
const { get } = internal;
|
|
27
|
+
configureLegendState({
|
|
28
|
+
observableFunctions: {
|
|
29
|
+
get: (node, options) => {
|
|
30
|
+
if (needsSelector()) {
|
|
31
|
+
if (auto) {
|
|
32
|
+
return useSelector(() => get(node, options), isObject(options) ? options : undefined);
|
|
33
|
+
}
|
|
34
|
+
else if (process.env.NODE_ENV === 'development' && warnUnobserved) {
|
|
35
|
+
console.warn('[legend-state] Detected a `get()` call in an unobserved component. You may want to wrap it in observer: https://legendapp.com/open-source/state/react-api/#observer-hoc');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return get(node, options);
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { enableReactTracking };
|
|
45
|
+
//# sourceMappingURL=enableReactTracking.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enableReactTracking.mjs","sources":["../../../../src/config/enableReactTracking.ts"],"sourcesContent":[null],"names":["ReactInternals"],"mappings":";;;;AAaA,MAAM,kBAAkB,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAE5C,SAAS,aAAa,GAAA;;AAElB,IAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;QACnB,IAAI;;;;AAIA,YAAA,MAAM,UAAU,GAAGA,kDAAc,CAAC,sBAAsB,CAAC,OAAO,CAAC;AACjE,YAAA,IAAI,UAAU,EAAE;;;gBAGZ,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAC/B,gBAAA,OAAO,IAAI,CAAC;AACf,aAAA;AACJ,SAAA;QAAC,OAAM,EAAA,EAAA,GAAE;AACb,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACjB,CAAC;SAOe,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAwB,EAAA;AAC9E,IAAA,MAAM,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC;AAEzB,IAAA,oBAAoB,CAAC;AACjB,QAAA,mBAAmB,EAAE;AACjB,YAAA,GAAG,EAAE,CAAC,IAAe,EAAE,OAA0D,KAAI;gBACjF,IAAI,aAAa,EAAE,EAAE;AACjB,oBAAA,IAAI,IAAI,EAAE;wBACN,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AACzF,qBAAA;yBAAM,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,cAAc,EAAE;AACjE,wBAAA,OAAO,CAAC,IAAI,CACR,yKAAyK,CAC5K,CAAC;AACL,qBAAA;AACJ,iBAAA;AACD,gBAAA,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;aAC7B;AACJ,SAAA;AACJ,KAAA,CAAC,CAAC;AACP;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const internal: {
|
|
|
24
24
|
isLoadingRemote: boolean;
|
|
25
25
|
isMerging: boolean;
|
|
26
26
|
};
|
|
27
|
+
observableFns: Map<string, (node: import("./src/observableInterfaces").NodeValue, ...args: any[]) => any>;
|
|
27
28
|
optimized: symbol;
|
|
28
29
|
peek: typeof peek;
|
|
29
30
|
set: typeof set;
|
package/index.js
CHANGED
|
@@ -55,6 +55,9 @@ const symbolGetNode = Symbol('getNode');
|
|
|
55
55
|
const symbolDelete = /* @__PURE__ */ Symbol('delete');
|
|
56
56
|
const symbolOpaque = Symbol('opaque');
|
|
57
57
|
const optimized = Symbol('optimized');
|
|
58
|
+
// TODOV3 Remove these
|
|
59
|
+
const extraPrimitiveActivators = new Map();
|
|
60
|
+
const extraPrimitiveProps = new Map();
|
|
58
61
|
const globalState = {
|
|
59
62
|
isLoadingLocal: false,
|
|
60
63
|
isLoadingRemote: false,
|
|
@@ -426,6 +429,25 @@ function endBatch(force) {
|
|
|
426
429
|
}
|
|
427
430
|
}
|
|
428
431
|
|
|
432
|
+
function createObservable(value, makePrimitive, createObject, createPrimitive) {
|
|
433
|
+
const valueIsPromise = isPromise(value);
|
|
434
|
+
const root = {
|
|
435
|
+
_: value,
|
|
436
|
+
};
|
|
437
|
+
const node = {
|
|
438
|
+
root,
|
|
439
|
+
lazy: true,
|
|
440
|
+
};
|
|
441
|
+
const prim = makePrimitive || isActualPrimitive(value);
|
|
442
|
+
const obs = prim
|
|
443
|
+
? new createPrimitive(node)
|
|
444
|
+
: createObject(node);
|
|
445
|
+
if (valueIsPromise) {
|
|
446
|
+
extractPromise(node, value);
|
|
447
|
+
}
|
|
448
|
+
return obs;
|
|
449
|
+
}
|
|
450
|
+
|
|
429
451
|
function onChange(node, callback, options = {}) {
|
|
430
452
|
const { initial, immediate, noArgs } = options;
|
|
431
453
|
const { trackingType } = options;
|
|
@@ -746,7 +768,7 @@ function getProxy(node, p) {
|
|
|
746
768
|
if (p !== undefined)
|
|
747
769
|
node = getChildNode(node, p);
|
|
748
770
|
// Create a proxy if not already cached and return it
|
|
749
|
-
return node.proxy || (node.proxy = new Proxy(node, proxyHandler));
|
|
771
|
+
return (node.proxy || (node.proxy = new Proxy(node, proxyHandler)));
|
|
750
772
|
}
|
|
751
773
|
const proxyHandler = {
|
|
752
774
|
get(node, p, receiver) {
|
|
@@ -804,6 +826,20 @@ const proxyHandler = {
|
|
|
804
826
|
if (property) {
|
|
805
827
|
return property.get(node);
|
|
806
828
|
}
|
|
829
|
+
// TODOV3 Remove this
|
|
830
|
+
const isValuePrimitive = isPrimitive(value);
|
|
831
|
+
// If accessing a key that doesn't already exist, and this node has been activated with extra keys
|
|
832
|
+
// then return the values that were set. This is used by enableLegendStateReact for example.
|
|
833
|
+
if (value === undefined || value === null || isValuePrimitive) {
|
|
834
|
+
if (extraPrimitiveProps.size && (node.isActivatedPrimitive || extraPrimitiveActivators.has(p))) {
|
|
835
|
+
node.isActivatedPrimitive = true;
|
|
836
|
+
const vPrim = extraPrimitiveProps.get(p);
|
|
837
|
+
if (vPrim !== undefined) {
|
|
838
|
+
return isFunction(vPrim) ? vPrim(getProxy(node)) : vPrim;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
// /TODOV3 Remove this
|
|
807
843
|
const vProp = value === null || value === void 0 ? void 0 : value[p];
|
|
808
844
|
if (isObject(value) && value[symbolOpaque]) {
|
|
809
845
|
return vProp;
|
|
@@ -863,6 +899,9 @@ const proxyHandler = {
|
|
|
863
899
|
if (fnOrComputed) {
|
|
864
900
|
return fnOrComputed;
|
|
865
901
|
}
|
|
902
|
+
if (p === 'state' && node.state) {
|
|
903
|
+
return node.state;
|
|
904
|
+
}
|
|
866
905
|
// Return an observable proxy to the property
|
|
867
906
|
return getProxy(node, p);
|
|
868
907
|
},
|
|
@@ -1101,13 +1140,18 @@ function updateNodesAndNotify(node, newValue, prevValue, childNode, isPrim, isRo
|
|
|
1101
1140
|
endBatch();
|
|
1102
1141
|
}
|
|
1103
1142
|
function extractPromise(node, value) {
|
|
1104
|
-
|
|
1143
|
+
if (!node.state) {
|
|
1144
|
+
node.state = createObservable({
|
|
1145
|
+
isLoaded: false,
|
|
1146
|
+
}, false, getProxy);
|
|
1147
|
+
}
|
|
1105
1148
|
value
|
|
1106
1149
|
.then((value) => {
|
|
1107
1150
|
set(node, value);
|
|
1151
|
+
node.state.isLoaded.set(true);
|
|
1108
1152
|
})
|
|
1109
1153
|
.catch((error) => {
|
|
1110
|
-
set(
|
|
1154
|
+
node.state.error.set(error);
|
|
1111
1155
|
});
|
|
1112
1156
|
}
|
|
1113
1157
|
function extractFunctionOrComputed(node, obj, k, v) {
|
|
@@ -1128,7 +1172,8 @@ function extractFunctionOrComputed(node, obj, k, v) {
|
|
|
1128
1172
|
}
|
|
1129
1173
|
}
|
|
1130
1174
|
}
|
|
1131
|
-
function get(node,
|
|
1175
|
+
function get(node, options) {
|
|
1176
|
+
const track = options ? (isObject(options) ? options.shallow : options) : undefined;
|
|
1132
1177
|
// Track by default
|
|
1133
1178
|
updateTracking(node, track);
|
|
1134
1179
|
return peek(node);
|
|
@@ -1357,29 +1402,11 @@ ObservablePrimitiveClass.prototype.delete = function () {
|
|
|
1357
1402
|
return this;
|
|
1358
1403
|
};
|
|
1359
1404
|
|
|
1360
|
-
function createObservable(value, makePrimitive) {
|
|
1361
|
-
const valueIsPromise = isPromise(value);
|
|
1362
|
-
const root = {
|
|
1363
|
-
_: value,
|
|
1364
|
-
};
|
|
1365
|
-
const node = {
|
|
1366
|
-
root,
|
|
1367
|
-
lazy: true,
|
|
1368
|
-
};
|
|
1369
|
-
const prim = makePrimitive || isActualPrimitive(value);
|
|
1370
|
-
const obs = prim
|
|
1371
|
-
? new ObservablePrimitiveClass(node)
|
|
1372
|
-
: getProxy(node);
|
|
1373
|
-
if (valueIsPromise) {
|
|
1374
|
-
extractPromise(node, value);
|
|
1375
|
-
}
|
|
1376
|
-
return obs;
|
|
1377
|
-
}
|
|
1378
1405
|
function observable(value) {
|
|
1379
|
-
return createObservable(value);
|
|
1406
|
+
return createObservable(value, false, getProxy, ObservablePrimitiveClass);
|
|
1380
1407
|
}
|
|
1381
1408
|
function observablePrimitive(value) {
|
|
1382
|
-
return createObservable(value,
|
|
1409
|
+
return createObservable(value, true, getProxy, ObservablePrimitiveClass);
|
|
1383
1410
|
}
|
|
1384
1411
|
|
|
1385
1412
|
function setupTracking(nodes, update, noArgs, immediate) {
|
|
@@ -1715,6 +1742,7 @@ const internal = {
|
|
|
1715
1742
|
getNode,
|
|
1716
1743
|
getProxy,
|
|
1717
1744
|
globalState,
|
|
1745
|
+
observableFns,
|
|
1718
1746
|
optimized,
|
|
1719
1747
|
peek,
|
|
1720
1748
|
set,
|
|
@@ -1736,6 +1764,8 @@ exports.deconstructObjectWithPath = deconstructObjectWithPath;
|
|
|
1736
1764
|
exports.endBatch = endBatch;
|
|
1737
1765
|
exports.endTracking = endTracking;
|
|
1738
1766
|
exports.event = event;
|
|
1767
|
+
exports.extraPrimitiveActivators = extraPrimitiveActivators;
|
|
1768
|
+
exports.extraPrimitiveProps = extraPrimitiveProps;
|
|
1739
1769
|
exports.findIDKey = findIDKey;
|
|
1740
1770
|
exports.getNode = getNode;
|
|
1741
1771
|
exports.getNodeValue = getNodeValue;
|