vsn 0.1.122 → 0.1.123
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 +1 -1
- package/demo/examples/replace-html.html +19 -0
- package/demo/resources/xhr-html.html +1 -0
- package/demo/{xhr.html → resources/xhr-lazy.html} +18 -1
- package/demo/vsn.js +2 -2
- package/demo/xhr-test.html +4 -0
- package/dist/AST/AssignmentNode.js +2 -3
- package/dist/AST/AssignmentNode.js.map +1 -1
- package/dist/AST/ElementStyleNode.js +7 -9
- package/dist/AST/ElementStyleNode.js.map +1 -1
- package/dist/AST/NamedStackNode.js +6 -1
- package/dist/AST/NamedStackNode.js.map +1 -1
- package/dist/AST.d.ts +8 -0
- package/dist/AST.js +28 -2
- package/dist/AST.js.map +1 -1
- package/dist/DOM.js +2 -2
- package/dist/DOM.js.map +1 -1
- package/dist/Tag.js +3 -1
- package/dist/Tag.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/AST/AssignmentNode.ts +2 -4
- package/src/AST/ElementStyleNode.ts +0 -1
- package/src/AST/NamedStackNode.ts +4 -1
- package/src/AST.ts +25 -1
- package/src/DOM.ts +2 -2
- package/src/Tag.ts +3 -1
- package/src/version.ts +1 -1
package/demo/demo.html
CHANGED
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
</div>
|
|
205
205
|
|
|
206
206
|
<h2>Lazy XHR Component</h2>
|
|
207
|
-
<div vsn-lazy="@html = << './xhr.html'"></div>
|
|
207
|
+
<div vsn-lazy="@html = << './resources/xhr-lazy.html'"></div>
|
|
208
208
|
|
|
209
209
|
<script type="text/javascript">
|
|
210
210
|
window.addEventListener('vsn', function () {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Events</title>
|
|
6
|
+
|
|
7
|
+
<style></style>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<div id="container">
|
|
12
|
+
<div class="test-container">
|
|
13
|
+
<div class="test"></div>
|
|
14
|
+
</div>
|
|
15
|
+
<button vsn-on:click="with ?(.test) {log('wut');wait(1);@html += 'Hello World!';}">Click Me</button>
|
|
16
|
+
</div>
|
|
17
|
+
<script type="text/javascript" src="../vsn.js"></script>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<h1 id="html-header">Testing</h1>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
func construct() {
|
|
14
14
|
log('.simple input construct');
|
|
15
15
|
a|float = 0.0;
|
|
16
|
+
@value = 'wut';
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
func deconstruct() {
|
|
@@ -24,10 +25,26 @@
|
|
|
24
25
|
a += 0.1;
|
|
25
26
|
log(a);
|
|
26
27
|
}
|
|
28
|
+
|
|
29
|
+
on mouseenter() {
|
|
30
|
+
with ?>(:parent label) {
|
|
31
|
+
@originaltext = @text;
|
|
32
|
+
@text = 'hovered';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
on mouseleave() {
|
|
37
|
+
with ?>(:parent label) {
|
|
38
|
+
@text = @originaltext;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
27
41
|
}
|
|
28
42
|
}
|
|
29
43
|
</script>
|
|
30
|
-
<div class="simple"
|
|
44
|
+
<div class="simple">
|
|
45
|
+
<label>Simple Input</label>
|
|
46
|
+
<input type="text" />
|
|
47
|
+
</div>
|
|
31
48
|
<div class="simple"><input type="button" /></div>
|
|
32
49
|
<button vsn-on:click="?(.simple)[0].@class -= 'simple'">Remove</button>
|
|
33
50
|
</div>
|