@constela/server 8.0.0 → 9.0.0

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -3
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -428,12 +428,14 @@ function renderText(node, ctx) {
428
428
  async function renderIf(node, ctx) {
429
429
  const condition = evaluate(node.condition, ctx);
430
430
  if (condition) {
431
- return await renderNode(node.then, ctx);
431
+ const content = await renderNode(node.then, ctx);
432
+ return `<!--if:then-->${content}`;
432
433
  }
433
434
  if (node.else) {
434
- return await renderNode(node.else, ctx);
435
+ const content = await renderNode(node.else, ctx);
436
+ return `<!--if:else-->${content}`;
435
437
  }
436
- return "";
438
+ return "<!--if:none-->";
437
439
  }
438
440
  async function renderEach(node, ctx) {
439
441
  const items = evaluate(node.items, ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/server",
3
- "version": "8.0.0",
3
+ "version": "9.0.0",
4
4
  "description": "Server-side rendering for Constela UI framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,8 +15,8 @@
15
15
  "dist"
16
16
  ],
17
17
  "peerDependencies": {
18
- "@constela/compiler": "^0.11.1",
19
- "@constela/core": "^0.12.0"
18
+ "@constela/compiler": "^0.12.0",
19
+ "@constela/core": "^0.13.0"
20
20
  },
21
21
  "dependencies": {
22
22
  "isomorphic-dompurify": "^2.35.0",
@@ -29,8 +29,8 @@
29
29
  "tsup": "^8.0.0",
30
30
  "typescript": "^5.3.0",
31
31
  "vitest": "^2.0.0",
32
- "@constela/compiler": "0.11.1",
33
- "@constela/core": "0.12.0"
32
+ "@constela/compiler": "0.12.0",
33
+ "@constela/core": "0.13.0"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=20.0.0"