alternative approach to #1520

pull/1691/head
Rich Harris 6 years ago
parent 33ed2f504e
commit c2f0ca3e2e

@ -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;
@ -103,30 +104,21 @@ export function set(newState) {
flush(this.root);
}
export function _set(newState, options) {
export function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -135,7 +127,10 @@ export function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
export function _stage(newState) {
assign(this._staged, newState);
}
export function setDev(newState) {
@ -173,6 +168,7 @@ export var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};
@ -185,6 +181,7 @@ export var protoDev = {
set: setDev,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

@ -60,27 +60,27 @@ assign(Store.prototype, {
current: this._state
});
const dependents = this._dependents.slice(); // guard against mutations
const options = { skipRender: true };
const empty = {};
const dirtyDependents = 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;
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) {
return dependent.component._set(componentState, options);
}
});
dirtyDependents.forEach(dependent => dependent.component.set(empty));
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;
@ -135,30 +137,21 @@ define("test", function() { "use strict";
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -167,7 +160,10 @@ define("test", function() { "use strict";
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -135,30 +137,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -167,7 +160,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -156,30 +158,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -188,7 +181,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -161,30 +163,21 @@ function setDev(newState) {
set.call(this, newState);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -193,7 +186,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -137,30 +139,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -169,7 +162,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -135,30 +137,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -167,7 +160,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -137,30 +139,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -169,7 +162,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -135,30 +137,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -167,7 +160,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -137,30 +139,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -169,7 +162,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -135,30 +137,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -167,7 +160,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.11.0 */
/* src/Main.html generated by Svelte vx.y.z */
var Main = (function(answer) { "use strict";
answer = (answer && answer.__esModule) ? answer["default"] : answer;
@ -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;
@ -160,30 +162,21 @@ var Main = (function(answer) { "use strict";
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -192,7 +185,10 @@ var Main = (function(answer) { "use strict";
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.12.0 */
/* src/Main.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;
@ -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;
@ -135,30 +137,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -167,7 +160,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {
@ -194,4 +190,4 @@ function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
export default Main;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vc3JjL01haW4uaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8cD5IZWxsbyB3b3JsZCE8L3A+XG5cbjxzY3JpcHQ+XG5cdGV4cG9ydCBkZWZhdWx0IHtcblx0XHRvbnJlbmRlciAoKSB7XG5cdFx0XHRjb25zb2xlLmxvZyggJ2hlcmUnICk7XG5cdFx0fVxuXHR9O1xuPC9zY3JpcHQ+Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vc3JjL01haW4uaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8cD5IZWxsbyB3b3JsZCE8L3A+XG5cbjxzY3JpcHQ+XG5cdGV4cG9ydCBkZWZhdWx0IHtcblx0XHRvbnJlbmRlciAoKSB7XG5cdFx0XHRjb25zb2xlLmxvZyggJ2hlcmUnICk7XG5cdFx0fVxuXHR9O1xuPC9zY3JpcHQ+Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9

@ -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;
@ -135,30 +137,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -167,7 +160,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -159,30 +161,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -191,7 +184,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function _mount(target, anchor) {

@ -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;
@ -100,30 +101,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -132,7 +124,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -151,6 +146,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};
@ -158,7 +154,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;
@ -132,30 +133,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -164,7 +156,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -183,6 +178,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;
@ -112,30 +113,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -144,7 +136,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -163,6 +158,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;
@ -88,30 +89,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -120,7 +112,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -139,6 +134,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;
@ -92,30 +93,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -124,7 +116,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -143,6 +138,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;
@ -92,30 +93,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -124,7 +116,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -143,6 +138,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;
@ -88,30 +89,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -120,7 +112,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -139,6 +134,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;
@ -88,30 +89,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -120,7 +112,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -139,6 +134,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -100,30 +101,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -132,7 +124,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -151,6 +146,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;
@ -125,30 +126,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -157,7 +149,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
@ -187,6 +182,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;
@ -131,30 +132,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -163,7 +155,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
@ -193,6 +188,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;
@ -131,30 +132,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -163,7 +155,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
@ -193,6 +188,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;
@ -122,30 +123,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -154,7 +146,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -173,6 +168,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;
@ -93,30 +94,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -125,7 +117,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -144,6 +139,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;
@ -125,30 +126,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -157,7 +149,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function setDev(newState) {
@ -187,6 +182,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -108,30 +109,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -140,7 +132,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -159,6 +154,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;
@ -108,30 +109,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -140,7 +132,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -159,6 +154,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;
@ -124,30 +125,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -156,7 +148,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -175,6 +170,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;
@ -427,30 +428,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -459,7 +451,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -478,6 +473,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;
@ -207,30 +208,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -239,7 +231,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -258,6 +253,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;
@ -100,30 +101,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -132,7 +124,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -151,6 +146,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;
@ -100,30 +101,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -132,7 +124,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -151,6 +146,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -104,30 +105,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -136,7 +128,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -155,6 +150,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;
@ -112,30 +113,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -144,7 +136,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -163,6 +158,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;
@ -116,30 +117,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -148,7 +140,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -167,6 +162,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;
@ -112,30 +113,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -144,7 +136,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -163,6 +158,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;
@ -106,30 +107,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -138,7 +130,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -157,6 +152,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;
@ -116,30 +117,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -148,7 +140,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -167,6 +162,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;
@ -102,30 +103,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -134,7 +126,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -153,6 +148,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,12 +114,16 @@ 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;
}
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -129,6 +134,10 @@ function _set(newState) {
}
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
while (fns && fns.length) fns.shift()();
}
@ -145,6 +154,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;
@ -88,30 +89,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -120,7 +112,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -139,6 +134,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;
@ -108,30 +109,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -140,7 +132,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -159,6 +154,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;
@ -88,30 +89,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -120,7 +112,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -139,6 +134,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;
@ -112,30 +113,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -144,7 +136,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -163,6 +158,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;
@ -112,30 +113,21 @@ function set(newState) {
flush(this.root);
}
function _set(newState, options) {
function _set(newState) {
var oldState = this._state,
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;
}
if (!dirty && !this._changed) return false;
if (!dirty) return;
this._state = assign(assign({}, oldState), newState);
if (options && options.skipRender) {
if (!this._oldState) this._oldState = oldState;
this._changed = assign(changed, this._changed);
return true;
}
if (this._changed) {
oldState = this._oldState;
changed = assign(changed, this._changed),
this._changed = this._oldState = null;
}
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -144,7 +136,10 @@ function _set(newState, options) {
this._fragment.p(changed, this._state);
this.fire("update", { changed: changed, current: this._state, previous: oldState });
}
return true;
}
function _stage(newState) {
assign(this._staged, newState);
}
function callAll(fns) {
@ -163,6 +158,7 @@ var proto = {
set,
_recompute: noop,
_set,
_stage,
_mount,
_differs
};

Loading…
Cancel
Save