@domql/element 2.25.1 → 2.25.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.
@@ -33,7 +33,7 @@ const applyExtend = (element, parent, options = {}) => {
33
33
  const context = element.context || parent.context;
34
34
  extend = (0, import_utils2.fallbackStringExtend)(extend, context, options, variant);
35
35
  const extendStack = (0, import_utils2.getExtendStack)(extend, context);
36
- if (ENV !== "test" || ENV !== "development") delete element.extend;
36
+ if (ENV !== "testing" || ENV !== "development") delete element.extend;
37
37
  let childExtendStack = [];
38
38
  if (parent) {
39
39
  element.parent = parent;
@@ -199,22 +199,22 @@ function parseDeep(excl = []) {
199
199
  }
200
200
  return obj;
201
201
  }
202
- function verbose(...args) {
203
- if (ENV !== "test" && ENV !== "development") return;
204
- const element = this;
205
- const { __ref: ref } = element;
206
- console.groupCollapsed(element.key);
202
+ function verbose(element, ...args) {
203
+ if (ENV !== "testing" && ENV !== "development") return;
204
+ const parent = this;
205
+ const { __ref: ref } = parent;
206
+ console.groupCollapsed(parent.key);
207
207
  if (args.length) {
208
208
  args.forEach((v) => console.log(`%c${v}:
209
- `, "font-weight: bold", element[v]));
209
+ `, "font-weight: bold", parent[v]));
210
210
  } else {
211
211
  console.log(ref.path);
212
- const keys2 = element.keys();
213
- keys2.forEach((v) => console.log(`%c${v}:`, "font-weight: bold", element[v]));
212
+ const keys2 = parent.keys();
213
+ keys2.forEach((v) => console.log(`%c${v}:`, "font-weight: bold", parent[v]));
214
214
  }
215
- console.log(element);
216
- console.groupEnd(element.key);
217
- return element;
215
+ console.log(parent);
216
+ console.groupEnd(parent.key);
217
+ return parent;
218
218
  }
219
219
  function log(...params) {
220
220
  if (ENV === "testing" || ENV === "development") {
@@ -230,7 +230,7 @@ function error(...params) {
230
230
  var _a, _b;
231
231
  if (ENV === "testing" || ENV === "development") {
232
232
  if ((_a = params[params.length - 1]) == null ? void 0 : _a.debugger) debugger;
233
- if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this);
233
+ if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this, ...params);
234
234
  console.error(...params, this);
235
235
  }
236
236
  }
@@ -16,7 +16,7 @@ const applyExtend = (element, parent, options = {}) => {
16
16
  const context = element.context || parent.context;
17
17
  extend = fallbackStringExtend(extend, context, options, variant);
18
18
  const extendStack = getExtendStack(extend, context);
19
- if (ENV !== "test" || ENV !== "development") delete element.extend;
19
+ if (ENV !== "testing" || ENV !== "development") delete element.extend;
20
20
  let childExtendStack = [];
21
21
  if (parent) {
22
22
  element.parent = parent;
@@ -153,22 +153,22 @@ function parseDeep(excl = []) {
153
153
  }
154
154
  return obj;
155
155
  }
156
- function verbose(...args) {
157
- if (ENV !== "test" && ENV !== "development") return;
158
- const element = this;
159
- const { __ref: ref } = element;
160
- console.groupCollapsed(element.key);
156
+ function verbose(element, ...args) {
157
+ if (ENV !== "testing" && ENV !== "development") return;
158
+ const parent = this;
159
+ const { __ref: ref } = parent;
160
+ console.groupCollapsed(parent.key);
161
161
  if (args.length) {
162
162
  args.forEach((v) => console.log(`%c${v}:
163
- `, "font-weight: bold", element[v]));
163
+ `, "font-weight: bold", parent[v]));
164
164
  } else {
165
165
  console.log(ref.path);
166
- const keys2 = element.keys();
167
- keys2.forEach((v) => console.log(`%c${v}:`, "font-weight: bold", element[v]));
166
+ const keys2 = parent.keys();
167
+ keys2.forEach((v) => console.log(`%c${v}:`, "font-weight: bold", parent[v]));
168
168
  }
169
- console.log(element);
170
- console.groupEnd(element.key);
171
- return element;
169
+ console.log(parent);
170
+ console.groupEnd(parent.key);
171
+ return parent;
172
172
  }
