@atlaskit/editor-common 114.17.0 → 114.18.1

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 114.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`88644f98cd51f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88644f98cd51f) -
8
+ Minor UI changes - button color and label changes
9
+
10
+ ## 114.18.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`a759f33417d9b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a759f33417d9b) -
15
+ [PIRA-1311](https://opsj.atlassian.net/browse/PIRA-1311) - clean up platform_editor_media_vc_fixes
16
+
17
+ ### Patch Changes
18
+
19
+ - [`7043ace1c45f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7043ace1c45f2) -
20
+ [ux] reduces slipperiness and improves clarity of inline invites for editor mentions
21
+ - Updated dependencies
22
+
3
23
  ## 114.17.0
4
24
 
5
25
  ### Minor Changes
@@ -133,12 +133,12 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
133
133
  },
134
134
  cardSourcesHideButtonLabel: {
135
135
  id: 'fabric.editor.ai.suggestions.card.sourcesHideButtonLabel.non-final',
136
- defaultMessage: 'Hide sources',
136
+ defaultMessage: 'Hide reasoning',
137
137
  description: 'Label for the sources toggle button when sources are expanded'
138
138
  },
139
139
  cardSourcesShowButtonLabel: {
140
140
  id: 'fabric.editor.ai.suggestions.card.sourcesShowButtonLabel.non-final',
141
- defaultMessage: 'Show sources',
141
+ defaultMessage: 'Show reasoning',
142
142
  description: 'Label for the sources toggle button when sources are collapsed'
143
143
  },
144
144
  cardAcceptButtonLabel: {
@@ -103,7 +103,7 @@ exports.makeKeyMapArrayWithCommon = makeKeyMapArrayWithCommon;
103
103
  exports.makeKeyMapWithCommon = makeKeyMapWithCommon;
104
104
  exports.makeKeymap = makeKeymap;
105
105
  exports.selectColumn = exports.redoAlt = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.navToFloatingToolbar = exports.navToEditorToolbar = exports.moveUp = exports.moveRowUpOld = exports.moveRowUp = exports.moveRowDownOld = exports.moveRowDown = exports.moveRight = exports.moveLeft = exports.moveDown = exports.moveColumnRightOld = exports.moveColumnRight = exports.moveColumnLeftOld = exports.moveColumnLeft = void 0;
106
- exports.toggleViewChanges = exports.toggleUnderline = exports.toggleTaskList = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleSmallText = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCodeBlock = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.showElementDragHandle = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = exports.selectTable = exports.selectRow = void 0;
106
+ exports.toggleViewChanges = exports.toggleUnderline = exports.toggleTaskList = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleSmallText = exports.toggleOrderedList = exports.toggleMarkdownView = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCodeBlock = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.showElementDragHandle = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = exports.selectTable = exports.selectRow = void 0;
107
107
  exports.tooltip = tooltip;
108
108
  exports.undo = void 0;
109
109
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
@@ -123,6 +123,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
123
123
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
124
124
 
125
125
  var addAltText = exports.addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
126
+ var toggleMarkdownView = exports.toggleMarkdownView = makeKeyMapWithCommon('Toggle markdown view', 'Mod-e');
126
127
  var toggleViewChanges = exports.toggleViewChanges = makeKeyMapWithCommon('View changes', 'Mod-Alt-z');
127
128
  var navToEditorToolbar = exports.navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
128
129
  var navToFloatingToolbar = exports.navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
@@ -22,18 +22,18 @@ var markdownModeMessages = exports.markdownModeMessages = (0, _reactIntl.defineM
22
22
  },
23
23
  source: {
24
24
  id: 'fabric.editor.markdownMode.viewToggle.source',
25
- defaultMessage: 'Markdown source',
26
- description: 'Tooltip and accessible label for the toggle button that switches the editor into raw markdown source view.'
25
+ defaultMessage: 'Syntax editor',
26
+ description: 'Tooltip and accessible label for the toggle button that switches the editor into raw markdown source (syntax) view.'
27
27
  },
28
28
  wysiwyg: {
29
29
  id: 'fabric.editor.markdownMode.viewToggle.wysiwyg',
30
- defaultMessage: 'WYSIWYG',
30
+ defaultMessage: 'WYSIWYG editor',
31
31
  description: 'Tooltip and accessible label for the toggle button that switches the editor into the WYSIWYG markdown editing view (the default).'
32
32
  },
33
33
  preview: {
34
34
  id: 'fabric.editor.markdownMode.viewToggle.preview',
35
- defaultMessage: 'Preview',
36
- description: 'Tooltip and accessible label for the toggle button that switches the editor into a read-only rendered markdown preview.'
35
+ defaultMessage: 'Split view (coming soon)',
36
+ description: 'Tooltip and accessible label for the toggle button that will switch the editor into a split view. This feature is not yet available.'
37
37
  },
38
38
  sourceAriaLabel: {
39
39
  id: 'fabric.editor.markdownMode.sourceView.ariaLabel',
@@ -40,5 +40,10 @@ var mentionMessages = exports.mentionMessages = (0, _reactIntl.defineMessages)({
40
40
  id: 'fabric.editor.inviteItem.sendInvite',
41
41
  defaultMessage: 'Send request to invite teammate',
42
42
  description: 'By line text for send request to invite teammate option shown in mentions.'
43
+ },
44
+ inviteButton: {
45
+ id: 'fabric.editor.inviteItem.inviteButton',
46
+ defaultMessage: 'Invite',
47
+ description: 'Label for the invite button shown in the mention typeahead invite item.'
43
48
  }
44
49
  });
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "114.16.0";
22
+ var packageVersion = "114.18.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "114.16.0";
27
+ var packageVersion = "114.18.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -11,7 +11,6 @@ exports.calcPxFromColumns = calcPxFromColumns;
11
11
  exports.calcPxFromPct = calcPxFromPct;
12
12
  exports.wrappedLayouts = exports.snapToGrid = exports.layoutSupportsWidth = void 0;
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
14
  var _constants = require("../../media-single/constants");
16
15
  var validWidthModes = ['center', 'wrap-left', 'wrap-right', 'align-start', 'align-end'];
17
16
  var layoutSupportsWidth = exports.layoutSupportsWidth = function layoutSupportsWidth(layout) {
@@ -67,10 +66,7 @@ var calcMediaPxWidth = exports.calcMediaPxWidth = function calcMediaPxWidth(opts
67
66
  }
68
67
  return calculatedPctWidth;
69
68
  }
70
- if ((0, _expValEquals.expValEquals)('platform_editor_media_vc_fixes', 'isEnabled', true)) {
71
- return calculatedPctWidth;
72
- }
73
- return Math.min(calculatedPctWidth, origWidth);
69
+ return calculatedPctWidth;
74
70
  }
75
71
  if (calculatedResizedPctWidth) {
76
72
  return calculatedResizedPctWidth;
@@ -84,11 +80,7 @@ var calcMediaPxWidth = exports.calcMediaPxWidth = function calcMediaPxWidth(opts
84
80
  } else if (layout && wrappedLayouts.indexOf(layout) !== -1) {
85
81
  // when layout is wrap-left, wrap-right, align-start, align-end
86
82
  // but no pctWidth is defined
87
- if ((0, _expValEquals.expValEquals)('platform_editor_media_vc_fixes', 'isEnabled', true)) {
88
- return Math.min(calcPxFromPct(0.5, lineLength || width), origWidth);
89
- }
90
- var halfLineLength = Math.ceil((lineLength || width) / 2);
91
- return origWidth <= halfLineLength ? origWidth : halfLineLength;
83
+ return Math.min(calcPxFromPct(0.5, lineLength || width), origWidth);
92
84
  }
93
85
  return origWidth;
94
86
  };
@@ -16,7 +16,6 @@ var _react = _interopRequireDefault(require("react"));
16
16
  var _react2 = require("@emotion/react");
17
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
19
  var _utils = require("../../utils");
21
20
  var _breakout = require("../../utils/breakout");
22
21
  var _excluded = ["children"];
@@ -137,16 +136,6 @@ function calcResizedWidth(layout, width) {
137
136
  return "".concat(width, "px");
138
137
  }
139
138
  }
140
- function calcMaxWidth(layout, containerWidth) {
141
- switch (layout) {
142
- case 'wide':
143
- return (0, _breakout.calcWideWidth)(containerWidth);
144
- case 'full-width':
145
- return (0, _breakout.calcBreakoutWidth)(layout, containerWidth);
146
- default:
147
- return '100%';
148
- }
149
- }
150
139
  function calcMargin(layout) {
151
140
  switch (layout) {
152
141
  case 'wrap-right':
@@ -231,7 +220,6 @@ var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function M
231
220
  _ref$isInRenderer = _ref.isInRenderer,
232
221
  isInRenderer = _ref$isInRenderer === void 0 ? false : _ref$isInRenderer;
233
222
  var calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(mediaSingleWidth || width, "px") : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
234
- var calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(containerWidth, "px") : calcMaxWidth(layout, containerWidth));
235
223
  var cssMaxWidth = isExtendedResizeExperienceOn ? 'var(--ak-editor-max-container-width)' : calcMaxCssForPercentageTypeMedia(layout);
236
224
 
237
225
  // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
@@ -247,7 +235,7 @@ var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function M
247
235
  '@container ak-renderer-wrapper (min-width: 1px)': {
248
236
  maxWidth: '100cqw'
249
237
  }
250
- }) : (0, _expValEquals.expValEquals)('platform_editor_media_vc_fixes', 'isEnabled', true) ? "max-width: ".concat(cssMaxWidth, ";") : "max-width: ".concat(calculatedMaxWidth, ";"), isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
238
+ }) : "max-width: ".concat(cssMaxWidth, ";"), isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
251
239
  };
252
240
  var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
253
241
  var hasFallbackContainer = _ref2.hasFallbackContainer,
@@ -127,12 +127,12 @@ export const aiSuggestionsMessages = defineMessages({
127
127
  },
128
128
  cardSourcesHideButtonLabel: {
129
129
  id: 'fabric.editor.ai.suggestions.card.sourcesHideButtonLabel.non-final',
130
- defaultMessage: 'Hide sources',
130
+ defaultMessage: 'Hide reasoning',
131
131
  description: 'Label for the sources toggle button when sources are expanded'
132
132
  },
133
133
  cardSourcesShowButtonLabel: {
134
134
  id: 'fabric.editor.ai.suggestions.card.sourcesShowButtonLabel.non-final',
135
- defaultMessage: 'Show sources',
135
+ defaultMessage: 'Show reasoning',
136
136
  description: 'Label for the sources toggle button when sources are collapsed'
137
137
  },
138
138
  cardAcceptButtonLabel: {
@@ -10,6 +10,7 @@ import { base, keyName } from 'w3c-keyname';
10
10
  import { editorCommandToPMCommand } from '../preset/editor-commands';
11
11
  import { getBrowserInfo } from '../utils/browser';
12
12
  export const addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
13
+ export const toggleMarkdownView = makeKeyMapWithCommon('Toggle markdown view', 'Mod-e');
13
14
  export const toggleViewChanges = makeKeyMapWithCommon('View changes', 'Mod-Alt-z');
14
15
  export const navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
15
16
  export const navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
@@ -17,18 +17,18 @@ export const markdownModeMessages = defineMessages({
17
17
  },
18
18
  source: {
19
19
  id: 'fabric.editor.markdownMode.viewToggle.source',
20
- defaultMessage: 'Markdown source',
21
- description: 'Tooltip and accessible label for the toggle button that switches the editor into raw markdown source view.'
20
+ defaultMessage: 'Syntax editor',
21
+ description: 'Tooltip and accessible label for the toggle button that switches the editor into raw markdown source (syntax) view.'
22
22
  },
23
23
  wysiwyg: {
24
24
  id: 'fabric.editor.markdownMode.viewToggle.wysiwyg',
25
- defaultMessage: 'WYSIWYG',
25
+ defaultMessage: 'WYSIWYG editor',
26
26
  description: 'Tooltip and accessible label for the toggle button that switches the editor into the WYSIWYG markdown editing view (the default).'
27
27
  },
28
28
  preview: {
29
29
  id: 'fabric.editor.markdownMode.viewToggle.preview',
30
- defaultMessage: 'Preview',
31
- description: 'Tooltip and accessible label for the toggle button that switches the editor into a read-only rendered markdown preview.'
30
+ defaultMessage: 'Split view (coming soon)',
31
+ description: 'Tooltip and accessible label for the toggle button that will switch the editor into a split view. This feature is not yet available.'
32
32
  },
33
33
  sourceAriaLabel: {
34
34
  id: 'fabric.editor.markdownMode.sourceView.ariaLabel',
@@ -34,5 +34,10 @@ export const mentionMessages = defineMessages({
34
34
  id: 'fabric.editor.inviteItem.sendInvite',
35
35
  defaultMessage: 'Send request to invite teammate',
36
36
  description: 'By line text for send request to invite teammate option shown in mentions.'
37
+ },
38
+ inviteButton: {
39
+ id: 'fabric.editor.inviteItem.inviteButton',
40
+ defaultMessage: 'Invite',
41
+ description: 'Label for the invite button shown in the mention typeahead invite item.'
37
42
  }
38
43
  });
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "114.16.0";
7
+ const packageVersion = "114.18.0";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "114.16.0";
17
+ const packageVersion = "114.18.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,5 +1,4 @@
1
1
  import { akEditorBreakoutPadding, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { MEDIA_SINGLE_GUTTER_SIZE } from '../../media-single/constants';
4
3
  const validWidthModes = ['center', 'wrap-left', 'wrap-right', 'align-start', 'align-end'];
5
4
  export const layoutSupportsWidth = layout => validWidthModes.indexOf(layout) > -1;
@@ -55,10 +54,7 @@ export const calcMediaPxWidth = opts => {
55
54
  }
56
55
  return calculatedPctWidth;
57
56
  }
58
- if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
59
- return calculatedPctWidth;
60
- }
61
- return Math.min(calculatedPctWidth, origWidth);
57
+ return calculatedPctWidth;
62
58
  }
63
59
  if (calculatedResizedPctWidth) {
64
60
  return calculatedResizedPctWidth;
@@ -72,11 +68,7 @@ export const calcMediaPxWidth = opts => {
72
68
  } else if (layout && wrappedLayouts.indexOf(layout) !== -1) {
73
69
  // when layout is wrap-left, wrap-right, align-start, align-end
74
70
  // but no pctWidth is defined
75
- if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
76
- return Math.min(calcPxFromPct(0.5, lineLength || width), origWidth);
77
- }
78
- const halfLineLength = Math.ceil((lineLength || width) / 2);
79
- return origWidth <= halfLineLength ? origWidth : halfLineLength;
71
+ return Math.min(calcPxFromPct(0.5, lineLength || width), origWidth);
80
72
  }
81
73
  return origWidth;
82
74
  };
@@ -10,7 +10,6 @@ import React from 'react';
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { akEditorDefaultLayoutWidth, akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
13
  import { nonWrappedLayouts } from '../../utils';
15
14
  import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
16
15
  function float(layout) {
@@ -117,16 +116,6 @@ export function calcResizedWidth(layout, width, containerWidth = 0
117
116
  return `${width}px`;
118
117
  }
119
118
  }
120
- function calcMaxWidth(layout, containerWidth) {
121
- switch (layout) {
122
- case 'wide':
123
- return calcWideWidth(containerWidth);
124
- case 'full-width':
125
- return calcBreakoutWidth(layout, containerWidth);
126
- default:
127
- return '100%';
128
- }
129
- }
130
119
  function calcMargin(layout) {
131
120
  switch (layout) {
132
121
  case 'wrap-right':
@@ -209,7 +198,6 @@ export const MediaSingleDimensionHelper = ({
209
198
  isInRenderer = false
210
199
  }) => {
211
200
  const calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? `${mediaSingleWidth || width}px` : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
212
- const calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? `${containerWidth}px` : calcMaxWidth(layout, containerWidth));
213
201
  const cssMaxWidth = isExtendedResizeExperienceOn ? 'var(--ak-editor-max-container-width)' : calcMaxCssForPercentageTypeMedia(layout);
214
202
 
215
203
  // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
@@ -242,7 +230,7 @@ export const MediaSingleDimensionHelper = ({
242
230
  '@container ak-renderer-wrapper (min-width: 1px)': {
243
231
  maxWidth: '100cqw'
244
232
  }
245
- }) : expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true) ? `max-width: ${cssMaxWidth};` : `max-width: ${calculatedMaxWidth};`}
233
+ }) : `max-width: ${cssMaxWidth};`}
246
234
 
247
235
  ${isExtendedResizeExperienceOn && `&[class*='is-resizing'] {
248
236
  .new-file-experience-wrapper {
@@ -127,12 +127,12 @@ export var aiSuggestionsMessages = defineMessages({
127
127
  },
128
128
  cardSourcesHideButtonLabel: {
129
129
  id: 'fabric.editor.ai.suggestions.card.sourcesHideButtonLabel.non-final',
130
- defaultMessage: 'Hide sources',
130
+ defaultMessage: 'Hide reasoning',
131
131
  description: 'Label for the sources toggle button when sources are expanded'
132
132
  },
133
133
  cardSourcesShowButtonLabel: {
134
134
  id: 'fabric.editor.ai.suggestions.card.sourcesShowButtonLabel.non-final',
135
- defaultMessage: 'Show sources',
135
+ defaultMessage: 'Show reasoning',
136
136
  description: 'Label for the sources toggle button when sources are collapsed'
137
137
  },
138
138
  cardAcceptButtonLabel: {
@@ -11,6 +11,7 @@ import { base, keyName } from 'w3c-keyname';
11
11
  import { editorCommandToPMCommand } from '../preset/editor-commands';
12
12
  import { getBrowserInfo } from '../utils/browser';
13
13
  export var addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
14
+ export var toggleMarkdownView = makeKeyMapWithCommon('Toggle markdown view', 'Mod-e');
14
15
  export var toggleViewChanges = makeKeyMapWithCommon('View changes', 'Mod-Alt-z');
15
16
  export var navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
16
17
  export var navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
@@ -17,18 +17,18 @@ export var markdownModeMessages = defineMessages({
17
17
  },
18
18
  source: {
19
19
  id: 'fabric.editor.markdownMode.viewToggle.source',
20
- defaultMessage: 'Markdown source',
21
- description: 'Tooltip and accessible label for the toggle button that switches the editor into raw markdown source view.'
20
+ defaultMessage: 'Syntax editor',
21
+ description: 'Tooltip and accessible label for the toggle button that switches the editor into raw markdown source (syntax) view.'
22
22
  },
23
23
  wysiwyg: {
24
24
  id: 'fabric.editor.markdownMode.viewToggle.wysiwyg',
25
- defaultMessage: 'WYSIWYG',
25
+ defaultMessage: 'WYSIWYG editor',
26
26
  description: 'Tooltip and accessible label for the toggle button that switches the editor into the WYSIWYG markdown editing view (the default).'
27
27
  },
28
28
  preview: {
29
29
  id: 'fabric.editor.markdownMode.viewToggle.preview',
30
- defaultMessage: 'Preview',
31
- description: 'Tooltip and accessible label for the toggle button that switches the editor into a read-only rendered markdown preview.'
30
+ defaultMessage: 'Split view (coming soon)',
31
+ description: 'Tooltip and accessible label for the toggle button that will switch the editor into a split view. This feature is not yet available.'
32
32
  },
33
33
  sourceAriaLabel: {
34
34
  id: 'fabric.editor.markdownMode.sourceView.ariaLabel',
@@ -34,5 +34,10 @@ export var mentionMessages = defineMessages({
34
34
  id: 'fabric.editor.inviteItem.sendInvite',
35
35
  defaultMessage: 'Send request to invite teammate',
36
36
  description: 'By line text for send request to invite teammate option shown in mentions.'
37
+ },
38
+ inviteButton: {
39
+ id: 'fabric.editor.inviteItem.inviteButton',
40
+ defaultMessage: 'Invite',
41
+ description: 'Label for the invite button shown in the mention typeahead invite item.'
37
42
  }
38
43
  });
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "114.16.0";
13
+ var packageVersion = "114.18.0";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "114.16.0";
24
+ var packageVersion = "114.18.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,5 +1,4 @@
1
1
  import { akEditorBreakoutPadding, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { MEDIA_SINGLE_GUTTER_SIZE } from '../../media-single/constants';
4
3
  var validWidthModes = ['center', 'wrap-left', 'wrap-right', 'align-start', 'align-end'];
5
4
  export var layoutSupportsWidth = function layoutSupportsWidth(layout) {
@@ -55,10 +54,7 @@ export var calcMediaPxWidth = function calcMediaPxWidth(opts) {
55
54
  }
56
55
  return calculatedPctWidth;
57
56
  }
58
- if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
59
- return calculatedPctWidth;
60
- }
61
- return Math.min(calculatedPctWidth, origWidth);
57
+ return calculatedPctWidth;
62
58
  }
63
59
  if (calculatedResizedPctWidth) {
64
60
  return calculatedResizedPctWidth;
@@ -72,11 +68,7 @@ export var calcMediaPxWidth = function calcMediaPxWidth(opts) {
72
68
  } else if (layout && wrappedLayouts.indexOf(layout) !== -1) {
73
69
  // when layout is wrap-left, wrap-right, align-start, align-end
74
70
  // but no pctWidth is defined
75
- if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
76
- return Math.min(calcPxFromPct(0.5, lineLength || width), origWidth);
77
- }
78
- var halfLineLength = Math.ceil((lineLength || width) / 2);
79
- return origWidth <= halfLineLength ? origWidth : halfLineLength;
71
+ return Math.min(calcPxFromPct(0.5, lineLength || width), origWidth);
80
72
  }
81
73
  return origWidth;
82
74
  };
@@ -14,7 +14,6 @@ import React from 'react';
14
14
  import { css, jsx } from '@emotion/react';
15
15
  import { akEditorDefaultLayoutWidth, akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
17
  import { nonWrappedLayouts } from '../../utils';
19
18
  import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
20
19
  function float(layout) {
@@ -127,16 +126,6 @@ export function calcResizedWidth(layout, width) {
127
126
  return "".concat(width, "px");
128
127
  }
129
128
  }
130
- function calcMaxWidth(layout, containerWidth) {
131
- switch (layout) {
132
- case 'wide':
133
- return calcWideWidth(containerWidth);
134
- case 'full-width':
135
- return calcBreakoutWidth(layout, containerWidth);
136
- default:
137
- return '100%';
138
- }
139
- }
140
129
  function calcMargin(layout) {
141
130
  switch (layout) {
142
131
  case 'wrap-right':
@@ -221,7 +210,6 @@ export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref
221
210
  _ref$isInRenderer = _ref.isInRenderer,
222
211
  isInRenderer = _ref$isInRenderer === void 0 ? false : _ref$isInRenderer;
223
212
  var calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(mediaSingleWidth || width, "px") : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
224
- var calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(containerWidth, "px") : calcMaxWidth(layout, containerWidth));
225
213
  var cssMaxWidth = isExtendedResizeExperienceOn ? 'var(--ak-editor-max-container-width)' : calcMaxCssForPercentageTypeMedia(layout);
226
214
 
227
215
  // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
@@ -237,7 +225,7 @@ export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref
237
225
  '@container ak-renderer-wrapper (min-width: 1px)': {
238
226
  maxWidth: '100cqw'
239
227
  }
240
- }) : expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true) ? "max-width: ".concat(cssMaxWidth, ";") : "max-width: ".concat(calculatedMaxWidth, ";"), isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
228
+ }) : "max-width: ".concat(cssMaxWidth, ";"), isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
241
229
  };
242
230
  var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
243
231
  var hasFallbackContainer = _ref2.hasFallbackContainer,
@@ -7,6 +7,7 @@ import { jsx } from '@emotion/react';
7
7
  import type { Command } from '../types/command';
8
8
  import type { EditorCommand } from '../types/editor-command';
9
9
  export declare const addAltText: Keymap;
10
+ export declare const toggleMarkdownView: Keymap;
10
11
  export declare const toggleViewChanges: Keymap;
11
12
  export declare const navToEditorToolbar: Keymap;
12
13
  export declare const navToFloatingToolbar: Keymap;
@@ -1,37 +1,42 @@
1
1
  export declare const mentionMessages: {
2
+ inviteButton: {
3
+ defaultMessage: string;
4
+ description: string;
5
+ id: string;
6
+ };
2
7
  inviteItemTitle: {
8
+ defaultMessage: string;
9
+ description: string;
3
10
  id: string;
11
+ };
12
+ inviteTeammateInvalidEmail: {
4
13
  defaultMessage: string;
5
14
  description: string;
15
+ id: string;
6
16
  };
7
17
  mentionsAddLabel: {
8
- id: string;
9
18
  defaultMessage: string;
10
19
  description: string;
20
+ id: string;
11
21
  };
12
22
  mentionsIconLabel: {
13
- id: string;
14
23
  defaultMessage: string;
15
24
  description: string;
25
+ id: string;
16
26
  };
17
27
  mentionsNodeLabel: {
18
- id: string;
19
28
  defaultMessage: string;
20
29
  description: string;
21
- };
22
- unknownLabel: {
23
30
  id: string;
24
- defaultMessage: string;
25
- description: string;
26
31
  };
27
- inviteTeammateInvalidEmail: {
28
- id: string;
32
+ sendInvite: {
29
33
  defaultMessage: string;
30
34
  description: string;
31
- };
32
- sendInvite: {
33
35
  id: string;
36
+ };
37
+ unknownLabel: {
34
38
  defaultMessage: string;
35
39
  description: string;
40
+ id: string;
36
41
  };
37
42
  };
@@ -7,6 +7,7 @@ import { jsx } from '@emotion/react';
7
7
  import type { Command } from '../types/command';
8
8
  import type { EditorCommand } from '../types/editor-command';
9
9
  export declare const addAltText: Keymap;
10
+ export declare const toggleMarkdownView: Keymap;
10
11
  export declare const toggleViewChanges: Keymap;
11
12
  export declare const navToEditorToolbar: Keymap;
12
13
  export declare const navToFloatingToolbar: Keymap;
@@ -1,37 +1,42 @@
1
1
  export declare const mentionMessages: {
2
+ inviteButton: {
3
+ defaultMessage: string;
4
+ description: string;
5
+ id: string;
6
+ };
2
7
  inviteItemTitle: {
8
+ defaultMessage: string;
9
+ description: string;
3
10
  id: string;
11
+ };
12
+ inviteTeammateInvalidEmail: {
4
13
  defaultMessage: string;
5
14
  description: string;
15
+ id: string;
6
16
  };
7
17
  mentionsAddLabel: {
8
- id: string;
9
18
  defaultMessage: string;
10
19
  description: string;
20
+ id: string;
11
21
  };
12
22
  mentionsIconLabel: {
13
- id: string;
14
23
  defaultMessage: string;
15
24
  description: string;
25
+ id: string;
16
26
  };
17
27
  mentionsNodeLabel: {
18
- id: string;
19
28
  defaultMessage: string;
20
29
  description: string;
21
- };
22
- unknownLabel: {
23
30
  id: string;
24
- defaultMessage: string;
25
- description: string;
26
31
  };
27
- inviteTeammateInvalidEmail: {
28
- id: string;
32
+ sendInvite: {
29
33
  defaultMessage: string;
30
34
  description: string;
31
- };
32
- sendInvite: {
33
35
  id: string;
36
+ };
37
+ unknownLabel: {
34
38
  defaultMessage: string;
35
39
  description: string;
40
+ id: string;
36
41
  };
37
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "114.17.0",
3
+ "version": "114.18.1",
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/"
@@ -77,16 +77,16 @@
77
77
  "@atlaskit/platform-feature-flags": "^1.1.0",
78
78
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
79
79
  "@atlaskit/primitives": "^19.0.0",
80
- "@atlaskit/profilecard": "^25.1.0",
80
+ "@atlaskit/profilecard": "^25.2.0",
81
81
  "@atlaskit/prosemirror-history": "^0.2.0",
82
82
  "@atlaskit/react-ufo": "^5.18.0",
83
83
  "@atlaskit/section-message": "^8.12.0",
84
- "@atlaskit/smart-card": "^44.3.0",
84
+ "@atlaskit/smart-card": "^44.5.0",
85
85
  "@atlaskit/smart-user-picker": "^10.0.0",
86
86
  "@atlaskit/spinner": "^19.1.0",
87
87
  "@atlaskit/task-decision": "^20.0.0",
88
88
  "@atlaskit/textfield": "^8.3.0",
89
- "@atlaskit/tmp-editor-statsig": "^74.0.0",
89
+ "@atlaskit/tmp-editor-statsig": "^74.4.0",
90
90
  "@atlaskit/tokens": "^13.0.0",
91
91
  "@atlaskit/tooltip": "^21.2.0",
92
92
  "@atlaskit/width-detector": "^5.1.0",