vsn 0.1.22 → 0.1.26

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 (146) hide show
  1. package/demo/demo.html +16 -7
  2. package/demo/vsn.js +1 -0
  3. package/dist/AST.d.ts +2 -1
  4. package/dist/Controller.d.ts +9 -4
  5. package/dist/Model.d.ts +0 -0
  6. package/dist/attributes/Radio.d.ts +2 -0
  7. package/dist/attributes/StyleAttribute.d.ts +1 -0
  8. package/dist/{Vision.d.ts → vsn.d.ts} +1 -0
  9. package/dist/vsn.min.js +1 -0
  10. package/package.json +8 -8
  11. package/src/AST.ts +94 -3
  12. package/src/Controller.ts +15 -6
  13. package/src/DOM.ts +1 -1
  14. package/src/Model.ts +0 -0
  15. package/src/Registry.ts +0 -2
  16. package/src/Scope.ts +7 -2
  17. package/src/Tag.ts +10 -7
  18. package/src/attributes/ClickRemoveClass.ts +2 -0
  19. package/src/attributes/ClickToggleClass.ts +2 -0
  20. package/src/attributes/Exec.ts +2 -0
  21. package/src/attributes/Format.ts +1 -0
  22. package/src/attributes/If.ts +4 -0
  23. package/src/attributes/JSONAttribute.ts +1 -0
  24. package/src/attributes/KeyAbstract.ts +2 -1
  25. package/src/attributes/KeyDown.ts +1 -0
  26. package/src/attributes/KeyUp.ts +1 -0
  27. package/src/attributes/List.ts +3 -0
  28. package/src/attributes/ListItem.ts +1 -0
  29. package/src/attributes/On.ts +4 -0
  30. package/src/attributes/Radio.ts +17 -2
  31. package/src/attributes/RootAttribute.ts +1 -0
  32. package/src/attributes/ScopeChange.ts +2 -0
  33. package/src/attributes/SetAttribute.ts +1 -0
  34. package/src/attributes/StandardAttribute.ts +3 -0
  35. package/src/attributes/StyleAttribute.ts +1 -0
  36. package/src/attributes/TypeAttribute.ts +1 -0
  37. package/src/{Vision.ts → vsn.ts} +1 -0
  38. package/test/DOM.spec.ts +1 -1
  39. package/test/attributes/JSONAttribute.spec.ts +1 -1
  40. package/webpack.config.js +2 -2
  41. package/demo/vision.js +0 -1
  42. package/dist/AST.js +0 -2107
  43. package/dist/AST.js.map +0 -1
  44. package/dist/Attribute.js +0 -187
  45. package/dist/Attribute.js.map +0 -1
  46. package/dist/Bencmark.js +0 -179
  47. package/dist/Bencmark.js.map +0 -1
  48. package/dist/Configuration.js +0 -64
  49. package/dist/Configuration.js.map +0 -1
  50. package/dist/Controller.js +0 -39
  51. package/dist/Controller.js.map +0 -1
  52. package/dist/DOM/DOMObject.js +0 -47
  53. package/dist/DOM/DOMObject.js.map +0 -1
  54. package/dist/DOM/WrappedDocument.js +0 -34
  55. package/dist/DOM/WrappedDocument.js.map +0 -1
  56. package/dist/DOM/WrappedWindow.js +0 -45
  57. package/dist/DOM/WrappedWindow.js.map +0 -1
  58. package/dist/DOM.js +0 -547
  59. package/dist/DOM.js.map +0 -1
  60. package/dist/Formats.js +0 -44
  61. package/dist/Formats.js.map +0 -1
  62. package/dist/Query.js +0 -66
  63. package/dist/Query.js.map +0 -1
  64. package/dist/Registry.js +0 -138
  65. package/dist/Registry.js.map +0 -1
  66. package/dist/Scope.js +0 -512
  67. package/dist/Scope.js.map +0 -1
  68. package/dist/Tag/List.js +0 -85
  69. package/dist/Tag/List.js.map +0 -1
  70. package/dist/Tag.js +0 -764
  71. package/dist/Tag.js.map +0 -1
  72. package/dist/Types.js +0 -48
  73. package/dist/Types.js.map +0 -1
  74. package/dist/Vision.js +0 -162
  75. package/dist/Vision.js.map +0 -1
  76. package/dist/attributes/AddClassIf.js +0 -93
  77. package/dist/attributes/AddClassIf.js.map +0 -1
  78. package/dist/attributes/Bind.js +0 -272
  79. package/dist/attributes/Bind.js.map +0 -1
  80. package/dist/attributes/ClassConstructor.js +0 -104
  81. package/dist/attributes/ClassConstructor.js.map +0 -1
  82. package/dist/attributes/ClickRemoveClass.js +0 -102
  83. package/dist/attributes/ClickRemoveClass.js.map +0 -1
  84. package/dist/attributes/ClickToggleClass.js +0 -102
  85. package/dist/attributes/ClickToggleClass.js.map +0 -1
  86. package/dist/attributes/ControllerAttribute.js +0 -28
  87. package/dist/attributes/ControllerAttribute.js.map +0 -1
  88. package/dist/attributes/DisableIf.js +0 -94
  89. package/dist/attributes/DisableIf.js.map +0 -1
  90. package/dist/attributes/Exec.js +0 -102
  91. package/dist/attributes/Exec.js.map +0 -1
  92. package/dist/attributes/Format.js +0 -96
  93. package/dist/attributes/Format.js.map +0 -1
  94. package/dist/attributes/If.js +0 -147
  95. package/dist/attributes/If.js.map +0 -1
  96. package/dist/attributes/JSONAttribute.js +0 -115
  97. package/dist/attributes/JSONAttribute.js.map +0 -1
  98. package/dist/attributes/KeyAbstract.js +0 -110
  99. package/dist/attributes/KeyAbstract.js.map +0 -1
  100. package/dist/attributes/KeyDown.js +0 -82
  101. package/dist/attributes/KeyDown.js.map +0 -1
  102. package/dist/attributes/KeyUp.js +0 -82
  103. package/dist/attributes/KeyUp.js.map +0 -1
  104. package/dist/attributes/List.js +0 -273
  105. package/dist/attributes/List.js.map +0 -1
  106. package/dist/attributes/ListItem.js +0 -135
  107. package/dist/attributes/ListItem.js.map +0 -1
  108. package/dist/attributes/ListItemModel.js +0 -39
  109. package/dist/attributes/ListItemModel.js.map +0 -1
  110. package/dist/attributes/ModelAttribute.js +0 -29
  111. package/dist/attributes/ModelAttribute.js.map +0 -1
  112. package/dist/attributes/Name.js +0 -88
  113. package/dist/attributes/Name.js.map +0 -1
  114. package/dist/attributes/On.js +0 -123
  115. package/dist/attributes/On.js.map +0 -1
  116. package/dist/attributes/Radio.js +0 -127
  117. package/dist/attributes/Radio.js.map +0 -1
  118. package/dist/attributes/Referenced.js +0 -38
  119. package/dist/attributes/Referenced.js.map +0 -1
  120. package/dist/attributes/RootAttribute.js +0 -85
  121. package/dist/attributes/RootAttribute.js.map +0 -1
  122. package/dist/attributes/ScopeAttribute.js +0 -40
  123. package/dist/attributes/ScopeAttribute.js.map +0 -1
  124. package/dist/attributes/ScopeChange.js +0 -124
  125. package/dist/attributes/ScopeChange.js.map +0 -1
  126. package/dist/attributes/SetAttribute.js +0 -130
  127. package/dist/attributes/SetAttribute.js.map +0 -1
  128. package/dist/attributes/StandardAttribute.js +0 -168
  129. package/dist/attributes/StandardAttribute.js.map +0 -1
  130. package/dist/attributes/StyleAttribute.js +0 -182
  131. package/dist/attributes/StyleAttribute.js.map +0 -1
  132. package/dist/attributes/Template.js +0 -39
  133. package/dist/attributes/Template.js.map +0 -1
  134. package/dist/attributes/TypeAttribute.js +0 -101
  135. package/dist/attributes/TypeAttribute.js.map +0 -1
  136. package/dist/attributes/_imports.js +0 -60
  137. package/dist/attributes/_imports.js.map +0 -1
  138. package/dist/helpers/DOMHelper.js +0 -81
  139. package/dist/helpers/DOMHelper.js.map +0 -1
  140. package/dist/helpers/ElementHelper.js +0 -25
  141. package/dist/helpers/ElementHelper.js.map +0 -1
  142. package/dist/helpers/VisionHelper.js +0 -71
  143. package/dist/helpers/VisionHelper.js.map +0 -1
  144. package/dist/helpers/decorators.js +0 -38
  145. package/dist/helpers/decorators.js.map +0 -1
  146. package/main.py +0 -16
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.DOMObject = void 0;
19
- var simple_ts_event_dispatcher_1 = require("simple-ts-event-dispatcher");
20
- var DOMObject = /** @class */ (function (_super) {
21
- __extends(DOMObject, _super);
22
- function DOMObject(element, props) {
23
- var _this = _super.call(this) || this;
24
- _this.element = element;
25
- _this._uniqueScope = false;
26
- return _this;
27
- }
28
- Object.defineProperty(DOMObject.prototype, "scope", {
29
- get: function () {
30
- if (!!this._scope)
31
- return this._scope;
32
- return null;
33
- },
34
- set: function (scope) {
35
- this._scope = scope;
36
- },
37
- enumerable: false,
38
- configurable: true
39
- });
40
- DOMObject.prototype.watchAttribute = function (attr) {
41
- };
42
- DOMObject.prototype.watchStyle = function (style) {
43
- };
44
- return DOMObject;
45
- }(simple_ts_event_dispatcher_1.EventDispatcher));
46
- exports.DOMObject = DOMObject;
47
- //# sourceMappingURL=DOMObject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DOMObject.js","sourceRoot":"","sources":["../../src/DOM/DOMObject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yEAA2D;AAG3D;IAAwC,6BAAe;IAKnD,mBACoB,OAAoB,EACpC,KAAK;QAFT,YAII,iBAAO,SACV;QAJmB,aAAO,GAAP,OAAO,CAAa;QAH9B,kBAAY,GAAY,KAAK,CAAC;;IAOxC,CAAC;IAED,sBAAW,4BAAK;aAAhB;YACI,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM;gBACb,OAAO,IAAI,CAAC,MAAM,CAAC;YAEvB,OAAO,IAAI,CAAC;QAChB,CAAC;aAED,UAAiB,KAAY;YACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;;;OAJA;IAMM,kCAAc,GAArB,UAAsB,IAAY;IAElC,CAAC;IAEM,8BAAU,GAAjB,UAAkB,KAAa;IAE/B,CAAC;IACL,gBAAC;AAAD,CAAC,AA9BD,CAAwC,4CAAe,GA8BtD;AA9BqB,8BAAS"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WrappedDocument = void 0;
19
- var DOMObject_1 = require("./DOMObject");
20
- var WrappedDocument = /** @class */ (function (_super) {
21
- __extends(WrappedDocument, _super);
22
- function WrappedDocument(_document) {
23
- var props = [];
24
- for (var _i = 1; _i < arguments.length; _i++) {
25
- props[_i - 1] = arguments[_i];
26
- }
27
- var _this = _super.call(this, _document, props) || this;
28
- _this._document = _document;
29
- return _this;
30
- }
31
- return WrappedDocument;
32
- }(DOMObject_1.DOMObject));
33
- exports.WrappedDocument = WrappedDocument;
34
- //# sourceMappingURL=WrappedDocument.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrappedDocument.js","sourceRoot":"","sources":["../../src/DOM/WrappedDocument.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yCAAsC;AAEtC;IAAqC,mCAAS;IAC1C,yBACc,SAAmB;QAAE,eAAQ;aAAR,UAAQ,EAAR,qBAAQ,EAAR,IAAQ;YAAR,8BAAQ;;QAD3C,YAEI,kBAAM,SAAgB,EAAE,KAAK,CAAC,SAEjC;QAHa,eAAS,GAAT,SAAS,CAAU;;IAGjC,CAAC;IACL,sBAAC;AAAD,CAAC,AAND,CAAqC,qBAAS,GAM7C;AANY,0CAAe"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WrappedWindow = void 0;
19
- var DOMObject_1 = require("./DOMObject");
20
- var Scope_1 = require("../Scope");
21
- var WrappedWindow = /** @class */ (function (_super) {
22
- __extends(WrappedWindow, _super);
23
- function WrappedWindow(_window) {
24
- var props = [];
25
- for (var _i = 1; _i < arguments.length; _i++) {
26
- props[_i - 1] = arguments[_i];
27
- }
28
- var _this = _super.call(this, _window, props) || this;
29
- _this._window = _window;
30
- _this._scope = new Scope_1.Scope();
31
- _this.scope.set('@scrollY', _this._window.scrollY);
32
- _this.scope.set('@scrollX', _this._window.scrollX);
33
- _window.addEventListener('scroll', _this.onScroll.bind(_this), {
34
- passive: true
35
- });
36
- return _this;
37
- }
38
- WrappedWindow.prototype.onScroll = function (e) {
39
- this.scope.set('@scrollY', this._window.scrollY);
40
- this.scope.set('@scrollX', this._window.scrollX);
41
- };
42
- return WrappedWindow;
43
- }(DOMObject_1.DOMObject));
44
- exports.WrappedWindow = WrappedWindow;
45
- //# sourceMappingURL=WrappedWindow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrappedWindow.js","sourceRoot":"","sources":["../../src/DOM/WrappedWindow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yCAAsC;AACtC,kCAA+B;AAE/B;IAAmC,iCAAS;IACxC,uBACc,OAAe;QAAE,eAAQ;aAAR,UAAQ,EAAR,qBAAQ,EAAR,IAAQ;YAAR,8BAAQ;;QADvC,YAEI,kBAAM,OAAc,EAAE,KAAK,CAAC,SAQ/B;QATa,aAAO,GAAP,OAAO,CAAQ;QAEzB,KAAI,CAAC,MAAM,GAAG,IAAI,aAAK,EAAE,CAAC;QAE1B,KAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,KAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAI,CAAC,EAAE;YACzD,OAAO,EAAE,IAAI;SAChB,CAAC,CAAC;;IACP,CAAC;IAED,gCAAQ,GAAR,UAAS,CAAC;QACN,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IACL,oBAAC;AAAD,CAAC,AAjBD,CAAmC,qBAAS,GAiB3C;AAjBY,sCAAa"}