@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.
- package/array.js +11 -5
- package/cache.js +3 -0
- package/component.js +3 -4
- package/dist/cjs/array.js +11 -5
- package/dist/cjs/component.js +4 -6
- package/dist/cjs/element.js +6 -6
- package/dist/cjs/env.js +1 -1
- package/dist/cjs/events.js +3 -3
- package/dist/cjs/extends.js +44 -28
- package/dist/cjs/function.js +3 -3
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/key.js +2 -2
- package/dist/cjs/keys.js +29 -15
- package/dist/cjs/methods.js +88 -33
- package/dist/cjs/object.js +154 -141
- package/dist/cjs/props.js +43 -34
- package/dist/cjs/scope.js +1 -2
- package/dist/cjs/state.js +12 -11
- package/dist/cjs/string.js +15 -20
- package/dist/cjs/tags.js +71 -16
- package/dist/cjs/triggerEvent.js +90 -0
- package/dist/cjs/types.js +4 -12
- package/dist/esm/array.js +11 -5
- package/dist/esm/component.js +4 -6
- package/dist/esm/element.js +9 -27
- package/dist/esm/env.js +1 -1
- package/dist/esm/events.js +3 -3
- package/dist/esm/extends.js +48 -50
- package/dist/esm/function.js +3 -3
- package/dist/esm/index.js +1 -0
- package/dist/esm/key.js +2 -2
- package/dist/esm/keys.js +29 -15
- package/dist/esm/methods.js +86 -31
- package/dist/esm/object.js +158 -165
- package/dist/esm/props.js +43 -50
- package/dist/esm/scope.js +1 -2
- package/dist/esm/state.js +21 -38
- package/dist/esm/string.js +15 -20
- package/dist/esm/tags.js +71 -16
- package/dist/esm/triggerEvent.js +70 -0
- package/dist/esm/types.js +4 -12
- package/dist/iife/index.js +2779 -0
- package/element.js +2 -2
- package/events.js +3 -3
- package/extends.js +28 -17
- package/function.js +10 -9
- package/index.js +1 -0
- package/keys.js +25 -15
- package/log.js +0 -1
- package/methods.js +99 -24
- package/object.js +155 -215
- package/package.json +34 -13
- package/props.js +44 -27
- package/state.js +12 -12
- package/string.js +20 -38
- package/tags.js +45 -16
- package/triggerEvent.js +76 -0
- package/types.js +8 -25
- package/dist/cjs/package.json +0 -4
package/dist/esm/element.js
CHANGED
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
import { createExtends } from "./extends.js";
|
|
21
2
|
import { createKey } from "./key.js";
|
|
22
3
|
import { isNode } from "./node.js";
|
|
23
4
|
import { createProps } from "./props.js";
|
|
24
5
|
import { HTML_TAGS } from "./tags.js";
|
|
25
6
|
import { is, isFunction } from "./types.js";
|
|
26
|
-
const ENV =
|
|
7
|
+
const ENV = process.env.NODE_ENV;
|
|
27
8
|
const returnValueAsText = (element, parent, key) => {
|
|
28
9
|
const childExtendsTag = parent.childExtends && parent.childExtends.tag;
|
|
29
10
|
const childPropsTag = parent.props.childProps && parent.props.childProps.tag;
|
|
30
|
-
const isKeyValidHTMLTag = HTML_TAGS.body.
|
|
11
|
+
const isKeyValidHTMLTag = HTML_TAGS.body.has(key) && key;
|
|
31
12
|
return {
|
|
32
13
|
text: element,
|
|
33
14
|
tag: childExtendsTag || childPropsTag || isKeyValidHTMLTag || "string"
|
|
@@ -39,7 +20,7 @@ const createBasedOnType = (element, parent, key) => {
|
|
|
39
20
|
console.warn(
|
|
40
21
|
key,
|
|
41
22
|
"element is undefined in",
|
|
42
|
-
parent
|
|
23
|
+
parent?.__ref?.path
|
|
43
24
|
);
|
|
44
25
|
}
|
|
45
26
|
return {};
|
|
@@ -73,8 +54,8 @@ const createRoot = (element, parent) => {
|
|
|
73
54
|
const { __ref: ref } = element;
|
|
74
55
|
const { __ref: parentRef } = parent;
|
|
75
56
|
const hasRoot = parent && parent.key === ":root";
|
|
76
|
-
if (!
|
|
77
|
-
ref.root = hasRoot ? element : parentRef
|
|
57
|
+
if (!ref?.root) {
|
|
58
|
+
ref.root = hasRoot ? element : parentRef?.root;
|
|
78
59
|
}
|
|
79
60
|
};
|
|
80
61
|
const createPath = (element, parent, key) => {
|
|
@@ -104,7 +85,7 @@ const addCaching = (element, parent, key) => {
|
|
|
104
85
|
return ref;
|
|
105
86
|
};
|
|
106
87
|
const createElement = (passedProps, parentEl, passedKey, opts, root) => {
|
|
107
|
-
const hashed = passedProps
|
|
88
|
+
const hashed = passedProps?.__hash;
|
|
108
89
|
const element = hashed ? { extends: [passedProps] } : createBasedOnType(passedProps, parentEl, passedKey);
|
|
109
90
|
if (!element) return;
|
|
110
91
|
const parent = createParent(element, parentEl, passedKey, opts, root);
|
|
@@ -113,13 +94,14 @@ const createElement = (passedProps, parentEl, passedKey, opts, root) => {
|
|
|
113
94
|
const props = createProps(element, parent, key);
|
|
114
95
|
const context = addContext(element, parent, key, opts, root);
|
|
115
96
|
const on = element.on || {};
|
|
116
|
-
return
|
|
97
|
+
return {
|
|
98
|
+
...element,
|
|
117
99
|
key,
|
|
118
100
|
props,
|
|
119
101
|
parent,
|
|
120
102
|
context,
|
|
121
103
|
on
|
|
122
|
-
}
|
|
104
|
+
};
|
|
123
105
|
};
|
|
124
106
|
export {
|
|
125
107
|
addCaching,
|
package/dist/esm/env.js
CHANGED
package/dist/esm/events.js
CHANGED
|
@@ -6,9 +6,9 @@ function addEventFromProps(key, obj) {
|
|
|
6
6
|
const origEvent = on[eventName];
|
|
7
7
|
const funcFromProps = props[key];
|
|
8
8
|
if (isFunction(origEvent)) {
|
|
9
|
-
on[eventName] =
|
|
10
|
-
const originalEventRetunrs =
|
|
11
|
-
if (originalEventRetunrs !== false)
|
|
9
|
+
on[eventName] = (...args) => {
|
|
10
|
+
const originalEventRetunrs = origEvent(...args);
|
|
11
|
+
if (originalEventRetunrs !== false) funcFromProps(...args);
|
|
12
12
|
};
|
|
13
13
|
} else on[eventName] = funcFromProps;
|
|
14
14
|
}
|
package/dist/esm/extends.js
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
import { joinArrays, removeDuplicatesInArray } from "./array.js";
|
|
21
2
|
import { matchesComponentNaming } from "./component.js";
|
|
22
3
|
import { deepClone, exec } from "./object.js";
|
|
23
4
|
import { isArray, isObject, isString } from "./types.js";
|
|
24
|
-
const ENV =
|
|
5
|
+
const ENV = process.env.NODE_ENV;
|
|
25
6
|
const createExtendsFromKeys = (key) => {
|
|
26
7
|
if (key.includes("+")) {
|
|
27
8
|
return key.split("+").filter(matchesComponentNaming);
|
|
@@ -47,13 +28,12 @@ const createExtends = (element, parent, key) => {
|
|
|
47
28
|
return __extends;
|
|
48
29
|
};
|
|
49
30
|
const addExtends = (newExtends, element) => {
|
|
50
|
-
var _a;
|
|
51
31
|
const { __ref: ref } = element;
|
|
52
32
|
let { __extends } = ref;
|
|
53
33
|
if (!newExtends) return __extends;
|
|
54
|
-
const variant =
|
|
34
|
+
const variant = element.props?.variant;
|
|
55
35
|
const context = element.context;
|
|
56
|
-
if (variant &&
|
|
36
|
+
if (variant && context?.components && !Array.isArray(newExtends) && typeof newExtends === "string") {
|
|
57
37
|
const variantKey = `${newExtends}.${variant}`;
|
|
58
38
|
if (context.components[variantKey]) {
|
|
59
39
|
newExtends = variantKey;
|
|
@@ -70,9 +50,10 @@ const concatAddExtends = (newExtend, element) => {
|
|
|
70
50
|
const { extends: elementExtend } = element;
|
|
71
51
|
const originalArray = isArray(elementExtend) ? elementExtend : [elementExtend];
|
|
72
52
|
const receivedArray = isArray(newExtend) ? newExtend : [newExtend];
|
|
73
|
-
return
|
|
53
|
+
return {
|
|
54
|
+
...element,
|
|
74
55
|
extends: joinArrays(receivedArray, originalArray)
|
|
75
|
-
}
|
|
56
|
+
};
|
|
76
57
|
};
|
|
77
58
|
const generateHash = () => Math.random().toString(36).substring(2);
|
|
78
59
|
const extendStackRegistry = {};
|
|
@@ -85,7 +66,7 @@ const setHashedExtend = (extend, stack) => {
|
|
|
85
66
|
if (!isString(extend)) {
|
|
86
67
|
extend.__hash = hash;
|
|
87
68
|
}
|
|
88
|
-
if (
|
|
69
|
+
if (hash !== "__proto__" && hash !== "constructor" && hash !== "prototype") {
|
|
89
70
|
extendStackRegistry[hash] = stack;
|
|
90
71
|
}
|
|
91
72
|
return stack;
|
|
@@ -107,10 +88,16 @@ const extractArrayExtend = (extend, stack, context, processed = /* @__PURE__ */
|
|
|
107
88
|
return stack;
|
|
108
89
|
};
|
|
109
90
|
const deepExtend = (extend, stack, context, processed = /* @__PURE__ */ new Set()) => {
|
|
110
|
-
const extendOflattenExtend = extend.extends;
|
|
111
|
-
const cleanExtend =
|
|
91
|
+
const extendOflattenExtend = extend.extends || extend.extend;
|
|
92
|
+
const cleanExtend = { ...extend };
|
|
112
93
|
delete cleanExtend.extends;
|
|
113
|
-
|
|
94
|
+
delete cleanExtend.extend;
|
|
95
|
+
let hasKeys = false;
|
|
96
|
+
for (const _k in cleanExtend) {
|
|
97
|
+
hasKeys = true;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
if (hasKeys) {
|
|
114
101
|
stack.push(cleanExtend);
|
|
115
102
|
}
|
|
116
103
|
if (extendOflattenExtend) {
|
|
@@ -128,21 +115,30 @@ const flattenExtend = (extend, stack, context, processed = /* @__PURE__ */ new S
|
|
|
128
115
|
extend = mapStringsWithContextComponents(extend, context);
|
|
129
116
|
}
|
|
130
117
|
processed.add(extend);
|
|
131
|
-
if (extend
|
|
118
|
+
if (extend?.extends || extend?.extend) {
|
|
132
119
|
deepExtend(extend, stack, context, processed);
|
|
133
120
|
} else if (extend) {
|
|
134
121
|
stack.push(extend);
|
|
135
122
|
}
|
|
136
123
|
return stack;
|
|
137
124
|
};
|
|
125
|
+
const MERGE_EXTENDS_SKIP = /* @__PURE__ */ new Set([
|
|
126
|
+
"parent",
|
|
127
|
+
"node",
|
|
128
|
+
"__ref",
|
|
129
|
+
"__proto__",
|
|
130
|
+
"extend",
|
|
131
|
+
"childExtend",
|
|
132
|
+
"childExtendRecursive"
|
|
133
|
+
]);
|
|
138
134
|
const deepMergeExtends = (element, extend) => {
|
|
139
135
|
extend = deepClone(extend);
|
|
140
136
|
for (const e in extend) {
|
|
141
|
-
if (
|
|
137
|
+
if (MERGE_EXTENDS_SKIP.has(e)) continue;
|
|
142
138
|
const elementProp = element[e];
|
|
143
139
|
const extendProp = extend[e];
|
|
144
140
|
if (extendProp === void 0) continue;
|
|
145
|
-
if (Object.prototype.hasOwnProperty.call(extend, e) &&
|
|
141
|
+
if (Object.prototype.hasOwnProperty.call(extend, e) && e !== "__proto__" && e !== "constructor" && e !== "prototype") {
|
|
146
142
|
if (elementProp === void 0) {
|
|
147
143
|
element[e] = extendProp;
|
|
148
144
|
} else if (isObject(elementProp) && isObject(extendProp)) {
|
|
@@ -171,11 +167,11 @@ const cloneAndMergeArrayExtend = (stack) => {
|
|
|
171
167
|
}, {});
|
|
172
168
|
};
|
|
173
169
|
const mapStringsWithContextComponents = (extend, context, options = {}, variant) => {
|
|
174
|
-
const COMPONENTS = context
|
|
175
|
-
const PAGES = context
|
|
170
|
+
const COMPONENTS = context?.components || options.components;
|
|
171
|
+
const PAGES = context?.pages || options.pages;
|
|
176
172
|
if (isString(extend)) {
|
|
177
173
|
const componentExists = COMPONENTS && (COMPONENTS[extend + "." + variant] || COMPONENTS[extend] || COMPONENTS["smbls." + extend]);
|
|
178
|
-
const pageExists = PAGES && extend.
|
|
174
|
+
const pageExists = PAGES && extend.charCodeAt(0) === 47 && PAGES[extend];
|
|
179
175
|
if (componentExists) return componentExists;
|
|
180
176
|
else if (pageExists) return pageExists;
|
|
181
177
|
else {
|
|
@@ -206,7 +202,7 @@ const getExtendsInElement = (obj) => {
|
|
|
206
202
|
let result = [];
|
|
207
203
|
function traverse(o) {
|
|
208
204
|
for (const key in o) {
|
|
209
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
205
|
+
if (Object.prototype.hasOwnProperty.call(o, key)) {
|
|
210
206
|
if (matchesComponentNaming(key)) {
|
|
211
207
|
result.push(key);
|
|
212
208
|
}
|
|
@@ -227,14 +223,16 @@ const getExtendsInElement = (obj) => {
|
|
|
227
223
|
return result;
|
|
228
224
|
};
|
|
229
225
|
const createElementExtends = (element, parent, options = {}) => {
|
|
230
|
-
var _a;
|
|
231
226
|
const { __ref: ref } = element;
|
|
232
227
|
const context = element.context || parent.context;
|
|
233
|
-
const variant =
|
|
228
|
+
const variant = element.props?.variant;
|
|
229
|
+
if (element.extend && !element.extends) element.extends = element.extend;
|
|
230
|
+
delete element.extend;
|
|
231
|
+
if (!element.extends && element.props?.extends) element.extends = element.props.extends;
|
|
234
232
|
if (element.extends) {
|
|
235
233
|
if (Array.isArray(element.extends) && element.extends.length > 0) {
|
|
236
234
|
const [firstExtend, ...restExtends] = element.extends;
|
|
237
|
-
if (typeof firstExtend === "string" && variant &&
|
|
235
|
+
if (typeof firstExtend === "string" && variant && context?.components) {
|
|
238
236
|
const variantKey = `${firstExtend}.${variant}`;
|
|
239
237
|
if (context.components[variantKey]) {
|
|
240
238
|
addExtends([variantKey, ...restExtends], element);
|
|
@@ -244,7 +242,7 @@ const createElementExtends = (element, parent, options = {}) => {
|
|
|
244
242
|
} else {
|
|
245
243
|
addExtends(element.extends, element);
|
|
246
244
|
}
|
|
247
|
-
} else if (typeof element.extends === "string" && variant &&
|
|
245
|
+
} else if (typeof element.extends === "string" && variant && context?.components) {
|
|
248
246
|
const variantKey = `${element.extends}.${variant}`;
|
|
249
247
|
if (context.components[variantKey]) {
|
|
250
248
|
addExtends(variantKey, element);
|
|
@@ -267,28 +265,28 @@ const createElementExtends = (element, parent, options = {}) => {
|
|
|
267
265
|
return removeDuplicatesInArray(ref.__extends);
|
|
268
266
|
};
|
|
269
267
|
const inheritChildPropsExtends = (element, parent, options = {}) => {
|
|
270
|
-
var _a, _b, _c;
|
|
271
268
|
const { props, __ref: ref } = element;
|
|
272
|
-
const ignoreChildExtends = options.ignoreChildExtends ||
|
|
269
|
+
const ignoreChildExtends = options.ignoreChildExtends || props?.ignoreChildExtends;
|
|
273
270
|
if (!ignoreChildExtends) {
|
|
274
|
-
if (
|
|
275
|
-
addExtends(
|
|
271
|
+
if (parent.props?.childProps?.extends) {
|
|
272
|
+
addExtends(parent.props?.childProps.extends, element);
|
|
276
273
|
}
|
|
277
274
|
}
|
|
278
275
|
return ref.__extends;
|
|
279
276
|
};
|
|
280
277
|
const inheritChildExtends = (element, parent, options = {}) => {
|
|
281
278
|
const { props, __ref: ref } = element;
|
|
282
|
-
const ignoreChildExtends = options.ignoreChildExtends ||
|
|
283
|
-
|
|
284
|
-
|
|
279
|
+
const ignoreChildExtends = options.ignoreChildExtends || props?.ignoreChildExtends;
|
|
280
|
+
const childExtends = parent.childExtends || parent.childExtend;
|
|
281
|
+
if (!ignoreChildExtends && childExtends) {
|
|
282
|
+
addExtends(childExtends, element);
|
|
285
283
|
}
|
|
286
284
|
return ref.__extends;
|
|
287
285
|
};
|
|
288
286
|
const inheritRecursiveChildExtends = (element, parent, options = {}) => {
|
|
289
287
|
const { props, __ref: ref } = element;
|
|
290
|
-
const childExtendsRecursive = parent.childExtendsRecursive;
|
|
291
|
-
const ignoreChildExtendsRecursive = options.ignoreChildExtendsRecursive ||
|
|
288
|
+
const childExtendsRecursive = parent.childExtendsRecursive || parent.childExtendRecursive;
|
|
289
|
+
const ignoreChildExtendsRecursive = options.ignoreChildExtendsRecursive || props?.ignoreChildExtendsRecursive;
|
|
292
290
|
const isText = element.key === "__text";
|
|
293
291
|
if (childExtendsRecursive && !isText && !ignoreChildExtendsRecursive) {
|
|
294
292
|
addExtends(childExtendsRecursive, element);
|
|
@@ -298,7 +296,7 @@ const inheritRecursiveChildExtends = (element, parent, options = {}) => {
|
|
|
298
296
|
const createExtendsStack = (element, parent, options = {}) => {
|
|
299
297
|
const { props, __ref: ref } = element;
|
|
300
298
|
const context = element.context || parent.context;
|
|
301
|
-
const variant = element.variant ||
|
|
299
|
+
const variant = element.variant || props?.variant;
|
|
302
300
|
const __extends = removeDuplicatesInArray(
|
|
303
301
|
ref.__extends.map((val, i) => {
|
|
304
302
|
return mapStringsWithContextComponents(
|
package/dist/esm/function.js
CHANGED
|
@@ -35,16 +35,16 @@ const memoize = (fn) => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
+
const RE_STRING_FUNCTION = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
38
39
|
const isStringFunction = (inputString) => {
|
|
39
|
-
|
|
40
|
-
return functionRegex.test(inputString);
|
|
40
|
+
return RE_STRING_FUNCTION.test(inputString);
|
|
41
41
|
};
|
|
42
42
|
function cloneFunction(fn, win = window) {
|
|
43
43
|
const temp = function() {
|
|
44
44
|
return fn.apply(win, arguments);
|
|
45
45
|
};
|
|
46
46
|
for (const key in fn) {
|
|
47
|
-
if (Object.hasOwnProperty.call(fn, key)) {
|
|
47
|
+
if (Object.prototype.hasOwnProperty.call(fn, key)) {
|
|
48
48
|
temp[key] = fn[key];
|
|
49
49
|
}
|
|
50
50
|
}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/key.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { exec } from "./object.js";
|
|
2
|
-
const generateKey = /* @__PURE__ */ function() {
|
|
2
|
+
const generateKey = /* @__PURE__ */ (function() {
|
|
3
3
|
let index = 0;
|
|
4
4
|
function newId() {
|
|
5
5
|
index++;
|
|
6
6
|
return index;
|
|
7
7
|
}
|
|
8
8
|
return newId;
|
|
9
|
-
}();
|
|
9
|
+
})();
|
|
10
10
|
const createSnapshotId = generateKey;
|
|
11
11
|
const createKey = (element, parent, key) => {
|
|
12
12
|
return (exec(key, element) || key || element.key || generateKey()).toString();
|
package/dist/esm/keys.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const DOMQ_PROPERTIES = [
|
|
1
|
+
const DOMQ_PROPERTIES = /* @__PURE__ */ new Set([
|
|
2
2
|
"attr",
|
|
3
3
|
"style",
|
|
4
4
|
"text",
|
|
@@ -8,12 +8,16 @@ const DOMQ_PROPERTIES = [
|
|
|
8
8
|
"classlist",
|
|
9
9
|
"state",
|
|
10
10
|
"scope",
|
|
11
|
+
"root",
|
|
11
12
|
"deps",
|
|
13
|
+
"extend",
|
|
12
14
|
"extends",
|
|
13
15
|
"$router",
|
|
14
16
|
"routes",
|
|
15
17
|
"children",
|
|
18
|
+
"childExtend",
|
|
16
19
|
"childExtends",
|
|
20
|
+
"childExtendRecursive",
|
|
17
21
|
"childExtendsRecursive",
|
|
18
22
|
"props",
|
|
19
23
|
"if",
|
|
@@ -31,8 +35,8 @@ const DOMQ_PROPERTIES = [
|
|
|
31
35
|
"on",
|
|
32
36
|
"component",
|
|
33
37
|
"context"
|
|
34
|
-
];
|
|
35
|
-
const PARSED_DOMQ_PROPERTIES = [
|
|
38
|
+
]);
|
|
39
|
+
const PARSED_DOMQ_PROPERTIES = /* @__PURE__ */ new Set([
|
|
36
40
|
"attr",
|
|
37
41
|
"style",
|
|
38
42
|
"text",
|
|
@@ -50,7 +54,7 @@ const PARSED_DOMQ_PROPERTIES = [
|
|
|
50
54
|
"query",
|
|
51
55
|
"on",
|
|
52
56
|
"context"
|
|
53
|
-
];
|
|
57
|
+
]);
|
|
54
58
|
const STATE_PROPERTIES = [
|
|
55
59
|
"ref",
|
|
56
60
|
"parent",
|
|
@@ -60,7 +64,7 @@ const STATE_PROPERTIES = [
|
|
|
60
64
|
"__children",
|
|
61
65
|
"root"
|
|
62
66
|
];
|
|
63
|
-
const STATE_METHODS = [
|
|
67
|
+
const STATE_METHODS = /* @__PURE__ */ new Set([
|
|
64
68
|
"update",
|
|
65
69
|
"parse",
|
|
66
70
|
"clean",
|
|
@@ -93,9 +97,9 @@ const STATE_METHODS = [
|
|
|
93
97
|
"removeByPath",
|
|
94
98
|
"removePathCollection",
|
|
95
99
|
"getByPath"
|
|
96
|
-
];
|
|
97
|
-
const PROPS_METHODS = ["update", "__element"];
|
|
98
|
-
const METHODS = [
|
|
100
|
+
]);
|
|
101
|
+
const PROPS_METHODS = /* @__PURE__ */ new Set(["update", "__element"]);
|
|
102
|
+
const METHODS = /* @__PURE__ */ new Set([
|
|
99
103
|
"set",
|
|
100
104
|
"reset",
|
|
101
105
|
"update",
|
|
@@ -121,15 +125,25 @@ const METHODS = [
|
|
|
121
125
|
"error",
|
|
122
126
|
"call",
|
|
123
127
|
"nextElement",
|
|
124
|
-
"previousElement"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
"previousElement",
|
|
129
|
+
"getRootState",
|
|
130
|
+
"getRoot",
|
|
131
|
+
"getRootData",
|
|
132
|
+
"getRootContext",
|
|
133
|
+
"getContext",
|
|
134
|
+
"getChildren"
|
|
135
|
+
]);
|
|
136
|
+
const METHODS_EXL = /* @__PURE__ */ new Set([
|
|
137
|
+
"node",
|
|
138
|
+
"context",
|
|
139
|
+
"extends",
|
|
140
|
+
"__element",
|
|
141
|
+
"__ref",
|
|
128
142
|
...METHODS,
|
|
129
143
|
...STATE_METHODS,
|
|
130
144
|
...PROPS_METHODS
|
|
131
|
-
];
|
|
132
|
-
const DOMQL_EVENTS = [
|
|
145
|
+
]);
|
|
146
|
+
const DOMQL_EVENTS = /* @__PURE__ */ new Set([
|
|
133
147
|
"init",
|
|
134
148
|
"beforeClassAssign",
|
|
135
149
|
"render",
|
|
@@ -145,7 +159,7 @@ const DOMQL_EVENTS = [
|
|
|
145
159
|
"complete",
|
|
146
160
|
"frame",
|
|
147
161
|
"update"
|
|
148
|
-
];
|
|
162
|
+
]);
|
|
149
163
|
export {
|
|
150
164
|
DOMQL_EVENTS,
|
|
151
165
|
DOMQ_PROPERTIES,
|