@legendapp/state 1.0.0-rc.1 → 1.0.0-rc.10

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 (56) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/babel.js +2 -1
  3. package/babel.js.map +1 -1
  4. package/helpers/pageHashParams.js +1 -1
  5. package/helpers/pageHashParams.js.map +1 -1
  6. package/helpers/pageHashParams.mjs +1 -1
  7. package/helpers/pageHashParams.mjs.map +1 -1
  8. package/history.js +0 -2
  9. package/history.js.map +1 -1
  10. package/history.mjs +1 -3
  11. package/history.mjs.map +1 -1
  12. package/index.d.ts +2 -2
  13. package/index.js +162 -87
  14. package/index.js.map +1 -1
  15. package/index.mjs +159 -85
  16. package/index.mjs.map +1 -1
  17. package/internal.d.ts +2 -2
  18. package/internal.js +2 -6
  19. package/internal.js.map +1 -1
  20. package/internal.mjs +2 -2
  21. package/package.json +2 -3
  22. package/persist-plugins/indexeddb-preloader.js +43 -25
  23. package/persist-plugins/indexeddb-preloader.js.map +1 -1
  24. package/persist-plugins/indexeddb-preloader.mjs +43 -25
  25. package/persist-plugins/indexeddb-preloader.mjs.map +1 -1
  26. package/persist-plugins/indexeddb.js +11 -5
  27. package/persist-plugins/indexeddb.js.map +1 -1
  28. package/persist-plugins/indexeddb.mjs +12 -6
  29. package/persist-plugins/indexeddb.mjs.map +1 -1
  30. package/persist-plugins/local-storage.js +1 -1
  31. package/persist-plugins/local-storage.js.map +1 -1
  32. package/persist-plugins/local-storage.mjs +1 -1
  33. package/persist-plugins/local-storage.mjs.map +1 -1
  34. package/persist.d.ts +0 -1
  35. package/persist.js +151 -177
  36. package/persist.js.map +1 -1
  37. package/persist.mjs +153 -178
  38. package/persist.mjs.map +1 -1
  39. package/react.js +41 -36
  40. package/react.js.map +1 -1
  41. package/react.mjs +42 -37
  42. package/react.mjs.map +1 -1
  43. package/src/batching.d.ts +2 -1
  44. package/src/computed.d.ts +2 -1
  45. package/src/globals.d.ts +0 -4
  46. package/src/helpers.d.ts +3 -1
  47. package/src/observable.d.ts +2 -1
  48. package/src/observableInterfaces.d.ts +11 -3
  49. package/src/persist/fieldTransformer.d.ts +2 -2
  50. package/src/persist/persistHelpers.d.ts +0 -4
  51. package/src/persist/persistObservable.d.ts +19 -1
  52. package/src/react/useComputed.d.ts +5 -2
  53. package/trace.js +7 -4
  54. package/trace.js.map +1 -1
  55. package/trace.mjs +7 -4
  56. package/trace.mjs.map +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,17 @@
1
- ## 1.0 RC.0
1
+ ## 1.0.0-rc.2
2
+
3
+ - Feature: `batch` has a new `onComplete `batch(callback, onComplete)` parameter to run a function after the batch commits. This can be useful for cleaning up a temporary state while batching.
4
+ - Fix: onChange with `initial` option fires immediately rather than going through batching process
5
+ - Fix: Applying pending changes on load was writing back to local persistence unnecessarily
6
+ - Perf: Improve performance of `mergeIntoObservable` by just doing a `set` if a target property is empty and doesn't need merging logic
7
+ - Perf: Improve persistence overall by using more targeted approaches than `mergeIntoObservable`
8
+
9
+ ## 1.0.0-rc.1
10
+
11
+ - Fix: Incrementing a value from 0 with a function (`value.set((prev) => prev + 1)`) was not firing a callback the first time
12
+
13
+
14
+ ## 1.0.0-rc.0
2
15
 
3
16
  - Breaking: `onChange` function changed to take an options object as a second parameter with a new `initial` option that makes it fire immediately with the current value.
4
17
  - Breaking: `onChange` callback receives an object parameter instead of many arguments. This adds more flexibility for callers who care about different values in the change object.
package/babel.js CHANGED
@@ -10286,6 +10286,7 @@ function requireCleanJSXElementLiteralChild () {
10286
10286
  });
10287
10287
  cleanJSXElementLiteralChild.default = cleanJSXElementLiteralChild$1;
10288
10288
  var _generated = requireGenerated();
10289
+ var _ = requireLib();
10289
10290
  function cleanJSXElementLiteralChild$1(child, args) {
10290
10291
  const lines = child.value.split(/\r\n|\n|\r/);
10291
10292
  let lastNonEmptyLine = 0;
@@ -10317,7 +10318,7 @@ function requireCleanJSXElementLiteralChild () {
10317
10318
  str += trimmedLine;
10318
10319
  }
10319
10320
  }
10320
- if (str) args.push((0, _generated.stringLiteral)(str));
10321
+ if (str) args.push((0, _.inherits)((0, _generated.stringLiteral)(str), child));
10321
10322
  }
10322
10323
 
10323
10324