@constela/core 0.17.2 → 0.17.3

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 +13 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -988,7 +988,7 @@ function isObject3(value) {
988
988
  return typeof value === "object" && value !== null && !Array.isArray(value);
989
989
  }
990
990
  var VALID_VIEW_KINDS = ["element", "text", "if", "each", "component", "slot", "markdown", "code", "portal", "island"];
991
- var VALID_EXPR_TYPES = ["lit", "state", "var", "bin", "not", "param", "cond", "get", "style", "validity", "index", "call", "lambda", "array"];
991
+ var VALID_EXPR_TYPES = ["lit", "state", "var", "bin", "not", "param", "cond", "get", "style", "validity", "index", "call", "lambda", "array", "concat"];
992
992
  var VALID_PARAM_TYPES = ["string", "number", "boolean", "json"];
993
993
  var VALID_ACTION_TYPES = ["set", "update", "setPath", "fetch", "delay", "interval", "clearTimer", "focus", "if", "storage", "dom"];
994
994
  var VALID_STATE_TYPES = ["number", "string", "list", "boolean", "object"];
@@ -1360,6 +1360,18 @@ function validateExpression(expr, path) {
1360
1360
  if (elemError) return elemError;
1361
1361
  }
1362
1362
  break;
1363
+ case "concat":
1364
+ if (!("items" in expr)) {
1365
+ return { path: path + "/items", message: "items is required" };
1366
+ }
1367
+ if (!Array.isArray(expr["items"])) {
1368
+ return { path: path + "/items", message: "items must be an array" };
1369
+ }
1370
+ for (let i = 0; i < expr["items"].length; i++) {
1371
+ const itemError = validateExpression(expr["items"][i], path + "/items/" + i);
1372
+ if (itemError) return itemError;
1373
+ }
1374
+ break;
1363
1375
  }
1364
1376
  return null;
1365
1377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/core",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "Core types, schema, and validator for Constela UI framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",