vsn 0.1.78 → 0.1.81

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vsn",
3
- "version": "0.1.78",
3
+ "version": "0.1.81",
4
4
  "description": "SEO Friendly Javascript/Typescript Framework",
5
5
  "keywords": [
6
6
  "framework",
@@ -14,7 +14,7 @@
14
14
  "main": "./dist/vsn.js",
15
15
  "scripts": {
16
16
  "build": "rm -rf ./dist/ && npm run-script version && tsc",
17
- "version": "echo -n \"export const VERSION = '${npm_package_version}';\n\" > src/version.ts",
17
+ "version": "echo \"export const VERSION = '${npm_package_version}';\n\" > src/version.ts",
18
18
  "build_dev": "rm -rf ./dist/ && webpack --env BUILD=development BENCHMARK=1",
19
19
  "demo": "webpack --env BUILD=production BENCHMARK=1 && cp ./dist/vsn.min.js ./demo/vsn.js",
20
20
  "test": "karma start --single-run",
@@ -147,9 +147,11 @@ export class ClassNode extends Node implements TreeNode {
147
147
  if (element.id)
148
148
  localSelectors.push(`#${element.id}`);
149
149
 
150
- for (const selector in localSelectors) {
151
- if (ClassNode.classParents[selector])
152
- fullSelectors.push(...ClassNode.classParents[selector]);
150
+ for (const selector of localSelectors) {
151
+ const parentSelectors = ClassNode.classParents[selector];
152
+ if (parentSelectors) {
153
+ fullSelectors.push(...parentSelectors.filter(s => !fullSelectors.includes(s)));
154
+ }
153
155
  }
154
156
 
155
157
  if (!tag) {
package/src/DOM.ts CHANGED
@@ -238,7 +238,6 @@ export class DOM extends EventDispatcher {
238
238
  childList: true,
239
239
  subtree: true
240
240
  });
241
- await ClassNode.checkForClassChanges(tag.element, this, tag);
242
241
  }
243
242
 
244
243
  if (isRoot) {
@@ -11,13 +11,12 @@ export class ComponentAttribute extends TemplateAttribute {
11
11
  if (!Registry.instance.components.has(name)) {
12
12
  await super.extract();
13
13
  const clsName = this.getAttributeValue();
14
- let cls = Component;
14
+ let cls;
15
15
  if (clsName) {
16
16
  cls = await Registry.instance.components.get(clsName);
17
- if (!cls) {
18
- throw new Error(`Component ${clsName} not found`);
19
- }
20
17
  }
18
+ if (!cls)
19
+ cls = class extends Component {};
21
20
  Registry.instance.components.register(name, cls);
22
21
  }
23
22
  }
@@ -10,7 +10,7 @@ export class Name extends Attribute {
10
10
  public async setup() {
11
11
  const parentScope: Scope = this.tag.scope.parentScope;
12
12
  if (parentScope) {
13
- parentScope.set(this.tag.parsedAttributes['vsn-name'][1], this.tag.scope);
13
+ parentScope.set(this.getAttributeValue(), this.tag.scope);
14
14
  }
15
15
  }
16
16
  }
package/src/version.ts CHANGED
@@ -1 +1,2 @@
1
- export const VERSION = '0.1.78';
1
+ export const VERSION = '0.1.81';
2
+
@@ -102,7 +102,7 @@ class .product-firearm-option {
102
102
  log(@data-type, 'filter', value);
103
103
  }
104
104
 
105
- class > input {
105
+ class input {
106
106
  func construct() {
107
107
  log('construct');
108
108
  }