@domql/utils 3.1.2 → 3.2.7

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 (59) hide show
  1. package/array.js +11 -5
  2. package/cache.js +3 -0
  3. package/component.js +3 -4
  4. package/dist/cjs/array.js +11 -5
  5. package/dist/cjs/component.js +4 -6
  6. package/dist/cjs/element.js +6 -6
  7. package/dist/cjs/env.js +1 -1
  8. package/dist/cjs/events.js +3 -3
  9. package/dist/cjs/extends.js +44 -28
  10. package/dist/cjs/function.js +3 -3
  11. package/dist/cjs/index.js +1 -0
  12. package/dist/cjs/key.js +2 -2
  13. package/dist/cjs/keys.js +29 -15
  14. package/dist/cjs/methods.js +88 -33
  15. package/dist/cjs/object.js +154 -141
  16. package/dist/cjs/props.js +43 -34
  17. package/dist/cjs/scope.js +1 -2
  18. package/dist/cjs/state.js +12 -11
  19. package/dist/cjs/string.js +15 -20
  20. package/dist/cjs/tags.js +71 -16
  21. package/dist/cjs/triggerEvent.js +90 -0
  22. package/dist/cjs/types.js +4 -12
  23. package/dist/esm/array.js +11 -5
  24. package/dist/esm/component.js +4 -6
  25. package/dist/esm/element.js +9 -27
  26. package/dist/esm/env.js +1 -1
  27. package/dist/esm/events.js +3 -3
  28. package/dist/esm/extends.js +48 -50
  29. package/dist/esm/function.js +3 -3
  30. package/dist/esm/index.js +1 -0
  31. package/dist/esm/key.js +2 -2
  32. package/dist/esm/keys.js +29 -15
  33. package/dist/esm/methods.js +86 -31
  34. package/dist/esm/object.js +158 -165
  35. package/dist/esm/props.js +43 -50
  36. package/dist/esm/scope.js +1 -2
  37. package/dist/esm/state.js +21 -38
  38. package/dist/esm/string.js +15 -20
  39. package/dist/esm/tags.js +71 -16
  40. package/dist/esm/triggerEvent.js +70 -0
  41. package/dist/esm/types.js +4 -12
  42. package/dist/iife/index.js +2779 -0
  43. package/element.js +2 -2
  44. package/events.js +3 -3
  45. package/extends.js +28 -17
  46. package/function.js +10 -9
  47. package/index.js +1 -0
  48. package/keys.js +25 -15
  49. package/log.js +0 -1
  50. package/methods.js +99 -24
  51. package/object.js +155 -215
  52. package/package.json +34 -13
  53. package/props.js +44 -27
  54. package/state.js +12 -12
  55. package/string.js +20 -38
  56. package/tags.js +45 -16
  57. package/triggerEvent.js +76 -0
  58. package/types.js +8 -25
  59. package/dist/cjs/package.json +0 -4
package/array.js CHANGED
@@ -8,9 +8,11 @@ export const arrayContainsOtherArray = (arr1, arr2) => {
8
8
  }
9
9
 
10
10
  export const getFrequencyInArray = (arr, value) => {
11
- return arr.reduce((count, currentValue) => {
12
- return currentValue === value ? count + 1 : count
13
- }, 0)
11
+ let count = 0
12
+ for (let i = 0; i < arr.length; i++) {
13
+ if (arr[i] === value) count++
14
+ }
15
+ return count
14
16
  }
15
17
 
