@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.
- package/CHANGELOG.md +14 -1
- package/babel.js +2 -1
- package/babel.js.map +1 -1
- package/helpers/pageHashParams.js +1 -1
- package/helpers/pageHashParams.js.map +1 -1
- package/helpers/pageHashParams.mjs +1 -1
- package/helpers/pageHashParams.mjs.map +1 -1
- package/history.js +0 -2
- package/history.js.map +1 -1
- package/history.mjs +1 -3
- package/history.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/index.js +162 -87
- package/index.js.map +1 -1
- package/index.mjs +159 -85
- package/index.mjs.map +1 -1
- package/internal.d.ts +2 -2
- package/internal.js +2 -6
- package/internal.js.map +1 -1
- package/internal.mjs +2 -2
- package/package.json +2 -3
- package/persist-plugins/indexeddb-preloader.js +43 -25
- package/persist-plugins/indexeddb-preloader.js.map +1 -1
- package/persist-plugins/indexeddb-preloader.mjs +43 -25
- package/persist-plugins/indexeddb-preloader.mjs.map +1 -1
- package/persist-plugins/indexeddb.js +11 -5
- package/persist-plugins/indexeddb.js.map +1 -1
- package/persist-plugins/indexeddb.mjs +12 -6
- package/persist-plugins/indexeddb.mjs.map +1 -1
- package/persist-plugins/local-storage.js +1 -1
- package/persist-plugins/local-storage.js.map +1 -1
- package/persist-plugins/local-storage.mjs +1 -1
- package/persist-plugins/local-storage.mjs.map +1 -1
- package/persist.d.ts +0 -1
- package/persist.js +151 -177
- package/persist.js.map +1 -1
- package/persist.mjs +153 -178
- package/persist.mjs.map +1 -1
- package/react.js +41 -36
- package/react.js.map +1 -1
- package/react.mjs +42 -37
- package/react.mjs.map +1 -1
- package/src/batching.d.ts +2 -1
- package/src/computed.d.ts +2 -1
- package/src/globals.d.ts +0 -4
- package/src/helpers.d.ts +3 -1
- package/src/observable.d.ts +2 -1
- package/src/observableInterfaces.d.ts +11 -3
- package/src/persist/fieldTransformer.d.ts +2 -2
- package/src/persist/persistHelpers.d.ts +0 -4
- package/src/persist/persistObservable.d.ts +19 -1
- package/src/react/useComputed.d.ts +5 -2
- package/trace.js +7 -4
- package/trace.js.map +1 -1
- package/trace.mjs +7 -4
- package/trace.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
## 1.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
|
|