@atlaskit/editor-common 72.9.0 → 74.0.0

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 (226) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/analytics/types/enums.js +32 -32
  3. package/dist/cjs/analytics/types/extension-events.js +8 -8
  4. package/dist/cjs/analytics/types/format-events.js +8 -8
  5. package/dist/cjs/analytics/types/general-events.js +16 -16
  6. package/dist/cjs/analytics/types/inline-comment-events.js +4 -4
  7. package/dist/cjs/analytics/types/insert-events.js +16 -16
  8. package/dist/cjs/analytics/types/list-events.js +16 -16
  9. package/dist/cjs/analytics/types/node-events.js +8 -8
  10. package/dist/cjs/analytics/types/substitute-events.js +8 -8
  11. package/dist/cjs/analytics/types/table-events.js +11 -10
  12. package/dist/cjs/analytics/types/toolbar-button.js +4 -4
  13. package/dist/cjs/analytics/types/utils.js +8 -8
  14. package/dist/cjs/extensions/default-extension-provider.js +55 -62
  15. package/dist/cjs/extensions/extension-fields-helpers.js +83 -94
  16. package/dist/cjs/extensions/extension-handlers.js +50 -55
  17. package/dist/cjs/extensions/manifest-helpers.js +13 -16
  18. package/dist/cjs/extensions/module-helpers.js +50 -57
  19. package/dist/cjs/i18n/cs.js +36 -2
  20. package/dist/cjs/i18n/da.js +36 -2
  21. package/dist/cjs/i18n/de.js +37 -3
  22. package/dist/cjs/i18n/en.js +36 -2
  23. package/dist/cjs/i18n/en_GB.js +36 -2
  24. package/dist/cjs/i18n/en_ZZ.js +18 -2
  25. package/dist/cjs/i18n/es.js +36 -2
  26. package/dist/cjs/i18n/fi.js +36 -2
  27. package/dist/cjs/i18n/fr.js +36 -2
  28. package/dist/cjs/i18n/hu.js +36 -2
  29. package/dist/cjs/i18n/it.js +36 -2
  30. package/dist/cjs/i18n/ja.js +36 -2
  31. package/dist/cjs/i18n/ko.js +36 -2
  32. package/dist/cjs/i18n/nb.js +36 -2
  33. package/dist/cjs/i18n/nl.js +36 -2
  34. package/dist/cjs/i18n/pl.js +36 -2
  35. package/dist/cjs/i18n/pt_BR.js +36 -2
  36. package/dist/cjs/i18n/ru.js +36 -2
  37. package/dist/cjs/i18n/sv.js +36 -2
  38. package/dist/cjs/i18n/th.js +36 -2
  39. package/dist/cjs/i18n/tr.js +36 -2
  40. package/dist/cjs/i18n/uk.js +36 -2
  41. package/dist/cjs/i18n/vi.js +36 -2
  42. package/dist/cjs/i18n/zh.js +36 -2
  43. package/dist/cjs/i18n/zh_TW.js +36 -2
  44. package/dist/cjs/icons/index.js +1 -1
  45. package/dist/cjs/preset/plugin-injection-api.js +1 -1
  46. package/dist/cjs/provider-helpers/combine-providers.js +63 -72
  47. package/dist/cjs/provider-helpers/promise-helpers.js +4 -4
  48. package/dist/cjs/selection/gap-cursor/selection.js +4 -4
  49. package/dist/cjs/selection/types.js +4 -4
  50. package/dist/cjs/styles/shared/lists.js +3 -3
  51. package/dist/cjs/type-ahead/index.js +8 -8
  52. package/dist/cjs/types/annotation/emitter.js +4 -4
  53. package/dist/cjs/types/index.js +4 -4
  54. package/dist/cjs/types/toolbar.js +12 -12
  55. package/dist/cjs/ufo/experience-store.js +4 -4
  56. package/dist/cjs/ui/DropList/index.js +2 -2
  57. package/dist/cjs/ui/Layer/index.js +1 -2
  58. package/dist/cjs/ui/OverflowShadow/shadowObserver.js +4 -4
  59. package/dist/cjs/ui/Popup/index.js +3 -4
  60. package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/types.js +4 -4
  61. package/dist/cjs/utils/analytics.js +4 -4
  62. package/dist/cjs/utils/browser-extensions.js +1 -1
  63. package/dist/cjs/utils/compareNodes.js +6 -6
  64. package/dist/cjs/utils/date.js +3 -3
  65. package/dist/cjs/utils/list.js +3 -0
  66. package/dist/cjs/utils/nodes.js +15 -14
  67. package/dist/cjs/utils/referentiality.js +1 -1
  68. package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +4 -4
  69. package/dist/cjs/version.json +1 -1
  70. package/dist/cjs/with-plugin-state/index.js +3 -4
  71. package/dist/es2019/analytics/types/enums.js +24 -24
  72. package/dist/es2019/analytics/types/extension-events.js +8 -8
  73. package/dist/es2019/analytics/types/format-events.js +6 -6
  74. package/dist/es2019/analytics/types/general-events.js +14 -12
  75. package/dist/es2019/analytics/types/inline-comment-events.js +3 -3
  76. package/dist/es2019/analytics/types/insert-events.js +12 -12
  77. package/dist/es2019/analytics/types/list-events.js +12 -12
  78. package/dist/es2019/analytics/types/node-events.js +6 -6
  79. package/dist/es2019/analytics/types/substitute-events.js +6 -6
  80. package/dist/es2019/analytics/types/table-events.js +10 -9
  81. package/dist/es2019/analytics/types/toolbar-button.js +3 -3
  82. package/dist/es2019/analytics/types/utils.js +6 -6
  83. package/dist/es2019/i18n/cs.js +36 -2
  84. package/dist/es2019/i18n/da.js +36 -2
  85. package/dist/es2019/i18n/de.js +37 -3
  86. package/dist/es2019/i18n/en.js +36 -2
  87. package/dist/es2019/i18n/en_GB.js +36 -2
  88. package/dist/es2019/i18n/en_ZZ.js +18 -2
  89. package/dist/es2019/i18n/es.js +36 -2
  90. package/dist/es2019/i18n/fi.js +36 -2
  91. package/dist/es2019/i18n/fr.js +36 -2
  92. package/dist/es2019/i18n/hu.js +36 -2
  93. package/dist/es2019/i18n/it.js +36 -2
  94. package/dist/es2019/i18n/ja.js +36 -2
  95. package/dist/es2019/i18n/ko.js +36 -2
  96. package/dist/es2019/i18n/nb.js +36 -2
  97. package/dist/es2019/i18n/nl.js +36 -2
  98. package/dist/es2019/i18n/pl.js +36 -2
  99. package/dist/es2019/i18n/pt_BR.js +36 -2
  100. package/dist/es2019/i18n/ru.js +36 -2
  101. package/dist/es2019/i18n/sv.js +36 -2
  102. package/dist/es2019/i18n/th.js +36 -2
  103. package/dist/es2019/i18n/tr.js +36 -2
  104. package/dist/es2019/i18n/uk.js +36 -2
  105. package/dist/es2019/i18n/vi.js +36 -2
  106. package/dist/es2019/i18n/zh.js +36 -2
  107. package/dist/es2019/i18n/zh_TW.js +36 -2
  108. package/dist/es2019/provider-helpers/promise-helpers.js +3 -3
  109. package/dist/es2019/selection/gap-cursor/selection.js +3 -3
  110. package/dist/es2019/selection/types.js +3 -3
  111. package/dist/es2019/styles/shared/lists.js +3 -3
  112. package/dist/es2019/type-ahead/index.js +6 -6
  113. package/dist/es2019/types/annotation/emitter.js +3 -3
  114. package/dist/es2019/types/index.js +3 -3
  115. package/dist/es2019/types/toolbar.js +9 -9
  116. package/dist/es2019/ufo/experience-store.js +3 -3
  117. package/dist/es2019/ui/DropList/index.js +2 -2
  118. package/dist/es2019/ui/Layer/index.js +1 -2
  119. package/dist/es2019/ui/OverflowShadow/shadowObserver.js +3 -3
  120. package/dist/es2019/ui/Popup/index.js +3 -5
  121. package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/types.js +3 -3
  122. package/dist/es2019/utils/analytics.js +3 -3
  123. package/dist/es2019/utils/compareNodes.js +3 -3
  124. package/dist/es2019/utils/date.js +3 -3
  125. package/dist/es2019/utils/list.js +3 -0
  126. package/dist/es2019/utils/nodes.js +5 -5
  127. package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
  128. package/dist/es2019/version.json +1 -1
  129. package/dist/es2019/with-plugin-state/index.js +3 -5
  130. package/dist/esm/analytics/types/enums.js +24 -24
  131. package/dist/esm/analytics/types/extension-events.js +8 -8
  132. package/dist/esm/analytics/types/format-events.js +6 -6
  133. package/dist/esm/analytics/types/general-events.js +14 -12
  134. package/dist/esm/analytics/types/inline-comment-events.js +3 -3
  135. package/dist/esm/analytics/types/insert-events.js +12 -12
  136. package/dist/esm/analytics/types/list-events.js +12 -12
  137. package/dist/esm/analytics/types/node-events.js +6 -6
  138. package/dist/esm/analytics/types/substitute-events.js +6 -6
  139. package/dist/esm/analytics/types/table-events.js +10 -9
  140. package/dist/esm/analytics/types/toolbar-button.js +3 -3
  141. package/dist/esm/analytics/types/utils.js +6 -6
  142. package/dist/esm/extensions/default-extension-provider.js +55 -62
  143. package/dist/esm/extensions/extension-fields-helpers.js +83 -94
  144. package/dist/esm/extensions/extension-handlers.js +50 -55
  145. package/dist/esm/extensions/manifest-helpers.js +13 -16
  146. package/dist/esm/extensions/module-helpers.js +50 -57
  147. package/dist/esm/i18n/cs.js +36 -2
  148. package/dist/esm/i18n/da.js +36 -2
  149. package/dist/esm/i18n/de.js +37 -3
  150. package/dist/esm/i18n/en.js +36 -2
  151. package/dist/esm/i18n/en_GB.js +36 -2
  152. package/dist/esm/i18n/en_ZZ.js +18 -2
  153. package/dist/esm/i18n/es.js +36 -2
  154. package/dist/esm/i18n/fi.js +36 -2
  155. package/dist/esm/i18n/fr.js +36 -2
  156. package/dist/esm/i18n/hu.js +36 -2
  157. package/dist/esm/i18n/it.js +36 -2
  158. package/dist/esm/i18n/ja.js +36 -2
  159. package/dist/esm/i18n/ko.js +36 -2
  160. package/dist/esm/i18n/nb.js +36 -2
  161. package/dist/esm/i18n/nl.js +36 -2
  162. package/dist/esm/i18n/pl.js +36 -2
  163. package/dist/esm/i18n/pt_BR.js +36 -2
  164. package/dist/esm/i18n/ru.js +36 -2
  165. package/dist/esm/i18n/sv.js +36 -2
  166. package/dist/esm/i18n/th.js +36 -2
  167. package/dist/esm/i18n/tr.js +36 -2
  168. package/dist/esm/i18n/uk.js +36 -2
  169. package/dist/esm/i18n/vi.js +36 -2
  170. package/dist/esm/i18n/zh.js +36 -2
  171. package/dist/esm/i18n/zh_TW.js +36 -2
  172. package/dist/esm/preset/plugin-injection-api.js +1 -1
  173. package/dist/esm/provider-helpers/combine-providers.js +63 -72
  174. package/dist/esm/provider-helpers/promise-helpers.js +3 -3
  175. package/dist/esm/selection/gap-cursor/selection.js +3 -3
  176. package/dist/esm/selection/types.js +3 -3
  177. package/dist/esm/styles/shared/lists.js +3 -3
  178. package/dist/esm/type-ahead/index.js +6 -6
  179. package/dist/esm/types/annotation/emitter.js +3 -3
  180. package/dist/esm/types/index.js +3 -3
  181. package/dist/esm/types/toolbar.js +9 -9
  182. package/dist/esm/ufo/experience-store.js +3 -3
  183. package/dist/esm/ui/DropList/index.js +2 -2
  184. package/dist/esm/ui/Layer/index.js +1 -2
  185. package/dist/esm/ui/OverflowShadow/shadowObserver.js +3 -3
  186. package/dist/esm/ui/Popup/index.js +3 -4
  187. package/dist/esm/ui-menu/ArrowKeyNavigationProvider/types.js +3 -3
  188. package/dist/esm/utils/analytics.js +3 -3
  189. package/dist/esm/utils/browser-extensions.js +1 -1
  190. package/dist/esm/utils/compareNodes.js +5 -5
  191. package/dist/esm/utils/date.js +3 -3
  192. package/dist/esm/utils/list.js +3 -0
  193. package/dist/esm/utils/nodes.js +15 -14
  194. package/dist/esm/utils/referentiality.js +1 -1
  195. package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
  196. package/dist/esm/version.json +1 -1
  197. package/dist/esm/with-plugin-state/index.js +3 -4
  198. package/dist/types/collab/types.d.ts +0 -1
  199. package/dist/types/i18n/cs.d.ts +35 -2
  200. package/dist/types/i18n/da.d.ts +35 -2
  201. package/dist/types/i18n/de.d.ts +35 -2
  202. package/dist/types/i18n/en.d.ts +35 -2
  203. package/dist/types/i18n/en_GB.d.ts +35 -2
  204. package/dist/types/i18n/en_ZZ.d.ts +17 -2
  205. package/dist/types/i18n/es.d.ts +35 -2
  206. package/dist/types/i18n/fi.d.ts +35 -2
  207. package/dist/types/i18n/fr.d.ts +35 -2
  208. package/dist/types/i18n/hu.d.ts +35 -2
  209. package/dist/types/i18n/it.d.ts +35 -2
  210. package/dist/types/i18n/ja.d.ts +35 -2
  211. package/dist/types/i18n/ko.d.ts +35 -2
  212. package/dist/types/i18n/nb.d.ts +35 -2
  213. package/dist/types/i18n/nl.d.ts +35 -2
  214. package/dist/types/i18n/pl.d.ts +35 -2
  215. package/dist/types/i18n/pt_BR.d.ts +35 -2
  216. package/dist/types/i18n/ru.d.ts +35 -2
  217. package/dist/types/i18n/sv.d.ts +35 -2
  218. package/dist/types/i18n/th.d.ts +35 -2
  219. package/dist/types/i18n/tr.d.ts +35 -2
  220. package/dist/types/i18n/uk.d.ts +35 -2
  221. package/dist/types/i18n/vi.d.ts +35 -2
  222. package/dist/types/i18n/zh.d.ts +35 -2
  223. package/dist/types/i18n/zh_TW.d.ts +35 -2
  224. package/dist/types/types/supported-browsers.d.ts +1 -1
  225. package/dist/types/utils/validator.d.ts +1 -1
  226. package/package.json +37 -37
