@domql/element 2.5.134 → 2.5.135

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.
package/create.js CHANGED
@@ -213,7 +213,7 @@ const addElementIntoParentChildren = (element, parent) => {
213
213
  const visitedElements = new WeakMap()
214
214
  const renderElement = (element, parent, options, attachOptions) => {
215
215
  if (visitedElements.has(element)) {
216
- if (ENV === 'test' || ENV === 'development') console.warn('Cyclic rendering detected:', element.__ref.__path)
216
+ if (ENV === 'test' || ENV === 'development') console.warn('Cyclic rendering detected:', element.__ref.path)
217
217
  }
218
218
 
219
219
  visitedElements.set(element, true)
@@ -222,13 +222,13 @@ const renderElement = (element, parent, options, attachOptions) => {
222
222
 
223
223
  // CREATE a real NODE
224
224
  try {
225
- const isInfiniteLoopDetected = detectInfiniteLoop(ref.__path)
225
+ const isInfiniteLoopDetected = detectInfiniteLoop(ref.path)
226
226
  if (ref.__uniqId || isInfiniteLoopDetected) return
227
227
  createNode(element, options)
228
228
  ref.__uniqId = Math.random()
229
229
  } catch (e) {
230
230
  if (ENV === 'test' || ENV === 'development') {
231
- const path = ref.__path
231
+ const path = ref.path
232
232
  if (path.includes('ComponentsGrid')) path.splice(0, path.indexOf('ComponentsGrid') + 2)
233
233
  if (path.includes('demoComponent')) path.splice(0, path.indexOf('demoComponent') + 1)
234
234
  const isDemoComponent = element.lookup(el => el.state.key)?.state?.key
@@ -327,8 +327,8 @@ const addCaching = (element, parent) => {
327
327
  // set the PATH array
328
328
  // if (ENV === 'test' || ENV === 'development') {
329
329
  if (!parentRef) parentRef = parent.ref = {}
330
- if (!parentRef.__path) parentRef.__path = []
331
- ref.__path = parentRef.__path.concat(element.key)
330
+ if (!parentRef.path) parentRef.path = []
331
+ ref.path = parentRef.path.concat(element.key)
332
332
  // }
333
333
  }
334
334
 
@@ -171,19 +171,19 @@ const renderElement = (element, parent, options, attachOptions) => {
171
171
  var _a, _b;
172
172
  if (visitedElements.has(element)) {
173
173
  if (ENV === "test" || ENV === "development")
174
- console.warn("Cyclic rendering detected:", element.__ref.__path);
174
+ console.warn("Cyclic rendering detected:", element.__ref.path);
175
175
  }
176
176
  visitedElements.set(element, true);
177
177
  const { __ref: ref, key } = element;
178
178
  try {
179
- const isInfiniteLoopDetected = (0, import_utils.detectInfiniteLoop)(ref.__path);
179
+ const isInfiniteLoopDetected = (0, import_utils.detectInfiniteLoop)(ref.path);
180
180
  if (ref.__uniqId || isInfiniteLoopDetected)
181
181
  return;
182
182
  (0, import_node.default)(element, options);
183
183
  ref.__uniqId = Math.random();
184
184
  } catch (e) {
185
185
  if (ENV === "test" || ENV === "development") {
186
- const path = ref.__path;
186
+ const path = ref.path;
187
187
  if (path.includes("ComponentsGrid"))
188
188
  path.splice(0, path.indexOf("ComponentsGrid") + 2);
189
189
  if (path.includes("demoComponent"))
@@ -260,9 +260,9 @@ const addCaching = (element, parent) => {
260
260
  ref.root = hasRoot ? element : parentRef.root;
261
261
  if (!parentRef)
262
262
  parentRef = parent.ref = {};
263
- if (!parentRef.__path)
264
- parentRef.__path = [];
265
- ref.__path = parentRef.__path.concat(element.key);
263
+ if (!parentRef.path)
264
+ parentRef.path = [];
265
+ ref.path = parentRef.path.concat(element.key);
266
266
  };
267
267
  const onlyResolveExtends = (element, parent, key, options) => {
268
268
  const { __ref: ref } = element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.134",
3
+ "version": "2.5.135",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -32,7 +32,7 @@
32
32
  "@domql/state": "^2.5.134",
33
33
  "@domql/utils": "^2.5.134"
34
34
  },
35
- "gitHead": "20e65426dc742448bd6dc85211dea3a48ed74ae0",
35
+ "gitHead": "b7ae353fa66bf64258fe4b0a45287c67239d1ca7",
36
36
  "devDependencies": {
37
37
  "@babel/core": "^7.12.0"
38
38
  }