@xaendar/compiler 0.5.6 → 0.5.7

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.
@@ -1,4 +1,4 @@
1
- import { Stack, assertIsValidElementName, indent } from "@xaendar/common";
1
+ import { Stack, indent } from "@xaendar/common";
2
2
  import ts from "typescript";
3
3
  //#region ../packages/compiler/src/lexer/types/lexer-state.enum.ts
4
4
  /**
@@ -2219,10 +2219,8 @@ function processConstDeclaration(node, _nodeName, _parentNode, context) {
2219
2219
  */
2220
2220
  function processElement(node, nodeName, parentNode, context) {
2221
2221
  const childrenContext = new Context([], context);
2222
- const tagName = node.tagName;
2223
- if (!assertIsValidElementName(tagName)) process.exit(1);
2224
2222
  return [
2225
- `const ${nodeName} = document.createElement("${tagName}");`,
2223
+ `const ${nodeName} = document.createElement("${node.tagName}");`,
2226
2224
  ...node.attributes?.map((attr) => {
2227
2225
  const value = attr.value;
2228
2226
  return typeof value === "string" ? `${nodeName}.setAttribute('${attr.name}', ${value});` : `unwatchFns.push(effect(() => ${nodeName}.setAttribute('${attr.name}', ${resolveExpression(value.expression, context)})));`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaendar/compiler",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "A library for transpiling Xaendar Templates into JavaScript code",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -16,8 +16,8 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@xaendar/common": "0.5.6",
20
- "@xaendar/types": "0.5.6",
19
+ "@xaendar/common": "0.5.7",
20
+ "@xaendar/types": "0.5.7",
21
21
  "typescript": "^6.0.3"
22
22
  }
23
23
  }