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.
- package/demo/demo.html +16 -7
- package/demo/vsn.js +1 -0
- package/dist/AST.d.ts +2 -1
- package/dist/Controller.d.ts +9 -4
- package/dist/Model.d.ts +0 -0
- package/dist/attributes/Radio.d.ts +2 -0
- package/dist/attributes/StyleAttribute.d.ts +1 -0
- package/dist/{Vision.d.ts → vsn.d.ts} +1 -0
- package/dist/vsn.min.js +1 -0
- package/package.json +8 -8
- package/src/AST.ts +94 -3
- package/src/Controller.ts +15 -6
- package/src/DOM.ts +1 -1
- package/src/Model.ts +0 -0
- package/src/Registry.ts +0 -2
- package/src/Scope.ts +7 -2
- package/src/Tag.ts +10 -7
- package/src/attributes/ClickRemoveClass.ts +2 -0
- package/src/attributes/ClickToggleClass.ts +2 -0
- package/src/attributes/Exec.ts +2 -0
- package/src/attributes/Format.ts +1 -0
- package/src/attributes/If.ts +4 -0
- package/src/attributes/JSONAttribute.ts +1 -0
- package/src/attributes/KeyAbstract.ts +2 -1
- package/src/attributes/KeyDown.ts +1 -0
- package/src/attributes/KeyUp.ts +1 -0
- package/src/attributes/List.ts +3 -0
- package/src/attributes/ListItem.ts +1 -0
- package/src/attributes/On.ts +4 -0
- package/src/attributes/Radio.ts +17 -2
- package/src/attributes/RootAttribute.ts +1 -0
- package/src/attributes/ScopeChange.ts +2 -0
- package/src/attributes/SetAttribute.ts +1 -0
- package/src/attributes/StandardAttribute.ts +3 -0
- package/src/attributes/StyleAttribute.ts +1 -0
- package/src/attributes/TypeAttribute.ts +1 -0
- package/src/{Vision.ts → vsn.ts} +1 -0
- package/test/DOM.spec.ts +1 -1
- package/test/attributes/JSONAttribute.spec.ts +1 -1
- package/webpack.config.js +2 -2
- package/demo/vision.js +0 -1
- package/dist/AST.js +0 -2107
- package/dist/AST.js.map +0 -1
- package/dist/Attribute.js +0 -187
- package/dist/Attribute.js.map +0 -1
- package/dist/Bencmark.js +0 -179
- package/dist/Bencmark.js.map +0 -1
- package/dist/Configuration.js +0 -64
- package/dist/Configuration.js.map +0 -1
- package/dist/Controller.js +0 -39
- package/dist/Controller.js.map +0 -1
- package/dist/DOM/DOMObject.js +0 -47
- package/dist/DOM/DOMObject.js.map +0 -1
- package/dist/DOM/WrappedDocument.js +0 -34
- package/dist/DOM/WrappedDocument.js.map +0 -1
- package/dist/DOM/WrappedWindow.js +0 -45
- package/dist/DOM/WrappedWindow.js.map +0 -1
- package/dist/DOM.js +0 -547
- package/dist/DOM.js.map +0 -1
- package/dist/Formats.js +0 -44
- package/dist/Formats.js.map +0 -1
- package/dist/Query.js +0 -66
- package/dist/Query.js.map +0 -1
- package/dist/Registry.js +0 -138
- package/dist/Registry.js.map +0 -1
- package/dist/Scope.js +0 -512
- package/dist/Scope.js.map +0 -1
- package/dist/Tag/List.js +0 -85
- package/dist/Tag/List.js.map +0 -1
- package/dist/Tag.js +0 -764
- package/dist/Tag.js.map +0 -1
- package/dist/Types.js +0 -48
- package/dist/Types.js.map +0 -1
- package/dist/Vision.js +0 -162
- package/dist/Vision.js.map +0 -1
- package/dist/attributes/AddClassIf.js +0 -93
- package/dist/attributes/AddClassIf.js.map +0 -1
- package/dist/attributes/Bind.js +0 -272
- package/dist/attributes/Bind.js.map +0 -1
- package/dist/attributes/ClassConstructor.js +0 -104
- package/dist/attributes/ClassConstructor.js.map +0 -1
- package/dist/attributes/ClickRemoveClass.js +0 -102
- package/dist/attributes/ClickRemoveClass.js.map +0 -1
- package/dist/attributes/ClickToggleClass.js +0 -102
- package/dist/attributes/ClickToggleClass.js.map +0 -1
- package/dist/attributes/ControllerAttribute.js +0 -28
- package/dist/attributes/ControllerAttribute.js.map +0 -1
- package/dist/attributes/DisableIf.js +0 -94
- package/dist/attributes/DisableIf.js.map +0 -1
- package/dist/attributes/Exec.js +0 -102
- package/dist/attributes/Exec.js.map +0 -1
- package/dist/attributes/Format.js +0 -96
- package/dist/attributes/Format.js.map +0 -1
- package/dist/attributes/If.js +0 -147
- package/dist/attributes/If.js.map +0 -1
- package/dist/attributes/JSONAttribute.js +0 -115
- package/dist/attributes/JSONAttribute.js.map +0 -1
- package/dist/attributes/KeyAbstract.js +0 -110
- package/dist/attributes/KeyAbstract.js.map +0 -1
- package/dist/attributes/KeyDown.js +0 -82
- package/dist/attributes/KeyDown.js.map +0 -1
- package/dist/attributes/KeyUp.js +0 -82
- package/dist/attributes/KeyUp.js.map +0 -1
- package/dist/attributes/List.js +0 -273
- package/dist/attributes/List.js.map +0 -1
- package/dist/attributes/ListItem.js +0 -135
- package/dist/attributes/ListItem.js.map +0 -1
- package/dist/attributes/ListItemModel.js +0 -39
- package/dist/attributes/ListItemModel.js.map +0 -1
- package/dist/attributes/ModelAttribute.js +0 -29
- package/dist/attributes/ModelAttribute.js.map +0 -1
- package/dist/attributes/Name.js +0 -88
- package/dist/attributes/Name.js.map +0 -1
- package/dist/attributes/On.js +0 -123
- package/dist/attributes/On.js.map +0 -1
- package/dist/attributes/Radio.js +0 -127
- package/dist/attributes/Radio.js.map +0 -1
- package/dist/attributes/Referenced.js +0 -38
- package/dist/attributes/Referenced.js.map +0 -1
- package/dist/attributes/RootAttribute.js +0 -85
- package/dist/attributes/RootAttribute.js.map +0 -1
- package/dist/attributes/ScopeAttribute.js +0 -40
- package/dist/attributes/ScopeAttribute.js.map +0 -1
- package/dist/attributes/ScopeChange.js +0 -124
- package/dist/attributes/ScopeChange.js.map +0 -1
- package/dist/attributes/SetAttribute.js +0 -130
- package/dist/attributes/SetAttribute.js.map +0 -1
- package/dist/attributes/StandardAttribute.js +0 -168
- package/dist/attributes/StandardAttribute.js.map +0 -1
- package/dist/attributes/StyleAttribute.js +0 -182
- package/dist/attributes/StyleAttribute.js.map +0 -1
- package/dist/attributes/Template.js +0 -39
- package/dist/attributes/Template.js.map +0 -1
- package/dist/attributes/TypeAttribute.js +0 -101
- package/dist/attributes/TypeAttribute.js.map +0 -1
- package/dist/attributes/_imports.js +0 -60
- package/dist/attributes/_imports.js.map +0 -1
- package/dist/helpers/DOMHelper.js +0 -81
- package/dist/helpers/DOMHelper.js.map +0 -1
- package/dist/helpers/ElementHelper.js +0 -25
- package/dist/helpers/ElementHelper.js.map +0 -1
- package/dist/helpers/VisionHelper.js +0 -71
- package/dist/helpers/VisionHelper.js.map +0 -1
- package/dist/helpers/decorators.js +0 -38
- package/dist/helpers/decorators.js.map +0 -1
- package/main.py +0 -16
package/dist/DOM/DOMObject.js
DELETED
|
@@ -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"}
|