vsn 0.1.59 → 0.1.62
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 +18 -16
- package/demo/vsn.js +2 -2
- package/demo/xhr.html +49 -0
- package/dist/AST/ArithmeticAssignmentNode.d.ts +2 -1
- package/dist/AST/ArithmeticAssignmentNode.js +20 -18
- package/dist/AST/ArithmeticAssignmentNode.js.map +1 -1
- package/dist/AST/ClassNode.d.ts +21 -0
- package/dist/AST/ClassNode.js +195 -0
- package/dist/AST/ClassNode.js.map +1 -0
- package/dist/AST/FunctionCallNode.js +51 -8
- package/dist/AST/FunctionCallNode.js.map +1 -1
- package/dist/AST/FunctionNode.d.ts +3 -2
- package/dist/AST/FunctionNode.js +42 -27
- package/dist/AST/FunctionNode.js.map +1 -1
- package/dist/AST/OnNode.d.ts +9 -0
- package/dist/{attributes/ClassConstructor.js → AST/OnNode.js} +25 -40
- package/dist/AST/OnNode.js.map +1 -0
- package/dist/AST.d.ts +48 -46
- package/dist/AST.js +68 -46
- package/dist/AST.js.map +1 -1
- package/dist/DOM.js +83 -26
- package/dist/DOM.js.map +1 -1
- package/dist/Registry.d.ts +4 -3
- package/dist/Registry.js +8 -11
- package/dist/Registry.js.map +1 -1
- package/dist/Scope.d.ts +4 -0
- package/dist/Scope.js +20 -1
- package/dist/Scope.js.map +1 -1
- package/dist/Tag.d.ts +2 -0
- package/dist/Tag.js +12 -0
- package/dist/Tag.js.map +1 -1
- package/dist/attributes/ControllerAttribute.d.ts +9 -2
- package/dist/attributes/ControllerAttribute.js +78 -2
- package/dist/attributes/ControllerAttribute.js.map +1 -1
- package/dist/attributes/ListItem.js +1 -1
- package/dist/attributes/ListItem.js.map +1 -1
- package/dist/attributes/ModelAttribute.d.ts +2 -2
- package/dist/attributes/ModelAttribute.js +2 -2
- package/dist/attributes/ModelAttribute.js.map +1 -1
- package/dist/attributes/RootAttribute.js +3 -0
- package/dist/attributes/RootAttribute.js.map +1 -1
- package/dist/attributes/ScopeAttribute.js +6 -2
- package/dist/attributes/ScopeAttribute.js.map +1 -1
- package/dist/attributes/SetAttribute.js +9 -6
- package/dist/attributes/SetAttribute.js.map +1 -1
- package/dist/vsn.js +4 -4
- package/dist/vsn.js.map +1 -1
- package/dist/vsn.min.js +2 -2
- package/package.json +1 -1
- package/src/AST/ArithmeticAssignmentNode.ts +19 -17
- package/src/AST/ClassNode.ts +91 -0
- package/src/AST/FunctionCallNode.ts +30 -1
- package/src/AST/FunctionNode.ts +18 -13
- package/src/AST/OnNode.ts +18 -0
- package/src/AST.ts +20 -0
- package/src/DOM.ts +30 -1
- package/src/Registry.ts +11 -9
- package/src/Scope.ts +15 -0
- package/src/Tag.ts +11 -0
- package/src/attributes/ControllerAttribute.ts +30 -2
- package/src/attributes/ListItem.ts +1 -1
- package/src/attributes/ModelAttribute.ts +2 -2
- package/src/attributes/RootAttribute.ts +3 -0
- package/src/attributes/ScopeAttribute.ts +3 -0
- package/src/attributes/SetAttribute.ts +6 -4
- package/src/vsn.ts +4 -4
- package/test/DOM.spec.ts +3 -3
- package/test/attributes/ListItem.spec.ts +3 -3
- package/test/attributes/SetAttribute.spec.ts +3 -3
- package/demo/xhr.vsn +0 -10
- package/dist/attributes/ClassConstructor.d.ts +0 -10
- package/dist/attributes/ClassConstructor.js.map +0 -1
- package/src/attributes/ClassConstructor.ts +0 -32
package/demo/demo.html
CHANGED
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
}());
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
|
-
<script type="vsn">
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
64
|
+
<script vsn-script type="text/vsn">
|
|
65
|
+
class test-class {
|
|
66
|
+
func construct() {
|
|
67
|
+
$color = "#ff00ff";
|
|
69
68
|
}
|
|
69
|
+
}
|
|
70
70
|
</script>
|
|
71
71
|
</head>
|
|
72
72
|
<body>
|
|
@@ -89,17 +89,15 @@
|
|
|
89
89
|
</li>
|
|
90
90
|
</template>
|
|
91
91
|
|
|
92
|
-
<h2>XHR Component</h2>
|
|
93
|
-
<div vsn-lazy="@html = << './xhr.vsn'"></div>
|
|
94
|
-
|
|
95
92
|
<div id="test-container"></div>
|
|
96
93
|
<a href="./markup.html" vsn-on:click|preventdefault="#test-container.@html = << @href">Fill Container</a>
|
|
97
94
|
<a vsn-on:click|preventdefault="#test-container.@html = ''">Clear Container</a>
|
|
98
95
|
|
|
99
96
|
<h2>On Click</h2>
|
|
100
|
-
<
|
|
101
|
-
<
|
|
102
|
-
|
|
97
|
+
<div vsn-name="toggle" vsn-set:show|boolean="false">
|
|
98
|
+
<button class="test-class" vsn-on:click="toggle.show = !toggle.show">Toggle</button>
|
|
99
|
+
<span vsn-bind="toggle.show"></span>
|
|
100
|
+
</div>
|
|
103
101
|
<a id="click-test" vsn-on:click="if(@text != @clicktext){@text=@clicktext}else{@text='Click Me'}" clicktext="Clicked!">Click Me</a>
|
|
104
102
|
|
|
105
103
|
<h2>? Operator</h2>
|
|
@@ -190,14 +188,18 @@
|
|
|
190
188
|
</li>
|
|
191
189
|
</ul>
|
|
192
190
|
</div>
|
|
191
|
+
|
|
192
|
+
<h2>Lazy XHR Component</h2>
|
|
193
|
+
<div vsn-lazy="@html = << './xhr.html'"></div>
|
|
194
|
+
|
|
193
195
|
<script type="text/javascript">
|
|
194
196
|
window.addEventListener('vsn', function () {
|
|
195
|
-
vision.registry.
|
|
196
|
-
vision.registry.
|
|
197
|
-
vision.registry.
|
|
198
|
-
vision.registry.
|
|
197
|
+
vision.registry.controllers.register('TestController', TestController);
|
|
198
|
+
vision.registry.controllers.register('TestItem', TestItem);
|
|
199
|
+
vision.registry.controllers.register('Controller', Controller);
|
|
200
|
+
vision.registry.controllers.register('MVal', MVal);
|
|
199
201
|
});
|
|
200
202
|
</script>
|
|
201
203
|
<script type="text/javascript" src="vsn.js"></script>
|
|
202
204
|
</body>
|
|
203
|
-
</html>
|
|
205
|
+
</html>
|