vsn 0.1.101 → 0.1.102
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/examples/component-slots.html +3 -0
- package/demo/vsn.js +2 -2
- package/dist/AST.js +8 -8
- package/dist/AST.js.map +1 -1
- package/dist/Component.js +1 -1
- package/dist/Component.js.map +1 -1
- package/dist/attributes/If.js +3 -0
- package/dist/attributes/If.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/vsn.min.js +3 -0
- package/dist/vsn.min.js.LICENSE.txt +9 -0
- package/package.json +1 -1
- package/src/AST.ts +8 -8
- package/src/Component.ts +1 -1
- package/src/attributes/If.ts +3 -0
- package/src/version.ts +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
5
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
6
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7
|
+
* Code distributed by Google as part of the polymer project is also
|
|
8
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9
|
+
*/
|
package/package.json
CHANGED
package/src/AST.ts
CHANGED
|
@@ -282,14 +282,6 @@ const TOKEN_PATTERNS: TokenPattern[] = [
|
|
|
282
282
|
type: TokenType.NOT_EQUALS,
|
|
283
283
|
pattern: /^!=/
|
|
284
284
|
},
|
|
285
|
-
{
|
|
286
|
-
type: TokenType.GREATER_THAN,
|
|
287
|
-
pattern: /^>/
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
type: TokenType.LESS_THAN,
|
|
291
|
-
pattern: /^</
|
|
292
|
-
},
|
|
293
285
|
{
|
|
294
286
|
type: TokenType.GREATER_THAN_EQUAL,
|
|
295
287
|
pattern: /^>=/
|
|
@@ -298,6 +290,14 @@ const TOKEN_PATTERNS: TokenPattern[] = [
|
|
|
298
290
|
type: TokenType.LESS_THAN_EQUAL,
|
|
299
291
|
pattern: /^<=/
|
|
300
292
|
},
|
|
293
|
+
{
|
|
294
|
+
type: TokenType.GREATER_THAN,
|
|
295
|
+
pattern: /^>/
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
type: TokenType.LESS_THAN,
|
|
299
|
+
pattern: /^</
|
|
300
|
+
},
|
|
301
301
|
{
|
|
302
302
|
type: TokenType.COLON,
|
|
303
303
|
pattern: /^:/
|
package/src/Component.ts
CHANGED
|
@@ -33,7 +33,7 @@ export class Component extends HTMLElement {
|
|
|
33
33
|
const t = await DOM.instance.buildTag<SlottedTag>(child as HTMLElement, false, SlottedTag);
|
|
34
34
|
await t?.slotted(slotTag);
|
|
35
35
|
}
|
|
36
|
-
await
|
|
36
|
+
await DOM.instance.setupTags([slotTag]);
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
});
|
package/src/attributes/If.ts
CHANGED
|
@@ -9,6 +9,7 @@ export class If extends Attribute {
|
|
|
9
9
|
|
|
10
10
|
public async compile() {
|
|
11
11
|
const statement: string = this.getAttributeValue();
|
|
12
|
+
console.log('if statement for', this.tag.element, statement);
|
|
12
13
|
this.tree = new Tree(statement);
|
|
13
14
|
await this.tree.prepare(this.tag.scope, this.tag.dom, this.tag);
|
|
14
15
|
await super.compile();
|
|
@@ -33,8 +34,10 @@ export class If extends Attribute {
|
|
|
33
34
|
const result: boolean = await this.tree.evaluate(this.tag.scope, this.tag.dom, this.tag);
|
|
34
35
|
if (result) {
|
|
35
36
|
this.tag.show();
|
|
37
|
+
console.log('show', this.tag.element);
|
|
36
38
|
} else {
|
|
37
39
|
this.tag.hide();
|
|
40
|
+
console.log('hide', this.tag.element);
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.
|
|
1
|
+
export const VERSION = '0.1.102';
|
|
2
2
|
|