173
173
  function log(...params) {
174
174
  if (ENV === "testing" || ENV === "development") {
@@ -184,7 +184,7 @@ function error(...params) {
184
184
  var _a, _b;
185
185
  if (ENV === "testing" || ENV === "development") {
186
186
  if ((_a = params[params.length - 1]) == null ? void 0 : _a.debugger) debugger;
187
- if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this);
187
+ if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) verbose.call(this, ...params);
188
188
  console.error(...params, this);
189
189
  }
190
190
  }
package/extend.js CHANGED
@@ -29,7 +29,7 @@ export const applyExtend = (element, parent, options = {}) => {
29
29
 
30
30
  const extendStack = getExtendStack(extend, context)
31
31
 
32
- if (ENV !== 'test' || ENV !== 'development') delete element.extend
32
+ if (ENV !== 'testing' || ENV !== 'development') delete element.extend
33
33
 
34
34
  let childExtendStack = []
35
35
  if (parent) {
package/methods/index.js CHANGED
@@ -186,22 +186,22 @@ export function parseDeep (excl = []) {
186
186
  return obj
187
187
  }
188
188
 
189
- export function verbose (...args) {
190
- if (ENV !== 'test' && ENV !== 'development') return
189
+ export function verbose (element, ...args) {
190
+ if (ENV !== 'testing' && ENV !== 'development') return
191
191
 
192
- const element = this
193
- const { __ref: ref } = element
194
- console.groupCollapsed(element.key)
192
+ const parent = this
193
+ const { __ref: ref } = parent
194
+ console.groupCollapsed(parent.key)
195
195
  if (args.length) {
196
- args.forEach(v => console.log(`%c${v}:\n`, 'font-weight: bold', element[v]))
196
+ args.forEach(v => console.log(`%c${v}:\n`, 'font-weight: bold', parent[v]))
197
197
  } else {
198
198
  console.log(ref.path)
199
- const keys = element.keys()
200
- keys.forEach(v => console.log(`%c${v}:`, 'font-weight: bold', element[v]))
199
+ const keys = parent.keys()
200
+ keys.forEach(v => console.log(`%c${v}:`, 'font-weight: bold', parent[v]))
201
201
  }
202
- console.log(element)
203
- console.groupEnd(element.key)
204
- return element
202
+ console.log(parent)
203
+ console.groupEnd(parent.key)
204
+ return parent
205
205
  }
206
206
 
207
207
  export function log (...params) {
@@ -219,7 +219,7 @@ export function warn (...params) {
219
219
  export function error (...params) {
220
220
  if (ENV === 'testing' || ENV === 'development') {
221
221
  if (params[params.length - 1]?.debugger) debugger // eslint-disable-line
222
- if (params[params.length - 1]?.verbose) verbose.call(this)
222
+ if (params[params.length - 1]?.verbose) verbose.call(this, ...params)
223
223
  console.error(...params, this)
224
224
  }
225
225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.25.1",
3
+ "version": "2.25.3",
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.25.1",
31
- "@domql/render": "^2.25.1",
32
- "@domql/state": "^2.25.1",
33
- "@domql/utils": "^2.25.1"
30
+ "@domql/event": "^2.25.3",
31
+ "@domql/render": "^2.25.3",
32
+ "@domql/state": "^2.25.3",
33
+ "@domql/utils": "^2.25.3"
34
34
  },
35
- "gitHead": "f4de780d7f974a235640526d303a3f3dc68ac1b4",
35
+ "gitHead": "1e749ee3ef95b5a4a618c4eda1961f7c3011beff",
36
36
  "devDependencies": {
37
37
  "@babel/core": "^7.12.0"
38
38
  }