@atlaskit/editor-common 112.21.3 → 113.0.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 +50 -0
- package/dist/cjs/ai-messages/ai-config-items.js +10 -0
- package/dist/cjs/ai-messages/ai-suggestions.js +15 -0
- package/dist/cjs/analytics/types/table-events.js +2 -0
- package/dist/cjs/messages/help-dialog.js +25 -0
- package/dist/cjs/messages/table.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +2 -2
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +2 -1
- package/dist/cjs/styles/shared/table.js +2 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/browser.js +8 -97
- package/dist/cjs/utils/index.js +0 -7
- package/dist/es2019/ai-messages/ai-config-items.js +10 -0
- package/dist/es2019/ai-messages/ai-suggestions.js +15 -0
- package/dist/es2019/analytics/types/table-events.js +2 -0
- package/dist/es2019/messages/help-dialog.js +25 -0
- package/dist/es2019/messages/table.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +3 -2
- package/dist/es2019/styles/shared/table.js +2 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/browser.js +0 -89
- package/dist/es2019/utils/index.js +0 -8
- package/dist/esm/ai-messages/ai-config-items.js +10 -0
- package/dist/esm/ai-messages/ai-suggestions.js +15 -0
- package/dist/esm/analytics/types/table-events.js +2 -0
- package/dist/esm/messages/help-dialog.js +25 -0
- package/dist/esm/messages/table.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +3 -2
- package/dist/esm/styles/shared/table.js +2 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/browser.js +7 -96
- package/dist/esm/utils/index.js +0 -8
- package/dist/types/ai-messages/ai-config-items.d.ts +155 -145
- package/dist/types/ai-messages/ai-suggestions.d.ts +15 -0
- package/dist/types/analytics/types/table-events.d.ts +17 -2
- package/dist/types/messages/help-dialog.d.ts +25 -0
- package/dist/types/messages/table.d.ts +152 -147
- package/dist/types/node-width/index.d.ts +1 -0
- package/dist/types/styles/shared/table.d.ts +1 -0
- package/dist/types/utils/browser.d.ts +0 -10
- package/dist/types/utils/index.d.ts +0 -8
- package/dist/types-ts4.5/ai-messages/ai-config-items.d.ts +155 -145
- package/dist/types-ts4.5/ai-messages/ai-suggestions.d.ts +15 -0
- package/dist/types-ts4.5/analytics/types/table-events.d.ts +17 -2
- package/dist/types-ts4.5/messages/help-dialog.d.ts +25 -0
- package/dist/types-ts4.5/messages/table.d.ts +152 -147
- package/dist/types-ts4.5/node-width/index.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/table.d.ts +1 -0
- package/dist/types-ts4.5/utils/browser.d.ts +0 -10
- package/dist/types-ts4.5/utils/index.d.ts +0 -8
- package/package.json +12 -12
|
@@ -8,14 +8,6 @@ export { shouldAutoLinkifyMatch } from './should-auto-linkify-tld';
|
|
|
8
8
|
export { getAnnotationMarksForPos, canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, hasAnnotationMark, getRangeInlineNodeNames, getRangeAncestorNodeNames, isEmptyTextSelection, isEmptyTextSelectionRenderer } from './annotation';
|
|
9
9
|
export { getExtensionLozengeData } from './macro';
|
|
10
10
|
export {
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* @deprecated
|
|
14
|
-
*
|
|
15
|
-
* Please use `@atlaskit/editor-common/browser` entry-point instead.
|
|
16
|
-
*/
|
|
17
|
-
browser } from './browser';
|
|
18
|
-
export {
|
|
19
11
|
/**
|
|
20
12
|
* @private
|
|
21
13
|
* @deprecated
|
|
@@ -426,5 +426,15 @@ export var aiConfigItemMessages = defineMessages({
|
|
|
426
426
|
id: 'fabric.editor.ai.config.item.addPolish.description',
|
|
427
427
|
defaultMessage: 'Polishes the content to make it more polished',
|
|
428
428
|
description: 'Description for the the Atlassian Intelligence "Add polish".'
|
|
429
|
+
},
|
|
430
|
+
improveFormattingTitle: {
|
|
431
|
+
id: 'fabric.editor.ai.config.item.improveFormatting.title',
|
|
432
|
+
defaultMessage: 'Improve formatting',
|
|
433
|
+
description: 'Describes an option to use Atlassian Intelligence to improve the formatting of the content currently selected by the user'
|
|
434
|
+
},
|
|
435
|
+
improveFormattingDescription: {
|
|
436
|
+
id: 'fabric.editor.ai.config.item.improveFormatting.description',
|
|
437
|
+
defaultMessage: 'Improves the formatting and presentation of your content',
|
|
438
|
+
description: 'Description for the Atlassian Intelligence "Improve Formatting" action.'
|
|
429
439
|
}
|
|
430
440
|
});
|
|
@@ -139,5 +139,20 @@ export var aiSuggestionsMessages = defineMessages({
|
|
|
139
139
|
id: 'fabric.editor.ai.suggestions.card.discardButtonLabel.non-final',
|
|
140
140
|
defaultMessage: 'Discard',
|
|
141
141
|
description: 'Label for the discard button on the AI suggestions card'
|
|
142
|
+
},
|
|
143
|
+
cardMoreOptionsButtonLabel: {
|
|
144
|
+
id: 'fabric.editor.ai.suggestions.card.moreOptionsButtonLabel.non-final',
|
|
145
|
+
defaultMessage: 'More options',
|
|
146
|
+
description: 'Label for the overflow actions button on the AI suggestions card'
|
|
147
|
+
},
|
|
148
|
+
cardOnlyShowSuggestionOptionLabel: {
|
|
149
|
+
id: 'fabric.editor.ai.suggestions.card.onlyShowSuggestionOptionLabel.non-final',
|
|
150
|
+
defaultMessage: 'Only show suggestion',
|
|
151
|
+
description: 'Label for the dropdown action to only show the selected suggestion'
|
|
152
|
+
},
|
|
153
|
+
cardCompareWithOriginalOptionLabel: {
|
|
154
|
+
id: 'fabric.editor.ai.suggestions.card.compareWithOriginalOptionLabel.non-final',
|
|
155
|
+
defaultMessage: 'Compare with original',
|
|
156
|
+
description: 'Label for the dropdown action to compare suggestion with original content'
|
|
142
157
|
}
|
|
143
158
|
});
|
|
@@ -43,6 +43,8 @@ export var TABLE_ACTION = /*#__PURE__*/function (TABLE_ACTION) {
|
|
|
43
43
|
TABLE_ACTION["TABLE_EDITOR_HEIGHT_INFO"] = "tableEditorHeightInformation";
|
|
44
44
|
TABLE_ACTION["TABLE_RENDERER_HEIGHT_INFO"] = "tableRendererHeightInformation";
|
|
45
45
|
TABLE_ACTION["STICKY_HEADER_METHOD_TOGGLED"] = "stickyHeaderMethodToggled";
|
|
46
|
+
TABLE_ACTION["FIT_TO_CONTENT_AUTO_CONVERTED"] = "fitToContentAutoConverted";
|
|
47
|
+
TABLE_ACTION["FIT_TO_CONTENT_ON_DEMAND"] = "fitToContentOnDemand";
|
|
46
48
|
return TABLE_ACTION;
|
|
47
49
|
}({});
|
|
48
50
|
export var TABLE_BREAKOUT = /*#__PURE__*/function (TABLE_BREAKOUT) {
|
|
@@ -90,6 +90,31 @@ export var helpDialogMessages = defineMessages({
|
|
|
90
90
|
defaultMessage: 'Focus table resize handle',
|
|
91
91
|
description: 'The text is shown as a label for a keyboard shortcut in the editor help dialog that describes how to move focus to the table resize handle for resizing columns.'
|
|
92
92
|
},
|
|
93
|
+
selectDragHandle: {
|
|
94
|
+
id: 'fabric.editor.selectDragHandle',
|
|
95
|
+
defaultMessage: 'Select drag handle',
|
|
96
|
+
description: 'The text is shown as a label for a keyboard shortcut in the editor help dialog that describes how to select and focus the drag handle on the current block.'
|
|
97
|
+
},
|
|
98
|
+
moveSelectionUp: {
|
|
99
|
+
id: 'fabric.editor.moveSelectionUp',
|
|
100
|
+
defaultMessage: 'Move selection up',
|
|
101
|
+
description: 'The text is shown as a label for a keyboard shortcut in the editor help dialog that describes how to move the selected block up in the document.'
|
|
102
|
+
},
|
|
103
|
+
moveSelectionDown: {
|
|
104
|
+
id: 'fabric.editor.moveSelectionDown',
|
|
105
|
+
defaultMessage: 'Move selection down',
|
|
106
|
+
description: 'The text is shown as a label for a keyboard shortcut in the editor help dialog that describes how to move the selected block down in the document.'
|
|
107
|
+
},
|
|
108
|
+
moveSelectionLeft: {
|
|
109
|
+
id: 'fabric.editor.moveSelectionLeft',
|
|
110
|
+
defaultMessage: 'Move selection left',
|
|
111
|
+
description: 'The text is shown as a label for a keyboard shortcut in the editor help dialog that describes how to move the selected block to the left layout column.'
|
|
112
|
+
},
|
|
113
|
+
moveSelectionRight: {
|
|
114
|
+
id: 'fabric.editor.moveSelectionRight',
|
|
115
|
+
defaultMessage: 'Move selection right',
|
|
116
|
+
description: 'The text is shown as a label for a keyboard shortcut in the editor help dialog that describes how to move the selected block to the right layout column.'
|
|
117
|
+
},
|
|
93
118
|
closeHelpDialog: {
|
|
94
119
|
id: 'fabric.editor.closeHelpDialog',
|
|
95
120
|
defaultMessage: 'Close help dialog',
|
|
@@ -295,6 +295,11 @@ export var messages = defineMessages({
|
|
|
295
295
|
defaultMessage: "Distribute columns",
|
|
296
296
|
description: "Distribute widths between selected columns"
|
|
297
297
|
},
|
|
298
|
+
fitToContent: {
|
|
299
|
+
id: 'fabric.editor.fitToContent',
|
|
300
|
+
defaultMessage: "Fit to content",
|
|
301
|
+
description: "Resize table columns to fit their content"
|
|
302
|
+
},
|
|
298
303
|
lockColumnWidths: {
|
|
299
304
|
id: 'fabric.editor.lockColumns',
|
|
300
305
|
defaultMessage: 'Fixed column widths',
|
|
@@ -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 = "112.
|
|
13
|
+
var packageVersion = "112.22.0";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -101,7 +101,7 @@ export var getParentNodeWidth = function getParentNodeWidth(pos, state, containe
|
|
|
101
101
|
|
|
102
102
|
return parentWidth;
|
|
103
103
|
};
|
|
104
|
-
var getNestedParentNode = function getNestedParentNode(tablePos, state) {
|
|
104
|
+
export var getNestedParentNode = function getNestedParentNode(tablePos, state) {
|
|
105
105
|
if (tablePos === undefined) {
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
@@ -14,7 +14,8 @@ import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
16
16
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
17
|
-
import { analyticsEventKey,
|
|
17
|
+
import { analyticsEventKey, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
|
|
18
|
+
import { getBrowserInfo } from '../utils/browser';
|
|
18
19
|
import { ZERO_WIDTH_SPACE } from '../whitespace';
|
|
19
20
|
import { generateUniqueNodeKey } from './generateUniqueNodeKey';
|
|
20
21
|
import { getOrCreateOnVisibleObserver } from './onVisibleObserverFactory';
|
|
@@ -352,7 +353,7 @@ function getPortalChildren(_ref3) {
|
|
|
352
353
|
getPos: nodeViewParams.getPos,
|
|
353
354
|
node: currentNode
|
|
354
355
|
// eslint-disable-next-line react/jsx-props-no-spreading -- Spreading props to pass through dynamic component props
|
|
355
|
-
}, extraComponentProps)),
|
|
356
|
+
}, extraComponentProps)), getBrowserInfo().android ?
|
|
356
357
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
357
358
|
jsx("span", {
|
|
358
359
|
className: "zeroWidthSpaceContainer",
|
|
@@ -47,7 +47,8 @@ export var TableSharedCssClassName = {
|
|
|
47
47
|
TABLE_HEADER_CELL_WRAPPER: tableHeaderSelector,
|
|
48
48
|
TABLE_ROW_CONTROLS_WRAPPER: "".concat(tablePrefixSelector, "-row-controls-wrapper"),
|
|
49
49
|
TABLE_COLUMN_CONTROLS_DECORATIONS: "".concat(tablePrefixSelector, "-column-controls-decoration"),
|
|
50
|
-
TABLE_RESIZER_CONTAINER: "".concat(tablePrefixSelector, "-resizer-container")
|
|
50
|
+
TABLE_RESIZER_CONTAINER: "".concat(tablePrefixSelector, "-resizer-container"),
|
|
51
|
+
TABLE_VIEW_CONTENT_WRAP: 'tableView-content-wrap'
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
/* first block node has 0 top margin */
|
|
@@ -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 = "112.
|
|
24
|
+
var packageVersion = "112.22.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,93 +1,4 @@
|
|
|
1
1
|
import memorizeOne from 'memoize-one';
|
|
2
|
-
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated
|
|
5
|
-
* This file is deprecated and will be removed in the next major release.
|
|
6
|
-
* Please use `getBrowserInfo` function to get the browser info on demand.
|
|
7
|
-
* Static `browser` info is no longer supported.
|
|
8
|
-
*/
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
var result = {
|
|
11
|
-
mac: false,
|
|
12
|
-
windows: false,
|
|
13
|
-
ie: false,
|
|
14
|
-
ie_version: 0,
|
|
15
|
-
gecko: false,
|
|
16
|
-
gecko_version: 0,
|
|
17
|
-
chrome: false,
|
|
18
|
-
chrome_version: 0,
|
|
19
|
-
android: false,
|
|
20
|
-
ios: false,
|
|
21
|
-
webkit: false,
|
|
22
|
-
safari: false,
|
|
23
|
-
safari_version: 0,
|
|
24
|
-
supportsIntersectionObserver: false,
|
|
25
|
-
supportsResizeObserver: false
|
|
26
|
-
};
|
|
27
|
-
if (typeof navigator !== 'undefined') {
|
|
28
|
-
var _userAgentData;
|
|
29
|
-
// Ignored via go/ees005
|
|
30
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
31
|
-
var ieEdge = /(?:Edge|Edg)\/(\d+)/.exec(navigator.userAgent);
|
|
32
|
-
// Ignored via go/ees005
|
|
33
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
34
|
-
var ieUpTo10 = /MSIE \d/.test(navigator.userAgent);
|
|
35
|
-
// Ignored via go/ees005
|
|
36
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
37
|
-
var ie11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
38
|
-
|
|
39
|
-
// Ignored via go/ees005
|
|
40
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
41
|
-
result.mac = /Mac/.test(navigator.platform);
|
|
42
|
-
result.windows =
|
|
43
|
-
// Ignored via go/ees005
|
|
44
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
-
((_userAgentData = navigator.userAgentData) === null || _userAgentData === void 0 ? void 0 : _userAgentData.platform) === 'Windows' ||
|
|
46
|
-
// Ignored via go/ees005
|
|
47
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
48
|
-
/Windows|Win\d+/i.test(navigator.userAgent);
|
|
49
|
-
var ie = result.ie = !!(ieUpTo10 || ie11up || ieEdge);
|
|
50
|
-
result.ie_version = ieUpTo10 ?
|
|
51
|
-
// Ignored via go/ees005
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
-
document.documentMode || 6 : ie11up ? +ie11up[1] : ieEdge ? +ieEdge[1] : null;
|
|
54
|
-
// Ignored via go/ees005
|
|
55
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
56
|
-
result.gecko = !ie && /gecko\/\d/i.test(navigator.userAgent);
|
|
57
|
-
// Ignored via go/ees005
|
|
58
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
59
|
-
result.gecko_version = parseInt((navigator.userAgent.match(/Firefox\/(\d+)/) || [])[1], 10);
|
|
60
|
-
|
|
61
|
-
// Ignored via go/ees005
|
|
62
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
63
|
-
result.chrome = !ie && /Chrome\//.test(navigator.userAgent);
|
|
64
|
-
// Ignored via go/ees005
|
|
65
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
66
|
-
result.chrome_version = parseInt((navigator.userAgent.match(/Chrome\/(\d+)/) || [])[1], 10);
|
|
67
|
-
// Ignored via go/ees005
|
|
68
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
69
|
-
result.android = /Android \d/.test(navigator.userAgent);
|
|
70
|
-
result.ios =
|
|
71
|
-
// Ignored via go/ees005
|
|
72
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
73
|
-
// Ignored via go/ees005
|
|
74
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
75
|
-
!ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
|
|
76
|
-
result.webkit = !ie && !!document.documentElement && 'WebkitAppearance' in document.documentElement.style;
|
|
77
|
-
result.safari = Boolean(navigator.vendor && navigator.vendor.indexOf('Apple') > -1 && navigator.userAgent && navigator.userAgent.indexOf('CriOS') === -1 && navigator.userAgent.indexOf('FxiOS') === -1);
|
|
78
|
-
result.safari_version = parseInt(
|
|
79
|
-
// Ignored via go/ees005
|
|
80
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
81
|
-
(navigator.userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10);
|
|
82
|
-
result.supportsIntersectionObserver = typeof window !== 'undefined' && 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window &&
|
|
83
|
-
// Ignored via go/ees005
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
|
-
'intersectionRatio' in window.IntersectionObserverEntry.prototype;
|
|
86
|
-
result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
90
|
-
export { result as browser };
|
|
91
2
|
var getFirstMatch = function getFirstMatch(regexp, ua) {
|
|
92
3
|
var match = ua.match(regexp);
|
|
93
4
|
return match && match.length > 0 && match[1] || '';
|
|
@@ -159,7 +70,7 @@ export var getBrowserInfo = memorizeOne(function () {
|
|
|
159
70
|
// inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
|
|
160
71
|
// Ignored via go/ees005
|
|
161
72
|
// eslint-disable-next-line require-unicode-regexp
|
|
162
|
-
var
|
|
73
|
+
var ieEdge = /\sedg\//i.test(userAgent);
|
|
163
74
|
// eslint-disable-next-line require-unicode-regexp
|
|
164
75
|
var ieEdge2 = /edg([ea]|ios)/i.test(userAgent);
|
|
165
76
|
// eslint-disable-next-line require-unicode-regexp
|
|
@@ -178,10 +89,10 @@ export var getBrowserInfo = memorizeOne(function () {
|
|
|
178
89
|
/Windows|Win\d+/i.test(userAgent);
|
|
179
90
|
|
|
180
91
|
// used userAgent rather than relying on documentMode
|
|
181
|
-
var
|
|
182
|
-
result.ie =
|
|
92
|
+
var ie = ieEdge || ieEdge2 || internetExplorer;
|
|
93
|
+
result.ie = ie;
|
|
183
94
|
// inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
|
|
184
|
-
result.ie_version =
|
|
95
|
+
result.ie_version = ieEdge ?
|
|
185
96
|
// eslint-disable-next-line require-unicode-regexp
|
|
186
97
|
parseInt(getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, userAgent), 10) :
|
|
187
98
|
// eslint-disable-next-line require-unicode-regexp
|
|
@@ -193,14 +104,14 @@ export var getBrowserInfo = memorizeOne(function () {
|
|
|
193
104
|
|
|
194
105
|
// Ignored via go/ees005
|
|
195
106
|
// eslint-disable-next-line require-unicode-regexp
|
|
196
|
-
result.gecko = !
|
|
107
|
+
result.gecko = !ie && /gecko\/\d/i.test(userAgent);
|
|
197
108
|
// Ignored via go/ees005
|
|
198
109
|
// eslint-disable-next-line require-unicode-regexp
|
|
199
110
|
result.gecko_version = parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10);
|
|
200
111
|
|
|
201
112
|
// Ignored via go/ees005
|
|
202
113
|
// eslint-disable-next-line require-unicode-regexp
|
|
203
|
-
result.chrome = !
|
|
114
|
+
result.chrome = !ie && /Chrome\//.test(userAgent);
|
|
204
115
|
// Ignored via go/ees005
|
|
205
116
|
// eslint-disable-next-line require-unicode-regexp
|
|
206
117
|
result.chrome_version = parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10);
|
|
@@ -210,7 +121,7 @@ export var getBrowserInfo = memorizeOne(function () {
|
|
|
210
121
|
result.ios =
|
|
211
122
|
// Ignored via go/ees005
|
|
212
123
|
// eslint-disable-next-line require-unicode-regexp
|
|
213
|
-
!
|
|
124
|
+
!ie && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
|
|
214
125
|
|
|
215
126
|
// Previously relied on navigator.vendor, now used userAgent
|
|
216
127
|
result.safari = !result.chrome && !result.ie && !result.gecko && !result.android && !userAgent.includes('CriOS') && !userAgent.includes('FxiOS') &&
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -8,14 +8,6 @@ export { shouldAutoLinkifyMatch } from './should-auto-linkify-tld';
|
|
|
8
8
|
export { getAnnotationMarksForPos, canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, hasAnnotationMark, getRangeInlineNodeNames, getRangeAncestorNodeNames, isEmptyTextSelection, isEmptyTextSelectionRenderer } from './annotation';
|
|
9
9
|
export { getExtensionLozengeData } from './macro';
|
|
10
10
|
export {
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* @deprecated
|
|
14
|
-
*
|
|
15
|
-
* Please use `@atlaskit/editor-common/browser` entry-point instead.
|
|
16
|
-
*/
|
|
17
|
-
browser } from './browser';
|
|
18
|
-
export {
|
|
19
11
|
/**
|
|
20
12
|
* @private
|
|
21
13
|
* @deprecated
|