@legendapp/state 3.0.0-alpha.29 → 3.0.0-alpha.30

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.
Files changed (47) hide show
  1. package/config/enable$GetSet.js +2 -1
  2. package/config/enable$GetSet.mjs +2 -1
  3. package/config/enableReactTracking.js +2 -1
  4. package/config/enableReactTracking.mjs +2 -1
  5. package/config/enableReactUse.js +2 -1
  6. package/config/enableReactUse.mjs +2 -1
  7. package/config/enable_PeekAssign.js +2 -1
  8. package/config/enable_PeekAssign.mjs +2 -1
  9. package/config.d.mts +13 -0
  10. package/config.d.ts +13 -0
  11. package/config.js +2052 -0
  12. package/config.mjs +2050 -0
  13. package/index.d.mts +5 -302
  14. package/index.d.ts +5 -302
  15. package/index.js +27 -142
  16. package/index.mjs +28 -141
  17. package/observableInterfaces-Dilj6F92.d.mts +282 -0
  18. package/observableInterfaces-Dilj6F92.d.ts +282 -0
  19. package/package.json +6 -1
  20. package/persist-plugins/async-storage.d.mts +6 -3
  21. package/persist-plugins/async-storage.d.ts +6 -3
  22. package/persist-plugins/async-storage.js +12 -4
  23. package/persist-plugins/async-storage.mjs +12 -5
  24. package/persist-plugins/indexeddb.d.mts +6 -4
  25. package/persist-plugins/indexeddb.d.ts +6 -4
  26. package/persist-plugins/indexeddb.js +15 -5
  27. package/persist-plugins/indexeddb.mjs +15 -6
  28. package/persist-plugins/mmkv.d.mts +5 -1
  29. package/persist-plugins/mmkv.d.ts +5 -1
  30. package/persist-plugins/mmkv.js +14 -5
  31. package/persist-plugins/mmkv.mjs +14 -6
  32. package/react.d.mts +1 -0
  33. package/react.d.ts +1 -0
  34. package/react.js +2 -2
  35. package/react.mjs +2 -2
  36. package/sync-plugins/crud.d.mts +1 -1
  37. package/sync-plugins/crud.d.ts +1 -1
  38. package/sync-plugins/fetch.js +12 -8
  39. package/sync-plugins/fetch.mjs +13 -9
  40. package/sync-plugins/keel.d.mts +2 -2
  41. package/sync-plugins/keel.d.ts +2 -2
  42. package/sync-plugins/keel.js +6 -6
  43. package/sync-plugins/keel.mjs +6 -6
  44. package/sync.d.mts +37 -19
  45. package/sync.d.ts +37 -19
  46. package/sync.js +143 -41
  47. package/sync.mjs +151 -50
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var state = require('@legendapp/state');
4
+ var config = require('@legendapp/state/config');
4
5
 
5
6
  // src/config/enable$GetSet.ts
6
7
  function enable$GetSet() {
7
- state.configureLegendState({
8
+ config.configureLegendState({
8
9
  observableProperties: {
9
10
  $: {
10
11
  get(node) {
@@ -1,4 +1,5 @@
1
- import { configureLegendState, internal } from '@legendapp/state';
1
+ import { internal } from '@legendapp/state';
2
+ import { configureLegendState } from '@legendapp/state/config';
2
3
 
3
4
  // src/config/enable$GetSet.ts
4
5
  function enable$GetSet() {
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var state = require('@legendapp/state');
4
+ var config = require('@legendapp/state/config');
4
5
  var react$1 = require('@legendapp/state/react');
5
6
  var react = require('react');
6
7
 
@@ -22,7 +23,7 @@ function enableReactTracking({ auto, warnUnobserved }) {
22
23
  }
23
24
  return false;
24
25
  };
25
- state.configureLegendState({
26
+ config.configureLegendState({
26
27
  observableFunctions: {
27
28
  get: (node, options) => {
28
29
  if (needsSelector()) {
@@ -1,4 +1,5 @@
1
- import { configureLegendState, isObject, internal, tracking } from '@legendapp/state';
1
+ import { isObject, internal, tracking } from '@legendapp/state';
2
+ import { configureLegendState } from '@legendapp/state/config';
2
3
  import { useSelector } from '@legendapp/state/react';
3
4
  import { createContext, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, useContext } from 'react';
4
5
 
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var state = require('@legendapp/state');
4
+ var config = require('@legendapp/state/config');
4
5
  var react = require('@legendapp/state/react');
5
6
 
6
7
  // src/config/enableReactUse.ts
7
8
  var didWarn = false;
8
9
  function enableReactUse() {
9
- state.configureLegendState({
10
+ config.configureLegendState({
10
11
  observableFunctions: {
11
12
  use: (node, options) => {
12
13
  if (process.env.NODE_ENV === "development" && !didWarn) {
@@ -1,4 +1,5 @@
1
- import { configureLegendState, internal } from '@legendapp/state';
1
+ import { internal } from '@legendapp/state';
2
+ import { configureLegendState } from '@legendapp/state/config';
2
3
  import { useSelector } from '@legendapp/state/react';
3
4
 
4
5
  // src/config/enableReactUse.ts
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var state = require('@legendapp/state');
4
+ var config = require('@legendapp/state/config');
4
5
 
5
6
  // src/config/enable_PeekAssign.ts
6
7
  function enable_PeekAssign() {
7
- state.configureLegendState({
8
+ config.configureLegendState({
8
9
  observableProperties: {
9
10
  _: {
10
11
  get(node) {
@@ -1,4 +1,5 @@
1
- import { configureLegendState, internal } from '@legendapp/state';
1
+ import { internal } from '@legendapp/state';
2
+ import { configureLegendState } from '@legendapp/state/config';
2
3
 
3
4
  // src/config/enable_PeekAssign.ts
4
5
  function enable_PeekAssign() {
package/config.d.mts ADDED
@@ -0,0 +1,13 @@
1
+ import { N as NodeInfo } from './observableInterfaces-Dilj6F92.mjs';
2
+
3
+ declare function configureLegendState({ observableFunctions, observableProperties, jsonReplacer, jsonReviver, }: {
4
+ observableFunctions?: Record<string, (node: NodeInfo, ...args: any[]) => any>;
5
+ observableProperties?: Record<string, {
6
+ get: (node: NodeInfo) => any;
7
+ set: (node: NodeInfo, value: any) => any;
8
+ }>;
9
+ jsonReplacer?: (this: any, key: string, value: any) => any;
10
+ jsonReviver?: (this: any, key: string, value: any) => any;
11
+ }): void;
12
+
13
+ export { configureLegendState };
package/config.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { N as NodeInfo } from './observableInterfaces-Dilj6F92.js';
2
+
3
+ declare function configureLegendState({ observableFunctions, observableProperties, jsonReplacer, jsonReviver, }: {
4
+ observableFunctions?: Record<string, (node: NodeInfo, ...args: any[]) => any>;
5
+ observableProperties?: Record<string, {
6
+ get: (node: NodeInfo) => any;
7
+ set: (node: NodeInfo, value: any) => any;
8
+ }>;
9
+ jsonReplacer?: (this: any, key: string, value: any) => any;
10
+ jsonReviver?: (this: any, key: string, value: any) => any;
11
+ }): void;
12
+
13
+ export { configureLegendState };