@atlaskit/editor-common 119.10.2 → 119.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +21 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/selection/getFragmentsFromSelection.js +14 -4
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/nodes.js +2 -2
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +21 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/selection/getFragmentsFromSelection.js +15 -5
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/nodes.js +2 -2
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +21 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/selection/getFragmentsFromSelection.js +15 -5
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/nodes.js +2 -2
- package/dist/types/analytics/types/ai-suggestions-events.d.ts +1 -1
- package/dist/types/collab/index.d.ts +1 -0
- package/dist/types/selection/getFragmentsFromSelection.d.ts +9 -4
- package/dist/types/utils/nodes.d.ts +2 -1
- package/package.json +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 119.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`80b19d6c0649f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/80b19d6c0649f) -
|
|
8
|
+
Preserve agent type metadata in collaboration presence participants behind
|
|
9
|
+
`platform_move_presence_agents`.
|
|
10
|
+
- [`a20b9032800d1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a20b9032800d1) -
|
|
11
|
+
[ux] Improve inline skill mentions under `rovo_skill_tag_label_wrapping`.
|
|
12
|
+
|
|
13
|
+
With the gate enabled:
|
|
14
|
+
- Long labels wrap as part of the surrounding text flow.
|
|
15
|
+
- The slash and icon stay with the first line of the label.
|
|
16
|
+
- Prompt text can continue after the skill tag's final line.
|
|
17
|
+
- A missing `slashCommand` falls back to the skill name.
|
|
18
|
+
|
|
19
|
+
With the gate disabled, existing editor wrapper styling and empty-slug behavior are preserved.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
25
|
+
## 119.11.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- [`52e80c8d44e5f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/52e80c8d44e5f) -
|
|
30
|
+
Behind `platform_editor_sanitize_selection_fragments`, `getFragmentsFromSelection` now sanitises
|
|
31
|
+
selection fragments via `JSONTransformer.encodeNode` instead of the raw `nodeToJSON`, so the
|
|
32
|
+
schema-only `panel_c1` container variant no longer leaks to Remix and other AI selection-context
|
|
33
|
+
consumers when `platform_editor_nest_table_in_panel` is enabled. `keepNestedTables: true` is
|
|
34
|
+
passed to keep nested tables intact. `encodeNode` and editor-common's `nodeToJSON` now accept
|
|
35
|
+
`SanitizeNodeOptions`, matching `encode`.
|
|
36
|
+
- [`37cc9ce2fd879`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/37cc9ce2fd879) -
|
|
37
|
+
Add new analytic entrypoint name for suggestions panel
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
|
|
3
43
|
## 119.10.2
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
14
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
16
|
var _hooks = require("../../../hooks");
|
|
@@ -36,6 +37,24 @@ var inlineWrapperStyles = (0, _react2.css)({
|
|
|
36
37
|
maxWidth: '100%'
|
|
37
38
|
}
|
|
38
39
|
});
|
|
40
|
+
var flowingInlineWrapperStyles = (0, _react2.css)({
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The child marker lets an inline extension opt into text-flow layout without coupling editor-common to the skill feature gate.
|
|
42
|
+
'&:has([data-inline-extension-layout="flow"])': {
|
|
43
|
+
background: 'transparent',
|
|
44
|
+
boxShadow: 'none',
|
|
45
|
+
display: 'inline',
|
|
46
|
+
margin: 0,
|
|
47
|
+
verticalAlign: 'baseline'
|
|
48
|
+
},
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy wrapper decorations must be removed only when its child opts into text-flow layout.
|
|
50
|
+
'&:has([data-inline-extension-layout="flow"])::after, &:has([data-inline-extension-layout="flow"])::before': {
|
|
51
|
+
display: 'none'
|
|
52
|
+
},
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy overlay must be hidden only when its child opts into text-flow layout.
|
|
54
|
+
'&:has([data-inline-extension-layout="flow"]) > .extension-overlay': {
|
|
55
|
+
display: 'none'
|
|
56
|
+
}
|
|
57
|
+
});
|
|
39
58
|
var hoverStyles = (0, _react2.css)({
|
|
40
59
|
'&:hover': {
|
|
41
60
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
|
|
@@ -68,6 +87,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
68
87
|
isLivePageViewMode = props.isLivePageViewMode;
|
|
69
88
|
var _ref3 = macroInteractionDesignFeatureFlags || {},
|
|
70
89
|
showMacroInteractionDesignUpdates = _ref3.showMacroInteractionDesignUpdates;
|
|
90
|
+
var shouldUseFlowingInlineWrapper = (0, _fg.fg)('rovo_skill_tag_label_wrapping');
|
|
71
91
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['width'], function (states) {
|
|
72
92
|
var _states$widthState;
|
|
73
93
|
return {
|
|
@@ -107,7 +127,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
107
127
|
"data-testid": "inline-extension-wrapper",
|
|
108
128
|
css: [
|
|
109
129
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
110
|
-
_styles2.wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles]
|
|
130
|
+
_styles2.wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles, shouldUseFlowingInlineWrapper && flowingInlineWrapperStyles]
|
|
111
131
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
112
132
|
,
|
|
113
133
|
className: classNames,
|
|
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
28
28
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
29
29
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
30
30
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
31
|
-
var packageVersion = "119.
|
|
31
|
+
var packageVersion = "119.11.0";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -5,12 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getFragmentsFromSelection = void 0;
|
|
7
7
|
var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
|
|
8
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
9
|
+
var _nodes = require("../utils/nodes");
|
|
8
10
|
var _contextHelpers = require("./context-helpers");
|
|
9
11
|
/**
|
|
10
12
|
* Get the fragments from the selection.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
13
|
+
*
|
|
14
|
+
* The result crosses an editor boundary — Remix, Rovo/convo-ai and AIFC treat it as persistable
|
|
15
|
+
* ADF. The two same-named `nodeToJSON` exports are not interchangeable: `editor-json-transformer`'s
|
|
16
|
+
* is a verbatim ProseMirror serialisation and leaks schema-only container variants such as
|
|
17
|
+
* `panel_c1`, while `../utils/nodes` sanitises.
|
|
18
|
+
*
|
|
19
|
+
* `keepNestedTables: true` keeps the gate scoped to that strip — the sanitiser would otherwise also
|
|
20
|
+
* rewrite nested tables into an extension carrying stringified ADF.
|
|
14
21
|
*/
|
|
15
22
|
var getFragmentsFromSelection = exports.getFragmentsFromSelection = function getFragmentsFromSelection(selection) {
|
|
16
23
|
if (!selection || selection.empty) {
|
|
@@ -18,9 +25,12 @@ var getFragmentsFromSelection = exports.getFragmentsFromSelection = function get
|
|
|
18
25
|
}
|
|
19
26
|
var slice = (0, _contextHelpers.getSliceFromSelection)(selection);
|
|
20
27
|
var content = slice.content;
|
|
28
|
+
var sanitizeFragments = (0, _fg.fg)('platform_editor_sanitize_selection_fragments');
|
|
21
29
|
var fragment = [];
|
|
22
30
|
content.forEach(function (node) {
|
|
23
|
-
fragment.push((0,
|
|
31
|
+
fragment.push(sanitizeFragments ? (0, _nodes.nodeToJSON)(node, {
|
|
32
|
+
keepNestedTables: true
|
|
33
|
+
}) : (0, _editorJsonTransformer.nodeToJSON)(node));
|
|
24
34
|
});
|
|
25
35
|
return fragment;
|
|
26
36
|
};
|
|
@@ -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 = "119.
|
|
27
|
+
var packageVersion = "119.11.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
package/dist/cjs/utils/nodes.js
CHANGED
|
@@ -109,8 +109,8 @@ function toJSON(node) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
112
|
-
function nodeToJSON(node) {
|
|
113
|
-
return transformer.encodeNode(node);
|
|
112
|
+
function nodeToJSON(node, options) {
|
|
113
|
+
return transformer.encodeNode(node, options);
|
|
114
114
|
}
|
|
115
115
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
116
116
|
|
|
@@ -8,6 +8,7 @@ import React, { Fragment, useMemo } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import classnames from 'classnames';
|
|
10
10
|
import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
13
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
14
|
import { useSharedPluginStateWithSelector } from '../../../hooks';
|
|
@@ -26,6 +27,24 @@ const inlineWrapperStyles = css({
|
|
|
26
27
|
maxWidth: '100%'
|
|
27
28
|
}
|
|
28
29
|
});
|
|
30
|
+
const flowingInlineWrapperStyles = css({
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The child marker lets an inline extension opt into text-flow layout without coupling editor-common to the skill feature gate.
|
|
32
|
+
'&:has([data-inline-extension-layout="flow"])': {
|
|
33
|
+
background: 'transparent',
|
|
34
|
+
boxShadow: 'none',
|
|
35
|
+
display: 'inline',
|
|
36
|
+
margin: 0,
|
|
37
|
+
verticalAlign: 'baseline'
|
|
38
|
+
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy wrapper decorations must be removed only when its child opts into text-flow layout.
|
|
40
|
+
'&:has([data-inline-extension-layout="flow"])::after, &:has([data-inline-extension-layout="flow"])::before': {
|
|
41
|
+
display: 'none'
|
|
42
|
+
},
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy overlay must be hidden only when its child opts into text-flow layout.
|
|
44
|
+
'&:has([data-inline-extension-layout="flow"]) > .extension-overlay': {
|
|
45
|
+
display: 'none'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
29
48
|
const hoverStyles = css({
|
|
30
49
|
'&:hover': {
|
|
31
50
|
boxShadow: `0 0 0 1px ${"var(--ds-border-input, #8C8F97)"}`
|
|
@@ -61,6 +80,7 @@ const InlineExtension = props => {
|
|
|
61
80
|
const {
|
|
62
81
|
showMacroInteractionDesignUpdates
|
|
63
82
|
} = macroInteractionDesignFeatureFlags || {};
|
|
83
|
+
const shouldUseFlowingInlineWrapper = fg('rovo_skill_tag_label_wrapping');
|
|
64
84
|
const {
|
|
65
85
|
width
|
|
66
86
|
} = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], states => {
|
|
@@ -101,7 +121,7 @@ const InlineExtension = props => {
|
|
|
101
121
|
"data-testid": "inline-extension-wrapper",
|
|
102
122
|
css: [
|
|
103
123
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
104
|
-
wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles]
|
|
124
|
+
wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles, shouldUseFlowingInlineWrapper && flowingInlineWrapperStyles]
|
|
105
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
106
126
|
,
|
|
107
127
|
className: classNames,
|
|
@@ -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 = "119.
|
|
17
|
+
const packageVersion = "119.11.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { nodeToJSON } from '@atlaskit/editor-json-transformer';
|
|
1
|
+
import { nodeToJSON as unsanitizedNodeToJSON } from '@atlaskit/editor-json-transformer';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
|
+
import { nodeToJSON } from '../utils/nodes';
|
|
2
4
|
import { getSliceFromSelection } from './context-helpers';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Get the fragments from the selection.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* The result crosses an editor boundary — Remix, Rovo/convo-ai and AIFC treat it as persistable
|
|
10
|
+
* ADF. The two same-named `nodeToJSON` exports are not interchangeable: `editor-json-transformer`'s
|
|
11
|
+
* is a verbatim ProseMirror serialisation and leaks schema-only container variants such as
|
|
12
|
+
* `panel_c1`, while `../utils/nodes` sanitises.
|
|
13
|
+
*
|
|
14
|
+
* `keepNestedTables: true` keeps the gate scoped to that strip — the sanitiser would otherwise also
|
|
15
|
+
* rewrite nested tables into an extension carrying stringified ADF.
|
|
9
16
|
*/
|
|
10
17
|
export const getFragmentsFromSelection = selection => {
|
|
11
18
|
if (!selection || selection.empty) {
|
|
@@ -13,9 +20,12 @@ export const getFragmentsFromSelection = selection => {
|
|
|
13
20
|
}
|
|
14
21
|
const slice = getSliceFromSelection(selection);
|
|
15
22
|
const content = slice.content;
|
|
23
|
+
const sanitizeFragments = fg('platform_editor_sanitize_selection_fragments');
|
|
16
24
|
const fragment = [];
|
|
17
25
|
content.forEach(node => {
|
|
18
|
-
fragment.push(nodeToJSON(node
|
|
26
|
+
fragment.push(sanitizeFragments ? nodeToJSON(node, {
|
|
27
|
+
keepNestedTables: true
|
|
28
|
+
}) : unsanitizedNodeToJSON(node));
|
|
19
29
|
});
|
|
20
30
|
return fragment;
|
|
21
31
|
};
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "119.
|
|
17
|
+
const packageVersion = "119.11.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -49,8 +49,8 @@ export function toJSON(node) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
52
|
-
export function nodeToJSON(node) {
|
|
53
|
-
return transformer.encodeNode(node);
|
|
52
|
+
export function nodeToJSON(node, options) {
|
|
53
|
+
return transformer.encodeNode(node, options);
|
|
54
54
|
}
|
|
55
55
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
56
56
|
export { findChangedNodesFromTransaction } from './findChangedNodesFromTransaction';
|
|
@@ -8,6 +8,7 @@ import React, { Fragment, useMemo } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import classnames from 'classnames';
|
|
10
10
|
import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
13
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
14
|
import { useSharedPluginStateWithSelector } from '../../../hooks';
|
|
@@ -26,6 +27,24 @@ var inlineWrapperStyles = css({
|
|
|
26
27
|
maxWidth: '100%'
|
|
27
28
|
}
|
|
28
29
|
});
|
|
30
|
+
var flowingInlineWrapperStyles = css({
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The child marker lets an inline extension opt into text-flow layout without coupling editor-common to the skill feature gate.
|
|
32
|
+
'&:has([data-inline-extension-layout="flow"])': {
|
|
33
|
+
background: 'transparent',
|
|
34
|
+
boxShadow: 'none',
|
|
35
|
+
display: 'inline',
|
|
36
|
+
margin: 0,
|
|
37
|
+
verticalAlign: 'baseline'
|
|
38
|
+
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy wrapper decorations must be removed only when its child opts into text-flow layout.
|
|
40
|
+
'&:has([data-inline-extension-layout="flow"])::after, &:has([data-inline-extension-layout="flow"])::before': {
|
|
41
|
+
display: 'none'
|
|
42
|
+
},
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy overlay must be hidden only when its child opts into text-flow layout.
|
|
44
|
+
'&:has([data-inline-extension-layout="flow"]) > .extension-overlay': {
|
|
45
|
+
display: 'none'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
29
48
|
var hoverStyles = css({
|
|
30
49
|
'&:hover': {
|
|
31
50
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
|
|
@@ -58,6 +77,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
58
77
|
isLivePageViewMode = props.isLivePageViewMode;
|
|
59
78
|
var _ref3 = macroInteractionDesignFeatureFlags || {},
|
|
60
79
|
showMacroInteractionDesignUpdates = _ref3.showMacroInteractionDesignUpdates;
|
|
80
|
+
var shouldUseFlowingInlineWrapper = fg('rovo_skill_tag_label_wrapping');
|
|
61
81
|
var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], function (states) {
|
|
62
82
|
var _states$widthState;
|
|
63
83
|
return {
|
|
@@ -97,7 +117,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
97
117
|
"data-testid": "inline-extension-wrapper",
|
|
98
118
|
css: [
|
|
99
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
100
|
-
wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles]
|
|
120
|
+
wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles, shouldUseFlowingInlineWrapper && flowingInlineWrapperStyles]
|
|
101
121
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
102
122
|
,
|
|
103
123
|
className: classNames,
|
|
@@ -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 = "119.
|
|
23
|
+
var packageVersion = "119.11.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { nodeToJSON } from '@atlaskit/editor-json-transformer';
|
|
1
|
+
import { nodeToJSON as unsanitizedNodeToJSON } from '@atlaskit/editor-json-transformer';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
|
+
import { nodeToJSON } from '../utils/nodes';
|
|
2
4
|
import { getSliceFromSelection } from './context-helpers';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Get the fragments from the selection.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* The result crosses an editor boundary — Remix, Rovo/convo-ai and AIFC treat it as persistable
|
|
10
|
+
* ADF. The two same-named `nodeToJSON` exports are not interchangeable: `editor-json-transformer`'s
|
|
11
|
+
* is a verbatim ProseMirror serialisation and leaks schema-only container variants such as
|
|
12
|
+
* `panel_c1`, while `../utils/nodes` sanitises.
|
|
13
|
+
*
|
|
14
|
+
* `keepNestedTables: true` keeps the gate scoped to that strip — the sanitiser would otherwise also
|
|
15
|
+
* rewrite nested tables into an extension carrying stringified ADF.
|
|
9
16
|
*/
|
|
10
17
|
export var getFragmentsFromSelection = function getFragmentsFromSelection(selection) {
|
|
11
18
|
if (!selection || selection.empty) {
|
|
@@ -13,9 +20,12 @@ export var getFragmentsFromSelection = function getFragmentsFromSelection(select
|
|
|
13
20
|
}
|
|
14
21
|
var slice = getSliceFromSelection(selection);
|
|
15
22
|
var content = slice.content;
|
|
23
|
+
var sanitizeFragments = fg('platform_editor_sanitize_selection_fragments');
|
|
16
24
|
var fragment = [];
|
|
17
25
|
content.forEach(function (node) {
|
|
18
|
-
fragment.push(nodeToJSON(node
|
|
26
|
+
fragment.push(sanitizeFragments ? nodeToJSON(node, {
|
|
27
|
+
keepNestedTables: true
|
|
28
|
+
}) : unsanitizedNodeToJSON(node));
|
|
19
29
|
});
|
|
20
30
|
return fragment;
|
|
21
31
|
};
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "119.
|
|
24
|
+
var packageVersion = "119.11.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
package/dist/esm/utils/nodes.js
CHANGED
|
@@ -59,8 +59,8 @@ export function toJSON(node) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
62
|
-
export function nodeToJSON(node) {
|
|
63
|
-
return transformer.encodeNode(node);
|
|
62
|
+
export function nodeToJSON(node, options) {
|
|
63
|
+
return transformer.encodeNode(node, options);
|
|
64
64
|
}
|
|
65
65
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
66
66
|
export { findChangedNodesFromTransaction } from './findChangedNodesFromTransaction';
|
|
@@ -14,7 +14,7 @@ export type AiSuggestionsEntryPoint = 'primaryToolbar' | 'commentsEmptyState' |
|
|
|
14
14
|
*/
|
|
15
15
|
| 'followUpCard';
|
|
16
16
|
export type AiSuggestionInteractionPoint = 'sidebar' | 'card' | 'statusBar';
|
|
17
|
-
export type AiSuggestionsRightRailEntryPoint = 'suggestionsTab' | 'suggestionCard';
|
|
17
|
+
export type AiSuggestionsRightRailEntryPoint = 'suggestionsPanel' | 'suggestionsTab' | 'suggestionCard';
|
|
18
18
|
export type AiSuggestionsConversationErrorReason = 'agentDeactivated' | 'agentProvisioning' | 'agentExternalConfigReference' | 'conversationSetup' | 'streamError';
|
|
19
19
|
type NoDiffSuggestionAEP = OperationalAEP<ACTION.NO_DIFF_FOUND, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
|
|
20
20
|
suggestionType: string;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import type { JSONNode } from '@atlaskit/editor-json-transformer';
|
|
1
|
+
import type { JSONNode } from '@atlaskit/editor-json-transformer/types';
|
|
2
2
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
/**
|
|
4
4
|
* Get the fragments from the selection.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
*
|
|
6
|
+
* The result crosses an editor boundary — Remix, Rovo/convo-ai and AIFC treat it as persistable
|
|
7
|
+
* ADF. The two same-named `nodeToJSON` exports are not interchangeable: `editor-json-transformer`'s
|
|
8
|
+
* is a verbatim ProseMirror serialisation and leaks schema-only container variants such as
|
|
9
|
+
* `panel_c1`, while `../utils/nodes` sanitises.
|
|
10
|
+
*
|
|
11
|
+
* `keepNestedTables: true` keeps the gate scoped to that strip — the sanitiser would otherwise also
|
|
12
|
+
* rewrite nested tables into an extension carrying stringified ADF.
|
|
8
13
|
*/
|
|
9
14
|
export declare const getFragmentsFromSelection: (selection?: Selection) => JSONNode[] | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { JSONDocNode, JSONNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
+
import type { SanitizeNodeOptions } from '@atlaskit/editor-json-transformer/sanitize/sanitize-node';
|
|
2
3
|
import type { MarkType, NodeType, Mark as PMMark, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
import { SelectedState } from './SelectedState';
|
|
4
5
|
/** Validates prosemirror nodes, and returns true only if all nodes are valid */
|
|
@@ -16,7 +17,7 @@ export declare const isLinkMark: (node: PMEntities, schema: Schema) => boolean |
|
|
|
16
17
|
*/
|
|
17
18
|
export declare const isNodeSelectedOrInRange: (anchorPosition: number, headPosition: number, nodePosition: number | undefined, nodeSize: number) => SelectedState | null;
|
|
18
19
|
export declare function toJSON(node: PMNode): JSONDocNode;
|
|
19
|
-
export declare function nodeToJSON(node: PMNode): JSONNode;
|
|
20
|
+
export declare function nodeToJSON(node: PMNode, options?: SanitizeNodeOptions): JSONNode;
|
|
20
21
|
export { findChangedNodesFromTransaction } from './findChangedNodesFromTransaction';
|
|
21
22
|
export { validNode } from './validNode';
|
|
22
23
|
export { SelectedState } from './SelectedState';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "119.
|
|
3
|
+
"version": "119.12.0",
|
|
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/"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/css": "^1.0.0",
|
|
43
43
|
"@atlaskit/custom-steps": "^1.0.0",
|
|
44
44
|
"@atlaskit/dropdown-menu": "^18.1.0",
|
|
45
|
-
"@atlaskit/editor-json-transformer": "^9.
|
|
45
|
+
"@atlaskit/editor-json-transformer": "^9.5.0",
|
|
46
46
|
"@atlaskit/editor-palette": "^3.4.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
48
48
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/link-datasource": "^6.4.0",
|
|
58
58
|
"@atlaskit/link-picker": "^6.4.0",
|
|
59
59
|
"@atlaskit/media-card": "^81.6.0",
|
|
60
|
-
"@atlaskit/media-client": "^37.
|
|
60
|
+
"@atlaskit/media-client": "^37.4.0",
|
|
61
61
|
"@atlaskit/media-client-react": "^6.1.0",
|
|
62
62
|
"@atlaskit/media-common": "^14.4.0",
|
|
63
63
|
"@atlaskit/media-file-preview": "^1.1.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@atlaskit/task-decision": "^21.8.0",
|
|
85
85
|
"@atlaskit/teams-app-config": "^2.2.0",
|
|
86
86
|
"@atlaskit/textfield": "^10.0.0",
|
|
87
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
87
|
+
"@atlaskit/tmp-editor-statsig": "^156.0.0",
|
|
88
88
|
"@atlaskit/tokens": "^16.7.0",
|
|
89
89
|
"@atlaskit/tooltip": "^24.1.0",
|
|
90
90
|
"@atlaskit/width-detector": "^7.0.0",
|
|
@@ -169,9 +169,16 @@
|
|
|
169
169
|
"type": "boolean",
|
|
170
170
|
"referenceOnly": true
|
|
171
171
|
},
|
|
172
|
+
"rovo_skill_tag_label_wrapping": {
|
|
173
|
+
"type": "boolean",
|
|
174
|
+
"referenceOnly": true
|
|
175
|
+
},
|
|
172
176
|
"platform_editor_use_new_experiments_api": {
|
|
173
177
|
"type": "boolean"
|
|
174
178
|
},
|
|
179
|
+
"platform_editor_sanitize_selection_fragments": {
|
|
180
|
+
"type": "boolean"
|
|
181
|
+
},
|
|
175
182
|
"platform-dst-popper-consolidation": {
|
|
176
183
|
"type": "boolean",
|
|
177
184
|
"referenceOnly": true
|