vsn 0.1.80 → 0.1.83
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 +49 -0
- package/demo/vsn.js +2 -2
- package/dist/AST/ClassNode.d.ts +4 -2
- package/dist/AST/ClassNode.js +68 -45
- package/dist/AST/ClassNode.js.map +1 -1
- package/dist/Attribute.d.ts +1 -1
- package/dist/Attribute.js.map +1 -1
- package/dist/DOM.d.ts +1 -0
- package/dist/DOM.js +24 -4
- package/dist/DOM.js.map +1 -1
- package/dist/Tag.js +9 -1
- package/dist/Tag.js.map +1 -1
- package/dist/attributes/Name.js +1 -1
- package/dist/attributes/Name.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/vsn.min.js +2 -2
- package/package.json +1 -1
- package/src/AST/ClassNode.ts +23 -5
- package/src/Attribute.ts +1 -1
- package/src/DOM.ts +21 -1
- package/src/Tag.ts +8 -1
- package/src/attributes/Name.ts +1 -1
- package/src/version.ts +1 -1
- package/test/AST/ClassNode.spec.ts +11 -12
package/demo/demo.html
CHANGED
|
@@ -81,6 +81,55 @@
|
|
|
81
81
|
</script>
|
|
82
82
|
</head>
|
|
83
83
|
<body>
|
|
84
|
+
|
|
85
|
+
<template vsn-component:test-component>
|
|
86
|
+
<script vsn-script type="text/vsn">
|
|
87
|
+
class test-component {
|
|
88
|
+
func construct() {
|
|
89
|
+
log(?>(.test-class button));
|
|
90
|
+
$color = "#ff00ff";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
class .test-class {
|
|
94
|
+
func construct() {
|
|
95
|
+
log('huh');
|
|
96
|
+
$color = "#ff00ff";
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
class button {
|
|
100
|
+
func construct() {
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
on click() {
|
|
105
|
+
@class ~ 'huh';
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
class .huh {
|
|
111
|
+
func construct() {
|
|
112
|
+
log('construct');
|
|
113
|
+
$color = "#ff00ff";
|
|
114
|
+
}
|
|
115
|
+
func deconstruct() {
|
|
116
|
+
log('deconstruct');
|
|
117
|
+
$color = "#ffff00";
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
</script>
|
|
122
|
+
<div class="test-class">
|
|
123
|
+
<h1>Test Component</h1>
|
|
124
|
+
<p>
|
|
125
|
+
<button>Click Me</button>
|
|
126
|
+
</p>
|
|
127
|
+
</div>
|
|
128
|
+
</template>
|
|
129
|
+
|
|
130
|
+
<test-component vsn-name="asd"></test-component>
|
|
131
|
+
<test-component vsn-name="dsf"></test-component>
|
|
132
|
+
|
|
84
133
|
<template vsn-template id="vsn-template">
|
|
85
134
|
<span>Hello, world!</span>
|
|
86
135
|
</template>
|