@tinacms/app 1.0.4 → 1.0.5

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 (102) hide show
  1. package/appFiles/node_modules/.package-lock.json +16 -16
  2. package/appFiles/node_modules/@babel/generator/lib/buffer.js +1 -16
  3. package/appFiles/node_modules/@babel/generator/lib/buffer.js.map +1 -1
  4. package/appFiles/node_modules/@babel/generator/lib/generators/base.js +0 -2
  5. package/appFiles/node_modules/@babel/generator/lib/generators/base.js.map +1 -1
  6. package/appFiles/node_modules/@babel/generator/lib/generators/classes.js +0 -6
  7. package/appFiles/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
  8. package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js +1 -6
  9. package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
  10. package/appFiles/node_modules/@babel/generator/lib/generators/flow.js +0 -2
  11. package/appFiles/node_modules/@babel/generator/lib/generators/flow.js.map +1 -1
  12. package/appFiles/node_modules/@babel/generator/lib/generators/methods.js +4 -11
  13. package/appFiles/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
  14. package/appFiles/node_modules/@babel/generator/lib/generators/modules.js +0 -1
  15. package/appFiles/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
  16. package/appFiles/node_modules/@babel/generator/lib/generators/statements.js +0 -3
  17. package/appFiles/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
  18. package/appFiles/node_modules/@babel/generator/lib/generators/types.js +1 -5
  19. package/appFiles/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
  20. package/appFiles/node_modules/@babel/generator/lib/generators/typescript.js +2 -4
  21. package/appFiles/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -1
  22. package/appFiles/node_modules/@babel/generator/lib/index.js +0 -6
  23. package/appFiles/node_modules/@babel/generator/lib/index.js.map +1 -1
  24. package/appFiles/node_modules/@babel/generator/lib/node/index.js +0 -1
  25. package/appFiles/node_modules/@babel/generator/lib/node/index.js.map +1 -1
  26. package/appFiles/node_modules/@babel/generator/lib/node/parentheses.js +3 -14
  27. package/appFiles/node_modules/@babel/generator/lib/node/parentheses.js.map +1 -1
  28. package/appFiles/node_modules/@babel/generator/lib/node/whitespace.js +1 -15
  29. package/appFiles/node_modules/@babel/generator/lib/node/whitespace.js.map +1 -1
  30. package/appFiles/node_modules/@babel/generator/lib/printer.js +5 -45
  31. package/appFiles/node_modules/@babel/generator/lib/printer.js.map +1 -1
  32. package/appFiles/node_modules/@babel/generator/lib/source-map.js +0 -4
  33. package/appFiles/node_modules/@babel/generator/lib/source-map.js.map +1 -1
  34. package/appFiles/node_modules/@babel/generator/package.json +2 -2
  35. package/appFiles/node_modules/@babel/parser/lib/index.js +147 -673
  36. package/appFiles/node_modules/@babel/parser/lib/index.js.map +1 -1
  37. package/appFiles/node_modules/@babel/parser/package.json +1 -1
  38. package/appFiles/node_modules/@babel/runtime/helpers/applyDecs2203.js +170 -167
  39. package/appFiles/node_modules/@babel/runtime/helpers/applyDecs2203R.js +188 -0
  40. package/appFiles/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +170 -167
  41. package/appFiles/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +187 -0
  42. package/appFiles/node_modules/@babel/runtime/package.json +10 -1
  43. package/appFiles/node_modules/@babel/traverse/lib/context.js +2 -14
  44. package/appFiles/node_modules/@babel/traverse/lib/context.js.map +1 -1
  45. package/appFiles/node_modules/@babel/traverse/lib/index.js +1 -4
  46. package/appFiles/node_modules/@babel/traverse/lib/index.js.map +1 -1
  47. package/appFiles/node_modules/@babel/traverse/lib/path/ancestry.js +0 -19
  48. package/appFiles/node_modules/@babel/traverse/lib/path/ancestry.js.map +1 -1
  49. package/appFiles/node_modules/@babel/traverse/lib/path/comments.js +0 -2
  50. package/appFiles/node_modules/@babel/traverse/lib/path/comments.js.map +1 -1
  51. package/appFiles/node_modules/@babel/traverse/lib/path/context.js +5 -21
  52. package/appFiles/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
  53. package/appFiles/node_modules/@babel/traverse/lib/path/conversion.js +6 -30
  54. package/appFiles/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
  55. package/appFiles/node_modules/@babel/traverse/lib/path/evaluation.js +14 -20
  56. package/appFiles/node_modules/@babel/traverse/lib/path/evaluation.js.map +1 -1
  57. package/appFiles/node_modules/@babel/traverse/lib/path/family.js +3 -9
  58. package/appFiles/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
  59. package/appFiles/node_modules/@babel/traverse/lib/path/index.js +1 -6
  60. package/appFiles/node_modules/@babel/traverse/lib/path/index.js.map +1 -1
  61. package/appFiles/node_modules/@babel/traverse/lib/path/inference/index.js +1 -9
  62. package/appFiles/node_modules/@babel/traverse/lib/path/inference/index.js.map +1 -1
  63. package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +1 -13
  64. package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js.map +1 -1
  65. package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferers.js +2 -5
  66. package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferers.js.map +1 -1
  67. package/appFiles/node_modules/@babel/traverse/lib/path/introspection.js +16 -62
  68. package/appFiles/node_modules/@babel/traverse/lib/path/introspection.js.map +1 -1
  69. package/appFiles/node_modules/@babel/traverse/lib/path/lib/hoister.js +1 -22
  70. package/appFiles/node_modules/@babel/traverse/lib/path/lib/hoister.js.map +1 -1
  71. package/appFiles/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js +1 -7
  72. package/appFiles/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js.map +1 -1
  73. package/appFiles/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js +0 -2
  74. package/appFiles/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js.map +1 -1
  75. package/appFiles/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +0 -1
  76. package/appFiles/node_modules/@babel/traverse/lib/path/lib/virtual-types.js.map +1 -1
  77. package/appFiles/node_modules/@babel/traverse/lib/path/modification.js +7 -24
  78. package/appFiles/node_modules/@babel/traverse/lib/path/modification.js.map +1 -1
  79. package/appFiles/node_modules/@babel/traverse/lib/path/removal.js +0 -1
  80. package/appFiles/node_modules/@babel/traverse/lib/path/removal.js.map +1 -1
  81. package/appFiles/node_modules/@babel/traverse/lib/path/replacement.js +2 -16
  82. package/appFiles/node_modules/@babel/traverse/lib/path/replacement.js.map +1 -1
  83. package/appFiles/node_modules/@babel/traverse/lib/scope/binding.js +1 -6
  84. package/appFiles/node_modules/@babel/traverse/lib/scope/binding.js.map +1 -1
  85. package/appFiles/node_modules/@babel/traverse/lib/scope/index.js +9 -53
  86. package/appFiles/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
  87. package/appFiles/node_modules/@babel/traverse/lib/scope/lib/renamer.js +4 -8
  88. package/appFiles/node_modules/@babel/traverse/lib/scope/lib/renamer.js.map +1 -1
  89. package/appFiles/node_modules/@babel/traverse/lib/visitors.js +2 -23
  90. package/appFiles/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
  91. package/appFiles/node_modules/@babel/traverse/package.json +2 -2
  92. package/appFiles/node_modules/css-to-react-native/README.md +4 -2
  93. package/appFiles/node_modules/css-to-react-native/index.js +13 -6
  94. package/appFiles/node_modules/css-to-react-native/package.json +2 -1
  95. package/appFiles/node_modules/css-to-react-native/src/__tests__/fontVariant.js +8 -0
  96. package/appFiles/node_modules/css-to-react-native/src/transforms/fontVariant.js +14 -0
  97. package/appFiles/node_modules/css-to-react-native/src/transforms/index.js +5 -7
  98. package/appFiles/src/fields/rich-text/monaco/index.tsx +12 -10
  99. package/appFiles/src/fields/rich-text/monaco/mdx.js +41 -35
  100. package/appFiles/src/lib/machines/document-machine.ts +1 -1
  101. package/dist/index.js +1 -1
  102. package/package.json +5 -4