16
18
  export const removeFromArray = (arr, index) => {
@@ -134,8 +136,12 @@ export const filterArraysFast = (sourceArr, excludeArr) => {
134
136
  }
135
137
 
136
138
  export const checkIfStringIsInArray = (string, arr) => {
137
- if (!string) return
138
- return arr.filter(v => string.includes(v)).length
139
+ if (!string) return 0
140
+ let count = 0
141
+ for (let i = 0; i < arr.length; i++) {
142
+ if (string.includes(arr[i])) count++
143
+ }
144
+ return count
139
145
  }
140
146
 
141
147
  export const removeDuplicatesInArray = arr => {
package/cache.js CHANGED
@@ -1,4 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  export const cache = {}
4
+
5
+ // Shared mutable options populated by create.js (cacheOptions/resetOptions).
6
+ // Holds .create (initial create options) and .defaultOptions (per-render overrides).
4
7
  export const OPTIONS = {}
package/component.js CHANGED
@@ -4,10 +4,9 @@ import { createExtendsFromKeys } from './extends.js'
4
4
  import { isString } from './types.js'
5
5
 
6
6
  export const matchesComponentNaming = key => {
7
- const isFirstKeyString = isString(key)
8
- if (!isFirstKeyString) return
9
- const firstCharKey = key.slice(0, 1)
10
- return /^[A-Z]*$/.test(firstCharKey)
7
+ if (!isString(key) || !key.length) return false
8
+ const code = key.charCodeAt(0)
9
+ return code >= 65 && code <= 90 // A-Z
11
10
  }
12
11
 
13
12
  export function getCapitalCaseKeys (obj) {
package/dist/cjs/array.js CHANGED
@@ -44,9 +44,11 @@ const arrayContainsOtherArray = (arr1, arr2) => {
44
44
  return arr2.every((val) => arr1.includes(val));
45
45
  };
46
46
  const getFrequencyInArray = (arr, value) => {
47
- return arr.reduce((count, currentValue) => {
48
- return currentValue === value ? count + 1 : count;
49
- }, 0);
47
+ let count = 0;
48
+ for (let i = 0; i < arr.length; i++) {
49
+ if (arr[i] === value) count++;
50
+ }
51
+ return count;
50
52
  };
51
53
  const removeFromArray = (arr, index) => {
52
54
  if ((0, import_types.isString)(index)) index = parseInt(index);
@@ -140,8 +142,12 @@ const filterArraysFast = (sourceArr, excludeArr) => {
140
142
  return sourceArr.filter((item) => !excludeSet.has(item));
141
143
  };
142
144
  const checkIfStringIsInArray = (string, arr) => {
143
- if (!string) return;
144
- return arr.filter((v) => string.includes(v)).length;
145
+ if (!string) return 0;
146
+ let count = 0;
147
+ for (let i = 0; i < arr.length; i++) {
148
+ if (string.includes(arr[i])) count++;
149
+ }
150
+ return count;
145
151
  };
146
152
  const removeDuplicatesInArray = (arr) => {
147
153
  if (!(0, import_types.isArray)(arr)) return arr;
@@ -27,10 +27,9 @@ module.exports = __toCommonJS(component_exports);
27
27
  var import_extends = require("./extends.js");
28
28
  var import_types = require("./types.js");
29
29
  const matchesComponentNaming = (key) => {
30
- const isFirstKeyString = (0, import_types.isString)(key);
31
- if (!isFirstKeyString) return;
32
- const firstCharKey = key.slice(0, 1);
33
- return /^[A-Z]*$/.test(firstCharKey);
30
+ if (!(0, import_types.isString)(key) || !key.length) return false;
31
+ const code = key.charCodeAt(0);
32
+ return code >= 65 && code <= 90;
34
33
  };
35
34
  function getCapitalCaseKeys(obj) {
36
35
  return Object.keys(obj).filter((key) => /^[A-Z]/.test(key));
@@ -39,9 +38,8 @@ function getSpreadChildren(obj) {
39
38
  return Object.keys(obj).filter((key) => /^\d+$/.test(key));
40
39
  }
41
40
  function isContextComponent(element, parent, passedKey) {
42
- var _a, _b;
43
41
  const { context } = parent || {};
44
42
  const [extendsKey] = (0, import_extends.createExtendsFromKeys)(passedKey);
45
43
  const key = passedKey || extendsKey;
46
- return ((_a = context == null ? void 0 : context.components) == null ? void 0 : _a[key]) || ((_b = context == null ? void 0 : context.pages) == null ? void 0 : _b[key]);
44
+ return context?.components?.[key] || context?.pages?.[key];
47
45
  }
@@ -35,11 +35,11 @@ var import_node = require("./node.js");
35
35
  var import_props = require("./props.js");
36
36
  var import_tags = require("./tags.js");
37
37
  var import_types = require("./types.js");
38
- const ENV = "development";
38
+ const ENV = process.env.NODE_ENV;
39
39
  const returnValueAsText = (element, parent, key) => {
40
40
  const childExtendsTag = parent.childExtends && parent.childExtends.tag;
41
41
  const childPropsTag = parent.props.childProps && parent.props.childProps.tag;
42
- const isKeyValidHTMLTag = import_tags.HTML_TAGS.body.indexOf(key) > -1 && key;
42
+ const isKeyValidHTMLTag = import_tags.HTML_TAGS.body.has(key) && key;
43
43
  return {
44
44
  text: element,
45
45
  tag: childExtendsTag || childPropsTag || isKeyValidHTMLTag || "string"
@@ -51,7 +51,7 @@ const createBasedOnType = (element, parent, key) => {
51
51
  console.warn(
52
52
  key,
53
53
  "element is undefined in",
54
- parent && parent.__ref && parent.__ref.path
54
+ parent?.__ref?.path
55
55
  );
56
56
  }
57
57
  return {};
@@ -85,8 +85,8 @@ const createRoot = (element, parent) => {
85
85
  const { __ref: ref } = element;
86
86
  const { __ref: parentRef } = parent;
87
87
  const hasRoot = parent && parent.key === ":root";
88
- if (!(ref == null ? void 0 : ref.root)) {
89
- ref.root = hasRoot ? element : parentRef == null ? void 0 : parentRef.root;
88
+ if (!ref?.root) {
89
+ ref.root = hasRoot ? element : parentRef?.root;
90
90
  }
91
91
  };
92
92
  const createPath = (element, parent, key) => {
@@ -116,7 +116,7 @@ const addCaching = (element, parent, key) => {
116
116
  return ref;
117
117
  };
118
118
  const createElement = (passedProps, parentEl, passedKey, opts, root) => {
119
- const hashed = passedProps == null ? void 0 : passedProps.__hash;
119
+ const hashed = passedProps?.__hash;
120
120
  const element = hashed ? { extends: [passedProps] } : createBasedOnType(passedProps, parentEl, passedKey);
121
121
  if (!element) return;
122
122
  const parent = createParent(element, parentEl, passedKey, opts, root);
package/dist/cjs/env.js CHANGED
@@ -31,7 +31,7 @@ __export(env_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(env_exports);
33
33
  // @preserve-env
34
- const NODE_ENV = "development";
34
+ const NODE_ENV = process.env.NODE_ENV;
35
35
  const ENV = NODE_ENV;
36
36
  const isProduction = (env = NODE_ENV) => env === "production";
37
37
  const isTest = (env = NODE_ENV) => env === "testing" || env === "test";
@@ -29,9 +29,9 @@ function addEventFromProps(key, obj) {
29
29
  const origEvent = on[eventName];
30
30
  const funcFromProps = props[key];
31
31
  if ((0, import_types.isFunction)(origEvent)) {
32
- on[eventName] = async (...args) => {
33
- const originalEventRetunrs = await origEvent(...args);
34
- if (originalEventRetunrs !== false) await funcFromProps(...args);
32
+ on[eventName] = (...args) => {
33
+ const originalEventRetunrs = origEvent(...args);
34
+ if (originalEventRetunrs !== false) funcFromProps(...args);
35
35
  };
36
36
  } else on[eventName] = funcFromProps;
37
37
  }
@@ -51,7 +51,7 @@ var import_array = require("./array.js");
51
51
  var import_component = require("./component.js");
52
52
  var import_object = require("./object.js");
53
53
  var import_types = require("./types.js");
54
- const ENV = "development";
54
+ const ENV = process.env.NODE_ENV;
55
55
  const createExtendsFromKeys = (key) => {
56
56
  if (key.includes("+")) {
57
57
  return key.split("+").filter(import_component.matchesComponentNaming);
@@ -77,13 +77,12 @@ const createExtends = (element, parent, key) => {
77
77
  return __extends;
78
78
  };
79
79
  const addExtends = (newExtends, element) => {
80
- var _a;
81
80
  const { __ref: ref } = element;
82
81
  let { __extends } = ref;
83
82
  if (!newExtends) return __extends;
84
- const variant = (_a = element.props) == null ? void 0 : _a.variant;
83
+ const variant = element.props?.variant;
85
84
  const context = element.context;
86
- if (variant && (context == null ? void 0 : context.components) && !Array.isArray(newExtends) && typeof newExtends === "string") {
85
+ if (variant && context?.components && !Array.isArray(newExtends) && typeof newExtends === "string") {
87
86
  const variantKey = `${newExtends}.${variant}`;
88
87
  if (context.components[variantKey]) {
89
88
  newExtends = variantKey;
@@ -116,7 +115,7 @@ const setHashedExtend = (extend, stack) => {
116
115
  if (!(0, import_types.isString)(extend)) {
117
116
  extend.__hash = hash;
118
117
  }
119
- if (!["__proto__", "constructor", "prototype"].includes(hash)) {
118
+ if (hash !== "__proto__" && hash !== "constructor" && hash !== "prototype") {
120
119
  extendStackRegistry[hash] = stack;
121
120
  }
122
121
  return stack;
@@ -138,10 +137,16 @@ const extractArrayExtend = (extend, stack, context, processed = /* @__PURE__ */
138
137
  return stack;
139
138
  };
140
139
  const deepExtend = (extend, stack, context, processed = /* @__PURE__ */ new Set()) => {
141
- const extendOflattenExtend = extend.extends;
140
+ const extendOflattenExtend = extend.extends || extend.extend;
142
141
  const cleanExtend = { ...extend };
143
142
  delete cleanExtend.extends;
144
- if (Object.keys(cleanExtend).length > 0) {
143
+ delete cleanExtend.extend;
144
+ let hasKeys = false;
145
+ for (const _k in cleanExtend) {
146
+ hasKeys = true;
147
+ break;
148
+ }
149
+ if (hasKeys) {
145
150
  stack.push(cleanExtend);
146
151
  }
147
152
  if (extendOflattenExtend) {
@@ -159,21 +164,30 @@ const flattenExtend = (extend, stack, context, processed = /* @__PURE__ */ new S
159
164
  extend = mapStringsWithContextComponents(extend, context);
160
165
  }
161
166
  processed.add(extend);
162
- if (extend == null ? void 0 : extend.extends) {
167
+ if (extend?.extends || extend?.extend) {
163
168
  deepExtend(extend, stack, context, processed);
164
169
  } else if (extend) {
165
170
  stack.push(extend);
166
171
  }
167
172
  return stack;
168
173
  };
174
+ const MERGE_EXTENDS_SKIP = /* @__PURE__ */ new Set([
175
+ "parent",
176
+ "node",
177
+ "__ref",
178
+ "__proto__",
179
+ "extend",
180
+ "childExtend",
181
+ "childExtendRecursive"
182
+ ]);
169
183
  const deepMergeExtends = (element, extend) => {
170
184
  extend = (0, import_object.deepClone)(extend);
171
185
  for (const e in extend) {
172
- if (["parent", "node", "__ref", "__proto__"].indexOf(e) > -1) continue;
186
+ if (MERGE_EXTENDS_SKIP.has(e)) continue;
173
187
  const elementProp = element[e];
174
188
  const extendProp = extend[e];
175
189
  if (extendProp === void 0) continue;
176
- if (Object.prototype.hasOwnProperty.call(extend, e) && !["__proto__", "constructor", "prototype"].includes(e)) {
190
+ if (Object.prototype.hasOwnProperty.call(extend, e) && e !== "__proto__" && e !== "constructor" && e !== "prototype") {
177
191
  if (elementProp === void 0) {
178
192
  element[e] = extendProp;
179
193
  } else if ((0, import_types.isObject)(elementProp) && (0, import_types.isObject)(extendProp)) {
@@ -202,11 +216,11 @@ const cloneAndMergeArrayExtend = (stack) => {
202
216
  }, {});
203
217
  };
204
218
  const mapStringsWithContextComponents = (extend, context, options = {}, variant) => {
205
- const COMPONENTS = context && context.components || options.components;
206
- const PAGES = context && context.pages || options.pages;
219
+ const COMPONENTS = context?.components || options.components;
220
+ const PAGES = context?.pages || options.pages;
207
221
  if ((0, import_types.isString)(extend)) {
208
222
  const componentExists = COMPONENTS && (COMPONENTS[extend + "." + variant] || COMPONENTS[extend] || COMPONENTS["smbls." + extend]);
209
- const pageExists = PAGES && extend.startsWith("/") && PAGES[extend];
223
+ const pageExists = PAGES && extend.charCodeAt(0) === 47 && PAGES[extend];
210
224
  if (componentExists) return componentExists;
211
225
  else if (pageExists) return pageExists;
212
226
  else {
@@ -237,7 +251,7 @@ const getExtendsInElement = (obj) => {
237
251
  let result = [];
238
252
  function traverse(o) {
239
253
  for (const key in o) {
240
- if (Object.hasOwnProperty.call(o, key)) {
254
+ if (Object.prototype.hasOwnProperty.call(o, key)) {
241
255
  if ((0, import_component.matchesComponentNaming)(key)) {
242
256
  result.push(key);
243
257
  }
@@ -258,14 +272,16 @@ const getExtendsInElement = (obj) => {
258
272
  return result;
259
273
  };
260
274
  const createElementExtends = (element, parent, options = {}) => {
261
- var _a;
262
275
  const { __ref: ref } = element;
263
276
  const context = element.context || parent.context;
264
- const variant = (_a = element.props) == null ? void 0 : _a.variant;
277
+ const variant = element.props?.variant;
278
+ if (element.extend && !element.extends) element.extends = element.extend;
279
+ delete element.extend;
280
+ if (!element.extends && element.props?.extends) element.extends = element.props.extends;
265
281
  if (element.extends) {
266
282
  if (Array.isArray(element.extends) && element.extends.length > 0) {
267
283
  const [firstExtend, ...restExtends] = element.extends;
268
- if (typeof firstExtend === "string" && variant && (context == null ? void 0 : context.components)) {
284
+ if (typeof firstExtend === "string" && variant && context?.components) {
269
285
  const variantKey = `${firstExtend}.${variant}`;
270
286
  if (context.components[variantKey]) {
271
287
  addExtends([variantKey, ...restExtends], element);
@@ -275,7 +291,7 @@ const createElementExtends = (element, parent, options = {}) => {
275
291
  } else {
276
292
  addExtends(element.extends, element);
277
293
  }
278
- } else if (typeof element.extends === "string" && variant && (context == null ? void 0 : context.components)) {
294
+ } else if (typeof element.extends === "string" && variant && context?.components) {
279
295
  const variantKey = `${element.extends}.${variant}`;
280
296
  if (context.components[variantKey]) {
281
297
  addExtends(variantKey, element);
@@ -298,28 +314,28 @@ const createElementExtends = (element, parent, options = {}) => {
298
314
  return (0, import_array.removeDuplicatesInArray)(ref.__extends);
299
315
  };
300
316
  const inheritChildPropsExtends = (element, parent, options = {}) => {
301
- var _a, _b, _c;
302
317
  const { props, __ref: ref } = element;
303
- const ignoreChildExtends = options.ignoreChildExtends || (props == null ? void 0 : props.ignoreChildExtends);
318
+ const ignoreChildExtends = options.ignoreChildExtends || props?.ignoreChildExtends;
304
319
  if (!ignoreChildExtends) {
305
- if ((_b = (_a = parent.props) == null ? void 0 : _a.childProps) == null ? void 0 : _b.extends) {
306
- addExtends((_c = parent.props) == null ? void 0 : _c.childProps.extends, element);
320
+ if (parent.props?.childProps?.extends) {
321
+ addExtends(parent.props?.childProps.extends, element);
307
322
  }
308
323
  }
309
324
  return ref.__extends;
310
325
  };
311
326
  const inheritChildExtends = (element, parent, options = {}) => {
312
327
  const { props, __ref: ref } = element;
313
- const ignoreChildExtends = options.ignoreChildExtends || (props == null ? void 0 : props.ignoreChildExtends);
314
- if (!ignoreChildExtends && parent.childExtends) {
315
- addExtends(parent.childExtends, element);
328
+ const ignoreChildExtends = options.ignoreChildExtends || props?.ignoreChildExtends;
329
+ const childExtends = parent.childExtends || parent.childExtend;
330
+ if (!ignoreChildExtends && childExtends) {
331
+ addExtends(childExtends, element);
316
332
  }
317
333
  return ref.__extends;
318
334
  };
319
335
  const inheritRecursiveChildExtends = (element, parent, options = {}) => {
320
336
  const { props, __ref: ref } = element;
321
- const childExtendsRecursive = parent.childExtendsRecursive;
322
- const ignoreChildExtendsRecursive = options.ignoreChildExtendsRecursive || (props == null ? void 0 : props.ignoreChildExtendsRecursive);
337
+ const childExtendsRecursive = parent.childExtendsRecursive || parent.childExtendRecursive;
338
+ const ignoreChildExtendsRecursive = options.ignoreChildExtendsRecursive || props?.ignoreChildExtendsRecursive;
323
339
  const isText = element.key === "__text";
324
340
  if (childExtendsRecursive && !isText && !ignoreChildExtendsRecursive) {
325
341
  addExtends(childExtendsRecursive, element);
@@ -329,7 +345,7 @@ const inheritRecursiveChildExtends = (element, parent, options = {}) => {
329
345
  const createExtendsStack = (element, parent, options = {}) => {
330
346
  const { props, __ref: ref } = element;
331
347
  const context = element.context || parent.context;
332
- const variant = element.variant || (props == null ? void 0 : props.variant);
348
+ const variant = element.variant || props?.variant;
333
349
  const __extends = (0, import_array.removeDuplicatesInArray)(
334
350
  ref.__extends.map((val, i) => {
335
351
  return mapStringsWithContextComponents(
@@ -62,16 +62,16 @@ const memoize = (fn) => {
62
62
  }
63
63
  };
64
64
  };
65
+ const RE_STRING_FUNCTION = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
65
66
  const isStringFunction = (inputString) => {
66
- const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
67
- return functionRegex.test(inputString);
67
+ return RE_STRING_FUNCTION.test(inputString);
68
68
  };
69
69
  function cloneFunction(fn, win = window) {
70
70
  const temp = function() {
71
71
  return fn.apply(win, arguments);
72
72
  };
73
73
  for (const key in fn) {
74
- if (Object.hasOwnProperty.call(fn, key)) {
74
+ if (Object.prototype.hasOwnProperty.call(fn, key)) {
75
75
  temp[key] = fn[key];
76
76
  }
77
77
  }
package/dist/cjs/index.js CHANGED
@@ -38,3 +38,4 @@ __reExport(index_exports, require("./scope.js"), module.exports);
38
38
  __reExport(index_exports, require("./methods.js"), module.exports);
39
39
  __reExport(index_exports, require("./cache.js"), module.exports);
40
40
  __reExport(index_exports, require("./update.js"), module.exports);
41
+ __reExport(index_exports, require("./triggerEvent.js"), module.exports);
package/dist/cjs/key.js CHANGED
@@ -24,14 +24,14 @@ __export(key_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(key_exports);
26
26
  var import_object = require("./object.js");
27
- const generateKey = /* @__PURE__ */ function() {
27
+ const generateKey = /* @__PURE__ */ (function() {
28
28
  let index = 0;
29
29
  function newId() {
30
30
  index++;
31
31
  return index;
32
32
  }
33
33
  return newId;
34
- }();
34
+ })();
35
35
  const createSnapshotId = generateKey;
36
36
  const createKey = (element, parent, key) => {
37
37
  return ((0, import_object.exec)(key, element) || key || element.key || generateKey()).toString();
package/dist/cjs/keys.js CHANGED
@@ -28,7 +28,7 @@ __export(keys_exports, {
28
28
  STATE_PROPERTIES: () => STATE_PROPERTIES
29
29
  });
30
30
  module.exports = __toCommonJS(keys_exports);
31
- const DOMQ_PROPERTIES = [
31
+ const DOMQ_PROPERTIES = /* @__PURE__ */ new Set([
32
32
  "attr",
33
33
  "style",
34
34
  "text",
@@ -38,12 +38,16 @@ const DOMQ_PROPERTIES = [
38
38
  "classlist",
39
39
  "state",
40
40
  "scope",
41
+ "root",
41
42
  "deps",
43
+ "extend",
42
44
  "extends",
43
45
  "$router",
44
46
  "routes",
45
47
  "children",
48
+ "childExtend",
46
49
  "childExtends",
50
+ "childExtendRecursive",
47
51
  "childExtendsRecursive",
48
52
  "props",
49
53
  "if",
@@ -61,8 +65,8 @@ const DOMQ_PROPERTIES = [
61
65
  "on",
62
66
  "component",
63
67
  "context"
64
- ];
65
- const PARSED_DOMQ_PROPERTIES = [
68
+ ]);
69
+ const PARSED_DOMQ_PROPERTIES = /* @__PURE__ */ new Set([
66
70
  "attr",
67
71
  "style",
68
72
  "text",
@@ -80,7 +84,7 @@ const PARSED_DOMQ_PROPERTIES = [
80
84
  "query",
81
85
  "on",
82
86
  "context"
83
- ];
87
+ ]);
84
88
  const STATE_PROPERTIES = [
85
89
  "ref",
86
90
  "parent",
@@ -90,7 +94,7 @@ const STATE_PROPERTIES = [
90
94
  "__children",
91
95
  "root"
92
96
  ];
93
- const STATE_METHODS = [
97
+ const STATE_METHODS = /* @__PURE__ */ new Set([
94
98
  "update",
95
99
  "parse",
96
100
  "clean",
@@ -123,9 +127,9 @@ const STATE_METHODS = [
123
127
  "removeByPath",
124
128
  "removePathCollection",
125
129
  "getByPath"
126
- ];
127
- const PROPS_METHODS = ["update", "__element"];
128
- const METHODS = [
130
+ ]);
131
+ const PROPS_METHODS = /* @__PURE__ */ new Set(["update", "__element"]);
132
+ const METHODS = /* @__PURE__ */ new Set([
129
133
  "set",
130
134
  "reset",
131
135
  "update",
@@ -151,15 +155,25 @@ const METHODS = [
151
155
  "error",
152
156
  "call",
153
157
  "nextElement",
154
- "previousElement"
155
- ];
156
- const METHODS_EXL = [
157
- ...["node", "context", "extends", "__element", "__ref"],
158
+ "previousElement",
159
+ "getRootState",
160
+ "getRoot",
161
+ "getRootData",
162
+ "getRootContext",
163
+ "getContext",
164
+ "getChildren"
165
+ ]);
166
+ const METHODS_EXL = /* @__PURE__ */ new Set([
167
+ "node",
168
+ "context",
169
+ "extends",
170
+ "__element",
171
+ "__ref",
158
172
  ...METHODS,
159
173
  ...STATE_METHODS,
160
174
  ...PROPS_METHODS
161
- ];
162
- const DOMQL_EVENTS = [
175
+ ]);
176
+ const DOMQL_EVENTS = /* @__PURE__ */ new Set([
163
177
  "init",
164
178
  "beforeClassAssign",
165
179
  "render",
@@ -175,4 +189,4 @@ const DOMQL_EVENTS = [
175
189
  "complete",
176
190
  "frame",
177
191
  "update"
178
- ];
192
+ ]);