Merge pull request #1691 from sveltejs/gh-1520-alt

Alternative approach to #1520
pull/1692/merge
Rich Harris 6 years ago committed by GitHub
commit 6327647949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -132,7 +132,7 @@ export default function dom(
? `@proto`
: deindent`
{
${['destroy', 'get', 'fire', 'on', 'set', '_set', '_mount', '_differs']
${['destroy', 'get', 'fire', 'on', 'set', '_set', '_stage', '_mount', '_differs']
.map(n => `${n}: @${n}`)
.join(',\n')}
}`;

@ -73,6 +73,7 @@ export function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -108,6 +109,9 @@ export function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -124,6 +128,10 @@ export function _set(newState) {
}
}
export function _stage(newState) {
assign(this._staged, newState);
}
export function setDev(newState) {
if (typeof newState !== 'object') {
throw new Error(
@ -159,6 +167,7 @@ export var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};
@ -171,6 +180,7 @@ export var protoDev = {
set: setDev,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -60,22 +60,27 @@ assign(Store.prototype, {
current: this._state
});
const dependents = this._dependents.slice(); // guard against mutations
for (let i = 0; i < dependents.length; i += 1) {
const dependent = dependents[i];
const componentState = {};
let dirty = false;
for (let j = 0; j < dependent.props.length; j += 1) {
const prop = dependent.props[j];
if (prop in changed) {
componentState['$' + prop] = this._state[prop];
dirty = true;
this._dependents
.filter(dependent => {
const componentState = {};
let dirty = false;
for (let j = 0; j < dependent.props.length; j += 1) {
const prop = dependent.props[j];
if (prop in changed) {
componentState['$' + prop] = this._state[prop];
dirty = true;
}
}
}
if (dirty) dependent.component.set(componentState);
}
if (dirty) {
dependent.component._stage(componentState);
return true;
}
})
.forEach(dependent => {
dependent.component.set({});
});
this.fire('update', {
changed,

@ -43,6 +43,7 @@ define("test", function() { "use strict";
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -67,6 +68,7 @@ define("test", function() { "use strict";
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -140,6 +142,9 @@ define("test", function() { "use strict";
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -156,6 +161,10 @@ define("test", function() { "use strict";
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -43,6 +43,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -67,6 +68,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -140,6 +142,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -156,6 +161,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -57,6 +57,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -88,6 +89,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -161,6 +163,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -177,6 +182,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -50,6 +50,7 @@ assign(Main.prototype, {
on: on,
set: setDev,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -91,6 +92,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -166,6 +168,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -182,6 +187,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -49,6 +49,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -61,6 +62,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -142,6 +144,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -158,6 +163,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -1 +1 @@
{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["<Widget/>\n\n<script>\n\timport Widget from './Widget.html';\n\n\texport default {\n\t\tcomponents: {\n\t\t\tWidget\n\t\t}\n\t};\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["<Widget/>\n\n<script>\n\timport Widget from './Widget.html';\n\n\texport default {\n\t\tcomponents: {\n\t\t\tWidget\n\t\t}\n\t};\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

@ -43,6 +43,7 @@ assign(Widget.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -67,6 +68,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -140,6 +142,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -156,6 +161,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -1 +1 @@
{"version":3,"file":"Widget.js","sources":["../src/Widget.html"],"sourcesContent":["<p>widget</p>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
{"version":3,"file":"Widget.js","sources":["../src/Widget.html"],"sourcesContent":["<p>widget</p>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

@ -49,6 +49,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -61,6 +62,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -142,6 +144,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -158,6 +163,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -43,6 +43,7 @@ assign(Widget.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -67,6 +68,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -140,6 +142,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -156,6 +161,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -49,6 +49,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -61,6 +62,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -142,6 +144,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -158,6 +163,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -43,6 +43,7 @@ assign(Widget.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -67,6 +68,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -140,6 +142,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -156,6 +161,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -58,6 +58,7 @@ var Main = (function(answer) { "use strict";
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -92,6 +93,7 @@ var Main = (function(answer) { "use strict";
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -165,6 +167,9 @@ var Main = (function(answer) { "use strict";
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -181,6 +186,10 @@ var Main = (function(answer) { "use strict";
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -43,6 +43,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -67,6 +68,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -140,6 +142,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -156,6 +161,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}
@ -180,4 +189,4 @@ function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
export default Main;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vc3JjL01haW4uaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8cD5IZWxsbyB3b3JsZCE8L3A+XG5cbjxzY3JpcHQ+XG5cdGV4cG9ydCBkZWZhdWx0IHtcblx0XHRvbnJlbmRlciAoKSB7XG5cdFx0XHRjb25zb2xlLmxvZyggJ2hlcmUnICk7XG5cdFx0fVxuXHR9O1xuPC9zY3JpcHQ+Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vc3JjL01haW4uaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8cD5IZWxsbyB3b3JsZCE8L3A+XG5cbjxzY3JpcHQ+XG5cdGV4cG9ydCBkZWZhdWx0IHtcblx0XHRvbnJlbmRlciAoKSB7XG5cdFx0XHRjb25zb2xlLmxvZyggJ2hlcmUnICk7XG5cdFx0fVxuXHR9O1xuPC9zY3JpcHQ+Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=

@ -43,6 +43,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -67,6 +68,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -140,6 +142,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -156,6 +161,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -1 +1 @@
{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["<p>Hello world!</p>\n\n<script>\n\texport default {\n\t\tonrender () {\n\t\t\tconsole.log( 'here' );\n\t\t}\n\t};\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["<p>Hello world!</p>\n\n<script>\n\texport default {\n\t\tonrender () {\n\t\t\tconsole.log( 'here' );\n\t\t}\n\t};\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

@ -53,6 +53,7 @@ assign(Main.prototype, {
on: on,
set: set,
_set: _set,
_stage: _stage,
_mount: _mount,
_differs: _differs
});
@ -87,6 +88,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -164,6 +166,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -180,6 +185,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null);
}

@ -70,6 +70,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -105,6 +106,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -121,6 +125,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -137,6 +145,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};
@ -144,7 +153,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function link(node) {
function onClick(event) {
event.preventDefault();
history.pushState(null, null, event.target.href);

@ -2,7 +2,7 @@
import { assign, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js";
function link(node) {
function onClick(event) {
event.preventDefault();
history.pushState(null, null, event.target.href);

@ -102,6 +102,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -137,6 +138,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -153,6 +157,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -169,6 +177,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -82,6 +82,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -117,6 +118,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -133,6 +137,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -149,6 +157,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -58,6 +58,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -93,6 +94,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -109,6 +113,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -125,6 +133,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -62,6 +62,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -97,6 +98,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -113,6 +117,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -129,6 +137,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -62,6 +62,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -97,6 +98,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -113,6 +117,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -129,6 +137,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -58,6 +58,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -93,6 +94,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -109,6 +113,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -125,6 +133,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -58,6 +58,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -93,6 +94,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -109,6 +113,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -125,6 +133,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -70,6 +70,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -105,6 +106,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -121,6 +125,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -137,6 +145,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -95,6 +95,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -130,6 +131,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -146,6 +150,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
if (typeof newState !== 'object') {
throw new Error(
@ -173,6 +181,7 @@ var protoDev = {
set: setDev,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -101,6 +101,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -136,6 +137,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -152,6 +156,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
if (typeof newState !== 'object') {
throw new Error(
@ -179,6 +187,7 @@ var protoDev = {
set: setDev,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -101,6 +101,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -136,6 +137,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -152,6 +156,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
if (typeof newState !== 'object') {
throw new Error(
@ -179,6 +187,7 @@ var protoDev = {
set: setDev,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -92,6 +92,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -127,6 +128,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -143,6 +147,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -159,6 +167,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -63,6 +63,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -98,6 +99,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -114,6 +118,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -130,6 +138,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -95,6 +95,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -130,6 +131,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -146,6 +150,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
if (typeof newState !== 'object') {
throw new Error(
@ -173,6 +181,7 @@ var protoDev = {
set: setDev,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -78,6 +78,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -113,6 +114,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -129,6 +133,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -145,6 +153,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -78,6 +78,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -113,6 +114,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -129,6 +133,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -145,6 +153,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -94,6 +94,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -129,6 +130,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -145,6 +149,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -161,6 +169,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -397,6 +397,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -432,6 +433,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -448,6 +452,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -464,6 +472,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -177,6 +177,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -212,6 +213,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -228,6 +232,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -244,6 +252,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -70,6 +70,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -105,6 +106,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -121,6 +125,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -137,6 +145,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -70,6 +70,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -105,6 +106,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -121,6 +125,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -137,6 +145,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -74,6 +74,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -109,6 +110,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -125,6 +129,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -141,6 +149,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -82,6 +82,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -117,6 +118,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -133,6 +137,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -149,6 +157,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -86,6 +86,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -121,6 +122,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -137,6 +141,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -153,6 +161,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -82,6 +82,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -117,6 +118,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -133,6 +137,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -149,6 +157,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -76,6 +76,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -111,6 +112,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -127,6 +131,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -143,6 +151,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -86,6 +86,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -121,6 +122,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -137,6 +141,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -153,6 +161,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -72,6 +72,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -107,6 +108,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -123,6 +127,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -139,6 +147,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -78,6 +78,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -113,6 +114,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -129,6 +133,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -145,6 +153,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -58,6 +58,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -93,6 +94,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -109,6 +113,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -125,6 +133,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -78,6 +78,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -113,6 +114,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -129,6 +133,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -145,6 +153,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -58,6 +58,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -93,6 +94,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -109,6 +113,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -125,6 +133,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -82,6 +82,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -117,6 +118,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -133,6 +137,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -149,6 +157,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -82,6 +82,7 @@ function init(component, options) {
component._handlers = blankObject();
component._slots = blankObject();
component._bind = options._bind;
component._staged = {};
component.options = options;
component.root = options.root || component;
@ -117,6 +118,9 @@ function _set(newState) {
changed = {},
dirty = false;
newState = assign(this._staged, newState);
this._staged = {};
for (var key in newState) {
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
}
@ -133,6 +137,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -149,6 +157,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -0,0 +1,22 @@
import { Store } from '../../../../store.js';
const store = new Store({
selectedIndex: 0,
items: [{ title: 'One' }, { title: 'Two' }]
});
export default {
store,
html: `
<h1>One</h1>
`,
test(assert, component, target, window) {
store.set({ selectedIndex: 2, items: [{ title: 'One' }, { title: 'Two' }, { title: 'Three' }]});
assert.htmlEqual(target.innerHTML, `
<h1>Three</h1>
`);
}
};

@ -0,0 +1,9 @@
<Component index={$selectedIndex}/>
<script>
import Component from './Component.html';
export default {
components: { Component },
};
</script>
Loading…
Cancel
Save