@atlaskit/editor-common 111.8.10 → 111.8.12

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 (49) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/keymaps/index.js +4 -3
  3. package/dist/cjs/mark/text-formatting.js +1 -5
  4. package/dist/cjs/messages/syncBlock.js +17 -2
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/preset/core-plugin/index.js +1 -3
  7. package/dist/cjs/preset/core-plugin/requestDocument.js +12 -17
  8. package/dist/cjs/styles/index.js +0 -6
  9. package/dist/cjs/styles/shared/resizer.js +2 -10
  10. package/dist/cjs/toolbar/EditorToolbarUIProvider.js +6 -18
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +1 -9
  13. package/dist/cjs/utils/calculate-toolbar-position.js +2 -3
  14. package/dist/cjs/utils/document.js +3 -9
  15. package/dist/es2019/keymaps/index.js +1 -0
  16. package/dist/es2019/mark/text-formatting.js +1 -5
  17. package/dist/es2019/messages/syncBlock.js +17 -2
  18. package/dist/es2019/monitoring/error.js +1 -1
  19. package/dist/es2019/preset/core-plugin/index.js +1 -3
  20. package/dist/es2019/preset/core-plugin/requestDocument.js +7 -12
  21. package/dist/es2019/styles/index.js +1 -1
  22. package/dist/es2019/styles/shared/resizer.js +1 -202
  23. package/dist/es2019/toolbar/EditorToolbarUIProvider.js +6 -16
  24. package/dist/es2019/ui/DropList/index.js +1 -1
  25. package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +1 -9
  26. package/dist/es2019/utils/calculate-toolbar-position.js +2 -3
  27. package/dist/es2019/utils/document.js +3 -9
  28. package/dist/esm/keymaps/index.js +1 -0
  29. package/dist/esm/mark/text-formatting.js +1 -5
  30. package/dist/esm/messages/syncBlock.js +17 -2
  31. package/dist/esm/monitoring/error.js +1 -1
  32. package/dist/esm/preset/core-plugin/index.js +1 -3
  33. package/dist/esm/preset/core-plugin/requestDocument.js +12 -17
  34. package/dist/esm/styles/index.js +1 -1
  35. package/dist/esm/styles/shared/resizer.js +1 -9
  36. package/dist/esm/toolbar/EditorToolbarUIProvider.js +6 -18
  37. package/dist/esm/ui/DropList/index.js +1 -1
  38. package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +1 -9
  39. package/dist/esm/utils/calculate-toolbar-position.js +2 -3
  40. package/dist/esm/utils/document.js +3 -9
  41. package/dist/types/keymaps/index.d.ts +1 -0
  42. package/dist/types/messages/syncBlock.d.ts +16 -1
  43. package/dist/types/styles/index.d.ts +1 -1
  44. package/dist/types/styles/shared/resizer.d.ts +0 -2
  45. package/dist/types-ts4.5/keymaps/index.d.ts +1 -0
  46. package/dist/types-ts4.5/messages/syncBlock.d.ts +16 -1
  47. package/dist/types-ts4.5/styles/index.d.ts +1 -1
  48. package/dist/types-ts4.5/styles/shared/resizer.d.ts +0 -2
  49. package/package.json +5 -11
