vasille 2.2.1 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +34 -28
  2. package/cdn/es2015.js +148 -854
  3. package/cdn/es5.js +820 -1091
  4. package/flow-typed/vasille.js +51 -96
  5. package/lib/binding/attribute.js +1 -1
  6. package/lib/binding/binding.js +5 -5
  7. package/lib/binding/class.js +2 -2
  8. package/lib/binding/style.js +1 -1
  9. package/lib/core/core.js +15 -15
  10. package/lib/core/destroyable.js +2 -2
  11. package/lib/core/ivalue.js +4 -4
  12. package/lib/index.js +2 -3
  13. package/lib/models/array-model.js +6 -9
  14. package/lib/models/object-model.js +3 -17
  15. package/lib/node/app.js +3 -3
  16. package/lib/node/node.js +45 -42
  17. package/lib/node/watch.js +1 -1
  18. package/lib/value/expression.js +13 -13
  19. package/lib/value/mirror.js +15 -15
  20. package/lib/value/pointer.js +5 -5
  21. package/lib/value/reference.js +18 -18
  22. package/lib/views/base-view.js +1 -1
  23. package/lib/views/object-view.js +1 -1
  24. package/lib/views/repeat-node.js +4 -4
  25. package/lib-node/binding/attribute.js +35 -0
  26. package/lib-node/binding/binding.js +33 -0
  27. package/lib-node/binding/class.js +48 -0
  28. package/lib-node/binding/style.js +27 -0
  29. package/lib-node/core/core.js +243 -0
  30. package/lib-node/core/destroyable.js +49 -0
  31. package/lib-node/core/errors.js +23 -0
  32. package/lib-node/core/ivalue.js +63 -0
  33. package/lib-node/functional/options.js +2 -0
  34. package/lib-node/index.js +49 -0
  35. package/lib-node/models/array-model.js +218 -0
  36. package/lib-node/models/listener.js +134 -0
  37. package/lib-node/models/map-model.js +70 -0
  38. package/lib-node/models/model.js +2 -0
  39. package/lib-node/models/object-model.js +82 -0
  40. package/lib-node/models/set-model.js +66 -0
  41. package/lib-node/node/app.js +54 -0
  42. package/lib-node/node/node.js +885 -0
  43. package/lib-node/node/watch.js +23 -0
  44. package/lib-node/spec/html.js +2 -0
  45. package/lib-node/spec/react.js +2 -0
  46. package/lib-node/spec/svg.js +2 -0
  47. package/lib-node/value/expression.js +90 -0
  48. package/lib-node/value/mirror.js +60 -0
  49. package/lib-node/value/pointer.js +30 -0
  50. package/lib-node/value/reference.js +55 -0
  51. package/lib-node/views/array-view.js +21 -0
  52. package/lib-node/views/base-view.js +43 -0
  53. package/lib-node/views/map-view.js +18 -0
  54. package/lib-node/views/object-view.js +20 -0
  55. package/lib-node/views/repeat-node.js +71 -0
  56. package/lib-node/views/set-view.js +19 -0
  57. package/package.json +21 -17
  58. package/types/binding/binding.d.ts +1 -1
  59. package/types/core/core.d.ts +6 -6
  60. package/types/core/destroyable.d.ts +2 -2
  61. package/types/core/ivalue.d.ts +4 -4
  62. package/types/functional/options.d.ts +2 -2
  63. package/types/index.d.ts +3 -4
  64. package/types/models/array-model.d.ts +1 -1
  65. package/types/models/object-model.d.ts +1 -1
  66. package/types/node/node.d.ts +16 -15
  67. package/types/node/watch.d.ts +2 -2
  68. package/types/value/expression.d.ts +5 -5
  69. package/types/value/mirror.d.ts +6 -6
  70. package/types/value/pointer.d.ts +1 -1
  71. package/types/value/reference.d.ts +7 -7
  72. package/types/views/repeat-node.d.ts +3 -3
  73. package/lib/core/executor.js +0 -154
  74. package/lib/core/signal.js +0 -50
  75. package/lib/core/slot.js +0 -47
  76. package/lib/functional/components.js +0 -17
  77. package/lib/functional/merge.js +0 -41
  78. package/lib/functional/models.js +0 -26
  79. package/lib/functional/reactivity.js +0 -33
  80. package/lib/functional/stack.js +0 -127
  81. package/lib/node/interceptor.js +0 -83
  82. package/lib/v/index.js +0 -23
  83. package/lib/views/repeater.js +0 -63
  84. package/types/functional/components.d.ts +0 -4
  85. package/types/functional/merge.d.ts +0 -1
  86. package/types/functional/models.d.ts +0 -10
  87. package/types/functional/reactivity.d.ts +0 -11
  88. package/types/functional/stack.d.ts +0 -24
  89. package/types/v/index.d.ts +0 -32
package/cdn/es5.js CHANGED
@@ -197,23 +197,15 @@ window.Reflect = window.Reflect || {
197
197
  window.Proxy = window.Proxy || function (obj) {
198
198
  return obj;
199
199
  };
200
- // ./lib-es5/v/index.js
201
-
202
- var v = __assign(__assign({ ref: function (value) {
203
- return current.ref(value);
204
- }, expr: expr, of: valueOf, sv: setValue, alwaysFalse: new Reference(false), app: app, component: component, fragment: fragment, extension: extension, text: text, tag: tag, create: create }, vx), { merge: merge, destructor: function () {
205
- return current.destroy.bind(current);
206
- }, runOnDestroy: function (callback) {
207
- current.runOnDestroy(callback);
208
- } });
209
-
210
- window.v = v;
211
-
212
200
  // ./lib-es5/models/model.js
213
-
201
+ "use strict";
202
+ Object.defineProperty(exports, "__esModule", { value: true });
214
203
 
215
204
 
216
205
  // ./lib-es5/models/listener.js
206
+ "use strict";
207
+ Object.defineProperty(exports, "__esModule", { value: true });
208
+ exports.Listener = void 0;
217
209
  /**
218
210
  * Represent a listener for a model
219
211
  * @class Listener
@@ -347,11 +339,29 @@ var Listener = /** @class */ (function () {
347
339
  };
348
340
  return Listener;
349
341
  }());
342
+ exports.Listener = Listener;
350
343
 
351
344
 
352
- window.Listener = Listener;
353
-
354
345
  // ./lib-es5/models/object-model.js
