@atlaskit/editor-common 74.34.4 → 74.35.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 (43) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/guideline/fixedGuideline.js +31 -12
  3. package/dist/cjs/mark/index.js +8 -1
  4. package/dist/cjs/mark/text-formatting.js +34 -0
  5. package/dist/cjs/messages/index.js +7 -0
  6. package/dist/cjs/messages/toolbar.js +95 -0
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/types/text-formatting.js +5 -0
  9. package/dist/cjs/ui/DropList/index.js +1 -1
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/guideline/fixedGuideline.js +32 -11
  12. package/dist/es2019/mark/index.js +2 -1
  13. package/dist/es2019/mark/text-formatting.js +29 -0
  14. package/dist/es2019/messages/index.js +1 -0
  15. package/dist/es2019/messages/toolbar.js +88 -0
  16. package/dist/es2019/monitoring/error.js +1 -1
  17. package/dist/es2019/types/text-formatting.js +1 -0
  18. package/dist/es2019/ui/DropList/index.js +1 -1
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/guideline/fixedGuideline.js +31 -12
  21. package/dist/esm/mark/index.js +2 -1
  22. package/dist/esm/mark/text-formatting.js +28 -0
  23. package/dist/esm/messages/index.js +1 -0
  24. package/dist/esm/messages/toolbar.js +88 -0
  25. package/dist/esm/monitoring/error.js +1 -1
  26. package/dist/esm/types/text-formatting.js +1 -0
  27. package/dist/esm/ui/DropList/index.js +1 -1
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/guideline/fixedGuideline.d.ts +3 -0
  30. package/dist/types/mark/index.d.ts +1 -0
  31. package/dist/types/mark/text-formatting.d.ts +6 -0
  32. package/dist/types/messages/index.d.ts +1 -0
  33. package/dist/types/messages/toolbar.d.ts +87 -0
  34. package/dist/types/types/index.d.ts +1 -0
  35. package/dist/types/types/text-formatting.d.ts +36 -0
  36. package/dist/types-ts4.5/guideline/fixedGuideline.d.ts +3 -0
  37. package/dist/types-ts4.5/mark/index.d.ts +1 -0
  38. package/dist/types-ts4.5/mark/text-formatting.d.ts +6 -0
  39. package/dist/types-ts4.5/messages/index.d.ts +1 -0
  40. package/dist/types-ts4.5/messages/toolbar.d.ts +87 -0
  41. package/dist/types-ts4.5/types/index.d.ts +1 -0
  42. package/dist/types-ts4.5/types/text-formatting.d.ts +36 -0
  43. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 74.35.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c6c3b7e43d3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c6c3b7e43d3) - [ED-19202] Remove direct dependency of editor-core code on text-formatting plugin
8
+
9
+ ## 74.34.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d432ad14798`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d432ad14798) - [ux] Added standard page guidelines when custom table width enabled and is resizing table.
14
+
3
15
  ## 74.34.4
4
16
 
5
17
  ### Patch Changes
@@ -19,6 +19,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
19
19
  * {left: 100, right: -100, length: -200},
20
20
  * {left: -100.5, right: 100.5, length: 201},
21
21
  * ]
22
+ * When length is 0, return {left: 0, right: 0, length: 0}
22
23
  *
23
24
  * @param lengths A colection of length values which will be split into a left & right guides.
24
25
  * @returns A collection of LengthGuide objects which can be used to draw left & right guides
@@ -26,8 +27,15 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
26
27
  var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
