domql 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/dist/cjs/index.js CHANGED
@@ -22,49 +22,38 @@ __export(index_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(index_exports);
24
24
  var import_element = require("@domql/element");
25
- const create = async (element, parent, key, options) => {
26
- var _a, _b, _c, _d, _e;
27
- const domqlElement = await (import_element.create.default || import_element.create)(
25
+ const create = (element, parent, key, options) => {
26
+ const domqlElement = (import_element.create.default || import_element.create)(
28
27
  element,
29
28
  parent,
30
29
  key,
31
30
  options
32
31
  );
33
- const complete = (_a = domqlElement.on) == null ? void 0 : _a.complete;
32
+ const complete = domqlElement.on?.complete;
34
33
  if (complete) {
35
- await domqlElement.on.complete(
36
- element,
37
- element.state,
38
- element.context,
39
- options
40
- );
34
+ domqlElement.on.complete(element, element.state, element.context, options);
41
35
  }
42
- const onComplete = (_b = domqlElement.props) == null ? void 0 : _b.onComplete;
36
+ const onComplete = domqlElement.props?.onComplete;
43
37
  if (onComplete) {
44
- await ((_c = domqlElement.props) == null ? void 0 : _c.onComplete(
38
+ domqlElement.props?.onComplete(
45
39
  element,
46
40
  element.state,
47
41
  element.context,
48
42
  options
49
- ));
43
+ );
50
44
  }
51
- const initInspect = (_d = domqlElement.on) == null ? void 0 : _d.initInspect;
45
+ const initInspect = domqlElement.on?.initInspect;
52
46
  if (initInspect) {
53
- await domqlElement.on.initInspect(
47
+ domqlElement.on.initInspect(
54
48
  element,
55
49
  element.state,
56
50
  element.context,
57
51
  options
58
52
  );
59
53
  }
60
- const initSync = (_e = domqlElement.on) == null ? void 0 : _e.initSync;
54
+ const initSync = domqlElement.on?.initSync;
61
55
  if (initSync) {
62
- await domqlElement.on.initSync(
63
- element,
64
- element.state,
65
- element.context,
66
- options
67
- );
56
+ domqlElement.on.initSync(element, element.state, element.context, options);
68
57
  }
69
58
  return domqlElement;
70
59
  };
package/dist/esm/index.js CHANGED
@@ -1,47 +1,36 @@
1
1
  import { TREE, create as createElement } from "@domql/element";
2
- const create = async (element, parent, key, options) => {
3
- var _a, _b, _c, _d, _e;
4
- const domqlElement = await (createElement.default || createElement)(
2
+ const create = (element, parent, key, options) => {
3
+ const domqlElement = (createElement.default || createElement)(
5
4
  element,
6
5
  parent,
7
6
  key,
8
7
  options
9
8
  );
10
- const complete = (_a = domqlElement.on) == null ? void 0 : _a.complete;
9
+ const complete = domqlElement.on?.complete;
11
10
  if (complete) {
12
- await domqlElement.on.complete(
13
- element,
14
- element.state,
15
- element.context,
16
- options
17
- );
11
+ domqlElement.on.complete(element, element.state, element.context, options);
18
12
  }
19
- const onComplete = (_b = domqlElement.props) == null ? void 0 : _b.onComplete;
13
+ const onComplete = domqlElement.props?.onComplete;
20
14
  if (onComplete) {
21
- await ((_c = domqlElement.props) == null ? void 0 : _c.onComplete(
15
+ domqlElement.props?.onComplete(
22
16
  element,
23
17
  element.state,
24
18
  element.context,
25
19
  options
26
- ));
20
+ );
27
21
  }
28
- const initInspect = (_d = domqlElement.on) == null ? void 0 : _d.initInspect;
22
+ const initInspect = domqlElement.on?.initInspect;
29
23
  if (initInspect) {
30
- await domqlElement.on.initInspect(
24
+ domqlElement.on.initInspect(
31
25
  element,
32
26
  element.state,
33
27
  element.context,
34
28
  options
35
29
  );
36
30
  }
37
- const initSync = (_e = domqlElement.on) == null ? void 0 : _e.initSync;
31
+ const initSync = domqlElement.on?.initSync;
38
32
  if (initSync) {
39
- await domqlElement.on.initSync(
40
- element,
41
- element.state,
42
- element.context,
43
- options
44
- );
33
+ domqlElement.on.initSync(element, element.state, element.context, options);
45
34
  }
46
35
  return domqlElement;
47
36
  };