domql 3.7.3 → 3.7.4

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/iife/index.js +15 -6
  2. package/package.json +4 -4
@@ -1080,14 +1080,17 @@ var Domql = (() => {
1080
1080
  }
1081
1081
  return element;
1082
1082
  };
1083
- trackSourcemapDeep = (sourcemap, obj, sourceName) => {
1083
+ trackSourcemapDeep = (sourcemap, obj, sourceName, seen) => {
1084
+ if (!seen) seen = /* @__PURE__ */ new WeakSet();
1085
+ if (seen.has(obj)) return;
1086
+ seen.add(obj);
1084
1087
  for (const key in obj) {
1085
1088
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
1086
1089
  if (key === "__proto__" || key === "constructor" || key === "prototype") continue;
1087
1090
  const val = obj[key];
1088
1091
  if (isObject(val) && !isArray(val)) {
1089
1092
  sourcemap[key] = sourcemap[key] || {};
1090
- trackSourcemapDeep(sourcemap[key], val, sourceName);
1093
+ trackSourcemapDeep(sourcemap[key], val, sourceName, seen);
1091
1094
  } else {
1092
1095
  sourcemap[key] = sourceName;
1093
1096
  }
@@ -3451,12 +3454,12 @@ var Domql = (() => {
3451
3454
  const result = fn.call(this, ...args);
3452
3455
  if (result && typeof result.then === "function") {
3453
3456
  result.catch((err) => {
3454
- this.error = err;
3457
+ error.call(this, err);
3455
3458
  });
3456
3459
  }
3457
3460
  return result;
3458
3461
  } catch (err) {
3459
- this.error = err;
3462
+ error.call(this, err);
3460
3463
  if (context?.strictMode) throw err;
3461
3464
  }
3462
3465
  }
@@ -4273,7 +4276,10 @@ ${element}` : "";
4273
4276
  const attrs = exec(params, element);
4274
4277
  if (props.attr) deepMerge(attrs, props.attr);
4275
4278
  for (const attr2 in attrs) {
4276
- const val = exec(attrs[attr2], element);
4279
+ let val = exec(attrs[attr2], element);
4280
+ if (isString(val) && val.includes("{{") && element.call) {
4281
+ val = element.call("replaceLiteralsWithObjectFields", val, element.state);
4282
+ }
4277
4283
  if (val === __attr[attr2]) continue;
4278
4284
  if (val !== false && val !== void 0 && val !== null && node.setAttribute) {
4279
4285
  node.setAttribute(attr2, val);
@@ -4334,7 +4340,10 @@ ${element}` : "";
4334
4340
  // ../element/dist/esm/mixins/html.js
4335
4341
  init_esm();
4336
4342
  function html(param, element, node) {
4337
- const prop = exec(param ?? element?.props?.html, element);
4343
+ let prop = exec(param ?? element?.props?.html, element);
4344
+ if (isString(prop) && prop.includes("{{") && element.call) {
4345
+ prop = element.call("replaceLiteralsWithObjectFields", prop, element.state);
4346
+ }
4338
4347
  const { __ref } = element;
4339
4348
  if (prop !== __ref.__html) {
4340
4349
  if (node.nodeName === "SVG") node.textContent = prop;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domql",
3
- "version": "3.7.3",
3
+ "version": "3.7.4",
4
4
  "license": "CC-BY-NC-4.0",
5
5
  "type": "module",
6
6
  "module": "./dist/esm/index.js",
@@ -25,9 +25,9 @@
25
25
  "build:iife": "cross-env NODE_ENV=$NODE_ENV esbuild index.js --bundle --target=es2020 --format=iife --global-name=Domql --outfile=dist/iife/index.js --define:process.env.NODE_ENV=process.env.NODE_ENV"
26
26
  },
27
27
  "dependencies": {
28
- "@domql/element": "^3.7.3",
29
- "@domql/state": "^3.7.3",
30
- "@domql/utils": "^3.7.3"
28
+ "@domql/element": "^3.7.4",
29
+ "@domql/state": "^3.7.4",
30
+ "@domql/utils": "^3.7.4"
31
31
  },
32
32
  "gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
33
33
  "browser": "./dist/esm/index.js",