@xaendar/compiler 0.7.8 → 0.7.10
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.
|
@@ -852,7 +852,11 @@ var Generator = class {
|
|
|
852
852
|
generate() {
|
|
853
853
|
this._nodeToProcess.clear();
|
|
854
854
|
const compilerContext = new CompilerContext();
|
|
855
|
-
const renderFunctions = ["_render() {", ...indent([
|
|
855
|
+
const renderFunctions = ["_render() {", ...indent([
|
|
856
|
+
`const ${ROOT_NODE} = this._root;`,
|
|
857
|
+
"const context = new Context(this);",
|
|
858
|
+
"const namespace = undefined;"
|
|
859
|
+
])];
|
|
856
860
|
if (this._cssVariableName) renderFunctions.push(indent(`${ROOT_NODE}.adoptedStyleSheets = [${this._cssVariableName}];`));
|
|
857
861
|
for (let i = 0; i < this._ast.length; i++) {
|
|
858
862
|
const { code, functionsToProcess } = this._processNode(this._ast[i], ROOT_NODE, i.toString(), compilerContext, null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xaendar/compiler",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
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.7.
|
|
20
|
-
"@xaendar/types": "0.7.
|
|
19
|
+
"@xaendar/common": "0.7.10",
|
|
20
|
+
"@xaendar/types": "0.7.10",
|
|
21
21
|
"typescript": "^6.0.3"
|
|
22
22
|
}
|
|
23
23
|
}
|