vsn 0.1.100 → 0.1.103

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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vsn",
3
- "version": "0.1.100",
3
+ "version": "0.1.103",
4
4
  "description": "SEO Friendly Javascript/Typescript Framework",
5
5
  "keywords": [
6
6
  "framework",
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 slotTag.buildAttributes();
36
+ await DOM.instance.setupTags([slotTag]);
37
37
  });
38
38
  });
39
39
  });
package/src/Tag.ts CHANGED
@@ -561,6 +561,7 @@ export class Tag extends DOMObject {
561
561
  public async finalize() {
562
562
  this._state = TagState.Built;
563
563
  this.callOnWrapped('$built', this, this.scope, this.element);
564
+ this.dispatch('$built', this);
564
565
  VisionHelper.nice(this.setupDeferredAttributes.bind(this));
565
566
  }
566
567
 
@@ -189,6 +189,10 @@ export class List extends Attribute {
189
189
  if (cls) {
190
190
  if (!obj || !(obj instanceof cls)) {
191
191
  obj = new cls(obj);
192
+ this.tag.once('$built', () => {
193
+ if (obj['$built'])
194
+ obj['$built'](this.tag, this.tag.scope, this.tag.element);
195
+ });
192
196
  }
193
197
  }
194
198
 
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.100';
1
+ export const VERSION = '0.1.103';
2
2
 
package/src/vsn.ts CHANGED
@@ -47,7 +47,13 @@ export class Vision extends EventDispatcher {
47
47
  }
48
48
 
49
49
  protected defineComponent(name, cls) {
50
- customElements.define(name, cls);
50
+ if (this.dom.built) {
51
+ customElements.define(name, cls);
52
+ } else {
53
+ this.dom.once('built', () => {
54
+ customElements.define(name, cls);
55
+ });
56
+ }
51
57
  }
52
58
 
53
59
  public get dom(): DOM {