@atlaskit/editor-core 197.2.1 → 197.2.3

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 (85) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/actions/index.js +2 -1
  3. package/dist/cjs/composable-editor/core-editor.js +2 -2
  4. package/dist/cjs/create-editor/ErrorBoundary.js +2 -2
  5. package/dist/cjs/create-editor/ReactEditorView.js +17 -13
  6. package/dist/cjs/create-editor/create-schema.js +2 -2
  7. package/dist/cjs/index.js +2 -2
  8. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -2
  9. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +57 -66
  10. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +1 -18
  11. package/dist/cjs/ui/ContentStyles/index.js +2 -2
  12. package/dist/cjs/ui/ContextPanel/index.js +1 -8
  13. package/dist/cjs/ui/ToolbarFeedback/index.js +2 -2
  14. package/dist/cjs/ui/WithHelpTrigger/index.js +2 -2
  15. package/dist/cjs/utils/document.js +0 -24
  16. package/dist/cjs/utils/findChangedNodesFromTransaction.js +28 -0
  17. package/dist/cjs/utils/outdatedBrowsers.js +30 -0
  18. package/dist/cjs/utils/sanitizeNodes.js +63 -0
  19. package/dist/cjs/utils/validateNodes.js +19 -0
  20. package/dist/cjs/version-wrapper.js +1 -1
  21. package/dist/es2019/actions/index.js +2 -1
  22. package/dist/es2019/composable-editor/core-editor.js +1 -1
  23. package/dist/es2019/create-editor/ErrorBoundary.js +1 -1
  24. package/dist/es2019/create-editor/ReactEditorView.js +5 -1
  25. package/dist/es2019/create-editor/create-schema.js +1 -1
  26. package/dist/es2019/index.js +1 -1
  27. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
  28. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +58 -68
  29. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +1 -18
  30. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  31. package/dist/es2019/ui/ContextPanel/index.js +0 -5
  32. package/dist/es2019/ui/ToolbarFeedback/index.js +1 -1
  33. package/dist/es2019/ui/WithHelpTrigger/index.js +1 -1
  34. package/dist/es2019/utils/document.js +0 -20
  35. package/dist/es2019/utils/findChangedNodesFromTransaction.js +20 -0
  36. package/dist/es2019/utils/outdatedBrowsers.js +24 -0
  37. package/dist/es2019/utils/sanitizeNodes.js +49 -0
  38. package/dist/es2019/utils/validateNodes.js +11 -0
  39. package/dist/es2019/version-wrapper.js +1 -1
  40. package/dist/esm/actions/index.js +2 -1
  41. package/dist/esm/composable-editor/core-editor.js +1 -1
  42. package/dist/esm/create-editor/ErrorBoundary.js +1 -1
  43. package/dist/esm/create-editor/ReactEditorView.js +5 -1
  44. package/dist/esm/create-editor/create-schema.js +1 -1
  45. package/dist/esm/index.js +1 -1
  46. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
  47. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +58 -67
  48. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +1 -18
  49. package/dist/esm/ui/ContentStyles/index.js +1 -1
  50. package/dist/esm/ui/ContextPanel/index.js +0 -5
  51. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  52. package/dist/esm/ui/WithHelpTrigger/index.js +1 -1
  53. package/dist/esm/utils/document.js +0 -22
  54. package/dist/esm/utils/findChangedNodesFromTransaction.js +22 -0
  55. package/dist/esm/utils/outdatedBrowsers.js +24 -0
  56. package/dist/esm/utils/sanitizeNodes.js +56 -0
  57. package/dist/esm/utils/validateNodes.js +13 -0
  58. package/dist/esm/version-wrapper.js +1 -1
  59. package/dist/types/index.d.ts +1 -1
  60. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +0 -1
  61. package/dist/types/ui/ContextPanel/index.d.ts +0 -1
  62. package/dist/types/utils/document.d.ts +0 -5
  63. package/dist/types/utils/findChangedNodesFromTransaction.d.ts +8 -0
  64. package/dist/types/utils/outdatedBrowsers.d.ts +1 -0
  65. package/dist/types/utils/sanitizeNodes.d.ts +8 -0
  66. package/dist/types/utils/validateNodes.d.ts +4 -0
  67. package/dist/types-ts4.5/index.d.ts +1 -1
  68. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +0 -1
  69. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +0 -1
  70. package/dist/types-ts4.5/utils/document.d.ts +0 -5
  71. package/dist/types-ts4.5/utils/findChangedNodesFromTransaction.d.ts +8 -0
  72. package/dist/types-ts4.5/utils/outdatedBrowsers.d.ts +1 -0
  73. package/dist/types-ts4.5/utils/sanitizeNodes.d.ts +8 -0
  74. package/dist/types-ts4.5/utils/validateNodes.d.ts +4 -0
  75. package/package.json +4 -8
  76. package/dist/cjs/ui/ContextPanel/deprecated.js +0 -283
  77. package/dist/cjs/utils/node-width.js +0 -20
  78. package/dist/es2019/ui/ContextPanel/deprecated.js +0 -258
  79. package/dist/es2019/utils/node-width.js +0 -9
  80. package/dist/esm/ui/ContextPanel/deprecated.js +0 -277
  81. package/dist/esm/utils/node-width.js +0 -9
  82. package/dist/types/ui/ContextPanel/deprecated.d.ts +0 -44
  83. package/dist/types/utils/node-width.d.ts +0 -7
  84. package/dist/types-ts4.5/ui/ContextPanel/deprecated.d.ts +0 -44
  85. package/dist/types-ts4.5/utils/node-width.d.ts +0 -7
