chayns-api 3.6.0-beta.3 → 3.6.0-beta.4

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.
@@ -8,7 +8,7 @@ var _reactCompilerRuntime = require("react-compiler-runtime");
8
8
  var _react = require("react");
9
9
  var _useFunctions = require("./useFunctions");
10
10
  const useFunctionsWithOverrides = overrideFactory => {
11
- const $ = (0, _reactCompilerRuntime.c)(12);
11
+ const $ = (0, _reactCompilerRuntime.c)(21);
12
12
  const base = (0, _useFunctions.useFunctions)();
13
13
  let t0;
14
14
  if ($[0] !== base || $[1] !== overrideFactory) {
@@ -21,53 +21,87 @@ const useFunctionsWithOverrides = overrideFactory => {
21
21
  }
22
22
  const overrides = t0;
23
23
  let t1;
24
- if ($[3] !== base || $[4] !== overrides) {
25
- t1 = {
26
- base,
27
- overrides
28
- };
24
+ if ($[3] !== base) {
25
+ t1 = Object.keys(base);
29
26
  $[3] = base;
30
- $[4] = overrides;
31
- $[5] = t1;
27
+ $[4] = t1;
32
28
  } else {
33
- t1 = $[5];
29
+ t1 = $[4];
34
30
  }
35
- const stateRef = (0, _react.useRef)(t1);
36
31
  let t2;
32
+ if ($[5] !== overrides) {
33
+ t2 = Object.keys(overrides);
34
+ $[5] = overrides;
35
+ $[6] = t2;
36
+ } else {
37
+ t2 = $[6];
38
+ }
37
39
  let t3;
38
- if ($[6] !== base || $[7] !== overrides) {
39
- t2 = () => {
40
+ if ($[7] !== t1 || $[8] !== t2) {
41
+ t3 = new Set([...t1, ...t2]);
42
+ $[7] = t1;
43
+ $[8] = t2;
44
+ $[9] = t3;
45
+ } else {
46
+ t3 = $[9];
47
+ }
48
+ let t4;
49
+ if ($[10] !== t3) {
50
+ t4 = [...t3];
51
+ $[10] = t3;
52
+ $[11] = t4;
53
+ } else {
54
+ t4 = $[11];
55
+ }
56
+ const functionNames = t4;
57
+ let t5;
58
+ if ($[12] !== base || $[13] !== overrides) {
59
+ t5 = {
60
+ base,
61
+ overrides
62
+ };
63
+ $[12] = base;
64
+ $[13] = overrides;
65
+ $[14] = t5;
66
+ } else {
67
+ t5 = $[14];
68
+ }
69
+ const stateRef = (0, _react.useRef)(t5);
70
+ let t6;
71
+ let t7;
72
+ if ($[15] !== base || $[16] !== overrides) {
73
+ t6 = () => {
40
74
  stateRef.current = {
41
75
  base,
42
76
  overrides
43
77
  };
44
78
  };
45
- t3 = [base, overrides];
46
- $[6] = base;
47
- $[7] = overrides;
48
- $[8] = t2;
49
- $[9] = t3;
79
+ t7 = [base, overrides];
80
+ $[15] = base;
81
+ $[16] = overrides;
82
+ $[17] = t6;
83
+ $[18] = t7;
50
84
  } else {
51
- t2 = $[8];
52
- t3 = $[9];
85
+ t6 = $[17];
86
+ t7 = $[18];
53
87
  }
54
- (0, _react.useEffect)(t2, t3);
88
+ (0, _react.useEffect)(t6, t7);
55
89
  let functions;
56
- if ($[10] !== base) {
90
+ if ($[19] !== functionNames) {
57
91
  functions = {};
58
- for (const key of Object.keys(base)) {
59
- functions[key] = (...t4) => {
92
+ for (const key of functionNames) {
93
+ functions[key] = (...t8) => {
60
94
  var _stateRef$current$ove;
61
- const args = t4;
95
+ const args = t8;
62
96
  const functionKey = key;
63
97
  const implementation = (_stateRef$current$ove = stateRef.current.overrides[functionKey]) !== null && _stateRef$current$ove !== void 0 ? _stateRef$current$ove : stateRef.current.base[functionKey];
64
98
  return implementation(...args);
65
99
  };
66
100
  }
67
- $[10] = base;
68
- $[11] = functions;
101
+ $[19] = functionNames;
102
+ $[20] = functions;
69
103
  } else {
70
- functions = $[11];
104
+ functions = $[20];
71
105
  }
72
106
  return functions;
73
107
  };
@@ -2,7 +2,7 @@ import { c as _c } from "react-compiler-runtime";
2
2
  import { useEffect, useMemo, useRef } from 'react';
3
3
  import { useFunctions } from './useFunctions';
4
4
  export const useFunctionsWithOverrides = overrideFactory => {
5
- const $ = _c(12);
5
+ const $ = _c(21);
6
6
  const base = useFunctions();
7
7
  let t0;
8
8
  if ($[0] !== base || $[1] !== overrideFactory) {
@@ -15,53 +15,87 @@ export const useFunctionsWithOverrides = overrideFactory => {
15
15
  }
16
16
  const overrides = t0;
17
17
  let t1;
18
- if ($[3] !== base || $[4] !== overrides) {
19
- t1 = {
20
- base,
21
- overrides
22
- };
18
+ if ($[3] !== base) {
19
+ t1 = Object.keys(base);
23
20
  $[3] = base;
24
- $[4] = overrides;
25
- $[5] = t1;
21
+ $[4] = t1;
26
22
  } else {
27
- t1 = $[5];
23
+ t1 = $[4];
28
24
  }
29
- const stateRef = useRef(t1);
30
25
  let t2;
26
+ if ($[5] !== overrides) {
27
+ t2 = Object.keys(overrides);
28
+ $[5] = overrides;
29
+ $[6] = t2;
30
+ } else {
31
+ t2 = $[6];
32
+ }
31
33
  let t3;
32
- if ($[6] !== base || $[7] !== overrides) {
33
- t2 = () => {
34
+ if ($[7] !== t1 || $[8] !== t2) {
35
+ t3 = new Set([...t1, ...t2]);
36
+ $[7] = t1;
37
+ $[8] = t2;
38
+ $[9] = t3;
39
+ } else {
40
+ t3 = $[9];
41
+ }
42
+ let t4;
43
+ if ($[10] !== t3) {
44
+ t4 = [...t3];
45
+ $[10] = t3;
46
+ $[11] = t4;
47
+ } else {
48
+ t4 = $[11];
49
+ }
50
+ const functionNames = t4;
51
+ let t5;
52
+ if ($[12] !== base || $[13] !== overrides) {
53
+ t5 = {
54
+ base,
55
+ overrides
56
+ };
57
+ $[12] = base;
58
+ $[13] = overrides;
59
+ $[14] = t5;
60
+ } else {
61
+ t5 = $[14];
62
+ }
63
+ const stateRef = useRef(t5);
64
+ let t6;
65
+ let t7;
66
+ if ($[15] !== base || $[16] !== overrides) {
67
+ t6 = () => {
34
68
  stateRef.current = {
35
69
  base,
36
70
  overrides
37
71
  };
38
72
  };
39
- t3 = [base, overrides];
40
- $[6] = base;
41
- $[7] = overrides;
42
- $[8] = t2;
43
- $[9] = t3;
73
+ t7 = [base, overrides];
74
+ $[15] = base;
75
+ $[16] = overrides;
76
+ $[17] = t6;
77
+ $[18] = t7;
44
78
  } else {
45
- t2 = $[8];
46
- t3 = $[9];
79
+ t6 = $[17];
80
+ t7 = $[18];
47
81
  }
48
- useEffect(t2, t3);
82
+ useEffect(t6, t7);
49
83
  let functions;
50
- if ($[10] !== base) {
84
+ if ($[19] !== functionNames) {
51
85
  functions = {};
52
- for (const key of Object.keys(base)) {
53
- functions[key] = (...t4) => {
86
+ for (const key of functionNames) {
87
+ functions[key] = (...t8) => {
54
88
  var _stateRef$current$ove;
55
- const args = t4;
89
+ const args = t8;
56
90
  const functionKey = key;
57
91
  const implementation = (_stateRef$current$ove = stateRef.current.overrides[functionKey]) !== null && _stateRef$current$ove !== void 0 ? _stateRef$current$ove : stateRef.current.base[functionKey];
58
92
  return implementation(...args);
59
93
  };
60
94
  }
61
- $[10] = base;
62
- $[11] = functions;
95
+ $[19] = functionNames;
96
+ $[20] = functions;
63
97
  } else {
64
- functions = $[11];
98
+ functions = $[20];
65
99
  }
66
100
  return functions;
67
101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "3.6.0-beta.3",
3
+ "version": "3.6.0-beta.4",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",