@@ -1,183 +1,186 @@
1
1
  import _typeof from "./typeof.js";
2
- function createAddInitializerMethod(initializers, decoratorFinishedRef) {
3
- return function (initializer) {
4
- assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
5
- };
6
- }
7
- function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
8
- var kindStr;
9
- switch (kind) {
10
- case 1:
11
- kindStr = "accessor";
12
- break;
13
- case 2:
14
- kindStr = "method";
15
- break;
16
- case 3:
17
- kindStr = "getter";
18
- break;
19
- case 4:
20
- kindStr = "setter";
21
- break;
22
- default:
23
- kindStr = "field";
24
- }
25
- var get,
26
- set,
27
- ctx = {
28
- kind: kindStr,
29
- name: isPrivate ? "#" + name : name,
30
- "static": isStatic,
31
- "private": isPrivate
32
- },
33
- decoratorFinishedRef = {
34
- v: !1
2
+ function applyDecs2203Factory() {
3
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
4
+ return function (initializer) {
5
+ !function (decoratorFinishedRef, fnName) {
6
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
7
+ }(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
35
8
  };
36
- 0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
37
- return this[name];
38
- }, set = function set(v) {
39
- this[name] = v;
40
- }) : 2 === kind ? get = function get() {
41
- return desc.value;
42
- } : (1 !== kind && 3 !== kind || (get = function get() {
43
- return desc.get.call(this);
44
- }), 1 !== kind && 4 !== kind || (set = function set(v) {
45
- desc.set.call(this, v);
46
- })), ctx.access = get && set ? {
47
- get: get,
48
- set: set
49
- } : get ? {
50
- get: get
51
- } : {
52
- set: set
53
- };
54
- try {
55
- return dec(value, ctx);
56
- } finally {
57
- decoratorFinishedRef.v = !0;
58
9
  }
59
- }
60
- function assertNotFinished(decoratorFinishedRef, fnName) {
61
- if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
62
- }
63
- function assertCallable(fn, hint) {
64
- if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
65
- }
66
- function assertValidReturnValue(kind, value) {
67
- var type = _typeof(value);
68
- if (1 === kind) {
69
- if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
70
- void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
71
- } else if ("function" !== type) {
72
- var hint;
73
- throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
74
- }
75
- }
76
- function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
77
- var desc,
78
- init,
79
- value,
80
- newValue,
81
- get,
82
- set,
83
- decs = decInfo[0];
84
- if (isPrivate ? desc = 0 === kind || 1 === kind ? {
85
- get: decInfo[3],
86
- set: decInfo[4]
87
- } : 3 === kind ? {
88
- get: decInfo[3]
89
- } : 4 === kind ? {
90
- set: decInfo[3]
91
- } : {
92
- value: decInfo[3]
93
- } : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
94
- get: desc.get,
95
- set: desc.set
96
- } : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
97
- get: get,
98
- set: set
99
- }) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
100
- var newInit;
101
- if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
10
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
11
+ var kindStr;
12
+ switch (kind) {
13
+ case 1:
14
+ kindStr = "accessor";
15
+ break;
16
+ case 2:
17
+ kindStr = "method";
18
+ break;
19
+ case 3:
20
+ kindStr = "getter";
21
+ break;
22
+ case 4:
23
+ kindStr = "setter";
24
+ break;
25
+ default:
26
+ kindStr = "field";
27
+ }
28
+ var get,
29
+ set,
30
+ ctx = {
31
+ kind: kindStr,
32
+ name: isPrivate ? "#" + name : name,
33
+ "static": isStatic,
34
+ "private": isPrivate
35
+ },
36
+ decoratorFinishedRef = {
37
+ v: !1
38
+ };
39
+ 0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
40
+ return this[name];
41
+ }, set = function set(v) {
42
+ this[name] = v;
43
+ }) : 2 === kind ? get = function get() {
44
+ return desc.value;
45
+ } : (1 !== kind && 3 !== kind || (get = function get() {
46
+ return desc.get.call(this);
47
+ }), 1 !== kind && 4 !== kind || (set = function set(v) {
48
+ desc.set.call(this, v);
49
+ })), ctx.access = get && set ? {
102
50
  get: get,
103
51
  set: set
104
- }) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
105
- }
106
- if (0 === kind || 1 === kind) {
107
- if (void 0 === init) init = function init(instance, _init) {
108
- return _init;
109
- };else if ("function" != typeof init) {
110
- var ownInitializers = init;
111
- init = function init(instance, _init2) {
112
- for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
113
- return value;
114
- };
115
- } else {
116
- var originalInitializer = init;
117
- init = function init(instance, _init3) {
118
- return originalInitializer.call(instance, _init3);
119
- };
52
+ } : get ? {
53
+ get: get
54
+ } : {
55
+ set: set
56
+ };
57
+ try {
58
+ return dec(value, ctx);
59
+ } finally {
60
+ decoratorFinishedRef.v = !0;
120
61
  }
121
- ret.push(init);
122
62
  }
