@atlaskit/editor-common 123.4.2 → 123.5.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 +27 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +2 -4
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +2 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/validate-using-spec.js +2 -18
- package/dist/es2019/extensibility/Extension/Extension/index.js +2 -4
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +2 -5
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/validate-using-spec.js +0 -16
- package/dist/esm/extensibility/Extension/Extension/index.js +2 -4
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +2 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/validate-using-spec.js +2 -18
- package/dist/types/types/floating-toolbar.d.ts +7 -0
- package/dist/types/types/hyperlink.d.ts +4 -0
- package/package.json +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 123.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`74360ce048e56`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/74360ce048e56) -
|
|
8
|
+
FFCLEANUP-196833 Cleanup `platform_editor_adf_validator_stage0`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 123.5.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`c4d3272bbafce`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c4d3272bbafce) -
|
|
16
|
+
Add an opt-in LinkPickerOptions.popupContainerSurface ('default' | 'none') that lets a custom link
|
|
17
|
+
picker component (e.g. RovoLinkPicker) suppress the editor's floating toolbar popup surface
|
|
18
|
+
(background, box-shadow, border-radius, padding) when it renders its own complete surface.
|
|
19
|
+
Threaded through FloatingToolbarConfig/Toolbar's new containerSurface prop. Defaults to the
|
|
20
|
+
existing wrapper surface; only a caller that explicitly opts in is affected.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`3f8ea6c51b718`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f8ea6c51b718) -
|
|
25
|
+
Remove the rolled-out `editor_tinymce_full_width_mode` and
|
|
26
|
+
`confluence_max_width_content_appearance` experiments and make max-width content behavior
|
|
27
|
+
permanent.
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
3
30
|
## 123.4.2
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -85,13 +85,11 @@ function ExtensionWithPluginState(props) {
|
|
|
85
85
|
return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
|
|
86
86
|
}, [view, getPos]);
|
|
87
87
|
var layout = node.attrs.layout;
|
|
88
|
-
var
|
|
89
|
-
var tinymceFullWidthModeEnabled = (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true);
|
|
90
|
-
var shouldBreakout = tinymceFullWidthModeEnabled ? (0, _shouldExtensionBreakout.shouldExtensionBreakout)({
|
|
88
|
+
var shouldBreakout = (0, _shouldExtensionBreakout.shouldExtensionBreakout)({
|
|
91
89
|
layout: layout,
|
|
92
90
|
isTopLevelNode: isTopLevelNode,
|
|
93
91
|
editorAppearance: editorAppearance
|
|
94
|
-
})
|
|
92
|
+
});
|
|
95
93
|
|
|
96
94
|
// We don't want to show border for non-empty 1p bodied extensions in live pages
|
|
97
95
|
var show1PBodiedExtensionBorder = showUpdatedLivePages1PBodiedExtensionUI ? (0, _extensionUtils.isEmptyBodiedMacro)(node) : true;
|
|
@@ -270,14 +270,11 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
|
|
|
270
270
|
return tryExtensionHandler(actions);
|
|
271
271
|
}, [tryExtensionHandler, actions]);
|
|
272
272
|
var layout = node.attrs.layout;
|
|
273
|
-
var
|
|
274
|
-
var tinymceFullWidthModeEnabled = (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true);
|
|
275
|
-
var shouldUseBreakoutFix = tinymceFullWidthModeEnabled;
|
|
276
|
-
var shouldBreakout = shouldUseBreakoutFix ? (0, _shouldExtensionBreakout.shouldExtensionBreakout)({
|
|
273
|
+
var shouldBreakout = (0, _shouldExtensionBreakout.shouldExtensionBreakout)({
|
|
277
274
|
layout: layout,
|
|
278
275
|
editorAppearance: editorAppearance,
|
|
279
276
|
isTopLevelNode: true
|
|
280
|
-
})
|
|
277
|
+
});
|
|
281
278
|
var mbeWrapperStyles = {};
|
|
282
279
|
if (shouldBreakout) {
|
|
283
280
|
var _calculateBreakoutSty = (0, _utils.calculateBreakoutStyles)({
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "123.
|
|
30
|
+
var packageVersion = "123.5.0";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "123.
|
|
27
|
+
var packageVersion = "123.5.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -13,7 +13,6 @@ Object.defineProperty(exports, "wrapWithUnsupported", {
|
|
|
13
13
|
});
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _validator = require("@atlaskit/adf-utils/validator");
|
|
16
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
16
|
var _analytics = require("../analytics");
|
|
18
17
|
var _ADFStages = require("./ADFStages");
|
|
19
18
|
var _trackUnsupportedContent = require("./track-unsupported-content");
|
|
@@ -94,28 +93,14 @@ var validationErrorHandler = exports.validationErrorHandler = function validatio
|
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
|
|
97
|
-
// panel_c1 is a ProseMirror-only variant: on save, table-in-panel documents are stored as
|
|
98
|
-
// plain ADF `panel` nodes containing a `table`. The base validator-spec does not permit
|
|
99
|
-
// `table` inside `panel`, so suppress the INVALID_CONTENT error when the experiment is active.
|
|
100
|
-
// This suppression is blunt, allowing a table in every panel, and applies only while
|
|
101
|
-
// `platform_editor_adf_validator_stage0` is off. With that gate on, adf-utils offers the stage-0
|
|
102
|
-
// `panel_c1` variants and accepts table-in-panel positionally instead, in `doc`, a layout column
|
|
103
|
-
// and a synced block only.
|
|
104
|
-
if (options.allowTableInPanel && !(0, _fg.fg)('platform_editor_adf_validator_stage0')) {
|
|
105
|
-
var _meta = error.meta;
|
|
106
|
-
if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'table') {
|
|
107
|
-
return entity;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
96
|
// panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
|
|
112
97
|
// plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
|
|
113
98
|
// `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
|
|
114
99
|
// see `isPanelNestingContainerSupported`), so we suppress the INVALID_CONTENT error when
|
|
115
100
|
// `allowContainerInPanel` is set.
|
|
116
101
|
if (options.allowContainerInPanel) {
|
|
117
|
-
var
|
|
118
|
-
if ((
|
|
102
|
+
var _meta = error.meta;
|
|
103
|
+
if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
|
|
119
104
|
return entity;
|
|
120
105
|
}
|
|
121
106
|
}
|
|
@@ -179,7 +164,6 @@ var validateADFEntity = exports.validateADFEntity = function validateADFEntity(s
|
|
|
179
164
|
// because a document holding a stage-0-only construct, such as a `layoutSection` with one column,
|
|
180
165
|
// otherwise has that content wrapped as unsupported. Editors carry such constructs by design,
|
|
181
166
|
// since the editor's own schema enables them, and renderers meet them in stored documents.
|
|
182
|
-
// `stage0` is only observable while `platform_editor_adf_validator_stage0` is enabled.
|
|
183
167
|
var validate = (0, _validator.validator)(nodes, marks, {
|
|
184
168
|
allowPrivateAttributes: true,
|
|
185
169
|
stage0: adfStage !== _ADFStages.ADFStages.FINAL
|
|
@@ -78,13 +78,11 @@ function ExtensionWithPluginState(props) {
|
|
|
78
78
|
return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
|
|
79
79
|
}, [view, getPos]);
|
|
80
80
|
const layout = node.attrs.layout;
|
|
81
|
-
const
|
|
82
|
-
const tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
|
|
83
|
-
const shouldBreakout = tinymceFullWidthModeEnabled ? shouldExtensionBreakout({
|
|
81
|
+
const shouldBreakout = shouldExtensionBreakout({
|
|
84
82
|
layout,
|
|
85
83
|
isTopLevelNode,
|
|
86
84
|
editorAppearance
|
|
87
|
-
})
|
|
85
|
+
});
|
|
88
86
|
|
|
89
87
|
// We don't want to show border for non-empty 1p bodied extensions in live pages
|
|
90
88
|
const show1PBodiedExtensionBorder = showUpdatedLivePages1PBodiedExtensionUI ? isEmptyBodiedMacro(node) : true;
|
|
@@ -263,14 +263,11 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
263
263
|
return tryExtensionHandler(actions);
|
|
264
264
|
}, [tryExtensionHandler, actions]);
|
|
265
265
|
const layout = node.attrs.layout;
|
|
266
|
-
const
|
|
267
|
-
const tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
|
|
268
|
-
const shouldUseBreakoutFix = tinymceFullWidthModeEnabled;
|
|
269
|
-
const shouldBreakout = shouldUseBreakoutFix ? shouldExtensionBreakout({
|
|
266
|
+
const shouldBreakout = shouldExtensionBreakout({
|
|
270
267
|
layout,
|
|
271
268
|
editorAppearance,
|
|
272
269
|
isTopLevelNode: true
|
|
273
|
-
})
|
|
270
|
+
});
|
|
274
271
|
let mbeWrapperStyles = {};
|
|
275
272
|
if (shouldBreakout) {
|
|
276
273
|
const {
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "123.
|
|
16
|
+
const packageVersion = "123.5.0";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -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 = "123.
|
|
17
|
+
const packageVersion = "123.5.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { validator } from '@atlaskit/adf-utils/validator';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
2
|
import { ACTION_SUBJECT_ID } from '../analytics';
|
|
4
3
|
export const UNSUPPORTED_NODE_ATTRIBUTE = 'unsupportedNodeAttribute';
|
|
5
4
|
import { ADFStages } from './ADFStages';
|
|
@@ -79,20 +78,6 @@ export const validationErrorHandler = (entity, error, options, marks, validate,
|
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
// panel_c1 is a ProseMirror-only variant: on save, table-in-panel documents are stored as
|
|
83
|
-
// plain ADF `panel` nodes containing a `table`. The base validator-spec does not permit
|
|
84
|
-
// `table` inside `panel`, so suppress the INVALID_CONTENT error when the experiment is active.
|
|
85
|
-
// This suppression is blunt, allowing a table in every panel, and applies only while
|
|
86
|
-
// `platform_editor_adf_validator_stage0` is off. With that gate on, adf-utils offers the stage-0
|
|
87
|
-
// `panel_c1` variants and accepts table-in-panel positionally instead, in `doc`, a layout column
|
|
88
|
-
// and a synced block only.
|
|
89
|
-
if (options.allowTableInPanel && !fg('platform_editor_adf_validator_stage0')) {
|
|
90
|
-
const meta = error.meta;
|
|
91
|
-
if ((meta === null || meta === void 0 ? void 0 : meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'table') {
|
|
92
|
-
return entity;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
81
|
// panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
|
|
97
82
|
// plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
|
|
98
83
|
// `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
|
|
@@ -160,7 +145,6 @@ export const validateADFEntity = (schema, node, dispatchAnalyticsEvent, validati
|
|
|
160
145
|
// because a document holding a stage-0-only construct, such as a `layoutSection` with one column,
|
|
161
146
|
// otherwise has that content wrapped as unsupported. Editors carry such constructs by design,
|
|
162
147
|
// since the editor's own schema enables them, and renderers meet them in stored documents.
|
|
163
|
-
// `stage0` is only observable while `platform_editor_adf_validator_stage0` is enabled.
|
|
164
148
|
const validate = validator(nodes, marks, {
|
|
165
149
|
allowPrivateAttributes: true,
|
|
166
150
|
stage0: adfStage !== ADFStages.FINAL
|
|
@@ -78,13 +78,11 @@ function ExtensionWithPluginState(props) {
|
|
|
78
78
|
return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
|
|
79
79
|
}, [view, getPos]);
|
|
80
80
|
var layout = node.attrs.layout;
|
|
81
|
-
var
|
|
82
|
-
var tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
|
|
83
|
-
var shouldBreakout = tinymceFullWidthModeEnabled ? shouldExtensionBreakout({
|
|
81
|
+
var shouldBreakout = shouldExtensionBreakout({
|
|
84
82
|
layout: layout,
|
|
85
83
|
isTopLevelNode: isTopLevelNode,
|
|
86
84
|
editorAppearance: editorAppearance
|
|
87
|
-
})
|
|
85
|
+
});
|
|
88
86
|
|
|
89
87
|
// We don't want to show border for non-empty 1p bodied extensions in live pages
|
|
90
88
|
var show1PBodiedExtensionBorder = showUpdatedLivePages1PBodiedExtensionUI ? isEmptyBodiedMacro(node) : true;
|
|
@@ -263,14 +263,11 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
|
|
|
263
263
|
return tryExtensionHandler(actions);
|
|
264
264
|
}, [tryExtensionHandler, actions]);
|
|
265
265
|
var layout = node.attrs.layout;
|
|
266
|
-
var
|
|
267
|
-
var tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
|
|
268
|
-
var shouldUseBreakoutFix = tinymceFullWidthModeEnabled;
|
|
269
|
-
var shouldBreakout = shouldUseBreakoutFix ? shouldExtensionBreakout({
|
|
266
|
+
var shouldBreakout = shouldExtensionBreakout({
|
|
270
267
|
layout: layout,
|
|
271
268
|
editorAppearance: editorAppearance,
|
|
272
269
|
isTopLevelNode: true
|
|
273
|
-
})
|
|
270
|
+
});
|
|
274
271
|
var mbeWrapperStyles = {};
|
|
275
272
|
if (shouldBreakout) {
|
|
276
273
|
var _calculateBreakoutSty = calculateBreakoutStyles({
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "123.
|
|
22
|
+
var packageVersion = "123.5.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -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 = "123.
|
|
24
|
+
var packageVersion = "123.5.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
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
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
4
|
import { validator } from '@atlaskit/adf-utils/validator';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
5
|
import { ACTION_SUBJECT_ID } from '../analytics';
|
|
7
6
|
export var UNSUPPORTED_NODE_ATTRIBUTE = 'unsupportedNodeAttribute';
|
|
8
7
|
import { ADFStages } from './ADFStages';
|
|
@@ -81,28 +80,14 @@ export var validationErrorHandler = function validationErrorHandler(entity, erro
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
// panel_c1 is a ProseMirror-only variant: on save, table-in-panel documents are stored as
|
|
85
|
-
// plain ADF `panel` nodes containing a `table`. The base validator-spec does not permit
|
|
86
|
-
// `table` inside `panel`, so suppress the INVALID_CONTENT error when the experiment is active.
|
|
87
|
-
// This suppression is blunt, allowing a table in every panel, and applies only while
|
|
88
|
-
// `platform_editor_adf_validator_stage0` is off. With that gate on, adf-utils offers the stage-0
|
|
89
|
-
// `panel_c1` variants and accepts table-in-panel positionally instead, in `doc`, a layout column
|
|
90
|
-
// and a synced block only.
|
|
91
|
-
if (options.allowTableInPanel && !fg('platform_editor_adf_validator_stage0')) {
|
|
92
|
-
var _meta = error.meta;
|
|
93
|
-
if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'table') {
|
|
94
|
-
return entity;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
83
|
// panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
|
|
99
84
|
// plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
|
|
100
85
|
// `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
|
|
101
86
|
// see `isPanelNestingContainerSupported`), so we suppress the INVALID_CONTENT error when
|
|
102
87
|
// `allowContainerInPanel` is set.
|
|
103
88
|
if (options.allowContainerInPanel) {
|
|
104
|
-
var
|
|
105
|
-
if ((
|
|
89
|
+
var _meta = error.meta;
|
|
90
|
+
if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
|
|
106
91
|
return entity;
|
|
107
92
|
}
|
|
108
93
|
}
|
|
@@ -166,7 +151,6 @@ export var validateADFEntity = function validateADFEntity(schema, node, dispatch
|
|
|
166
151
|
// because a document holding a stage-0-only construct, such as a `layoutSection` with one column,
|
|
167
152
|
// otherwise has that content wrapped as unsupported. Editors carry such constructs by design,
|
|
168
153
|
// since the editor's own schema enables them, and renderers meet them in stored documents.
|
|
169
|
-
// `stage0` is only observable while `platform_editor_adf_validator_stage0` is enabled.
|
|
170
154
|
var validate = validator(nodes, marks, {
|
|
171
155
|
allowPrivateAttributes: true,
|
|
172
156
|
stage0: adfStage !== ADFStages.FINAL
|
|
@@ -329,6 +329,13 @@ export interface FloatingToolbarConfig {
|
|
|
329
329
|
align?: AlignType;
|
|
330
330
|
/** Class added to Toolbar wrapper */
|
|
331
331
|
className?: string;
|
|
332
|
+
/**
|
|
333
|
+
* Controls the Toolbar wrapper's own visual surface (background, shadow, border radius,
|
|
334
|
+
* padding). Set to `'none'` when a single custom item already renders its own complete
|
|
335
|
+
* surface (e.g. a custom link picker component), so the wrapper's surface isn't duplicated
|
|
336
|
+
* behind it. Defaults to `'default'` (the wrapper's surface, as today).
|
|
337
|
+
*/
|
|
338
|
+
containerSurface?: 'default' | 'none';
|
|
332
339
|
/**
|
|
333
340
|
* Enable Popup component's focus trap
|
|
334
341
|
*/
|
|
@@ -8,8 +8,12 @@ export type LinkInputType = INPUT_METHOD.MANUAL | INPUT_METHOD.TYPEAHEAD;
|
|
|
8
8
|
* Extends `LinkPickerProps` to provide future extensibility out-of-the-box.
|
|
9
9
|
* Use `popupWidth` and `popupHeight` to control the editor popup container size
|
|
10
10
|
* when providing a custom `component` with non-standard dimensions.
|
|
11
|
+
* Use `popupContainerSurface: 'none'` when that `component` renders its own complete
|
|
12
|
+
* surface (background, shadow, border radius, padding), so the popup wrapper's own
|
|
13
|
+
* surface isn't duplicated behind it. Defaults to `'default'` (the wrapper's surface).
|
|
11
14
|
*/
|
|
12
15
|
export type LinkPickerOptions = Partial<LinkPickerProps> & {
|
|
16
|
+
popupContainerSurface?: 'default' | 'none';
|
|
13
17
|
popupHeight?: number;
|
|
14
18
|
popupWidth?: number;
|
|
15
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "123.
|
|
3
|
+
"version": "123.5.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@atlaskit/task-decision": "^21.10.0",
|
|
85
85
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
86
86
|
"@atlaskit/textfield": "^10.2.0",
|
|
87
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
87
|
+
"@atlaskit/tmp-editor-statsig": "^202.0.0",
|
|
88
88
|
"@atlaskit/tokens": "^18.2.0",
|
|
89
89
|
"@atlaskit/tooltip": "^24.3.0",
|
|
90
90
|
"@atlaskit/width-detector": "^7.2.0",
|
|
@@ -162,10 +162,6 @@
|
|
|
162
162
|
"platform_editor_hide_configure_lozenge_non_configurable": {
|
|
163
163
|
"type": "boolean"
|
|
164
164
|
},
|
|
165
|
-
"platform_editor_adf_validator_stage0": {
|
|
166
|
-
"type": "boolean",
|
|
167
|
-
"referenceOnly": true
|
|
168
|
-
},
|
|
169
165
|
"rovo_skill_tag_label_wrapping": {
|
|
170
166
|
"type": "boolean",
|
|
171
167
|
"referenceOnly": true
|