@glimmer/runtime
Advanced tools
Comparing version 0.79.1 to 0.79.2
@@ -21,3 +21,3 @@ "use strict"; | ||
function tagForKey(hash, key) { | ||
return (0, _validator.track)(() => hash[key]); | ||
return (0, _validator.track)(() => (0, _reference.valueForRef)(hash[key])); | ||
} | ||
@@ -28,21 +28,40 @@ | ||
class HashProxy { | ||
constructor(named) { | ||
constructor(named, target) { | ||
this.named = named; | ||
this.target = target; | ||
this.argsCaches = (0, _util.dict)(); | ||
} | ||
get(target, prop, receiver) { | ||
const ref = this.named[prop]; | ||
syncKey(key) { | ||
let { | ||
argsCaches, | ||
named | ||
} = this; | ||
if (!(key in named)) return; | ||
let cache = argsCaches[key]; | ||
if (ref !== undefined) { | ||
return (0, _reference.valueForRef)(ref); | ||
} else { | ||
return Reflect.get(target, prop, receiver); | ||
if (cache === undefined) { | ||
const ref = this.named[key]; | ||
argsCaches[key] = cache = (0, _reference.createComputeRef)(() => { | ||
this.target[key] = (0, _reference.valueForRef)(ref); | ||
}); | ||
} | ||
(0, _reference.valueForRef)(cache); | ||
} | ||
set(target, prop, receiver) { | ||
(0, _globalContext.assert)(!(prop in this.named), `You attempted to set the "${prop}" value on an object generated using the (hash) helper, but this is not supported because it was defined on the original hash and is a reference to the original value. You can set values which were _not_ defined on the hash, but you cannot set values defined on the original hash (e.g. {{hash myValue=123}})`); | ||
return Reflect.set(target, prop, receiver); | ||
get(target, prop) { | ||
this.syncKey(prop); | ||
return target[prop]; | ||
} | ||
set(target, prop, value) { | ||
(0, _globalContext.deprecate)(`You set the '${prop}' property on a {{hash}} object. Setting properties on objects generated by {{hash}} is deprecated. Please update to use an object created with a tracked property or getter, or with a custom helper.`, false, { | ||
id: 'setting-on-hash' | ||
}); | ||
this.syncKey(prop); | ||
target[prop] = value; | ||
return true; | ||
} | ||
has(target, prop) { | ||
@@ -53,3 +72,7 @@ return prop in this.named || prop in target; | ||
ownKeys(target) { | ||
return Reflect.ownKeys(this.named).concat(Reflect.ownKeys(target)); | ||
for (let key in this.named) { | ||
this.syncKey(key); | ||
} | ||
return Object.getOwnPropertyNames(target); | ||
} | ||
@@ -61,7 +84,8 @@ | ||
enumerable: true, | ||
configurable: true | ||
configurable: true, | ||
writable: true | ||
}; | ||
} | ||
return Reflect.getOwnPropertyDescriptor(target, prop); | ||
return Object.getOwnPropertyDescriptor(target, prop); | ||
} | ||
@@ -73,4 +97,9 @@ | ||
hashProxyFor = named => { | ||
const proxy = new Proxy((0, _util.dict)(), new HashProxy(named)); | ||
(0, _manager.setCustomTagFor)(proxy, (_obj, key) => tagForKey(named, key)); | ||
const target = (0, _util.dict)(); | ||
const proxy = new Proxy(target, new HashProxy(named, target)); | ||
(0, _manager.setCustomTagFor)(proxy, (_obj, key) => { | ||
let argTag = tagForKey(named, key); | ||
let proxyTag = (0, _validator.tagFor)(proxy, key); | ||
return (0, _validator.combine)([argTag, proxyTag]); | ||
}); | ||
return proxy; | ||
@@ -80,3 +109,8 @@ }; | ||
hashProxyFor = named => { | ||
let proxy = (0, _util.dict)(); | ||
const proxy = (0, _util.dict)(); // Create a HashProxy handler to store the local state in case anyone | ||
// overrides a named value. It handles all of the details in terms of | ||
// syncing state up and returning the correct value based on autotracking. | ||
const localState = (0, _util.dict)(); | ||
const proxyHandler = new HashProxy(named, localState); | ||
Object.keys(named).forEach(name => { | ||
@@ -88,3 +122,7 @@ Object.defineProperty(proxy, name, { | ||
get() { | ||
return (0, _reference.valueForRef)(named[name]); | ||
return proxyHandler.get(localState, name); | ||
}, | ||
set(value) { | ||
return proxyHandler.set(localState, name, value); | ||
} | ||
@@ -94,3 +132,7 @@ | ||
}); | ||
(0, _manager.setCustomTagFor)(proxy, (_obj, key) => tagForKey(named, key)); | ||
(0, _manager.setCustomTagFor)(proxy, (_obj, key) => { | ||
let argTag = tagForKey(named, key); | ||
let proxyTag = (0, _validator.tagFor)(proxy, key); | ||
return (0, _validator.combine)([argTag, proxyTag]); | ||
}); | ||
return proxy; | ||
@@ -144,2 +186,2 @@ }; | ||
exports.default =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uYW1lZCB9OiBDYXB0dXJlZEFyZ3VtZW50cyk6IFJlZmVyZW5jZTxEaWN0PHVua25vd24+PiA9PiB7XG4gICAgcmV0dXJuIGNyZWF0ZUNvbnN0UmVmKGhhc2hQcm94eUZvcihuYW1lZCksICdoYXNoJyk7XG4gIH1cbik7XG4iXSwic291cmNlUm9vdCI6IiJ9 |
@@ -22,3 +22,3 @@ "use strict"; | ||
return (0, _validator.track)(function () { | ||
return hash[key]; | ||
return (0, _reference.valueForRef)(hash[key]); | ||
}); | ||
@@ -30,4 +30,6 @@ } | ||
var HashProxy = /*#__PURE__*/function () { | ||
function HashProxy(named) { | ||
function HashProxy(named, target) { | ||
this.named = named; | ||
this.target = target; | ||
this.argsCaches = (0, _util.dict)(); | ||
} | ||
@@ -37,17 +39,34 @@ | ||
_proto.get = function get(target, prop, receiver) { | ||
var ref = this.named[prop]; | ||
_proto.syncKey = function syncKey(key) { | ||
var _this = this; | ||
if (ref !== undefined) { | ||
return (0, _reference.valueForRef)(ref); | ||
} else { | ||
return Reflect.get(target, prop, receiver); | ||
var argsCaches = this.argsCaches, | ||
named = this.named; | ||
if (!(key in named)) return; | ||
var cache = argsCaches[key]; | ||
if (cache === undefined) { | ||
var ref = this.named[key]; | ||
argsCaches[key] = cache = (0, _reference.createComputeRef)(function () { | ||
_this.target[key] = (0, _reference.valueForRef)(ref); | ||
}); | ||
} | ||
(0, _reference.valueForRef)(cache); | ||
}; | ||
_proto.set = function set(target, prop, receiver) { | ||
(0, _globalContext.assert)(!(prop in this.named), "You attempted to set the \"" + prop + "\" value on an object generated using the (hash) helper, but this is not supported because it was defined on the original hash and is a reference to the original value. You can set values which were _not_ defined on the hash, but you cannot set values defined on the original hash (e.g. {{hash myValue=123}})"); | ||
return Reflect.set(target, prop, receiver); | ||
_proto.get = function get(target, prop) { | ||
this.syncKey(prop); | ||
return target[prop]; | ||
}; | ||
_proto.set = function set(target, prop, value) { | ||
(0, _globalContext.deprecate)("You set the '" + prop + "' property on a {{hash}} object. Setting properties on objects generated by {{hash}} is deprecated. Please update to use an object created with a tracked property or getter, or with a custom helper.", false, { | ||
id: 'setting-on-hash' | ||
}); | ||
this.syncKey(prop); | ||
target[prop] = value; | ||
return true; | ||
}; | ||
_proto.has = function has(target, prop) { | ||
@@ -58,3 +77,7 @@ return prop in this.named || prop in target; | ||
_proto.ownKeys = function ownKeys(target) { | ||
return Reflect.ownKeys(this.named).concat(Reflect.ownKeys(target)); | ||
for (var key in this.named) { | ||
this.syncKey(key); | ||
} | ||
return Object.getOwnPropertyNames(target); | ||
}; | ||
@@ -66,7 +89,8 @@ | ||
enumerable: true, | ||
configurable: true | ||
configurable: true, | ||
writable: true | ||
}; | ||
} | ||
return Reflect.getOwnPropertyDescriptor(target, prop); | ||
return Object.getOwnPropertyDescriptor(target, prop); | ||
}; | ||
@@ -79,5 +103,8 @@ | ||
hashProxyFor = function hashProxyFor(named) { | ||
var proxy = new Proxy((0, _util.dict)(), new HashProxy(named)); | ||
var target = (0, _util.dict)(); | ||
var proxy = new Proxy(target, new HashProxy(named, target)); | ||
(0, _manager.setCustomTagFor)(proxy, function (_obj, key) { | ||
return tagForKey(named, key); | ||
var argTag = tagForKey(named, key); | ||
var proxyTag = (0, _validator.tagFor)(proxy, key); | ||
return (0, _validator.combine)([argTag, proxyTag]); | ||
}); | ||
@@ -88,3 +115,8 @@ return proxy; | ||
hashProxyFor = function hashProxyFor(named) { | ||
var proxy = (0, _util.dict)(); | ||
var proxy = (0, _util.dict)(); // Create a HashProxy handler to store the local state in case anyone | ||
// overrides a named value. It handles all of the details in terms of | ||
// syncing state up and returning the correct value based on autotracking. | ||
var localState = (0, _util.dict)(); | ||
var proxyHandler = new HashProxy(named, localState); | ||
Object.keys(named).forEach(function (name) { | ||
@@ -95,3 +127,6 @@ Object.defineProperty(proxy, name, { | ||
get: function get() { | ||
return (0, _reference.valueForRef)(named[name]); | ||
return proxyHandler.get(localState, name); | ||
}, | ||
set: function set(value) { | ||
return proxyHandler.set(localState, name, value); | ||
} | ||
@@ -101,3 +136,5 @@ }); | ||
(0, _manager.setCustomTagFor)(proxy, function (_obj, key) { | ||
return tagForKey(named, key); | ||
var argTag = tagForKey(named, key); | ||
var proxyTag = (0, _validator.tagFor)(proxy, key); | ||
return (0, _validator.combine)([argTag, proxyTag]); | ||
}); | ||
@@ -151,2 +188,2 @@ return proxy; | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3J1bnRpbWUvbGliL2hlbHBlcnMvaGFzaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBRUEsU0FBQSxTQUFBLENBQUEsSUFBQSxFQUFBLEdBQUEsRUFBNkQ7QUFDM0QsU0FBTyxzQkFBTSxZQUFBO0FBQUEsV0FBTSxJQUFJLENBQXZCLEdBQXVCLENBQVY7QUFBYixHQUFPLENBQVA7QUFDRDs7QUFFRCxJQUFBLFlBQUE7O0lBRUEsUztBQUNFLFdBQUEsU0FBQSxDQUFBLEtBQUEsRUFBaUQ7QUFBN0IsU0FBQSxLQUFBLEdBQUEsS0FBQTtBQUFpQzs7OztTQUVyRCxHLEdBQUEsU0FBQSxHQUFBLENBQUEsTUFBQSxFQUFBLElBQUEsRUFBQSxRQUFBLEVBQTZFO0FBQzNFLFFBQU0sR0FBRyxHQUFHLEtBQUEsS0FBQSxDQUFaLElBQVksQ0FBWjs7QUFFQSxRQUFJLEdBQUcsS0FBUCxTQUFBLEVBQXVCO0FBQ3JCLGFBQU8sNEJBQVAsR0FBTyxDQUFQO0FBREYsS0FBQSxNQUVPO0FBQ0wsYUFBTyxPQUFPLENBQVAsR0FBQSxDQUFBLE1BQUEsRUFBQSxJQUFBLEVBQVAsUUFBTyxDQUFQO0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pcyBhbiBlbXB0eSBvYmplY3Qgd2l0aCBubyBwcm90b3R5cGUgY2hhaW4sIHRoZXJlZm9yZVxuICAgY29tbW9uIG1ldGhvZHMgbGlrZSBgdG9TdHJpbmdgIGFyZSBub3QgYXZhaWxhYmxlIGluIHRoZSByZXN1bHRpbmcgaGFzaC5cbiAgIElmIHlvdSBuZWVkIHRvIHVzZSBzdWNoIGEgbWV0aG9kLCB5b3UgY2FuIHVzZSB0aGUgYGNhbGxgIG9yIGBhcHBseWBcbiAgIGFwcHJvYWNoOlxuXG4gICBgYGBqc1xuICAgZnVuY3Rpb24gdG9TdHJpbmcob2JqKSB7XG4gICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmFwcGx5KG9iaik7XG4gICB9XG4gICBgYGBcblxuICAgQG1ldGhvZCBoYXNoXG4gICBAcGFyYW0ge09iamVjdH0gb3B0aW9uc1xuICAgQHJldHVybiB7T2JqZWN0fSBIYXNoXG4gICBAcHVibGljXG4gKi9cbmV4cG9ydCBkZWZhdWx0IGludGVybmFsSGVscGVyKFxuICAoeyBuYW1lZCB9OiBDYXB0dXJlZEFyZ3VtZW50cyk6IFJlZmVyZW5jZTxEaWN0PHVua25vd24+PiA9PiB7XG4gICAgcmV0dXJuIGNyZWF0ZUNvbnN0UmVmKGhhc2hQcm94eUZvcihuYW1lZCksICdoYXNoJyk7XG4gIH1cbik7XG4iXSwic291cmNlUm9vdCI6IiJ9 |
import { setCustomTagFor } from '@glimmer/manager'; | ||
import { createConstRef, valueForRef } from '@glimmer/reference'; | ||
import { createComputeRef, createConstRef, valueForRef } from '@glimmer/reference'; | ||
import { dict, HAS_NATIVE_PROXY } from '@glimmer/util'; | ||
import { track } from '@glimmer/validator'; | ||
import { assert } from '@glimmer/global-context'; | ||
import { combine, tagFor, track } from '@glimmer/validator'; | ||
import { deprecate } from '@glimmer/global-context'; | ||
import { internalHelper } from './internal-helper'; | ||
function tagForKey(hash, key) { | ||
return track(() => hash[key]); | ||
return track(() => valueForRef(hash[key])); | ||
} | ||
@@ -15,21 +15,40 @@ | ||
class HashProxy { | ||
constructor(named) { | ||
constructor(named, target) { | ||
this.named = named; | ||
this.target = target; | ||
this.argsCaches = dict(); | ||
} | ||
get(target, prop, receiver) { | ||
const ref = this.named[prop]; | ||
syncKey(key) { | ||
let { | ||
argsCaches, | ||
named | ||
} = this; | ||
if (!(key in named)) return; | ||
let cache = argsCaches[key]; | ||
if (ref !== undefined) { | ||
return valueForRef(ref); | ||
} else { | ||
return Reflect.get(target, prop, receiver); | ||
if (cache === undefined) { | ||
const ref = this.named[key]; | ||
argsCaches[key] = cache = createComputeRef(() => { | ||
this.target[key] = valueForRef(ref); | ||
}); | ||
} | ||
valueForRef(cache); | ||
} | ||
set(target, prop, receiver) { | ||
assert(!(prop in this.named), `You attempted to set the "${prop}" value on an object generated using the (hash) helper, but this is not supported because it was defined on the original hash and is a reference to the original value. You can set values which were _not_ defined on the hash, but you cannot set values defined on the original hash (e.g. {{hash myValue=123}})`); | ||
return Reflect.set(target, prop, receiver); | ||
get(target, prop) { | ||
this.syncKey(prop); | ||
return target[prop]; | ||
} | ||
set(target, prop, value) { | ||
deprecate(`You set the '${prop}' property on a {{hash}} object. Setting properties on objects generated by {{hash}} is deprecated. Please update to use an object created with a tracked property or getter, or with a custom helper.`, false, { | ||
id: 'setting-on-hash' | ||
}); | ||
this.syncKey(prop); | ||
target[prop] = value; | ||
return true; | ||
} | ||
has(target, prop) { | ||
@@ -40,3 +59,7 @@ return prop in this.named || prop in target; | ||
ownKeys(target) { | ||
return Reflect.ownKeys(this.named).concat(Reflect.ownKeys(target)); | ||
for (let key in this.named) { | ||
this.syncKey(key); | ||
} | ||
return Object.getOwnPropertyNames(target); | ||
} | ||
@@ -48,7 +71,8 @@ | ||
enumerable: true, | ||
configurable: true | ||
configurable: true, | ||
writable: true | ||
}; | ||
} | ||
return Reflect.getOwnPropertyDescriptor(target, prop); | ||
return Object.getOwnPropertyDescriptor(target, prop); | ||
} | ||
@@ -60,4 +84,9 @@ | ||
hashProxyFor = named => { | ||
const proxy = new Proxy(dict(), new HashProxy(named)); | ||
setCustomTagFor(proxy, (_obj, key) => tagForKey(named, key)); | ||
const target = dict(); | ||
const proxy = new Proxy(target, new HashProxy(named, target)); | ||
setCustomTagFor(proxy, (_obj, key) => { | ||
let argTag = tagForKey(named, key); | ||
let proxyTag = tagFor(proxy, key); | ||
return combine([argTag, proxyTag]); | ||
}); | ||
return proxy; | ||
@@ -67,3 +96,8 @@ }; | ||
hashProxyFor = named => { | ||
let proxy = dict(); | ||
const proxy = dict(); // Create a HashProxy handler to store the local state in case anyone | ||
// overrides a named value. It handles all of the details in terms of | ||
// syncing state up and returning the correct value based on autotracking. | ||
const localState = dict(); | ||
const proxyHandler = new HashProxy(named, localState); | ||
Object.keys(named).forEach(name => { | ||
@@ -75,3 +109,7 @@ Object.defineProperty(proxy, name, { | ||
get() { | ||
return valueForRef(named[name]); | ||
return proxyHandler.get(localState, name); | ||
}, | ||
set(value) { | ||
return proxyHandler.set(localState, name, value); | ||
} | ||
@@ -81,3 +119,7 @@ | ||
}); | ||
setCustomTagFor(proxy, (_obj, key) => tagForKey(named, key)); | ||
setCustomTagFor(proxy, (_obj, key) => { | ||
let argTag = tagForKey(named, key); | ||
let proxyTag = tagFor(proxy, key); | ||
return combine([argTag, proxyTag]); | ||
}); | ||
return proxy; | ||
@@ -129,2 +171,2 @@ }; | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3J1bnRpbWUvbGliL2hlbHBlcnMvaGFzaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxTQUFTLGVBQVQsUUFBZ0Msa0JBQWhDO0FBQ0EsU0FBUyxjQUFULEVBQW9DLFdBQXBDLFFBQXVELG9CQUF2RDtBQUNBLFNBQVMsSUFBV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ZyBoYXNoLlxuICAgSWYgeW91IG5lZWQgdG8gdXNlIHN1Y2ggYSBtZXRob2QsIHlvdSBjYW4gdXNlIHRoZSBgY2FsbGAgb3IgYGFwcGx5YFxuICAgYXBwcm9hY2g6XG5cbiAgIGBgYGpzXG4gICBmdW5jdGlvbiB0b1N0cmluZyhvYmopIHtcbiAgICAgcmV0dXJuIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuYXBwbHkob2JqKTtcbiAgIH1cbiAgIGBgYFxuXG4gICBAbWV0aG9kIGhhc2hcbiAgIEBwYXJhbSB7T2JqZWN0fSBvcHRpb25zXG4gICBAcmV0dXJuIHtPYmplY3R9IEhhc2hcbiAgIEBwdWJsaWNcbiAqL1xuZXhwb3J0IGRlZmF1bHQgaW50ZXJuYWxIZWxwZXIoXG4gICh7IG5hbWVkIH06IENhcHR1cmVkQXJndW1lbnRzKTogUmVmZXJlbmNlPERpY3Q8dW5rbm93bj4+ID0+IHtcbiAgICByZXR1cm4gY3JlYXRlQ29uc3RSZWYoaGFzaFByb3h5Rm9yKG5hbWVkKSwgJ2hhc2gnKTtcbiAgfVxuKTtcbiJdLCJzb3VyY2VSb290IjoiIn0= |
import { setCustomTagFor } from '@glimmer/manager'; | ||
import { createConstRef, valueForRef } from '@glimmer/reference'; | ||
import { createComputeRef, createConstRef, valueForRef } from '@glimmer/reference'; | ||
import { dict, HAS_NATIVE_PROXY } from '@glimmer/util'; | ||
import { track } from '@glimmer/validator'; | ||
import { assert } from '@glimmer/global-context'; | ||
import { combine, tagFor, track } from '@glimmer/validator'; | ||
import { deprecate } from '@glimmer/global-context'; | ||
import { internalHelper } from './internal-helper'; | ||
@@ -10,3 +10,3 @@ | ||
return track(function () { | ||
return hash[key]; | ||
return valueForRef(hash[key]); | ||
}); | ||
@@ -18,4 +18,6 @@ } | ||
var HashProxy = /*#__PURE__*/function () { | ||
function HashProxy(named) { | ||
function HashProxy(named, target) { | ||
this.named = named; | ||
this.target = target; | ||
this.argsCaches = dict(); | ||
} | ||
@@ -25,17 +27,34 @@ | ||
_proto.get = function get(target, prop, receiver) { | ||
var ref = this.named[prop]; | ||
_proto.syncKey = function syncKey(key) { | ||
var _this = this; | ||
if (ref !== undefined) { | ||
return valueForRef(ref); | ||
} else { | ||
return Reflect.get(target, prop, receiver); | ||
var argsCaches = this.argsCaches, | ||
named = this.named; | ||
if (!(key in named)) return; | ||
var cache = argsCaches[key]; | ||
if (cache === undefined) { | ||
var ref = this.named[key]; | ||
argsCaches[key] = cache = createComputeRef(function () { | ||
_this.target[key] = valueForRef(ref); | ||
}); | ||
} | ||
valueForRef(cache); | ||
}; | ||
_proto.set = function set(target, prop, receiver) { | ||
assert(!(prop in this.named), "You attempted to set the \"" + prop + "\" value on an object generated using the (hash) helper, but this is not supported because it was defined on the original hash and is a reference to the original value. You can set values which were _not_ defined on the hash, but you cannot set values defined on the original hash (e.g. {{hash myValue=123}})"); | ||
return Reflect.set(target, prop, receiver); | ||
_proto.get = function get(target, prop) { | ||
this.syncKey(prop); | ||
return target[prop]; | ||
}; | ||
_proto.set = function set(target, prop, value) { | ||
deprecate("You set the '" + prop + "' property on a {{hash}} object. Setting properties on objects generated by {{hash}} is deprecated. Please update to use an object created with a tracked property or getter, or with a custom helper.", false, { | ||
id: 'setting-on-hash' | ||
}); | ||
this.syncKey(prop); | ||
target[prop] = value; | ||
return true; | ||
}; | ||
_proto.has = function has(target, prop) { | ||
@@ -46,3 +65,7 @@ return prop in this.named || prop in target; | ||
_proto.ownKeys = function ownKeys(target) { | ||
return Reflect.ownKeys(this.named).concat(Reflect.ownKeys(target)); | ||
for (var key in this.named) { | ||
this.syncKey(key); | ||
} | ||
return Object.getOwnPropertyNames(target); | ||
}; | ||
@@ -54,7 +77,8 @@ | ||
enumerable: true, | ||
configurable: true | ||
configurable: true, | ||
writable: true | ||
}; | ||
} | ||
return Reflect.getOwnPropertyDescriptor(target, prop); | ||
return Object.getOwnPropertyDescriptor(target, prop); | ||
}; | ||
@@ -67,5 +91,8 @@ | ||
hashProxyFor = function hashProxyFor(named) { | ||
var proxy = new Proxy(dict(), new HashProxy(named)); | ||
var target = dict(); | ||
var proxy = new Proxy(target, new HashProxy(named, target)); | ||
setCustomTagFor(proxy, function (_obj, key) { | ||
return tagForKey(named, key); | ||
var argTag = tagForKey(named, key); | ||
var proxyTag = tagFor(proxy, key); | ||
return combine([argTag, proxyTag]); | ||
}); | ||
@@ -76,3 +103,8 @@ return proxy; | ||
hashProxyFor = function hashProxyFor(named) { | ||
var proxy = dict(); | ||
var proxy = dict(); // Create a HashProxy handler to store the local state in case anyone | ||
// overrides a named value. It handles all of the details in terms of | ||
// syncing state up and returning the correct value based on autotracking. | ||
var localState = dict(); | ||
var proxyHandler = new HashProxy(named, localState); | ||
Object.keys(named).forEach(function (name) { | ||
@@ -83,3 +115,6 @@ Object.defineProperty(proxy, name, { | ||
get: function get() { | ||
return valueForRef(named[name]); | ||
return proxyHandler.get(localState, name); | ||
}, | ||
set: function set(value) { | ||
return proxyHandler.set(localState, name, value); | ||
} | ||
@@ -89,3 +124,5 @@ }); | ||
setCustomTagFor(proxy, function (_obj, key) { | ||
return tagForKey(named, key); | ||
var argTag = tagForKey(named, key); | ||
var proxyTag = tagFor(proxy, key); | ||
return combine([argTag, proxyTag]); | ||
}); | ||
@@ -137,2 +174,2 @@ return proxy; | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3J1bnRpbWUvbGliL2hlbHBlcnMvaGFzaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxTQUFBLGVBQUEsUUFBQSxrQkFBQTtBQUNBLFNBQUEsY0FBQSxFQUFBLFdBQUEsUUFBQSxvQkFBQTtBQUNBLFNBQUEsSUFBQSxFQUFBLGdCQUFBLFFBQUEsZUFBQTtBQUNBLFNBQUEsS0FBQSxRQUFBLG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5cbiAgIElmIHlvdSBuZWVkIHRvIHVzZSBzdWNoIGEgbWV0aG9kLCB5b3UgY2FuIHVzZSB0aGUgYGNhbGxgIG9yIGBhcHBseWBcbiAgIGFwcHJvYWNoOlxuXG4gICBgYGBqc1xuICAgZnVuY3Rpb24gdG9TdHJpbmcob2JqKSB7XG4gICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmFwcGx5KG9iaik7XG4gICB9XG4gICBgYGBcblxuICAgQG1ldGhvZCBoYXNoXG4gICBAcGFyYW0ge09iamVjdH0gb3B0aW9uc1xuICAgQHJldHVybiB7T2JqZWN0fSBIYXNoXG4gICBAcHVibGljXG4gKi9cbmV4cG9ydCBkZWZhdWx0IGludGVybmFsSGVscGVyKFxuICAoeyBuYW1lZCB9OiBDYXB0dXJlZEFyZ3VtZW50cyk6IFJlZmVyZW5jZTxEaWN0PHVua25vd24+PiA9PiB7XG4gICAgcmV0dXJuIGNyZWF0ZUNvbnN0UmVmKGhhc2hQcm94eUZvcihuYW1lZCksICdoYXNoJyk7XG4gIH1cbik7XG4iXSwic291cmNlUm9vdCI6IiJ9 |
{ | ||
"name": "@glimmer/runtime", | ||
"version": "0.79.1", | ||
"version": "0.79.2", | ||
"description": "Minimal runtime needed to render Glimmer templates", | ||
@@ -9,19 +9,19 @@ "repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer/runtime", | ||
"@glimmer/env": "0.1.7", | ||
"@glimmer/global-context": "0.79.1", | ||
"@glimmer/global-context": "0.79.2", | ||
"@glimmer/low-level": "0.78.2", | ||
"@glimmer/util": "0.79.1", | ||
"@glimmer/reference": "0.79.1", | ||
"@glimmer/validator": "0.79.1", | ||
"@glimmer/wire-format": "0.79.1", | ||
"@glimmer/interfaces": "0.79.1", | ||
"@glimmer/destroyable": "0.79.1", | ||
"@glimmer/owner": "0.79.1", | ||
"@glimmer/program": "0.79.1", | ||
"@glimmer/vm": "0.79.1", | ||
"@glimmer/util": "0.79.2", | ||
"@glimmer/reference": "0.79.2", | ||
"@glimmer/validator": "0.79.2", | ||
"@glimmer/wire-format": "0.79.2", | ||
"@glimmer/interfaces": "0.79.2", | ||
"@glimmer/destroyable": "0.79.2", | ||
"@glimmer/owner": "0.79.2", | ||
"@glimmer/program": "0.79.2", | ||
"@glimmer/vm": "0.79.2", | ||
"@simple-dom/interface": "^1.4.0" | ||
}, | ||
"devDependencies": { | ||
"@glimmer/local-debug-flags": "0.79.1", | ||
"@glimmer/opcode-compiler": "0.79.1", | ||
"@glimmer/debug": "0.79.1", | ||
"@glimmer/local-debug-flags": "0.79.2", | ||
"@glimmer/opcode-compiler": "0.79.2", | ||
"@glimmer/debug": "0.79.2", | ||
"@types/qunit": "^2.9.0" | ||
@@ -28,0 +28,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4394517
38502
15
+ Added@glimmer/destroyable@0.79.2(transitive)
+ Added@glimmer/encoder@0.79.2(transitive)
+ Added@glimmer/global-context@0.79.2(transitive)
+ Added@glimmer/interfaces@0.79.2(transitive)
+ Added@glimmer/manager@0.79.2(transitive)
+ Added@glimmer/opcode-compiler@0.79.2(transitive)
+ Added@glimmer/owner@0.79.2(transitive)
+ Added@glimmer/program@0.79.2(transitive)
+ Added@glimmer/reference@0.79.2(transitive)
+ Added@glimmer/util@0.79.2(transitive)
+ Added@glimmer/validator@0.79.2(transitive)
+ Added@glimmer/vm@0.79.2(transitive)
+ Added@glimmer/wire-format@0.79.2(transitive)
- Removed@glimmer/destroyable@0.79.1(transitive)
- Removed@glimmer/encoder@0.79.1(transitive)
- Removed@glimmer/global-context@0.79.1(transitive)
- Removed@glimmer/interfaces@0.79.1(transitive)
- Removed@glimmer/manager@0.79.1(transitive)
- Removed@glimmer/opcode-compiler@0.79.1(transitive)
- Removed@glimmer/owner@0.79.1(transitive)
- Removed@glimmer/program@0.79.1(transitive)
- Removed@glimmer/reference@0.79.1(transitive)
- Removed@glimmer/util@0.79.1(transitive)
- Removed@glimmer/validator@0.79.1(transitive)
- Removed@glimmer/vm@0.79.1(transitive)
- Removed@glimmer/wire-format@0.79.1(transitive)
Updated@glimmer/destroyable@0.79.2
Updated@glimmer/interfaces@0.79.2
Updated@glimmer/owner@0.79.2
Updated@glimmer/program@0.79.2
Updated@glimmer/reference@0.79.2
Updated@glimmer/util@0.79.2
Updated@glimmer/validator@0.79.2
Updated@glimmer/vm@0.79.2
Updated@glimmer/wire-format@0.79.2