@@ -1,6 +1,3 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { akEditorDeleteIconColor, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
4
1
  /*
5
2
  Styles in this file are based on
6
3
  packages/editor/editor-core/src/plugins/media/styles.ts
@@ -14,202 +11,4 @@ export const resizerHandleThumbClassName = `${resizerHandleClassName}-thumb`;
14
11
  export const resizerDangerClassName = `${resizerHandleClassName}-danger`;
15
12
  export const handleWrapperClass = 'resizer-handle-wrapper';
16
13
  export const resizerHandleThumbWidth = 3;
17
- export const resizerHandleZIndex = 1;
18
-
19
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, Seems perfectly safe to autofix, but comments would be lost…
20
- export const resizerStyles = css`
21
- .${resizerItemClassName} {
22
- will-change: width;
23
-
24
- &:hover,
25
- &.display-handle {
26
- & > .${handleWrapperClass} > .${resizerHandleClassName} {
27
- visibility: visible;
28
- opacity: 1;
29
- }
30
- }
31
-
32
- &.is-resizing {
33
- & .${resizerHandleThumbClassName} {
34
- background: ${"var(--ds-border-focused, #4688EC)"};
35
- }
36
- }
37
-
38
- &.${resizerDangerClassName} {
39
- & .${resizerHandleThumbClassName} {
40
- transition: none;
41
- background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`};
42
- }
43
- }
44
- }
45
-
46
- .${resizerHandleClassName} {
47
- display: flex;
48
- visibility: hidden;
49
- opacity: 0;
50
- flex-direction: column;
51
- justify-content: center;
52
- align-items: center;
53
- width: 7px;
54
- transition:
55
- visibility 0.2s,
56
- opacity 0.2s;
57
-
58
- /*
59
- NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles
60
- into the tooltip
61
- */
62
- & div[role='presentation'] {
63
- width: 100%;
64
- height: 100%;
65
- display: flex;
66
- flex-direction: column;
67
- justify-content: center;
68
- align-items: center;
69
- margin-top: ${"var(--ds-space-negative-200, -16px)"};
70
- white-space: normal;
71
- }
72
-
73
- /*
74
- Handle Positions
75
- */
76
- &.left {
77
- align-items: flex-start;
78
- }
79
- &.right {
80
- align-items: flex-end;
81
- }
82
-
83
- /*
84
- Handle Sizing
85
- */
86
- &.small {
87
- & .${resizerHandleThumbClassName} {
88
- height: 43px;
89
- }
90
- }
91
- &.medium {
92
- & .${resizerHandleThumbClassName} {
93
- height: 64px;
94
- }
95
- }
96
- &.large {
97
- & .${resizerHandleThumbClassName} {
98
- height: 96px;
99
- }
100
- }
101
- &.clamped {
102
- & .${resizerHandleThumbClassName} {
103
- height: clamp(43px, calc(100% - 32px), 96px);
104
- }
105
- }
106
-
107
- /*
108
- Handle Alignment
109
- */
110
- &.sticky {
111
- & .${resizerHandleThumbClassName} {
112
- position: sticky;
113
- top: ${"var(--ds-space-150, 12px)"};
114
- bottom: ${"var(--ds-space-150, 12px)"};
115
- }
116
- }
117
-
118
- &:hover {
119
- & .${resizerHandleThumbClassName} {
120
- background: ${"var(--ds-border-focused, #4688EC)"};
121
- }
122
-
123
- & .${resizerHandleTrackClassName} {
124
- visibility: visible;
125
- opacity: 0.5;
126
- }
127
- }
128
- }
129
-
130
- .${resizerHandleThumbClassName} {
131
- content: ' ';
132
- display: flex;
133
- width: 3px;
134
- margin: 0 ${"var(--ds-space-025, 2px)"};
135
- height: 64px;
136
- transition: background-color 0.2s;
137
- border-radius: 6px;
138
- border: 0;
139
- padding: 0;
140
- z-index: 2;
141
- outline: none;
142
- min-height: 24px;
143
- background: ${"var(--ds-border, #0B120E24)"};
144
-
145
- &:hover {
146
- cursor: col-resize;
147
- }
148
-
149
- &:focus {
150
- background: ${"var(--ds-border-selected, #0C66E4)"};
151
-
152
- &::after {
153
- content: '';
154
- position: absolute;
155
- top: ${"var(--ds-space-negative-050, -4px)"};
156
- right: ${"var(--ds-space-negative-050, -4px)"};
157
- bottom: ${"var(--ds-space-negative-050, -4px)"};
158
- left: ${"var(--ds-space-negative-050, -4px)"};
159
- border: 2px solid ${"var(--ds-border-focused, #388BFF)"};
160
- border-radius: inherit;
161
- z-index: -1;
162
- }
163
- }
164
- }
165
-
166
- .${resizerHandleTrackClassName} {
167
- visibility: hidden;
168
- position: absolute;
169
- width: 7px;
170
- height: calc(100% - 40px);
171
- border-radius: 4px;
172
- opacity: 0;
173
- transition:
174
- background-color 0.2s,
175
- visibility 0.2s,
176
- opacity 0.2s;
177
-
178
- &.none {
179
- background: none;
180
- }
181
-
182
- &.shadow {
183
- background: ${"var(--ds-background-selected, #E9F2FE)"};
184
- }
185
-
186
- &.full-height {
187
- background: ${"var(--ds-background-selected, #E9F2FE)"};
188
- height: 100%;
189
- min-height: 36px;
190
- }
191
- }
192
-
193
- .${akEditorSelectedNodeClassName} {
194
- & .${resizerHandleThumbClassName} {
195
- background: ${"var(--ds-border-focused, #4688EC)"};
196
- }
197
- }
198
-
199
- .${resizerHoverZoneClassName} {
200
- position: relative;
201
- display: flow-root;
202
- width: 100%;
203
-
204
- &.${resizerExtendedZone} {
205
- padding: 0 ${"var(--ds-space-150, 12px)"};
206
- left: ${"var(--ds-space-negative-150, -12px)"};
207
- }
208
- }
209
-
210
- /* This below style is here to make sure the image width is correct when nested in a table */
211
- table .${resizerHoverZoneClassName}, table .${resizerHoverZoneClassName}.${resizerExtendedZone} {
212
- padding: unset;
213
- left: unset;
214
- }
215
- `;
14
+ export const resizerHandleZIndex = 1;
@@ -1,6 +1,5 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { ToolbarUIProvider } from '@atlaskit/editor-toolbar';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  export const EditorToolbarUIProvider = ({
5
4
  children,
6
5
  api,
@@ -16,21 +15,11 @@ export const EditorToolbarUIProvider = ({
16
15
  event
17
16
  }) => {
18
17
  if (!isOpen) {
19
- if (fg('platform_editor_toolbar_aifc_patch_7')) {
20
- // Only refocus the editor when the dropdown closes via mouse or programmatic close.
21
- // When closed via keyboard Escape, keep focus on the trigger for better keyboard UX.
22
- const isKeyboardEscape = event instanceof KeyboardEvent && event.key === 'Escape';
23
- const shouldFocusEditor = !isKeyboardEscape;
24
- if (shouldFocusEditor) {
25
- // On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
26
- // Hence, `.focus()` should also be called in requestAnimationFrame
27
- setTimeout(() => requestAnimationFrame(() => {
28
- api === null || api === void 0 ? void 0 : api.core.actions.focus({
29
- scrollIntoView: false
30
- });
31
- }), 1);
32
- }
33
- } else {
18
+ // Only refocus the editor when the dropdown closes via mouse or programmatic close.
19
+ // When closed via keyboard Escape, keep focus on the trigger for better keyboard UX.
20
+ const isKeyboardEscape = event instanceof KeyboardEvent && event.key === 'Escape';
21
+ const shouldFocusEditor = !isKeyboardEscape;
22
+ if (shouldFocusEditor) {
34
23
  // On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
35
24
  // Hence, `.focus()` should also be called in requestAnimationFrame
36
25
  setTimeout(() => requestAnimationFrame(() => {
@@ -40,6 +29,7 @@ export const EditorToolbarUIProvider = ({
40
29
  }), 1);
41
30
  }
42
31
  }
32
+ ;
43
33
  }, [api]);
44
34
  return /*#__PURE__*/React.createElement(ToolbarUIProvider, {
45
35
  onDropdownOpenChanged: onDropdownOpenChanged,
@@ -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 = "0.0.0-development";
17
+ const packageVersion = "111.8.11";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -7,7 +7,6 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { ELEMENT_BROWSER_ID } from '../../element-browser';
12
11
  import { fullPageMessages } from '../../messages';
13
12
  import { mediaInsertMessages } from '../../messages/media-insert';
@@ -264,15 +263,8 @@ function isElementOrAncestorHiddenOrDisabled(element, rootNode) {
264
263
  function getFilteredFocusableElements(rootNode) {
265
264
  // The focusable elements from child components such as dropdown menus / popups are ignored
266
265
  return getFocusableElements(rootNode).filter(elm => {
267
- const style = window.getComputedStyle(elm);
268
- // ignore invisible element to avoid losing focus
269
- const isVisible = style.visibility !== 'hidden' && style.display !== 'none';
270
-
271
266
  // Check if element or any ancestor is hidden or disabled
272
267
  const isHiddenOrDisabled = isElementOrAncestorHiddenOrDisabled(elm, rootNode);
273
- if (fg('platform_editor_toolbar_aifc_patch_7')) {
274
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
275
- }
276
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && isVisible;
268
+ return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
277
269
  });
278
270
  }
@@ -1,6 +1,5 @@
1
1
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
2
2
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  const MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
6
5
 
@@ -124,7 +123,7 @@ export const calculateToolbarPositionTrackHeadOld = toolbarTitle => (editorView,
124
123
  const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
125
124
  const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
126
125
  let range = null;
127
- if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
126
+ if (isMoreRovoOptionsButtonVisible) {
128
127
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
129
128
  const maybeRange = selection.getRangeAt(0);
130
129
  if (maybeRange instanceof Range) {
@@ -214,7 +213,7 @@ export const calculateToolbarPositionTrackHeadNew = toolbarTitle => {
214
213
  const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
215
214
  const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
216
215
  let range = null;
217
- if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
216
+ if (isMoreRovoOptionsButtonVisible) {
218
217
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
219
218
  const maybeRange = selection.getRangeAt(0);
220
219
  if (maybeRange instanceof Range) {
@@ -1,6 +1,5 @@
1
1
  import clamp from 'lodash/clamp';
2
2
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { isEmptyParagraph } from './editor-core-utils';
5
4
  export const getStepRange = transaction => {
6
5
  let from = -1;
@@ -9,14 +8,9 @@ export const getStepRange = transaction => {
9
8
  stepMap.forEach((oldStart, oldEnd) => {
10
9
  const newStart = transaction.mapping.slice(index).map(oldStart, -1);
11
10
  const newEnd = transaction.mapping.slice(index).map(oldEnd);
12
- if (fg('platform_editor_ai_generic_prep_for_aifc')) {
13
- const docSize = transaction.doc.content.size;
14
- from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
15
- to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
16
- } else {
17
- from = newStart < from || from === -1 ? newStart : from;
18
- to = newEnd > to || to === -1 ? newEnd : to;
19
- }
11
+ const docSize = transaction.doc.content.size;
12
+ from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
13
+ to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
20
14
  });
21
15
  });
22
16
  if (from !== -1) {
@@ -53,6 +53,7 @@ export var redo = makeKeymap('Redo', 'Ctrl-y', 'Mod-Shift-z');
53
53
  export var openHelp = makeKeyMapWithCommon('Open Help', 'Mod-/');
54
54
  export var addLink = makeKeyMapWithCommon('Link', 'Mod-k');
55
55
  export var addInlineComment = makeKeyMapWithCommon('Annotate', 'Mod-Alt-c');
56
+ export var copyLinkToBlock = makeKeyMapWithCommon('Copy link to block', 'Mod-Alt-a');
56
57
  export var submit = makeKeyMapWithCommon('Submit Content', 'Mod-Enter');
57
58
  export var enter = makeKeyMapWithCommon('Enter', 'Enter');
58
59
  export var shiftEnter = makeKeyMapWithCommon('Shift Enter', 'Shift-Enter');
@@ -4,7 +4,6 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
4
4
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
5
  import { Mark } from '@atlaskit/editor-prosemirror/model';
6
6
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
 
9
8
  /**
10
9
  * Determine if a mark of a specific type exists anywhere in the selection.
@@ -170,10 +169,7 @@ var wholeRangeHasMarks = function wholeRangeHasMarks(from, to, doc, markTypes) {
170
169
  _iterator3.f();
171
170
  }
172
171
  });
173
- if (expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true)) {
174
- return isTextContent ? hasMarks : hasNoMarks;
175
- }
176
- return hasMarks;
172
+ return isTextContent ? hasMarks : hasNoMarks;
177
173
  };
178
174
  export var isMarkAllowedInRange = function isMarkAllowedInRange(doc, ranges, type) {
179
175
  var _loop2 = function _loop2() {
@@ -80,6 +80,11 @@ export var syncBlockMessages = defineMessages({
80
80
  defaultMessage: 'Synced from: {title}',
81
81
  description: 'Tooltip that shows the source page title of the synced block'
82
82
  },
83
+ referenceSyncBlockLastEdited: {
84
+ id: 'fabric.editor.referenceSyncBlockLastEdited',
85
+ defaultMessage: 'Last edited: ',
86
+ description: 'Tooltip that shows the last edited time of the synced block'
87
+ },
83
88
  taskInDestinationSyncedBlockTooltip: {
84
89
  id: 'fabric.editor.taskInDestinationSyncedBlockTooltip',
85
90
  defaultMessage: 'This content is synced. Edit it at the source.',
@@ -235,11 +240,16 @@ export var syncBlockMessages = defineMessages({
235
240
  defaultMessage: 'block {index}',
236
241
  description: 'Suffix for page title shown in synced location dropdown option when there are multiple references to the same page'
237
242
  },
238
- syncedLocationDropdownTitleNote: {
239
- id: 'fabric.editor.syncedLocationDropdownTitleNote',
243
+ syncedLocationDropdownTitleNoteForConfluencePage: {
244
+ id: 'fabric.editor.syncedLocationDropdownTitleNoteForConfluencePage',
240
245
  defaultMessage: 'This page',
241
246
  description: 'Note shown next to the page title in the synced location dropdown option when the sync block is on the current page'
242
247
  },
248
+ syncedLocationDropdownTitleNoteForJiraWorkItem: {
249
+ id: 'fabric.editor.syncedLocationDropdownTitleNoteForJiraWorkItem',
250
+ defaultMessage: 'This work item',
251
+ description: 'Note shown next to the work item title in the synced location dropdown option when the sync block is on the current work item'
252
+ },
243
253
  syncedLocationDropdownSourceLozenge: {
244
254
  id: 'fabric.editor.syncedLocationDropdownSourceLozenge',
245
255
  defaultMessage: 'Source',
@@ -249,5 +259,10 @@ export var syncBlockMessages = defineMessages({
249
259
  id: 'fabric.editor.syncedLocationDropdownRequestAccess',
250
260
  defaultMessage: 'Request access',
251
261
  description: 'Label shown in the synced location dropdown option when the sync block is not accessible to the user'
262
+ },
263
+ unsyncButton: {
264
+ id: 'fabric.editor.syncedBlock.unsync',
265
+ defaultMessage: 'Unsync',
266
+ description: 'Text on the button which unsyncs the sync block'
252
267
  }
253
268
  });
@@ -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 = "0.0.0-development";
13
+ var packageVersion = "111.8.11";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -103,9 +103,7 @@ export var corePlugin = function corePlugin(_ref) {
103
103
  if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
104
104
  editorView.dispatch(tr.scrollIntoView());
105
105
  } else {
106
- if (fg('platform_editor_ai_generic_prep_for_aifc')) {
107
- editorView.dispatch(tr.setMeta('scrollIntoView', false));
108
- }
106
+ editorView.dispatch(tr.setMeta('scrollIntoView', false));
109
107
  }
110
108
  return true;
111
109
  }
@@ -2,7 +2,6 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import { JSONTransformer } from '@atlaskit/editor-json-transformer';
4
4
  import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
7
6
  var transformer = new JSONTransformer();
8
7
  export function toJSON(node) {
@@ -24,17 +23,15 @@ export function createThrottleSchedule(callback) {
24
23
  }
25
24
  lastArgs = args;
26
25
  if (frameId) {
27
- if (fg('platform_editor_ai_generic_prep_for_aifc')) {
28
- if (lastArgsBefore) {
29
- var _lastArgsBefore = _slicedToArray(lastArgsBefore, 5),
30
- _v = _lastArgsBefore[0],
31
- _c = _lastArgsBefore[1],
32
- _t = _lastArgsBefore[2],
33
- _f = _lastArgsBefore[3],
34
- alwaysFire = _lastArgsBefore[4];
35
- if (alwaysFire) {
36
- delayedCallbacks.push(lastArgsBefore);
37
- }
26
+ if (lastArgsBefore) {
27
+ var _lastArgsBefore = _slicedToArray(lastArgsBefore, 5),
28
+ _v = _lastArgsBefore[0],
29
+ _c = _lastArgsBefore[1],
30
+ _t = _lastArgsBefore[2],
31
+ _f = _lastArgsBefore[3],
32
+ alwaysFire = _lastArgsBefore[4];
33
+ if (alwaysFire) {
34
+ delayedCallbacks.push(lastArgsBefore);
38
35
  }
39
36
  }
40
37
  return;
@@ -45,11 +42,9 @@ export function createThrottleSchedule(callback) {
45
42
  frameId = delayFunction(function () {
46
43
  frameId = undefined;
47
44
  if (lastArgs) {
48
- if (fg('platform_editor_ai_generic_prep_for_aifc')) {
49
- delayedCallbacks.forEach(function (savedArgs) {
50
- callback.apply(void 0, _toConsumableArray(savedArgs));
51
- });
52
- }
45
+ delayedCallbacks.forEach(function (savedArgs) {
46
+ callback.apply(void 0, _toConsumableArray(savedArgs));
47
+ });
53
48
  callback.apply(void 0, _toConsumableArray(lastArgs));
54
49
  }
55
50
  }, {
@@ -15,7 +15,7 @@ export { DropdownMenuSharedCssClassName } from './shared/dropdown-menu';
15
15
  export { CodeBlockSharedCssClassName } from './shared/code-block';
16
16
  export { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING, DEFAULT_TWO_COLUMN_LAYOUT_COLUMN_WIDTH } from './shared/layout';
17
17
  export { EXTENSION_PADDING, BODIED_EXT_PADDING } from './shared/extension';
18
- export { resizerStyles, resizerItemClassName, resizerHandleClassName, resizerHandleTrackClassName, resizerHandleThumbClassName, resizerHandleThumbWidth } from './shared/resizer';
18
+ export { resizerItemClassName, resizerHandleClassName, resizerHandleTrackClassName, resizerHandleThumbClassName, resizerHandleThumbWidth } from './shared/resizer';
19
19
  export { GRID_GUTTER } from './shared/grid';
20
20
  export { FLOATING_TOOLBAR_LINKPICKER_CLASSNAME, DATASOURCE_INNER_CONTAINER_CLASSNAME } from './shared/smartCard';
21
21
  export { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, disableBlueBorderStyles, separatorStyles, wrapperStyle, triggerWrapperStyles, triggerWrapperStylesWithPadding } from './shared/plugins';
@@ -1,8 +1,3 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
- import { css } from '@emotion/react';
5
- import { akEditorDeleteIconColor, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
1
  /*
7
2
  Styles in this file are based on
8
3
  packages/editor/editor-core/src/plugins/media/styles.ts
@@ -16,7 +11,4 @@ export var resizerHandleThumbClassName = "".concat(resizerHandleClassName, "-thu
16
11
  export var resizerDangerClassName = "".concat(resizerHandleClassName, "-danger");
17
12
  export var handleWrapperClass = 'resizer-handle-wrapper';
18
13
  export var resizerHandleThumbWidth = 3;
19
- export var resizerHandleZIndex = 1;
20
-
21
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, Seems perfectly safe to autofix, but comments would be lost…
22
- export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", " {\n\t\twill-change: width;\n\n\t\t&:hover,\n\t\t&.display-handle {\n\t\t\t& > .", " > .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t&.is-resizing {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t& .", " {\n\t\t\t\ttransition: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tdisplay: flex;\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 7px;\n\t\ttransition:\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t/*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n\t\t& div[role='presentation'] {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tmargin-top: ", ";\n\t\t\twhite-space: normal;\n\t\t}\n\n\t\t/*\n Handle Positions\n */\n\t\t&.left {\n\t\t\talign-items: flex-start;\n\t\t}\n\t\t&.right {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t/*\n Handle Sizing\n */\n\t\t&.small {\n\t\t\t& .", " {\n\t\t\t\theight: 43px;\n\t\t\t}\n\t\t}\n\t\t&.medium {\n\t\t\t& .", " {\n\t\t\t\theight: 64px;\n\t\t\t}\n\t\t}\n\t\t&.large {\n\t\t\t& .", " {\n\t\t\t\theight: 96px;\n\t\t\t}\n\t\t}\n\t\t&.clamped {\n\t\t\t& .", " {\n\t\t\t\theight: clamp(43px, calc(100% - 32px), 96px);\n\t\t\t}\n\t\t}\n\n\t\t/*\n Handle Alignment\n */\n\t\t&.sticky {\n\t\t\t& .", " {\n\t\t\t\tposition: sticky;\n\t\t\t\ttop: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t& .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 0.5;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\tmargin: 0 ", ";\n\t\theight: 64px;\n\t\ttransition: background-color 0.2s;\n\t\tborder-radius: 6px;\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tz-index: 2;\n\t\toutline: none;\n\t\tmin-height: 24px;\n\t\tbackground: ", ";\n\n\t\t&:hover {\n\t\t\tcursor: col-resize;\n\t\t}\n\n\t\t&:focus {\n\t\t\tbackground: ", ";\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t\tright: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t\tleft: ", ";\n\t\t\t\tborder: 2px solid ", ";\n\t\t\t\tborder-radius: inherit;\n\t\t\t\tz-index: -1;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tvisibility: hidden;\n\t\tposition: absolute;\n\t\twidth: 7px;\n\t\theight: calc(100% - 40px);\n\t\tborder-radius: 4px;\n\t\topacity: 0;\n\t\ttransition:\n\t\t\tbackground-color 0.2s,\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t&.none {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&.shadow {\n\t\t\tbackground: ", ";\n\t\t}\n\n\t\t&.full-height {\n\t\t\tbackground: ", ";\n\t\t\theight: 100%;\n\t\t\tmin-height: 36px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t& .", " {\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tdisplay: flow-root;\n\t\twidth: 100%;\n\n\t\t&.", " {\n\t\t\tpadding: 0 ", ";\n\t\t\tleft: ", ";\n\t\t}\n\t}\n\n\t/* This below style is here to make sure the image width is correct when nested in a table */\n\ttable .", ", table .", ".", " {\n\t\tpadding: unset;\n\t\tleft: unset;\n\t}\n"])), resizerItemClassName, handleWrapperClass, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #4688EC)", resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), resizerHandleClassName, "var(--ds-space-negative-200, -16px)", resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, #4688EC)", resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, #0B120E24)", "var(--ds-border-selected, #0C66E4)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, "var(--ds-background-selected, #E9F2FE)", "var(--ds-background-selected, #E9F2FE)", akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #4688EC)", resizerHoverZoneClassName, resizerExtendedZone, "var(--ds-space-150, 12px)", "var(--ds-space-negative-150, -12px)", resizerHoverZoneClassName, resizerHoverZoneClassName, resizerExtendedZone);
14
+ export var resizerHandleZIndex = 1;
@@ -1,6 +1,5 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { ToolbarUIProvider } from '@atlaskit/editor-toolbar';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  export var EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
5
4
  var children = _ref.children,
6
5
  api = _ref.api,
@@ -14,23 +13,11 @@ export var EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
14
13
  var isOpen = _ref2.isOpen,
15
14
  event = _ref2.event;
16
15
  if (!isOpen) {
17
- if (fg('platform_editor_toolbar_aifc_patch_7')) {
18
- // Only refocus the editor when the dropdown closes via mouse or programmatic close.
19
- // When closed via keyboard Escape, keep focus on the trigger for better keyboard UX.
20
- var isKeyboardEscape = event instanceof KeyboardEvent && event.key === 'Escape';
21
- var shouldFocusEditor = !isKeyboardEscape;
22
- if (shouldFocusEditor) {
23
- // On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
24
- // Hence, `.focus()` should also be called in requestAnimationFrame
25
- setTimeout(function () {
26
- return requestAnimationFrame(function () {
27
- api === null || api === void 0 || api.core.actions.focus({
28
- scrollIntoView: false
29
- });
30
- });
31
- }, 1);
32
- }
33
- } else {
16
+ // Only refocus the editor when the dropdown closes via mouse or programmatic close.
17
+ // When closed via keyboard Escape, keep focus on the trigger for better keyboard UX.
18
+ var isKeyboardEscape = event instanceof KeyboardEvent && event.key === 'Escape';
19
+ var shouldFocusEditor = !isKeyboardEscape;
20
+ if (shouldFocusEditor) {
34
21
  // On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
35
22
  // Hence, `.focus()` should also be called in requestAnimationFrame
36
23
  setTimeout(function () {
@@ -42,6 +29,7 @@ export var EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
42
29
  }, 1);
43
30
  }
44
31
  }
32
+ ;
45
33
  }, [api]);
46
34
  return /*#__PURE__*/React.createElement(ToolbarUIProvider, {
47
35
  onDropdownOpenChanged: onDropdownOpenChanged,
@@ -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 = "0.0.0-development";
24
+ var packageVersion = "111.8.11";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -7,7 +7,6 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { ELEMENT_BROWSER_ID } from '../../element-browser';
12
11
  import { fullPageMessages } from '../../messages';
13
12
  import { mediaInsertMessages } from '../../messages/media-insert';
@@ -264,15 +263,8 @@ function isElementOrAncestorHiddenOrDisabled(element, rootNode) {
264
263
  function getFilteredFocusableElements(rootNode) {
265
264
  // The focusable elements from child components such as dropdown menus / popups are ignored
266
265
  return getFocusableElements(rootNode).filter(function (elm) {
267
- var style = window.getComputedStyle(elm);
268
- // ignore invisible element to avoid losing focus
269
- var isVisible = style.visibility !== 'hidden' && style.display !== 'none';
270
-
271
266
  // Check if element or any ancestor is hidden or disabled
272
267
  var isHiddenOrDisabled = isElementOrAncestorHiddenOrDisabled(elm, rootNode);
273
- if (fg('platform_editor_toolbar_aifc_patch_7')) {
274
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
275
- }
276
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && isVisible;
268
+ return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
277
269
  });
278
270
  }
@@ -1,6 +1,5 @@
1
1
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
2
2
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
6
5
 
@@ -125,7 +124,7 @@ export var calculateToolbarPositionTrackHeadOld = function calculateToolbarPosit
125
124
  var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
126
125
  var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
127
126
  var range = null;
128
- if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
127
+ if (isMoreRovoOptionsButtonVisible) {
129
128
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
130
129
  var maybeRange = selection.getRangeAt(0);
131
130
  if (maybeRange instanceof Range) {
@@ -213,7 +212,7 @@ export var calculateToolbarPositionTrackHeadNew = function calculateToolbarPosit
213
212
  var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
214
213
  var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
215
214
  var range = null;
216
- if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
215
+ if (isMoreRovoOptionsButtonVisible) {
217
216
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
218
217
  var maybeRange = selection.getRangeAt(0);
219
218
  if (maybeRange instanceof Range) {