@atlaskit/editor-common 119.6.0 → 119.7.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 +29 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +2 -6
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/Button.js +3 -9
- package/dist/cjs/utils/getBreakoutResizableNodeTypesNew.js +1 -4
- package/dist/cjs/utils/getBreakoutResizableNodes.js +1 -5
- package/dist/cjs/utils/isRichMediaInsideOfBlockNode.js +1 -5
- package/dist/cjs/utils/validator.js +4 -7
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +2 -6
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/Button.js +3 -7
- package/dist/es2019/utils/getBreakoutResizableNodeTypesNew.js +1 -4
- package/dist/es2019/utils/getBreakoutResizableNodes.js +1 -5
- package/dist/es2019/utils/isRichMediaInsideOfBlockNode.js +1 -5
- package/dist/es2019/utils/validator.js +4 -7
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/element-browser/components/ElementList/ElementList.js +2 -6
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/Button.js +3 -9
- package/dist/esm/utils/getBreakoutResizableNodeTypesNew.js +1 -4
- package/dist/esm/utils/getBreakoutResizableNodes.js +1 -5
- package/dist/esm/utils/isRichMediaInsideOfBlockNode.js +1 -5
- package/dist/esm/utils/validator.js +4 -7
- package/dist/types/analytics/types/ai-suggestions-events.d.ts +7 -1
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/ui/FloatingToolbar/Button.d.ts +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 119.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c5325e96db711`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c5325e96db711) -
|
|
8
|
+
Add analytics event types for tracking AI suggestion reasoning views.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`76e9f6152bf16`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76e9f6152bf16) -
|
|
13
|
+
Enable launched synced block integrations and remove obsolete experiment scaffolding.
|
|
14
|
+
|
|
15
|
+
BREAKING: `@atlaskit/tmp-editor-statsig` no longer defines the `platform_synced_block` editor
|
|
16
|
+
experiment. Consumers that use `editorExperiment('platform_synced_block', ...)` to conditionally
|
|
17
|
+
enable synced-block integrations will no longer be able to look up that experiment; synced-block
|
|
18
|
+
integrations are now enabled by default. Remove each lookup and its conditional branch:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
// Before
|
|
22
|
+
if (editorExperiment('platform_synced_block', true)) {
|
|
23
|
+
enableSyncedBlocks();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// After
|
|
27
|
+
enableSyncedBlocks();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
|
|
3
32
|
## 119.6.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
|
@@ -172,6 +172,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
172
172
|
ACTION["WITH_PLUGIN_STATE_CALLED"] = "withPluginStateCalled";
|
|
173
173
|
ACTION["RENDERED"] = "rendered";
|
|
174
174
|
ACTION["RENDERED_SAMPLED"] = "renderedSampled";
|
|
175
|
+
ACTION["REASONING_VIEWED"] = "reasoningViewed";
|
|
175
176
|
ACTION["ON_EDITOR_READY_CALLBACK"] = "onEditorReadyCallback";
|
|
176
177
|
/**
|
|
177
178
|
* @private
|
|
@@ -20,7 +20,6 @@ var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
|
20
20
|
var _menu = require("@atlaskit/menu");
|
|
21
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
24
23
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
25
24
|
var _analytics = require("../../../analytics");
|
|
26
25
|
var _quickInsert = require("../../../quick-insert");
|
|
@@ -479,16 +478,13 @@ var ItemContent = /*#__PURE__*/(0, _react.memo)(function (_ref8) {
|
|
|
479
478
|
space: "space.025"
|
|
480
479
|
}, (0, _react2.jsx)("div", {
|
|
481
480
|
css: itemTitleWrapper
|
|
482
|
-
}, (0,
|
|
481
|
+
}, (0, _react2.jsx)(_compiled.Flex, {
|
|
483
482
|
alignItems: "center",
|
|
484
483
|
gap: "space.050"
|
|
485
484
|
}, (0, _react2.jsx)(_compiled.Text, {
|
|
486
485
|
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
487
486
|
maxLines: 1
|
|
488
|
-
}, title), lozenge)
|
|
489
|
-
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
490
|
-
maxLines: 1
|
|
491
|
-
}, title), (0, _react2.jsx)("div", {
|
|
487
|
+
}, title), lozenge), (0, _react2.jsx)("div", {
|
|
492
488
|
css: itemAfter
|
|
493
489
|
}, keyshortcut && (0, _react2.jsx)("div", {
|
|
494
490
|
css: _shortcut.shortcutStyle
|
|
@@ -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.6.0";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// 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 = "119.
|
|
27
|
+
var packageVersion = "119.6.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -11,9 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
14
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
15
14
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
18
16
|
var _iconOnlySpacing = require("./iconOnlySpacing");
|
|
19
17
|
var _styles = require("./styles");
|
|
@@ -95,7 +93,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
95
93
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
96
94
|
,
|
|
97
95
|
ref: function ref(buttonElement) {
|
|
98
|
-
if (forwardedRef
|
|
96
|
+
if (forwardedRef) {
|
|
99
97
|
if (typeof forwardedRef === 'function') {
|
|
100
98
|
forwardedRef(buttonElement);
|
|
101
99
|
} else if ((0, _typeof2.default)(forwardedRef) === 'object') {
|
|
@@ -148,9 +146,5 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
148
146
|
tabIndex: tabIndex
|
|
149
147
|
}, children))));
|
|
150
148
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
var _default_1 = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
154
|
-
return (0, _experiments.editorExperiment)('platform_synced_block', true);
|
|
155
|
-
}, /*#__PURE__*/(0, _react.forwardRef)(FloatingToolbarButton), FloatingToolbarButton);
|
|
156
|
-
var _default = exports.default = _default_1;
|
|
149
|
+
var FloatingToolbarButtonWithRef = /*#__PURE__*/(0, _react.forwardRef)(FloatingToolbarButton);
|
|
150
|
+
var _default = exports.default = FloatingToolbarButtonWithRef;
|
|
@@ -18,10 +18,7 @@ var getBreakoutResizableNodeTypesNew = exports.getBreakoutResizableNodeTypesNew
|
|
|
18
18
|
extension = _schema$nodes.extension,
|
|
19
19
|
bodiedExtension = _schema$nodes.bodiedExtension,
|
|
20
20
|
multiBodiedExtension = _schema$nodes.multiBodiedExtension;
|
|
21
|
-
var breakoutResizableNodeTypes = [expand, codeBlock, layoutSection];
|
|
22
|
-
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_synced_block') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_synced_block_jira')) {
|
|
23
|
-
breakoutResizableNodeTypes.push(syncBlock, bodiedSyncBlock);
|
|
24
|
-
}
|
|
21
|
+
var breakoutResizableNodeTypes = [expand, codeBlock, layoutSection, syncBlock, bodiedSyncBlock];
|
|
25
22
|
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_dividers_panels')) {
|
|
26
23
|
breakoutResizableNodeTypes.push(rule, panel, panel_c1);
|
|
27
24
|
}
|
|
@@ -8,13 +8,9 @@ exports.getBreakoutResizableNodes = void 0;
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
10
10
|
var _breakoutResizableNodes = require("./breakoutResizableNodes");
|
|
11
|
-
var breakoutResizableNodesOld = ['expand', 'layoutSection', 'codeBlock'];
|
|
12
11
|
var extensionNodes = ['extension', 'bodiedExtension', 'multiBodiedExtension'];
|
|
13
12
|
var getBreakoutResizableNodes = exports.getBreakoutResizableNodes = function getBreakoutResizableNodes() {
|
|
14
|
-
var breakoutResizableNodesList =
|
|
15
|
-
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_synced_block') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_synced_block_jira')) {
|
|
16
|
-
breakoutResizableNodesList = _breakoutResizableNodes.breakoutResizableNodes;
|
|
17
|
-
}
|
|
13
|
+
var breakoutResizableNodesList = _breakoutResizableNodes.breakoutResizableNodes;
|
|
18
14
|
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_dividers_panels')) {
|
|
19
15
|
breakoutResizableNodesList = [].concat((0, _toConsumableArray2.default)(breakoutResizableNodesList), ['rule', 'panel', 'panel_c1']);
|
|
20
16
|
}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isRichMediaInsideOfBlockNode = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
9
8
|
var isRichMediaInsideOfBlockNode = exports.isRichMediaInsideOfBlockNode = function isRichMediaInsideOfBlockNode(view, pos) {
|
|
10
9
|
if (typeof pos !== 'number' || isNaN(pos) || !view) {
|
|
11
10
|
return false;
|
|
@@ -16,8 +15,5 @@ var isRichMediaInsideOfBlockNode = exports.isRichMediaInsideOfBlockNode = functi
|
|
|
16
15
|
nestedExpand = _view$state$schema$no.nestedExpand,
|
|
17
16
|
layoutColumn = _view$state$schema$no.layoutColumn,
|
|
18
17
|
bodiedSyncBlock = _view$state$schema$no.bodiedSyncBlock;
|
|
19
|
-
|
|
20
|
-
return !!(0, _utils.findParentNodeOfTypeClosestToPos)($pos, [expand, nestedExpand, layoutColumn, bodiedSyncBlock]);
|
|
21
|
-
}
|
|
22
|
-
return !!(0, _utils.findParentNodeOfTypeClosestToPos)($pos, [expand, nestedExpand, layoutColumn]);
|
|
18
|
+
return !!(0, _utils.findParentNodeOfTypeClosestToPos)($pos, [expand, nestedExpand, layoutColumn, bodiedSyncBlock]);
|
|
23
19
|
};
|
|
@@ -34,7 +34,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
34
34
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
35
35
|
var _schemaDefault = require("@atlaskit/adf-schema/schema-default");
|
|
36
36
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
37
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
38
37
|
var _isSubSupType = require("./isSubSupType");
|
|
39
38
|
var _markOrder = require("./markOrder");
|
|
40
39
|
var _ADFStages = require("./ADFStages");
|
|
@@ -863,7 +862,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
863
862
|
}
|
|
864
863
|
case 'syncBlock':
|
|
865
864
|
{
|
|
866
|
-
if (attrs && attrs.resourceId
|
|
865
|
+
if (attrs && attrs.resourceId) {
|
|
867
866
|
return {
|
|
868
867
|
type: type,
|
|
869
868
|
attrs: {
|
|
@@ -872,13 +871,12 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
872
871
|
},
|
|
873
872
|
marks: marks
|
|
874
873
|
};
|
|
875
|
-
} else {
|
|
876
|
-
return getValidUnknownNode(node);
|
|
877
874
|
}
|
|
875
|
+
return getValidUnknownNode(node);
|
|
878
876
|
}
|
|
879
877
|
case 'bodiedSyncBlock':
|
|
880
878
|
{
|
|
881
|
-
if (attrs && attrs.resourceId && Array.isArray(content) && content.length > 0
|
|
879
|
+
if (attrs && attrs.resourceId && Array.isArray(content) && content.length > 0) {
|
|
882
880
|
return {
|
|
883
881
|
type: type,
|
|
884
882
|
attrs: {
|
|
@@ -888,9 +886,8 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
888
886
|
marks: marks,
|
|
889
887
|
content: content
|
|
890
888
|
};
|
|
891
|
-
} else {
|
|
892
|
-
return getValidUnknownNode(node);
|
|
893
889
|
}
|
|
890
|
+
return getValidUnknownNode(node);
|
|
894
891
|
}
|
|
895
892
|
}
|
|
896
893
|
}
|
|
@@ -168,6 +168,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
168
168
|
ACTION["WITH_PLUGIN_STATE_CALLED"] = "withPluginStateCalled";
|
|
169
169
|
ACTION["RENDERED"] = "rendered";
|
|
170
170
|
ACTION["RENDERED_SAMPLED"] = "renderedSampled";
|
|
171
|
+
ACTION["REASONING_VIEWED"] = "reasoningViewed";
|
|
171
172
|
ACTION["ON_EDITOR_READY_CALLBACK"] = "onEditorReadyCallback";
|
|
172
173
|
/**
|
|
173
174
|
* @private
|
|
@@ -17,7 +17,6 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
|
17
17
|
import { ButtonItem } from '@atlaskit/menu';
|
|
18
18
|
import { Flex, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
19
19
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
20
|
import Tooltip from '@atlaskit/tooltip';
|
|
22
21
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
|
|
23
22
|
import { IconFallback } from '../../../quick-insert';
|
|
@@ -472,16 +471,13 @@ const ItemContent = /*#__PURE__*/memo(({
|
|
|
472
471
|
space: "space.025"
|
|
473
472
|
}, jsx("div", {
|
|
474
473
|
css: itemTitleWrapper
|
|
475
|
-
},
|
|
474
|
+
}, jsx(Flex, {
|
|
476
475
|
alignItems: "center",
|
|
477
476
|
gap: "space.050"
|
|
478
477
|
}, jsx(Text, {
|
|
479
478
|
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
480
479
|
maxLines: 1
|
|
481
|
-
}, title), lozenge)
|
|
482
|
-
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
483
|
-
maxLines: 1
|
|
484
|
-
}, title), jsx("div", {
|
|
480
|
+
}, title), lozenge), jsx("div", {
|
|
485
481
|
css: itemAfter
|
|
486
482
|
}, keyshortcut && jsx("div", {
|
|
487
483
|
css: shortcutStyle
|
|
@@ -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.6.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -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.6.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useEffect } from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
3
|
-
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
4
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
5
|
import { iconOnlySpacing } from './iconOnlySpacing';
|
|
8
6
|
import { getButtonStyles } from './styles';
|
|
@@ -77,7 +75,7 @@ const FloatingToolbarButton = ({
|
|
|
77
75
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
78
76
|
,
|
|
79
77
|
ref: buttonElement => {
|
|
80
|
-
if (forwardedRef
|
|
78
|
+
if (forwardedRef) {
|
|
81
79
|
if (typeof forwardedRef === 'function') {
|
|
82
80
|
forwardedRef(buttonElement);
|
|
83
81
|
} else if (typeof forwardedRef === 'object') {
|
|
@@ -137,7 +135,5 @@ const FloatingToolbarButton = ({
|
|
|
137
135
|
tabIndex: tabIndex
|
|
138
136
|
}, children))));
|
|
139
137
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const _default_1 = componentWithCondition(() => editorExperiment('platform_synced_block', true), /*#__PURE__*/forwardRef(FloatingToolbarButton), FloatingToolbarButton);
|
|
143
|
-
export default _default_1;
|
|
138
|
+
const FloatingToolbarButtonWithRef = /*#__PURE__*/forwardRef(FloatingToolbarButton);
|
|
139
|
+
export default FloatingToolbarButtonWithRef;
|
|
@@ -13,10 +13,7 @@ export const getBreakoutResizableNodeTypesNew = schema => {
|
|
|
13
13
|
bodiedExtension,
|
|
14
14
|
multiBodiedExtension
|
|
15
15
|
} = schema.nodes;
|
|
16
|
-
const breakoutResizableNodeTypes = [expand, codeBlock, layoutSection];
|
|
17
|
-
if (isExperimentEnabled('platform_synced_block') || isExperimentEnabled('platform_synced_block_jira')) {
|
|
18
|
-
breakoutResizableNodeTypes.push(syncBlock, bodiedSyncBlock);
|
|
19
|
-
}
|
|
16
|
+
const breakoutResizableNodeTypes = [expand, codeBlock, layoutSection, syncBlock, bodiedSyncBlock];
|
|
20
17
|
if (isExperimentEnabled('platform_editor_lovability_resize_dividers_panels')) {
|
|
21
18
|
breakoutResizableNodeTypes.push(rule, panel, panel_c1);
|
|
22
19
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
2
|
import { breakoutResizableNodes } from './breakoutResizableNodes';
|
|
3
|
-
const breakoutResizableNodesOld = ['expand', 'layoutSection', 'codeBlock'];
|
|
4
3
|
const extensionNodes = ['extension', 'bodiedExtension', 'multiBodiedExtension'];
|
|
5
4
|
export const getBreakoutResizableNodes = () => {
|
|
6
|
-
let breakoutResizableNodesList =
|
|
7
|
-
if (isExperimentEnabled('platform_synced_block') || isExperimentEnabled('platform_synced_block_jira')) {
|
|
8
|
-
breakoutResizableNodesList = breakoutResizableNodes;
|
|
9
|
-
}
|
|
5
|
+
let breakoutResizableNodesList = breakoutResizableNodes;
|
|
10
6
|
if (isExperimentEnabled('platform_editor_lovability_resize_dividers_panels')) {
|
|
11
7
|
breakoutResizableNodesList = [...breakoutResizableNodesList, 'rule', 'panel', 'panel_c1'];
|
|
12
8
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
2
|
export const isRichMediaInsideOfBlockNode = (view, pos) => {
|
|
4
3
|
if (typeof pos !== 'number' || isNaN(pos) || !view) {
|
|
5
4
|
return false;
|
|
@@ -11,8 +10,5 @@ export const isRichMediaInsideOfBlockNode = (view, pos) => {
|
|
|
11
10
|
layoutColumn,
|
|
12
11
|
bodiedSyncBlock
|
|
13
12
|
} = view.state.schema.nodes;
|
|
14
|
-
|
|
15
|
-
return !!findParentNodeOfTypeClosestToPos($pos, [expand, nestedExpand, layoutColumn, bodiedSyncBlock]);
|
|
16
|
-
}
|
|
17
|
-
return !!findParentNodeOfTypeClosestToPos($pos, [expand, nestedExpand, layoutColumn]);
|
|
13
|
+
return !!findParentNodeOfTypeClosestToPos($pos, [expand, nestedExpand, layoutColumn, bodiedSyncBlock]);
|
|
18
14
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { inlineNodes, isSafeUrl, PanelType, generateUuid as uuid } from '@atlaskit/adf-schema';
|
|
2
2
|
import { defaultSchema } from '@atlaskit/adf-schema/schema-default';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
4
|
import { isSubSupType } from './isSubSupType';
|
|
6
5
|
import { markOrder } from './markOrder';
|
|
7
6
|
|
|
@@ -829,7 +828,7 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
829
828
|
}
|
|
830
829
|
case 'syncBlock':
|
|
831
830
|
{
|
|
832
|
-
if (attrs && attrs.resourceId
|
|
831
|
+
if (attrs && attrs.resourceId) {
|
|
833
832
|
return {
|
|
834
833
|
type,
|
|
835
834
|
attrs: {
|
|
@@ -838,13 +837,12 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
838
837
|
},
|
|
839
838
|
marks
|
|
840
839
|
};
|
|
841
|
-
} else {
|
|
842
|
-
return getValidUnknownNode(node);
|
|
843
840
|
}
|
|
841
|
+
return getValidUnknownNode(node);
|
|
844
842
|
}
|
|
845
843
|
case 'bodiedSyncBlock':
|
|
846
844
|
{
|
|
847
|
-
if (attrs && attrs.resourceId && Array.isArray(content) && content.length > 0
|
|
845
|
+
if (attrs && attrs.resourceId && Array.isArray(content) && content.length > 0) {
|
|
848
846
|
return {
|
|
849
847
|
type,
|
|
850
848
|
attrs: {
|
|
@@ -854,9 +852,8 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
854
852
|
marks,
|
|
855
853
|
content
|
|
856
854
|
};
|
|
857
|
-
} else {
|
|
858
|
-
return getValidUnknownNode(node);
|
|
859
855
|
}
|
|
856
|
+
return getValidUnknownNode(node);
|
|
860
857
|
}
|
|
861
858
|
}
|
|
862
859
|
}
|
|
@@ -168,6 +168,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
168
168
|
ACTION["WITH_PLUGIN_STATE_CALLED"] = "withPluginStateCalled";
|
|
169
169
|
ACTION["RENDERED"] = "rendered";
|
|
170
170
|
ACTION["RENDERED_SAMPLED"] = "renderedSampled";
|
|
171
|
+
ACTION["REASONING_VIEWED"] = "reasoningViewed";
|
|
171
172
|
ACTION["ON_EDITOR_READY_CALLBACK"] = "onEditorReadyCallback";
|
|
172
173
|
/**
|
|
173
174
|
* @private
|
|
@@ -18,7 +18,6 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
|
18
18
|
import { ButtonItem } from '@atlaskit/menu';
|
|
19
19
|
import { Flex, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
22
21
|
import Tooltip from '@atlaskit/tooltip';
|
|
23
22
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
|
|
24
23
|
import { IconFallback } from '../../../quick-insert';
|
|
@@ -468,16 +467,13 @@ var ItemContent = /*#__PURE__*/memo(function (_ref8) {
|
|
|
468
467
|
space: "space.025"
|
|
469
468
|
}, jsx("div", {
|
|
470
469
|
css: itemTitleWrapper
|
|
471
|
-
},
|
|
470
|
+
}, jsx(Flex, {
|
|
472
471
|
alignItems: "center",
|
|
473
472
|
gap: "space.050"
|
|
474
473
|
}, jsx(Text, {
|
|
475
474
|
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
476
475
|
maxLines: 1
|
|
477
|
-
}, title), lozenge)
|
|
478
|
-
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
479
|
-
maxLines: 1
|
|
480
|
-
}, title), jsx("div", {
|
|
476
|
+
}, title), lozenge), jsx("div", {
|
|
481
477
|
css: itemAfter
|
|
482
478
|
}, keyshortcut && jsx("div", {
|
|
483
479
|
css: shortcutStyle
|
|
@@ -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.6.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -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.6.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -6,9 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
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; }
|
|
7
7
|
import React, { forwardRef, useCallback, useEffect } from 'react';
|
|
8
8
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
9
|
-
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
10
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
10
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
11
|
import { iconOnlySpacing } from './iconOnlySpacing';
|
|
14
12
|
import { getButtonStyles } from './styles';
|
|
@@ -86,7 +84,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
86
84
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
87
85
|
,
|
|
88
86
|
ref: function ref(buttonElement) {
|
|
89
|
-
if (forwardedRef
|
|
87
|
+
if (forwardedRef) {
|
|
90
88
|
if (typeof forwardedRef === 'function') {
|
|
91
89
|
forwardedRef(buttonElement);
|
|
92
90
|
} else if (_typeof(forwardedRef) === 'object') {
|
|
@@ -139,9 +137,5 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
139
137
|
tabIndex: tabIndex
|
|
140
138
|
}, children))));
|
|
141
139
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
var _default_1 = componentWithCondition(function () {
|
|
145
|
-
return editorExperiment('platform_synced_block', true);
|
|
146
|
-
}, /*#__PURE__*/forwardRef(FloatingToolbarButton), FloatingToolbarButton);
|
|
147
|
-
export default _default_1;
|
|
140
|
+
var FloatingToolbarButtonWithRef = /*#__PURE__*/forwardRef(FloatingToolbarButton);
|
|
141
|
+
export default FloatingToolbarButtonWithRef;
|
|
@@ -12,10 +12,7 @@ export var getBreakoutResizableNodeTypesNew = function getBreakoutResizableNodeT
|
|
|
12
12
|
extension = _schema$nodes.extension,
|
|
13
13
|
bodiedExtension = _schema$nodes.bodiedExtension,
|
|
14
14
|
multiBodiedExtension = _schema$nodes.multiBodiedExtension;
|
|
15
|
-
var breakoutResizableNodeTypes = [expand, codeBlock, layoutSection];
|
|
16
|
-
if (isExperimentEnabled('platform_synced_block') || isExperimentEnabled('platform_synced_block_jira')) {
|
|
17
|
-
breakoutResizableNodeTypes.push(syncBlock, bodiedSyncBlock);
|
|
18
|
-
}
|
|
15
|
+
var breakoutResizableNodeTypes = [expand, codeBlock, layoutSection, syncBlock, bodiedSyncBlock];
|
|
19
16
|
if (isExperimentEnabled('platform_editor_lovability_resize_dividers_panels')) {
|
|
20
17
|
breakoutResizableNodeTypes.push(rule, panel, panel_c1);
|
|
21
18
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
3
|
import { breakoutResizableNodes } from './breakoutResizableNodes';
|
|
4
|
-
var breakoutResizableNodesOld = ['expand', 'layoutSection', 'codeBlock'];
|
|
5
4
|
var extensionNodes = ['extension', 'bodiedExtension', 'multiBodiedExtension'];
|
|
6
5
|
export var getBreakoutResizableNodes = function getBreakoutResizableNodes() {
|
|
7
|
-
var breakoutResizableNodesList =
|
|
8
|
-
if (isExperimentEnabled('platform_synced_block') || isExperimentEnabled('platform_synced_block_jira')) {
|
|
9
|
-
breakoutResizableNodesList = breakoutResizableNodes;
|
|
10
|
-
}
|
|
6
|
+
var breakoutResizableNodesList = breakoutResizableNodes;
|
|
11
7
|
if (isExperimentEnabled('platform_editor_lovability_resize_dividers_panels')) {
|
|
12
8
|
breakoutResizableNodesList = [].concat(_toConsumableArray(breakoutResizableNodesList), ['rule', 'panel', 'panel_c1']);
|
|
13
9
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
2
|
export var isRichMediaInsideOfBlockNode = function isRichMediaInsideOfBlockNode(view, pos) {
|
|
4
3
|
if (typeof pos !== 'number' || isNaN(pos) || !view) {
|
|
5
4
|
return false;
|
|
@@ -10,8 +9,5 @@ export var isRichMediaInsideOfBlockNode = function isRichMediaInsideOfBlockNode(
|
|
|
10
9
|
nestedExpand = _view$state$schema$no.nestedExpand,
|
|
11
10
|
layoutColumn = _view$state$schema$no.layoutColumn,
|
|
12
11
|
bodiedSyncBlock = _view$state$schema$no.bodiedSyncBlock;
|
|
13
|
-
|
|
14
|
-
return !!findParentNodeOfTypeClosestToPos($pos, [expand, nestedExpand, layoutColumn, bodiedSyncBlock]);
|
|
15
|
-
}
|
|
16
|
-
return !!findParentNodeOfTypeClosestToPos($pos, [expand, nestedExpand, layoutColumn]);
|
|
12
|
+
return !!findParentNodeOfTypeClosestToPos($pos, [expand, nestedExpand, layoutColumn, bodiedSyncBlock]);
|
|
17
13
|
};
|
|
@@ -5,7 +5,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import { inlineNodes, isSafeUrl, PanelType, generateUuid as uuid } from '@atlaskit/adf-schema';
|
|
6
6
|
import { defaultSchema } from '@atlaskit/adf-schema/schema-default';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
import { isSubSupType } from './isSubSupType';
|
|
10
9
|
import { markOrder } from './markOrder';
|
|
11
10
|
|
|
@@ -831,7 +830,7 @@ export var getValidNode = function getValidNode(originalNode) {
|
|
|
831
830
|
}
|
|
832
831
|
case 'syncBlock':
|
|
833
832
|
{
|
|
834
|
-
if (attrs && attrs.resourceId
|
|
833
|
+
if (attrs && attrs.resourceId) {
|
|
835
834
|
return {
|
|
836
835
|
type: type,
|
|
837
836
|
attrs: {
|
|
@@ -840,13 +839,12 @@ export var getValidNode = function getValidNode(originalNode) {
|
|
|
840
839
|
},
|
|
841
840
|
marks: marks
|
|
842
841
|
};
|
|
843
|
-
} else {
|
|
844
|
-
return getValidUnknownNode(node);
|
|
845
842
|
}
|
|
843
|
+
return getValidUnknownNode(node);
|
|
846
844
|
}
|
|
847
845
|
case 'bodiedSyncBlock':
|
|
848
846
|
{
|
|
849
|
-
if (attrs && attrs.resourceId && Array.isArray(content) && content.length > 0
|
|
847
|
+
if (attrs && attrs.resourceId && Array.isArray(content) && content.length > 0) {
|
|
850
848
|
return {
|
|
851
849
|
type: type,
|
|
852
850
|
attrs: {
|
|
@@ -856,9 +854,8 @@ export var getValidNode = function getValidNode(originalNode) {
|
|
|
856
854
|
marks: marks,
|
|
857
855
|
content: content
|
|
858
856
|
};
|
|
859
|
-
} else {
|
|
860
|
-
return getValidUnknownNode(node);
|
|
861
857
|
}
|
|
858
|
+
return getValidUnknownNode(node);
|
|
862
859
|
}
|
|
863
860
|
}
|
|
864
861
|
}
|
|
@@ -78,5 +78,11 @@ type RightRailViewedAEP = TrackAEP<ACTION.RIGHT_RAIL_VIEWED, ACTION_SUBJECT.AI_S
|
|
|
78
78
|
suggestionType: string;
|
|
79
79
|
}>;
|
|
80
80
|
}, undefined>;
|
|
81
|
-
|
|
81
|
+
type ViewSuggestionReasoningAEP = TrackAEP<ACTION.REASONING_VIEWED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
|
|
82
|
+
affectedBlocks: number;
|
|
83
|
+
interactionPoint: AiSuggestionInteractionPoint;
|
|
84
|
+
reasoningCharacterCount: number;
|
|
85
|
+
suggestionType: string;
|
|
86
|
+
}, undefined>;
|
|
87
|
+
export type AiSuggestionsEventPayload = NoDiffSuggestionAEP | ConversationErrorAEP | RegenerateSuggestionsErrorAEP | EntryPointClickedAEP | EntryPointExposureAEP | AcceptSuggestionAEP | DiscardSuggestionAEP | DismissSuggestionAEP | ViewSuggestionAEP | RightRailViewedAEP | ViewSuggestionReasoningAEP;
|
|
82
88
|
export {};
|
|
@@ -165,6 +165,7 @@ export declare enum ACTION {
|
|
|
165
165
|
WITH_PLUGIN_STATE_CALLED = "withPluginStateCalled",
|
|
166
166
|
RENDERED = "rendered",
|
|
167
167
|
RENDERED_SAMPLED = "renderedSampled",
|
|
168
|
+
REASONING_VIEWED = "reasoningViewed",
|
|
168
169
|
ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
|
|
169
170
|
/**
|
|
170
171
|
* @private
|
|
@@ -34,5 +34,5 @@ export interface Props {
|
|
|
34
34
|
tooltipContent?: TooltipProps['content'];
|
|
35
35
|
tooltipStyle?: React.ForwardRefExoticComponent<any> | React.ComponentType<any>;
|
|
36
36
|
}
|
|
37
|
-
declare const
|
|
38
|
-
export default
|
|
37
|
+
declare const FloatingToolbarButtonWithRef: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
|
|
38
|
+
export default FloatingToolbarButtonWithRef;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "119.
|
|
3
|
+
"version": "119.7.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/"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@atlaskit/popper": "^9.1.0",
|
|
75
75
|
"@atlaskit/primitives": "^22.2.0",
|
|
76
76
|
"@atlaskit/profilecard": "^26.18.0",
|
|
77
|
-
"@atlaskit/prosemirror-history": "^1.
|
|
77
|
+
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
78
78
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
79
79
|
"@atlaskit/react-ufo": "^7.6.0",
|
|
80
80
|
"@atlaskit/section-message": "^10.0.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": "^149.0.0",
|
|
88
88
|
"@atlaskit/tokens": "^16.7.0",
|
|
89
89
|
"@atlaskit/tooltip": "^24.0.0",
|
|
90
90
|
"@atlaskit/width-detector": "^7.0.0",
|