27
28
  return Array.from(new Set(lengths)).reduce(function (acc, length) {
28
29
  var h = length * 0.5;
30
+ if (length === 0) {
31
+ return [].concat((0, _toConsumableArray2.default)(acc), [{
32
+ left: 0,
33
+ right: 0,
34
+ length: length
35
+ }]);
36
+ }
29
37
  if (!h || !Number.isFinite(length)) {
30
- // Filter out nonsensical values, like 0
38
+ // Filter out nonsensical values, null, undefined, NaN, empty string
31
39
  return acc;
32
40
  }
33
41
  return [].concat((0, _toConsumableArray2.default)(acc), [{
@@ -41,6 +49,8 @@ var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
41
49
  /**
42
50
  * This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
43
51
  * Each length value generates a guideline config for both the left and right side of the length.
52
+ * When length is 0, generate a guideline at position: {x: 0}
53
+ *
44
54
  */
45
55
  exports.createGuidesFromLengths = createGuidesFromLengths;
46
56
  var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths(lengths) {
@@ -49,17 +59,26 @@ var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths
49
59
  var left = _ref.left,
50
60
  right = _ref.right,
51
61
  length = _ref.length;
52
- return [].concat((0, _toConsumableArray2.default)(acc), [{
53
- key: "".concat(key, "-").concat(length, "-left"),
54
- position: {
55
- x: left
56
- }
57
- }, {
58
- key: "".concat(key, "-").concat(length, "-right"),
59
- position: {
60
- x: right
61
- }
62
- }]);
62
+ if (length === 0) {
63
+ return [].concat((0, _toConsumableArray2.default)(acc), [{
64
+ key: "".concat(key, "-").concat(length, "-centre"),
65
+ position: {
66
+ x: left
67
+ }
68
+ }]);
69
+ } else {
70
+ return [].concat((0, _toConsumableArray2.default)(acc), [{
71
+ key: "".concat(key, "-").concat(length, "-left"),
72
+ position: {
73
+ x: left
74
+ }
75
+ }, {
76
+ key: "".concat(key, "-").concat(length, "-right"),
77
+ position: {
78
+ x: right
79
+ }
80
+ }]);
81
+ }
63
82
  }, []);
64
83
  };
65
84
  exports.createFixedGuidelinesFromLengths = createFixedGuidelinesFromLengths;
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "anyMarkActive", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _textFormatting.anyMarkActive;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "applyMarkOnRange", {
7
13
  enumerable: true,
8
14
  get: function get() {
@@ -27,4 +33,5 @@ Object.defineProperty(exports, "transformSmartCharsMentionsAndEmojis", {
27
33
  return _commands.transformSmartCharsMentionsAndEmojis;
28
34
  }
29
35
  });
30
- var _commands = require("./commands");
36
+ var _commands = require("./commands");
37
+ var _textFormatting = require("./text-formatting");
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.anyMarkActive = void 0;
7
+ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
8
+ /**
9
+ * Determine if a mark of a specific type exists anywhere in the selection.
10
+ */
11
+ var anyMarkActive = function anyMarkActive(state, markType) {
12
+ var _state$selection = state.selection,
13
+ $from = _state$selection.$from,
14
+ from = _state$selection.from,
15
+ to = _state$selection.to,
16
+ empty = _state$selection.empty;
17
+ if (empty) {
18
+ return !!markType.isInSet(state.storedMarks || $from.marks());
19
+ }
20
+ var rangeHasMark = false;
21
+ if (state.selection instanceof _cellSelection.CellSelection) {
22
+ state.selection.forEachCell(function (cell, cellPos) {
23
+ var from = cellPos;
24
+ var to = cellPos + cell.nodeSize;
25
+ if (!rangeHasMark) {
26
+ rangeHasMark = state.doc.rangeHasMark(from, to, markType);
27
+ }
28
+ });
29
+ } else {
30
+ rangeHasMark = state.doc.rangeHasMark(from, to, markType);
31
+ }
32
+ return rangeHasMark;
33
+ };
34
+ exports.anyMarkActive = anyMarkActive;
@@ -52,6 +52,12 @@ Object.defineProperty(exports, "toolbarInsertBlockMessages", {
52
52
  return _insertBlock.toolbarInsertBlockMessages;
53
53
  }
54
54
  });
55
+ Object.defineProperty(exports, "toolbarMessages", {
56
+ enumerable: true,
57
+ get: function get() {
58
+ return _toolbar.toolbarMessages;
59
+ }
60
+ });
55
61
  Object.defineProperty(exports, "unsupportedContentMessages", {
56
62
  enumerable: true,
57
63
  get: function get() {
@@ -68,6 +74,7 @@ var _insertBlock = require("./insert-block");
68
74
  var _mediaAndEmbedToolbar = require("./media-and-embed-toolbar");
69
75
  var _card = require("./card");
70
76
  var _fullPage = require("./full-page");
77
+ var _toolbar = require("./toolbar");
71
78
  var _default = (0, _reactIntlNext.defineMessages)({
72
79
  layoutFixedWidth: {
73
80
  id: 'fabric.editor.layoutFixedWidth',
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toolbarMessages = void 0;
7
+ var _reactIntlNext = require("react-intl-next");
8
+ var toolbarMessages = (0, _reactIntlNext.defineMessages)({
9
+ underline: {
10
+ id: 'fabric.editor.underline',
11
+ defaultMessage: 'Underline',
12
+ description: 'Whether the text selection has underlined text'
13
+ },
14
+ strike: {
15
+ id: 'fabric.editor.strike',
16
+ defaultMessage: 'Strikethrough',
17
+ description: 'Whether the text selection has crossed out text'
18
+ },
19
+ code: {
20
+ id: 'fabric.editor.code',
21
+ defaultMessage: 'Code',
22
+ description: 'Whether the text selection has monospaced/code font'
23
+ },
24
+ codeOn: {
25
+ id: 'fabric.editor.code.on',
26
+ defaultMessage: '{textFormattingOff}, Code On',
27
+ description: 'Reports that code formatting has been turned on'
28
+ },
29
+ subscript: {
30
+ id: 'fabric.editor.subscript',
31
+ defaultMessage: 'Subscript',
32
+ description: 'Whether the text selection is written below the line in a slightly smaller size'
33
+ },
34
+ subscriptOffSuperscriptOn: {
35
+ id: 'fabric.editor.subscript.off.superscript.on',
36
+ defaultMessage: 'Subscript Off, Superscript On',
37
+ description: 'Reports text formatting in case when subscript off and superscript on'
38
+ },
39
+ superscript: {
40
+ id: 'fabric.editor.superscript',
41
+ defaultMessage: 'Superscript',
42
+ description: 'Whether the text selection is written above the line in a slightly smaller size'
43
+ },
44
+ superscriptOffSubscriptOn: {
45
+ id: 'fabric.editor.superscript.off.subscript.on',
46
+ defaultMessage: 'Superscript Off, Subscript On',
47
+ description: 'Describe text formatting in case when Superscript Off and Subscript on'
48
+ },
49
+ clearFormatting: {
50
+ id: 'fabric.editor.clearFormatting',
51
+ defaultMessage: 'Clear formatting',
52
+ description: 'Remove all rich text formatting from the selected text'
53
+ },
54
+ moreFormatting: {
55
+ id: 'fabric.editor.moreFormatting',
56
+ defaultMessage: 'More formatting',
57
+ description: 'Clicking this will show a menu with additional formatting options'
58
+ },
59
+ bold: {
60
+ id: 'fabric.editor.bold',
61
+ defaultMessage: 'Bold',
62
+ description: 'This refers to bold or “strong” formatting, indicates that its contents have strong importance, seriousness, or urgency.'
63
+ },
64
+ italic: {
65
+ id: 'fabric.editor.italic',
66
+ defaultMessage: 'Italic',
67
+ description: 'This refers to italics or emphasized formatting.'
68
+ },
69
+ on: {
70
+ id: 'fabric.editor.on',
71
+ defaultMessage: '{formattingType} On',
72
+ description: 'Reports that text formatting has been turned on'
73
+ },
74
+ off: {
75
+ id: 'fabric.editor.off',
76
+ defaultMessage: '{formattingType} Off',
77
+ description: 'Reports that text formatting has been turned off'
78
+ },
79
+ textFormattingOff: {
80
+ id: 'fabric.editor.text.formatting.off',
81
+ defaultMessage: 'Text formatting Off',
82
+ description: 'Reports that text formatting has been turned off'
83
+ },
84
+ navigateToEditorToolbar: {
85
+ id: 'fabric.editor.navigate.toolbar.editor',
86
+ defaultMessage: 'Navigate to editor toolbar',
87
+ description: 'Navigate to the main editor toolbar.'
88
+ },
89
+ navigateToFloatingToolbar: {
90
+ id: 'fabric.editor.navigate.toolbar.floating',
91
+ defaultMessage: 'Navigate to floating toolbar',
92
+ description: 'Navigate to a floating toolbar for relevant nodes (e.g. tables or panels).'
93
+ }
94
+ });
95
+ exports.toolbarMessages = toolbarMessages;
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 = "74.34.4";
19
+ var packageVersion = "74.35.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
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
24
24
  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); }; }
25
25
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "74.34.4";
27
+ var packageVersion = "74.35.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.34.4",
3
+ "version": "74.35.0",
4
4
  "sideEffects": false
5
5
  }
@@ -11,6 +11,7 @@
11
11
  * {left: 100, right: -100, length: -200},
12
12
  * {left: -100.5, right: 100.5, length: 201},
13
13
  * ]
14
+ * When length is 0, return {left: 0, right: 0, length: 0}
14
15
  *
15
16
  * @param lengths A colection of length values which will be split into a left & right guides.
16
17
  * @returns A collection of LengthGuide objects which can be used to draw left & right guides
@@ -18,8 +19,15 @@
18
19
  export const createGuidesFromLengths = lengths => {
19
20
  return Array.from(new Set(lengths)).reduce((acc, length) => {
20
21
  const h = length * 0.5;
22
+ if (length === 0) {
23
+ return [...acc, {
24
+ left: 0,
25
+ right: 0,
26
+ length
27
+ }];
28
+ }
21
29
  if (!h || !Number.isFinite(length)) {
22
- // Filter out nonsensical values, like 0
30
+ // Filter out nonsensical values, null, undefined, NaN, empty string
23
31
  return acc;
24
32
  }
25
33
  return [...acc, {
@@ -33,21 +41,34 @@ export const createGuidesFromLengths = lengths => {
33
41
  /**
34
42
  * This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
35
43
  * Each length value generates a guideline config for both the left and right side of the length.
44
+ * When length is 0, generate a guideline at position: {x: 0}
45
+ *
36
46
  */
37
47
  export const createFixedGuidelinesFromLengths = (lengths, key = 'guide') => {
38
48
  return createGuidesFromLengths(lengths).reduce((acc, {
39
49
  left,
40
50
  right,
41
51
  length
42
- }) => [...acc, {
43
- key: `${key}-${length}-left`,
44
- position: {
45
- x: left
52
+ }) => {
53
+ if (length === 0) {
54
+ return [...acc, {
55
+ key: `${key}-${length}-centre`,
56
+ position: {
57
+ x: left
58
+ }
59
+ }];
60
+ } else {
61
+ return [...acc, {
62
+ key: `${key}-${length}-left`,
63
+ position: {
64
+ x: left
65
+ }
66
+ }, {
67
+ key: `${key}-${length}-right`,
68
+ position: {
69
+ x: right
70
+ }
71
+ }];
46
72
  }
47
- }, {
48
- key: `${key}-${length}-right`,
49
- position: {
50
- x: right
51
- }
52
- }], []);
73
+ }, []);
53
74
  };
@@ -1 +1,2 @@
1
- export { transformSmartCharsMentionsAndEmojis, applyMarkOnRange, toggleMark, filterChildrenBetween } from './commands';
1
+ export { transformSmartCharsMentionsAndEmojis, applyMarkOnRange, toggleMark, filterChildrenBetween } from './commands';
2
+ export { anyMarkActive } from './text-formatting';
@@ -0,0 +1,29 @@
1
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
2
+
3
+ /**
4
+ * Determine if a mark of a specific type exists anywhere in the selection.
5
+ */
6
+ export const anyMarkActive = (state, markType) => {
7
+ const {
8
+ $from,
9
+ from,
10
+ to,
11
+ empty
12
+ } = state.selection;
13
+ if (empty) {
14
+ return !!markType.isInSet(state.storedMarks || $from.marks());
15
+ }
16
+ let rangeHasMark = false;
17
+ if (state.selection instanceof CellSelection) {
18
+ state.selection.forEachCell((cell, cellPos) => {
19
+ const from = cellPos;
20
+ const to = cellPos + cell.nodeSize;
21
+ if (!rangeHasMark) {
22
+ rangeHasMark = state.doc.rangeHasMark(from, to, markType);
23
+ }
24
+ });
25
+ } else {
26
+ rangeHasMark = state.doc.rangeHasMark(from, to, markType);
27
+ }
28
+ return rangeHasMark;
29
+ };
@@ -8,6 +8,7 @@ export { toolbarInsertBlockMessages } from './insert-block';
8
8
  export { toolbarMessages as mediaAndEmbedToolbarMessages } from './media-and-embed-toolbar';
9
9
  export { messages as cardMessages } from './card';
10
10
  export { messages as fullPageMessages } from './full-page';
11
+ export { toolbarMessages } from './toolbar';
11
12
  export default defineMessages({
12
13
  layoutFixedWidth: {
13
14
  id: 'fabric.editor.layoutFixedWidth',
@@ -0,0 +1,88 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export const toolbarMessages = defineMessages({
3
+ underline: {
4
+ id: 'fabric.editor.underline',
5
+ defaultMessage: 'Underline',
6
+ description: 'Whether the text selection has underlined text'
7
+ },
8
+ strike: {
9
+ id: 'fabric.editor.strike',
10
+ defaultMessage: 'Strikethrough',
11
+ description: 'Whether the text selection has crossed out text'
12
+ },
13
+ code: {
14
+ id: 'fabric.editor.code',
15
+ defaultMessage: 'Code',
16
+ description: 'Whether the text selection has monospaced/code font'
17
+ },
18
+ codeOn: {
19
+ id: 'fabric.editor.code.on',
20
+ defaultMessage: '{textFormattingOff}, Code On',
21
+ description: 'Reports that code formatting has been turned on'
22
+ },
23
+ subscript: {
24
+ id: 'fabric.editor.subscript',
25
+ defaultMessage: 'Subscript',
26
+ description: 'Whether the text selection is written below the line in a slightly smaller size'
27
+ },
28
+ subscriptOffSuperscriptOn: {
29
+ id: 'fabric.editor.subscript.off.superscript.on',
30
+ defaultMessage: 'Subscript Off, Superscript On',
31
+ description: 'Reports text formatting in case when subscript off and superscript on'
32
+ },
33
+ superscript: {
34
+ id: 'fabric.editor.superscript',
35
+ defaultMessage: 'Superscript',
36
+ description: 'Whether the text selection is written above the line in a slightly smaller size'
37
+ },
38
+ superscriptOffSubscriptOn: {
39
+ id: 'fabric.editor.superscript.off.subscript.on',
40
+ defaultMessage: 'Superscript Off, Subscript On',
41
+ description: 'Describe text formatting in case when Superscript Off and Subscript on'
42
+ },
43
+ clearFormatting: {
44
+ id: 'fabric.editor.clearFormatting',
45
+ defaultMessage: 'Clear formatting',
46
+ description: 'Remove all rich text formatting from the selected text'
47
+ },
48
+ moreFormatting: {
49
+ id: 'fabric.editor.moreFormatting',
50
+ defaultMessage: 'More formatting',
51
+ description: 'Clicking this will show a menu with additional formatting options'
52
+ },
53
+ bold: {
54
+ id: 'fabric.editor.bold',
55
+ defaultMessage: 'Bold',
56
+ description: 'This refers to bold or “strong” formatting, indicates that its contents have strong importance, seriousness, or urgency.'
57
+ },
58
+ italic: {
59
+ id: 'fabric.editor.italic',
60
+ defaultMessage: 'Italic',
61
+ description: 'This refers to italics or emphasized formatting.'
62
+ },
63
+ on: {
64
+ id: 'fabric.editor.on',
65
+ defaultMessage: '{formattingType} On',
66
+ description: 'Reports that text formatting has been turned on'
67
+ },
68
+ off: {
69
+ id: 'fabric.editor.off',
70
+ defaultMessage: '{formattingType} Off',
71
+ description: 'Reports that text formatting has been turned off'
72
+ },
73
+ textFormattingOff: {
74
+ id: 'fabric.editor.text.formatting.off',
75
+ defaultMessage: 'Text formatting Off',
76
+ description: 'Reports that text formatting has been turned off'
77
+ },
78
+ navigateToEditorToolbar: {
79
+ id: 'fabric.editor.navigate.toolbar.editor',
80
+ defaultMessage: 'Navigate to editor toolbar',
81
+ description: 'Navigate to the main editor toolbar.'
82
+ },
83
+ navigateToFloatingToolbar: {
84
+ id: 'fabric.editor.navigate.toolbar.floating',
85
+ defaultMessage: 'Navigate to floating toolbar',
86
+ description: 'Navigate to a floating toolbar for relevant nodes (e.g. tables or panels).'
87
+ }
88
+ });
@@ -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 = "74.34.4";
3
+ const packageVersion = "74.35.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
@@ -0,0 +1 @@
1
+ export {};
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import Layer from '../Layer';
10
10
  const packageName = "@atlaskit/editor-common";
11
- const packageVersion = "74.34.4";
11
+ const packageVersion = "74.35.0";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = '0, 8';
14
14
  class DropList extends Component {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.34.4",
3
+ "version": "74.35.0",
4
4
  "sideEffects": false
5
5
  }
@@ -12,6 +12,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
12
12
  * {left: 100, right: -100, length: -200},
13
13
  * {left: -100.5, right: 100.5, length: 201},
14
14
  * ]
15
+ * When length is 0, return {left: 0, right: 0, length: 0}
15
16
  *
16
17
  * @param lengths A colection of length values which will be split into a left & right guides.
17
18
  * @returns A collection of LengthGuide objects which can be used to draw left & right guides
@@ -19,8 +20,15 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
19
20
  export var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
20
21
  return Array.from(new Set(lengths)).reduce(function (acc, length) {
21
22
  var h = length * 0.5;
23
+ if (length === 0) {
24
+ return [].concat(_toConsumableArray(acc), [{
25
+ left: 0,
26
+ right: 0,
27
+ length: length
28
+ }]);
29
+ }
22
30
  if (!h || !Number.isFinite(length)) {
23
- // Filter out nonsensical values, like 0
31
+ // Filter out nonsensical values, null, undefined, NaN, empty string
24
32
  return acc;
25
33
  }
26
34
  return [].concat(_toConsumableArray(acc), [{
@@ -34,6 +42,8 @@ export var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
34
42
  /**
35
43
  * This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
36
44
  * Each length value generates a guideline config for both the left and right side of the length.
45
+ * When length is 0, generate a guideline at position: {x: 0}
46
+ *
37
47
  */
38
48
  export var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths(lengths) {
39
49
  var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'guide';
@@ -41,16 +51,25 @@ export var createFixedGuidelinesFromLengths = function createFixedGuidelinesFrom
41
51
  var left = _ref.left,
42
52
  right = _ref.right,
43
53
  length = _ref.length;
44
- return [].concat(_toConsumableArray(acc), [{
45
- key: "".concat(key, "-").concat(length, "-left"),
46
- position: {
47
- x: left
48
- }
49
- }, {
50
- key: "".concat(key, "-").concat(length, "-right"),
51
- position: {
52
- x: right
53
- }
54
- }]);
54
+ if (length === 0) {
55
+ return [].concat(_toConsumableArray(acc), [{
56
+ key: "".concat(key, "-").concat(length, "-centre"),
57
+ position: {
58
+ x: left
59
+ }
60
+ }]);
61
+ } else {
62
+ return [].concat(_toConsumableArray(acc), [{
63
+ key: "".concat(key, "-").concat(length, "-left"),
64
+ position: {
65
+ x: left
66
+ }
67
+ }, {
68
+ key: "".concat(key, "-").concat(length, "-right"),
69
+ position: {
70
+ x: right
71
+ }
72
+ }]);
73
+ }
55
74
  }, []);
56
75
  };
@@ -1 +1,2 @@
1
- export { transformSmartCharsMentionsAndEmojis, applyMarkOnRange, toggleMark, filterChildrenBetween } from './commands';
1
+ export { transformSmartCharsMentionsAndEmojis, applyMarkOnRange, toggleMark, filterChildrenBetween } from './commands';
2
+ export { anyMarkActive } from './text-formatting';
@@ -0,0 +1,28 @@
1
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
2
+
3
+ /**
4
+ * Determine if a mark of a specific type exists anywhere in the selection.
5
+ */
6
+ export var anyMarkActive = function anyMarkActive(state, markType) {
7
+ var _state$selection = state.selection,
8
+ $from = _state$selection.$from,
9
+ from = _state$selection.from,
10
+ to = _state$selection.to,
11
+ empty = _state$selection.empty;
12
+ if (empty) {
13
+ return !!markType.isInSet(state.storedMarks || $from.marks());
14
+ }
15
+ var rangeHasMark = false;
16
+ if (state.selection instanceof CellSelection) {
17
+ state.selection.forEachCell(function (cell, cellPos) {
18
+ var from = cellPos;
19
+ var to = cellPos + cell.nodeSize;
20
+ if (!rangeHasMark) {
21
+ rangeHasMark = state.doc.rangeHasMark(from, to, markType);
22
+ }
23
+ });
24
+ } else {
25
+ rangeHasMark = state.doc.rangeHasMark(from, to, markType);
26
+ }
27
+ return rangeHasMark;
28
+ };
@@ -8,6 +8,7 @@ export { toolbarInsertBlockMessages } from './insert-block';
8
8
  export { toolbarMessages as mediaAndEmbedToolbarMessages } from './media-and-embed-toolbar';
9
9
  export { messages as cardMessages } from './card';
10
10
  export { messages as fullPageMessages } from './full-page';
11
+ export { toolbarMessages } from './toolbar';
11
12
  export default defineMessages({
12
13
  layoutFixedWidth: {
13
14
  id: 'fabric.editor.layoutFixedWidth',
@@ -0,0 +1,88 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var toolbarMessages = defineMessages({
3
+ underline: {
4
+ id: 'fabric.editor.underline',
5
+ defaultMessage: 'Underline',
6
+ description: 'Whether the text selection has underlined text'
7
+ },
8
+ strike: {
9
+ id: 'fabric.editor.strike',
10
+ defaultMessage: 'Strikethrough',
11
+ description: 'Whether the text selection has crossed out text'
12
+ },
13
+ code: {
14
+ id: 'fabric.editor.code',
15
+ defaultMessage: 'Code',
16
+ description: 'Whether the text selection has monospaced/code font'
17
+ },
18
+ codeOn: {
19
+ id: 'fabric.editor.code.on',
20
+ defaultMessage: '{textFormattingOff}, Code On',
21
+ description: 'Reports that code formatting has been turned on'
22
+ },
23
+ subscript: {
24
+ id: 'fabric.editor.subscript',
25
+ defaultMessage: 'Subscript',
26
+ description: 'Whether the text selection is written below the line in a slightly smaller size'
27
+ },
28
+ subscriptOffSuperscriptOn: {
29
+ id: 'fabric.editor.subscript.off.superscript.on',
30
+ defaultMessage: 'Subscript Off, Superscript On',
31
+ description: 'Reports text formatting in case when subscript off and superscript on'
32
+ },
33
+ superscript: {
34
+ id: 'fabric.editor.superscript',
35
+ defaultMessage: 'Superscript',
36
+ description: 'Whether the text selection is written above the line in a slightly smaller size'
37
+ },
38
+ superscriptOffSubscriptOn: {
39
+ id: 'fabric.editor.superscript.off.subscript.on',
40
+ defaultMessage: 'Superscript Off, Subscript On',
41
+ description: 'Describe text formatting in case when Superscript Off and Subscript on'
42
+ },
43
+ clearFormatting: {
44
+ id: 'fabric.editor.clearFormatting',
45
+ defaultMessage: 'Clear formatting',
46
+ description: 'Remove all rich text formatting from the selected text'
47
+ },
48
+ moreFormatting: {
49
+ id: 'fabric.editor.moreFormatting',
50
+ defaultMessage: 'More formatting',
51
+ description: 'Clicking this will show a menu with additional formatting options'
52
+ },
53
+ bold: {
54
+ id: 'fabric.editor.bold',
55
+ defaultMessage: 'Bold',
56
+ description: 'This refers to bold or “strong” formatting, indicates that its contents have strong importance, seriousness, or urgency.'
57
+ },
58
+ italic: {
59
+ id: 'fabric.editor.italic',
60
+ defaultMessage: 'Italic',
61
+ description: 'This refers to italics or emphasized formatting.'
62
+ },
63
+ on: {
64
+ id: 'fabric.editor.on',
65
+ defaultMessage: '{formattingType} On',
66
+ description: 'Reports that text formatting has been turned on'
67
+ },
68
+ off: {
69
+ id: 'fabric.editor.off',
70
+ defaultMessage: '{formattingType} Off',
71
+ description: 'Reports that text formatting has been turned off'
72
+ },
73
+ textFormattingOff: {
74
+ id: 'fabric.editor.text.formatting.off',
75
+ defaultMessage: 'Text formatting Off',
76
+ description: 'Reports that text formatting has been turned off'
77
+ },
78
+ navigateToEditorToolbar: {
79
+ id: 'fabric.editor.navigate.toolbar.editor',
80
+ defaultMessage: 'Navigate to editor toolbar',
81
+ description: 'Navigate to the main editor toolbar.'
82
+ },
83
+ navigateToFloatingToolbar: {
84
+ id: 'fabric.editor.navigate.toolbar.floating',
85
+ defaultMessage: 'Navigate to floating toolbar',
86
+ description: 'Navigate to a floating toolbar for relevant nodes (e.g. tables or panels).'
87
+ }
88
+ });
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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 = "74.34.4";
9
+ var packageVersion = "74.35.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
@@ -0,0 +1 @@
1
+ export {};
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
18
18
  import { borderRadius } from '@atlaskit/theme/constants';
19
19
  import Layer from '../Layer';
20
20
  var packageName = "@atlaskit/editor-common";
21
- var packageVersion = "74.34.4";
21
+ var packageVersion = "74.35.0";
22
22
  var halfFocusRing = 1;
23
23
  var dropOffset = '0, 8';
24
24
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.34.4",
3
+ "version": "74.35.0",
4
4
  "sideEffects": false
5
5
  }
@@ -12,6 +12,7 @@ import { LengthGuide } from './types';
12
12
  * {left: 100, right: -100, length: -200},
13
13
  * {left: -100.5, right: 100.5, length: 201},
14
14
  * ]
15
+ * When length is 0, return {left: 0, right: 0, length: 0}
15
16
  *
16
17
  * @param lengths A colection of length values which will be split into a left & right guides.
17
18
  * @returns A collection of LengthGuide objects which can be used to draw left & right guides
@@ -20,6 +21,8 @@ export declare const createGuidesFromLengths: (lengths: number[]) => LengthGuide
20
21
  /**
21
22
  * This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
22
23
  * Each length value generates a guideline config for both the left and right side of the length.
24
+ * When length is 0, generate a guideline at position: {x: 0}
25
+ *
23
26
  */
24
27
  export declare const createFixedGuidelinesFromLengths: (lengths: number[], key?: string) => {
25
28
  key: string;
@@ -1 +1,2 @@
1
1
  export { transformSmartCharsMentionsAndEmojis, applyMarkOnRange, toggleMark, filterChildrenBetween, } from './commands';
2
+ export { anyMarkActive } from './text-formatting';
@@ -0,0 +1,6 @@
1
+ import type { Mark, MarkType } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
+ /**
4
+ * Determine if a mark of a specific type exists anywhere in the selection.
5
+ */
6
+ export declare const anyMarkActive: (state: EditorState, markType: Mark | MarkType) => boolean;
@@ -7,6 +7,7 @@ export { toolbarInsertBlockMessages } from './insert-block';
7
7
  export { toolbarMessages as mediaAndEmbedToolbarMessages } from './media-and-embed-toolbar';
8
8
  export { messages as cardMessages } from './card';
9
9
  export { messages as fullPageMessages } from './full-page';
10
+ export { toolbarMessages } from './toolbar';
10
11
  declare const _default: {
11
12
  layoutFixedWidth: {
12
13
  id: string;
@@ -0,0 +1,87 @@
1
+ export declare const toolbarMessages: {
2
+ underline: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ strike: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ code: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ codeOn: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ subscript: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ subscriptOffSuperscriptOn: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ superscript: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ superscriptOffSubscriptOn: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ clearFormatting: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ moreFormatting: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
52
+ bold: {
53
+ id: string;
54
+ defaultMessage: string;
55
+ description: string;
56
+ };
57
+ italic: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
62
+ on: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
67
+ off: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
72
+ textFormattingOff: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
77
+ navigateToEditorToolbar: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
82
+ navigateToFloatingToolbar: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
87
+ };
@@ -42,3 +42,4 @@ export type { ImageUploadPluginReferenceEventBase, ImageUploadPluginReferenceEve
42
42
  export type { AllowedBlockTypes, HeadingLevels, NormalTextLevel, HeadingLevelsAndNormalText, } from './block-type';
43
43
  export type { ColumnResizingPluginState } from './tables';
44
44
  export type { InputRuleHandler, OnHandlerApply, InputRuleWrapper, } from './input-rules';
45
+ export type { TextFormattingOptions, TextFormattingState, InputMethodToolbar, InputMethodBasic, } from './text-formatting';
@@ -0,0 +1,36 @@
1
+ import { INPUT_METHOD } from '../analytics';
2
+ /**
3
+ * Configuration for the Text Formatting plugin
4
+ */
5
+ export interface TextFormattingOptions {
6
+ disableSuperscriptAndSubscript?: boolean;
7
+ disableUnderline?: boolean;
8
+ disableCode?: boolean;
9
+ disableSmartTextCompletion?: boolean;
10
+ responsiveToolbarMenu?: boolean;
11
+ }
12
+ export interface TextFormattingState {
13
+ emActive?: boolean;
14
+ emDisabled?: boolean;
15
+ emHidden?: boolean;
16
+ codeActive?: boolean;
17
+ codeDisabled?: boolean;
18
+ codeHidden?: boolean;
19
+ underlineActive?: boolean;
20
+ underlineDisabled?: boolean;
21
+ underlineHidden?: boolean;
22
+ strikeActive?: boolean;
23
+ strikeDisabled?: boolean;
24
+ strikeHidden?: boolean;
25
+ strongActive?: boolean;
26
+ strongDisabled?: boolean;
27
+ strongHidden?: boolean;
28
+ superscriptActive?: boolean;
29
+ superscriptDisabled?: boolean;
30
+ superscriptHidden?: boolean;
31
+ subscriptActive?: boolean;
32
+ subscriptDisabled?: boolean;
33
+ subscriptHidden?: boolean;
34
+ }
35
+ export type InputMethodToolbar = INPUT_METHOD.TOOLBAR;
36
+ export type InputMethodBasic = InputMethodToolbar | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING;
@@ -12,6 +12,7 @@ import { LengthGuide } from './types';
12
12
  * {left: 100, right: -100, length: -200},
13
13
  * {left: -100.5, right: 100.5, length: 201},
14
14
  * ]
15
+ * When length is 0, return {left: 0, right: 0, length: 0}
15
16
  *
16
17
  * @param lengths A colection of length values which will be split into a left & right guides.
17
18
  * @returns A collection of LengthGuide objects which can be used to draw left & right guides
@@ -20,6 +21,8 @@ export declare const createGuidesFromLengths: (lengths: number[]) => LengthGuide
20
21
  /**
21
22
  * This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
22
23
  * Each length value generates a guideline config for both the left and right side of the length.
24
+ * When length is 0, generate a guideline at position: {x: 0}
25
+ *
23
26
  */
24
27
  export declare const createFixedGuidelinesFromLengths: (lengths: number[], key?: string) => {
25
28
  key: string;
@@ -1 +1,2 @@
1
1
  export { transformSmartCharsMentionsAndEmojis, applyMarkOnRange, toggleMark, filterChildrenBetween, } from './commands';
2
+ export { anyMarkActive } from './text-formatting';
@@ -0,0 +1,6 @@
1
+ import type { Mark, MarkType } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
+ /**
4
+ * Determine if a mark of a specific type exists anywhere in the selection.
5
+ */
6
+ export declare const anyMarkActive: (state: EditorState, markType: Mark | MarkType) => boolean;
@@ -7,6 +7,7 @@ export { toolbarInsertBlockMessages } from './insert-block';
7
7
  export { toolbarMessages as mediaAndEmbedToolbarMessages } from './media-and-embed-toolbar';
8
8
  export { messages as cardMessages } from './card';
9
9
  export { messages as fullPageMessages } from './full-page';
10
+ export { toolbarMessages } from './toolbar';
10
11
  declare const _default: {
11
12
  layoutFixedWidth: {
12
13
  id: string;
@@ -0,0 +1,87 @@
1
+ export declare const toolbarMessages: {
2
+ underline: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ strike: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ code: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ codeOn: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ subscript: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ subscriptOffSuperscriptOn: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ superscript: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ superscriptOffSubscriptOn: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ clearFormatting: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ moreFormatting: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
52
+ bold: {
53
+ id: string;
54
+ defaultMessage: string;
55
+ description: string;
56
+ };
57
+ italic: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
62
+ on: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
67
+ off: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
72
+ textFormattingOff: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
77
+ navigateToEditorToolbar: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
82
+ navigateToFloatingToolbar: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
87
+ };
@@ -42,3 +42,4 @@ export type { ImageUploadPluginReferenceEventBase, ImageUploadPluginReferenceEve
42
42
  export type { AllowedBlockTypes, HeadingLevels, NormalTextLevel, HeadingLevelsAndNormalText, } from './block-type';
43
43
  export type { ColumnResizingPluginState } from './tables';
44
44
  export type { InputRuleHandler, OnHandlerApply, InputRuleWrapper, } from './input-rules';
45
+ export type { TextFormattingOptions, TextFormattingState, InputMethodToolbar, InputMethodBasic, } from './text-formatting';
@@ -0,0 +1,36 @@
1
+ import { INPUT_METHOD } from '../analytics';
2
+ /**
3
+ * Configuration for the Text Formatting plugin
4
+ */
5
+ export interface TextFormattingOptions {
6
+ disableSuperscriptAndSubscript?: boolean;
7
+ disableUnderline?: boolean;
8
+ disableCode?: boolean;
9
+ disableSmartTextCompletion?: boolean;
10
+ responsiveToolbarMenu?: boolean;
11
+ }
12
+ export interface TextFormattingState {
13
+ emActive?: boolean;
14
+ emDisabled?: boolean;
15
+ emHidden?: boolean;
16
+ codeActive?: boolean;
17
+ codeDisabled?: boolean;
18
+ codeHidden?: boolean;
19
+ underlineActive?: boolean;
20
+ underlineDisabled?: boolean;
21
+ underlineHidden?: boolean;
22
+ strikeActive?: boolean;
23
+ strikeDisabled?: boolean;
24
+ strikeHidden?: boolean;
25
+ strongActive?: boolean;
26
+ strongDisabled?: boolean;
27
+ strongHidden?: boolean;
28
+ superscriptActive?: boolean;
29
+ superscriptDisabled?: boolean;
30
+ superscriptHidden?: boolean;
31
+ subscriptActive?: boolean;
32
+ subscriptDisabled?: boolean;
33
+ subscriptHidden?: boolean;
34
+ }
35
+ export type InputMethodToolbar = INPUT_METHOD.TOOLBAR;
36
+ export type InputMethodBasic = InputMethodToolbar | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.34.4",
3
+ "version": "74.35.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/"