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