@@ -1,6 +1,5 @@
1
1
  //#region Constants
2
- export var TABLE_ACTION;
3
- (function (TABLE_ACTION) {
2
+ export var TABLE_ACTION = /*#__PURE__*/function (TABLE_ACTION) {
4
3
  TABLE_ACTION["DELETED"] = "deleted";
5
4
  TABLE_ACTION["CLEARED"] = "cleared";
6
5
  TABLE_ACTION["COLLAPSED"] = "collapsed";
@@ -22,15 +21,17 @@ export var TABLE_ACTION;
22
21
  TABLE_ACTION["ATTEMPTED_TABLE_WIDTH_CHANGE"] = "attemptedTableWidthChange";
23
22
  TABLE_ACTION["DISTRIBUTED_COLUMNS_WIDTHS"] = "distributedColumnsWidths";
24
23
  TABLE_ACTION["FIXED"] = "fixed";
25
- })(TABLE_ACTION || (TABLE_ACTION = {}));
26
- export var TABLE_BREAKOUT;
27
- //#endregion
28
-
29
- //#region Type Helpers
30
- (function (TABLE_BREAKOUT) {
24
+ return TABLE_ACTION;
25
+ }({});
26
+ export var TABLE_BREAKOUT = /*#__PURE__*/function (TABLE_BREAKOUT) {
31
27
  TABLE_BREAKOUT["WIDE"] = "wide";
32
28
  TABLE_BREAKOUT["FULL_WIDTH"] = "fullWidth";
33
29
  TABLE_BREAKOUT["NORMAL"] = "normal";
34
- })(TABLE_BREAKOUT || (TABLE_BREAKOUT = {})); //#endregion
30
+ return TABLE_BREAKOUT;
31
+ }({});
32
+ //#endregion
33
+
34
+ //#region Type Helpers
35
+ //#endregion
35
36
  //#region Analytic Event Payloads
