@movable/studio-framework 2.38.1-custom-tool-context-options → 2.38.3
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/dist/index.es.js +9 -6
- package/dist/index.js +9 -6
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -4604,8 +4604,6 @@ function _arrayLikeToArray$9(arr, len) { if (len == null || len > arr.length) le
|
|
|
4604
4604
|
|
|
4605
4605
|
var ERROR_KEY = symbol('error');
|
|
4606
4606
|
|
|
4607
|
-
var TEMP_STORAGE = symbol('temporary-key');
|
|
4608
|
-
|
|
4609
4607
|
function isError(t) {
|
|
4610
4608
|
return t && _typeof(t) === 'object' && ERROR_KEY in t;
|
|
4611
4609
|
}
|
|
@@ -4627,6 +4625,10 @@ var CacheMap = /*#__PURE__*/function () {
|
|
|
4627
4625
|
_defineProperty(this, "acceptingKeys", true);
|
|
4628
4626
|
|
|
4629
4627
|
_defineProperty(this, "tempContext", void 0);
|
|
4628
|
+
|
|
4629
|
+
_defineProperty(this, "tempStorageKey", function (context) {
|
|
4630
|
+
return stringify(context);
|
|
4631
|
+
});
|
|
4630
4632
|
}
|
|
4631
4633
|
|
|
4632
4634
|
_createClass(CacheMap, [{
|
|
@@ -4720,11 +4722,12 @@ var CacheMap = /*#__PURE__*/function () {
|
|
|
4720
4722
|
key: "freezeContext",
|
|
4721
4723
|
value: function freezeContext() {
|
|
4722
4724
|
this.acceptingKeys = false;
|
|
4725
|
+
var temp = this.tempStorageKey(this.tempContext);
|
|
4723
4726
|
|
|
4724
|
-
if (this.cache.has(
|
|
4725
|
-
var value = this.cache.get(
|
|
4727
|
+
if (this.cache.has(temp)) {
|
|
4728
|
+
var value = this.cache.get(temp);
|
|
4726
4729
|
var context = this.tempContext;
|
|
4727
|
-
this.cache["delete"](
|
|
4730
|
+
this.cache["delete"](temp);
|
|
4728
4731
|
this.cache.set(this.cacheKeyFor(context), value);
|
|
4729
4732
|
}
|
|
4730
4733
|
}
|
|
@@ -4743,7 +4746,7 @@ var CacheMap = /*#__PURE__*/function () {
|
|
|
4743
4746
|
value: function cacheKeyFor(context) {
|
|
4744
4747
|
if (this.acceptingKeys) {
|
|
4745
4748
|
this.tempContext = context;
|
|
4746
|
-
return
|
|
4749
|
+
return this.tempStorageKey(context);
|
|
4747
4750
|
}
|
|
4748
4751
|
|
|
4749
4752
|
if (this.keyCache.has(context)) {
|
package/dist/index.js
CHANGED
|
@@ -4614,8 +4614,6 @@ function _arrayLikeToArray$9(arr, len) { if (len == null || len > arr.length) le
|
|
|
4614
4614
|
|
|
4615
4615
|
var ERROR_KEY = symbol('error');
|
|
4616
4616
|
|
|
4617
|
-
var TEMP_STORAGE = symbol('temporary-key');
|
|
4618
|
-
|
|
4619
4617
|
function isError(t) {
|
|
4620
4618
|
return t && _typeof(t) === 'object' && ERROR_KEY in t;
|
|
4621
4619
|
}
|
|
@@ -4637,6 +4635,10 @@ var CacheMap = /*#__PURE__*/function () {
|
|
|
4637
4635
|
_defineProperty(this, "acceptingKeys", true);
|
|
4638
4636
|
|
|
4639
4637
|
_defineProperty(this, "tempContext", void 0);
|
|
4638
|
+
|
|
4639
|
+
_defineProperty(this, "tempStorageKey", function (context) {
|
|
4640
|
+
return stringify(context);
|
|
4641
|
+
});
|
|
4640
4642
|
}
|
|
4641
4643
|
|
|
4642
4644
|
_createClass(CacheMap, [{
|
|
@@ -4730,11 +4732,12 @@ var CacheMap = /*#__PURE__*/function () {
|
|
|
4730
4732
|
key: "freezeContext",
|
|
4731
4733
|
value: function freezeContext() {
|
|
4732
4734
|
this.acceptingKeys = false;
|
|
4735
|
+
var temp = this.tempStorageKey(this.tempContext);
|
|
4733
4736
|
|
|
4734
|
-
if (this.cache.has(
|
|
4735
|
-
var value = this.cache.get(
|
|
4737
|
+
if (this.cache.has(temp)) {
|
|
4738
|
+
var value = this.cache.get(temp);
|
|
4736
4739
|
var context = this.tempContext;
|
|
4737
|
-
this.cache["delete"](
|
|
4740
|
+
this.cache["delete"](temp);
|
|
4738
4741
|
this.cache.set(this.cacheKeyFor(context), value);
|
|
4739
4742
|
}
|
|
4740
4743
|
}
|
|
@@ -4753,7 +4756,7 @@ var CacheMap = /*#__PURE__*/function () {
|
|
|
4753
4756
|
value: function cacheKeyFor(context) {
|
|
4754
4757
|
if (this.acceptingKeys) {
|
|
4755
4758
|
this.tempContext = context;
|
|
4756
|
-
return
|
|
4759
|
+
return this.tempStorageKey(context);
|
|
4757
4760
|
}
|
|
4758
4761
|
|
|
4759
4762
|
if (this.keyCache.has(context)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movable/studio-framework",
|
|
3
|
-
"version": "2.38.
|
|
3
|
+
"version": "2.38.3",
|
|
4
4
|
"description": "A Component library for reactive Studio apps.",
|
|
5
5
|
"author": "Movable Ink",
|
|
6
6
|
"repository": "movableink/studio-framework",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@babel/preset-react": "^7.14.5",
|
|
36
36
|
"@babel/preset-typescript": "^7.13.0",
|
|
37
37
|
"@movable/eslint-config-react": "^1.0.1",
|
|
38
|
-
"@movable/framework-types": "^2.38.
|
|
39
|
-
"@movable/studio-framework-test-helpers": "^2.38.
|
|
38
|
+
"@movable/framework-types": "^2.38.3",
|
|
39
|
+
"@movable/studio-framework-test-helpers": "^2.38.3",
|
|
40
40
|
"@types/qunit": "^2.11.1",
|
|
41
41
|
"@types/qunit-dom": "^0.7.0",
|
|
42
42
|
"@types/react": "^17.0.6",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"volta": {
|
|
69
69
|
"extends": "../../package.json"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "19a98ee10342805cde5f9589d7887ffbc3c00f6d"
|
|
72
72
|
}
|