@@ -14,23 +14,27 @@ import React from 'react';
14
14
  import PropTypes from 'prop-types';
15
15
  import { injectIntl } from 'react-intl-next';
16
16
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, getAnalyticsEventsFromTransaction, PLATFORMS } from '@atlaskit/editor-common/analytics';
17
+ import { browser } from '@atlaskit/editor-common/browser';
17
18
  import { getDocStructure } from '@atlaskit/editor-common/core-utils';
18
19
  import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
19
20
  import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
20
21
  import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
21
22
  import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
22
- import { analyticsEventKey, browser, countNodes as _countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, validateNodes, validNode } from '@atlaskit/editor-common/utils';
23
+ import { countNodes as _countNodes, getResponseEndTime, measureRender, processRawValue, shouldForceTracking } from '@atlaskit/editor-common/utils';
24
+ import { analyticsEventKey, getAnalyticsEventSeverity } from '@atlaskit/editor-common/utils/analytics';
23
25
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
24
26
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
25
27
  import { createDispatch, EventDispatcher } from '../event-dispatcher';
26
28
  import { EditorAPIContext } from '../presets/context';
27
29
  import { getNodesCount } from '../utils/document';
30
+ import { findChangedNodesFromTransaction } from '../utils/findChangedNodesFromTransaction';
28
31
  import { isFullPage } from '../utils/is-full-page';
29
32
  import { RenderTracking } from '../utils/performance/components/RenderTracking';
30
33
  import measurements from '../utils/performance/measure-enum';
31
34
  import { PluginPerformanceObserver } from '../utils/performance/plugin-performance-observer';
32
35
  import { freezeUnsafeTransactionProperties } from '../utils/performance/safer-transactions';
33
36
  import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_ON_CHANGE, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, TransactionTracker } from '../utils/performance/track-transactions';
37
+ import { validateNodes, validNode } from '../utils/validateNodes';
34
38
  import { DEFAULT_SAMPLING_RATE_VALID_TRANSACTIONS, PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD } from './consts';
35
39
  import { createErrorReporter, createPMPlugins, processPluginsList } from './create-editor';
36
40
  import createPluginsList from './create-plugins-list';
@@ -1,5 +1,5 @@
1
- import { sanitizeNodes } from '@atlaskit/adf-schema/schema';
2
1
  import { Schema } from '@atlaskit/editor-prosemirror/model';
2
+ import { sanitizeNodes } from '../utils/sanitizeNodes';
3
3
  import { fixExcludes } from './create-editor';
4
4
  import { sortByOrder } from './sort-by-order';
5
5
  export function createSchema(editorConfig) {
package/dist/esm/index.js CHANGED
@@ -12,7 +12,7 @@ export {
12
12
  * @deprecated
13
13
  * DO NOT USE THIS WILL BE REMOVED SOON. This was intended for internal usage only
14
14
  */
15
- default as ContextPanel } from './ui/ContextPanel';
15
+ ContextPanel } from './ui/ContextPanel';
16
16
  export { EmojiResource } from '@atlaskit/emoji/resource';
17
17
  export { MentionResource } from '@atlaskit/mention/resource';