36
37
  //#endregion
@@ -1,5 +1,4 @@
1
- export var TOOLBAR_ACTION_SUBJECT_ID;
2
- (function (TOOLBAR_ACTION_SUBJECT_ID) {
1
+ export var TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*/function (TOOLBAR_ACTION_SUBJECT_ID) {
3
2
  TOOLBAR_ACTION_SUBJECT_ID["FIND_REPLACE"] = "findReplace";
4
3
  TOOLBAR_ACTION_SUBJECT_ID["EMOJI"] = "emoji";
5
4
  TOOLBAR_ACTION_SUBJECT_ID["ORDERED_LIST"] = "orderedList";
@@ -15,4 +14,5 @@ export var TOOLBAR_ACTION_SUBJECT_ID;
15
14
  TOOLBAR_ACTION_SUBJECT_ID["REDO"] = "redo";
16
15
  TOOLBAR_ACTION_SUBJECT_ID["INDENT"] = "indent";
17
16
  TOOLBAR_ACTION_SUBJECT_ID["OUTDENT"] = "outdent";
18
- })(TOOLBAR_ACTION_SUBJECT_ID || (TOOLBAR_ACTION_SUBJECT_ID = {}));
17
+ return TOOLBAR_ACTION_SUBJECT_ID;
18
+ }({});
@@ -1,17 +1,17 @@
1
- export var SELECTION_TYPE;
2
- (function (SELECTION_TYPE) {
1
+ export var SELECTION_TYPE = /*#__PURE__*/function (SELECTION_TYPE) {
3
2
  SELECTION_TYPE["CURSOR"] = "cursor";
4
3
  SELECTION_TYPE["RANGED"] = "ranged";
5
4
  SELECTION_TYPE["TEXT"] = "text";
6
5
  SELECTION_TYPE["NODE"] = "node";
7
6
  SELECTION_TYPE["CELL"] = "cell";
8
7
  SELECTION_TYPE["GAP_CURSOR"] = "gapCursor";
9
- })(SELECTION_TYPE || (SELECTION_TYPE = {}));
10
- export var SELECTION_POSITION;
11
- (function (SELECTION_POSITION) {
8
+ return SELECTION_TYPE;
9
+ }({});
10
+ export var SELECTION_POSITION = /*#__PURE__*/function (SELECTION_POSITION) {
12
11
  SELECTION_POSITION["START"] = "start";
13
12
  SELECTION_POSITION["MIDDLE"] = "middle";
14
13
  SELECTION_POSITION["END"] = "end";
15
14
  SELECTION_POSITION["LEFT"] = "left";
16
15
  SELECTION_POSITION["RIGHT"] = "right";
17
- })(SELECTION_POSITION || (SELECTION_POSITION = {}));
16
+ return SELECTION_POSITION;
17
+ }({});
@@ -1,8 +1,7 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
5
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
5
  import { getAutoConvertPatternsFromModule } from './module-helpers';