123
- 0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
124
- return value.get.call(instance, args);
125
- }), ret.push(function (instance, args) {
126
- return value.set.call(instance, args);
127
- })) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
128
- return value.call(instance, args);
129
- }) : Object.defineProperty(base, name, desc));
130
- }
131
- function applyMemberDecs(ret, Class, decInfos) {
132
- for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
133
- var decInfo = decInfos[i];
134
- if (Array.isArray(decInfo)) {
135
- var base,
136
- initializers,
137
- kind = decInfo[1],
138
- name = decInfo[2],
139
- isPrivate = decInfo.length > 3,
140
- isStatic = kind >= 5;
141
- if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
142
- var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
143
- existingKind = existingNonFields.get(name) || 0;
144
- if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
145
- !existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
146
- }
147
- applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
63
+ function assertCallable(fn, hint) {
64
+ if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
65
+ }
66
+ function assertValidReturnValue(kind, value) {
67
+ var type = _typeof(value);
68
+ if (1 === kind) {
69
+ if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
70
+ void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
71
+ } else if ("function" !== type) {
72
+ var hint;
73
+ throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
148
74
  }
149
75
  }
150
- pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers);
151
- }
152
- function pushInitializers(ret, initializers) {
153
- initializers && ret.push(function (instance) {
154
- for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
155
- return instance;
156
- });
157
- }
158
- function applyClassDecs(ret, targetClass, classDecs) {
159
- if (classDecs.length > 0) {
160
- for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
161
- var decoratorFinishedRef = {
162
- v: !1
163
- };
164
- try {
165
- var nextNewClass = classDecs[i](newClass, {
166
- kind: "class",
167
- name: name,
168
- addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
169
- });
170
- } finally {
171
- decoratorFinishedRef.v = !0;
76
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
77
+ var desc,
78
+ init,
79
+ value,
80
+ newValue,
81
+ get,
82
+ set,
83
+ decs = decInfo[0];
84
+ if (isPrivate ? desc = 0 === kind || 1 === kind ? {
85
+ get: decInfo[3],
86
+ set: decInfo[4]
87
+ } : 3 === kind ? {
88
+ get: decInfo[3]
89
+ } : 4 === kind ? {
90
+ set: decInfo[3]
91
+ } : {
92
+ value: decInfo[3]
93
+ } : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
94
+ get: desc.get,
95
+ set: desc.set
96
+ } : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
97
+ get: get,
98
+ set: set
99
+ }) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
100
+ var newInit;
101
+ if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
102
+ get: get,
103
+ set: set
104
+ }) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
105
+ }
106
+ if (0 === kind || 1 === kind) {
107
+ if (void 0 === init) init = function init(instance, _init) {
108
+ return _init;
109
+ };else if ("function" != typeof init) {
110
+ var ownInitializers = init;
111
+ init = function init(instance, _init2) {
112
+ for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
113
+ return value;
114
+ };
115
+ } else {
116
+ var originalInitializer = init;
117
+ init = function init(instance, _init3) {
118
+ return originalInitializer.call(instance, _init3);
119
+ };
172
120
  }
173
- void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
121
+ ret.push(init);
174
122
  }
