@atlaskit/editor-common 120.6.2 → 120.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +2 -2
- package/dist/cjs/guideline/getContainerWidthOrFullEditorWidth.js +2 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/link/utils.js +3 -3
- package/dist/cjs/media-inline/media-inline-image-card.js +2 -2
- package/dist/cjs/media-single/calcMediaSingleMaxWidth.js +2 -2
- package/dist/cjs/messages/syncBlock.js +10 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-anchor/node-anchor-provider.js +28 -6
- package/dist/cjs/preset/core-plugin/requestDocument.js +2 -2
- package/dist/cjs/resizer/BreakoutResizer.js +6 -6
- package/dist/cjs/resizer/Resizer.js +2 -2
- package/dist/cjs/resizer/useBreakoutGuidelines.js +5 -5
- package/dist/cjs/selection/getFragmentsFromSelection.js +2 -2
- package/dist/cjs/ui/Caption/index.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +2 -2
- package/dist/cjs/ui/TableSelector/index.js +3 -3
- package/dist/cjs/ui/TableSelector/table-selector.js +2 -2
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -1
- package/dist/cjs/ui/UnsupportedInline/index.js +1 -1
- package/dist/cjs/ui-color/ColorPalette/index.js +1 -1
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +2 -2
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -2
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +6 -6
- package/dist/cjs/utils/commands.js +3 -3
- package/dist/cjs/utils/nodes.js +2 -2
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +1 -1
- package/dist/es2019/guideline/getContainerWidthOrFullEditorWidth.js +1 -1
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/es2019/link/utils.js +1 -1
- package/dist/es2019/media-inline/media-inline-image-card.js +1 -1
- package/dist/es2019/media-single/calcMediaSingleMaxWidth.js +1 -1
- package/dist/es2019/messages/syncBlock.js +10 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-anchor/node-anchor-provider.js +31 -6
- package/dist/es2019/preset/core-plugin/requestDocument.js +1 -1
- package/dist/es2019/resizer/BreakoutResizer.js +1 -1
- package/dist/es2019/resizer/Resizer.js +1 -1
- package/dist/es2019/resizer/useBreakoutGuidelines.js +1 -1
- package/dist/es2019/selection/getFragmentsFromSelection.js +1 -1
- package/dist/es2019/ui/Caption/index.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Popup/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +1 -1
- package/dist/es2019/ui/TableSelector/table-selector.js +1 -1
- package/dist/es2019/ui/UnsupportedBlock/index.js +1 -1
- package/dist/es2019/ui/UnsupportedInline/index.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/index.js +1 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -1
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +1 -1
- package/dist/es2019/utils/commands.js +1 -1
- package/dist/es2019/utils/nodes.js +1 -1
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +1 -1
- package/dist/esm/guideline/getContainerWidthOrFullEditorWidth.js +1 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/esm/link/utils.js +1 -1
- package/dist/esm/media-inline/media-inline-image-card.js +1 -1
- package/dist/esm/media-single/calcMediaSingleMaxWidth.js +1 -1
- package/dist/esm/messages/syncBlock.js +10 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-anchor/node-anchor-provider.js +29 -6
- package/dist/esm/preset/core-plugin/requestDocument.js +1 -1
- package/dist/esm/resizer/BreakoutResizer.js +1 -1
- package/dist/esm/resizer/Resizer.js +1 -1
- package/dist/esm/resizer/useBreakoutGuidelines.js +1 -1
- package/dist/esm/selection/getFragmentsFromSelection.js +1 -1
- package/dist/esm/ui/Caption/index.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +1 -1
- package/dist/esm/ui/TableSelector/table-selector.js +1 -1
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -1
- package/dist/esm/ui/UnsupportedInline/index.js +1 -1
- package/dist/esm/ui-color/ColorPalette/index.js +1 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +1 -1
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +1 -1
- package/dist/esm/utils/commands.js +1 -1
- package/dist/esm/utils/nodes.js +1 -1
- package/dist/types/messages/syncBlock.d.ts +10 -0
- package/package.json +6 -3
|
@@ -44,7 +44,7 @@ Object.defineProperty(exports, "insertNewLine", {
|
|
|
44
44
|
});
|
|
45
45
|
exports.walkPrevNode = exports.walkNextNode = exports.isEmptySelectionAtStart = exports.isEmptySelectionAtEnd = exports.insertNewLineWithAnalytics = void 0;
|
|
46
46
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
47
|
-
var
|
|
47
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
48
48
|
var _analytics = require("../analytics");
|
|
49
49
|
var _editorAnalytics = require("../editor-analytics");
|
|
50
50
|
var _selection = require("../selection");
|
|
@@ -192,7 +192,7 @@ function canMoveUp(state) {
|
|
|
192
192
|
if (selection instanceof _state.NodeSelection && (0, _isMediaNode.isMediaNode)(selection.node)) {
|
|
193
193
|
return true;
|
|
194
194
|
}
|
|
195
|
-
if (selection instanceof _state.TextSelection && !(0,
|
|
195
|
+
if (selection instanceof _state.TextSelection && !(0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
|
|
196
196
|
if (!selection.empty) {
|
|
197
197
|
return true;
|
|
198
198
|
}
|
|
@@ -208,7 +208,7 @@ function canMoveDown(state) {
|
|
|
208
208
|
if (selection instanceof _state.NodeSelection && (0, _isMediaNode.isMediaNode)(selection.node)) {
|
|
209
209
|
return true;
|
|
210
210
|
}
|
|
211
|
-
if (selection instanceof _state.TextSelection && !(0,
|
|
211
|
+
if (selection instanceof _state.TextSelection && !(0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
|
|
212
212
|
if (!selection.empty) {
|
|
213
213
|
return true;
|
|
214
214
|
}
|
package/dist/cjs/utils/nodes.js
CHANGED
|
@@ -45,7 +45,7 @@ Object.defineProperty(exports, "validNode", {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
exports.validateNodes = void 0;
|
|
48
|
-
var
|
|
48
|
+
var _JSONTransformer = require("@atlaskit/editor-json-transformer/JSONTransformer-2");
|
|
49
49
|
var _SelectedState = require("./SelectedState");
|
|
50
50
|
var _validNode = require("./validNode");
|
|
51
51
|
var _findChangedNodesFromTransaction = require("./findChangedNodesFromTransaction");
|
|
@@ -102,7 +102,7 @@ var isNodeSelectedOrInRange = exports.isNodeSelectedOrInRange = function isNodeS
|
|
|
102
102
|
}
|
|
103
103
|
return null;
|
|
104
104
|
};
|
|
105
|
-
var transformer = new
|
|
105
|
+
var transformer = new _JSONTransformer.JSONTransformer();
|
|
106
106
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
107
107
|
function toJSON(node) {
|
|
108
108
|
return transformer.encode(node);
|
|
@@ -10,7 +10,7 @@ import classnames from 'classnames';
|
|
|
10
10
|
import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
14
|
import { useSharedPluginStateWithSelector } from '../../../hooks';
|
|
15
15
|
import { createWidthContext, WidthContext } from '../../../ui';
|
|
16
16
|
import ExtensionLozenge from '../Lozenge';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Calculates container or full editor width taking in account editor full width layout
|
|
@@ -840,7 +840,7 @@ function limit(items) {
|
|
|
840
840
|
return items.slice(0, RECENT_SEARCH_LIST_SIZE);
|
|
841
841
|
}
|
|
842
842
|
|
|
843
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
843
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types, @atlaskit/volt-strict-mode/no-multiple-exports
|
|
844
844
|
export const HyperlinkLinkAddToolbarWithIntl = injectIntl(HyperlinkLinkAddToolbar);
|
|
845
845
|
const _default_1 = withAnalyticsEvents()(HyperlinkLinkAddToolbarWithIntl);
|
|
846
846
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUrlForDomainInContext } from '@atlaskit/atlassian-context/get-url-for-domain-in-context';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
3
|
import { linkPreferencesPath } from './constants';
|
|
4
4
|
const STAGING = 'staging';
|
|
5
5
|
const PRODUCTION = 'prod';
|
|
@@ -14,7 +14,7 @@ import { FileFetcherError } from '@atlaskit/media-client';
|
|
|
14
14
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
15
15
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import { messages } from '../messages/media-inline-card';
|
|
19
19
|
import { referenceHeights } from './constants';
|
|
20
20
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
3
|
/**
|
|
4
4
|
* Calculate maximum width allowed for media single node in fix-width editor in new experience
|
|
5
5
|
* @param containerWidth width of editor container
|
|
@@ -95,6 +95,16 @@ export const syncBlockMessages = defineMessages({
|
|
|
95
95
|
defaultMessage: 'Synced from: {title}',
|
|
96
96
|
description: 'Tooltip that shows the source page title of the synced block'
|
|
97
97
|
},
|
|
98
|
+
unpublishedLocalReferenceAvailabilityTooltip: {
|
|
99
|
+
id: 'editor-common.messages.syncBlock.unpublishedLocalReferenceAvailabilityTooltip',
|
|
100
|
+
defaultMessage: '{sourceType, select, page {Publish the page to make the source synced block content available in other locations.} blog {Publish the blog to make the source synced block content available in other locations.} jiraWorkItem {Publish the work item to make the source synced block content available in other locations.} other {Publish to make the source synced block content available in other locations.}}',
|
|
101
|
+
description: 'Tooltip explaining that a local unpublished reference is only available in its source document. sourceType selects page, blog, or Jira work item copy.'
|
|
102
|
+
},
|
|
103
|
+
unpublishedSourceAvailabilityTooltip: {
|
|
104
|
+
id: 'editor-common.messages.syncBlock.unpublishedSourceAvailabilityTooltip',
|
|
105
|
+
defaultMessage: '{sourceType, select, page {Publish the page to make the content available in other locations.} blog {Publish the blog to make the content available in other locations.} jiraWorkItem {Publish the work item to make the content available in other locations.} other {Publish to make the content available in other locations.}}',
|
|
106
|
+
description: 'Tooltip explaining that an unpublished source synced block is only available in its source document. sourceType selects page, blog, or Jira work item copy.'
|
|
107
|
+
},
|
|
98
108
|
referenceSyncBlockLastEdited: {
|
|
99
109
|
id: 'fabric.editor.referenceSyncBlockLastEdited',
|
|
100
110
|
defaultMessage: 'Last edited:',
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "120.
|
|
17
|
+
const packageVersion = "120.7.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
3
|
import { isEmptyDocument } from '../utils';
|
|
3
4
|
import { DynamicBitArray } from './dynamic-bit-array';
|
|
4
5
|
import { shouldEnableLimitedModeForDocument } from './should-enable-limited-mode';
|
|
6
|
+
|
|
7
|
+
// The slice of `@atlaskit/editor-plugin-limited-mode`'s state read below. Declared
|
|
8
|
+
// structurally because `editor-common` must not depend on a plugin package.
|
|
9
|
+
|
|
10
|
+
// The real key stays in `@atlaskit/editor-plugin-limited-mode`; importing it would make
|
|
11
|
+
// `editor-common` depend on a plugin package, so match the state property by name.
|
|
12
|
+
// `'limitedModePlugin$'` is what ProseMirror derives for `new PluginKey('limitedModePlugin')`,
|
|
13
|
+
// and editor-plugin-limited-mode-tests asserts that literal to catch it shifting to `$1`.
|
|
14
|
+
// Please, do not copy or use this kind of code below
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
const limitedModePluginKey = {
|
|
17
|
+
key: 'limitedModePlugin$',
|
|
18
|
+
getState: state => {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
return state['limitedModePlugin$'];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
5
23
|
export class NodeAnchorProvider {
|
|
6
24
|
constructor(limitedMode = false, emptyDoc = false) {
|
|
7
25
|
_defineProperty(this, "cache", new WeakMap());
|
|
@@ -57,6 +75,9 @@ export class NodeAnchorProvider {
|
|
|
57
75
|
// After set to limited mode, we clear the cache to free up memory
|
|
58
76
|
// and prevent further ids from being generated
|
|
59
77
|
// Once in limited mode, we won't exit it
|
|
78
|
+
//
|
|
79
|
+
// One-way by design, so this can stay latched on after the plugin flips back to
|
|
80
|
+
// off: recovering would mean re-rendering every nodeview to restore its anchor.
|
|
60
81
|
setLimitedMode() {
|
|
61
82
|
this.limitedMode = true;
|
|
62
83
|
this.cache = new WeakMap();
|
|
@@ -67,19 +88,23 @@ export class NodeAnchorProvider {
|
|
|
67
88
|
const nodeIdProviderMap = new WeakMap();
|
|
68
89
|
|
|
69
90
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
91
|
+
* Reads the limited-mode plugin's state and nothing else, so a preset without the plugin no longer
|
|
92
|
+
* gets anchor suppression (and with it, no drag handles). No plugin means limited mode is off.
|
|
93
|
+
*
|
|
94
|
+
* Read off the state rather than the plugin injection API because plugin `state.init` is the only
|
|
95
|
+
* thing that has run by the time the `EditorView` constructor builds its first nodeview and calls
|
|
96
|
+
* `getNodeIdProvider`. Plugin views and `usePluginHook` both run later.
|
|
73
97
|
*/
|
|
74
|
-
const isLimitedModeEnabled = editorView =>
|
|
98
|
+
const isLimitedModeEnabled = editorView => {
|
|
99
|
+
var _limitedModePluginKey, _limitedModePluginKey2;
|
|
100
|
+
return fg('platform_editor_fix_limited_mode_leaking') ? (_limitedModePluginKey = (_limitedModePluginKey2 = limitedModePluginKey.getState(editorView.state)) === null || _limitedModePluginKey2 === void 0 ? void 0 : _limitedModePluginKey2.documentSizeBreachesThreshold) !== null && _limitedModePluginKey !== void 0 ? _limitedModePluginKey : false : shouldEnableLimitedModeForDocument(editorView.state.doc);
|
|
101
|
+
};
|
|
75
102
|
|
|
76
103
|
// Get the NodeIdProvider for a specific EditorView instance.
|
|
77
104
|
// This allows access to the node ids anywhere.
|
|
78
105
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
79
106
|
export const getNodeIdProvider = editorView => {
|
|
80
107
|
if (!nodeIdProviderMap.has(editorView)) {
|
|
81
|
-
// if the limited mode flag is on, enable limited mode based on the threshold
|
|
82
|
-
// only for the first time
|
|
83
108
|
const limitedMode = isLimitedModeEnabled(editorView);
|
|
84
109
|
const isEmptyDoc = isEmptyDocument(editorView.state.doc);
|
|
85
110
|
const provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
1
|
+
import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
|
|
2
2
|
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
|
|
4
4
|
const transformer = new JSONTransformer();
|
|
@@ -2,7 +2,7 @@ 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 { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
7
7
|
import { LAYOUT_SECTION_MARGIN } from '../styles';
|
|
8
8
|
import { getBrowserInfo } from '../utils/browser';
|
|
@@ -8,7 +8,7 @@ import { useIntl } from 'react-intl';
|
|
|
8
8
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
10
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
11
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
12
12
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
13
13
|
import { messages } from '../messages/breakout';
|
|
14
14
|
import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
4
4
|
export const SNAP_GAP = 8;
|
|
5
5
|
const GUIDELINE_KEYS = {
|
|
6
6
|
lineLength: 'grid',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toJSON as unsanitizedNodeToJSON } from '@atlaskit/editor-json-transformer/toJSON';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
3
|
import { nodeToJSON } from '../utils/nodes';
|
|
4
4
|
import { getSliceFromSelection } from './context-helpers';
|
|
@@ -51,7 +51,7 @@ export class CaptionComponent extends React.Component {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
55
55
|
const _default_1 = injectIntl(CaptionComponent);
|
|
56
56
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
57
57
|
export default _default_1;
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "120.
|
|
17
|
+
const packageVersion = "120.7.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -6,7 +6,7 @@ import rafSchedule from 'raf-schd';
|
|
|
6
6
|
import { createPortal, flushSync } from 'react-dom';
|
|
7
7
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
10
|
import { calculatePlacement, calculatePosition, findOverflowScrollParent } from './utils';
|
|
11
11
|
import { validatePosition } from './validatePosition';
|
|
12
12
|
// Ignored via go/ees005
|
|
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
10
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
13
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
14
14
|
import Popup from '../Popup';
|
|
15
15
|
import tableSelectorPopup, { TABLE_SELECTOR_BUTTON_GAP, TABLE_SELECTOR_BUTTON_SIZE } from './table-selector';
|
|
@@ -7,7 +7,7 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl';
|
|
9
9
|
import { Stack } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
11
|
import { toolbarInsertBlockMessages as messages } from '../../messages';
|
|
12
12
|
import { OutsideClickTargetRefContext } from '../../ui-react';
|
|
13
13
|
export const TABLE_SELECTOR_BUTTON_GAP = 2;
|
|
@@ -60,6 +60,6 @@ const UnsupportedInlineNode = ({
|
|
|
60
60
|
}))));
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
64
64
|
const _default_1 = injectIntl(UnsupportedInlineNode);
|
|
65
65
|
export default _default_1;
|
|
@@ -99,6 +99,6 @@ const ColorPalette = props => {
|
|
|
99
99
|
}))));
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
103
103
|
const _default_1 = injectIntl(ColorPalette);
|
|
104
104
|
export default _default_1;
|
|
@@ -14,7 +14,7 @@ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
15
15
|
import { Box, xcss, Inline } from '@atlaskit/primitives';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
19
19
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
20
20
|
import { colorPickerButtonMessages } from '../../messages/color-picker-button';
|
|
@@ -15,7 +15,7 @@ import CustomItem from '@atlaskit/menu/custom-item';
|
|
|
15
15
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
16
16
|
import Section from '@atlaskit/menu/section';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
19
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
20
20
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
21
21
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
4
4
|
import { OutsideClickTargetRefContext } from './OutsideClickTargetRefContext';
|
|
5
5
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
2
2
|
|
|
3
3
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics';
|
|
6
6
|
import { withAnalytics } from '../editor-analytics';
|
|
7
7
|
import { GapCursorSelection } from '../selection';
|
|
@@ -10,7 +10,7 @@ import classnames from 'classnames';
|
|
|
10
10
|
import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
14
|
import { useSharedPluginStateWithSelector } from '../../../hooks';
|
|
15
15
|
import { createWidthContext, WidthContext } from '../../../ui';
|
|
16
16
|
import ExtensionLozenge from '../Lozenge';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Calculates container or full editor width taking in account editor full width layout
|
|
@@ -983,7 +983,7 @@ function limit(items) {
|
|
|
983
983
|
return items.slice(0, RECENT_SEARCH_LIST_SIZE);
|
|
984
984
|
}
|
|
985
985
|
|
|
986
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
986
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types, @atlaskit/volt-strict-mode/no-multiple-exports
|
|
987
987
|
export var HyperlinkLinkAddToolbarWithIntl = injectIntl(HyperlinkLinkAddToolbar);
|
|
988
988
|
var _default_1 = withAnalyticsEvents()(HyperlinkLinkAddToolbarWithIntl);
|
|
989
989
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
package/dist/esm/link/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUrlForDomainInContext } from '@atlaskit/atlassian-context/get-url-for-domain-in-context';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
3
|
import { linkPreferencesPath } from './constants';
|
|
4
4
|
var STAGING = 'staging';
|
|
5
5
|
var PRODUCTION = 'prod';
|
|
@@ -18,7 +18,7 @@ import { FileFetcherError } from '@atlaskit/media-client';
|
|
|
18
18
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
19
19
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
21
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
22
22
|
import { messages } from '../messages/media-inline-card';
|
|
23
23
|
import { referenceHeights } from './constants';
|
|
24
24
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
3
|
/**
|
|
4
4
|
* Calculate maximum width allowed for media single node in fix-width editor in new experience
|
|
5
5
|
* @param containerWidth width of editor container
|
|
@@ -95,6 +95,16 @@ export var syncBlockMessages = defineMessages({
|
|
|
95
95
|
defaultMessage: 'Synced from: {title}',
|
|
96
96
|
description: 'Tooltip that shows the source page title of the synced block'
|
|
97
97
|
},
|
|
98
|
+
unpublishedLocalReferenceAvailabilityTooltip: {
|
|
99
|
+
id: 'editor-common.messages.syncBlock.unpublishedLocalReferenceAvailabilityTooltip',
|
|
100
|
+
defaultMessage: '{sourceType, select, page {Publish the page to make the source synced block content available in other locations.} blog {Publish the blog to make the source synced block content available in other locations.} jiraWorkItem {Publish the work item to make the source synced block content available in other locations.} other {Publish to make the source synced block content available in other locations.}}',
|
|
101
|
+
description: 'Tooltip explaining that a local unpublished reference is only available in its source document. sourceType selects page, blog, or Jira work item copy.'
|
|
102
|
+
},
|
|
103
|
+
unpublishedSourceAvailabilityTooltip: {
|
|
104
|
+
id: 'editor-common.messages.syncBlock.unpublishedSourceAvailabilityTooltip',
|
|
105
|
+
defaultMessage: '{sourceType, select, page {Publish the page to make the content available in other locations.} blog {Publish the blog to make the content available in other locations.} jiraWorkItem {Publish the work item to make the content available in other locations.} other {Publish to make the content available in other locations.}}',
|
|
106
|
+
description: 'Tooltip explaining that an unpublished source synced block is only available in its source document. sourceType selects page, blog, or Jira work item copy.'
|
|
107
|
+
},
|
|
98
108
|
referenceSyncBlockLastEdited: {
|
|
99
109
|
id: 'fabric.editor.referenceSyncBlockLastEdited',
|
|
100
110
|
defaultMessage: 'Last edited:',
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "120.
|
|
23
|
+
var packageVersion = "120.7.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
5
|
import { isEmptyDocument } from '../utils';
|
|
5
6
|
import { DynamicBitArray } from './dynamic-bit-array';
|
|
6
7
|
import { shouldEnableLimitedModeForDocument } from './should-enable-limited-mode';
|
|
8
|
+
|
|
9
|
+
// The slice of `@atlaskit/editor-plugin-limited-mode`'s state read below. Declared
|
|
10
|
+
// structurally because `editor-common` must not depend on a plugin package.
|
|
11
|
+
|
|
12
|
+
// The real key stays in `@atlaskit/editor-plugin-limited-mode`; importing it would make
|
|
13
|
+
// `editor-common` depend on a plugin package, so match the state property by name.
|
|
14
|
+
// `'limitedModePlugin$'` is what ProseMirror derives for `new PluginKey('limitedModePlugin')`,
|
|
15
|
+
// and editor-plugin-limited-mode-tests asserts that literal to catch it shifting to `$1`.
|
|
16
|
+
// Please, do not copy or use this kind of code below
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
var limitedModePluginKey = {
|
|
19
|
+
key: 'limitedModePlugin$',
|
|
20
|
+
getState: function getState(state) {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
return state['limitedModePlugin$'];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
7
25
|
export var NodeAnchorProvider = /*#__PURE__*/function () {
|
|
8
26
|
function NodeAnchorProvider() {
|
|
9
27
|
var limitedMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -74,6 +92,9 @@ export var NodeAnchorProvider = /*#__PURE__*/function () {
|
|
|
74
92
|
// After set to limited mode, we clear the cache to free up memory
|
|
75
93
|
// and prevent further ids from being generated
|
|
76
94
|
// Once in limited mode, we won't exit it
|
|
95
|
+
//
|
|
96
|
+
// One-way by design, so this can stay latched on after the plugin flips back to
|
|
97
|
+
// off: recovering would mean re-rendering every nodeview to restore its anchor.
|
|
77
98
|
}, {
|
|
78
99
|
key: "setLimitedMode",
|
|
79
100
|
value: function setLimitedMode() {
|
|
@@ -87,12 +108,16 @@ export var NodeAnchorProvider = /*#__PURE__*/function () {
|
|
|
87
108
|
var nodeIdProviderMap = new WeakMap();
|
|
88
109
|
|
|
89
110
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
111
|
+
* Reads the limited-mode plugin's state and nothing else, so a preset without the plugin no longer
|
|
112
|
+
* gets anchor suppression (and with it, no drag handles). No plugin means limited mode is off.
|
|
113
|
+
*
|
|
114
|
+
* Read off the state rather than the plugin injection API because plugin `state.init` is the only
|
|
115
|
+
* thing that has run by the time the `EditorView` constructor builds its first nodeview and calls
|
|
116
|
+
* `getNodeIdProvider`. Plugin views and `usePluginHook` both run later.
|
|
93
117
|
*/
|
|
94
118
|
var isLimitedModeEnabled = function isLimitedModeEnabled(editorView) {
|
|
95
|
-
|
|
119
|
+
var _limitedModePluginKey, _limitedModePluginKey2;
|
|
120
|
+
return fg('platform_editor_fix_limited_mode_leaking') ? (_limitedModePluginKey = (_limitedModePluginKey2 = limitedModePluginKey.getState(editorView.state)) === null || _limitedModePluginKey2 === void 0 ? void 0 : _limitedModePluginKey2.documentSizeBreachesThreshold) !== null && _limitedModePluginKey !== void 0 ? _limitedModePluginKey : false : shouldEnableLimitedModeForDocument(editorView.state.doc);
|
|
96
121
|
};
|
|
97
122
|
|
|
98
123
|
// Get the NodeIdProvider for a specific EditorView instance.
|
|
@@ -100,8 +125,6 @@ var isLimitedModeEnabled = function isLimitedModeEnabled(editorView) {
|
|
|
100
125
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
101
126
|
export var getNodeIdProvider = function getNodeIdProvider(editorView) {
|
|
102
127
|
if (!nodeIdProviderMap.has(editorView)) {
|
|
103
|
-
// if the limited mode flag is on, enable limited mode based on the threshold
|
|
104
|
-
// only for the first time
|
|
105
128
|
var limitedMode = isLimitedModeEnabled(editorView);
|
|
106
129
|
var isEmptyDoc = isEmptyDocument(editorView.state.doc);
|
|
107
130
|
var provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
3
|
+
import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
|
|
4
4
|
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
|
|
6
6
|
var transformer = new JSONTransformer();
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useSta
|
|
|
3
3
|
import { bind, bindAll } from 'bind-event-listener';
|
|
4
4
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
8
8
|
import { LAYOUT_SECTION_MARGIN } from '../styles';
|
|
9
9
|
import { getBrowserInfo } from '../utils/browser';
|
|
@@ -14,7 +14,7 @@ import { useIntl } from 'react-intl';
|
|
|
14
14
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
19
19
|
import { messages } from '../messages/breakout';
|
|
20
20
|
import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useCallback, useMemo, useState } from 'react';
|
|
3
3
|
import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
5
|
export var SNAP_GAP = 8;
|
|
6
6
|
var GUIDELINE_KEYS = {
|
|
7
7
|
lineLength: 'grid',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toJSON as unsanitizedNodeToJSON } from '@atlaskit/editor-json-transformer/toJSON';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
3
|
import { nodeToJSON } from '../utils/nodes';
|
|
4
4
|
import { getSliceFromSelection } from './context-helpers';
|
|
@@ -63,7 +63,7 @@ export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
63
63
|
}]);
|
|
64
64
|
}(React.Component);
|
|
65
65
|
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
67
67
|
var _default_1 = injectIntl(CaptionComponent);
|
|
68
68
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
69
69
|
export default _default_1;
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "120.
|
|
24
|
+
var packageVersion = "120.7.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -15,7 +15,7 @@ import rafSchedule from 'raf-schd';
|
|
|
15
15
|
import { createPortal, flushSync } from 'react-dom';
|
|
16
16
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
19
|
import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent } from './utils';
|
|
20
20
|
import { validatePosition } from './validatePosition';
|
|
21
21
|
// Ignored via go/ees005
|