7
6
  var DefaultExtensionProvider = /*#__PURE__*/function () {
8
7
  function DefaultExtensionProvider(manifests,
@@ -25,29 +24,27 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
25
24
  }, {
26
25
  key: "getExtension",
27
26
  value: function () {
28
- var _getExtension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, key) {
27
+ var _getExtension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(type, key) {
29
28
  var extension;
30
- return _regeneratorRuntime().wrap(function _callee$(_context) {
31
- while (1) {
32
- switch (_context.prev = _context.next) {
33
- case 0:
34
- _context.next = 2;
35
- return this.manifestsPromise;
36
- case 2:
37
- extension = _context.sent.find(function (manifest) {
38
- return manifest.type === type && manifest.key === key;
39
- });
40
- if (extension) {
41
- _context.next = 5;
42
- break;
43
- }
44
- throw new Error("Extension with type \"".concat(type, "\" and key \"").concat(key, "\" not found!"));
45
- case 5:
46
- return _context.abrupt("return", extension);
47
- case 6:
48
- case "end":
49
- return _context.stop();
50
- }
29
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
30
+ while (1) switch (_context.prev = _context.next) {
31
+ case 0:
32
+ _context.next = 2;
33
+ return this.manifestsPromise;
34
+ case 2:
35
+ extension = _context.sent.find(function (manifest) {
36
+ return manifest.type === type && manifest.key === key;
37
+ });
38
+ if (extension) {
39
+ _context.next = 5;
40
+ break;
41
+ }
42
+ throw new Error("Extension with type \"".concat(type, "\" and key \"").concat(key, "\" not found!"));
43
+ case 5:
44
+ return _context.abrupt("return", extension);
45
+ case 6:
46
+ case "end":
47
+ return _context.stop();
51
48
  }
52
49
  }, _callee, this);
53
50
  }));
@@ -59,23 +56,21 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
59
56
  }, {
60
57
  key: "search",
61
58
  value: function () {
62
- var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(keyword) {
59
+ var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(keyword) {
63
60
  var extensions;
64
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
65
- while (1) {
66
- switch (_context2.prev = _context2.next) {
67
- case 0:
68
- _context2.next = 2;
69
- return this.manifestsPromise;
70
- case 2:
71
- extensions = _context2.sent.filter(function (manifest) {
72
- return manifest.title.toLowerCase().includes(keyword.toLowerCase());
73
- });
74
- return _context2.abrupt("return", extensions);
75
- case 4:
76
- case "end":
77
- return _context2.stop();
78
- }
61
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
62
+ while (1) switch (_context2.prev = _context2.next) {
63
+ case 0:
64
+ _context2.next = 2;
65
+ return this.manifestsPromise;
66
+ case 2:
67
+ extensions = _context2.sent.filter(function (manifest) {
68
+ return manifest.title.toLowerCase().includes(keyword.toLowerCase());
69
+ });
70
+ return _context2.abrupt("return", extensions);
71
+ case 4:
72
+ case "end":
73
+ return _context2.stop();
79
74
  }
80
75
  }, _callee2, this);
81
76
  }));
@@ -87,29 +82,27 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
87
82
  }, {
88
83
  key: "getAutoConverter",
89
84
  value: function () {
90
- var _getAutoConverter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
85
+ var _getAutoConverter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
91
86
  var autoConverters;
92
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
93
- while (1) {
94
- switch (_context3.prev = _context3.next) {
95
- case 0:
96
- if (!this.autoConvertHandlers) {
97
- _context3.next = 2;
98
- break;
99
- }
100
- return _context3.abrupt("return", this.autoConvertHandlers);
101
- case 2:
102
- _context3.t0 = getAutoConvertPatternsFromModule;
103
- _context3.next = 5;
104
- return this.manifestsPromise;
105
- case 5:
106
- _context3.t1 = _context3.sent;
107
- autoConverters = (0, _context3.t0)(_context3.t1);
108
- return _context3.abrupt("return", autoConverters);
109
- case 8:
110
- case "end":
111
- return _context3.stop();
112
- }
87
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
88
+ while (1) switch (_context3.prev = _context3.next) {
89
+ case 0:
90
+ if (!this.autoConvertHandlers) {
91
+ _context3.next = 2;
92
+ break;
93
+ }
94
+ return _context3.abrupt("return", this.autoConvertHandlers);
95
+ case 2:
96
+ _context3.t0 = getAutoConvertPatternsFromModule;
97
+ _context3.next = 5;
98
+ return this.manifestsPromise;
99
+ case 5:
100
+ _context3.t1 = _context3.sent;
101
+ autoConverters = (0, _context3.t0)(_context3.t1);
102
+ return _context3.abrupt("return", autoConverters);
103
+ case 8:
104
+ case "end":
105
+ return _context3.stop();
113
106
  }
114
107
  }, _callee3, this);
115
108
  }));
