@domql/element 2.29.39 → 2.29.41

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.
@@ -231,22 +231,16 @@ function verbose(element, ...args) {
231
231
  return parent;
232
232
  }
233
233
  function log(...params) {
234
- if ((0, import_utils.isNotProduction)()) {
235
- console.log(...params);
236
- }
234
+ console.log(...params);
237
235
  }
238
236
  function warn(...params) {
239
- if ((0, import_utils.isNotProduction)()) {
240
- console.warn(...params);
241
- }
237
+ console.warn(...params);
242
238
  }
243
239
  function error(...params) {
244
240
  var _a, _b;
245
- if ((0, import_utils.isNotProduction)()) {
246
- if ((_a = params[params.length - 1]) == null ? void 0 : _a.debugger) debugger;
247
- if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this, ...params);
248
- console.error(...params, this);
249
- }
241
+ if ((_a = params[params.length - 1]) == null ? void 0 : _a.debugger) debugger;
242
+ if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this, ...params);
243
+ console.error(...params, this);
250
244
  }
251
245
  function nextElement() {
252
246
  const element = this;
package/dist/cjs/node.js CHANGED
@@ -35,8 +35,8 @@ var import_env = require("@domql/utils/env.js");
35
35
  const createNode = async (element, options) => {
36
36
  let { node, tag, __ref: ref } = element;
37
37
  let isNewNode;
38
- if (options.contentElement && options.lastElement) {
39
- if (options.contentElement !== options.lastElement.content) return;
38
+ if (options.routerContentElement && options.lastElement) {
39
+ if (options.routerContentElement !== options.lastElement.content) return;
40
40
  }
41
41
  if (!node) {
42
42
  isNewNode = true;
package/dist/cjs/set.js CHANGED
@@ -51,9 +51,14 @@ const reset = async (options) => {
51
51
  });
52
52
  };
53
53
  const set = async function(params, options = {}, el) {
54
- var _a;
54
+ var _a, _b;
55
55
  const element = el || this;
56
56
  const { __ref: ref } = element;
57
+ if (options.preventContentUpdate || ((_a = options.preventUpdate) == null ? void 0 : _a.includes("content")))
58
+ return;
59
+ if (options.routerContentElement && options.lastElement) {
60
+ if (options.routerContentElement !== options.lastElement.content) return;
61
+ }
57
62
  const content = (0, import_utils.setContentKey)(element, options);
58
63
  const __contentRef = content && content.__ref;
59
64
  const lazyLoad = element.props && element.props.lazyLoad;
@@ -81,7 +86,7 @@ const set = async function(params, options = {}, el) {
81
86
  params.childExtend = element.childExtend;
82
87
  props.ignoreChildExtend = true;
83
88
  }
84
- if (!(props == null ? void 0 : props.childProps) && ((_a = element.props) == null ? void 0 : _a.childProps)) {
89
+ if (!(props == null ? void 0 : props.childProps) && ((_b = element.props) == null ? void 0 : _b.childProps)) {
85
90
  props.childProps = element.props.childProps;
86
91
  props.ignoreChildProps = true;
87
92
  }
@@ -193,22 +193,16 @@ function verbose(element, ...args) {
193
193
  return parent;
194
194
  }
195
195
  function log(...params) {
196
- if (isNotProduction()) {
197
- console.log(...params);
198
- }
196
+ console.log(...params);
199
197
  }
200
198
  function warn(...params) {
201
- if (isNotProduction()) {
202
- console.warn(...params);
203
- }
199
+ console.warn(...params);
204
200
  }
205
201
  function error(...params) {
206
202
  var _a, _b;
207
- if (isNotProduction()) {
208
- if ((_a = params[params.length - 1]) == null ? void 0 : _a.debugger) debugger;
209
- if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this, ...params);
210
- console.error(...params, this);
211
- }
203
+ if ((_a = params[params.length - 1]) == null ? void 0 : _a.debugger) debugger;
204
+ if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this, ...params);
205
+ console.error(...params, this);
212
206
  }
213
207
  function nextElement() {
214
208
  const element = this;
package/dist/esm/node.js CHANGED
@@ -21,8 +21,8 @@ import { isNotProduction } from "@domql/utils/env.js";
21
21
  const createNode = async (element, options) => {
22
22
  let { node, tag, __ref: ref } = element;
23
23
  let isNewNode;
24
- if (options.contentElement && options.lastElement) {
25
- if (options.contentElement !== options.lastElement.content) return;
24
+ if (options.routerContentElement && options.lastElement) {
25
+ if (options.routerContentElement !== options.lastElement.content) return;
26
26
  }
27
27
  if (!node) {
28
28
  isNewNode = true;
package/dist/esm/set.js CHANGED
@@ -25,9 +25,14 @@ const reset = async (options) => {
25
25
  });
26
26
  };
27
27
  const set = async function(params, options = {}, el) {
28
- var _a;
28
+ var _a, _b;
29
29
  const element = el || this;
30
30
  const { __ref: ref } = element;
31
+ if (options.preventContentUpdate || ((_a = options.preventUpdate) == null ? void 0 : _a.includes("content")))
32
+ return;
33
+ if (options.routerContentElement && options.lastElement) {
34
+ if (options.routerContentElement !== options.lastElement.content) return;
35
+ }
31
36
  const content = setContentKey(element, options);
32
37
  const __contentRef = content && content.__ref;
33
38
  const lazyLoad = element.props && element.props.lazyLoad;
@@ -55,7 +60,7 @@ const set = async function(params, options = {}, el) {
55
60
  params.childExtend = element.childExtend;
56
61
  props.ignoreChildExtend = true;
57
62
  }
58
- if (!(props == null ? void 0 : props.childProps) && ((_a = element.props) == null ? void 0 : _a.childProps)) {
63
+ if (!(props == null ? void 0 : props.childProps) && ((_b = element.props) == null ? void 0 : _b.childProps)) {
59
64
  props.childProps = element.props.childProps;
60
65
  props.ignoreChildProps = true;
61
66
  }
package/methods/index.js CHANGED
@@ -239,23 +239,23 @@ export function verbose (element, ...args) {
239
239
  }
240
240
 
241
241
  export function log (...params) {
242
- if (isNotProduction()) {
243
- console.log(...params)
244
- }
242
+ // if (isNotProduction()) {
243
+ console.log(...params)
244
+ // }
245
245
  }
246
246
 
247
247
  export function warn (...params) {
248
- if (isNotProduction()) {
249
- console.warn(...params)
250
- }
248
+ // if (isNotProduction()) {
249
+ console.warn(...params)
250
+ // }
251
251
  }
252
252
 
253
253
  export function error (...params) {
254
- if (isNotProduction()) {
255
- if (params[params.length - 1]?.debugger) debugger // eslint-disable-line
256
- if (params[params.length - 1]?.verbose) verbose.call(this, ...params)
257
- console.error(...params, this)
258
- }
254
+ // if (isNotProduction()) {
255
+ if (params[params.length - 1]?.debugger) debugger // eslint-disable-line
256
+ if (params[params.length - 1]?.verbose) verbose.call(this, ...params)
257
+ console.error(...params, this)
258
+ // }
259
259
  }
260
260
 
261
261
  export function nextElement () {
package/node.js CHANGED
@@ -30,8 +30,8 @@ export const createNode = async (element, options) => {
30
30
  let isNewNode
31
31
 
32
32
  // handle content duplication bug with delayed rendering
33
- if (options.contentElement && options.lastElement) {
34
- if (options.contentElement !== options.lastElement.content) return
33
+ if (options.routerContentElement && options.lastElement) {
34
+ if (options.routerContentElement !== options.lastElement.content) return
35
35
  }
36
36
 
37
37
  if (!node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.29.39",
3
+ "version": "2.29.41",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -27,12 +27,12 @@
27
27
  "prepublish": "npx rimraf -I dist && npm run build && npm run copy:package:cjs"
28
28
  },
29
29
  "dependencies": {
30
- "@domql/event": "^2.29.39",
31
- "@domql/render": "^2.29.39",
32
- "@domql/state": "^2.29.39",
33
- "@domql/utils": "^2.29.39"
30
+ "@domql/event": "^2.29.41",
31
+ "@domql/render": "^2.29.41",
32
+ "@domql/state": "^2.29.41",
33
+ "@domql/utils": "^2.29.41"
34
34
  },
35
- "gitHead": "a4e14a874ffcbd3839fc5ae916259887a47294e3",
35
+ "gitHead": "4a29e8f6c49b6765624ad45c11f24d9558033592",
36
36
  "devDependencies": {
37
37
  "@babel/core": "^7.27.1"
38
38
  }
package/set.js CHANGED
@@ -35,11 +35,15 @@ export const set = async function (params, options = {}, el) {
35
35
  const element = el || this
36
36
  const { __ref: ref } = element
37
37
 
38
- // if (
39
- // options.preventContentUpdate ||
40
- // options.preventUpdate?.includes('content')
41
- // )
42
- // return
38
+ if (
39
+ options.preventContentUpdate ||
40
+ options.preventUpdate?.includes('content')
41
+ )
42
+ return
43
+
44
+ if (options.routerContentElement && options.lastElement) {
45
+ if (options.routerContentElement !== options.lastElement.content) return
46
+ }
43
47
 
44
48
  const content = setContentKey(element, options)
45
49
  const __contentRef = content && content.__ref