mobx 6.5.0 → 6.6.2

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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # mobx
2
2
 
3
+ ## 6.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b375535c`](https://github.com/mobxjs/mobx/commit/b375535c422453963f5d3485a2ef5233568c12a6) [#3344](https://github.com/mobxjs/mobx/pull/3344) Thanks [@Nokel81](https://github.com/Nokel81)! - Allow readonly tuples as part of IObservableMapInitialValues
8
+
9
+ * [`7260cd41`](https://github.com/mobxjs/mobx/commit/7260cd413b1e52449523826ac239c2a197b2880f) [#3516](https://github.com/mobxjs/mobx/pull/3516) Thanks [@urugator](https://github.com/urugator)! - fix regression #3514: LegacyObservableArray compat with Safari 9.\*
10
+
11
+ - [`78d1aa23`](https://github.com/mobxjs/mobx/commit/78d1aa2362b4dc5d521518688d6ac7e2d4f7ad3a) [#3458](https://github.com/mobxjs/mobx/pull/3458) Thanks [@egilll](https://github.com/egilll)! - A slight revamp of the README, wording, and clearer links
12
+
13
+ ## 6.6.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [`63698d06`](https://github.com/mobxjs/mobx/commit/63698d0681988194bac5fc01851882b417b35f18) [#3427](https://github.com/mobxjs/mobx/pull/3427) Thanks [@RyanCavanaugh](https://github.com/RyanCavanaugh)! - Apply 'object' constraint where required
18
+
19
+ ## 6.6.0
20
+
21
+ ### Minor Changes
22
+
23
+ - [`8e204c7b`](https://github.com/mobxjs/mobx/commit/8e204c7b7d1dbad597761fa83beda77f027ee34c) [#3409](https://github.com/mobxjs/mobx/pull/3409) Thanks [@Nokel81](https://github.com/Nokel81)! - Remove observable.box type inconsistancy
24
+
3
25
  ## 6.5.0
4
26
 
5
27
  ### Minor Changes
@@ -244,7 +266,7 @@ Support the ongoing maintenance at: https://opencollective.com/mobx
244
266
 
245
267
  [`28f8a11d`](https://github.com/mobxjs/mobx/commit/28f8a11d8b94f1aca2eec4ae9c5f45c5ea2f4362) [#2641](https://github.com/mobxjs/mobx/pull/2641) Thanks [@urugator](https://github.com/urugator)!
246
268
 
247
- - `action`, `computed`, `flow` defined on prototype can be overriden by subclass via `override` annotation/decorator. Previously broken.
269
+ - `action`, `computed`, `flow` defined on prototype can be overridden by subclass via `override` annotation/decorator. Previously broken.
248
270
  - Overriding anything defined on instance itself (`this`) is not supported and should throw. Previously partially possible or broken.
249
271
  - Attempt to re-annotate property always throws. Previously mostly undefined outcome.
250
272
  - All annotated and non-observable props (action/flow) are non-writable. Previously writable.
@@ -1505,7 +1527,7 @@ function Square() {
1505
1527
 
1506
1528
  - Fixed #360: Removed expensive cycle detection (cycles are still detected, but a bit later)
1507
1529
  - Fixed #377: `toJS` serialization of Dates and Regexes preserves the original values
1508
- - Fixed #379: `@action` decorated methods can now be inherited / overriden
1530
+ - Fixed #379: `@action` decorated methods can now be inherited / overridden
1509
1531
 
1510
1532
  ## 2.3.3
1511
1533
 
package/README.md CHANGED
@@ -7,15 +7,21 @@ _Simple, scalable state management._
7
7
  [![npm version](https://badge.fury.io/js/mobx.svg)](https://badge.fury.io/js/mobx)
8
8
  [![OpenCollective](https://opencollective.com/mobx/backers/badge.svg)](docs/backers-sponsors.md#backers)
9
9
  [![OpenCollective](https://opencollective.com/mobx/sponsors/badge.svg)](docs/backers-sponsors.md#sponsors)
10
-
11
10
  [![Discuss on Github](https://img.shields.io/badge/discuss%20on-GitHub-orange)](https://github.com/mobxjs/mobx/discussions)
11
+ [![Coverage Status](https://coveralls.io/repos/github/mobxjs/mobx/badge.svg?branch=main)](https://coveralls.io/github/mobxjs/mobx?branch=main)
12
12
  [![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/mobx)
13
13
 
14
14
  ---
15
15
 
16
- > Documentation for older **unsupported** V4/V5 can be [found here](https://github.com/mobxjs/mobx/blob/mobx4and5/docs/README.md), but be sure to read about [current documentation first](https://mobx.js.org/about-this-documentation.html).
16
+ ## Documentation
17
+
18
+ Documentation can be found at **[mobx.js.org](https://mobx.js.org/)**.
19
+
20
+ ---
21
+
22
+ ## Sponsors
17
23
 
18
- MobX is made possible by the generosity of the sponsors below, and many other [individual backers](docs/backers-sponsors.md#backers). Sponsoring directly impacts the longevity of this project.
24
+ MobX is made possible by the generosity of the sponsors below, and many other [individual backers](https://github.com/mobxjs/mobx/blob/main/docs/backers-sponsors.md#backers). Sponsoring directly impacts the longevity of this project.
19
25
 
20
26
  **🥇 Gold sponsors (\$3000+ total contribution):** <br/>
21
27
  <a href="https://mendix.com/"><img src="https://mobx.js.org/assets/mendix-logo.png" align="center" width="100" title="Mendix" alt="Mendix" /></a>
@@ -28,7 +34,7 @@ MobX is made possible by the generosity of the sponsors below, and many other [i
28
34
 
29
35
  **🥈 Silver sponsors (\$100+ per month):**<br/>
30
36
  <a href="https://www.codefirst.co.uk/"><img src="https://mobx.js.org/assets/codefirst.png" align="center" width="100" title="CodeFirst" alt="CodeFirst"/></a>
31
- <a href="https://www.dcsl.com/"><img src="https://mobx.js.org/assets/dcsl.png" align="center" width="100" title="DCSL Guidesmiths" alt="DCSL Guidesmiths"/></a>
37
+ <a href="https://www.one-beyond.com"><img src="https://mobx.js.org/assets/dcsl.png" align="center" width="100" title="One Beyond" alt="One Beyond"/></a>
32
38
  <a href="https://www.bugsnag.com/platforms/react-error-reporting?utm_source=MobX&utm_medium=Website&utm_content=open-source&utm_campaign=2019-community&utm_term=20190913"><img src="https://mobx.js.org/assets/bugsnag.jpg" align="center" width="100" title="Bugsnag" alt="Bugsnag"/></a>
33
39
  <a href="https://curology.com/blog/tech"><img src="https://mobx.js.org/assets/curology.png" align="center" width="100" title="Curology" alt="Curology"/></a>
34
40
  <a href="https://modulz.app/"><img src="https://mobx.js.org/assets/modulz.png" align="center" width="100" title="Modulz" alt="Modulz"/></a>
@@ -48,27 +54,28 @@ MobX is made possible by the generosity of the sponsors below, and many other [i
48
54
 
49
55
  _Anything that can be derived from the application state, should be. Automatically._
50
56
 
51
- MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP).
57
+ MobX is a battle-tested library that makes state management simple and scalable by transparently applying functional reactive programming.
52
58
  The philosophy behind MobX is simple:
53
59
 
54
60
  <div class="benefits">
55
61
  <div>
56
62
  <div class="pic">😙</div>
57
63
  <div>
58
- <h5>Straightforward</h5>
59
- <p>Write minimalistic, boilerplate free code that captures your intent.
60
- Trying to update a record field? Use the good old JavaScript assignment.
61
- Updating data in an asynchronous process? No special tools are required, the reactivity system will detect all your changes and propagate them out to where they are being used.
64
+ <h4>Straightforward</h4>
65
+ <p>Write minimalistic, boilerplate-free code that captures your intent.
66
+ Trying to update a record field? Simply use a normal JavaScript assignment —
67
+ the reactivity system will detect all your changes and propagate them out to where they are being used.
68
+ No special tools are required when updating data in an asynchronous process.
62
69
  </p>
63
70
  </div>
64
71
  </div>
65
72
  <div>
66
73
  <div class="pic">🚅</div>
67
74
  <div>
68
- <h5>Effortless optimal rendering</h5>
75
+ <h4>Effortless optimal rendering</h4>
69
76
  <p>
70
77
  All changes to and uses of your data are tracked at runtime, building a dependency tree that captures all relations between state and output.
71
- This guarantees that computations depending on your state, like React components, run only when strictly needed.
78
+ This guarantees that computations that depend on your state, like React components, run only when strictly needed.
72
79
  There is no need to manually optimize components with error-prone and sub-optimal techniques like memoization and selectors.
73
80
  </p>
74
81
  </div>
@@ -76,7 +83,7 @@ The philosophy behind MobX is simple:
76
83
  <div>
77
84
  <div class="pic">🤹🏻‍♂️</div>
78
85
  <div>
79
- <h5>Architectural freedom</h5>
86
+ <h4>Architectural freedom</h4>
80
87
  <p>
81
88
  MobX is unopinionated and allows you to manage your application state outside of any UI framework.
82
89
  This makes your code decoupled, portable, and above all, easily testable.
@@ -85,6 +92,8 @@ The philosophy behind MobX is simple:
85
92
  </div>
86
93
  </div>
87
94
 
95
+ ---
96
+
88
97
  ## A quick example
89
98
 
90
99
  So what does code that uses MobX look like?
@@ -127,7 +136,7 @@ setInterval(() => {
127
136
  }, 1000)
128
137
  ```
129
138
 
130
- The `observer` wrapper around the `TimerView` React component, will automatically detect that rendering
139
+ The `observer` wrapper around the `TimerView` React component will automatically detect that rendering
131
140
  depends on the `timer.secondsPassed` observable, even though this relationship is not explicitly defined. The reactivity system will take care of re-rendering the component when _precisely that_ field is updated in the future.
132
141
 
133
142
  Every event (`onClick` / `setInterval`) invokes an _action_ (`myTimer.increase` / `myTimer.reset`) that updates _observable state_ (`myTimer.secondsPassed`).
@@ -137,49 +146,36 @@ Changes in the observable state are propagated precisely to all _computations_ a
137
146
 
138
147
  This conceptual picture can be applied to the above example, or any other application using MobX.
139
148
 
140
- To learn about the core concepts of MobX using a larger example, check out [The gist of MobX](https://mobx.js.org/the-gist-of-mobx.html) section, or take the [10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started).
141
- The philosophy and benefits of the mental model provided by MobX are also described in great detail in the blog posts [UI as an afterthought](https://michel.codes/blogs/ui-as-an-afterthought) and [How to decouple state and UI (a.k.a. you don’t need componentWillMount)](https://hackernoon.com/how-to-decouple-state-and-ui-a-k-a-you-dont-need-componentwillmount-cc90b787aa37).
142
-
143
- <div class="cheat"><a href="https://gum.co/fSocU"><button title="Download the MobX 6 cheat sheet and sponsor the project">Download the MobX 6 cheat sheet</button></a></div>
144
-
145
- ## What others are saying...
146
-
147
- > Guise, #mobx isn't pubsub, or your grandpa's observer pattern. Nay, it is a carefully orchestrated observable dimensional portal fueled by the power cosmic. It doesn't do change detection, it's actually a level 20 psionic with soul knife, slashing your viewmodel into submission.
148
-
149
- > After using #mobx for lone projects for a few weeks, it feels awesome to introduce it to the team. Time: 1/2, Fun: 2X
149
+ ## Getting started
150
150
 
151
- > Working with #mobx is basically a continuous loop of me going “this is way too simple, it definitely won’t work” only to be proven wrong
152
-
153
- > I have built big apps with MobX already and comparing to the one before that which was using Redux, it is simpler to read and much easier to reason about.
154
-
155
- > The #mobx is the way I always want things to be! It's really surprising simple and fast! Totally awesome! Don't miss it!
151
+ To learn about the core concepts of MobX using a larger example, check out **[The gist of MobX](https://mobx.js.org/the-gist-of-mobx.html)** page, or take the **[10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started)**.
152
+ The philosophy and benefits of the mental model provided by MobX are also described in great detail in the blog posts [UI as an afterthought](https://michel.codes/blogs/ui-as-an-afterthought) and [How to decouple state and UI (a.k.a. you don’t need componentWillMount)](https://hackernoon.com/how-to-decouple-state-and-ui-a-k-a-you-dont-need-componentwillmount-cc90b787aa37).
156
153
 
157
- ## Further resources and documentation
154
+ ## Further resources
158
155
 
159
- - [MobX cheat sheet (also sponsors the project)](https://gum.co/fSocU)
156
+ - The [MobX cheat sheet](https://gum.co/fSocU) (£5) is both useful and sponsors the project
160
157
  - [10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started)
161
158
  - [Egghead.io course, based on MobX 3](https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx)
159
+ - The [MobX awesome list](https://github.com/mobxjs/awesome-mobx#awesome-mobx) – a long list of MobX resources and example projects
162
160
 
163
161
  ### The MobX book
164
162
 
165
- [<img src="https://mobx.js.org/assets/book.jpg" height="80px"/> ](https://books.google.nl/books?id=ALFmDwAAQBAJ&pg=PP1&lpg=PP1&dq=michel+weststrate+mobx+quick+start+guide:+supercharge+the+client+state+in+your+react+apps+with+mobx&source=bl&ots=D460fxti0F&sig=ivDGTxsPNwlOjLHrpKF1nweZFl8&hl=nl&sa=X&ved=2ahUKEwiwl8XO--ncAhWPmbQKHWOYBqIQ6AEwAnoECAkQAQ#v=onepage&q=michel%20weststrate%20mobx%20quick%20start%20guide%3A%20supercharge%20the%20client%20state%20in%20your%20react%20apps%20with%20mobx&f=false)
163
+ <a href="https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837"><img src="https://mobx.js.org/assets/book.jpg" height="120px" /></a>
166
164
 
167
- Created by [Pavan Podila](https://twitter.com/pavanpodila) and [Michel Weststrate](https://twitter.com/mweststrate).
165
+ The **[MobX Quick Start Guide](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837)** ($24.99) by [Pavan Podila](https://twitter.com/pavanpodila) and [Michel Weststrate](https://twitter.com/mweststrate) is available as an [ebook](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837), [paperback](https://www.amazon.com/MobX-Quick-Start-Guide-Supercharge/dp/1789344832), and on the [O'Reilly platform](https://www.oreilly.com/library/view/mobx-quick-start/9781789344837/) (see [preview](https://books.google.com/books?id=ALFmDwAAQBAJ&printsec=frontcover#v=onepage&q&f=false)).
168
166
 
169
167
  ### Videos
170
168
 
171
- - [Introduction to MobX & React in 2020](https://www.youtube.com/watch?v=pnhIJA64ByY) by Leigh Halliday, _17min_.
172
- - [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) by Michel Weststrate, _40min_, [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing).
173
- - [CityJS 2020: MobX, from mutable to immutable, to observable data](https://www.youtube.com/watch?v=ZHxFrbK3VB0&feature=emb_logo) by Michel Weststrate, _30min_.
174
- - [OpenSourceNorth: Practical React with MobX (ES5)](https://www.youtube.com/watch?v=XGwuM_u7UeQ) by Matt Ruby, _42min_.
175
- - [HolyJS 2019: MobX and the unique symbiosis of predictability and speed](https://www.youtube.com/watch?v=NBYbBbjZeX4&list=PL8sJahqnzh8JJD7xahG5zXkjfM5GOgcPA&index=21&t=0s) by Michel Weststrate, _59min_.
176
- - [React Amsterdam 2016: State Management Is Easy](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) by Michel Weststrate, _20min_, [slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx).
177
- - {🚀} [React Live 2019: Reinventing MobX](https://www.youtube.com/watch?v=P_WqKZxpX8g) by Max Gallo, _27min_.
178
-
179
- And an all around [MobX awesome list](https://github.com/mobxjs/awesome-mobx#awesome-mobx).
169
+ - [Introduction to MobX & React in 2020](https://www.youtube.com/watch?v=pnhIJA64ByY) by Leigh Halliday, _17 min_.
170
+ - [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) by Michel Weststrate, _40 min_, [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing).
171
+ - [CityJS 2020: MobX, from mutable to immutable, to observable data](https://youtu.be/sP7dtZm_Wx0?t=27050) by Michel Weststrate, _30 min_.
172
+ - [OpenSourceNorth: Practical React with MobX (ES5)](https://www.youtube.com/watch?v=XGwuM_u7UeQ) by Matt Ruby, _42 min_.
173
+ - [HolyJS 2019: MobX and the unique symbiosis of predictability and speed](https://www.youtube.com/watch?v=NBYbBbjZeX4&list=PL8sJahqnzh8JJD7xahG5zXkjfM5GOgcPA&index=21&t=0s) by Michel Weststrate, _59 min_.
174
+ - [React Amsterdam 2016: State Management Is Easy](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) by Michel Weststrate, _20 min_, [slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx).
175
+ - {🚀} [React Live 2019: Reinventing MobX](https://www.youtube.com/watch?v=P_WqKZxpX8g) by Max Gallo, _27 min_.
180
176
 
181
177
  ## Credits
182
178
 
183
- MobX is inspired by reactive programming principles as found in the spreadsheets. It is inspired by MVVM frameworks like MeteorJS tracker, knockout and Vue.js, but MobX brings _Transparent Functional Reactive Programming_ to the next level and provides a standalone implementation. It implements TFRP in a glitch-free, synchronous, predictable and efficient manner.
179
+ MobX is inspired by reactive programming principles, which are for example used in spreadsheets. It is inspired by model–view–viewmodel frameworks like [MeteorJS's Tracker](https://docs.meteor.com/api/tracker.html), [Knockout](https://knockoutjs.com/) and [Vue.js](https://vuejs.org/), but MobX brings _transparent functional reactive programming_ (TFRP, a concept which is further explained in the [MobX book](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837)) to the next level and provides a standalone implementation. It implements TFRP in a glitch-free, synchronous, predictable and efficient manner.
184
180
 
185
- A ton of credits goes to [Mendix](https://github.com/mendix), for providing the flexibility and support to maintain MobX and the chance to proof the philosophy of MobX in a real, complex, performance critical applications.
181
+ A ton of credit goes to [Mendix](https://github.com/mendix), for providing the flexibility and support to maintain MobX and the chance to prove the philosophy of MobX in a real, complex, performance critical applications.
@@ -16,12 +16,16 @@ export declare function asCreateObservableOptions(thing: any): CreateObservableO
16
16
  export declare function getEnhancerFromOptions(options: CreateObservableOptions): IEnhancer<any>;
17
17
  export declare function getAnnotationFromOptions(options?: CreateObservableOptions): Annotation | undefined;
18
18
  export declare function getEnhancerFromAnnotation(annotation?: Annotation): IEnhancer<any>;
19
+ export interface IObservableValueFactory {
20
+ <T>(value: T, options?: CreateObservableOptions): IObservableValue<T>;
21
+ <T>(value?: T, options?: CreateObservableOptions): IObservableValue<T | undefined>;
22
+ }
19
23
  export interface IObservableFactory extends Annotation, PropertyDecorator {
20
24
  <T = any>(value: T[], options?: CreateObservableOptions): IObservableArray<T>;
21
25
  <T = any>(value: Set<T>, options?: CreateObservableOptions): ObservableSet<T>;
22
26
  <K = any, V = any>(value: Map<K, V>, options?: CreateObservableOptions): ObservableMap<K, V>;
23
27
  <T extends object>(value: T, decorators?: AnnotationsMap<T, never>, options?: CreateObservableOptions): T;
24
- box: <T = any>(value?: T, options?: CreateObservableOptions) => IObservableValue<T>;
28
+ box: IObservableValueFactory;
25
29
  array: <T = any>(initialValues?: T[], options?: CreateObservableOptions) => IObservableArray<T>;
26
30
  set: <T = any>(initialValues?: IObservableSetInitialValues<T>, options?: CreateObservableOptions) => ObservableSet<T>;
27
31
  map: <K = any, V = any>(initialValues?: IObservableMapInitialValues<K, V>, options?: CreateObservableOptions) => ObservableMap<K, V>;
@@ -426,7 +426,7 @@ function assertNotDecorated(prototype, annotation, key) {
426
426
  var fieldName = prototype.constructor.name + ".prototype." + key.toString();
427
427
  var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;
428
428
  var requestedAnnotationType = annotation.annotationType_;
429
- die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed." + "\nUse '@override' decorator for methods overriden by subclass.");
429
+ die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed." + "\nUse '@override' decorator for methods overridden by subclass.");
430
430
  }
431
431
  }
432
432
  /**
@@ -1350,7 +1350,7 @@ function allowStateChangesEnd(prev) {
1350
1350
  var _Symbol$toPrimitive;
1351
1351
  var CREATE = "create";
1352
1352
  _Symbol$toPrimitive = Symbol.toPrimitive;
1353
- var ObservableValue = /*#__PURE__*/function (_Atom, _Symbol$toPrimitive2) {
1353
+ var ObservableValue = /*#__PURE__*/function (_Atom) {
1354
1354
  _inheritsLoose(ObservableValue, _Atom);
1355
1355
 
1356
1356
  function ObservableValue(value, enhancer, name_, notifySpy, equals) {
@@ -1510,12 +1510,12 @@ var ObservableValue = /*#__PURE__*/function (_Atom, _Symbol$toPrimitive2) {
1510
1510
  return toPrimitive(this.get());
1511
1511
  };
1512
1512
 
1513
- _proto[_Symbol$toPrimitive2] = function () {
1513
+ _proto[_Symbol$toPrimitive] = function () {
1514
1514
  return this.valueOf();
1515
1515
  };
1516
1516
 
1517
1517
  return ObservableValue;
1518
- }(Atom, _Symbol$toPrimitive);
1518
+ }(Atom);
1519
1519
  var isObservableValue = /*#__PURE__*/createInstanceofPredicate("ObservableValue", ObservableValue);
1520
1520
 
1521
1521
  var _Symbol$toPrimitive$1;
@@ -1540,7 +1540,7 @@ var _Symbol$toPrimitive$1;
1540
1540
  */
1541
1541
 
1542
1542
  _Symbol$toPrimitive$1 = Symbol.toPrimitive;
1543
- var ComputedValue = /*#__PURE__*/function (_Symbol$toPrimitive2) {
1543
+ var ComputedValue = /*#__PURE__*/function () {
1544
1544
  // nodes we are looking at. Our value depends on these nodes
1545
1545
  // during tracking it's an array with new observed observers
1546
1546
  // to check for cycles
@@ -1797,12 +1797,12 @@ var ComputedValue = /*#__PURE__*/function (_Symbol$toPrimitive2) {
1797
1797
  return toPrimitive(this.get());
1798
1798
  };
1799
1799
 
1800
- _proto[_Symbol$toPrimitive2] = function () {
1800
+ _proto[_Symbol$toPrimitive$1] = function () {
1801
1801
  return this.valueOf();
1802
1802
  };
1803
1803
 
1804
1804
  return ComputedValue;
1805
- }(_Symbol$toPrimitive$1);
1805
+ }();
1806
1806
  var isComputedValue = /*#__PURE__*/createInstanceofPredicate("ComputedValue", ComputedValue);
1807
1807
 
1808
1808
  var IDerivationState_;
@@ -4482,7 +4482,7 @@ var DELETE = "delete"; // just extend Map? See also https://gist.github.com/nest
4482
4482
 
4483
4483
  _Symbol$iterator = Symbol.iterator;
4484
4484
  _Symbol$toStringTag = Symbol.toStringTag;
4485
- var ObservableMap = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {
4485
+ var ObservableMap = /*#__PURE__*/function () {
4486
4486
  // hasMap, not hashMap >-).
4487
4487
  function ObservableMap(initialData, enhancer_, name_) {
4488
4488
  var _this = this;
@@ -4766,7 +4766,7 @@ var ObservableMap = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTa
4766
4766
  });
4767
4767
  };
4768
4768
 
4769
- _proto[_Symbol$iterator2] = function () {
4769
+ _proto[_Symbol$iterator] = function () {
4770
4770
  return this.entries();
4771
4771
  };
4772
4772
 
@@ -4958,14 +4958,14 @@ var ObservableMap = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTa
4958
4958
  return this.data_.size;
4959
4959
  }
4960
4960
  }, {
4961
- key: _Symbol$toStringTag2,
4961
+ key: _Symbol$toStringTag,
4962
4962
  get: function get() {
4963
4963
  return "Map";
4964
4964
  }
4965
4965
  }]);
4966
4966
 
4967
4967
  return ObservableMap;
4968
- }(_Symbol$iterator, _Symbol$toStringTag); // eslint-disable-next-line
4968
+ }(); // eslint-disable-next-line
4969
4969
 
4970
4970
  var isObservableMap = /*#__PURE__*/createInstanceofPredicate("ObservableMap", ObservableMap);
4971
4971
 
@@ -4991,7 +4991,7 @@ var _Symbol$iterator$1, _Symbol$toStringTag$1;
4991
4991
  var ObservableSetMarker = {};
4992
4992
  _Symbol$iterator$1 = Symbol.iterator;
4993
4993
  _Symbol$toStringTag$1 = Symbol.toStringTag;
4994
- var ObservableSet = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {
4994
+ var ObservableSet = /*#__PURE__*/function () {
4995
4995
  function ObservableSet(initialData, enhancer, name_) {
4996
4996
  if (enhancer === void 0) {
4997
4997
  enhancer = deepEnhancer;
@@ -5252,7 +5252,7 @@ var ObservableSet = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTa
5252
5252
  return "[object ObservableSet]";
5253
5253
  };
5254
5254
 
5255
- _proto[_Symbol$iterator2] = function () {
5255
+ _proto[_Symbol$iterator$1] = function () {
5256
5256
  return this.values();
5257
5257
  };
5258
5258
 
@@ -5263,14 +5263,14 @@ var ObservableSet = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTa
5263
5263
  return this.data_.size;
5264
5264
  }
5265
5265
  }, {
5266
- key: _Symbol$toStringTag2,
5266
+ key: _Symbol$toStringTag$1,
5267
5267
  get: function get() {
5268
5268
  return "Set";
5269
5269
  }
5270
5270
  }]);
5271
5271
 
5272
5272
  return ObservableSet;
5273
- }(_Symbol$iterator$1, _Symbol$toStringTag$1); // eslint-disable-next-line
5273
+ }(); // eslint-disable-next-line
5274
5274
 
5275
5275
  var isObservableSet = /*#__PURE__*/createInstanceofPredicate("ObservableSet", ObservableSet);
5276
5276
 
@@ -5987,16 +5987,18 @@ function assertAnnotable(adm, annotation, key) {
5987
5987
  var fieldName = adm.name_ + "." + key.toString();
5988
5988
  var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;
5989
5989
  var requestedAnnotationType = annotation.annotationType_;
5990
- die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed." + "\nUse 'override' annotation for methods overriden by subclass.");
5990
+ die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed." + "\nUse 'override' annotation for methods overridden by subclass.");
5991
5991
  }
5992
5992
  }
5993
5993
 
5994
+ var ENTRY_0 = /*#__PURE__*/createArrayEntryDescriptor(0);
5994
5995
  /**
5995
5996
  * This array buffer contains two lists of properties, so that all arrays
5996
5997
  * can recycle their property definitions, which significantly improves performance of creating
5997
5998
  * properties on the fly.
5998
5999
  */
5999
6000
 
6001
+
6000
6002
  var OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array
6001
6003
 
6002
6004
  var StubArray = function StubArray() {};
@@ -6042,6 +6044,12 @@ var LegacyObservableArray = /*#__PURE__*/function (_StubArray, _Symbol$toStringT
6042
6044
  allowStateChangesEnd(prev);
6043
6045
  }
6044
6046
 
6047
+ {
6048
+ // Seems that Safari won't use numeric prototype setter untill any * numeric property is
6049
+ // defined on the instance. After that it works fine, even if this property is deleted.
6050
+ Object.defineProperty(_assertThisInitialized(_this), "0", ENTRY_0);
6051
+ }
6052
+
6045
6053
  return _this;
6046
6054
  }
6047
6055
 
@@ -6431,7 +6439,7 @@ function isAnnotation(thing) {
6431
6439
  * (c) Michel Weststrate 2015 - 2020
6432
6440
  * MIT Licensed
6433
6441
  *
6434
- * Welcome to the mobx sources! To get an global overview of how MobX internally works,
6442
+ * Welcome to the mobx sources! To get a global overview of how MobX internally works,
6435
6443
  * this is a good place to start:
6436
6444
  * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74
6437
6445
  *