@@ -1,48 +1,45 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
3
  function getExtensionModuleField(_x, _x2, _x3) {
5
4
  return _getExtensionModuleField.apply(this, arguments);
6
5
  }
7
6
  /** attempt to get the custom resolver for this field, or throw */
8
7
  function _getExtensionModuleField() {
9
- _getExtensionModuleField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(manifest, fieldType, handlerLink) {
8
+ _getExtensionModuleField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(manifest, fieldType, handlerLink) {
10
9
  var type, handler;
11
- return _regeneratorRuntime().wrap(function _callee$(_context) {
12
- while (1) {
13
- switch (_context.prev = _context.next) {
14
- case 0:
15
- if (handlerLink.type) {
16
- _context.next = 2;
17
- break;
18
- }
19
- throw new Error("Missing type!");
20
- case 2:
21
- if (manifest.modules.fields) {
22
- _context.next = 4;
23
- break;
24
- }
25
- throw new Error("No definition of fields for extension type \"".concat(manifest.type, "\" and key \"").concat(manifest.key, "\""));
26
- case 4:
27
- if (manifest.modules.fields[fieldType]) {
28
- _context.next = 6;
29
- break;
30
- }
31
- throw new Error("No definition for field type \"".concat(fieldType, "\" on manifest for extension with type \"").concat(manifest.type, "\" and key \"").concat(manifest.key, "\""));
32
- case 6:
33
- type = handlerLink.type;
34
- handler = manifest.modules.fields[fieldType][type];
35
- if (handler) {
36
- _context.next = 10;
37
- break;
38
- }
39
- throw new Error("No handler of type \"".concat(type, "\" for extension type \"").concat(manifest.type, "\" and key \"").concat(manifest.key, "\""));
40
- case 10:
41
- return _context.abrupt("return", handler);
42
- case 11:
43
- case "end":
44
- return _context.stop();
45
- }
10
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
11
+ while (1) switch (_context.prev = _context.next) {
12
+ case 0:
13
+ if (handlerLink.type) {
14
+ _context.next = 2;
15
+ break;
16
+ }
17
+ throw new Error("Missing type!");
18
+ case 2:
19
+ if (manifest.modules.fields) {
20
+ _context.next = 4;
21
+ break;
22
+ }
23
+ throw new Error("No definition of fields for extension type \"".concat(manifest.type, "\" and key \"").concat(manifest.key, "\""));
24
+ case 4:
25
+ if (manifest.modules.fields[fieldType]) {
26
+ _context.next = 6;
27
+ break;
28
+ }
29
+ throw new Error("No definition for field type \"".concat(fieldType, "\" on manifest for extension with type \"").concat(manifest.type, "\" and key \"").concat(manifest.key, "\""));
30
+ case 6:
31
+ type = handlerLink.type;
32
+ handler = manifest.modules.fields[fieldType][type];
33
+ if (handler) {
34
+ _context.next = 10;
35
+ break;
36
+ }
37
+ throw new Error("No handler of type \"".concat(type, "\" for extension type \"").concat(manifest.type, "\" and key \"").concat(manifest.key, "\""));
38
+ case 10:
39
+ return _context.abrupt("return", handler);
40
+ case 11:
41
+ case "end":
42
+ return _context.stop();
46
43
  }
47
44
  }, _callee);
48
45
  }));
@@ -54,21 +51,19 @@ export function getCustomFieldResolver(_x4, _x5) {
54
51
 
55
52
  /** attempt to get the serializer for this field, or throw */
56
53
  function _getCustomFieldResolver() {
57
- _getCustomFieldResolver = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(manifest, handlerLink) {
54
+ _getCustomFieldResolver = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(manifest, handlerLink) {
58
55
  var handler;
59
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
60
- while (1) {
61
- switch (_context2.prev = _context2.next) {
62
- case 0:
63
- _context2.next = 2;
64
- return getExtensionModuleField(manifest, 'custom', handlerLink);
65
- case 2:
66
- handler = _context2.sent;
67
- return _context2.abrupt("return", handler.resolver);
68
- case 4:
69
- case "end":
70
- return _context2.stop();
71
- }
56
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
57
+ while (1) switch (_context2.prev = _context2.next) {
58
+ case 0:
59
+ _context2.next = 2;
60
+ return getExtensionModuleField(manifest, 'custom', handlerLink);
61
+ case 2:
62
+ handler = _context2.sent;
63
+ return _context2.abrupt("return", handler.resolver);
64
+ case 4:
65
+ case "end":
66
+ return _context2.stop();
72
67
  }
73
68
  }, _callee2);
74
69
  }));
@@ -80,21 +75,19 @@ export function getFieldSerializer(_x6, _x7) {
80
75
 
81
76
  /** attempt to get the deserializer for this field, or throw */
82
77
  function _getFieldSerializer() {
83
- _getFieldSerializer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(manifest, handlerLink) {
78
+ _getFieldSerializer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(manifest, handlerLink) {
84
79
  var handler;
85
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
86
- while (1) {
87
- switch (_context3.prev = _context3.next) {
88
- case 0:
89
- _context3.next = 2;
90
- return getExtensionModuleField(manifest, 'fieldset', handlerLink);
91
- case 2:
92
- handler = _context3.sent;
93
- return _context3.abrupt("return", handler.serializer);
94
- case 4:
95
- case "end":
96
- return _context3.stop();
97
- }
80
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
81
+ while (1) switch (_context3.prev = _context3.next) {
82
+ case 0:
83
+ _context3.next = 2;
84
+ return getExtensionModuleField(manifest, 'fieldset', handlerLink);
85
+ case 2:
86
+ handler = _context3.sent;
87
+ return _context3.abrupt("return", handler.serializer);
88
+ case 4:
89
+ case "end":
90
+ return _context3.stop();
98
91
  }
99
92
  }, _callee3);
100
93
  }));
@@ -106,21 +99,19 @@ export function getFieldDeserializer(_x8, _x9) {
106
99
 
107
100
  /** attempt to get the user field context provider for this field, or throw */
108
101
  function _getFieldDeserializer() {
109
- _getFieldDeserializer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(manifest, handlerLink) {
102
+ _getFieldDeserializer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(manifest, handlerLink) {
110
103
  var handler;
111
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
112
- while (1) {
113
- switch (_context4.prev = _context4.next) {
114
- case 0:
115
- _context4.next = 2;
116
- return getExtensionModuleField(manifest, 'fieldset', handlerLink);
117
- case 2:
118
- handler = _context4.sent;
119
- return _context4.abrupt("return", handler.deserializer);
120
- case 4:
121
- case "end":
122
- return _context4.stop();
123
- }
104
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
105
+ while (1) switch (_context4.prev = _context4.next) {
106
+ case 0:
107
+ _context4.next = 2;
108
+ return getExtensionModuleField(manifest, 'fieldset', handlerLink);
109
+ case 2:
110
+ handler = _context4.sent;
111
+ return _context4.abrupt("return", handler.deserializer);
112
+ case 4:
113
+ case "end":
114
+ return _context4.stop();
124
115
  }
125
116
  }, _callee4);
126
117
  }));
@@ -130,21 +121,19 @@ export function getUserFieldContextProvider(_x10, _x11) {
130
121
  return _getUserFieldContextProvider.apply(this, arguments);
131
122
  }
132
123
  function _getUserFieldContextProvider() {
133
- _getUserFieldContextProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(manifest, handlerLink) {
124
+ _getUserFieldContextProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(manifest, handlerLink) {
134
125
  var handler;
135
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
136
- while (1) {
137
- switch (_context5.prev = _context5.next) {
138
- case 0:
139
- _context5.next = 2;
140
- return getExtensionModuleField(manifest, 'user', handlerLink);
141
- case 2:
142
- handler = _context5.sent;
143
- return _context5.abrupt("return", handler.provider);
144
- case 4:
145
- case "end":
146
- return _context5.stop();
147
- }
126
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
127
+ while (1) switch (_context5.prev = _context5.next) {
128
+ case 0:
129
+ _context5.next = 2;
130
+ return getExtensionModuleField(manifest, 'user', handlerLink);
131
+ case 2:
132
+ handler = _context5.sent;
133
+ return _context5.abrupt("return", handler.provider);
134
+ case 4:
135
+ case "end":
136
+ return _context5.stop();
148
137
  }
149
138
  }, _callee5);
150
139
  }));