18
18
  export { TeamMentionResource } from '@atlaskit/mention/team-resource';
@@ -7,9 +7,9 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
+ import { browser } from '@atlaskit/editor-common/browser';
10
11
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
12
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
12
- import { browser } from '@atlaskit/editor-common/utils';
13
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
14
  import { FullPageContentArea } from './FullPageContentArea';
15
15
  import { FullPageToolbar } from './FullPageToolbar';
@@ -9,13 +9,13 @@ import React, { useImperativeHandle, useRef } from 'react';
9
9
  import { jsx, useTheme } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl-next';
11
11
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
12
- import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
13
12
  import { ClickAreaBlock } from '../../Addon';
14
- import ContextPanel from '../../ContextPanel';
13
+ import { ContextPanel } from '../../ContextPanel';
15
14
  import PluginSlot from '../../PluginSlot';
16
- import { contentArea, contentAreaHeightNoToolbar, editorContentAreaStyle, editorContentGutterStyle, positionedOverEditorStyle, ScrollContainer, sidebarArea } from './StyledComponents';
15
+ import { contentArea, contentAreaHeightNoToolbar, editorContentAreaStyle, editorContentGutterStyle, ScrollContainer, sidebarArea } from './StyledComponents';
17
16
  export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
18
17
  var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
18
+ var _contentAreaRef$curre;
19
19
  var theme = useTheme();
20
20
  var fullWidthMode = props.appearance === 'full-width';
21
21
  var scrollContainerRef = useRef(null);
@@ -34,70 +34,61 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
34
34
  }
35
35
  };
36
36
  }, []);