346
+ "use strict";
347
+ var __extends = (this && this.__extends) || (function () {
348
+ var extendStatics = function (d, b) {
349
+ extendStatics = Object.setPrototypeOf ||
350
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
351
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
352
+ return extendStatics(d, b);
353
+ };
354
+ return function (d, b) {
355
+ if (typeof b !== "function" && b !== null)
356
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
357
+ extendStatics(d, b);
358
+ function __() { this.constructor = d; }
359
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
360
+ };
361
+ })();
362
+ Object.defineProperty(exports, "__esModule", { value: true });
363
+ exports.ObjectModel = void 0;
364
+ var listener_1 = require("./listener");
355
365
  /**
356
366
  * Object based model
357
367
  * @extends Object
@@ -367,7 +377,7 @@ var ObjectModel = /** @class */ (function (_super) {
367
377
  var _this = this; _super.call(this);
368
378
  _this.container = Object.create(null);
369
379
  Object.defineProperty(_this, 'listener', {
370
- value: new Listener,
380
+ value: new listener_1.Listener,
371
381
  writable: false,
372
382
  configurable: false
373
383
  });
@@ -412,6 +422,13 @@ var ObjectModel = /** @class */ (function (_super) {
412
422
  this.listener.emitAdded(key, this.container[key]);
413
423
  return this;
414
424
  };
425
+ Object.defineProperty(ObjectModel.prototype, "values", {
426
+ get: function () {
427
+ return this.container;
428
+ },
429
+ enumerable: false,
430
+ configurable: true
431
+ });
415
432
  /**
416
433
  * Deletes an object property
417
434
  * @param key {string} property name
@@ -422,23 +439,6 @@ var ObjectModel = /** @class */ (function (_super) {
422
439
  delete this.container[key];
423
440
  }
424
441
  };
425
- ObjectModel.prototype.proxy = function () {
426
- // eslint-disable-next-line @typescript-eslint/no-this-alias
427
- var ts = this;
428
- return new Proxy(this.container, {
429
- get: function (target, p) {
430
- return ts.get(p);
431
- },
432
- set: function (target, p, value) {
433
- ts.set(p, value);
434
- return true;
435
- },
436
- deleteProperty: function (target, p) {
437
- ts.delete(p);
438
- return true;
439
- }
440
- });
441
- };
442
442
  ObjectModel.prototype.enableReactivity = function () {
443
443
  this.listener.enableReactivity();
444
444
  };
@@ -447,11 +447,29 @@ var ObjectModel = /** @class */ (function (_super) {
447
447
  };
448
448
  return ObjectModel;
449
449
  }(Object));
450
+ exports.ObjectModel = ObjectModel;
450
451
 
451
452
 
452
- window.ObjectModel = ObjectModel;
453
-
454
453
  // ./lib-es5/models/set-model.js
454
+ "use strict";
455
+ var __extends = (this && this.__extends) || (function () {
456
+ var extendStatics = function (d, b) {
457
+ extendStatics = Object.setPrototypeOf ||
458
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
459
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
460
+ return extendStatics(d, b);
461
+ };
462
+ return function (d, b) {
463
+ if (typeof b !== "function" && b !== null)
464
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
465
+ extendStatics(d, b);
466
+ function __() { this.constructor = d; }
467
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
468
+ };
469
+ })();
470
+ Object.defineProperty(exports, "__esModule", { value: true });
471
+ exports.SetModel = void 0;
472
+ var listener_1 = require("./listener");
455
473
  /**
456
474
  * A Set based model
457
475
  * @class SetModel
@@ -468,7 +486,7 @@ var SetModel = /** @class */ (function (_super) {
468
486
  if (set === void 0) { set = []; }
469
487
  var _this = this; _super.call(this);
470
488
  Object.defineProperty(_this, 'listener', {
471
- value: new Listener,
489
+ value: new listener_1.Listener,
472
490
  writable: false,
473
491
  configurable: false
474
492
  });
@@ -518,11 +536,29 @@ var SetModel = /** @class */ (function (_super) {
518
536
  };
519
537
  return SetModel;
520
538
  }(Set));
539
+ exports.SetModel = SetModel;
521
540
 
522
541
 
523
- window.SetModel = SetModel;
524
-
525
542
  // ./lib-es5/models/map-model.js
543
+ "use strict";
544
+ var __extends = (this && this.__extends) || (function () {
545
+ var extendStatics = function (d, b) {
546
+ extendStatics = Object.setPrototypeOf ||
547
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
548
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
549
+ return extendStatics(d, b);
550
+ };
551
+ return function (d, b) {
552
+ if (typeof b !== "function" && b !== null)
553
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
554
+ extendStatics(d, b);
555
+ function __() { this.constructor = d; }
556
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
557
+ };
558
+ })();
559
+ Object.defineProperty(exports, "__esModule", { value: true });
560
+ exports.MapModel = void 0;
561
+ var listener_1 = require("./listener");
526
562
  /**
527
563
  * A Map based memory
528
564
  * @class MapModel
@@ -539,7 +575,7 @@ var MapModel = /** @class */ (function (_super) {
539
575
  if (map === void 0) { map = []; }
540
576
  var _this = this; _super.call(this);
541
577
  Object.defineProperty(_this, 'listener', {
542
- value: new Listener,
578
+ value: new listener_1.Listener,
543
579
  writable: false,
544
580
  configurable: false
545
581
  });
@@ -594,11 +630,38 @@ var MapModel = /** @class */ (function (_super) {
594
630
  };
595
631
  return MapModel;
596
632
  }(Map));
633
+ exports.MapModel = MapModel;
597
634
 
598
635
 
599
- window.MapModel = MapModel;
600
-
601
636
  // ./lib-es5/models/array-model.js
637
+ "use strict";
638
+ var __extends = (this && this.__extends) || (function () {
639
+ var extendStatics = function (d, b) {
640
+ extendStatics = Object.setPrototypeOf ||
641
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
642
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
643
+ return extendStatics(d, b);
644
+ };
645
+ return function (d, b) {
646
+ if (typeof b !== "function" && b !== null)
647
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
648
+ extendStatics(d, b);
649
+ function __() { this.constructor = d; }
650
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
651
+ };
652
+ })();
653
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
654
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
655
+ if (ar || !(i in from)) {
656
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
657
+ ar[i] = from[i];
658
+ }
659
+ }
660
+ return to.concat(ar || Array.prototype.slice.call(from));
661
+ };
662
+ Object.defineProperty(exports, "__esModule", { value: true });
663
+ exports.ArrayModel = void 0;
664
+ var listener_1 = require("./listener");
602
665
  /**
603
666
  * Model based on Array class
604
667
  * @extends Array
@@ -613,7 +676,7 @@ var ArrayModel = /** @class */ (function (_super) {
613
676
  if (data === void 0) { data = []; }
614
677
  var _this = this; _super.call(this);
615
678
  Object.defineProperty(_this, 'listener', {
616
- value: new Listener,
679
+ value: new listener_1.Listener,
617
680
  writable: false,
618
681
  configurable: false
619
682
  });
@@ -622,15 +685,6 @@ var ArrayModel = /** @class */ (function (_super) {
622
685
  }
623
686
  return _this;
624
687
  }
625
- // proxy
626
- ArrayModel.prototype.proxy = function () {
627
- return new Proxy(this, {
628
- set: function (target, p, value) {
629
- target.splice(parseInt(p), 1, value);
630
- return true;
631
- }
632
- });
633
- };
634
688
  Object.defineProperty(ArrayModel.prototype, "last", {
635
689
  /* Array members */
636
690
  /**
@@ -829,6 +883,12 @@ var ArrayModel = /** @class */ (function (_super) {
829
883
  this.removeAt(this.indexOf(v));
830
884
  return this;
831
885
  };
886
+ ArrayModel.prototype.replace = function (at, with_) {
887
+ this.listener.emitAdded(this[at], with_);
888
+ this.listener.emitRemoved(this[at], this[at]);
889
+ this[at] = with_;
890
+ return this;
891
+ };
832
892
  ArrayModel.prototype.enableReactivity = function () {
833
893
  this.listener.enableReactivity();
834
894
  };
@@ -837,610 +897,39 @@ var ArrayModel = /** @class */ (function (_super) {
837
897
  };
838
898
  return ArrayModel;
839
899
  }(Array));
900
+ exports.ArrayModel = ArrayModel;
840
901
 
841
902
 
842
- window.ArrayModel = ArrayModel;
843
-
844
- // ./lib-es5/functional/merge.js
845
- function merge(main) {
846
- var targets = [];
847
- for (var _i = 1; _i < arguments.length; _i++) {
848
- targets[_i - 1] = arguments[_i];
849
- }
850
- function refactorClass(obj) {
851
- if (Array.isArray(obj.class)) {
852
- var out_1 = {
853
- $: []
854
- };
855
- obj.class.forEach(function (item) {
856
- if (item instanceof IValue) {
857
- out_1.$.push(item);
858
- }
859
- else if (typeof item === 'string') {
860
- out_1[item] = true;
861
- }
862
- else if (typeof item === 'object') {
863
- Object.assign(out_1, item);
864
- }
865
- });
866
- obj.class = out_1;
867
- }
868
- }
869
- refactorClass(main);
870
- targets.forEach(function (target) {
871
- Reflect.ownKeys(target).forEach(function (prop) {
872
- var _a;
873
- if (!Reflect.has(main, prop)) {
874
- main[prop] = target[prop];
875
- }
876
- else if (typeof main[prop] === 'object' && typeof target[prop] === 'object') {
877
- if (prop === 'class') {
878
- refactorClass(target);
879
- }
880
- if (prop === '$' && Array.isArray(main[prop]) && Array.isArray(target[prop])) {
881
- (_a = main.$).push.apply(_a, target.$);
882
- }
883
- else {
884
- merge(main[prop], target[prop]);
885
- }
886
- }
887
- });
888
- });
889
- }
890
-
891
- window.merge = merge;
892
-
893
- // ./lib-es5/functional/stack.js
894
- function app(renderer) {
895
- return function (node, opts) {
896
- return new App(node, opts).runFunctional(renderer, opts);
897
- };
898
- }
899
- function component(renderer) {
900
- return function (opts, callback) {
901
- var component = new Component(opts);
902
- if (!(current instanceof Fragment))
903
- throw userError('missing parent node', 'out-of-context');
904
- var ret;
905
- if (callback)
906
- opts.slot = callback;
907
- current.create(component, function (node) {
908
- ret = node.runFunctional(renderer, opts);
909
- });
910
- return ret;
911
- };
912
- }
913
- function fragment(renderer) {
914
- return function (opts, callback) {
915
- var frag = new Fragment(opts);
916
- if (!(current instanceof Fragment))
917
- throw userError('missing parent node', 'out-of-context');
918
- if (callback)
919
- opts.slot = callback;
920
- current.create(frag);
921
- return frag.runFunctional(renderer, opts);
922
- };
923
- }
924
- function extension(renderer) {
925
- return function (opts, callback) {
926
- var ext = new Extension(opts);
927
- if (!(current instanceof Fragment))
928
- throw userError('missing parent node', 'out-of-context');
929
- if (callback)
930
- opts.slot = callback;
931
- current.create(ext);
932
- return ext.runFunctional(renderer, opts);
933
- };
934
- }
935
- function tag(name, opts, callback) {
936
- if (!(current instanceof Fragment))
937
- throw userError('missing parent node', 'out-of-context');
938
- return {
939
- node: current.tag(name, opts, function (node) {
940
- callback && node.runFunctional(callback);
941
- })
942
- };
943
- }
944
- function create(node, callback) {
945
- if (!(current instanceof Fragment))
946
- throw userError('missing current node', 'out-of-context');
947
- current.create(node, function (node) {
948
- var args = [];
949
- for (var _i = 1; _i < arguments.length; _i++) {
950
- args[_i - 1] = arguments[_i];
951
- }
952
- callback && node.runFunctional.apply(node, __spreadArray([callback], args, false));
953
- });
954
- return node;
955
- }
956
- var vx = {
957
- if: function (condition, callback) {
958
- if (current instanceof Fragment) {
959
- current.if(condition, function (node) { return node.runFunctional(callback); });
960
- }
961
- else {
962
- throw userError("wrong use of `v.if` function", "logic-error");
963
- }
964
- },
965
- else: function (callback) {
966
- if (current instanceof Fragment) {
967
- current.else(function (node) { return node.runFunctional(callback); });
968
- }
969
- else {
970
- throw userError("wrong use of `v.else` function", "logic-error");
971
- }
972
- },
973
- elif: function (condition, callback) {
974
- if (current instanceof Fragment) {
975
- current.elif(condition, function (node) { return node.runFunctional(callback); });
976
- }
977
- else {
978
- throw userError("wrong use of `v.elif` function", "logic-error");
979
- }
980
- },
981
- for: function (model, callback) {
982
- if (model instanceof ArrayModel) {
983
- // for arrays T & K are the same type
984
- create(new ArrayView({ model: model }), callback);
985
- }
986
- else if (model instanceof MapModel) {
987
- create(new MapView({ model: model }), callback);
988
- }
989
- else if (model instanceof SetModel) {
990
- // for sets T & K are the same type
991
- create(new SetView({ model: model }), callback);
992
- }
993
- else if (model instanceof ObjectModel) {
994
- // for objects K is always string
995
- create(new ObjectView({ model: model }), callback);
996
- }
997
- else {
998
- throw userError("wrong use of `v.for` function", 'wrong-model');
999
- }
1000
- },
1001
- watch: function (model, callback) {
1002
- var opts = { model: model };
1003
- create(new Watch(opts), callback);
1004
- },
1005
- nextTick: function (callback) {
1006
- var node = current;
1007
- window.setTimeout(function () {
1008
- node.runFunctional(callback);
1009
- }, 0);
1010
- }
1011
- };
1012
-
1013
- window.app = app;
1014
- window.component = component;
1015
- window.fragment = fragment;
1016
- window.extension = extension;
1017
- window.tag = tag;
1018
- window.create = create;
1019
- window.vx = vx;
1020
-
1021
- // ./lib-es5/functional/models.js
1022
- function arrayModel(arr) {
1023
- if (arr === void 0) { arr = []; }
1024
- if (!current)
1025
- throw userError('missing parent node', 'out-of-context');
1026
- return current.register(new ArrayModel(arr)).proxy();
1027
- }
1028
- function mapModel(map) {
1029
- if (map === void 0) { map = []; }
1030
- if (!current)
1031
- throw userError('missing parent node', 'out-of-context');
1032
- return current.register(new MapModel(map));
1033
- }
1034
- function setModel(arr) {
1035
- if (arr === void 0) { arr = []; }
1036
- if (!current)
1037
- throw userError('missing parent node', 'out-of-context');
1038
- return current.register(new SetModel(arr));
1039
- }
1040
- function objectModel(obj) {
1041
- if (obj === void 0) { obj = {}; }
1042
- if (!current)
1043
- throw userError('missing parent node', 'out-of-context');
1044
- return current.register(new ObjectModel(obj));
1045
- }
1046
-
1047
- window.arrayModel = arrayModel;
1048
- window.mapModel = mapModel;
1049
- window.setModel = setModel;
1050
- window.objectModel = objectModel;
1051
-
1052
- // ./lib-es5/functional/options.js
1053
-
1054
-
1055
-
1056
- // ./lib-es5/functional/reactivity.js
1057
- function ref(value) {
1058
- var ref = current.ref(value);
1059
- return [ref, function (value) { return ref.$ = value; }];
1060
- }
1061
- function mirror(value) {
1062
- return current.mirror(value);
1063
- }
1064
- function forward(value) {
1065
- return current.forward(value);
1066
- }
1067
- function point(value) {
1068
- return current.point(value);
1069
- }
1070
- function expr(func) {
1071
- var values = [];
1072
- for (var _i = 1; _i < arguments.length; _i++) {
1073
- values[_i - 1] = arguments[_i];
1074
- }
1075
- return current.expr.apply(current, __spreadArray([func], values, false));
1076
- }
1077
- function watch(func) {
1078
- var values = [];
1079
- for (var _i = 1; _i < arguments.length; _i++) {
1080
- values[_i - 1] = arguments[_i];
1081
- }
1082
- current.watch.apply(current, __spreadArray([func], values, false));
1083
- }
1084
- function valueOf(value) {
1085
- return value.$;
1086
- }
1087
- function setValue(ref, value) {
1088
- if (ref instanceof Pointer && value instanceof IValue) {
1089
- ref.point(value);
1090
- }
1091
- else {
1092
- ref.$ = value instanceof IValue ? value.$ : value;
1093
- }
1094
- }
1095
-
1096
- window.ref = ref;
1097
- window.mirror = mirror;
1098
- window.forward = forward;
1099
- window.point = point;
1100
- window.expr = expr;
1101
- window.watch = watch;
1102
- window.valueOf = valueOf;
1103
- window.setValue = setValue;
1104
-
1105
- // ./lib-es5/functional/components.js
1106
- function text(text) {
1107
- if (!(current instanceof Fragment))
1108
- throw userError('missing parent node', 'out-of-context');
1109
- ;
1110
- current.text(text);
1111
- }
1112
- function debug(text) {
1113
- if (!(current instanceof Fragment))
1114
- throw userError('missing parent node', 'out-of-context');
1115
- current.debug(text);
1116
- }
1117
- function predefine(slot, predefined) {
1118
- return slot || predefined;
1119
- }
1120
-
1121
- window.text = text;
1122
- window.debug = debug;
1123
- window.predefine = predefine;
1124
-
1125
- // ./lib-es5/core/signal.js
1126
- /**
1127
- * Signal is an event generator
1128
- * @class Signal
1129
- */
1130
- var Signal = /** @class */ (function () {
1131
- function Signal() {
1132
- /**
1133
- * Handler of event
1134
- * @type {Set}
1135
- * @private
1136
- */
1137
- this.handlers = new Set;
1138
- }
1139
- /**
1140
- * Emit event
1141
- * @param a1 {*} argument
1142
- * @param a2 {*} argument
1143
- * @param a3 {*} argument
1144
- * @param a4 {*} argument
1145
- * @param a5 {*} argument
1146
- * @param a6 {*} argument
1147
- * @param a7 {*} argument
1148
- * @param a8 {*} argument
1149
- * @param a9 {*} argument
1150
- */
1151
- Signal.prototype.emit = function (a1, a2, a3, a4, a5, a6, a7, a8, a9) {
1152
- this.handlers.forEach(function (handler) {
1153
- try {
1154
- handler(a1, a2, a3, a4, a5, a6, a7, a8, a9);
1155
- }
1156
- catch (e) {
1157
- console.error("Vasille.js: Handler throw exception: ", e);
1158
- }
1159
- });
1160
- };
1161
- /**
1162
- * Subscribe to event
1163
- * @param func {function} handler
1164
- */
1165
- Signal.prototype.subscribe = function (func) {
1166
- this.handlers.add(func);
1167
- };
1168
- /**
1169
- * Unsubscribe from event
1170
- * @param func {function} handler
1171
- */
1172
- Signal.prototype.unsubscribe = function (func) {
1173
- this.handlers.delete(func);
1174
- };
1175
- return Signal;
1176
- }());
1177
-
1178
-
1179
- window.Signal = Signal;
1180
-
1181
- // ./lib-es5/core/slot.js
1182
- /**
1183
- * Component slot
1184
- * @class Slot
1185
- */
1186
- var Slot = /** @class */ (function () {
1187
- function Slot() {
1188
- }
1189
- /**
1190
- * Sets the runner
1191
- * @param func {function} the function to run
1192
- */
1193
- Slot.prototype.insert = function (func) {
1194
- this.runner = func;
1195
- };
1196
- /**
1197
- * @param a0 {Fragment} node to paste content
1198
- * @param a1 {*} 1st argument
1199
- * @param a2 {*} 2nd argument
1200
- * @param a3 {*} 3rd argument
1201
- * @param a4 {*} 4th argument
1202
- * @param a5 {*} 5th argument
1203
- * @param a6 {*} 6th argument
1204
- * @param a7 {*} 7th argument
1205
- * @param a8 {*} 8th argument
1206
- * @param a9 {*} 9th argument
1207
- */
1208
- Slot.prototype.release = function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
1209
- if (this.runner) {
1210
- this.runner(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
1211
- }
1212
- };
1213
- /**
1214
- * Predefine a handler for a slot
1215
- * @param func {function(node : Fragment)} Function to run if no handler specified
1216
- * @param a0 {Fragment} node to paste content
1217
- * @param a1 {*} 1st argument
1218
- * @param a2 {*} 2nd argument
1219
- * @param a3 {*} 3rd argument
1220
- * @param a4 {*} 4th argument
1221
- * @param a5 {*} 5th argument
1222
- * @param a6 {*} 6th argument
1223
- * @param a7 {*} 7th argument
1224
- * @param a8 {*} 8th argument
1225
- * @param a9 {*} 9th argument
1226
- */
1227
- Slot.prototype.predefine = function (func, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
1228
- (this.runner || func)(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
1229
- };
1230
- return Slot;
1231
- }());
1232
-
1233
-
1234
- window.Slot = Slot;
1235
-
1236
903
  // ./lib-es5/core/errors.js
904
+ "use strict";
905
+ Object.defineProperty(exports, "__esModule", { value: true });
906
+ exports.wrongBinding = exports.userError = exports.internalError = exports.notOverwritten = void 0;
1237
907
  var reportIt = "Report it here: https://gitlab.com/vasille-js/vasille-js/-/issues";
1238
908
  function notOverwritten() {
1239
909
  console.error("Vasille-SFP: Internal error", "Must be overwritten", reportIt);
1240
910
  return "not-overwritten";
1241
911
  }
912
+ exports.notOverwritten = notOverwritten;
1242
913
  function internalError(msg) {
1243
914
  console.error("Vasille-SFP: Internal error", msg, reportIt);
1244
915
  return "internal-error";
1245
916
  }
917
+ exports.internalError = internalError;
1246
918
  function userError(msg, err) {
1247
919
  console.error("Vasille-SFP: User error", msg);
1248
920
  return err;
1249
921
  }
922
+ exports.userError = userError;
1250
923
  function wrongBinding(msg) {
1251
924
  return userError(msg, "wrong-binding");
1252
925
  }
926
+ exports.wrongBinding = wrongBinding;
1253
927
 
1254
- window.notOverwritten = notOverwritten;
1255
- window.internalError = internalError;
1256
- window.userError = userError;
1257
- window.wrongBinding = wrongBinding;
1258
-
1259
- // ./lib-es5/core/executor.js
1260
- /**
1261
- * Represents an executor unit interface
1262
- * @class Executor
1263
- */
1264
- var Executor = /** @class */ (function () {
1265
- function Executor() {
1266
- }
1267
- /**
1268
- * Adds a CSS class
1269
- * @param el {Element} element to manipulate
1270
- * @param cl {string} class to be added
1271
- */
1272
- Executor.prototype.addClass = function (el, cl) {
1273
- throw notOverwritten();
1274
- };
1275
- /**
1276
- * Removes a CSS class
1277
- * @param el {Element} element to manipulate
1278
- * @param cl {string} class to be removed
1279
- */
1280
- Executor.prototype.removeClass = function (el, cl) {
1281
- throw notOverwritten();
1282
- };
1283
- /**
1284
- * Sets a tag attribute
1285
- * @param el {Element} element to manipulate
1286
- * @param name {string} name of attribute
1287
- * @param value {string} value of attribute
1288
- */
1289
- Executor.prototype.setAttribute = function (el, name, value) {
1290
- throw notOverwritten();
1291
- };
1292
- /**
1293
- * Removes a tag attribute
1294
- * @param el {Element} element to manipulate
1295
- * @param name {string} name of attribute
1296
- */
1297
- Executor.prototype.removeAttribute = function (el, name) {
1298
- throw notOverwritten();
1299
- };
1300
- /**
1301
- * Sets a style attribute
1302
- * @param el {HTMLElement} element to manipulate
1303
- * @param prop {string} property name
1304
- * @param value {string} property value
1305
- */
1306
- Executor.prototype.setStyle = function (el, prop, value) {
1307
- throw notOverwritten();
1308
- };
1309
- /**
1310
- * Inserts a child before target
1311
- * @param target {Element} target element
1312
- * @param child {Node} element to insert before
1313
- */
1314
- Executor.prototype.insertBefore = function (target, child) {
1315
- throw notOverwritten();
1316
- };
1317
- /**
1318
- * Appends a child to element
1319
- * @param el {Element} element
1320
- * @param child {Node} child to be inserted
1321
- */
1322
- Executor.prototype.appendChild = function (el, child) {
1323
- throw notOverwritten();
1324
- };
1325
- /**
1326
- * Calls a call-back function
1327
- * @param cb {function} call-back function
1328
- */
1329
- Executor.prototype.callCallback = function (cb) {
1330
- throw notOverwritten();
1331
- };
1332
- return Executor;
1333
- }());
1334
-
1335
- /**
1336
- * Executor which execute any commands immediately
1337
- * @class InstantExecutor
1338
- * @extends Executor
1339
- */
1340
- var InstantExecutor = /** @class */ (function (_super) {
1341
- __extends(InstantExecutor, _super);
1342
- function InstantExecutor() {
1343
- return _super !== null && _super.apply(this, arguments) || this;
1344
- }
1345
- InstantExecutor.prototype.addClass = function (el, cl) {
1346
- el.classList.add(cl);
1347
- };
1348
- InstantExecutor.prototype.removeClass = function (el, cl) {
1349
- el.classList.remove(cl);
1350
- };
1351
- InstantExecutor.prototype.setAttribute = function (el, name, value) {
1352
- el.setAttribute(name, value);
1353
- };
1354
- InstantExecutor.prototype.removeAttribute = function (el, name) {
1355
- el.removeAttribute(name);
1356
- };
1357
- InstantExecutor.prototype.setStyle = function (el, prop, value) {
1358
- el.style.setProperty(prop, value);
1359
- };
1360
- InstantExecutor.prototype.insertBefore = function (target, child) {
1361
- var parent = target.parentNode;
1362
- if (!parent) {
1363
- throw internalError('element don\'t have a parent node');
1364
- }
1365
- parent.insertBefore(child, target);
1366
- };
1367
- InstantExecutor.prototype.appendChild = function (el, child) {
1368
- el.appendChild(child);
1369
- };
1370
- InstantExecutor.prototype.callCallback = function (cb) {
1371
- cb();
1372
- };
1373
- return InstantExecutor;
1374
- }(Executor));
1375
-
1376
- /**
1377
- * Executor which execute any commands over timeout
1378
- * @class TimeoutExecutor
1379
- * @extends InstantExecutor
1380
- */
1381
- var TimeoutExecutor = /** @class */ (function (_super) {
1382
- __extends(TimeoutExecutor, _super);
1383
- function TimeoutExecutor() {
1384
- return _super !== null && _super.apply(this, arguments) || this;
1385
- }
1386
- TimeoutExecutor.prototype.addClass = function (el, cl) {
1387
- var _this = this;
1388
- setTimeout(function () {
1389
- _super.prototype.addClass.call(_this, el, cl);
1390
- }, 0);
1391
- };
1392
- TimeoutExecutor.prototype.removeClass = function (el, cl) {
1393
- var _this = this;
1394
- setTimeout(function () {
1395
- _super.prototype.removeClass.call(_this, el, cl);
1396
- }, 0);
1397
- };
1398
- TimeoutExecutor.prototype.setAttribute = function (el, name, value) {
1399
- var _this = this;
1400
- setTimeout(function () {
1401
- _super.prototype.setAttribute.call(_this, el, name, value);
1402
- }, 0);
1403
- };
1404
- TimeoutExecutor.prototype.removeAttribute = function (el, name) {
1405
- var _this = this;
1406
- setTimeout(function () {
1407
- _super.prototype.removeAttribute.call(_this, el, name);
1408
- }, 0);
1409
- };
1410
- TimeoutExecutor.prototype.setStyle = function (el, prop, value) {
1411
- var _this = this;
1412
- setTimeout(function () {
1413
- _super.prototype.setStyle.call(_this, el, prop, value);
1414
- }, 0);
1415
- };
1416
- TimeoutExecutor.prototype.insertBefore = function (target, child) {
1417
- var _this = this;
1418
- setTimeout(function () {
1419
- _super.prototype.insertBefore.call(_this, target, child);
1420
- }, 0);
1421
- };
1422
- TimeoutExecutor.prototype.appendChild = function (el, child) {
1423
- var _this = this;
1424
- setTimeout(function () {
1425
- _super.prototype.appendChild.call(_this, el, child);
1426
- }, 0);
1427
- };
1428
- TimeoutExecutor.prototype.callCallback = function (cb) {
1429
- setTimeout(cb, 0);
1430
- };
1431
- return TimeoutExecutor;
1432
- }(InstantExecutor));
1433
-
1434
- var instantExecutor = new InstantExecutor();
1435
- var timeoutExecutor = new TimeoutExecutor();
1436
-
1437
- window.Executor = Executor;
1438
- window.InstantExecutor = InstantExecutor;
1439
- window.TimeoutExecutor = TimeoutExecutor;
1440
- window.instantExecutor = instantExecutor;
1441
- window.timeoutExecutor = timeoutExecutor;
1442
928
 
1443
929
  // ./lib-es5/core/destroyable.js
930
+ "use strict";
931
+ Object.defineProperty(exports, "__esModule", { value: true });
932
+ exports.Destroyable = void 0;
1444
933
  /**
1445
934
  * Mark an object which can be destroyed
1446
935
  * @class Destroyable
@@ -1452,7 +941,7 @@ var Destroyable = /** @class */ (function () {
1452
941
  * Make object fields non configurable
1453
942
  * @protected
1454
943
  */
1455
- Destroyable.prototype.seal = function () {
944
+ Destroyable.prototype.$seal = function () {
1456
945
  var _this = this;
1457
946
  var $ = this;
1458
947
  Object.keys($).forEach(function (i) {
@@ -1485,16 +974,35 @@ var Destroyable = /** @class */ (function () {
1485
974
  /**
1486
975
  * Garbage collector method
1487
976
  */
1488
- Destroyable.prototype.destroy = function () {
977
+ Destroyable.prototype.$destroy = function () {
1489
978
  // nothing here
1490
979
  };
1491
980
  return Destroyable;
1492
981
  }());
982
+ exports.Destroyable = Destroyable;
1493
983
 
1494
984
 
1495
- window.Destroyable = Destroyable;
1496
-
1497
985
  // ./lib-es5/core/ivalue.js
986
+ "use strict";
987
+ var __extends = (this && this.__extends) || (function () {
988
+ var extendStatics = function (d, b) {
989
+ extendStatics = Object.setPrototypeOf ||
990
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
991
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
992
+ return extendStatics(d, b);
993
+ };
994
+ return function (d, b) {
995
+ if (typeof b !== "function" && b !== null)
996
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
997
+ extendStatics(d, b);
998
+ function __() { this.constructor = d; }
999
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1000
+ };
1001
+ })();
1002
+ Object.defineProperty(exports, "__esModule", { value: true });
1003
+ exports.IValue = exports.Switchable = void 0;
1004
+ var destroyable_js_1 = require("./destroyable.js");
1005
+ var errors_1 = require("./errors");
1498
1006
  var Switchable = /** @class */ (function (_super) {
1499
1007
  __extends(Switchable, _super);
1500
1008
  function Switchable() {
@@ -1503,18 +1011,18 @@ var Switchable = /** @class */ (function (_super) {
1503
1011
  /**
1504
1012
  * Enable update handlers triggering
1505
1013
  */
1506
- Switchable.prototype.enable = function () {
1507
- throw notOverwritten();
1014
+ Switchable.prototype.$enable = function () {
1015
+ throw (0, errors_1.notOverwritten)();
1508
1016
  };
1509
1017
  /**
1510
1018
  * disable update handlers triggering
1511
1019
  */
1512
- Switchable.prototype.disable = function () {
1513
- throw notOverwritten();
1020
+ Switchable.prototype.$disable = function () {
1021
+ throw (0, errors_1.notOverwritten)();
1514
1022
  };
1515
1023
  return Switchable;
1516
- }(Destroyable));
1517
-
1024
+ }(destroyable_js_1.Destroyable));
1025
+ exports.Switchable = Switchable;
1518
1026
  /**
1519
1027
  * Interface which describes a value
1520
1028
  * @class IValue
@@ -1536,14 +1044,14 @@ var IValue = /** @class */ (function (_super) {
1536
1044
  * @return {*} the encapsulated value
1537
1045
  */
1538
1046
  get: function () {
1539
- throw notOverwritten();
1047
+ throw (0, errors_1.notOverwritten)();
1540
1048
  },
1541
1049
  /**
1542
1050
  * Sets the encapsulated value
1543
1051
  * @param value {*} value to encapsulate
1544
1052
  */
1545
1053
  set: function (value) {
1546
- throw notOverwritten();
1054
+ throw (0, errors_1.notOverwritten)();
1547
1055
  },
1548
1056
  enumerable: false,
1549
1057
  configurable: true
@@ -1552,40 +1060,109 @@ var IValue = /** @class */ (function (_super) {
1552
1060
  * Add a new handler to value change
1553
1061
  * @param handler {function(value : *)} the handler to add
1554
1062
  */
1555
- IValue.prototype.on = function (handler) {
1556
- throw notOverwritten();
1063
+ IValue.prototype.$on = function (handler) {
1064
+ throw (0, errors_1.notOverwritten)();
1557
1065
  };
1558
1066
  /**
1559
1067
  * Removes a handler of value change
1560
1068
  * @param handler {function(value : *)} the handler to remove
1561
1069
  */
1562
- IValue.prototype.off = function (handler) {
1563
- throw notOverwritten();
1070
+ IValue.prototype.$off = function (handler) {
1071
+ throw (0, errors_1.notOverwritten)();
1564
1072
  };
1565
1073
  return IValue;
1566
1074
  }(Switchable));
1075
+ exports.IValue = IValue;
1567
1076
 
1568
1077
 
1569
- window.Switchable = Switchable;
1570
- window.IValue = IValue;
1571
-
1572
1078
  // ./lib-es5/index.js
1573
-
1079
+ "use strict";
1080
+ Object.defineProperty(exports, "__esModule", { value: true });
1081
+ exports.Reactive = exports.Binding = exports.Expression = exports.Portal = exports.App = exports.AppNode = exports.Extension = exports.Component = exports.Tag = exports.INode = exports.Fragment = exports.SetView = exports.ObjectView = exports.MapView = exports.ArrayView = exports.Listener = exports.BaseView = exports.SetModel = exports.ObjectModel = exports.MapModel = exports.ArrayModel = exports.Pointer = exports.Mirror = exports.Reference = exports.IValue = exports.Destroyable = void 0;
1082
+ var destroyable_1 = require("./core/destroyable");
1083
+ Object.defineProperty(exports, "Destroyable", { enumerable: true, get: function () { return destroyable_1.Destroyable; } });
1084
+ var core_1 = require("./core/core");
1085
+ Object.defineProperty(exports, "Reactive", { enumerable: true, get: function () { return core_1.Reactive; } });
1086
+ var ivalue_1 = require("./core/ivalue");
1087
+ Object.defineProperty(exports, "IValue", { enumerable: true, get: function () { return ivalue_1.IValue; } });
1088
+ var array_model_1 = require("./models/array-model");
1089
+ Object.defineProperty(exports, "ArrayModel", { enumerable: true, get: function () { return array_model_1.ArrayModel; } });
1090
+ var listener_1 = require("./models/listener");
1091
+ Object.defineProperty(exports, "Listener", { enumerable: true, get: function () { return listener_1.Listener; } });
1092
+ var map_model_1 = require("./models/map-model");
1093
+ Object.defineProperty(exports, "MapModel", { enumerable: true, get: function () { return map_model_1.MapModel; } });
1094
+ var object_model_1 = require("./models/object-model");
1095
+ Object.defineProperty(exports, "ObjectModel", { enumerable: true, get: function () { return object_model_1.ObjectModel; } });
1096
+ var set_model_1 = require("./models/set-model");
1097
+ Object.defineProperty(exports, "SetModel", { enumerable: true, get: function () { return set_model_1.SetModel; } });
1098
+ var app_1 = require("./node/app");
1099
+ Object.defineProperty(exports, "App", { enumerable: true, get: function () { return app_1.App; } });
1100
+ Object.defineProperty(exports, "AppNode", { enumerable: true, get: function () { return app_1.AppNode; } });
1101
+ Object.defineProperty(exports, "Portal", { enumerable: true, get: function () { return app_1.Portal; } });
1102
+ var node_1 = require("./node/node");
1103
+ Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return node_1.Component; } });
1104
+ Object.defineProperty(exports, "Extension", { enumerable: true, get: function () { return node_1.Extension; } });
1105
+ Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return node_1.Fragment; } });
1106
+ Object.defineProperty(exports, "INode", { enumerable: true, get: function () { return node_1.INode; } });
1107
+ Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return node_1.Tag; } });
1108
+ var expression_1 = require("./value/expression");
1109
+ Object.defineProperty(exports, "Expression", { enumerable: true, get: function () { return expression_1.Expression; } });
1110
+ var mirror_1 = require("./value/mirror");
1111
+ Object.defineProperty(exports, "Mirror", { enumerable: true, get: function () { return mirror_1.Mirror; } });
1112
+ var pointer_1 = require("./value/pointer");
1113
+ Object.defineProperty(exports, "Pointer", { enumerable: true, get: function () { return pointer_1.Pointer; } });
1114
+ var reference_1 = require("./value/reference");
1115
+ Object.defineProperty(exports, "Reference", { enumerable: true, get: function () { return reference_1.Reference; } });
1116
+ var array_view_1 = require("./views/array-view");
1117
+ Object.defineProperty(exports, "ArrayView", { enumerable: true, get: function () { return array_view_1.ArrayView; } });
1118
+ var base_view_1 = require("./views/base-view");
1119
+ Object.defineProperty(exports, "BaseView", { enumerable: true, get: function () { return base_view_1.BaseView; } });
1120
+ var map_view_1 = require("./views/map-view");
1121
+ Object.defineProperty(exports, "MapView", { enumerable: true, get: function () { return map_view_1.MapView; } });
1122
+ var object_view_1 = require("./views/object-view");
1123
+ Object.defineProperty(exports, "ObjectView", { enumerable: true, get: function () { return object_view_1.ObjectView; } });
1124
+ var set_view_1 = require("./views/set-view");
1125
+ Object.defineProperty(exports, "SetView", { enumerable: true, get: function () { return set_view_1.SetView; } });
1126
+ var binding_1 = require("./binding/binding");
1127
+ Object.defineProperty(exports, "Binding", { enumerable: true, get: function () { return binding_1.Binding; } });
1574
1128
 
1575
1129
 
1576
1130
  // ./lib-es5/spec/svg.js
1577
-
1131
+ "use strict";
1132
+ Object.defineProperty(exports, "__esModule", { value: true });
1578
1133
 
1579
1134
 
1580
1135
  // ./lib-es5/spec/react.js
1581
-
1136
+ "use strict";
1137
+ Object.defineProperty(exports, "__esModule", { value: true });
1582
1138
 
1583
1139
 
1584
1140
  // ./lib-es5/spec/html.js
1585
-
1141
+ "use strict";
1142
+ Object.defineProperty(exports, "__esModule", { value: true });
1586
1143
 
1587
1144
 
1588
1145
  // ./lib-es5/value/expression.js
1146
+ "use strict";
1147
+ var __extends = (this && this.__extends) || (function () {
1148
+ var extendStatics = function (d, b) {
1149
+ extendStatics = Object.setPrototypeOf ||
1150
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1151
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1152
+ return extendStatics(d, b);
1153
+ };
1154
+ return function (d, b) {
1155
+ if (typeof b !== "function" && b !== null)
1156
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1157
+ extendStatics(d, b);
1158
+ function __() { this.constructor = d; }
1159
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1160
+ };
1161
+ })();
1162
+ Object.defineProperty(exports, "__esModule", { value: true });
1163
+ exports.Expression = void 0;
1164
+ var reference_js_1 = require("./reference.js");
1165
+ var ivalue_1 = require("../core/ivalue");
1589
1166
  /**
1590
1167
  * Bind some values to one expression
1591
1168
  * @class Expression
@@ -1618,7 +1195,7 @@ var Expression = /** @class */ (function (_super) {
1618
1195
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1619
1196
  // @ts-ignore
1620
1197
  _this.valuesCache = values.map(function (item) { return item.$; });
1621
- _this.sync = new Reference(func.apply(_this, _this.valuesCache));
1198
+ _this.sync = new reference_js_1.Reference(func.apply(_this, _this.valuesCache));
1622
1199
  var i = 0;
1623
1200
  values.forEach(function () {
1624
1201
  _this.linkedFunc.push(handler.bind(_this, Number(i++)));
@@ -1626,12 +1203,12 @@ var Expression = /** @class */ (function (_super) {
1626
1203
  _this.values = values;
1627
1204
  _this.func = handler;
1628
1205
  if (link) {
1629
- _this.enable();
1206
+ _this.$enable();
1630
1207
  }
1631
1208
  else {
1632
1209
  handler();
1633
1210
  }
1634
- _this.seal();
1211
+ _this.$seal();
1635
1212
  return _this;
1636
1213
  }
1637
1214
  Object.defineProperty(Expression.prototype, "$", {
@@ -1644,18 +1221,18 @@ var Expression = /** @class */ (function (_super) {
1644
1221
  enumerable: false,
1645
1222
  configurable: true
1646
1223
  });
1647
- Expression.prototype.on = function (handler) {
1648
- this.sync.on(handler);
1224
+ Expression.prototype.$on = function (handler) {
1225
+ this.sync.$on(handler);
1649
1226
  return this;
1650
1227
  };
1651
- Expression.prototype.off = function (handler) {
1652
- this.sync.off(handler);
1228
+ Expression.prototype.$off = function (handler) {
1229
+ this.sync.$off(handler);
1653
1230
  return this;
1654
1231
  };
1655
- Expression.prototype.enable = function () {
1232
+ Expression.prototype.$enable = function () {
1656
1233
  if (!this.isEnabled) {
1657
1234
  for (var i = 0; i < this.values.length; i++) {
1658
- this.values[i].on(this.linkedFunc[i]);
1235
+ this.values[i].$on(this.linkedFunc[i]);
1659
1236
  this.valuesCache[i] = this.values[i].$;
1660
1237
  }
1661
1238
  this.func();
@@ -1663,29 +1240,47 @@ var Expression = /** @class */ (function (_super) {
1663
1240
  }
1664
1241
  return this;
1665
1242
  };
1666
- Expression.prototype.disable = function () {
1243
+ Expression.prototype.$disable = function () {
1667
1244
  if (this.isEnabled) {
1668
1245
  for (var i = 0; i < this.values.length; i++) {
1669
- this.values[i].off(this.linkedFunc[i]);
1246
+ this.values[i].$off(this.linkedFunc[i]);
1670
1247
  }
1671
1248
  this.isEnabled = false;
1672
1249
  }
1673
1250
  return this;
1674
1251
  };
1675
- Expression.prototype.destroy = function () {
1676
- this.disable();
1252
+ Expression.prototype.$destroy = function () {
1253
+ this.$disable();
1677
1254
  this.values.splice(0);
1678
1255
  this.valuesCache.splice(0);
1679
1256
  this.linkedFunc.splice(0);
1680
- _super.prototype.destroy.call(this);
1257
+ _super.prototype.$destroy.call(this);
1681
1258
  };
1682
1259
  return Expression;
1683
- }(IValue));
1684
-
1260
+ }(ivalue_1.IValue));
1261
+ exports.Expression = Expression;
1685
1262
 
1686
- window.Expression = Expression;
1687
1263
 
1688
1264
  // ./lib-es5/value/reference.js
1265
+ "use strict";
1266
+ var __extends = (this && this.__extends) || (function () {
1267
+ var extendStatics = function (d, b) {
1268
+ extendStatics = Object.setPrototypeOf ||
1269
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1270
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1271
+ return extendStatics(d, b);
1272
+ };
1273
+ return function (d, b) {
1274
+ if (typeof b !== "function" && b !== null)
1275
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1276
+ extendStatics(d, b);
1277
+ function __() { this.constructor = d; }
1278
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1279
+ };
1280
+ })();
1281
+ Object.defineProperty(exports, "__esModule", { value: true });
1282
+ exports.Reference = void 0;
1283
+ var ivalue_1 = require("../core/ivalue");
1689
1284
  /**
1690
1285
  * Declares a notifiable value
1691
1286
  * @class Reference
@@ -1698,20 +1293,20 @@ var Reference = /** @class */ (function (_super) {
1698
1293
  */
1699
1294
  function Reference(value) {
1700
1295
  var _this = _super.call(this, true) || this;
1701
- _this.value = value;
1702
- _this.onchange = new Set;
1703
- _this.seal();
1296
+ _this.$value = value;
1297
+ _this.$onchange = new Set;
1298
+ _this.$seal();
1704
1299
  return _this;
1705
1300
  }
1706
1301
  Object.defineProperty(Reference.prototype, "$", {
1707
1302
  get: function () {
1708
- return this.value;
1303
+ return this.$value;
1709
1304
  },
1710
1305
  set: function (value) {
1711
- if (this.value !== value) {
1712
- this.value = value;
1306
+ if (this.$value !== value) {
1307
+ this.$value = value;
1713
1308
  if (this.isEnabled) {
1714
- this.onchange.forEach(function (handler) {
1309
+ this.$onchange.forEach(function (handler) {
1715
1310
  handler(value);
1716
1311
  });
1717
1312
  }
@@ -1720,35 +1315,53 @@ var Reference = /** @class */ (function (_super) {
1720
1315
  enumerable: false,
1721
1316
  configurable: true
1722
1317
  });
1723
- Reference.prototype.enable = function () {
1318
+ Reference.prototype.$enable = function () {
1724
1319
  var _this = this;
1725
1320
  if (!this.isEnabled) {
1726
- this.onchange.forEach(function (handler) {
1727
- handler(_this.value);
1321
+ this.$onchange.forEach(function (handler) {
1322
+ handler(_this.$value);
1728
1323
  });
1729
1324
  this.isEnabled = true;
1730
1325
  }
1731
1326
  };
1732
- Reference.prototype.disable = function () {
1327
+ Reference.prototype.$disable = function () {
1733
1328
  this.isEnabled = false;
1734
1329
  };
1735
- Reference.prototype.on = function (handler) {
1736
- this.onchange.add(handler);
1330
+ Reference.prototype.$on = function (handler) {
1331
+ this.$onchange.add(handler);
1737
1332
  };
1738
- Reference.prototype.off = function (handler) {
1739
- this.onchange.delete(handler);
1333
+ Reference.prototype.$off = function (handler) {
1334
+ this.$onchange.delete(handler);
1740
1335
  };
1741
- Reference.prototype.destroy = function () {
1742
- _super.prototype.destroy.call(this);
1743
- this.onchange.clear();
1336
+ Reference.prototype.$destroy = function () {
1337
+ _super.prototype.$destroy.call(this);
1338
+ this.$onchange.clear();
1744
1339
  };
1745
1340
  return Reference;
1746
- }(IValue));
1747
-
1341
+ }(ivalue_1.IValue));
1342
+ exports.Reference = Reference;
1748
1343
 
1749
- window.Reference = Reference;
1750
1344
 
1751
1345
  // ./lib-es5/value/mirror.js
1346
+ "use strict";
1347
+ var __extends = (this && this.__extends) || (function () {
1348
+ var extendStatics = function (d, b) {
1349
+ extendStatics = Object.setPrototypeOf ||
1350
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1351
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1352
+ return extendStatics(d, b);
1353
+ };
1354
+ return function (d, b) {
1355
+ if (typeof b !== "function" && b !== null)
1356
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1357
+ extendStatics(d, b);
1358
+ function __() { this.constructor = d; }
1359
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1360
+ };
1361
+ })();
1362
+ Object.defineProperty(exports, "__esModule", { value: true });
1363
+ exports.Mirror = void 0;
1364
+ var reference_1 = require("./reference");
1752
1365
  /**
1753
1366
  * Declares a notifiable bind to a value
1754
1367
  * @class Mirror
@@ -1765,13 +1378,13 @@ var Mirror = /** @class */ (function (_super) {
1765
1378
  function Mirror(value, forwardOnly) {
1766
1379
  if (forwardOnly === void 0) { forwardOnly = false; }
1767
1380
  var _this = _super.call(this, value.$) || this;
1768
- _this.handler = function (v) {
1381
+ _this.$handler = function (v) {
1769
1382
  _this.$ = v;
1770
1383
  };
1771
- _this.pointedValue = value;
1772
- _this.forwardOnly = forwardOnly;
1773
- value.on(_this.handler);
1774
- _this.seal();
1384
+ _this.$pointedValue = value;
1385
+ _this.$forwardOnly = forwardOnly;
1386
+ value.$on(_this.$handler);
1387
+ _this.$seal();
1775
1388
  return _this;
1776
1389
  }
1777
1390
  Object.defineProperty(Mirror.prototype, "$", {
@@ -1782,8 +1395,8 @@ var Mirror = /** @class */ (function (_super) {
1782
1395
  return _super.prototype.$;
1783
1396
  },
1784
1397
  set: function (v) {
1785
- if (!this.forwardOnly) {
1786
- this.pointedValue.$ = v;
1398
+ if (!this.$forwardOnly) {
1399
+ this.$pointedValue.$ = v;
1787
1400
  }
1788
1401
  // this is a ts bug
1789
1402
  // eslint-disable-next-line
@@ -1793,30 +1406,48 @@ var Mirror = /** @class */ (function (_super) {
1793
1406
  enumerable: false,
1794
1407
  configurable: true
1795
1408
  });
1796
- Mirror.prototype.enable = function () {
1409
+ Mirror.prototype.$enable = function () {
1797
1410
  if (!this.isEnabled) {
1798
1411
  this.isEnabled = true;
1799
- this.pointedValue.on(this.handler);
1800
- this.$ = this.pointedValue.$;
1412
+ this.$pointedValue.$on(this.$handler);
1413
+ this.$ = this.$pointedValue.$;
1801
1414
  }
1802
1415
  };
1803
- Mirror.prototype.disable = function () {
1416
+ Mirror.prototype.$disable = function () {
1804
1417
  if (this.isEnabled) {
1805
- this.pointedValue.off(this.handler);
1418
+ this.$pointedValue.$off(this.$handler);
1806
1419
  this.isEnabled = false;
1807
1420
  }
1808
1421
  };
1809
- Mirror.prototype.destroy = function () {
1810
- this.disable();
1811
- _super.prototype.destroy.call(this);
1422
+ Mirror.prototype.$destroy = function () {
1423
+ this.$disable();
1424
+ _super.prototype.$destroy.call(this);
1812
1425
  };
1813
1426
  return Mirror;
1814
- }(Reference));
1427
+ }(reference_1.Reference));
1428
+ exports.Mirror = Mirror;
1815
1429
 
1816
1430
 
1817
- window.Mirror = Mirror;
1818
-
1819
1431
  // ./lib-es5/value/pointer.js
1432
+ "use strict";
1433
+ var __extends = (this && this.__extends) || (function () {
1434
+ var extendStatics = function (d, b) {
1435
+ extendStatics = Object.setPrototypeOf ||
1436
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1437
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1438
+ return extendStatics(d, b);
1439
+ };
1440
+ return function (d, b) {
1441
+ if (typeof b !== "function" && b !== null)
1442
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1443
+ extendStatics(d, b);
1444
+ function __() { this.constructor = d; }
1445
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1446
+ };
1447
+ })();
1448
+ Object.defineProperty(exports, "__esModule", { value: true });
1449
+ exports.Pointer = void 0;
1450
+ var mirror_1 = require("./mirror");
1820
1451
  /**
1821
1452
  * r/w pointer to a value
1822
1453
  * @class Pointer
@@ -1832,24 +1463,46 @@ var Pointer = /** @class */ (function (_super) {
1832
1463
  if (forwardOnly === void 0) { forwardOnly = false; }
1833
1464
  return _super.call(this, value, forwardOnly) || this;
1834
1465
  }
1835
- /**
1836
- * Point a new ivalue
1837
- * @param value {IValue} value to point
1838
- */
1839
- Pointer.prototype.point = function (value) {
1840
- if (this.pointedValue !== value) {
1841
- this.disable();
1842
- this.pointedValue = value;
1843
- this.enable();
1844
- }
1845
- };
1466
+ Object.defineProperty(Pointer.prototype, "$$", {
1467
+ /**
1468
+ * Point a new ivalue
1469
+ * @param value {IValue} value to point
1470
+ */
1471
+ set: function (value) {
1472
+ if (this.$pointedValue !== value) {
1473
+ this.$disable();
1474
+ this.$pointedValue = value;
1475
+ this.$enable();
1476
+ }
1477
+ },
1478
+ enumerable: false,
1479
+ configurable: true
1480
+ });
1846
1481
  return Pointer;
1847
- }(Mirror));
1848
-
1482
+ }(mirror_1.Mirror));
1483
+ exports.Pointer = Pointer;
1849
1484
 
1850
- window.Pointer = Pointer;
1851
1485
 
1852
1486
  // ./lib-es5/binding/binding.js
1487
+ "use strict";
1488
+ var __extends = (this && this.__extends) || (function () {
1489
+ var extendStatics = function (d, b) {
1490
+ extendStatics = Object.setPrototypeOf ||
1491
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1492
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1493
+ return extendStatics(d, b);
1494
+ };
1495
+ return function (d, b) {
1496
+ if (typeof b !== "function" && b !== null)
1497
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1498
+ extendStatics(d, b);
1499
+ function __() { this.constructor = d; }
1500
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1501
+ };
1502
+ })();
1503
+ Object.defineProperty(exports, "__esModule", { value: true });
1504
+ exports.Binding = void 0;
1505
+ var destroyable_1 = require("../core/destroyable");
1853
1506
  /**
1854
1507
  * Describe a common binding logic
1855
1508
  * @class Binding
@@ -1864,36 +1517,68 @@ var Binding = /** @class */ (function (_super) {
1864
1517
  function Binding(value) {
1865
1518
  var _this = this; _super.call(this);
1866
1519
  _this.binding = value;
1867
- _this.seal();
1520
+ _this.$seal();
1868
1521
  return _this;
1869
1522
  }
1870
1523
  Binding.prototype.init = function (bounded) {
1871
1524
  this.func = bounded;
1872
- this.binding.on(this.func);
1525
+ this.binding.$on(this.func);
1873
1526
  this.func(this.binding.$);
1874
1527
  };
1875
1528
  /**
1876
1529
  * Just clear bindings
1877
1530
  */
1878
- Binding.prototype.destroy = function () {
1879
- this.binding.off(this.func);
1880
- _super.prototype.destroy.call(this);
1531
+ Binding.prototype.$destroy = function () {
1532
+ this.binding.$off(this.func);
1533
+ _super.prototype.$destroy.call(this);
1881
1534
  };
1882
1535
  return Binding;
1883
- }(Destroyable));
1884
-
1536
+ }(destroyable_1.Destroyable));
1537
+ exports.Binding = Binding;
1885
1538
 
1886
- window.Binding = Binding;
1887
1539
 
1888
1540
  // ./lib-es5/core/core.js
1889
- var current = null;
1541
+ "use strict";
1542
+ var __extends = (this && this.__extends) || (function () {
1543
+ var extendStatics = function (d, b) {
1544
+ extendStatics = Object.setPrototypeOf ||
1545
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1546
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1547
+ return extendStatics(d, b);
1548
+ };
1549
+ return function (d, b) {
1550
+ if (typeof b !== "function" && b !== null)
1551
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1552
+ extendStatics(d, b);
1553
+ function __() { this.constructor = d; }
1554
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1555
+ };
1556
+ })();
1557
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
1558
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1559
+ if (ar || !(i in from)) {
1560
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1561
+ ar[i] = from[i];
1562
+ }
1563
+ }
1564
+ return to.concat(ar || Array.prototype.slice.call(from));
1565
+ };
1566
+ Object.defineProperty(exports, "__esModule", { value: true });
1567
+ exports.Reactive = exports.ReactivePrivate = exports.current = void 0;
1568
+ var destroyable_js_1 = require("./destroyable.js");
1569
+ var errors_1 = require("./errors");
1570
+ var expression_1 = require("../value/expression");
1571
+ var reference_1 = require("../value/reference");
1572
+ var pointer_1 = require("../value/pointer");
1573
+ var mirror_1 = require("../value/mirror");
1574
+ exports.current = null;
1890
1575
  var currentStack = [];
1891
1576
  function stack(node) {
1892
- currentStack.push(current);
1893
- current = node;
1577
+ currentStack.push(exports.current);
1578
+ exports.current = node;
1894
1579
  }
1895
1580
  function unstack() {
1896
- current = currentStack.pop();
1581
+ exports.current = currentStack.pop();
1897
1582
  }
1898
1583
  /**
1899
1584
  * Private stuff of a reactive object
@@ -1928,23 +1613,23 @@ var ReactivePrivate = /** @class */ (function (_super) {
1928
1613
  * @type {boolean}
1929
1614
  */
1930
1615
  _this.frozen = false;
1931
- _this.seal();
1616
+ _this.$seal();
1932
1617
  return _this;
1933
1618
  }
1934
- ReactivePrivate.prototype.destroy = function () {
1935
- this.watch.forEach(function (value) { return value.destroy(); });
1619
+ ReactivePrivate.prototype.$destroy = function () {
1620
+ this.watch.forEach(function (value) { return value.$destroy(); });
1936
1621
  this.watch.clear();
1937
- this.bindings.forEach(function (binding) { return binding.destroy(); });
1622
+ this.bindings.forEach(function (binding) { return binding.$destroy(); });
1938
1623
  this.bindings.clear();
1939
1624
  this.models.forEach(function (model) { return model.disableReactivity(); });
1940
1625
  this.models.clear();
1941
- this.freezeExpr && this.freezeExpr.destroy();
1626
+ this.freezeExpr && this.freezeExpr.$destroy();
1942
1627
  this.onDestroy && this.onDestroy();
1943
- _super.prototype.destroy.call(this);
1628
+ _super.prototype.$destroy.call(this);
1944
1629
  };
1945
1630
  return ReactivePrivate;
1946
- }(Destroyable));
1947
-
1631
+ }(destroyable_js_1.Destroyable));
1632
+ exports.ReactivePrivate = ReactivePrivate;
1948
1633
  /**
1949
1634
  * A reactive object
1950
1635
  * @class Reactive
@@ -1956,7 +1641,7 @@ var Reactive = /** @class */ (function (_super) {
1956
1641
  var _this = this; _super.call(this);
1957
1642
  _this.input = input;
1958
1643
  _this.$ = $ || new ReactivePrivate;
1959
- _this.seal();
1644
+ _this.$seal();
1960
1645
  return _this;
1961
1646
  }
1962
1647
  Object.defineProperty(Reactive.prototype, "parent", {
@@ -1975,7 +1660,7 @@ var Reactive = /** @class */ (function (_super) {
1975
1660
  */
1976
1661
  Reactive.prototype.ref = function (value) {
1977
1662
  var $ = this.$;
1978
- var ref = new Reference(value);
1663
+ var ref = new reference_1.Reference(value);
1979
1664
  $.watch.add(ref);
1980
1665
  return ref;
1981
1666
  };
@@ -1984,7 +1669,7 @@ var Reactive = /** @class */ (function (_super) {
1984
1669
  * @param value {IValue} value to mirror
1985
1670
  */
1986
1671
  Reactive.prototype.mirror = function (value) {
1987
- var mirror = new Mirror(value, false);
1672
+ var mirror = new mirror_1.Mirror(value, false);
1988
1673
  this.$.watch.add(mirror);
1989
1674
  return mirror;
1990
1675
  };
@@ -1993,7 +1678,7 @@ var Reactive = /** @class */ (function (_super) {
1993
1678
  * @param value {IValue} value to mirror
1994
1679
  */
1995
1680
  Reactive.prototype.forward = function (value) {
1996
- var mirror = new Mirror(value, true);
1681
+ var mirror = new mirror_1.Mirror(value, true);
1997
1682
  this.$.watch.add(mirror);
1998
1683
  return mirror;
1999
1684
  };
@@ -2005,7 +1690,7 @@ var Reactive = /** @class */ (function (_super) {
2005
1690
  Reactive.prototype.point = function (value, forwardOnly) {
2006
1691
  if (forwardOnly === void 0) { forwardOnly = false; }
2007
1692
  var $ = this.$;
2008
- var pointer = new Pointer(value, forwardOnly);
1693
+ var pointer = new pointer_1.Pointer(value, forwardOnly);
2009
1694
  $.watch.add(pointer);
2010
1695
  return pointer;
2011
1696
  };
@@ -2028,7 +1713,7 @@ var Reactive = /** @class */ (function (_super) {
2028
1713
  values[_i - 1] = arguments[_i];
2029
1714
  }
2030
1715
  var $ = this.$;
2031
- $.watch.add(new (Expression.bind.apply(Expression, __spreadArray([void 0, func, !this.$.frozen], values, false)))());
1716
+ $.watch.add(new (expression_1.Expression.bind.apply(expression_1.Expression, __spreadArray([void 0, func, !this.$.frozen], values, false)))());
2032
1717
  };
2033
1718
  /**
2034
1719
  * Creates a computed value
@@ -2041,7 +1726,7 @@ var Reactive = /** @class */ (function (_super) {
2041
1726
  for (var _i = 1; _i < arguments.length; _i++) {
2042
1727
  values[_i - 1] = arguments[_i];
2043
1728
  }
2044
- var res = new (Expression.bind.apply(Expression, __spreadArray([void 0, func, !this.$.frozen], values, false)))();
1729
+ var res = new (expression_1.Expression.bind.apply(expression_1.Expression, __spreadArray([void 0, func, !this.$.frozen], values, false)))();
2045
1730
  var $ = this.$;
2046
1731
  $.watch.add(res);
2047
1732
  return res;
@@ -2053,7 +1738,7 @@ var Reactive = /** @class */ (function (_super) {
2053
1738
  var $ = this.$;
2054
1739
  if (!$.enabled) {
2055
1740
  $.watch.forEach(function (watcher) {
2056
- watcher.enable();
1741
+ watcher.$enable();
2057
1742
  });
2058
1743
  $.models.forEach(function (model) {
2059
1744
  model.enableReactivity();
@@ -2068,7 +1753,7 @@ var Reactive = /** @class */ (function (_super) {
2068
1753
  var $ = this.$;
2069
1754
  if ($.enabled) {
2070
1755
  $.watch.forEach(function (watcher) {
2071
- watcher.disable();
1756
+ watcher.$disable();
2072
1757
  });
2073
1758
  $.models.forEach(function (model) {
2074
1759
  model.disableReactivity();
@@ -2086,12 +1771,12 @@ var Reactive = /** @class */ (function (_super) {
2086
1771
  var _this = this;
2087
1772
  var $ = this.$;
2088
1773
  if ($.freezeExpr) {
2089
- throw wrongBinding("this component already have a freeze state");
1774
+ throw (0, errors_1.wrongBinding)("this component already have a freeze state");
2090
1775
  }
2091
1776
  if ($.watch.has(cond)) {
2092
- throw wrongBinding("freeze state must be bound to an external component");
1777
+ throw (0, errors_1.wrongBinding)("freeze state must be bound to an external component");
2093
1778
  }
2094
- $.freezeExpr = new Expression(function (cond) {
1779
+ $.freezeExpr = new expression_1.Expression(function (cond) {
2095
1780
  $.frozen = !cond;
2096
1781
  if (cond) {
2097
1782
  onOn === null || onOn === void 0 ? void 0 : onOn();
@@ -2106,7 +1791,7 @@ var Reactive = /** @class */ (function (_super) {
2106
1791
  };
2107
1792
  Reactive.prototype.init = function () {
2108
1793
  this.applyOptions(this.input);
2109
- this.compose(this.input);
1794
+ return this.compose(this.input);
2110
1795
  };
2111
1796
  Reactive.prototype.applyOptions = function (input) {
2112
1797
  // empty
@@ -2115,7 +1800,7 @@ var Reactive = /** @class */ (function (_super) {
2115
1800
  this.applyOptions(this.input);
2116
1801
  };
2117
1802
  Reactive.prototype.compose = function (input) {
2118
- // empty
1803
+ throw (0, errors_1.notOverwritten)();
2119
1804
  };
2120
1805
  Reactive.prototype.composeNow = function () {
2121
1806
  this.compose(this.input);
@@ -2136,20 +1821,43 @@ var Reactive = /** @class */ (function (_super) {
2136
1821
  Reactive.prototype.runOnDestroy = function (func) {
2137
1822
  this.$.onDestroy = func;
2138
1823
  };
2139
- Reactive.prototype.destroy = function () {
2140
- _super.prototype.destroy.call(this);
2141
- this.$.destroy();
1824
+ Reactive.prototype.$destroy = function () {
1825
+ _super.prototype.$destroy.call(this);
1826
+ this.$.$destroy();
2142
1827
  this.$ = null;
2143
1828
  };
2144
1829
  return Reactive;
2145
- }(Destroyable));
2146
-
1830
+ }(destroyable_js_1.Destroyable));
1831
+ exports.Reactive = Reactive;
2147
1832
 
2148
- window.current = current;
2149
- window.ReactivePrivate = ReactivePrivate;
2150
- window.Reactive = Reactive;
2151
1833
 
2152
1834
  // ./lib-es5/node/node.js
1835
+ "use strict";
1836
+ var __extends = (this && this.__extends) || (function () {
1837
+ var extendStatics = function (d, b) {
1838
+ extendStatics = Object.setPrototypeOf ||
1839
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1840
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1841
+ return extendStatics(d, b);
1842
+ };
1843
+ return function (d, b) {
1844
+ if (typeof b !== "function" && b !== null)
1845
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1846
+ extendStatics(d, b);
1847
+ function __() { this.constructor = d; }
1848
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1849
+ };
1850
+ })();
1851
+ Object.defineProperty(exports, "__esModule", { value: true });
1852
+ exports.DebugNode = exports.DebugPrivate = exports.SwitchedNode = exports.SwitchedNodePrivate = exports.Component = exports.Extension = exports.Tag = exports.INode = exports.INodePrivate = exports.TextNode = exports.TextNodePrivate = exports.Fragment = exports.FragmentPrivate = void 0;
1853
+ var core_1 = require("../core/core");
1854
+ var ivalue_1 = require("../core/ivalue");
1855
+ var reference_1 = require("../value/reference");
1856
+ var expression_1 = require("../value/expression");
1857
+ var attribute_1 = require("../binding/attribute");
1858
+ var class_1 = require("../binding/class");
1859
+ var style_1 = require("../binding/style");
1860
+ var errors_1 = require("../core/errors");
2153
1861
  /**
2154
1862
  * Represents a Vasille.js node
2155
1863
  * @class FragmentPrivate
@@ -2159,7 +1867,7 @@ var FragmentPrivate = /** @class */ (function (_super) {
2159
1867
  __extends(FragmentPrivate, _super);
2160
1868
  function FragmentPrivate() {
2161
1869
  var _this = this; _super.call(this);
2162
- _this.seal();
1870
+ _this.$seal();
2163
1871
  return _this;
2164
1872
  }
2165
1873
  /**
@@ -2174,14 +1882,14 @@ var FragmentPrivate = /** @class */ (function (_super) {
2174
1882
  /**
2175
1883
  * Unlinks all bindings
2176
1884
  */
2177
- FragmentPrivate.prototype.destroy = function () {
1885
+ FragmentPrivate.prototype.$destroy = function () {
2178
1886
  this.next = null;
2179
1887
  this.prev = null;
2180
- _super.prototype.destroy.call(this);
1888
+ _super.prototype.$destroy.call(this);
2181
1889
  };
2182
1890
  return FragmentPrivate;
2183
- }(ReactivePrivate));
2184
-
1891
+ }(core_1.ReactivePrivate));
1892
+ exports.FragmentPrivate = FragmentPrivate;
2185
1893
  /**
2186
1894
  * This class is symbolic
2187
1895
  * @extends Reactive
@@ -2224,11 +1932,11 @@ var Fragment = /** @class */ (function (_super) {
2224
1932
  $.preinit(app, parent);
2225
1933
  };
2226
1934
  Fragment.prototype.init = function () {
2227
- _super.prototype.init.call(this);
1935
+ var ret = _super.prototype.init.call(this);
2228
1936
  this.ready();
1937
+ return ret;
2229
1938
  };
2230
1939
  Fragment.prototype.compose = function (input) {
2231
- _super.prototype.compose.call(this, input);
2232
1940
  input.slot && input.slot(this);
2233
1941
  };
2234
1942
  /** To be overloaded: ready event handler */
@@ -2336,7 +2044,7 @@ var Fragment = /** @class */ (function (_super) {
2336
2044
  node.preinit($.app, this);
2337
2045
  node.input.slot = callback || node.input.slot;
2338
2046
  this.pushNode(node);
2339
- node.init();
2047
+ return node.init();
2340
2048
  };
2341
2049
  /**
2342
2050
  * Defines an if node
@@ -2357,7 +2065,7 @@ var Fragment = /** @class */ (function (_super) {
2357
2065
  this.lastChild.addCase(this.default(cb));
2358
2066
  }
2359
2067
  else {
2360
- throw userError('wrong `else` function use', 'logic-error');
2068
+ throw (0, errors_1.userError)('wrong `else` function use', 'logic-error');
2361
2069
  }
2362
2070
  };
2363
2071
  Fragment.prototype.elif = function (cond, cb) {
@@ -2365,7 +2073,7 @@ var Fragment = /** @class */ (function (_super) {
2365
2073
  this.lastChild.addCase(this.case(cond, cb));
2366
2074
  }
2367
2075
  else {
2368
- throw userError('wrong `elif` function use', 'logic-error');
2076
+ throw (0, errors_1.userError)('wrong `elif` function use', 'logic-error');
2369
2077
  }
2370
2078
  };
2371
2079
  /**
@@ -2408,19 +2116,19 @@ var Fragment = /** @class */ (function (_super) {
2408
2116
  $.prev.$.next = $.next;
2409
2117
  }
2410
2118
  };
2411
- Fragment.prototype.destroy = function () {
2412
- this.children.forEach(function (child) { return child.destroy(); });
2119
+ Fragment.prototype.$destroy = function () {
2120
+ this.children.forEach(function (child) { return child.$destroy(); });
2413
2121
  this.children.clear();
2414
2122
  this.lastChild = null;
2415
2123
  if (this.$.parent.lastChild === this) {
2416
2124
  this.$.parent.lastChild = this.$.prev;
2417
2125
  }
2418
- _super.prototype.destroy.call(this);
2126
+ _super.prototype.$destroy.call(this);
2419
2127
  };
2420
2128
  return Fragment;
2421
- }(Reactive));
2422
-
2423
- var trueIValue = new Reference(true);
2129
+ }(core_1.Reactive));
2130
+ exports.Fragment = Fragment;
2131
+ var trueIValue = new reference_1.Reference(true);
2424
2132
  /**
2425
2133
  * The private part of a text node
2426
2134
  * @class TextNodePrivate
@@ -2430,7 +2138,7 @@ var TextNodePrivate = /** @class */ (function (_super) {
2430
2138
  __extends(TextNodePrivate, _super);
2431
2139
  function TextNodePrivate() {
2432
2140
  var _this = this; _super.call(this);
2433
- _this.seal();
2141
+ _this.$seal();
2434
2142
  return _this;
2435
2143
  }
2436
2144
  /**
@@ -2442,9 +2150,9 @@ var TextNodePrivate = /** @class */ (function (_super) {
2442
2150
  TextNodePrivate.prototype.preinitText = function (app, parent, text) {
2443
2151
  var _this = this;
2444
2152
  _super.prototype.preinit.call(this, app, parent);
2445
- this.node = document.createTextNode(text instanceof IValue ? text.$ : text);
2446
- if (text instanceof IValue) {
2447
- this.bindings.add(new Expression(function (v) {
2153
+ this.node = document.createTextNode(text instanceof ivalue_1.IValue ? text.$ : text);
2154
+ if (text instanceof ivalue_1.IValue) {
2155
+ this.bindings.add(new expression_1.Expression(function (v) {
2448
2156
  _this.node.replaceData(0, -1, v);
2449
2157
  }, true, text));
2450
2158
  }
@@ -2452,12 +2160,12 @@ var TextNodePrivate = /** @class */ (function (_super) {
2452
2160
  /**
2453
2161
  * Clear node data
2454
2162
  */
2455
- TextNodePrivate.prototype.destroy = function () {
2456
- _super.prototype.destroy.call(this);
2163
+ TextNodePrivate.prototype.$destroy = function () {
2164
+ _super.prototype.$destroy.call(this);
2457
2165
  };
2458
2166
  return TextNodePrivate;
2459
2167
  }(FragmentPrivate));
2460
-
2168
+ exports.TextNodePrivate = TextNodePrivate;
2461
2169
  /**
2462
2170
  * Represents a text node
2463
2171
  * @class TextNode
@@ -2468,13 +2176,13 @@ var TextNode = /** @class */ (function (_super) {
2468
2176
  function TextNode($) {
2469
2177
  if ($ === void 0) { $ = new TextNodePrivate(); }
2470
2178
  var _this = _super.call(this, {}, $) || this;
2471
- _this.seal();
2179
+ _this.$seal();
2472
2180
  return _this;
2473
2181
  }
2474
2182
  TextNode.prototype.preinit = function (app, parent, text) {
2475
2183
  var $ = this.$;
2476
2184
  if (!text) {
2477
- throw internalError('wrong TextNode::$preninit call');
2185
+ throw (0, errors_1.internalError)('wrong TextNode::$preninit call');
2478
2186
  }
2479
2187
  $.preinitText(app, parent, text);
2480
2188
  $.parent.appendNode($.node);
@@ -2482,14 +2190,14 @@ var TextNode = /** @class */ (function (_super) {
2482
2190
  TextNode.prototype.findFirstChild = function () {
2483
2191
  return this.$.node;
2484
2192
  };
2485
- TextNode.prototype.destroy = function () {
2193
+ TextNode.prototype.$destroy = function () {
2486
2194
  this.$.node.remove();
2487
- this.$.destroy();
2488
- _super.prototype.destroy.call(this);
2195
+ this.$.$destroy();
2196
+ _super.prototype.$destroy.call(this);
2489
2197
  };
2490
2198
  return TextNode;
2491
2199
  }(Fragment));
2492
-
2200
+ exports.TextNode = TextNode;
2493
2201
  /**
2494
2202
  * The private part of a base node
2495
2203
  * @class INodePrivate
@@ -2504,15 +2212,15 @@ var INodePrivate = /** @class */ (function (_super) {
2504
2212
  * @type {boolean}
2505
2213
  */
2506
2214
  _this.unmounted = false;
2507
- _this.seal();
2215
+ _this.$seal();
2508
2216
  return _this;
2509
2217
  }
2510
- INodePrivate.prototype.destroy = function () {
2511
- _super.prototype.destroy.call(this);
2218
+ INodePrivate.prototype.$destroy = function () {
2219
+ _super.prototype.$destroy.call(this);
2512
2220
  };
2513
2221
  return INodePrivate;
2514
2222
  }(FragmentPrivate));
2515
-
2223
+ exports.INodePrivate = INodePrivate;
2516
2224
  /**
2517
2225
  * Vasille node which can manipulate an element node
2518
2226
  * @class INode
@@ -2527,7 +2235,7 @@ var INode = /** @class */ (function (_super) {
2527
2235
  */
2528
2236
  function INode(input, $) {
2529
2237
  var _this = _super.call(this, input, $ || new INodePrivate) || this;
2530
- _this.seal();
2238
+ _this.$seal();
2531
2239
  return _this;
2532
2240
  }
2533
2241
  Object.defineProperty(INode.prototype, "node", {
@@ -2547,7 +2255,7 @@ var INode = /** @class */ (function (_super) {
2547
2255
  */
2548
2256
  INode.prototype.attr = function (name, value) {
2549
2257
  var $ = this.$;
2550
- var attr = new AttributeBinding(this, name, value);
2258
+ var attr = new attribute_1.AttributeBinding(this, name, value);
2551
2259
  $.bindings.add(attr);
2552
2260
  };
2553
2261
  /**
@@ -2588,7 +2296,7 @@ var INode = /** @class */ (function (_super) {
2588
2296
  */
2589
2297
  INode.prototype.bindClass = function (className) {
2590
2298
  var $ = this.$;
2591
- $.bindings.add(new DynamicalClassBinding(this, className));
2299
+ $.bindings.add(new class_1.DynamicalClassBinding(this, className));
2592
2300
  return this;
2593
2301
  };
2594
2302
  /**
@@ -2597,7 +2305,7 @@ var INode = /** @class */ (function (_super) {
2597
2305
  * @param className {string} class name
2598
2306
  */
2599
2307
  INode.prototype.floatingClass = function (cond, className) {
2600
- this.$.bindings.add(new StaticClassBinding(this, className, cond));
2308
+ this.$.bindings.add(new class_1.StaticClassBinding(this, className, cond));
2601
2309
  return this;
2602
2310
  };
2603
2311
  /**
@@ -2608,10 +2316,10 @@ var INode = /** @class */ (function (_super) {
2608
2316
  INode.prototype.style = function (name, value) {
2609
2317
  var $ = this.$;
2610
2318
  if ($.node instanceof HTMLElement) {
2611
- $.bindings.add(new StyleBinding(this, name, value));
2319
+ $.bindings.add(new style_1.StyleBinding(this, name, value));
2612
2320
  }
2613
2321
  else {
2614
- throw userError('style can be applied to HTML elements only', 'non-html-element');
2322
+ throw (0, errors_1.userError)('style can be applied to HTML elements only', 'non-html-element');
2615
2323
  }
2616
2324
  return this;
2617
2325
  };
@@ -2625,7 +2333,7 @@ var INode = /** @class */ (function (_super) {
2625
2333
  this.$.node.style.setProperty(prop, value);
2626
2334
  }
2627
2335
  else {
2628
- throw userError("Style can be set for HTML elements only", "non-html-element");
2336
+ throw (0, errors_1.userError)("Style can be set for HTML elements only", "non-html-element");
2629
2337
  }
2630
2338
  return this;
2631
2339
  };
@@ -2660,7 +2368,7 @@ var INode = /** @class */ (function (_super) {
2660
2368
  });
2661
2369
  }
2662
2370
  else {
2663
- throw userError('the element must be a html element', 'bind-show');
2371
+ throw (0, errors_1.userError)('the element must be a html element', 'bind-show');
2664
2372
  }
2665
2373
  };
2666
2374
  /**
@@ -2677,14 +2385,14 @@ var INode = /** @class */ (function (_super) {
2677
2385
  }, value);
2678
2386
  }
2679
2387
  else {
2680
- throw userError("HTML can be bound for HTML nodes only", "dom-error");
2388
+ throw (0, errors_1.userError)("HTML can be bound for HTML nodes only", "dom-error");
2681
2389
  }
2682
2390
  };
2683
2391
  INode.prototype.applyOptions = function (options) {
2684
2392
  var _this = this;
2685
2393
  options["v:attr"] && Object.keys(options["v:attr"]).forEach(function (name) {
2686
2394
  var value = options["v:attr"][name];
2687
- if (value instanceof IValue) {
2395
+ if (value instanceof ivalue_1.IValue) {
2688
2396
  _this.attr(name, value);
2689
2397
  }
2690
2398
  else {
@@ -2693,7 +2401,7 @@ var INode = /** @class */ (function (_super) {
2693
2401
  });
2694
2402
  if (options.class) {
2695
2403
  var handleClass_1 = function (name, value) {
2696
- if (value instanceof IValue) {
2404
+ if (value instanceof ivalue_1.IValue) {
2697
2405
  _this.floatingClass(value, name);
2698
2406
  }
2699
2407
  else if (value && name !== '$') {
@@ -2705,7 +2413,7 @@ var INode = /** @class */ (function (_super) {
2705
2413
  };
2706
2414
  if (Array.isArray(options.class)) {
2707
2415
  options.class.forEach(function (item) {
2708
- if (item instanceof IValue) {
2416
+ if (item instanceof ivalue_1.IValue) {
2709
2417
  _this.bindClass(item);
2710
2418
  }
2711
2419
  else if (typeof item == "string") {
@@ -2729,14 +2437,14 @@ var INode = /** @class */ (function (_super) {
2729
2437
  }
2730
2438
  options.style && Object.keys(options.style).forEach(function (name) {
2731
2439
  var value = options.style[name];
2732
- if (value instanceof IValue) {
2440
+ if (value instanceof ivalue_1.IValue) {
2733
2441
  _this.style(name, value);
2734
2442
  }
2735
2443
  else if (typeof value === "string") {
2736
2444
  _this.setStyle(name, value);
2737
2445
  }
2738
2446
  else {
2739
- if (value[0] instanceof IValue) {
2447
+ if (value[0] instanceof ivalue_1.IValue) {
2740
2448
  _this.style(name, _this.expr(function (v) { return v + value[1]; }, value[0]));
2741
2449
  }
2742
2450
  else {
@@ -2769,7 +2477,7 @@ var INode = /** @class */ (function (_super) {
2769
2477
  };
2770
2478
  return INode;
2771
2479
  }(Fragment));
2772
-
2480
+ exports.INode = INode;
2773
2481
  /**
2774
2482
  * Represents an Vasille.js HTML element node
2775
2483
  * @class Tag
@@ -2779,12 +2487,12 @@ var Tag = /** @class */ (function (_super) {
2779
2487
  __extends(Tag, _super);
2780
2488
  function Tag(input) {
2781
2489
  var _this = _super.call(this, input) || this;
2782
- _this.seal();
2490
+ _this.$seal();
2783
2491
  return _this;
2784
2492
  }
2785
2493
  Tag.prototype.preinit = function (app, parent, tagName) {
2786
2494
  if (!tagName || typeof tagName !== "string") {
2787
- throw internalError('wrong Tag::$preinit call');
2495
+ throw (0, errors_1.internalError)('wrong Tag::$preinit call');
2788
2496
  }
2789
2497
  var node = document.createElement(tagName);
2790
2498
  var $ = this.$;
@@ -2834,13 +2542,13 @@ var Tag = /** @class */ (function (_super) {
2834
2542
  /**
2835
2543
  * Runs GC
2836
2544
  */
2837
- Tag.prototype.destroy = function () {
2545
+ Tag.prototype.$destroy = function () {
2838
2546
  this.node.remove();
2839
- _super.prototype.destroy.call(this);
2547
+ _super.prototype.$destroy.call(this);
2840
2548
  };
2841
2549
  return Tag;
2842
2550
  }(INode));
2843
-
2551
+ exports.Tag = Tag;
2844
2552
  /**
2845
2553
  * Represents a vasille extension node
2846
2554
  * @class Extension
@@ -2862,15 +2570,18 @@ var Extension = /** @class */ (function (_super) {
2862
2570
  }
2863
2571
  $.preinit(app, parent);
2864
2572
  if (!it) {
2865
- throw userError("A extension node can be encapsulated only in a tag/extension/component", "virtual-dom");
2573
+ throw (0, errors_1.userError)("A extension node can be encapsulated only in a tag/extension/component", "virtual-dom");
2866
2574
  }
2867
2575
  };
2868
- Extension.prototype.destroy = function () {
2869
- _super.prototype.destroy.call(this);
2576
+ Extension.prototype.extend = function (options) {
2577
+ this.applyOptions(options);
2578
+ };
2579
+ Extension.prototype.$destroy = function () {
2580
+ _super.prototype.$destroy.call(this);
2870
2581
  };
2871
2582
  return Extension;
2872
2583
  }(INode));
2873
-
2584
+ exports.Extension = Extension;
2874
2585
  /**
2875
2586
  * Node which cas has just a child
2876
2587
  * @class Component
@@ -2889,7 +2600,7 @@ var Component = /** @class */ (function (_super) {
2889
2600
  Component.prototype.ready = function () {
2890
2601
  _super.prototype.ready.call(this);
2891
2602
  if (this.children.size !== 1) {
2892
- throw userError("Component must have a child only", "dom-error");
2603
+ throw (0, errors_1.userError)("Component must have a child only", "dom-error");
2893
2604
  }
2894
2605
  var child = this.lastChild;
2895
2606
  if (child instanceof Tag || child instanceof Component) {
@@ -2897,7 +2608,7 @@ var Component = /** @class */ (function (_super) {
2897
2608
  $.node = child.node;
2898
2609
  }
2899
2610
  else {
2900
- throw userError("Component child must be Tag or Component", "dom-error");
2611
+ throw (0, errors_1.userError)("Component child must be Tag or Component", "dom-error");
2901
2612
  }
2902
2613
  };
2903
2614
  Component.prototype.preinit = function (app, parent) {
@@ -2905,7 +2616,7 @@ var Component = /** @class */ (function (_super) {
2905
2616
  };
2906
2617
  return Component;
2907
2618
  }(Extension));
2908
-
2619
+ exports.Component = Component;
2909
2620
  /**
2910
2621
  * Private part of switch node
2911
2622
  * @class SwitchedNodePrivate
@@ -2920,23 +2631,23 @@ var SwitchedNodePrivate = /** @class */ (function (_super) {
2920
2631
  * @type {Array<{cond : IValue<boolean>, cb : function(Fragment)}>}
2921
2632
  */
2922
2633
  _this.cases = [];
2923
- _this.seal();
2634
+ _this.$seal();
2924
2635
  return _this;
2925
2636
  }
2926
2637
  /**
2927
2638
  * Runs GC
2928
2639
  */
2929
- SwitchedNodePrivate.prototype.destroy = function () {
2640
+ SwitchedNodePrivate.prototype.$destroy = function () {
2930
2641
  this.cases.forEach(function (c) {
2931
2642
  delete c.cond;
2932
2643
  delete c.cb;
2933
2644
  });
2934
2645
  this.cases.splice(0);
2935
- _super.prototype.destroy.call(this);
2646
+ _super.prototype.$destroy.call(this);
2936
2647
  };
2937
2648
  return SwitchedNodePrivate;
2938
2649
  }(FragmentPrivate));
2939
-
2650
+ exports.SwitchedNodePrivate = SwitchedNodePrivate;
2940
2651
  /**
2941
2652
  * Defines a node witch can switch its children conditionally
2942
2653
  */
@@ -2959,7 +2670,7 @@ var SwitchedNode = /** @class */ (function (_super) {
2959
2670
  return;
2960
2671
  }
2961
2672
  if (_this.lastChild) {
2962
- _this.lastChild.destroy();
2673
+ _this.lastChild.$destroy();
2963
2674
  _this.children.clear();
2964
2675
  _this.lastChild = null;
2965
2676
  }
@@ -2971,12 +2682,12 @@ var SwitchedNode = /** @class */ (function (_super) {
2971
2682
  $.index = -1;
2972
2683
  }
2973
2684
  };
2974
- _this.seal();
2685
+ _this.$seal();
2975
2686
  return _this;
2976
2687
  }
2977
2688
  SwitchedNode.prototype.addCase = function (case_) {
2978
2689
  this.$.cases.push(case_);
2979
- case_.cond.on(this.$.sync);
2690
+ case_.cond.$on(this.$.sync);
2980
2691
  this.$.sync();
2981
2692
  };
2982
2693
  /**
@@ -2994,20 +2705,20 @@ var SwitchedNode = /** @class */ (function (_super) {
2994
2705
  SwitchedNode.prototype.ready = function () {
2995
2706
  var $ = this.$;
2996
2707
  $.cases.forEach(function (c) {
2997
- c.cond.on($.sync);
2708
+ c.cond.$on($.sync);
2998
2709
  });
2999
2710
  $.sync();
3000
2711
  };
3001
- SwitchedNode.prototype.destroy = function () {
2712
+ SwitchedNode.prototype.$destroy = function () {
3002
2713
  var $ = this.$;
3003
2714
  $.cases.forEach(function (c) {
3004
- c.cond.off($.sync);
2715
+ c.cond.$off($.sync);
3005
2716
  });
3006
- _super.prototype.destroy.call(this);
2717
+ _super.prototype.$destroy.call(this);
3007
2718
  };
3008
2719
  return SwitchedNode;
3009
2720
  }(Fragment));
3010
-
2721
+ exports.SwitchedNode = SwitchedNode;
3011
2722
  /**
3012
2723
  * The private part of a text node
3013
2724
  */
@@ -3015,7 +2726,7 @@ var DebugPrivate = /** @class */ (function (_super) {
3015
2726
  __extends(DebugPrivate, _super);
3016
2727
  function DebugPrivate() {
3017
2728
  var _this = this; _super.call(this);
3018
- _this.seal();
2729
+ _this.$seal();
3019
2730
  return _this;
3020
2731
  }
3021
2732
  /**
@@ -3028,7 +2739,7 @@ var DebugPrivate = /** @class */ (function (_super) {
3028
2739
  var _this = this;
3029
2740
  _super.prototype.preinit.call(this, app, parent);
3030
2741
  this.node = document.createComment(text.$);
3031
- this.bindings.add(new Expression(function (v) {
2742
+ this.bindings.add(new expression_1.Expression(function (v) {
3032
2743
  _this.node.replaceData(0, -1, v);
3033
2744
  }, true, text));
3034
2745
  this.parent.appendNode(this.node);
@@ -3036,13 +2747,13 @@ var DebugPrivate = /** @class */ (function (_super) {
3036
2747
  /**
3037
2748
  * Clear node data
3038
2749
  */
3039
- DebugPrivate.prototype.destroy = function () {
2750
+ DebugPrivate.prototype.$destroy = function () {
3040
2751
  this.node.remove();
3041
- _super.prototype.destroy.call(this);
2752
+ _super.prototype.$destroy.call(this);
3042
2753
  };
3043
2754
  return DebugPrivate;
3044
2755
  }(FragmentPrivate));
3045
-
2756
+ exports.DebugPrivate = DebugPrivate;
3046
2757
  /**
3047
2758
  * Represents a debug node
3048
2759
  * @class DebugNode
@@ -3057,42 +2768,48 @@ var DebugNode = /** @class */ (function (_super) {
3057
2768
  * @type {DebugNode}
3058
2769
  */
3059
2770
  _this.$ = new DebugPrivate();
3060
- _this.seal();
2771
+ _this.$seal();
3061
2772
  return _this;
3062
2773
  }
3063
2774
  DebugNode.prototype.preinit = function (app, parent, text) {
3064
2775
  var $ = this.$;
3065
2776
  if (!text) {
3066
- throw internalError('wrong DebugNode::$preninit call');
2777
+ throw (0, errors_1.internalError)('wrong DebugNode::$preninit call');
3067
2778
  }
3068
2779
  $.preinitComment(app, parent, text);
3069
2780
  };
3070
2781
  /**
3071
2782
  * Runs garbage collector
3072
2783
  */
3073
- DebugNode.prototype.destroy = function () {
3074
- this.$.destroy();
3075
- _super.prototype.destroy.call(this);
2784
+ DebugNode.prototype.$destroy = function () {
2785
+ this.$.$destroy();
2786
+ _super.prototype.$destroy.call(this);
3076
2787
  };
3077
2788
  return DebugNode;
3078
2789
  }(Fragment));
2790
+ exports.DebugNode = DebugNode;
3079
2791
 
3080
2792
 
3081
- window.FragmentPrivate = FragmentPrivate;
3082
- window.Fragment = Fragment;
3083
- window.TextNodePrivate = TextNodePrivate;
3084
- window.TextNode = TextNode;
3085
- window.INodePrivate = INodePrivate;
3086
- window.INode = INode;
3087
- window.Tag = Tag;
3088
- window.Extension = Extension;
3089
- window.Component = Component;
3090
- window.SwitchedNodePrivate = SwitchedNodePrivate;
3091
- window.SwitchedNode = SwitchedNode;
3092
- window.DebugPrivate = DebugPrivate;
3093
- window.DebugNode = DebugNode;
3094
-
3095
2793
  // ./lib-es5/node/app.js
2794
+ "use strict";
2795
+ var __extends = (this && this.__extends) || (function () {
2796
+ var extendStatics = function (d, b) {
2797
+ extendStatics = Object.setPrototypeOf ||
2798
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2799
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2800
+ return extendStatics(d, b);
2801
+ };
2802
+ return function (d, b) {
2803
+ if (typeof b !== "function" && b !== null)
2804
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2805
+ extendStatics(d, b);
2806
+ function __() { this.constructor = d; }
2807
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2808
+ };
2809
+ })();
2810
+ Object.defineProperty(exports, "__esModule", { value: true });
2811
+ exports.Portal = exports.App = exports.AppNode = void 0;
2812
+ var node_1 = require("./node");
3096
2813
  /**
3097
2814
  * Application Node
3098
2815
  * @class AppNode
@@ -3106,12 +2823,12 @@ var AppNode = /** @class */ (function (_super) {
3106
2823
  function AppNode(input) {
3107
2824
  var _this = _super.call(this, input) || this;
3108
2825
  _this.debugUi = input.debugUi || false;
3109
- _this.seal();
2826
+ _this.$seal();
3110
2827
  return _this;
3111
2828
  }
3112
2829
  return AppNode;
3113
- }(INode));
3114
-
2830
+ }(node_1.INode));
2831
+ exports.AppNode = AppNode;
3115
2832
  /**
3116
2833
  * Represents a Vasille.js application
3117
2834
  * @class App
@@ -3129,7 +2846,7 @@ var App = /** @class */ (function (_super) {
3129
2846
  _this.$.node = node;
3130
2847
  _this.preinit(_this, _this);
3131
2848
  _this.init();
3132
- _this.seal();
2849
+ _this.$seal();
3133
2850
  return _this;
3134
2851
  }
3135
2852
  App.prototype.appendNode = function (node) {
@@ -3137,13 +2854,13 @@ var App = /** @class */ (function (_super) {
3137
2854
  };
3138
2855
  return App;
3139
2856
  }(AppNode));
3140
-
2857
+ exports.App = App;
3141
2858
  var Portal = /** @class */ (function (_super) {
3142
2859
  __extends(Portal, _super);
3143
2860
  function Portal(input) {
3144
2861
  var _this = _super.call(this, input) || this;
3145
2862
  _this.$.node = input.node;
3146
- _this.seal();
2863
+ _this.$seal();
3147
2864
  return _this;
3148
2865
  }
3149
2866
  Portal.prototype.appendNode = function (node) {
@@ -3151,106 +2868,29 @@ var Portal = /** @class */ (function (_super) {
3151
2868
  };
3152
2869
  return Portal;
3153
2870
  }(AppNode));
2871
+ exports.Portal = Portal;
3154
2872
 
3155
2873
 
3156
- window.AppNode = AppNode;
3157
- window.App = App;
3158
- window.Portal = Portal;
3159
-
3160
- // ./lib-es5/node/interceptor.js
3161
- /**
3162
- * Interceptor is designed to connect signals & methods of children elements
3163
- * @class Interceptor
3164
- * @extends Destroyable
3165
- */
3166
- var Interceptor = /** @class */ (function (_super) {
3167
- __extends(Interceptor, _super);
3168
- function Interceptor() {
3169
- var _this = _super !== null && _super.apply(this, arguments) || this;
3170
- /**
3171
- * Set of signals
3172
- * @type Set
3173
- */
3174
- _this.signals = new Set;
3175
- /**
3176
- * Set of handlers
3177
- * @type Set
3178
- */
3179
- _this.handlers = new Set;
3180
- return _this;
3181
- }
3182
- /**
3183
- * Connect a signal or a handler
3184
- * @param thing {Signal | function}
3185
- */
3186
- Interceptor.prototype.connect = function (thing) {
3187
- // interceptor will connect signals and handlers together
3188
- if (thing instanceof Signal) {
3189
- this.handlers.forEach(function (handler) {
3190
- thing.subscribe(handler);
3191
- });
3192
- this.signals.add(thing);
3193
- }
3194
- else {
3195
- this.signals.forEach(function (signal) {
3196
- signal.subscribe(thing);
3197
- });
3198
- this.handlers.add(thing);
3199
- }
3200
- };
3201
- /**
3202
- * Disconnect a handler from signals
3203
- * @param handler {function}
3204
- */
3205
- Interceptor.prototype.disconnect = function (handler) {
3206
- this.signals.forEach(function (signal) {
3207
- signal.unsubscribe(handler);
3208
- });
3209
- };
3210
- Interceptor.prototype.destroy = function () {
3211
- var _this = this;
3212
- _super.prototype.destroy.call(this);
3213
- this.signals.forEach(function (signal) {
3214
- _this.handlers.forEach(function (handler) {
3215
- signal.unsubscribe(handler);
3216
- });
3217
- });
3218
- };
3219
- return Interceptor;
3220
- }(Destroyable));
3221
-
3222
- /**
3223
- * Interceptor node to implement directly to vasille DOM
3224
- * @class InterceptorNode
3225
- * @extends Extension
3226
- */
3227
- var InterceptorNode = /** @class */ (function (_super) {
3228
- __extends(InterceptorNode, _super);
3229
- function InterceptorNode() {
3230
- var _this = _super !== null && _super.apply(this, arguments) || this;
3231
- /**
3232
- * Internal interceptor
3233
- * @type Interceptor
3234
- */
3235
- _this.interceptor = new Interceptor;
3236
- /**
3237
- * The default slot of node
3238
- * @type Slot
3239
- */
3240
- _this.slot = new Slot;
3241
- return _this;
3242
- }
3243
- InterceptorNode.prototype.compose = function () {
3244
- this.slot.release(this, this.interceptor);
3245
- };
3246
- return InterceptorNode;
3247
- }(Fragment));
3248
-
3249
-
3250
- window.Interceptor = Interceptor;
3251
- window.InterceptorNode = InterceptorNode;
3252
-
3253
2874
  // ./lib-es5/binding/attribute.js
2875
+ "use strict";
2876
+ var __extends = (this && this.__extends) || (function () {
2877
+ var extendStatics = function (d, b) {
2878
+ extendStatics = Object.setPrototypeOf ||
2879
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2880
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2881
+ return extendStatics(d, b);
2882
+ };
2883
+ return function (d, b) {
2884
+ if (typeof b !== "function" && b !== null)
2885
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2886
+ extendStatics(d, b);
2887
+ function __() { this.constructor = d; }
2888
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2889
+ };
2890
+ })();
2891
+ Object.defineProperty(exports, "__esModule", { value: true });
2892
+ exports.AttributeBinding = void 0;
2893
+ var binding_1 = require("./binding");
3254
2894
  /**
3255
2895
  * Represents an Attribute binding description
3256
2896
  * @class AttributeBinding
@@ -3279,16 +2919,34 @@ var AttributeBinding = /** @class */ (function (_super) {
3279
2919
  node.node.removeAttribute(name);
3280
2920
  }
3281
2921
  });
3282
- _this.seal();
2922
+ _this.$seal();
3283
2923
  return _this;
3284
2924
  }
3285
2925
  return AttributeBinding;
3286
- }(Binding));
2926
+ }(binding_1.Binding));
2927
+ exports.AttributeBinding = AttributeBinding;
3287
2928
 
3288
2929
 
3289
- window.AttributeBinding = AttributeBinding;
3290
-
3291
2930
  // ./lib-es5/binding/style.js
2931
+ "use strict";
2932
+ var __extends = (this && this.__extends) || (function () {
2933
+ var extendStatics = function (d, b) {
2934
+ extendStatics = Object.setPrototypeOf ||
2935
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2936
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2937
+ return extendStatics(d, b);
2938
+ };
2939
+ return function (d, b) {
2940
+ if (typeof b !== "function" && b !== null)
2941
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2942
+ extendStatics(d, b);
2943
+ function __() { this.constructor = d; }
2944
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2945
+ };
2946
+ })();
2947
+ Object.defineProperty(exports, "__esModule", { value: true });
2948
+ exports.StyleBinding = void 0;
2949
+ var binding_1 = require("./binding");
3292
2950
  /**
3293
2951
  * Describes a style attribute binding
3294
2952
  * @class StyleBinding
@@ -3309,16 +2967,34 @@ var StyleBinding = /** @class */ (function (_super) {
3309
2967
  node.node.style.setProperty(name, value);
3310
2968
  }
3311
2969
  });
3312
- _this.seal();
2970
+ _this.$seal();
3313
2971
  return _this;
3314
2972
  }
3315
2973
  return StyleBinding;
3316
- }(Binding));
2974
+ }(binding_1.Binding));
2975
+ exports.StyleBinding = StyleBinding;
3317
2976
 
3318
2977
 
3319
- window.StyleBinding = StyleBinding;
3320
-
3321
2978
  // ./lib-es5/binding/class.js
2979
+ "use strict";
2980
+ var __extends = (this && this.__extends) || (function () {
2981
+ var extendStatics = function (d, b) {
2982
+ extendStatics = Object.setPrototypeOf ||
2983
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2984
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2985
+ return extendStatics(d, b);
2986
+ };
2987
+ return function (d, b) {
2988
+ if (typeof b !== "function" && b !== null)
2989
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2990
+ extendStatics(d, b);
2991
+ function __() { this.constructor = d; }
2992
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2993
+ };
2994
+ })();
2995
+ Object.defineProperty(exports, "__esModule", { value: true });
2996
+ exports.DynamicalClassBinding = exports.StaticClassBinding = void 0;
2997
+ var binding_1 = require("./binding");
3322
2998
  function addClass(node, cl) {
3323
2999
  node.node.classList.add(cl);
3324
3000
  }
@@ -3341,12 +3017,12 @@ var StaticClassBinding = /** @class */ (function (_super) {
3341
3017
  _this.current = value;
3342
3018
  }
3343
3019
  });
3344
- _this.seal();
3020
+ _this.$seal();
3345
3021
  return _this;
3346
3022
  }
3347
3023
  return StaticClassBinding;
3348
- }(Binding));
3349
-
3024
+ }(binding_1.Binding));
3025
+ exports.StaticClassBinding = StaticClassBinding;
3350
3026
  var DynamicalClassBinding = /** @class */ (function (_super) {
3351
3027
  __extends(DynamicalClassBinding, _super);
3352
3028
  function DynamicalClassBinding(node, value) {
@@ -3363,17 +3039,34 @@ var DynamicalClassBinding = /** @class */ (function (_super) {
3363
3039
  _this.current = value;
3364
3040
  }
3365
3041
  });
3366
- _this.seal();
3042
+ _this.$seal();
3367
3043
  return _this;
3368
3044
  }
3369
3045
  return DynamicalClassBinding;
3370
- }(Binding));
3046
+ }(binding_1.Binding));
3047
+ exports.DynamicalClassBinding = DynamicalClassBinding;
3371
3048
 
3372
3049
 
3373
- window.StaticClassBinding = StaticClassBinding;
3374
- window.DynamicalClassBinding = DynamicalClassBinding;
3375
-
3376
3050
  // ./lib-es5/views/repeat-node.js
3051
+ "use strict";
3052
+ var __extends = (this && this.__extends) || (function () {
3053
+ var extendStatics = function (d, b) {
3054
+ extendStatics = Object.setPrototypeOf ||
3055
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3056
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3057
+ return extendStatics(d, b);
3058
+ };
3059
+ return function (d, b) {
3060
+ if (typeof b !== "function" && b !== null)
3061
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3062
+ extendStatics(d, b);
3063
+ function __() { this.constructor = d; }
3064
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3065
+ };
3066
+ })();
3067
+ Object.defineProperty(exports, "__esModule", { value: true });
3068
+ exports.RepeatNode = exports.RepeatNodePrivate = void 0;
3069
+ var node_1 = require("../node/node");
3377
3070
  /**
3378
3071
  * Private part of repeat node
3379
3072
  * @class RepeatNodePrivate
@@ -3388,16 +3081,16 @@ var RepeatNodePrivate = /** @class */ (function (_super) {
3388
3081
  * @type {Map}
3389
3082
  */
3390
3083
  _this.nodes = new Map();
3391
- _this.seal();
3084
+ _this.$seal();
3392
3085
  return _this;
3393
3086
  }
3394
- RepeatNodePrivate.prototype.destroy = function () {
3087
+ RepeatNodePrivate.prototype.$destroy = function () {
3395
3088
  this.nodes.clear();
3396
- _super.prototype.destroy.call(this);
3089
+ _super.prototype.$destroy.call(this);
3397
3090
  };
3398
3091
  return RepeatNodePrivate;
3399
- }(INodePrivate));
3400
-
3092
+ }(node_1.INodePrivate));
3093
+ exports.RepeatNodePrivate = RepeatNodePrivate;
3401
3094
  /**
3402
3095
  * Repeat node repeats its children
3403
3096
  * @class RepeatNode
@@ -3414,7 +3107,7 @@ var RepeatNode = /** @class */ (function (_super) {
3414
3107
  return _this;
3415
3108
  }
3416
3109
  RepeatNode.prototype.createChild = function (opts, id, item, before) {
3417
- var node = new Fragment({});
3110
+ var node = new node_1.Fragment({});
3418
3111
  this.destroyChild(id, item);
3419
3112
  if (before) {
3420
3113
  this.children.add(node);
@@ -3439,93 +3132,36 @@ var RepeatNode = /** @class */ (function (_super) {
3439
3132
  var child = $.nodes.get(id);
3440
3133
  if (child) {
3441
3134
  child.remove();
3442
- child.destroy();
3135
+ child.$destroy();
3443
3136
  this.$.nodes.delete(id);
3444
3137
  this.children.delete(child);
3445
3138
  }
3446
3139
  };
3447
3140
  return RepeatNode;
3448
- }(Fragment));
3141
+ }(node_1.Fragment));
3142
+ exports.RepeatNode = RepeatNode;
3449
3143
 
3450
3144
 
3451
- window.RepeatNodePrivate = RepeatNodePrivate;
3452
- window.RepeatNode = RepeatNode;
3453
-
3454
- // ./lib-es5/views/repeater.js
3455
- /**
3456
- * Private part of repeater
3457
- * @class RepeaterPrivate
3458
- * @extends RepeatNodePrivate
3459
- */
3460
- var RepeaterPrivate = /** @class */ (function (_super) {
3461
- __extends(RepeaterPrivate, _super);
3462
- function RepeaterPrivate() {
3463
- var _this = this; _super.call(this);
3464
- /**
3465
- * Current count of child nodes
3466
- */
3467
- _this.currentCount = 0;
3468
- _this.seal();
3469
- return _this;
3470
- }
3471
- return RepeaterPrivate;
3472
- }(RepeatNodePrivate));
3473
-
3474
- /**
3475
- * The simplest repeat node interpretation, repeat children pack a several times
3476
- * @class Repeater
3477
- * @extends RepeatNode
3478
- */
3479
- var Repeater = /** @class */ (function (_super) {
3480
- __extends(Repeater, _super);
3481
- function Repeater($) {
3482
- var _this = _super.call(this, $ || new RepeaterPrivate) || this;
3483
- /**
3484
- * The count of children
3485
- */
3486
- _this.count = new Reference(0);
3487
- _this.seal();
3488
- return _this;
3489
- }
3490
- /**
3491
- * Changes the children count
3492
- */
3493
- Repeater.prototype.changeCount = function (number) {
3494
- var $ = this.$;
3495
- if (number > $.currentCount) {
3496
- for (var i = $.currentCount; i < number; i++) {
3497
- this.createChild(i, i);
3498
- }
3499
- }
3500
- else {
3501
- for (var i = $.currentCount - 1; i >= number; i--) {
3502
- this.destroyChild(i, i);
3503
- }
3504
- }
3505
- $.currentCount = number;
3506
- };
3507
- Repeater.prototype.created = function () {
3508
- var $ = this.$;
3509
- _super.prototype.created.call(this);
3510
- $.updateHandler = this.changeCount.bind(this);
3511
- this.count.on($.updateHandler);
3512
- };
3513
- Repeater.prototype.ready = function () {
3514
- this.changeCount(this.count.$);
3515
- };
3516
- Repeater.prototype.destroy = function () {
3517
- var $ = this.$;
3518
- _super.prototype.destroy.call(this);
3519
- this.count.off($.updateHandler);
3520
- };
3521
- return Repeater;
3522
- }(RepeatNode));
3523
-
3524
-
3525
- window.RepeaterPrivate = RepeaterPrivate;
3526
- window.Repeater = Repeater;
3527
-
3528
3145
  // ./lib-es5/views/base-view.js
3146
+ "use strict";
3147
+ var __extends = (this && this.__extends) || (function () {
3148
+ var extendStatics = function (d, b) {
3149
+ extendStatics = Object.setPrototypeOf ||
3150
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3151
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3152
+ return extendStatics(d, b);
3153
+ };
3154
+ return function (d, b) {
3155
+ if (typeof b !== "function" && b !== null)
3156
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3157
+ extendStatics(d, b);
3158
+ function __() { this.constructor = d; }
3159
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3160
+ };
3161
+ })();
3162
+ Object.defineProperty(exports, "__esModule", { value: true });
3163
+ exports.BaseView = exports.BaseViewPrivate = void 0;
3164
+ var repeat_node_1 = require("./repeat-node");
3529
3165
  /**
3530
3166
  * Private part of BaseView
3531
3167
  * @class BaseViewPrivate
@@ -3535,12 +3171,12 @@ var BaseViewPrivate = /** @class */ (function (_super) {
3535
3171
  __extends(BaseViewPrivate, _super);
3536
3172
  function BaseViewPrivate() {
3537
3173
  var _this = this; _super.call(this);
3538
- _this.seal();
3174
+ _this.$seal();
3539
3175
  return _this;
3540
3176
  }
3541
3177
  return BaseViewPrivate;
3542
- }(RepeatNodePrivate));
3543
-
3178
+ }(repeat_node_1.RepeatNodePrivate));
3179
+ exports.BaseViewPrivate = BaseViewPrivate;
3544
3180
  /**
3545
3181
  * Base class of default views
3546
3182
  * @class BaseView
@@ -3569,13 +3205,30 @@ var BaseView = /** @class */ (function (_super) {
3569
3205
  });
3570
3206
  };
3571
3207
  return BaseView;
3572
- }(RepeatNode));
3573
-
3208
+ }(repeat_node_1.RepeatNode));
3209
+ exports.BaseView = BaseView;
3574
3210
 
3575
- window.BaseViewPrivate = BaseViewPrivate;
3576
- window.BaseView = BaseView;
3577
3211
 
3578
3212
  // ./lib-es5/views/array-view.js
3213
+ "use strict";
3214
+ var __extends = (this && this.__extends) || (function () {
3215
+ var extendStatics = function (d, b) {
3216
+ extendStatics = Object.setPrototypeOf ||
3217
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3218
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3219
+ return extendStatics(d, b);
3220
+ };
3221
+ return function (d, b) {
3222
+ if (typeof b !== "function" && b !== null)
3223
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3224
+ extendStatics(d, b);
3225
+ function __() { this.constructor = d; }
3226
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3227
+ };
3228
+ })();
3229
+ Object.defineProperty(exports, "__esModule", { value: true });
3230
+ exports.ArrayView = void 0;
3231
+ var base_view_1 = require("./base-view");
3579
3232
  /**
3580
3233
  * Represents a view of an array model
3581
3234
  * @class ArrayView
@@ -3597,12 +3250,30 @@ var ArrayView = /** @class */ (function (_super) {
3597
3250
  });
3598
3251
  };
3599
3252
  return ArrayView;
3600
- }(BaseView));
3601
-
3253
+ }(base_view_1.BaseView));
3254
+ exports.ArrayView = ArrayView;
3602
3255
 
3603
- window.ArrayView = ArrayView;
3604
3256
 
3605
3257
  // ./lib-es5/node/watch.js
3258
+ "use strict";
3259
+ var __extends = (this && this.__extends) || (function () {
3260
+ var extendStatics = function (d, b) {
3261
+ extendStatics = Object.setPrototypeOf ||
3262
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3263
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3264
+ return extendStatics(d, b);
3265
+ };
3266
+ return function (d, b) {
3267
+ if (typeof b !== "function" && b !== null)
3268
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3269
+ extendStatics(d, b);
3270
+ function __() { this.constructor = d; }
3271
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3272
+ };
3273
+ })();
3274
+ Object.defineProperty(exports, "__esModule", { value: true });
3275
+ exports.Watch = void 0;
3276
+ var node_1 = require("./node");
3606
3277
  /**
3607
3278
  * Watch Node
3608
3279
  * @class Watch
@@ -3617,7 +3288,7 @@ var Watch = /** @class */ (function (_super) {
3617
3288
  var _this = this;
3618
3289
  this.watch(function (value) {
3619
3290
  _this.children.forEach(function (child) {
3620
- child.destroy();
3291
+ child.$destroy();
3621
3292
  });
3622
3293
  _this.children.clear();
3623
3294
  _this.lastChild = null;
@@ -3626,12 +3297,30 @@ var Watch = /** @class */ (function (_super) {
3626
3297
  input.slot(this, input.model.$);
3627
3298
  };
3628
3299
  return Watch;
3629
- }(Fragment));
3300
+ }(node_1.Fragment));
3301
+ exports.Watch = Watch;
3630
3302
 
3631
3303
 
3632
- window.Watch = Watch;
3633
-
3634
3304
  // ./lib-es5/views/object-view.js
3305
+ "use strict";
3306
+ var __extends = (this && this.__extends) || (function () {
3307
+ var extendStatics = function (d, b) {
3308
+ extendStatics = Object.setPrototypeOf ||
3309
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3310
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3311
+ return extendStatics(d, b);
3312
+ };
3313
+ return function (d, b) {
3314
+ if (typeof b !== "function" && b !== null)
3315
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3316
+ extendStatics(d, b);
3317
+ function __() { this.constructor = d; }
3318
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3319
+ };
3320
+ })();
3321
+ Object.defineProperty(exports, "__esModule", { value: true });
3322
+ exports.ObjectView = void 0;
3323
+ var base_view_1 = require("./base-view");
3635
3324
  /**
3636
3325
  * Create a children pack for each object field
3637
3326
  * @class ObjectView
@@ -3644,19 +3333,37 @@ var ObjectView = /** @class */ (function (_super) {
3644
3333
  }
3645
3334
  ObjectView.prototype.compose = function (input) {
3646
3335
  _super.prototype.compose.call(this, input);
3647
- var obj = input.model.proxy();
3336
+ var obj = input.model.values;
3648
3337
  for (var key in obj) {
3649
3338
  this.createChild(input, key, obj[key]);
3650
3339
  }
3651
3340
  _super.prototype.ready.call(this);
3652
3341
  };
3653
3342
  return ObjectView;
3654
- }(BaseView));
3655
-
3343
+ }(base_view_1.BaseView));
3344
+ exports.ObjectView = ObjectView;
3656
3345
 
3657
- window.ObjectView = ObjectView;
3658
3346
 
3659
3347
  // ./lib-es5/views/map-view.js
3348
+ "use strict";
3349
+ var __extends = (this && this.__extends) || (function () {
3350
+ var extendStatics = function (d, b) {
3351
+ extendStatics = Object.setPrototypeOf ||
3352
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3353
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3354
+ return extendStatics(d, b);
3355
+ };
3356
+ return function (d, b) {
3357
+ if (typeof b !== "function" && b !== null)
3358
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3359
+ extendStatics(d, b);
3360
+ function __() { this.constructor = d; }
3361
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3362
+ };
3363
+ })();
3364
+ Object.defineProperty(exports, "__esModule", { value: true });
3365
+ exports.MapView = void 0;
3366
+ var base_view_1 = require("./base-view");
3660
3367
  /**
3661
3368
  * Create a children pack for each map value
3662
3369
  * @class MapView
@@ -3675,12 +3382,30 @@ var MapView = /** @class */ (function (_super) {
3675
3382
  });
3676
3383
  };
3677
3384
  return MapView;
3678
- }(BaseView));
3679
-
3385
+ }(base_view_1.BaseView));
3386
+ exports.MapView = MapView;
3680
3387
 
3681
- window.MapView = MapView;
3682
3388
 
3683
3389
  // ./lib-es5/views/set-view.js
3390
+ "use strict";
3391
+ var __extends = (this && this.__extends) || (function () {
3392
+ var extendStatics = function (d, b) {
3393
+ extendStatics = Object.setPrototypeOf ||
3394
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3395
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3396
+ return extendStatics(d, b);
3397
+ };
3398
+ return function (d, b) {
3399
+ if (typeof b !== "function" && b !== null)
3400
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3401
+ extendStatics(d, b);
3402
+ function __() { this.constructor = d; }
3403
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3404
+ };
3405
+ })();
3406
+ Object.defineProperty(exports, "__esModule", { value: true });
3407
+ exports.SetView = void 0;
3408
+ var base_view_1 = require("./base-view");
3684
3409
  /**
3685
3410
  * Create a children pack for each set value
3686
3411
  * @class SetView
@@ -3700,9 +3425,13 @@ var SetView = /** @class */ (function (_super) {
3700
3425
  });
3701
3426
  };
3702
3427
  return SetView;
3703
- }(BaseView));
3428
+ }(base_view_1.BaseView));
3429
+ exports.SetView = SetView;
3430
+
3704
3431
 
3432
+ // ./lib-es5/functional/options.js
3433
+ "use strict";
3434
+ Object.defineProperty(exports, "__esModule", { value: true });
3705
3435
 
3706
- window.SetView = SetView;
3707
3436
 
3708
3437
  })();