175
- ret.push(newClass, function () {
176
- for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
123
+ 0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
124
+ return value.get.call(instance, args);
125
+ }), ret.push(function (instance, args) {
126
+ return value.set.call(instance, args);
127
+ })) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
128
+ return value.call(instance, args);
129
+ }) : Object.defineProperty(base, name, desc));
130
+ }
131
+ function pushInitializers(ret, initializers) {
132
+ initializers && ret.push(function (instance) {
133
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
134
+ return instance;
177
135
  });
178
136
  }
137
+ return function (targetClass, memberDecs, classDecs) {
138
+ var ret = [];
139
+ return function (ret, Class, decInfos) {
140
+ for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
141
+ var decInfo = decInfos[i];
142
+ if (Array.isArray(decInfo)) {
143
+ var base,
144
+ initializers,
145
+ kind = decInfo[1],
146
+ name = decInfo[2],
147
+ isPrivate = decInfo.length > 3,
148
+ isStatic = kind >= 5;
149
+ if (isStatic ? (base = Class, 0 != (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
150
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
151
+ existingKind = existingNonFields.get(name) || 0;
152
+ if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
153
+ !existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
154
+ }
155
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
156
+ }
157
+ }
158
+ pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers);
159
+ }(ret, targetClass, memberDecs), function (ret, targetClass, classDecs) {
160
+ if (classDecs.length > 0) {
161
+ for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
162
+ var decoratorFinishedRef = {
163
+ v: !1
164
+ };
165
+ try {
166
+ var nextNewClass = classDecs[i](newClass, {
167
+ kind: "class",
168
+ name: name,
169
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
170
+ });
171
+ } finally {
172
+ decoratorFinishedRef.v = !0;
173
+ }
174
+ void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
175
+ }
176
+ ret.push(newClass, function () {
177
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
178
+ });
179
+ }
180
+ }(ret, targetClass, classDecs), ret;
181
+ };
179
182
  }