37
- return (
38
- // Cleaned up with: platform_editor_context-panel_simplify_behaviour
39
- jsx(ContextPanelConsumer, null, function (_ref) {
40
- var _contentAreaRef$curre;
41
- var positionedOverEditor = _ref.positionedOverEditor;
42
- return jsx("div", {
43
- css: [
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
45
- contentArea,
46
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
47
- props.isEditorToolbarHidden && contentAreaHeightNoToolbar,
48
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
49
- positionedOverEditor && positionedOverEditorStyle],
50
- "data-testid": CONTENT_AREA_TEST_ID,
51
- ref: containerRef
52
- }, jsx(ScrollContainer
53
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
54
- , {
55
- className: "fabric-editor-popup-scroll-parent",
56
- featureFlags: props.featureFlags,
57
- ref: scrollContainerRef
58
- }, jsx(ClickAreaBlock, {
59
- editorView: props.editorView,
60
- editorDisabled: props.disabled
61
- }, jsx("div", {
62
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
63
- css: editorContentAreaStyle({
64
- fullWidthMode: fullWidthMode,
65
- layoutMaxWidth: theme.layoutMaxWidth
66
- }),
67
- role: "region",
68
- "aria-label": props.intl.formatMessage(messages.editableContentLabel),
69
- ref: contentAreaRef
70
- }, jsx("div", {
71
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
72
- css: editorContentGutterStyle()
73
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
74
- ,
75
- className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
76
- ref: contentAreaRef
77
- }, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, jsx(PluginSlot, {
78
- editorView: props.editorView,
79
- editorActions: props.editorActions,
80
- eventDispatcher: props.eventDispatcher,
81
- providerFactory: props.providerFactory,
82
- appearance: props.appearance,
83
- items: props.contentComponents,
84
- pluginHooks: props.pluginHooks,
85
- contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
86
- popupsMountPoint: props.popupsMountPoint,
87
- popupsBoundariesElement: props.popupsBoundariesElement,
88
- popupsScrollableElement: props.popupsScrollableElement,
89
- disabled: !!props.disabled,
90
- containerElement: scrollContainerRef.current,
91
- dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
92
- wrapperElement: props.wrapperElement
93
- }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
94
- css: sidebarArea
95
- }, props.contextPanel || jsx(ContextPanel, {
96
- editorAPI: props.editorAPI,
97
- visible: false
98
- })));
99
- })
100
- );
37
+ return jsx("div", {
38
+ css: [
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
40
+ contentArea,
41
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
42
+ props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
43
+ "data-testid": CONTENT_AREA_TEST_ID,
44
+ ref: containerRef
45
+ }, jsx(ScrollContainer
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
47
+ , {
48
+ className: "fabric-editor-popup-scroll-parent",
49
+ featureFlags: props.featureFlags,
50
+ ref: scrollContainerRef
51
+ }, jsx(ClickAreaBlock, {
52
+ editorView: props.editorView,
53
+ editorDisabled: props.disabled
54
+ }, jsx("div", {
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
56
+ css: editorContentAreaStyle({
57
+ fullWidthMode: fullWidthMode,
58
+ layoutMaxWidth: theme.layoutMaxWidth
59
+ }),
60
+ role: "region",
61
+ "aria-label": props.intl.formatMessage(messages.editableContentLabel),
62
+ ref: contentAreaRef
63
+ }, jsx("div", {
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
65
+ css: editorContentGutterStyle()
66
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
67
+ ,
68
+ className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
69
+ ref: contentAreaRef
70
+ }, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, jsx(PluginSlot, {
71
+ editorView: props.editorView,
72
+ editorActions: props.editorActions,
73
+ eventDispatcher: props.eventDispatcher,
74
+ providerFactory: props.providerFactory,
75
+ appearance: props.appearance,
76
+ items: props.contentComponents,
77
+ pluginHooks: props.pluginHooks,
78
+ contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
79
+ popupsMountPoint: props.popupsMountPoint,
80
+ popupsBoundariesElement: props.popupsBoundariesElement,
81
+ popupsScrollableElement: props.popupsScrollableElement,
82
+ disabled: !!props.disabled,
83
+ containerElement: scrollContainerRef.current,
84
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
85
+ wrapperElement: props.wrapperElement
86
+ }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
87
+ css: sidebarArea
88
+ }, props.contextPanel || jsx(ContextPanel, {
89
+ editorAPI: props.editorAPI,
90
+ visible: false
91
+ })));
101
92
  });
102
93
  export var FullPageContentArea = injectIntl(Content, {
103
94
  forwardRef: true
@@ -5,7 +5,7 @@ import { css } from '@emotion/react';
5
5
  import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
6
6
  import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
7
7
  import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
8
- import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akLayoutGutterOffset, FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
8
+ import { akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akLayoutGutterOffset, FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
9
9
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import { createEditorContentStyle } from '../../ContentStyles';
@@ -40,23 +40,6 @@ scrollbarStyles);
40
40
  export var ScrollContainer = createEditorContentStyle(scrollStyles);
41
41
  ScrollContainer.displayName = 'ScrollContainer';
42
42
 
43
- // transition used to match scrollbar with config panel opening animation
44
- // only use animation when opening as there is a bug with floating toolbars.
45
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
46
- export var positionedOverEditorStyle = css({
47
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
48
- paddingRight: "".concat(akEditorContextPanelWidth, "px"),
49
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
- transition: "padding 500ms ".concat(akEditorSwoopCubicBezier),
51
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
52
- '.fabric-editor-popup-scroll-parent': {
53
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
54
- paddingLeft: "".concat(akEditorContextPanelWidth, "px"),
55
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
56
- transition: "padding 500ms ".concat(akEditorSwoopCubicBezier)
57
- }
58
- });
59
-
60
43
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
61
44
  export var contentArea = function contentArea() {
62
45
  var editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
@@ -13,13 +13,13 @@ import React, { useMemo } from 'react';
13
13
 
14
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
15
  import { css, jsx, useTheme } from '@emotion/react';
16
+ import { browser } from '@atlaskit/editor-common/browser';
16
17
  import { telepointerStyle } from '@atlaskit/editor-common/collab';
17
18
  import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
18
19
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
19
20
  import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
20
21
  import { gapCursorStyles } from '@atlaskit/editor-common/selection';
21
22
  import { annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, MediaSharedClassNames, paragraphSharedStyles, resizerStyles, ruleSharedStyles, shadowSharedStyle, SmartCardSharedCssClassName, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
22
- import { browser } from '@atlaskit/editor-common/utils';
23
23
  import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
24
24
  import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
25
25
  import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
@@ -22,9 +22,7 @@ import Transition from 'react-transition-group/Transition';
22
22
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
23
23
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
24
24
  import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
25
- import { fg } from '@atlaskit/platform-feature-flags';
26
25
  import { N30 } from '@atlaskit/theme/colors';
27
- import ContextPanelDeprecated from './deprecated';
28
26
  var ANIM_SPEED_MS = 500;
29
27
  var panelHidden = css({
30
28
  width: 0
@@ -163,7 +161,4 @@ export function ContextPanel(props) {
163
161
  editorAPI: props.editorAPI,
164
162
  pluginContent: firstContent
165
163
  }));
166
- }
167
- export default function ContextPanelDefault(props) {
168
- return fg('platform_editor_context-panel_simplify_behaviour') ? jsx(ContextPanel, props) : jsx(ContextPanelDeprecated, props);
169
164
  }
@@ -27,7 +27,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
27
27
  import { Popup } from '@atlaskit/editor-common/ui';
28
28
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
29
29
  import { withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
30
- import { analyticsEventKey } from '@atlaskit/editor-common/utils';
30
+ import { analyticsEventKey } from '@atlaskit/editor-common/utils/analytics';
31
31
  import Spinner from '@atlaskit/spinner';
32
32
  import { createDispatch } from '../../event-dispatcher';
33
33
  import { usePresetContext } from '../../presets/context';
@@ -10,7 +10,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  import React from 'react';
11
11
  import PropTypes from 'prop-types';
12
12
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
13
- import { analyticsEventKey } from '@atlaskit/editor-common/utils';
13
+ import { analyticsEventKey } from '@atlaskit/editor-common/utils/analytics';
14
14
  import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugins/help-dialog';
15
15
  import { createDispatch } from '../../event-dispatcher';
16
16
  var WithHelpTrigger = /*#__PURE__*/function (_React$Component) {
@@ -1,7 +1,5 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
1
  import { processRawValue } from '@atlaskit/editor-common/utils';
3
2
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
- import { getBreakoutMode } from './node-width';
5
3
  export function processRawFragmentValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
6
4
  if (!value) {
7
5
  return;
@@ -22,24 +20,4 @@ export function getNodesCount(node) {
22
20
  count[node.type.name] = (count[node.type.name] || 0) + 1;
23
21
  });
24
22
  return count;
25
- }
26
-
27
- /**
28
- * Returns a set of active child breakout modes
29
- */
30
- export function getChildBreakoutModes(doc, schema) {
31
- var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['wide', 'full-width'];
32
- var breakoutModes = new Set();
33
- if (doc.type.name === 'doc' && doc.childCount) {
34
- for (var i = 0; i < doc.childCount; ++i) {
35
- if (breakoutModes.size === filter.length) {
36
- break;
37
- }
38
- var breakoutMode = getBreakoutMode(doc.child(i), schema.marks.breakout);
39
- if (breakoutMode && filter.includes(breakoutMode)) {
40
- breakoutModes.add(breakoutMode);
41
- }
42
- }
43
- }
44
- return _toConsumableArray(breakoutModes);
45
23
  }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Finds all top level nodes affected by the transaction
3
+ * Uses from/to positions in transaction's steps to work out which nodes will
4
+ * be changed by the transaction
5
+ */
6
+ export var findChangedNodesFromTransaction = function findChangedNodesFromTransaction(tr) {
7
+ var nodes = [];
8
+ var steps = tr.steps || [];
9
+ steps.forEach(function (step) {
10
+ step.getMap().forEach(function (oldStart, oldEnd, newStart, newEnd) {
11
+ tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), function (node) {
12
+ if (!nodes.find(function (n) {
13
+ return n === node;
14
+ })) {
15
+ nodes.push(node);
16
+ }
17
+ return false;
18
+ });
19
+ });
20
+ });
21
+ return nodes;
22
+ };
@@ -0,0 +1,24 @@
1
+ export var isOutdatedBrowser = function isOutdatedBrowser(userAgent) {
2
+ // Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
3
+ var chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
4
+ var chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
5
+ if (chromeVersion >= 84) {
6
+ return false;
7
+ }
8
+ var gecko = /gecko\/\d/i.test(userAgent);
9
+ var geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
10
+ if (geckoVersion >= 84) {
11
+ return false;
12
+ }
13
+ var edge = /Edge\/(\d+)/.exec(userAgent);
14
+ var edgeVersion = edge ? +edge[1] : 0;
15
+ if (edgeVersion >= 84) {
16
+ return false;
17
+ }
18
+ var safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
19
+ var safariVersion = safari ? parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
20
+ if (safariVersion >= 12) {
21
+ return false;
22
+ }
23
+ return true;
24
+ };
@@ -0,0 +1,56 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ 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; }
3
+ 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) { _defineProperty(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; }
4
+ export function sanitizeNodes(nodes, supportedMarks) {
5
+ var nodeNames = Object.keys(nodes);
6
+ nodeNames.forEach(function (nodeKey) {
7
+ var nodeSpec = _objectSpread({}, nodes[nodeKey]);
8
+ if (nodeSpec.marks && nodeSpec.marks !== '_') {
9
+ nodeSpec.marks = nodeSpec.marks.split(' ').filter(function (mark) {
10
+ return !!supportedMarks[mark];
11
+ }).join(' ');
12
+ }
13
+ if (nodeSpec.content) {
14
+ nodeSpec.content = sanitizeNodeSpecContent(nodes, nodeSpec.content);
15
+ }
16
+ nodes[nodeKey] = nodeSpec;
17
+ });
18
+ return nodes;
19
+ }
20
+ function sanitizeNodeSpecContent(nodes, rawContent) {
21
+ var content = rawContent.replace(/\W/g, ' ');
22
+ var contentKeys = content.split(' ');
23
+ var unsupportedContentKeys = contentKeys.filter(function (contentKey) {
24
+ return !isContentSupported(nodes, contentKey);
25
+ });
26
+ return unsupportedContentKeys.reduce(function (newContent, nodeName) {
27
+ return sanitizedContent(newContent, nodeName);
28
+ }, rawContent);
29
+ }
30
+ function sanitizedContent(content, invalidContent) {
31
+ if (!invalidContent.length) {
32
+ return content || '';
33
+ }
34
+ if (!content || !content.match(/\w/)) {
35
+ return '';
36
+ }
37
+ var pattern = "(".concat(invalidContent, "((\\s)*\\|)+)|((\\|(\\s)*)+").concat(invalidContent, ")|(").concat(invalidContent, "$)|(").concat(invalidContent, "(\\+|\\*))");
38
+ return content.replace(new RegExp(pattern, 'g'), '').replace(' ', ' ').trim();
39
+ }
40
+ function isContentSupported(nodes, contentKey) {
41
+ var nodeKeys = Object.keys(nodes);
42
+
43
+ // content is with valid node
44
+ if (nodeKeys.indexOf(contentKey) > -1) {
45
+ return true;
46
+ }
47
+
48
+ // content is with valid group
49
+ for (var supportedKey in nodes) {
50
+ var nodeSpec = nodes[supportedKey];
51
+ if (nodeSpec && nodeSpec.group === contentKey) {
52
+ return true;
53
+ }
54
+ }
55
+ return false;
56
+ }
@@ -0,0 +1,13 @@
1
+ export var validNode = function validNode(node) {
2
+ try {
3
+ node.check(); // this will throw an error if the node is invalid
4
+ } catch (error) {
5
+ return false;
6
+ }
7
+ return true;
8
+ };
9
+
10
+ /** Validates prosemirror nodes, and returns true only if all nodes are valid */
11
+ export var validateNodes = function validateNodes(nodes) {
12
+ return nodes.every(validNode);
13
+ };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "197.2.1";
2
+ export var version = "197.2.3";
@@ -11,7 +11,7 @@ export {
11
11
  * @deprecated
12
12
  * DO NOT USE THIS WILL BE REMOVED SOON. This was intended for internal usage only
13
13
  */
14
- default as ContextPanel, } from './ui/ContextPanel';
14
+ ContextPanel, } from './ui/ContextPanel';
15
15
  export { EmojiResource } from '@atlaskit/emoji/resource';
16
16
  export { MentionResource } from '@atlaskit/mention/resource';
17
17
  export type { MentionProvider, PresenceProvider } from '@atlaskit/mention/resource';
@@ -11,7 +11,6 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
11
11
  featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
12
12
  viewMode?: "view" | "edit" | undefined;
13
13
  } | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLDivElement>>;
14
- export declare const positionedOverEditorStyle: import("@emotion/react").SerializedStyles;
15
14
  export declare const contentArea: () => import("@emotion/react").SerializedStyles;
16
15
  export declare const contentAreaHeightNoToolbar: import("@emotion/react").SerializedStyles;
17
16
  export declare const sidebarArea: import("@emotion/react").SerializedStyles;
@@ -36,5 +36,4 @@ export declare class SwappableContentArea extends React.PureComponent<SwappableC
36
36
  render(): jsx.JSX.Element;
37
37
  }
38
38
  export declare function ContextPanel(props: Props): jsx.JSX.Element;
39
- export default function ContextPanelDefault(props: Props): jsx.JSX.Element;
40
39
  export {};
@@ -1,4 +1,3 @@
1
- import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
2
1
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
3
  import type { ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
@@ -6,7 +5,3 @@ import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
6
5
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
7
6
  export declare function processRawFragmentValue(schema: Schema, value?: ReplaceRawValue[], providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Fragment | undefined;
8
7
  export declare function getNodesCount(node: Node): Record<string, number>;
9
- /**
10
- * Returns a set of active child breakout modes
11
- */
12
- export declare function getChildBreakoutModes(doc: Node, schema: Schema, filter?: BreakoutMarkAttrs['mode'][]): BreakoutMarkAttrs['mode'][];
@@ -0,0 +1,8 @@
1
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
+ /**
4
+ * Finds all top level nodes affected by the transaction
5
+ * Uses from/to positions in transaction's steps to work out which nodes will
6
+ * be changed by the transaction
7
+ */
8
+ export declare const findChangedNodesFromTransaction: (tr: Transaction) => PMNode[];
@@ -0,0 +1 @@
1
+ export declare const isOutdatedBrowser: (userAgent: string) => boolean;
@@ -0,0 +1,8 @@
1
+ import type { MarkSpec, NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ export declare function sanitizeNodes(nodes: {
3
+ [key: string]: NodeSpec;
4
+ }, supportedMarks: {
5
+ [key: string]: MarkSpec;
6
+ }): {
7
+ [key: string]: NodeSpec;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ export declare const validNode: (node: PMNode) => boolean;
3
+ /** Validates prosemirror nodes, and returns true only if all nodes are valid */
4
+ export declare const validateNodes: (nodes: PMNode[]) => boolean;
@@ -11,7 +11,7 @@ export {
11
11
  * @deprecated
12
12
  * DO NOT USE THIS WILL BE REMOVED SOON. This was intended for internal usage only
13
13
  */
14
- default as ContextPanel, } from './ui/ContextPanel';
14
+ ContextPanel, } from './ui/ContextPanel';
15
15
  export { EmojiResource } from '@atlaskit/emoji/resource';
16
16
  export { MentionResource } from '@atlaskit/mention/resource';
17
17
  export type { MentionProvider, PresenceProvider } from '@atlaskit/mention/resource';
@@ -11,7 +11,6 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
11
11
  featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
12
12
  viewMode?: "view" | "edit" | undefined;
13
13
  } | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLDivElement>>;
14
- export declare const positionedOverEditorStyle: import("@emotion/react").SerializedStyles;
15
14
  export declare const contentArea: () => import("@emotion/react").SerializedStyles;
16
15
  export declare const contentAreaHeightNoToolbar: import("@emotion/react").SerializedStyles;
17
16
  export declare const sidebarArea: import("@emotion/react").SerializedStyles;
@@ -38,5 +38,4 @@ export declare class SwappableContentArea extends React.PureComponent<SwappableC
38
38
  render(): jsx.JSX.Element;
39
39
  }
40
40
  export declare function ContextPanel(props: Props): jsx.JSX.Element;
41
- export default function ContextPanelDefault(props: Props): jsx.JSX.Element;
42
41
  export {};
@@ -1,4 +1,3 @@
1
- import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
2
1
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
3
  import type { ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
@@ -6,7 +5,3 @@ import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
6
5
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
7
6
  export declare function processRawFragmentValue(schema: Schema, value?: ReplaceRawValue[], providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Fragment | undefined;
8
7
  export declare function getNodesCount(node: Node): Record<string, number>;
9
- /**
10
- * Returns a set of active child breakout modes
11
- */
12
- export declare function getChildBreakoutModes(doc: Node, schema: Schema, filter?: BreakoutMarkAttrs['mode'][]): BreakoutMarkAttrs['mode'][];
@@ -0,0 +1,8 @@
1
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
+ /**
4
+ * Finds all top level nodes affected by the transaction
5
+ * Uses from/to positions in transaction's steps to work out which nodes will
6
+ * be changed by the transaction
7
+ */
8
+ export declare const findChangedNodesFromTransaction: (tr: Transaction) => PMNode[];
@@ -0,0 +1 @@
1
+ export declare const isOutdatedBrowser: (userAgent: string) => boolean;