@atlaskit/editor-common 72.8.0 → 73.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.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/analytics/types/enums.js +32 -32
- package/dist/cjs/analytics/types/extension-events.js +8 -8
- package/dist/cjs/analytics/types/format-events.js +8 -8
- package/dist/cjs/analytics/types/general-events.js +16 -16
- package/dist/cjs/analytics/types/inline-comment-events.js +4 -4
- package/dist/cjs/analytics/types/insert-events.js +16 -16
- package/dist/cjs/analytics/types/list-events.js +16 -16
- package/dist/cjs/analytics/types/node-events.js +8 -8
- package/dist/cjs/analytics/types/substitute-events.js +8 -8
- package/dist/cjs/analytics/types/table-events.js +11 -10
- package/dist/cjs/analytics/types/toolbar-button.js +4 -4
- package/dist/cjs/analytics/types/utils.js +8 -8
- package/dist/cjs/extensions/default-extension-provider.js +55 -62
- package/dist/cjs/extensions/extension-fields-helpers.js +83 -94
- package/dist/cjs/extensions/extension-handlers.js +50 -55
- package/dist/cjs/extensions/manifest-helpers.js +13 -16
- package/dist/cjs/extensions/module-helpers.js +50 -57
- package/dist/cjs/i18n/cs.js +36 -2
- package/dist/cjs/i18n/da.js +36 -2
- package/dist/cjs/i18n/de.js +37 -3
- package/dist/cjs/i18n/en.js +36 -2
- package/dist/cjs/i18n/en_GB.js +36 -2
- package/dist/cjs/i18n/en_ZZ.js +18 -2
- package/dist/cjs/i18n/es.js +36 -2
- package/dist/cjs/i18n/fi.js +36 -2
- package/dist/cjs/i18n/fr.js +36 -2
- package/dist/cjs/i18n/hu.js +36 -2
- package/dist/cjs/i18n/it.js +36 -2
- package/dist/cjs/i18n/ja.js +36 -2
- package/dist/cjs/i18n/ko.js +36 -2
- package/dist/cjs/i18n/nb.js +36 -2
- package/dist/cjs/i18n/nl.js +36 -2
- package/dist/cjs/i18n/pl.js +36 -2
- package/dist/cjs/i18n/pt_BR.js +36 -2
- package/dist/cjs/i18n/ru.js +36 -2
- package/dist/cjs/i18n/sv.js +36 -2
- package/dist/cjs/i18n/th.js +36 -2
- package/dist/cjs/i18n/tr.js +36 -2
- package/dist/cjs/i18n/uk.js +36 -2
- package/dist/cjs/i18n/vi.js +36 -2
- package/dist/cjs/i18n/zh.js +36 -2
- package/dist/cjs/i18n/zh_TW.js +36 -2
- package/dist/cjs/icons/index.js +1 -1
- package/dist/cjs/preset/plugin-injection-api.js +1 -1
- package/dist/cjs/provider-helpers/combine-providers.js +63 -72
- package/dist/cjs/provider-helpers/promise-helpers.js +4 -4
- package/dist/cjs/selection/gap-cursor/selection.js +4 -4
- package/dist/cjs/selection/types.js +4 -4
- package/dist/cjs/styles/shared/lists.js +3 -3
- package/dist/cjs/type-ahead/index.js +8 -8
- package/dist/cjs/types/annotation/emitter.js +4 -4
- package/dist/cjs/types/index.js +4 -4
- package/dist/cjs/types/toolbar.js +12 -12
- package/dist/cjs/ufo/experience-store.js +4 -4
- package/dist/cjs/ui/DropList/index.js +2 -2
- package/dist/cjs/ui/Layer/index.js +1 -2
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +4 -4
- package/dist/cjs/ui/Popup/index.js +3 -4
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +10 -4
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +8 -4
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/index.js +19 -7
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/types.js +4 -4
- package/dist/cjs/utils/analytics.js +4 -4
- package/dist/cjs/utils/browser-extensions.js +1 -1
- package/dist/cjs/utils/compareNodes.js +6 -6
- package/dist/cjs/utils/date.js +3 -3
- package/dist/cjs/utils/list.js +3 -0
- package/dist/cjs/utils/nodes.js +15 -14
- package/dist/cjs/utils/referentiality.js +1 -1
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/with-plugin-state/index.js +3 -4
- package/dist/es2019/analytics/types/enums.js +24 -24
- package/dist/es2019/analytics/types/extension-events.js +8 -8
- package/dist/es2019/analytics/types/format-events.js +6 -6
- package/dist/es2019/analytics/types/general-events.js +14 -12
- package/dist/es2019/analytics/types/inline-comment-events.js +3 -3
- package/dist/es2019/analytics/types/insert-events.js +12 -12
- package/dist/es2019/analytics/types/list-events.js +12 -12
- package/dist/es2019/analytics/types/node-events.js +6 -6
- package/dist/es2019/analytics/types/substitute-events.js +6 -6
- package/dist/es2019/analytics/types/table-events.js +10 -9
- package/dist/es2019/analytics/types/toolbar-button.js +3 -3
- package/dist/es2019/analytics/types/utils.js +6 -6
- package/dist/es2019/i18n/cs.js +36 -2
- package/dist/es2019/i18n/da.js +36 -2
- package/dist/es2019/i18n/de.js +37 -3
- package/dist/es2019/i18n/en.js +36 -2
- package/dist/es2019/i18n/en_GB.js +36 -2
- package/dist/es2019/i18n/en_ZZ.js +18 -2
- package/dist/es2019/i18n/es.js +36 -2
- package/dist/es2019/i18n/fi.js +36 -2
- package/dist/es2019/i18n/fr.js +36 -2
- package/dist/es2019/i18n/hu.js +36 -2
- package/dist/es2019/i18n/it.js +36 -2
- package/dist/es2019/i18n/ja.js +36 -2
- package/dist/es2019/i18n/ko.js +36 -2
- package/dist/es2019/i18n/nb.js +36 -2
- package/dist/es2019/i18n/nl.js +36 -2
- package/dist/es2019/i18n/pl.js +36 -2
- package/dist/es2019/i18n/pt_BR.js +36 -2
- package/dist/es2019/i18n/ru.js +36 -2
- package/dist/es2019/i18n/sv.js +36 -2
- package/dist/es2019/i18n/th.js +36 -2
- package/dist/es2019/i18n/tr.js +36 -2
- package/dist/es2019/i18n/uk.js +36 -2
- package/dist/es2019/i18n/vi.js +36 -2
- package/dist/es2019/i18n/zh.js +36 -2
- package/dist/es2019/i18n/zh_TW.js +36 -2
- package/dist/es2019/provider-helpers/promise-helpers.js +3 -3
- package/dist/es2019/selection/gap-cursor/selection.js +3 -3
- package/dist/es2019/selection/types.js +3 -3
- package/dist/es2019/styles/shared/lists.js +3 -3
- package/dist/es2019/type-ahead/index.js +6 -6
- package/dist/es2019/types/annotation/emitter.js +3 -3
- package/dist/es2019/types/index.js +3 -3
- package/dist/es2019/types/toolbar.js +9 -9
- package/dist/es2019/ufo/experience-store.js +3 -3
- package/dist/es2019/ui/DropList/index.js +2 -2
- package/dist/es2019/ui/Layer/index.js +1 -2
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +3 -3
- package/dist/es2019/ui/Popup/index.js +3 -5
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +7 -5
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +6 -4
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/index.js +14 -4
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/types.js +3 -3
- package/dist/es2019/utils/analytics.js +3 -3
- package/dist/es2019/utils/compareNodes.js +3 -3
- package/dist/es2019/utils/date.js +3 -3
- package/dist/es2019/utils/list.js +3 -0
- package/dist/es2019/utils/nodes.js +5 -5
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/with-plugin-state/index.js +3 -5
- package/dist/esm/analytics/types/enums.js +24 -24
- package/dist/esm/analytics/types/extension-events.js +8 -8
- package/dist/esm/analytics/types/format-events.js +6 -6
- package/dist/esm/analytics/types/general-events.js +14 -12
- package/dist/esm/analytics/types/inline-comment-events.js +3 -3
- package/dist/esm/analytics/types/insert-events.js +12 -12
- package/dist/esm/analytics/types/list-events.js +12 -12
- package/dist/esm/analytics/types/node-events.js +6 -6
- package/dist/esm/analytics/types/substitute-events.js +6 -6
- package/dist/esm/analytics/types/table-events.js +10 -9
- package/dist/esm/analytics/types/toolbar-button.js +3 -3
- package/dist/esm/analytics/types/utils.js +6 -6
- package/dist/esm/extensions/default-extension-provider.js +55 -62
- package/dist/esm/extensions/extension-fields-helpers.js +83 -94
- package/dist/esm/extensions/extension-handlers.js +50 -55
- package/dist/esm/extensions/manifest-helpers.js +13 -16
- package/dist/esm/extensions/module-helpers.js +50 -57
- package/dist/esm/i18n/cs.js +36 -2
- package/dist/esm/i18n/da.js +36 -2
- package/dist/esm/i18n/de.js +37 -3
- package/dist/esm/i18n/en.js +36 -2
- package/dist/esm/i18n/en_GB.js +36 -2
- package/dist/esm/i18n/en_ZZ.js +18 -2
- package/dist/esm/i18n/es.js +36 -2
- package/dist/esm/i18n/fi.js +36 -2
- package/dist/esm/i18n/fr.js +36 -2
- package/dist/esm/i18n/hu.js +36 -2
- package/dist/esm/i18n/it.js +36 -2
- package/dist/esm/i18n/ja.js +36 -2
- package/dist/esm/i18n/ko.js +36 -2
- package/dist/esm/i18n/nb.js +36 -2
- package/dist/esm/i18n/nl.js +36 -2
- package/dist/esm/i18n/pl.js +36 -2
- package/dist/esm/i18n/pt_BR.js +36 -2
- package/dist/esm/i18n/ru.js +36 -2
- package/dist/esm/i18n/sv.js +36 -2
- package/dist/esm/i18n/th.js +36 -2
- package/dist/esm/i18n/tr.js +36 -2
- package/dist/esm/i18n/uk.js +36 -2
- package/dist/esm/i18n/vi.js +36 -2
- package/dist/esm/i18n/zh.js +36 -2
- package/dist/esm/i18n/zh_TW.js +36 -2
- package/dist/esm/preset/plugin-injection-api.js +1 -1
- package/dist/esm/provider-helpers/combine-providers.js +63 -72
- package/dist/esm/provider-helpers/promise-helpers.js +3 -3
- package/dist/esm/selection/gap-cursor/selection.js +3 -3
- package/dist/esm/selection/types.js +3 -3
- package/dist/esm/styles/shared/lists.js +3 -3
- package/dist/esm/type-ahead/index.js +6 -6
- package/dist/esm/types/annotation/emitter.js +3 -3
- package/dist/esm/types/index.js +3 -3
- package/dist/esm/types/toolbar.js +9 -9
- package/dist/esm/ufo/experience-store.js +3 -3
- package/dist/esm/ui/DropList/index.js +2 -2
- package/dist/esm/ui/Layer/index.js +1 -2
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +3 -3
- package/dist/esm/ui/Popup/index.js +3 -4
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +10 -5
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +8 -4
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/index.js +19 -7
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/types.js +3 -3
- package/dist/esm/utils/analytics.js +3 -3
- package/dist/esm/utils/browser-extensions.js +1 -1
- package/dist/esm/utils/compareNodes.js +5 -5
- package/dist/esm/utils/date.js +3 -3
- package/dist/esm/utils/list.js +3 -0
- package/dist/esm/utils/nodes.js +15 -14
- package/dist/esm/utils/referentiality.js +1 -1
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/esm/with-plugin-state/index.js +3 -4
- package/dist/types/collab/types.d.ts +0 -1
- package/dist/types/i18n/cs.d.ts +35 -2
- package/dist/types/i18n/da.d.ts +35 -2
- package/dist/types/i18n/de.d.ts +35 -2
- package/dist/types/i18n/en.d.ts +35 -2
- package/dist/types/i18n/en_GB.d.ts +35 -2
- package/dist/types/i18n/en_ZZ.d.ts +17 -2
- package/dist/types/i18n/es.d.ts +35 -2
- package/dist/types/i18n/fi.d.ts +35 -2
- package/dist/types/i18n/fr.d.ts +35 -2
- package/dist/types/i18n/hu.d.ts +35 -2
- package/dist/types/i18n/it.d.ts +35 -2
- package/dist/types/i18n/ja.d.ts +35 -2
- package/dist/types/i18n/ko.d.ts +35 -2
- package/dist/types/i18n/nb.d.ts +35 -2
- package/dist/types/i18n/nl.d.ts +35 -2
- package/dist/types/i18n/pl.d.ts +35 -2
- package/dist/types/i18n/pt_BR.d.ts +35 -2
- package/dist/types/i18n/ru.d.ts +35 -2
- package/dist/types/i18n/sv.d.ts +35 -2
- package/dist/types/i18n/th.d.ts +35 -2
- package/dist/types/i18n/tr.d.ts +35 -2
- package/dist/types/i18n/uk.d.ts +35 -2
- package/dist/types/i18n/vi.d.ts +35 -2
- package/dist/types/i18n/zh.d.ts +35 -2
- package/dist/types/i18n/zh_TW.d.ts +35 -2
- package/dist/types/ui-menu/ArrowKeyNavigationProvider/types.d.ts +4 -1
- package/package.json +6 -6
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
|
-
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; }
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
4
|
import { getOnlyFulfilled, waitForAllPromises, waitForFirstFulfilledPromise } from './promise-helpers';
|
|
6
5
|
var flatten = function flatten(arr) {
|
|
7
6
|
var _ref;
|
|
@@ -17,23 +16,21 @@ export default (function (providers) {
|
|
|
17
16
|
throw new Error('At least one provider must be provided');
|
|
18
17
|
}
|
|
19
18
|
var getFulfilledProviders = /*#__PURE__*/function () {
|
|
20
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
19
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
21
20
|
var results;
|
|
22
|
-
return _regeneratorRuntime
|
|
23
|
-
while (1) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return _context.stop();
|
|
36
|
-
}
|
|
21
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
22
|
+
while (1) switch (_context.prev = _context.next) {
|
|
23
|
+
case 0:
|
|
24
|
+
_context.next = 2;
|
|
25
|
+
return waitForAllPromises(providers.map(function (result) {
|
|
26
|
+
return Promise.resolve(result);
|
|
27
|
+
}));
|
|
28
|
+
case 2:
|
|
29
|
+
results = _context.sent;
|
|
30
|
+
return _context.abrupt("return", getOnlyFulfilled(results));
|
|
31
|
+
case 4:
|
|
32
|
+
case "end":
|
|
33
|
+
return _context.stop();
|
|
37
34
|
}
|
|
38
35
|
}, _callee);
|
|
39
36
|
}));
|
|
@@ -42,21 +39,19 @@ export default (function (providers) {
|
|
|
42
39
|
};
|
|
43
40
|
}();
|
|
44
41
|
var runInAllProviders = /*#__PURE__*/function () {
|
|
45
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
46
|
-
return _regeneratorRuntime
|
|
47
|
-
while (1) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return _context2.stop();
|
|
59
|
-
}
|
|
42
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(mapFunction) {
|
|
43
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
44
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
45
|
+
case 0:
|
|
46
|
+
_context2.next = 2;
|
|
47
|
+
return getFulfilledProviders();
|
|
48
|
+
case 2:
|
|
49
|
+
return _context2.abrupt("return", _context2.sent.map(function (provider) {
|
|
50
|
+
return mapFunction(provider);
|
|
51
|
+
}));
|
|
52
|
+
case 3:
|
|
53
|
+
case "end":
|
|
54
|
+
return _context2.stop();
|
|
60
55
|
}
|
|
61
56
|
}, _callee2);
|
|
62
57
|
}));
|
|
@@ -80,23 +75,21 @@ export default (function (providers) {
|
|
|
80
75
|
* @param args
|
|
81
76
|
*/
|
|
82
77
|
var invokeSingle = /*#__PURE__*/function () {
|
|
83
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
78
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(methodName, args) {
|
|
84
79
|
var callback;
|
|
85
|
-
return _regeneratorRuntime
|
|
86
|
-
while (1) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return _context3.stop();
|
|
99
|
-
}
|
|
80
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
81
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
callback = createCallback(methodName, args);
|
|
84
|
+
_context3.t0 = waitForFirstFulfilledPromise;
|
|
85
|
+
_context3.next = 4;
|
|
86
|
+
return runInAllProviders(callback);
|
|
87
|
+
case 4:
|
|
88
|
+
_context3.t1 = _context3.sent;
|
|
89
|
+
return _context3.abrupt("return", (0, _context3.t0)(_context3.t1));
|
|
90
|
+
case 6:
|
|
91
|
+
case "end":
|
|
92
|
+
return _context3.stop();
|
|
100
93
|
}
|
|
101
94
|
}, _callee3);
|
|
102
95
|
}));
|
|
@@ -111,30 +104,28 @@ export default (function (providers) {
|
|
|
111
104
|
* @param args
|
|
112
105
|
*/
|
|
113
106
|
var invokeList = /*#__PURE__*/function () {
|
|
114
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
107
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(methodName, args) {
|
|
115
108
|
var callback, results, fulfilledResults;
|
|
116
|
-
return _regeneratorRuntime
|
|
117
|
-
while (1) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return _context4.stop();
|
|
137
|
-
}
|
|
109
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
110
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
111
|
+
case 0:
|
|
112
|
+
callback = createCallback(methodName, args);
|
|
113
|
+
_context4.t0 = waitForAllPromises;
|
|
114
|
+
_context4.next = 4;
|
|
115
|
+
return runInAllProviders(callback);
|
|
116
|
+
case 4:
|
|
117
|
+
_context4.t1 = _context4.sent;
|
|
118
|
+
_context4.next = 7;
|
|
119
|
+
return (0, _context4.t0)(_context4.t1);
|
|
120
|
+
case 7:
|
|
121
|
+
results = _context4.sent;
|
|
122
|
+
fulfilledResults = getOnlyFulfilled(results);
|
|
123
|
+
return _context4.abrupt("return", flatten(fulfilledResults).filter(function (result) {
|
|
124
|
+
return result;
|
|
125
|
+
}));
|
|
126
|
+
case 10:
|
|
127
|
+
case "end":
|
|
128
|
+
return _context4.stop();
|
|
138
129
|
}
|
|
139
130
|
}, _callee4);
|
|
140
131
|
}));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export var ResultStatus
|
|
2
|
-
(function (ResultStatus) {
|
|
1
|
+
export var ResultStatus = /*#__PURE__*/function (ResultStatus) {
|
|
3
2
|
ResultStatus["FULFILLED"] = "fulfilled";
|
|
4
3
|
ResultStatus["FAILED"] = "failed";
|
|
5
|
-
|
|
4
|
+
return ResultStatus;
|
|
5
|
+
}({});
|
|
6
6
|
var isFullfilled = function isFullfilled(result) {
|
|
7
7
|
return result.status === ResultStatus.FULFILLED;
|
|
8
8
|
};
|
|
@@ -10,11 +10,11 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
10
10
|
import { Slice } from 'prosemirror-model';
|
|
11
11
|
import { Selection } from 'prosemirror-state';
|
|
12
12
|
import { isValidTargetNode } from './utils/is-valid-target-node';
|
|
13
|
-
export var Side
|
|
14
|
-
(function (Side) {
|
|
13
|
+
export var Side = /*#__PURE__*/function (Side) {
|
|
15
14
|
Side["LEFT"] = "left";
|
|
16
15
|
Side["RIGHT"] = "right";
|
|
17
|
-
|
|
16
|
+
return Side;
|
|
17
|
+
}({});
|
|
18
18
|
export var JSON_ID = 'gapcursor';
|
|
19
19
|
export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
20
20
|
_inherits(GapCursorSelection, _Selection);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export var RelativeSelectionPos
|
|
2
|
-
(function (RelativeSelectionPos) {
|
|
1
|
+
export var RelativeSelectionPos = /*#__PURE__*/function (RelativeSelectionPos) {
|
|
3
2
|
RelativeSelectionPos["Before"] = "Before";
|
|
4
3
|
RelativeSelectionPos["Start"] = "Start";
|
|
5
4
|
RelativeSelectionPos["Inside"] = "Inside";
|
|
6
5
|
RelativeSelectionPos["End"] = "End";
|
|
7
|
-
|
|
6
|
+
return RelativeSelectionPos;
|
|
7
|
+
}({});
|
|
@@ -6,10 +6,10 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { bulletListSelector, orderedListSelector } from '@atlaskit/adf-schema';
|
|
7
7
|
import browser from '../../utils/browser';
|
|
8
8
|
export var listItemCounterPadding = 24;
|
|
9
|
-
var CSS_VAR_NAMES
|
|
10
|
-
(function (CSS_VAR_NAMES) {
|
|
9
|
+
var CSS_VAR_NAMES = /*#__PURE__*/function (CSS_VAR_NAMES) {
|
|
11
10
|
CSS_VAR_NAMES["ITEM_COUNTER_PADDING"] = "--ed--list--item-counter--padding";
|
|
12
|
-
|
|
11
|
+
return CSS_VAR_NAMES;
|
|
12
|
+
}(CSS_VAR_NAMES || {});
|
|
13
13
|
var getItemCounterLeftPadding = function getItemCounterLeftPadding(itemCounterDigitsSize) {
|
|
14
14
|
// Previous padding-left was approximately 24px. We approximate that
|
|
15
15
|
// same value using "ch" units (which represent the width of a "0" digit
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export var TypeAheadAvailableNodes
|
|
2
|
-
(function (TypeAheadAvailableNodes) {
|
|
1
|
+
export var TypeAheadAvailableNodes = /*#__PURE__*/function (TypeAheadAvailableNodes) {
|
|
3
2
|
TypeAheadAvailableNodes["EMOJI"] = "emojiTypeAhead";
|
|
4
3
|
TypeAheadAvailableNodes["MENTION"] = "mentionTypeAhead";
|
|
5
4
|
TypeAheadAvailableNodes["QUICK_INSERT"] = "quickInsertTypeAhead";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
return TypeAheadAvailableNodes;
|
|
6
|
+
}({});
|
|
7
|
+
export var SelectItemMode = /*#__PURE__*/function (SelectItemMode) {
|
|
9
8
|
SelectItemMode["SHIFT_ENTER"] = "shift-enter";
|
|
10
9
|
SelectItemMode["ENTER"] = "enter";
|
|
11
10
|
SelectItemMode["SPACE"] = "space";
|
|
12
11
|
SelectItemMode["SELECTED"] = "selected";
|
|
13
12
|
SelectItemMode["TAB"] = "tab";
|
|
14
|
-
|
|
13
|
+
return SelectItemMode;
|
|
14
|
+
}({});
|
|
@@ -2,13 +2,13 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import EventEmitter from 'events';
|
|
5
|
-
export var AnnotationUpdateEvent
|
|
6
|
-
(function (AnnotationUpdateEvent) {
|
|
5
|
+
export var AnnotationUpdateEvent = /*#__PURE__*/function (AnnotationUpdateEvent) {
|
|
7
6
|
AnnotationUpdateEvent["SET_ANNOTATION_FOCUS"] = "SET_ANNOTATION_FOCUS";
|
|
8
7
|
AnnotationUpdateEvent["SET_ANNOTATION_STATE"] = "SET_ANNOTATION_STATE";
|
|
9
8
|
AnnotationUpdateEvent["REMOVE_ANNOTATION_FOCUS"] = "REMOVE_ANNOTATION_FOCUS";
|
|
10
9
|
AnnotationUpdateEvent["ON_ANNOTATION_CLICK"] = "ON_ANNOTATION_CLICK";
|
|
11
|
-
|
|
10
|
+
return AnnotationUpdateEvent;
|
|
11
|
+
}({});
|
|
12
12
|
export var AnnotationUpdateEmitter = /*#__PURE__*/function () {
|
|
13
13
|
function AnnotationUpdateEmitter() {
|
|
14
14
|
_classCallCheck(this, AnnotationUpdateEmitter);
|
package/dist/esm/types/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export var SortOrder
|
|
2
|
-
(function (SortOrder) {
|
|
1
|
+
export var SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
3
2
|
SortOrder["ASC"] = "asc";
|
|
4
3
|
SortOrder["DESC"] = "desc";
|
|
5
4
|
SortOrder["NO_ORDER"] = "no_order";
|
|
6
|
-
|
|
5
|
+
return SortOrder;
|
|
6
|
+
}({});
|
|
7
7
|
export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation';
|
|
8
8
|
export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from './toolbar';
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export var ToolbarSize
|
|
2
|
-
(function (ToolbarSize) {
|
|
1
|
+
export var ToolbarSize = /*#__PURE__*/function (ToolbarSize) {
|
|
3
2
|
ToolbarSize[ToolbarSize["XXL"] = 6] = "XXL";
|
|
4
3
|
ToolbarSize[ToolbarSize["XL"] = 5] = "XL";
|
|
5
4
|
ToolbarSize[ToolbarSize["L"] = 4] = "L";
|
|
6
5
|
ToolbarSize[ToolbarSize["M"] = 3] = "M";
|
|
7
6
|
ToolbarSize[ToolbarSize["S"] = 2] = "S";
|
|
8
7
|
ToolbarSize[ToolbarSize["XXXS"] = 1] = "XXXS";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
return ToolbarSize;
|
|
9
|
+
}({});
|
|
10
|
+
export var ToolbarWidths = /*#__PURE__*/function (ToolbarWidths) {
|
|
12
11
|
ToolbarWidths[ToolbarWidths["XXL"] = 610] = "XXL";
|
|
13
12
|
ToolbarWidths[ToolbarWidths["XL"] = 540] = "XL";
|
|
14
13
|
ToolbarWidths[ToolbarWidths["L"] = 460] = "L";
|
|
15
14
|
ToolbarWidths[ToolbarWidths["M"] = 450] = "M";
|
|
16
15
|
ToolbarWidths[ToolbarWidths["S"] = 370] = "S";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
return ToolbarWidths;
|
|
17
|
+
}({});
|
|
18
|
+
export var ToolbarWidthsFullPage = /*#__PURE__*/function (ToolbarWidthsFullPage) {
|
|
20
19
|
ToolbarWidthsFullPage[ToolbarWidthsFullPage["XXL"] = 650] = "XXL";
|
|
21
20
|
ToolbarWidthsFullPage[ToolbarWidthsFullPage["XL"] = 580] = "XL";
|
|
22
21
|
ToolbarWidthsFullPage[ToolbarWidthsFullPage["L"] = 540] = "L";
|
|
23
22
|
ToolbarWidthsFullPage[ToolbarWidthsFullPage["M"] = 490] = "M";
|
|
24
23
|
ToolbarWidthsFullPage[ToolbarWidthsFullPage["S"] = 410] = "S";
|
|
25
|
-
|
|
24
|
+
return ToolbarWidthsFullPage;
|
|
25
|
+
}({});
|
|
@@ -9,13 +9,13 @@ export var experienceConfig = {
|
|
|
9
9
|
component: 'editor'
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
export var EditorExperience
|
|
13
|
-
(function (EditorExperience) {
|
|
12
|
+
export var EditorExperience = /*#__PURE__*/function (EditorExperience) {
|
|
14
13
|
EditorExperience["loadEditor"] = "load";
|
|
15
14
|
EditorExperience["typing"] = "type";
|
|
16
15
|
EditorExperience["interaction"] = "interact";
|
|
17
16
|
EditorExperience["editSession"] = "editSession";
|
|
18
|
-
|
|
17
|
+
return EditorExperience;
|
|
18
|
+
}({});
|
|
19
19
|
export var RELIABILITY_INTERVAL = 30000;
|
|
20
20
|
export var ExperienceStore = /*#__PURE__*/function () {
|
|
21
21
|
function ExperienceStore() {
|
|
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
18
18
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
19
19
|
import Layer from '../Layer';
|
|
20
20
|
var packageName = "@atlaskit/editor-common";
|
|
21
|
-
var packageVersion = "
|
|
21
|
+
var packageVersion = "73.0.0";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = "0, ".concat(gridSize(), "px");
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -33,6 +33,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
33
33
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
34
34
|
_defineProperty(_assertThisInitialized(_this), "wrapperStyles", css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n "])), _this.props.shouldFitContainer ? 'display: block; flex: 1 1 auto;' : 'display: inline-flex;'));
|
|
35
35
|
_defineProperty(_assertThisInitialized(_this), "triggerStyles", css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n ", "\n "])), _this.props.shouldFitContainer ? 'display: block; box-sizing: border-box;' : 'display: inline-flex;'));
|
|
36
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
36
37
|
_defineProperty(_assertThisInitialized(_this), "menuWrapper", function (theme) {
|
|
37
38
|
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: 0 ", "px ", "px -", "px ", ",\n 0 0 1px ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", "px 0;\n max-height: 90vh;\n "])), themed({
|
|
38
39
|
light: "var(--ds-text, ".concat(N900, ")"),
|
|
@@ -112,7 +113,6 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
112
113
|
});
|
|
113
114
|
return _this;
|
|
114
115
|
}
|
|
115
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
116
116
|
_createClass(DropList, [{
|
|
117
117
|
key: "getChildContext",
|
|
118
118
|
value: /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
@@ -32,8 +32,6 @@ var defaultState = {
|
|
|
32
32
|
var Layer = /*#__PURE__*/function (_Component) {
|
|
33
33
|
_inherits(Layer, _Component);
|
|
34
34
|
var _super = _createSuper(Layer);
|
|
35
|
-
// working with extract-react-types
|
|
36
|
-
|
|
37
35
|
function Layer(props) {
|
|
38
36
|
var _this;
|
|
39
37
|
_classCallCheck(this, Layer);
|
|
@@ -191,6 +189,7 @@ var Layer = /*#__PURE__*/function (_Component) {
|
|
|
191
189
|
}]);
|
|
192
190
|
return Layer;
|
|
193
191
|
}(Component);
|
|
192
|
+
// working with extract-react-types
|
|
194
193
|
_defineProperty(Layer, "defaultProps", {
|
|
195
194
|
boundariesElement: 'viewport',
|
|
196
195
|
children: null,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
export var ShadowKeys
|
|
5
|
-
(function (ShadowKeys) {
|
|
4
|
+
export var ShadowKeys = /*#__PURE__*/function (ShadowKeys) {
|
|
6
5
|
ShadowKeys["SHOW_LEFT_SHADOW"] = "showLeftShadow";
|
|
7
6
|
ShadowKeys["SHOW_RIGHT_SHADOW"] = "showRightShadow";
|
|
8
|
-
|
|
7
|
+
return ShadowKeys;
|
|
8
|
+
}({});
|
|
9
9
|
export var shadowObserverClassNames = {
|
|
10
10
|
SENTINEL_LEFT: 'sentinel-left',
|
|
11
11
|
SENTINEL_RIGHT: 'sentinel-right',
|
|
@@ -47,6 +47,9 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
47
47
|
_defineProperty(_assertThisInitialized(_this), "resizeObserver", (_window = window) !== null && _window !== void 0 && _window.ResizeObserver ? new ResizeObserver(function () {
|
|
48
48
|
_this.scheduledUpdatePosition(_this.props);
|
|
49
49
|
}) : undefined);
|
|
50
|
+
/**
|
|
51
|
+
* Raf scheduled so that it also occurs after the initial update position
|
|
52
|
+
*/
|
|
50
53
|
_defineProperty(_assertThisInitialized(_this), "initFocusTrap", rafSchedule(function () {
|
|
51
54
|
var popup = _this.popupRef.current;
|
|
52
55
|
if (!popup) {
|
|
@@ -177,10 +180,6 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
177
180
|
// get rendered and we end up with a wrong position
|
|
178
181
|
this.scheduledUpdatePosition(newProps);
|
|
179
182
|
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Raf scheduled so that it also occurs after the initial update position
|
|
183
|
-
*/
|
|
184
183
|
}, {
|
|
185
184
|
key: "destroyFocusTrap",
|
|
186
185
|
value:
|
package/dist/esm/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* This component is a wrapper for color picker which listens to keydown events of children
|
|
4
5
|
* and handles arrow key navigation
|
|
@@ -10,10 +11,14 @@ export var ColorPaletteArrowKeyNavigationProvider = function ColorPaletteArrowKe
|
|
|
10
11
|
isOpenedByKeyboard = _ref.isOpenedByKeyboard,
|
|
11
12
|
isPopupPositioned = _ref.isPopupPositioned,
|
|
12
13
|
handleClose = _ref.handleClose,
|
|
13
|
-
closeOnTab = _ref.closeOnTab
|
|
14
|
+
closeOnTab = _ref.closeOnTab,
|
|
15
|
+
editorRef = _ref.editorRef;
|
|
14
16
|
var wrapperRef = useRef(null);
|
|
15
17
|
var currentSelectedColumnIndex = useRef(selectedColumnIndex === -1 ? 0 : selectedColumnIndex);
|
|
16
18
|
var currentSelectedRowIndex = useRef(selectedRowIndex === -1 ? 0 : selectedRowIndex);
|
|
19
|
+
var _useState = useState(editorRef.current),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
21
|
+
listenerTargetElement = _useState2[0];
|
|
17
22
|
var incrementRowIndex = function incrementRowIndex(rowElements, columnElements) {
|
|
18
23
|
if (currentSelectedRowIndex.current === rowElements.length - 1) {
|
|
19
24
|
currentSelectedRowIndex.current = 0;
|
|
@@ -96,7 +101,7 @@ export var ColorPaletteArrowKeyNavigationProvider = function ColorPaletteArrowKe
|
|
|
96
101
|
return;
|
|
97
102
|
}
|
|
98
103
|
};
|
|
99
|
-
|
|
104
|
+
listenerTargetElement && listenerTargetElement.addEventListener('keydown', handleKeyDown);
|
|
100
105
|
// set focus to current selected color swatch if only opened by keyboard
|
|
101
106
|
if (isOpenedByKeyboard && isPopupPositioned) {
|
|
102
107
|
// Using timeout because, we need to wait till color palette is rendered
|
|
@@ -107,9 +112,9 @@ export var ColorPaletteArrowKeyNavigationProvider = function ColorPaletteArrowKe
|
|
|
107
112
|
});
|
|
108
113
|
}
|
|
109
114
|
return function () {
|
|
110
|
-
|
|
115
|
+
listenerTargetElement && listenerTargetElement.removeEventListener('keydown', handleKeyDown);
|
|
111
116
|
};
|
|
112
|
-
}, [currentSelectedColumnIndex, isOpenedByKeyboard, isPopupPositioned, wrapperRef, handleClose, closeOnTab]);
|
|
117
|
+
}, [currentSelectedColumnIndex, isOpenedByKeyboard, isPopupPositioned, wrapperRef, handleClose, closeOnTab, listenerTargetElement]);
|
|
113
118
|
return /*#__PURE__*/React.createElement("div", {
|
|
114
119
|
className: "custom-key-handler-wrapper",
|
|
115
120
|
ref: wrapperRef
|
|
@@ -10,12 +10,16 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
10
10
|
disableArrowKeyNavigation = _ref.disableArrowKeyNavigation,
|
|
11
11
|
keyDownHandlerContext = _ref.keyDownHandlerContext,
|
|
12
12
|
closeOnTab = _ref.closeOnTab,
|
|
13
|
-
onSelection = _ref.onSelection
|
|
13
|
+
onSelection = _ref.onSelection,
|
|
14
|
+
editorRef = _ref.editorRef;
|
|
14
15
|
var wrapperRef = useRef(null);
|
|
15
16
|
var _useState = useState(-1),
|
|
16
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17
18
|
currentSelectedItemIndex = _useState2[0],
|
|
18
19
|
setCurrentSelectedItemIndex = _useState2[1];
|
|
20
|
+
var _useState3 = useState(editorRef.current),
|
|
21
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
22
|
+
listenerTargetElement = _useState4[0];
|
|
19
23
|
var incrementIndex = useCallback(function (list) {
|
|
20
24
|
var currentIndex = currentSelectedItemIndex;
|
|
21
25
|
var nextIndex = (currentIndex + 1) % list.length;
|
|
@@ -131,11 +135,11 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
131
135
|
return;
|
|
132
136
|
}
|
|
133
137
|
};
|
|
134
|
-
|
|
138
|
+
listenerTargetElement && listenerTargetElement.addEventListener('keydown', handleKeyDown);
|
|
135
139
|
return function () {
|
|
136
|
-
|
|
140
|
+
listenerTargetElement && listenerTargetElement.removeEventListener('keydown', handleKeyDown);
|
|
137
141
|
};
|
|
138
|
-
}, [currentSelectedItemIndex, wrapperRef, handleClose, disableArrowKeyNavigation, keyDownHandlerContext, closeOnTab, onSelection, incrementIndex, decrementIndex]);
|
|
142
|
+
}, [currentSelectedItemIndex, wrapperRef, handleClose, disableArrowKeyNavigation, keyDownHandlerContext, closeOnTab, onSelection, incrementIndex, decrementIndex, listenerTargetElement]);
|
|
139
143
|
return /*#__PURE__*/React.createElement("div", {
|
|
140
144
|
className: "menu-key-handler-wrapper custom-key-handler-wrapper",
|
|
141
145
|
ref: wrapperRef
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "type"];
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { ReactEditorViewContext } from '../../ui-react';
|
|
5
6
|
import { ColorPaletteArrowKeyNavigationProvider } from './ColorPaletteArrowKeyNavigationProvider';
|
|
6
7
|
import { MenuArrowKeyNavigationProvider } from './MenuArrowKeyNavigationProvider';
|
|
7
8
|
import { ArrowKeyNavigationType } from './types';
|
|
@@ -10,12 +11,23 @@ export var ArrowKeyNavigationProvider = function ArrowKeyNavigationProvider(prop
|
|
|
10
11
|
type = props.type,
|
|
11
12
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
12
13
|
if (type === ArrowKeyNavigationType.COLOR) {
|
|
13
|
-
return /*#__PURE__*/React.createElement(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
return /*#__PURE__*/React.createElement(ReactEditorViewContext.Consumer, null, function (_ref) {
|
|
15
|
+
var editorView = _ref.editorView,
|
|
16
|
+
editorRef = _ref.editorRef;
|
|
17
|
+
return editorRef && /*#__PURE__*/React.createElement(ColorPaletteArrowKeyNavigationProvider, _extends({
|
|
18
|
+
selectedRowIndex: props.selectedRowIndex,
|
|
19
|
+
selectedColumnIndex: props.selectedColumnIndex,
|
|
20
|
+
isOpenedByKeyboard: props.isOpenedByKeyboard,
|
|
21
|
+
isPopupPositioned: props.isPopupPositioned,
|
|
22
|
+
editorRef: editorRef
|
|
23
|
+
}, restProps), children);
|
|
24
|
+
});
|
|
19
25
|
}
|
|
20
|
-
return /*#__PURE__*/React.createElement(
|
|
26
|
+
return /*#__PURE__*/React.createElement(ReactEditorViewContext.Consumer, null, function (_ref2) {
|
|
27
|
+
var editorView = _ref2.editorView,
|
|
28
|
+
editorRef = _ref2.editorRef;
|
|
29
|
+
return editorRef && /*#__PURE__*/React.createElement(MenuArrowKeyNavigationProvider, _extends({
|
|
30
|
+
editorRef: editorRef
|
|
31
|
+
}, restProps), children);
|
|
32
|
+
});
|
|
21
33
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export var ArrowKeyNavigationType
|
|
2
|
-
(function (ArrowKeyNavigationType) {
|
|
1
|
+
export var ArrowKeyNavigationType = /*#__PURE__*/function (ArrowKeyNavigationType) {
|
|
3
2
|
ArrowKeyNavigationType["COLOR"] = "color";
|
|
4
3
|
ArrowKeyNavigationType["MENU"] = "menu";
|
|
5
|
-
|
|
4
|
+
return ArrowKeyNavigationType;
|
|
5
|
+
}({});
|
|
@@ -25,11 +25,11 @@ export var getAnalyticsEventSeverity = function getAnalyticsEventSeverity(durati
|
|
|
25
25
|
}
|
|
26
26
|
return SEVERITY.NORMAL;
|
|
27
27
|
};
|
|
28
|
-
export var SEVERITY
|
|
29
|
-
(function (SEVERITY) {
|
|
28
|
+
export var SEVERITY = /*#__PURE__*/function (SEVERITY) {
|
|
30
29
|
SEVERITY["NORMAL"] = "normal";
|
|
31
30
|
SEVERITY["DEGRADED"] = "degraded";
|
|
32
31
|
SEVERITY["BLOCKING"] = "blocking";
|
|
33
|
-
|
|
32
|
+
return SEVERITY;
|
|
33
|
+
}({});
|
|
34
34
|
export { UNSUPPORTED_CONTENT_LEVEL_SEVERITY, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS } from './unsupportedContent/get-unsupported-content-level-data';
|
|
35
35
|
export var analyticsEventKey = 'EDITOR_ANALYTICS_EVENT';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
2
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
3
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
4
4
|
var registerDetectors = function registerDetectors(targetExtensions, supportedDetectors) {
|
|
5
5
|
var detectors = supportedDetectors.filter(function (registration) {
|
|
6
6
|
return targetExtensions.includes(registration.name);
|