183
+ var applyDecs2203Impl;
180
184
  export default function applyDecs2203(targetClass, memberDecs, classDecs) {
181
- var ret = [];
182
- return applyMemberDecs(ret, targetClass, memberDecs), applyClassDecs(ret, targetClass, classDecs), ret;
185
+ return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(targetClass, memberDecs, classDecs);
183
186
  }
@@ -0,0 +1,187 @@
1
+ import _typeof from "./typeof.js";
2
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
3
+ return function (initializer) {
4
+ assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
5
+ };
6
+ }
7
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
8
+ var kindStr;
9
+ switch (kind) {
10
+ case 1:
11
+ kindStr = "accessor";
12
+ break;
13
+ case 2:
14
+ kindStr = "method";
15
+ break;
16
+ case 3:
17
+ kindStr = "getter";
18
+ break;
19
+ case 4:
20
+ kindStr = "setter";
21
+ break;
22
+ default:
23
+ kindStr = "field";
24
+ }
25
+ var get,
26
+ set,
27
+ ctx = {
28
+ kind: kindStr,
29
+ name: isPrivate ? "#" + name : name,
30
+ "static": isStatic,
31
+ "private": isPrivate
32
+ },
33
+ decoratorFinishedRef = {
34
+ v: !1
35
+ };
36
+ 0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
37
+ return this[name];
38
+ }, set = function set(v) {
39
+ this[name] = v;
40
+ }) : 2 === kind ? get = function get() {
41
+ return desc.value;
42
+ } : (1 !== kind && 3 !== kind || (get = function get() {
43
+ return desc.get.call(this);
44
+ }), 1 !== kind && 4 !== kind || (set = function set(v) {
45
+ desc.set.call(this, v);
46
+ })), ctx.access = get && set ? {
47
+ get: get,
48
+ set: set
49
+ } : get ? {
50
+ get: get
51
+ } : {
52
+ set: set
53
+ };
54
+ try {
55
+ return dec(value, ctx);
56
+ } finally {
57
+ decoratorFinishedRef.v = !0;
58
+ }
59
+ }
60
+ function assertNotFinished(decoratorFinishedRef, fnName) {
61
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
62
+ }
63
+ function assertCallable(fn, hint) {
64
+ if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
65
+ }
66
+ function assertValidReturnValue(kind, value) {
67
+ var type = _typeof(value);
68
+ if (1 === kind) {
69
+ if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
70
+ void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
71
+ } else if ("function" !== type) {
72
+ var hint;
73
+ throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
74
+ }
75
+ }
76
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
77
+ var desc,
78
+ init,
79
+ value,
80
+ newValue,
81
+ get,
82
+ set,
83
+ decs = decInfo[0];
84
+ if (isPrivate ? desc = 0 === kind || 1 === kind ? {
85
+ get: decInfo[3],
86
+ set: decInfo[4]
87
+ } : 3 === kind ? {
88
+ get: decInfo[3]
89
+ } : 4 === kind ? {
90
+ set: decInfo[3]
91
+ } : {
92
+ value: decInfo[3]
93
+ } : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
94
+ get: desc.get,
95
+ set: desc.set
96
+ } : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
97
+ get: get,
98
+ set: set
99
+ }) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
100
+ var newInit;
101
+ if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
102
+ get: get,
103
+ set: set
104
+ }) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
105
+ }
106
+ if (0 === kind || 1 === kind) {
107
+ if (void 0 === init) init = function init(instance, _init) {
108
+ return _init;
109
+ };else if ("function" != typeof init) {
110
+ var ownInitializers = init;
111
+ init = function init(instance, _init2) {
112
+ for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
113
+ return value;
114
+ };
115
+ } else {
116
+ var originalInitializer = init;
117
+ init = function init(instance, _init3) {
118
+ return originalInitializer.call(instance, _init3);
119
+ };
120
+ }
121
+ ret.push(init);
122
+ }
123
+ 0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
124
+ return value.get.call(instance, args);
125
+ }), ret.push(function (instance, args) {
126
+ return value.set.call(instance, args);
127
+ })) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
128
+ return value.call(instance, args);
129
+ }) : Object.defineProperty(base, name, desc));
130
+ }
131
+ function applyMemberDecs(Class, decInfos) {
132
+ for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
133
+ var decInfo = decInfos[i];
134
+ if (Array.isArray(decInfo)) {
135
+ var base,
136
+ initializers,
137
+ kind = decInfo[1],
138
+ name = decInfo[2],
139
+ isPrivate = decInfo.length > 3,
140
+ isStatic = kind >= 5;
141
+ if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
142
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
143
+ existingKind = existingNonFields.get(name) || 0;
144
+ if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
145
+ !existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
146
+ }
147
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
148
+ }
149
+ }
150
+ return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;
151
+ }
152
+ function pushInitializers(ret, initializers) {
153
+ initializers && ret.push(function (instance) {
154
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
155
+ return instance;
156
+ });
157
+ }
158
+ function applyClassDecs(targetClass, classDecs) {
159
+ if (classDecs.length > 0) {
160
+ for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
161
+ var decoratorFinishedRef = {
162
+ v: !1
163
+ };
164
+ try {
165
+ var nextNewClass = classDecs[i](newClass, {
166
+ kind: "class",
167
+ name: name,
168
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
169
+ });
170
+ } finally {
171
+ decoratorFinishedRef.v = !0;
172
+ }
173
+ void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
174
+ }
175
+ return [newClass, function () {
176
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
177
+ }];
178
+ }
179
+ }
180
+ export default function applyDecs2203R(targetClass, memberDecs, classDecs) {
181
+ return {
182
+ e: applyMemberDecs(targetClass, memberDecs),
183
+ get c() {
184
+ return applyClassDecs(targetClass, classDecs);
185
+ }
186
+ };
187
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/runtime",
3
- "version": "7.20.7",
3
+ "version": "7.20.13",
4
4
  "description": "babel's modular runtime helpers",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -53,6 +53,15 @@
53
53
  "./helpers/applyDecs2203.js"
54
54
  ],
