@legendapp/state 0.15.0-next.1 → 0.15.0-next.12
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 +62 -0
- package/LICENSE +21 -0
- package/babel.js +309 -299
- package/babel.js.map +1 -1
- package/index.d.ts +17 -7
- package/index.js +253 -183
- package/index.js.map +1 -1
- package/index.mjs +240 -181
- package/index.mjs.map +1 -1
- package/internal.d.ts +1 -1
- package/internal.js +4 -0
- package/internal.js.map +1 -1
- package/internal.mjs +1 -1
- package/package.json +13 -5
- package/persist.js +2 -2
- package/persist.js.map +1 -1
- package/persist.mjs +3 -3
- package/persist.mjs.map +1 -1
- package/react-components.d.ts +1 -0
- package/react-components.js +41 -0
- package/react-components.js.map +1 -0
- package/react-components.mjs +39 -0
- package/react-components.mjs.map +1 -0
- package/react-native-components.d.ts +1 -0
- package/react-native-components.js +37 -0
- package/react-native-components.js.map +1 -0
- package/react-native-components.mjs +35 -0
- package/react-native-components.mjs.map +1 -0
- package/react-native-types.d.ts +8 -7
- package/react-types.d.ts +3 -1
- package/react.d.ts +1 -2
- package/react.js +133 -150
- package/react.js.map +1 -1
- package/react.mjs +134 -151
- package/react.mjs.map +1 -1
- package/src/{observableBatcher.d.ts → batching.d.ts} +4 -6
- package/src/computed.d.ts +2 -0
- package/src/{observableEvent.d.ts → event.d.ts} +1 -1
- package/src/globals.d.ts +6 -4
- package/src/helpers.d.ts +3 -1
- package/src/is.d.ts +1 -0
- package/src/observable.d.ts +7 -7
- package/src/observableInterfaces.d.ts +19 -19
- package/src/observe.d.ts +3 -0
- package/src/onChange.d.ts +2 -0
- package/src/react/flow.d.ts +31 -0
- package/src/react/useComputed.d.ts +6 -1
- package/src/react/useObserve.d.ts +1 -0
- package/src/{react/components.d.ts → react-components/react-components.d.ts} +1 -7
- package/src/{react-native/components.d.ts → react-native-components/rn-components.d.ts} +2 -6
- package/src/when.d.ts +2 -0
- package/state-types.d.ts +15 -0
- package/trace.js +5 -3
- package/trace.js.map +1 -1
- package/trace.mjs +6 -4
- package/trace.mjs.map +1 -1
- package/react-native.d.ts +0 -1
- package/react-native.js +0 -132
- package/react-native.js.map +0 -1
- package/react-native.mjs +0 -128
- package/react-native.mjs.map +0 -1
- package/src/observableComputed.d.ts +0 -2
- package/src/on.d.ts +0 -6
- package/src/react/controlFlow.d.ts +0 -28
- package/src/react/useObserver.d.ts +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
## 0.14.5
|
|
2
|
+
- Feat: Allow passing observables directly to Show
|
|
3
|
+
- Fix: Usage of old observe() when if prop is an observable
|
|
4
|
+
|
|
5
|
+
## 0.14.4
|
|
6
|
+
- Fix: Some issues in remote persistence plugins (not yet released)
|
|
7
|
+
|
|
8
|
+
## 0.14.3
|
|
9
|
+
- Fix: Some issues in remote persistence plugins (not yet released)
|
|
10
|
+
|
|
11
|
+
## 0.14.2
|
|
12
|
+
- Fix: Old versions of React Native were crashing because of using `React.` without importing it
|
|
13
|
+
|
|
14
|
+
## 0.14.1
|
|
15
|
+
- Fix: `For` component with children re-renders with the latest children correctly
|
|
16
|
+
|
|
17
|
+
## 0.14.0
|
|
18
|
+
- Feature: A `For` component for easy rendering with array optimizations
|
|
19
|
+
- Fix: Improve performance of observer
|
|
20
|
+
- Fix: Support `_id` or `__id` field names for array optimizations
|
|
21
|
+
- Fix: Mixing shallow and non-shallow listeners in a component could have not mixed correctly
|
|
22
|
+
|
|
23
|
+
## 0.13.2
|
|
24
|
+
- Types: Renamed exported types for improved clarity
|
|
25
|
+
|
|
26
|
+
## 0.13.1
|
|
27
|
+
- Fix: Exported components were losing className/style when not using bind prop
|
|
28
|
+
|
|
29
|
+
## 0.13.0
|
|
30
|
+
- Breaking Change: Removed observe() and prop(), favoring get() and ref(). get() tracks by default and ref() does not.
|
|
31
|
+
- Feat: Support ref to a path on an undefined value
|
|
32
|
+
- Fix: A crash when calling get() on an observable with undefined parents
|
|
33
|
+
- Types: Enforce bind prop to not be a primitive
|
|
34
|
+
|
|
35
|
+
## 0.12.1
|
|
36
|
+
- Types: Improved types of exported components
|
|
37
|
+
|
|
38
|
+
## 0.12.0
|
|
39
|
+
- Feat: Allow direct assignment, with warnings to catch accidental errors, and an optional "safe" mode
|
|
40
|
+
- Feat: input components with `bind` prop that automatically binds an observable to value and onChange
|
|
41
|
+
- Feat: Support keyed ref: `obs.ref('key')`
|
|
42
|
+
- Feat: `onChange` has a `runImmediately` option
|
|
43
|
+
- Fix: `.ref()` and `.get()` inside an `observer` do reference counting so they don't untrack too aggressively
|
|
44
|
+
- Fix: `delete()` was notifying listeners with the value undefined, but the key not yet deleted
|
|
45
|
+
- Fix: `observer` was sometimes missing updates occurring between render and mount
|
|
46
|
+
|
|
47
|
+
## 0.11.0-beta.7
|
|
48
|
+
- Fix: New set option with function parameter was breaking persistence
|
|
49
|
+
- Fix: Component useEffect was getting called before observer could listen for changes
|
|
50
|
+
|
|
51
|
+
## 0.11.0-beta.6
|
|
52
|
+
- Fix: Babel plugin adds imports only once, only if not already imported
|
|
53
|
+
|
|
54
|
+
## 0.11.0-beta.5
|
|
55
|
+
- Feat: `set()` can take a function to easily compute it relative to the previous value
|
|
56
|
+
|
|
57
|
+
## 0.11.0-beta.4
|
|
58
|
+
- Feat: Added `traceListeners` and `traceUpdates` functions (exported from @legendapp/state/trace). Call them within an observer. `traceListeners` logs the path of all tracked observables, while `traceUpdates` logs details of each observable change that causes a render.
|
|
59
|
+
|
|
60
|
+
## 0.11.0-beta.3
|
|
61
|
+
- Fix: observer was not working the first time in StrictMode
|
|
62
|
+
- Fix: observer was not cleaning up old listeners when the the tracked observables changed
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Moo.do LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|