vsn 0.1.19 → 0.1.22
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 +117 -8
- package/dist/AST.js.map +1 -1
- package/dist/DOM/DOMObject.d.ts +1 -0
- package/dist/DOM/DOMObject.js +2 -0
- package/dist/DOM/DOMObject.js.map +1 -1
- package/dist/Scope.d.ts +2 -1
- package/dist/Scope.js +13 -6
- package/dist/Scope.js.map +1 -1
- package/dist/Tag.d.ts +3 -0
- package/dist/Tag.js +49 -0
- package/dist/Tag.js.map +1 -1
- package/dist/Vision.d.ts +1 -1
- package/dist/Vision.js +2 -1
- package/dist/Vision.js.map +1 -1
- 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/_imports.d.ts +1 -0
- package/dist/attributes/_imports.js +3 -1
- package/dist/attributes/_imports.js.map +1 -1
- package/package.json +1 -1
- 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/demo/demo.html
CHANGED
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
<span vsn-if:not="'active' not in ?(:parent).@class">inactive</span>
|
|
81
81
|
<button vsn-on:click="?(:parent).@class += 'active'">+</button>
|
|
82
82
|
<button vsn-on:click="?(:parent).@class -= 'active'">-</button>
|
|
83
|
+
<button vsn-on:click="?(:parent).@class ~ 'active'">~</button>
|
|
83
84
|
</li>
|
|
84
85
|
</template>
|
|
85
86
|
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
<button vsn-on:click="show = !show" vsn-set:show="false|boolean">Toggle</button>
|
|
98
99
|
<span vsn-bind="show"></span>
|
|
99
100
|
|
|
100
|
-
<
|
|
101
|
+
<a vsn-on:click="if(@text != clicktext){@text=clicktext}else{@text='Click Me'}" vsn-set:clicktext="Clicked!">Click Me</a>
|
|
101
102
|
|
|
102
103
|
<h2>? Operator</h2>
|
|
103
104
|
<p>Add/remove class to list of elements on click.</p>
|
|
@@ -130,6 +131,12 @@
|
|
|
130
131
|
<input type="text" vsn-bind:|to="#date-formatter.date_format" />
|
|
131
132
|
<input type="text" vsn-on:keyup="#date-formatter.date_format = $value" value="Aug 11, 2021 01:03:00 PM PDT" />
|
|
132
133
|
|
|
134
|
+
<h2>$ Operator</h2>
|
|
135
|
+
<p></p>
|
|
136
|
+
<p>
|
|
137
|
+
<input type="text" vsn-bind="?(#style-attribute).$marginTop" id="style-attribute" /> <input type="button" vsn-on:click="?(#style-attribute).$marginTop = '50px'" value="Button" /> <input type="button" vsn-on:click="?(#style-attribute).$marginTop = '0'" value="Button" />
|
|
138
|
+
</p>
|
|
139
|
+
|
|
133
140
|
<h2>Conditional Elements</h2>
|
|
134
141
|
<button vsn-on:click="show = !show">Toggle</button>
|
|
135
142
|
<span vsn-if="show">Show is true</span>
|
|
@@ -190,4 +197,4 @@
|
|
|
190
197
|
</script>
|
|
191
198
|
<script type="text/javascript" src="vision.js"></script>
|
|
192
199
|
</body>
|
|
193
|
-
</html>
|
|
200
|
+
</html>
|