55
55
  "./helpers/esm/applyDecs2203": "./helpers/esm/applyDecs2203.js",
56
+ "./helpers/applyDecs2203R": [
57
+ {
58
+ "node": "./helpers/applyDecs2203R.js",
59
+ "import": "./helpers/esm/applyDecs2203R.js",
60
+ "default": "./helpers/applyDecs2203R.js"
61
+ },
62
+ "./helpers/applyDecs2203R.js"
63
+ ],
64
+ "./helpers/esm/applyDecs2203R": "./helpers/esm/applyDecs2203R.js",
56
65
  "./helpers/asyncGeneratorDelegate": [
57
66
  {
58
67
  "node": "./helpers/asyncGeneratorDelegate.js",
@@ -18,19 +18,14 @@ class TraversalContext {
18
18
  this.state = state;
19
19
  this.opts = opts;
20
20
  }
21
-
22
21
  shouldVisit(node) {
23
22
  const opts = this.opts;
24
23
  if (opts.enter || opts.exit) return true;
25
-
26
24
  if (opts[node.type]) return true;
27
-
28
25
  const keys = VISITOR_KEYS[node.type];
29
26
  if (!(keys != null && keys.length)) return false;
30
-
31
27
  for (const key of keys) {
32
- if (
33
- node[key]) {
28
+ if (node[key]) {
34
29
  return true;
35
30
  }
36
31
  }
@@ -57,7 +52,6 @@ class TraversalContext {
57
52
  visitMultiple(container, parent, listKey) {
58
53
  if (container.length === 0) return false;
59
54
  const queue = [];
60
-
61
55
  for (let key = 0; key < container.length; key++) {
62
56
  const node = container[key];
63
57
  if (node && this.shouldVisit(node)) {
@@ -67,8 +61,7 @@ class TraversalContext {
67
61
  return this.visitQueue(queue);
68
62
  }
69
63
  visitSingle(node, key) {
70
- if (this.shouldVisit(
71
- node[key])) {
64
+ if (this.shouldVisit(node[key])) {
72
65
  return this.visitQueue([this.create(node, node, key)]);
73
66
  } else {
74
67
  return false;
@@ -79,15 +72,12 @@ class TraversalContext {
79
72
  this.priorityQueue = [];
80
73
  const visited = new WeakSet();
81
74
  let stop = false;
82
-
83
75
  for (const path of queue) {
84
76
  path.resync();
85
77
  if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
86
78
  path.pushContext(this);
87
79
  }
88
-
89
80
  if (path.key === null) continue;
90
-
91
81
  const {
92
82
  node
93
83
  } = path;
@@ -104,11 +94,9 @@ class TraversalContext {
104
94
  if (stop) break;
105
95
  }
106
96
  }
107
-
108
97
  for (const path of queue) {
109
98
  path.popContext();
110
99
  }
111
-
112
100
  this.queue = null;
113
101
  return stop;
114
102
  }