@atlaskit/editor-common 109.15.0 → 109.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/cjs/copy-button/index.js +4 -2
- package/dist/cjs/keymaps/index.js +11 -6
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/BreakoutResizer.js +6 -4
- package/dist/cjs/styles/shared/table.js +3 -3
- package/dist/cjs/sync-block.js +1 -8
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/PanelTextInput/index.js +7 -4
- package/dist/cjs/utils/browser.js +43 -9
- package/dist/cjs/utils/commands.js +13 -3
- package/dist/cjs/utils/validator.js +13 -0
- package/dist/es2019/copy-button/index.js +3 -1
- package/dist/es2019/keymaps/index.js +6 -1
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/BreakoutResizer.js +5 -3
- package/dist/es2019/styles/shared/table.js +107 -105
- package/dist/es2019/sync-block.js +1 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/PanelTextInput/index.js +4 -1
- package/dist/es2019/utils/browser.js +43 -9
- package/dist/es2019/utils/commands.js +13 -3
- package/dist/es2019/utils/validator.js +13 -0
- package/dist/esm/copy-button/index.js +3 -1
- package/dist/esm/keymaps/index.js +6 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/BreakoutResizer.js +5 -3
- package/dist/esm/styles/shared/table.js +4 -4
- package/dist/esm/sync-block.js +1 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/PanelTextInput/index.js +4 -1
- package/dist/esm/utils/browser.js +43 -9
- package/dist/esm/utils/commands.js +13 -3
- package/dist/esm/utils/validator.js +13 -0
- package/dist/types/analytics/types/ai-streaming.d.ts +3 -0
- package/dist/types/sync-block.d.ts +0 -1
- package/dist/types-ts4.5/analytics/types/ai-streaming.d.ts +3 -0
- package/dist/types-ts4.5/sync-block.d.ts +0 -1
- package/package.json +9 -9
- package/dist/cjs/sync-block/index.js +0 -12
- package/dist/cjs/sync-block/sync-block-store-manager.js +0 -94
- package/dist/cjs/sync-block/types.js +0 -1
- package/dist/es2019/sync-block/index.js +0 -3
- package/dist/es2019/sync-block/sync-block-store-manager.js +0 -51
- package/dist/es2019/sync-block/types.js +0 -0
- package/dist/esm/sync-block/index.js +0 -3
- package/dist/esm/sync-block/sync-block-store-manager.js +0 -88
- package/dist/esm/sync-block/types.js +0 -0
- package/dist/types/sync-block/index.d.ts +0 -2
- package/dist/types/sync-block/sync-block-store-manager.d.ts +0 -33
- package/dist/types/sync-block/types.d.ts +0 -2
- package/dist/types-ts4.5/sync-block/index.d.ts +0 -2
- package/dist/types-ts4.5/sync-block/sync-block-store-manager.d.ts +0 -33
- package/dist/types-ts4.5/sync-block/types.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 109.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`687c1b8fa7801`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/687c1b8fa7801) -
|
|
8
|
+
EDITOR-1566 bump adf-schema + update validator
|
|
9
|
+
- [`578ac13fd9edd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/578ac13fd9edd) -
|
|
10
|
+
Add Sync Block provider as new package
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`f43856916489c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f43856916489c) -
|
|
15
|
+
[EDITOR-1748] Properly calculate if selection is at the start of a blockTaskItem with an extension
|
|
16
|
+
instead of a paragraph
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
19
|
+
## 109.15.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`b1acfd162fa8a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b1acfd162fa8a) -
|
|
24
|
+
use latest browser util for editor-common
|
|
25
|
+
- [`096440b378eeb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/096440b378eeb) -
|
|
26
|
+
[ux] EDITOR-1786 - fix update stream errors
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 109.15.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -9,8 +9,9 @@ exports.toDOM = void 0;
|
|
|
9
9
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
13
|
var _clipboard = require("../clipboard");
|
|
13
|
-
var
|
|
14
|
+
var _browser = require("../utils/browser");
|
|
14
15
|
function getSelectedNodeOrNodeParentByNodeType(_ref) {
|
|
15
16
|
var nodeType = _ref.nodeType,
|
|
16
17
|
selection = _ref.selection;
|
|
@@ -28,6 +29,7 @@ var copyDomNode = exports.copyDomNode = function copyDomNode(domNode, nodeType,
|
|
|
28
29
|
var div = document.createElement('div');
|
|
29
30
|
div.appendChild(domNode);
|
|
30
31
|
var schema = selection.$from.doc.type.schema;
|
|
32
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
31
33
|
|
|
32
34
|
// if copying inline content
|
|
33
35
|
if (nodeType.inlineContent) {
|
|
@@ -47,7 +49,7 @@ var copyDomNode = exports.copyDomNode = function copyDomNode(domNode, nodeType,
|
|
|
47
49
|
}
|
|
48
50
|
// ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
|
|
49
51
|
// MEX-2528 safari has a bug related to the mediaSingle node with border or link. The image tag within the clipboard is not recognized as HTML when using the ClipboardItem API. To address this, we have to switch to ClipboardPolyfill
|
|
50
|
-
if (
|
|
52
|
+
if (browser.safari && selection instanceof _state.NodeSelection && (selection.node.type === schema.nodes.extension || selection.node.type === schema.nodes.mediaSingle)) {
|
|
51
53
|
(0, _clipboard.copyHTMLToClipboardPolyfill)(div);
|
|
52
54
|
} else {
|
|
53
55
|
(0, _clipboard.copyHTMLToClipboard)(div);
|
|
@@ -110,8 +110,9 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
110
110
|
var _react = _interopRequireWildcard(require("react"));
|
|
111
111
|
var _react2 = require("@emotion/react");
|
|
112
112
|
var _w3cKeyname = require("w3c-keyname");
|
|
113
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
113
114
|
var _editorCommands = require("../preset/editor-commands");
|
|
114
|
-
var
|
|
115
|
+
var _browser = require("../utils/browser");
|
|
115
116
|
var _consts = require("./consts");
|
|
116
117
|
var _keymap = require("./keymap");
|
|
117
118
|
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" != _typeof3(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); }
|
|
@@ -236,7 +237,8 @@ var tooltipShortcutStyle = (0, _react2.css)({
|
|
|
236
237
|
});
|
|
237
238
|
function formatShortcut(keymap) {
|
|
238
239
|
var shortcut;
|
|
239
|
-
|
|
240
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
241
|
+
if (browser.mac) {
|
|
240
242
|
// for reference: https://wincent.com/wiki/Unicode_representations_of_modifier_keys
|
|
241
243
|
shortcut = keymap.mac
|
|
242
244
|
// Ignored via go/ees005
|
|
@@ -269,7 +271,7 @@ function formatShortcut(keymap) {
|
|
|
269
271
|
lastKey = lastKey.toUpperCase();
|
|
270
272
|
}
|
|
271
273
|
keys[keys.length - 1] = arrowKeysMap[lastKey.toUpperCase()] || lastKey;
|
|
272
|
-
return keys.join(
|
|
274
|
+
return keys.join(browser.mac ? '' : '+');
|
|
273
275
|
}
|
|
274
276
|
function tooltip(keymap, description) {
|
|
275
277
|
if (keymap) {
|
|
@@ -317,17 +319,19 @@ function findShortcutByDescription(description) {
|
|
|
317
319
|
return;
|
|
318
320
|
}
|
|
319
321
|
function findShortcutByKeymap(keymap) {
|
|
320
|
-
|
|
322
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
323
|
+
if (browser.mac) {
|
|
321
324
|
return keymap.mac;
|
|
322
325
|
}
|
|
323
326
|
return keymap.windows;
|
|
324
327
|
}
|
|
325
328
|
function getAriaKeyshortcuts(keymap) {
|
|
326
329
|
var keyShortcuts;
|
|
330
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
327
331
|
if (typeof keymap === 'string') {
|
|
328
332
|
keyShortcuts = keymap;
|
|
329
333
|
} else if ((0, _typeof2.default)(keymap) === 'object') {
|
|
330
|
-
keyShortcuts = keymap[
|
|
334
|
+
keyShortcuts = keymap[browser.mac ? 'mac' : 'windows'];
|
|
331
335
|
}
|
|
332
336
|
if (keyShortcuts) {
|
|
333
337
|
return keyShortcuts.toLowerCase().split('-').map(function (modifier) {
|
|
@@ -414,7 +418,8 @@ function bindKeymapWithEditorCommand(shortcut, cmd, keymap) {
|
|
|
414
418
|
}
|
|
415
419
|
function findKeyMapForBrowser(keyMap) {
|
|
416
420
|
if (keyMap) {
|
|
417
|
-
|
|
421
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
422
|
+
if (browser.mac) {
|
|
418
423
|
return keyMap.mac;
|
|
419
424
|
}
|
|
420
425
|
return keyMap.windows;
|
|
@@ -32,6 +32,7 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
|
32
32
|
var _analytics = require("../../../analytics");
|
|
33
33
|
var _ui = require("../../../ui");
|
|
34
34
|
var _utils = require("../../../utils");
|
|
35
|
+
var _browser = require("../../../utils/browser");
|
|
35
36
|
var _LinkSearchList = _interopRequireWildcard(require("../../LinkSearch/LinkSearchList"));
|
|
36
37
|
var _ToolbarComponents = require("../../LinkSearch/ToolbarComponents");
|
|
37
38
|
var _transformTimeStamp = require("../../LinkSearch/transformTimeStamp");
|
|
@@ -877,10 +878,11 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
877
878
|
var ariaActiveDescendant = selectedIndex > -1 ? "link-search-list-item-".concat(selectedIndex) : '';
|
|
878
879
|
var linkSearchInputId = 'search-recent-links-field-id';
|
|
879
880
|
var displayTextInputId = 'display-text-filed-id';
|
|
881
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
880
882
|
// Added workaround with a screen reader Announcer specifically for VoiceOver + Safari
|
|
881
883
|
// as the Aria design pattern for combobox does not work in this case
|
|
882
884
|
// for details: https://a11y-internal.atlassian.net/browse/AK-740
|
|
883
|
-
var screenReaderText =
|
|
885
|
+
var screenReaderText = browser.safari && this.getScreenReaderText();
|
|
884
886
|
return (0, _react2.jsx)("div", {
|
|
885
887
|
"aria-label": "Hyperlink Edit"
|
|
886
888
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
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); }
|
|
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 = "109.
|
|
19
|
+
var packageVersion = "109.15.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -11,6 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _bindEventListener = require("bind-event-listener");
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
16
|
var _analytics = require("../analytics");
|
|
16
17
|
var _styles = require("../styles");
|
|
@@ -140,6 +141,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
140
141
|
currentLayout = _useBreakoutGuideline.currentLayout,
|
|
141
142
|
guidelines = _useBreakoutGuideline.guidelines,
|
|
142
143
|
setCurrentWidth = _useBreakoutGuideline.setCurrentWidth;
|
|
144
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
143
145
|
(0, _react.useEffect)(function () {
|
|
144
146
|
if (displayGuidelines) {
|
|
145
147
|
displayGuidelines(guidelines || []);
|
|
@@ -263,7 +265,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
263
265
|
}, [handleResizeStop, maxWidth, minWidth, parentRef]);
|
|
264
266
|
var resizeHandleKeyDownHandler = (0, _react.useCallback)(function (event) {
|
|
265
267
|
var isBracketKey = event.code === 'BracketRight' || event.code === 'BracketLeft';
|
|
266
|
-
var metaKey =
|
|
268
|
+
var metaKey = browser.mac ? event.metaKey : event.ctrlKey;
|
|
267
269
|
if (event.altKey || metaKey || event.shiftKey) {
|
|
268
270
|
areResizeMetaKeysPressed.current = true;
|
|
269
271
|
}
|
|
@@ -275,7 +277,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
275
277
|
} else if (!areResizeMetaKeysPressed.current) {
|
|
276
278
|
handleEscape();
|
|
277
279
|
}
|
|
278
|
-
}, [handleEscape, handleLayoutSizeChangeOnKeypress]);
|
|
280
|
+
}, [handleEscape, handleLayoutSizeChangeOnKeypress, browser]);
|
|
279
281
|
var resizeHandleKeyUpHandler = (0, _react.useCallback)(function (event) {
|
|
280
282
|
if (event.altKey || event.metaKey) {
|
|
281
283
|
areResizeMetaKeysPressed.current = false;
|
|
@@ -287,7 +289,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
287
289
|
return;
|
|
288
290
|
}
|
|
289
291
|
var resizeHandleThumbEl = resizerRef.current.getResizerThumbEl();
|
|
290
|
-
var metaKey =
|
|
292
|
+
var metaKey = browser.mac ? event.metaKey : event.ctrlKey;
|
|
291
293
|
var isTargetResizeHandle = event.target instanceof HTMLElement && event.target.classList.contains('resizer-handle-thumb');
|
|
292
294
|
if (event.altKey && event.shiftKey && metaKey && event.code === 'KeyR' || isTargetResizeHandle && (event.altKey || metaKey || event.shiftKey)) {
|
|
293
295
|
event.preventDefault();
|
|
@@ -301,7 +303,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
301
303
|
inline: 'nearest'
|
|
302
304
|
});
|
|
303
305
|
}
|
|
304
|
-
}, [resizerRef]);
|
|
306
|
+
}, [resizerRef, browser]);
|
|
305
307
|
(0, _react.useLayoutEffect)(function () {
|
|
306
308
|
if (!resizerRef.current || !editorView) {
|
|
307
309
|
return;
|
|
@@ -57,10 +57,10 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
57
57
|
(0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
58
58
|
(0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :first-child:not(style),\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
62
60
|
var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
|
|
63
|
-
|
|
61
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
62
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
63
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid\n\t\t\t\t", ";\n\t\t\ttable-layout: fixed;\n\t\t\tfont-size: 1em;\n\t\t\twidth: 100%;\n\n\t\t\t&[data-autosize='true'] {\n\t\t\t\ttable-layout: auto;\n\t\t\t}\n\n\t\t\t& {\n\t\t\t\t* {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t\thr {\n\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t}\n\n\t\t\t\ttbody {\n\t\t\t\t\tborder-bottom: none;\n\t\t\t\t}\n\t\t\t\tth td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\t> tbody > tr > th,\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tmin-width: ", "px;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tvertical-align: top;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tborder-right-width: 0;\n\t\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\t\tpadding: ", ";\n\t\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t\t", "\n\n\t\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\tth {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\ttext-align: left;\n\n\t\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t\t", " {\n\t\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #d9dbea)", ";\n\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? '&:not(.danger)' : '&:not([style]):not(.danger)', _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
|
|
64
64
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
65
65
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", (0, _editorSharedStyles.overflowShadow)({
|
|
66
66
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
package/dist/cjs/sync-block.js
CHANGED
|
@@ -9,11 +9,4 @@ Object.defineProperty(exports, "SyncBlockSharedCssClassName", {
|
|
|
9
9
|
return _syncBlock.SyncBlockSharedCssClassName;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _index.SyncBlockStoreManager;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _syncBlock = require("./styles/shared/sync-block");
|
|
19
|
-
var _index = require("./sync-block/index");
|
|
12
|
+
var _syncBlock = require("./styles/shared/sync-block");
|
|
@@ -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 = "109.
|
|
27
|
+
var packageVersion = "109.15.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -14,7 +14,8 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = require("react");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
|
-
var
|
|
17
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
|
+
var _browser = require("../../utils/browser");
|
|
18
19
|
var _styles = require("./styles");
|
|
19
20
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
@@ -173,11 +174,12 @@ var PanelTextInput = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
173
174
|
// Ignored via go/ees005
|
|
174
175
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
175
176
|
function isUndoEvent(event) {
|
|
177
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
176
178
|
return event.keyCode === KeyZCode && (
|
|
177
179
|
// cmd + z for mac
|
|
178
|
-
|
|
180
|
+
browser.mac && event.metaKey && !event.shiftKey ||
|
|
179
181
|
// ctrl + z for non-mac
|
|
180
|
-
!
|
|
182
|
+
!browser.mac && event.ctrlKey);
|
|
181
183
|
}
|
|
182
184
|
|
|
183
185
|
// Ignored via go/ees005
|
|
@@ -185,9 +187,10 @@ var PanelTextInput = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
185
187
|
}, {
|
|
186
188
|
key: "isRedoEvent",
|
|
187
189
|
value: function isRedoEvent(event) {
|
|
190
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
188
191
|
return (
|
|
189
192
|
// ctrl + y for non-mac
|
|
190
|
-
!
|
|
193
|
+
!browser.mac && event.ctrlKey && event.keyCode === KeyYCode || browser.mac && event.metaKey && event.shiftKey && event.keyCode === KeyZCode || event.ctrlKey && event.shiftKey && event.keyCode === KeyZCode
|
|
191
194
|
);
|
|
192
195
|
}
|
|
193
196
|
}]);
|
|
@@ -104,6 +104,42 @@ var getSecondMatch = function getSecondMatch(regexp, ua) {
|
|
|
104
104
|
return match && match.length > 0 && match[2] || '';
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
+
// Helper functions to safely access browser properties
|
|
108
|
+
var getSafeUserAgent = function getSafeUserAgent() {
|
|
109
|
+
var _window$navigator;
|
|
110
|
+
if (typeof window === 'undefined') {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Check for SSR user agent first
|
|
115
|
+
if (process.env.REACT_SSR) {
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
117
|
+
var ssrUserAgent = window.__SSR_USER_AGENT__;
|
|
118
|
+
if (ssrUserAgent) {
|
|
119
|
+
return ssrUserAgent;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Fallback to navigator.userAgent with proper null checking
|
|
124
|
+
return (_window$navigator = window.navigator) === null || _window$navigator === void 0 ? void 0 : _window$navigator.userAgent;
|
|
125
|
+
};
|
|
126
|
+
var getSafePlatform = function getSafePlatform() {
|
|
127
|
+
var _window$navigator2;
|
|
128
|
+
if (typeof window === 'undefined') {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
return (_window$navigator2 = window.navigator) === null || _window$navigator2 === void 0 ? void 0 : _window$navigator2.platform;
|
|
132
|
+
};
|
|
133
|
+
var hasIntersectionObserver = function hasIntersectionObserver() {
|
|
134
|
+
return typeof window !== 'undefined' && 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window &&
|
|
135
|
+
// Ignored via go/ees005
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
137
|
+
'intersectionRatio' in window.IntersectionObserverEntry.prototype;
|
|
138
|
+
};
|
|
139
|
+
var hasResizeObserver = function hasResizeObserver() {
|
|
140
|
+
return typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
|
|
141
|
+
};
|
|
142
|
+
|
|
107
143
|
// New API to get the browser info on demand
|
|
108
144
|
var getBrowserInfo = exports.getBrowserInfo = (0, _memoizeOne.default)(function () {
|
|
109
145
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -124,9 +160,8 @@ var getBrowserInfo = exports.getBrowserInfo = (0, _memoizeOne.default)(function
|
|
|
124
160
|
supportsIntersectionObserver: false,
|
|
125
161
|
supportsResizeObserver: false
|
|
126
162
|
};
|
|
127
|
-
var userAgent =
|
|
128
|
-
|
|
129
|
-
window.__SSR_USER_AGENT__ : navigator.userAgent;
|
|
163
|
+
var userAgent = getSafeUserAgent();
|
|
164
|
+
var platform = getSafePlatform();
|
|
130
165
|
if (userAgent) {
|
|
131
166
|
// inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
|
|
132
167
|
// Ignored via go/ees005
|
|
@@ -137,9 +172,11 @@ var getBrowserInfo = exports.getBrowserInfo = (0, _memoizeOne.default)(function
|
|
|
137
172
|
// eslint-disable-next-line require-unicode-regexp
|
|
138
173
|
var internetExplorer = /msie|trident/i.test(userAgent);
|
|
139
174
|
|
|
175
|
+
// Ideally we should use userAgent instead of platform, but we have lots of keymap tests failure when we change it
|
|
176
|
+
// So leave it as is for now.
|
|
140
177
|
// Ignored via go/ees005
|
|
141
178
|
// eslint-disable-next-line require-unicode-regexp
|
|
142
|
-
result.mac = /
|
|
179
|
+
result.mac = platform && /Mac/.test(platform);
|
|
143
180
|
|
|
144
181
|
// Previously relied on navigator.userAgentData?.platform and userAgent, now used only userAgent
|
|
145
182
|
result.windows =
|
|
@@ -194,11 +231,8 @@ var getBrowserInfo = exports.getBrowserInfo = (0, _memoizeOne.default)(function
|
|
|
194
231
|
// Previously we relied on documentElement.style.WebkitAppearance, now changed to userAgent
|
|
195
232
|
// eslint-disable-next-line require-unicode-regexp
|
|
196
233
|
result.webkit = /(apple)?webkit/i.test(userAgent);
|
|
197
|
-
result.supportsIntersectionObserver =
|
|
198
|
-
|
|
199
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
200
|
-
'intersectionRatio' in window.IntersectionObserverEntry.prototype;
|
|
201
|
-
result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
|
|
234
|
+
result.supportsIntersectionObserver = hasIntersectionObserver();
|
|
235
|
+
result.supportsResizeObserver = hasResizeObserver();
|
|
202
236
|
}
|
|
203
237
|
return result;
|
|
204
238
|
});
|
|
@@ -309,9 +309,19 @@ var isEmptySelectionAtStart = exports.isEmptySelectionAtStart = function isEmpty
|
|
|
309
309
|
// Else, check if the parent is a blockTaskItem
|
|
310
310
|
else if ($from.parent.type === blockTaskItem) {
|
|
311
311
|
// Check if the selection is at the start of the blockTaskItem
|
|
312
|
-
var
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
var firstPosInBlockTaskItem = 0;
|
|
313
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_blocktaskitem_patch_2')) {
|
|
314
|
+
var blockTaskItemDepth = $from.depth;
|
|
315
|
+
|
|
316
|
+
// When cleaning up platform_editor_blocktaskitem_patch_2, set firstPosInBlockTaskItem as const
|
|
317
|
+
firstPosInBlockTaskItem = $from.start(blockTaskItemDepth);
|
|
318
|
+
} else {
|
|
319
|
+
var _blockTaskItemDepth = $from.depth - 1;
|
|
320
|
+
var DISTANCE_FROM_PARENT_FOR_GAP_CURSOR = 1;
|
|
321
|
+
firstPosInBlockTaskItem = $from.start(_blockTaskItemDepth) + DISTANCE_FROM_PARENT_FOR_GAP_CURSOR;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Is the selection at the first possible position inside the blockTaskItem
|
|
315
325
|
return $from.pos === firstPosInBlockTaskItem;
|
|
316
326
|
}
|
|
317
327
|
}
|
|
@@ -10,6 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
11
|
var _schemaDefault = require("@atlaskit/adf-schema/schema-default");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
16
|
var ADFStages = exports.ADFStages = {
|
|
@@ -850,6 +851,18 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
850
851
|
marks: marks
|
|
851
852
|
};
|
|
852
853
|
}
|
|
854
|
+
case 'syncBlock':
|
|
855
|
+
{
|
|
856
|
+
if (adfStage === 'stage0' && (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true)) {
|
|
857
|
+
return {
|
|
858
|
+
type: type,
|
|
859
|
+
attrs: attrs,
|
|
860
|
+
marks: marks
|
|
861
|
+
};
|
|
862
|
+
} else {
|
|
863
|
+
return getValidUnknownNode(node);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
853
866
|
}
|
|
854
867
|
}
|
|
855
868
|
return getValidUnknownNode(node);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '../clipboard';
|
|
5
|
-
import { browser } from '../utils';
|
|
6
|
+
import { browser as browserLegacy, getBrowserInfo } from '../utils/browser';
|
|
6
7
|
export function getSelectedNodeOrNodeParentByNodeType({
|
|
7
8
|
nodeType,
|
|
8
9
|
selection
|
|
@@ -21,6 +22,7 @@ export const copyDomNode = (domNode, nodeType, selection) => {
|
|
|
21
22
|
const div = document.createElement('div');
|
|
22
23
|
div.appendChild(domNode);
|
|
23
24
|
const schema = selection.$from.doc.type.schema;
|
|
25
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
24
26
|
|
|
25
27
|
// if copying inline content
|
|
26
28
|
if (nodeType.inlineContent) {
|
|
@@ -7,8 +7,9 @@ import React, { Fragment } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { base, keyName } from 'w3c-keyname';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { editorCommandToPMCommand } from '../preset/editor-commands';
|
|
11
|
-
import { browser } from '../utils';
|
|
12
|
+
import { browser as browserLegacy, getBrowserInfo } from '../utils/browser';
|
|
12
13
|
export const addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
|
|
13
14
|
export const navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
|
|
14
15
|
export const navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
|
|
@@ -123,6 +124,7 @@ const tooltipShortcutStyle = css({
|
|
|
123
124
|
});
|
|
124
125
|
export function formatShortcut(keymap) {
|
|
125
126
|
let shortcut;
|
|
127
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
126
128
|
if (browser.mac) {
|
|
127
129
|
// for reference: https://wincent.com/wiki/Unicode_representations_of_modifier_keys
|
|
128
130
|
shortcut = keymap.mac
|
|
@@ -201,6 +203,7 @@ export function findShortcutByDescription(description) {
|
|
|
201
203
|
return;
|
|
202
204
|
}
|
|
203
205
|
export function findShortcutByKeymap(keymap) {
|
|
206
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
204
207
|
if (browser.mac) {
|
|
205
208
|
return keymap.mac;
|
|
206
209
|
}
|
|
@@ -208,6 +211,7 @@ export function findShortcutByKeymap(keymap) {
|
|
|
208
211
|
}
|
|
209
212
|
export function getAriaKeyshortcuts(keymap) {
|
|
210
213
|
let keyShortcuts;
|
|
214
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
211
215
|
if (typeof keymap === 'string') {
|
|
212
216
|
keyShortcuts = keymap;
|
|
213
217
|
} else if (typeof keymap === 'object') {
|
|
@@ -298,6 +302,7 @@ export function bindKeymapWithEditorCommand(shortcut, cmd, keymap) {
|
|
|
298
302
|
}
|
|
299
303
|
export function findKeyMapForBrowser(keyMap) {
|
|
300
304
|
if (keyMap) {
|
|
305
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
301
306
|
if (browser.mac) {
|
|
302
307
|
return keyMap.mac;
|
|
303
308
|
}
|
|
@@ -22,7 +22,8 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
22
22
|
import Tooltip from '@atlaskit/tooltip';
|
|
23
23
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent, INPUT_METHOD } from '../../../analytics';
|
|
24
24
|
import { Announcer, PanelTextInput } from '../../../ui';
|
|
25
|
-
import {
|
|
25
|
+
import { normalizeUrl } from '../../../utils';
|
|
26
|
+
import { browser as browserLegacy, getBrowserInfo } from '../../../utils/browser';
|
|
26
27
|
import LinkSearchList, { LinkSearchListNext } from '../../LinkSearch/LinkSearchList';
|
|
27
28
|
import { container, containerWithProvider, inputWrapper } from '../../LinkSearch/ToolbarComponents';
|
|
28
29
|
import { transformTimeStamp } from '../../LinkSearch/transformTimeStamp';
|
|
@@ -729,6 +730,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
729
730
|
const ariaActiveDescendant = selectedIndex > -1 ? `link-search-list-item-${selectedIndex}` : '';
|
|
730
731
|
const linkSearchInputId = 'search-recent-links-field-id';
|
|
731
732
|
const displayTextInputId = 'display-text-filed-id';
|
|
733
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
732
734
|
// Added workaround with a screen reader Announcer specifically for VoiceOver + Safari
|
|
733
735
|
// as the Aria design pattern for combobox does not work in this case
|
|
734
736
|
// for details: https://a11y-internal.atlassian.net/browse/AK-740
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "109.
|
|
4
|
+
const packageVersion = "109.15.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -2,10 +2,11 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useSta
|
|
|
2
2
|
import { bind, bindAll } from 'bind-event-listener';
|
|
3
3
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
7
8
|
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
|
|
8
|
-
import { browser } from '../utils/browser';
|
|
9
|
+
import { browser as browserLegacy, getBrowserInfo } from '../utils/browser';
|
|
9
10
|
import Resizer from './Resizer';
|
|
10
11
|
import { ResizerBreakoutModeLabel } from './ResizerBreakoutModeLabel';
|
|
11
12
|
import { SNAP_GAP, useBreakoutGuidelines } from './useBreakoutGuidelines';
|
|
@@ -129,6 +130,7 @@ const BreakoutResizer = ({
|
|
|
129
130
|
guidelines,
|
|
130
131
|
setCurrentWidth
|
|
131
132
|
} = useBreakoutGuidelines(getEditorWidth, isResizing && editorExperiment('single_column_layouts', true), dynamicFullWidthGuidelineOffset);
|
|
133
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
132
134
|
useEffect(() => {
|
|
133
135
|
if (displayGuidelines) {
|
|
134
136
|
displayGuidelines(guidelines || []);
|
|
@@ -271,7 +273,7 @@ const BreakoutResizer = ({
|
|
|
271
273
|
} else if (!areResizeMetaKeysPressed.current) {
|
|
272
274
|
handleEscape();
|
|
273
275
|
}
|
|
274
|
-
}, [handleEscape, handleLayoutSizeChangeOnKeypress]);
|
|
276
|
+
}, [handleEscape, handleLayoutSizeChangeOnKeypress, browser]);
|
|
275
277
|
const resizeHandleKeyUpHandler = useCallback(event => {
|
|
276
278
|
if (event.altKey || event.metaKey) {
|
|
277
279
|
areResizeMetaKeysPressed.current = false;
|
|
@@ -297,7 +299,7 @@ const BreakoutResizer = ({
|
|
|
297
299
|
inline: 'nearest'
|
|
298
300
|
});
|
|
299
301
|
}
|
|
300
|
-
}, [resizerRef]);
|
|
302
|
+
}, [resizerRef, browser]);
|
|
301
303
|
useLayoutEffect(() => {
|
|
302
304
|
if (!resizerRef.current || !editorView) {
|
|
303
305
|
return;
|