@atlaskit/editor-common 80.1.0 → 80.3.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 +20 -0
- package/dist/cjs/analytics/types/enums.js +1 -1
- package/dist/cjs/analytics/types/toolbar-button.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +1 -1
- package/dist/es2019/analytics/types/toolbar-button.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +1 -1
- package/dist/esm/analytics/types/toolbar-button.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -1
- package/dist/types/analytics/types/highlight-events.d.ts +1 -1
- package/dist/types/analytics/types/toolbar-button.d.ts +1 -1
- package/dist/types/types/next-editor-plugin.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/highlight-events.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/toolbar-button.d.ts +1 -1
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 80.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#99108](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99108)
|
|
8
|
+
[`fa410d6b85f4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fa410d6b85f4) -
|
|
9
|
+
implemented duplicate plugin typecheck
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 80.2.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#100553](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100553)
|
|
20
|
+
[`e0c2a4b9c8ae`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e0c2a4b9c8ae) -
|
|
21
|
+
[ED-23157] Clear background color (= highlights) when clearing the formatting on a selection
|
|
22
|
+
|
|
3
23
|
## 80.1.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -268,6 +268,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
268
268
|
ACTION_SUBJECT_ID["EXTENSION_BLOCK"] = "extension";
|
|
269
269
|
ACTION_SUBJECT_ID["EXTENSION_BODIED"] = "bodiedExtension";
|
|
270
270
|
ACTION_SUBJECT_ID["EXTENSION_INLINE"] = "inlineExtension";
|
|
271
|
+
ACTION_SUBJECT_ID["FORMAT_BACKGROUND_COLOR"] = "backgroundColor";
|
|
271
272
|
ACTION_SUBJECT_ID["FORMAT_BLOCK_QUOTE"] = "blockQuote";
|
|
272
273
|
ACTION_SUBJECT_ID["FORMAT_CLEAR"] = "clearFormatting";
|
|
273
274
|
ACTION_SUBJECT_ID["FORMAT_CODE"] = "code";
|
|
@@ -285,7 +286,6 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
285
286
|
ACTION_SUBJECT_ID["FRAGMENT_MARK"] = "fragmentMark";
|
|
286
287
|
ACTION_SUBJECT_ID["GOTO_SMART_LINK_SETTINGS"] = "goToSmartLinkSettings";
|
|
287
288
|
ACTION_SUBJECT_ID["HELP_QUICK_INSERT"] = "helpQuickInsert";
|
|
288
|
-
ACTION_SUBJECT_ID["HIGHLIGHT"] = "highlight";
|
|
289
289
|
ACTION_SUBJECT_ID["HYPERLINK"] = "hyperlink";
|
|
290
290
|
ACTION_SUBJECT_ID["INLINE_COMMENT"] = "inlineComment";
|
|
291
291
|
ACTION_SUBJECT_ID["LAYOUT"] = "layout";
|
|
@@ -14,7 +14,7 @@ var TOOLBAR_ACTION_SUBJECT_ID = exports.TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*
|
|
|
14
14
|
TOOLBAR_ACTION_SUBJECT_ID["DECISION_LIST"] = "decisionList";
|
|
15
15
|
TOOLBAR_ACTION_SUBJECT_ID["TASK_LIST"] = "taskList";
|
|
16
16
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_COLOR"] = "color";
|
|
17
|
-
TOOLBAR_ACTION_SUBJECT_ID["
|
|
17
|
+
TOOLBAR_ACTION_SUBJECT_ID["BACKGROUND_COLOR"] = "backgroundColor";
|
|
18
18
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_STRONG"] = "strong";
|
|
19
19
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_ITALIC"] = "italic";
|
|
20
20
|
TOOLBAR_ACTION_SUBJECT_ID["UNDO"] = "undo";
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "80.
|
|
19
|
+
var packageVersion = "80.3.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
|
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
21
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "80.
|
|
23
|
+
var packageVersion = "80.3.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -262,6 +262,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
262
262
|
ACTION_SUBJECT_ID["EXTENSION_BLOCK"] = "extension";
|
|
263
263
|
ACTION_SUBJECT_ID["EXTENSION_BODIED"] = "bodiedExtension";
|
|
264
264
|
ACTION_SUBJECT_ID["EXTENSION_INLINE"] = "inlineExtension";
|
|
265
|
+
ACTION_SUBJECT_ID["FORMAT_BACKGROUND_COLOR"] = "backgroundColor";
|
|
265
266
|
ACTION_SUBJECT_ID["FORMAT_BLOCK_QUOTE"] = "blockQuote";
|
|
266
267
|
ACTION_SUBJECT_ID["FORMAT_CLEAR"] = "clearFormatting";
|
|
267
268
|
ACTION_SUBJECT_ID["FORMAT_CODE"] = "code";
|
|
@@ -279,7 +280,6 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
279
280
|
ACTION_SUBJECT_ID["FRAGMENT_MARK"] = "fragmentMark";
|
|
280
281
|
ACTION_SUBJECT_ID["GOTO_SMART_LINK_SETTINGS"] = "goToSmartLinkSettings";
|
|
281
282
|
ACTION_SUBJECT_ID["HELP_QUICK_INSERT"] = "helpQuickInsert";
|
|
282
|
-
ACTION_SUBJECT_ID["HIGHLIGHT"] = "highlight";
|
|
283
283
|
ACTION_SUBJECT_ID["HYPERLINK"] = "hyperlink";
|
|
284
284
|
ACTION_SUBJECT_ID["INLINE_COMMENT"] = "inlineComment";
|
|
285
285
|
ACTION_SUBJECT_ID["LAYOUT"] = "layout";
|
|
@@ -8,7 +8,7 @@ export let TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*/function (TOOLBAR_ACTION_SUB
|
|
|
8
8
|
TOOLBAR_ACTION_SUBJECT_ID["DECISION_LIST"] = "decisionList";
|
|
9
9
|
TOOLBAR_ACTION_SUBJECT_ID["TASK_LIST"] = "taskList";
|
|
10
10
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_COLOR"] = "color";
|
|
11
|
-
TOOLBAR_ACTION_SUBJECT_ID["
|
|
11
|
+
TOOLBAR_ACTION_SUBJECT_ID["BACKGROUND_COLOR"] = "backgroundColor";
|
|
12
12
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_STRONG"] = "strong";
|
|
13
13
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_ITALIC"] = "italic";
|
|
14
14
|
TOOLBAR_ACTION_SUBJECT_ID["UNDO"] = "undo";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "80.
|
|
3
|
+
const packageVersion = "80.3.0";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "80.
|
|
10
|
+
const packageVersion = "80.3.0";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -262,6 +262,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
262
262
|
ACTION_SUBJECT_ID["EXTENSION_BLOCK"] = "extension";
|
|
263
263
|
ACTION_SUBJECT_ID["EXTENSION_BODIED"] = "bodiedExtension";
|
|
264
264
|
ACTION_SUBJECT_ID["EXTENSION_INLINE"] = "inlineExtension";
|
|
265
|
+
ACTION_SUBJECT_ID["FORMAT_BACKGROUND_COLOR"] = "backgroundColor";
|
|
265
266
|
ACTION_SUBJECT_ID["FORMAT_BLOCK_QUOTE"] = "blockQuote";
|
|
266
267
|
ACTION_SUBJECT_ID["FORMAT_CLEAR"] = "clearFormatting";
|
|
267
268
|
ACTION_SUBJECT_ID["FORMAT_CODE"] = "code";
|
|
@@ -279,7 +280,6 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
279
280
|
ACTION_SUBJECT_ID["FRAGMENT_MARK"] = "fragmentMark";
|
|
280
281
|
ACTION_SUBJECT_ID["GOTO_SMART_LINK_SETTINGS"] = "goToSmartLinkSettings";
|
|
281
282
|
ACTION_SUBJECT_ID["HELP_QUICK_INSERT"] = "helpQuickInsert";
|
|
282
|
-
ACTION_SUBJECT_ID["HIGHLIGHT"] = "highlight";
|
|
283
283
|
ACTION_SUBJECT_ID["HYPERLINK"] = "hyperlink";
|
|
284
284
|
ACTION_SUBJECT_ID["INLINE_COMMENT"] = "inlineComment";
|
|
285
285
|
ACTION_SUBJECT_ID["LAYOUT"] = "layout";
|
|
@@ -8,7 +8,7 @@ export var TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*/function (TOOLBAR_ACTION_SUB
|
|
|
8
8
|
TOOLBAR_ACTION_SUBJECT_ID["DECISION_LIST"] = "decisionList";
|
|
9
9
|
TOOLBAR_ACTION_SUBJECT_ID["TASK_LIST"] = "taskList";
|
|
10
10
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_COLOR"] = "color";
|
|
11
|
-
TOOLBAR_ACTION_SUBJECT_ID["
|
|
11
|
+
TOOLBAR_ACTION_SUBJECT_ID["BACKGROUND_COLOR"] = "backgroundColor";
|
|
12
12
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_STRONG"] = "strong";
|
|
13
13
|
TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_ITALIC"] = "italic";
|
|
14
14
|
TOOLBAR_ACTION_SUBJECT_ID["UNDO"] = "undo";
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "80.
|
|
9
|
+
var packageVersion = "80.3.0";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -15,7 +15,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
15
15
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
16
16
|
import Layer from '../Layer';
|
|
17
17
|
var packageName = "@atlaskit/editor-common";
|
|
18
|
-
var packageVersion = "80.
|
|
18
|
+
var packageVersion = "80.3.0";
|
|
19
19
|
var halfFocusRing = 1;
|
|
20
20
|
var dropOffset = '0, 8';
|
|
21
21
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -265,6 +265,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
265
265
|
EXTENSION_BLOCK = "extension",
|
|
266
266
|
EXTENSION_BODIED = "bodiedExtension",
|
|
267
267
|
EXTENSION_INLINE = "inlineExtension",
|
|
268
|
+
FORMAT_BACKGROUND_COLOR = "backgroundColor",
|
|
268
269
|
FORMAT_BLOCK_QUOTE = "blockQuote",
|
|
269
270
|
FORMAT_CLEAR = "clearFormatting",
|
|
270
271
|
FORMAT_CODE = "code",
|
|
@@ -282,7 +283,6 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
282
283
|
FRAGMENT_MARK = "fragmentMark",
|
|
283
284
|
GOTO_SMART_LINK_SETTINGS = "goToSmartLinkSettings",
|
|
284
285
|
HELP_QUICK_INSERT = "helpQuickInsert",
|
|
285
|
-
HIGHLIGHT = "highlight",
|
|
286
286
|
HYPERLINK = "hyperlink",
|
|
287
287
|
INLINE_COMMENT = "inlineComment",
|
|
288
288
|
LAYOUT = "layout",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
2
2
|
import type { TrackAEP } from './utils';
|
|
3
|
-
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.
|
|
3
|
+
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR, undefined, undefined>;
|
|
4
4
|
export type HighlightEventPayload = HighlightToolbarToggleAEP;
|
|
@@ -10,7 +10,7 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
|
|
|
10
10
|
DECISION_LIST = "decisionList",
|
|
11
11
|
TASK_LIST = "taskList",
|
|
12
12
|
TEXT_COLOR = "color",
|
|
13
|
-
|
|
13
|
+
BACKGROUND_COLOR = "backgroundColor",
|
|
14
14
|
TEXT_FORMATTING_STRONG = "strong",
|
|
15
15
|
TEXT_FORMATTING_ITALIC = "italic",
|
|
16
16
|
UNDO = "undo",
|
|
@@ -128,10 +128,11 @@ type DependencyErrorMessage<Message extends string> = {
|
|
|
128
128
|
};
|
|
129
129
|
type ExtractRequiredDependencies<Plugin, PluginsStack extends AllEditorPresetPluginTypes[]> = Plugin extends NextEditorPlugin<infer PluginName, infer Metadata> ? Metadata['dependencies'] extends undefined ? DependencyErrorMessage<'No found dependencies'> : Metadata['dependencies'] extends DependencyPlugin[] ? FilterOptionalPlugins<FilterExistingPlugins<Metadata['dependencies'], PluginsStack>>[number] extends NextEditorPlugin<infer Name, any> ? Name : DependencyErrorMessage<`Invalid dependency for ${PluginName}`> : DependencyErrorMessage<`Invalid dependencies for ${PluginName}`> : DependencyErrorMessage<'Plugin is not NextEditorPlugin'>;
|
|
130
130
|
type GetDependencyErrorMessage<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = ExtractRequiredDependencies<Plugin, StackPlugins> extends string ? DependencyErrorMessage<`Missing dependency: ${ExtractRequiredDependencies<Plugin, StackPlugins>}Plugin`> : ExtractRequiredDependencies<Plugin, StackPlugins>;
|
|
131
|
+
export type CheckDuplicatePlugin<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends NextEditorPlugin<infer PluginName, any> ? Plugin extends StackPlugins[number] ? unknown extends StackPlugins[number] ? unknown : DependencyErrorMessage<`Duplicate plugin: ${PluginName}`> : unknown : unknown;
|
|
131
132
|
/**
|
|
132
133
|
* Used to check if a plugin being added can be added to a Preset/builder
|
|
133
134
|
*/
|
|
134
|
-
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never : GetDependencyErrorMessage<Plugin, StackPlugins>;
|
|
135
|
+
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckDuplicatePlugin<Plugin, StackPlugins> & CheckBasicPlugin<Plugin> : never : GetDependencyErrorMessage<Plugin, StackPlugins>;
|
|
135
136
|
type CheckTupleRequirements<Plugin, Config, ArrayType> = unknown extends Config ? Plugin | ArrayType : undefined extends Config ? Plugin | ArrayType : [
|
|
136
137
|
Config
|
|
137
138
|
] extends [never] ? Plugin : ArrayType;
|
|
@@ -265,6 +265,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
265
265
|
EXTENSION_BLOCK = "extension",
|
|
266
266
|
EXTENSION_BODIED = "bodiedExtension",
|
|
267
267
|
EXTENSION_INLINE = "inlineExtension",
|
|
268
|
+
FORMAT_BACKGROUND_COLOR = "backgroundColor",
|
|
268
269
|
FORMAT_BLOCK_QUOTE = "blockQuote",
|
|
269
270
|
FORMAT_CLEAR = "clearFormatting",
|
|
270
271
|
FORMAT_CODE = "code",
|
|
@@ -282,7 +283,6 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
282
283
|
FRAGMENT_MARK = "fragmentMark",
|
|
283
284
|
GOTO_SMART_LINK_SETTINGS = "goToSmartLinkSettings",
|
|
284
285
|
HELP_QUICK_INSERT = "helpQuickInsert",
|
|
285
|
-
HIGHLIGHT = "highlight",
|
|
286
286
|
HYPERLINK = "hyperlink",
|
|
287
287
|
INLINE_COMMENT = "inlineComment",
|
|
288
288
|
LAYOUT = "layout",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
2
2
|
import type { TrackAEP } from './utils';
|
|
3
|
-
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.
|
|
3
|
+
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR, undefined, undefined>;
|
|
4
4
|
export type HighlightEventPayload = HighlightToolbarToggleAEP;
|
|
@@ -10,7 +10,7 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
|
|
|
10
10
|
DECISION_LIST = "decisionList",
|
|
11
11
|
TASK_LIST = "taskList",
|
|
12
12
|
TEXT_COLOR = "color",
|
|
13
|
-
|
|
13
|
+
BACKGROUND_COLOR = "backgroundColor",
|
|
14
14
|
TEXT_FORMATTING_STRONG = "strong",
|
|
15
15
|
TEXT_FORMATTING_ITALIC = "italic",
|
|
16
16
|
UNDO = "undo",
|
|
@@ -143,10 +143,11 @@ type DependencyErrorMessage<Message extends string> = {
|
|
|
143
143
|
};
|
|
144
144
|
type ExtractRequiredDependencies<Plugin, PluginsStack extends AllEditorPresetPluginTypes[]> = Plugin extends NextEditorPlugin<infer PluginName, infer Metadata> ? Metadata['dependencies'] extends undefined ? DependencyErrorMessage<'No found dependencies'> : Metadata['dependencies'] extends DependencyPlugin[] ? FilterOptionalPlugins<FilterExistingPlugins<Metadata['dependencies'], PluginsStack>>[number] extends NextEditorPlugin<infer Name, any> ? Name : DependencyErrorMessage<`Invalid dependency for ${PluginName}`> : DependencyErrorMessage<`Invalid dependencies for ${PluginName}`> : DependencyErrorMessage<'Plugin is not NextEditorPlugin'>;
|
|
145
145
|
type GetDependencyErrorMessage<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = ExtractRequiredDependencies<Plugin, StackPlugins> extends string ? DependencyErrorMessage<`Missing dependency: ${ExtractRequiredDependencies<Plugin, StackPlugins>}Plugin`> : ExtractRequiredDependencies<Plugin, StackPlugins>;
|
|
146
|
+
export type CheckDuplicatePlugin<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends NextEditorPlugin<infer PluginName, any> ? Plugin extends StackPlugins[number] ? unknown extends StackPlugins[number] ? unknown : DependencyErrorMessage<`Duplicate plugin: ${PluginName}`> : unknown : unknown;
|
|
146
147
|
/**
|
|
147
148
|
* Used to check if a plugin being added can be added to a Preset/builder
|
|
148
149
|
*/
|
|
149
|
-
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never : GetDependencyErrorMessage<Plugin, StackPlugins>;
|
|
150
|
+
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckDuplicatePlugin<Plugin, StackPlugins> & CheckBasicPlugin<Plugin> : never : GetDependencyErrorMessage<Plugin, StackPlugins>;
|
|
150
151
|
type CheckTupleRequirements<Plugin, Config, ArrayType> = unknown extends Config ? Plugin | ArrayType : undefined extends Config ? Plugin | ArrayType : [
|
|
151
152
|
Config
|
|
152
153
|
] extends [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "80.
|
|
3
|
+
"version": "80.3.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -125,14 +125,14 @@
|
|
|
125
125
|
"@atlaskit/media-file-preview": "^0.5.0",
|
|
126
126
|
"@atlaskit/media-picker": "^66.4.0",
|
|
127
127
|
"@atlaskit/media-ui": "^25.10.0",
|
|
128
|
-
"@atlaskit/media-viewer": "48.5.
|
|
128
|
+
"@atlaskit/media-viewer": "48.5.4",
|
|
129
129
|
"@atlaskit/mention": "^23.0.0",
|
|
130
130
|
"@atlaskit/menu": "^2.2.0",
|
|
131
131
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
132
|
-
"@atlaskit/primitives": "^6.
|
|
132
|
+
"@atlaskit/primitives": "^6.2.0",
|
|
133
133
|
"@atlaskit/profilecard": "^19.13.0",
|
|
134
134
|
"@atlaskit/section-message": "^6.5.0",
|
|
135
|
-
"@atlaskit/smart-card": "^26.
|
|
135
|
+
"@atlaskit/smart-card": "^26.68.0",
|
|
136
136
|
"@atlaskit/smart-user-picker": "^6.9.0",
|
|
137
137
|
"@atlaskit/spinner": "^16.1.0",
|
|
138
138
|
"@atlaskit/task-decision": "^17.10.0",
|