@atlaskit/editor-common 93.1.0 → 93.1.2
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 +16 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +5 -0
- package/dist/cjs/react-node-view/index.js +7 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +5 -0
- package/dist/es2019/react-node-view/index.js +7 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +5 -0
- package/dist/esm/react-node-view/index.js +7 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/types/floating-toolbar.d.ts +2 -1
- package/dist/types/ui/FloatingToolbar/Button.d.ts +2 -1
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingToolbar/Button.d.ts +2 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 93.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149178](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149178)
|
|
8
|
+
[`f3c027c1f8373`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f3c027c1f8373) -
|
|
9
|
+
[ED-24859] Improve LazyNodeView toDOM implementation to avoid LayoutShifts
|
|
10
|
+
|
|
11
|
+
## 93.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`c96a0a38b5aa3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c96a0a38b5aa3) -
|
|
16
|
+
Updated typing for floating toolbar tooltipContent prop to allow manual updating of tooltip
|
|
17
|
+
position, better parity with atlaskit component.
|
|
18
|
+
|
|
3
19
|
## 93.1.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "93.1.
|
|
20
|
+
var packageVersion = "93.1.2";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _analytics = require("../analytics");
|
|
14
15
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
15
16
|
var _utils = require("../utils");
|
|
@@ -46,6 +47,10 @@ function createNodeView(_ref) {
|
|
|
46
47
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
47
48
|
// difference between them and it kills the nodeView
|
|
48
49
|
domRef.classList.add("".concat(nodeViewParams.node.type.name, "View-content-wrap"), "".concat(inlineNodeViewClassname));
|
|
50
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css')) {
|
|
51
|
+
domRef.dataset.prosemirrorNodeName = nodeViewParams.node.type.name;
|
|
52
|
+
domRef.dataset.prosemirrorNodeInline = 'true';
|
|
53
|
+
}
|
|
49
54
|
|
|
50
55
|
// This util is shared for tracking rendering, and the ErrorBoundary that
|
|
51
56
|
// is setup to wrap the Component when rendering
|
|
@@ -22,6 +22,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
22
22
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
23
23
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
26
|
var _analytics = require("../analytics");
|
|
26
27
|
var _eventDispatcher = require("../event-dispatcher");
|
|
27
28
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
@@ -88,6 +89,12 @@ var ReactNodeView = exports.default = /*#__PURE__*/function () {
|
|
|
88
89
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
89
90
|
// difference between them and it kills the nodeView
|
|
90
91
|
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
92
|
+
if (this.domRef && (0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css')) {
|
|
93
|
+
this.domRef.dataset.prosemirrorNodeName = this.node.type.name;
|
|
94
|
+
if (this.node.type.isBlock) {
|
|
95
|
+
this.domRef.dataset.prosemirrorNodeBlock = 'true';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
91
98
|
var _getPerformanceOption = (0, _utils.getPerformanceOptions)(this.view),
|
|
92
99
|
samplingRate = _getPerformanceOption.samplingRate,
|
|
93
100
|
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
@@ -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 = "93.1.
|
|
27
|
+
var packageVersion = "93.1.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "93.1.
|
|
4
|
+
const packageVersion = "93.1.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -7,6 +7,7 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
11
12
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
12
13
|
import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
|
|
@@ -39,6 +40,10 @@ function createNodeView({
|
|
|
39
40
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
40
41
|
// difference between them and it kills the nodeView
|
|
41
42
|
domRef.classList.add(`${nodeViewParams.node.type.name}View-content-wrap`, `${inlineNodeViewClassname}`);
|
|
43
|
+
if (fg('platform_editor_breakout_use_css')) {
|
|
44
|
+
domRef.dataset.prosemirrorNodeName = nodeViewParams.node.type.name;
|
|
45
|
+
domRef.dataset.prosemirrorNodeInline = 'true';
|
|
46
|
+
}
|
|
42
47
|
|
|
43
48
|
// This util is shared for tracking rendering, and the ErrorBoundary that
|
|
44
49
|
// is setup to wrap the Component when rendering
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
5
6
|
import { createDispatch } from '../event-dispatcher';
|
|
6
7
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
@@ -61,6 +62,12 @@ export default class ReactNodeView {
|
|
|
61
62
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
62
63
|
// difference between them and it kills the nodeView
|
|
63
64
|
this.domRef.classList.add(`${this.node.type.name}View-content-wrap`);
|
|
65
|
+
if (this.domRef && fg('platform_editor_breakout_use_css')) {
|
|
66
|
+
this.domRef.dataset.prosemirrorNodeName = this.node.type.name;
|
|
67
|
+
if (this.node.type.isBlock) {
|
|
68
|
+
this.domRef.dataset.prosemirrorNodeBlock = 'true';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
64
71
|
const {
|
|
65
72
|
samplingRate,
|
|
66
73
|
slowThreshold,
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "93.1.
|
|
16
|
+
const packageVersion = "93.1.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "93.1.
|
|
10
|
+
var packageVersion = "93.1.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -10,6 +10,7 @@ import React from 'react';
|
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
12
|
import { jsx } from '@emotion/react';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
14
15
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
15
16
|
import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
|
|
@@ -41,6 +42,10 @@ function createNodeView(_ref) {
|
|
|
41
42
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
42
43
|
// difference between them and it kills the nodeView
|
|
43
44
|
domRef.classList.add("".concat(nodeViewParams.node.type.name, "View-content-wrap"), "".concat(inlineNodeViewClassname));
|
|
45
|
+
if (fg('platform_editor_breakout_use_css')) {
|
|
46
|
+
domRef.dataset.prosemirrorNodeName = nodeViewParams.node.type.name;
|
|
47
|
+
domRef.dataset.prosemirrorNodeInline = 'true';
|
|
48
|
+
}
|
|
44
49
|
|
|
45
50
|
// This util is shared for tracking rendering, and the ErrorBoundary that
|
|
46
51
|
// is setup to wrap the Component when rendering
|
|
@@ -3,6 +3,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
7
8
|
import { createDispatch } from '../event-dispatcher';
|
|
8
9
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
@@ -69,6 +70,12 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
69
70
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
70
71
|
// difference between them and it kills the nodeView
|
|
71
72
|
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
73
|
+
if (this.domRef && fg('platform_editor_breakout_use_css')) {
|
|
74
|
+
this.domRef.dataset.prosemirrorNodeName = this.node.type.name;
|
|
75
|
+
if (this.node.type.isBlock) {
|
|
76
|
+
this.domRef.dataset.prosemirrorNodeBlock = 'true';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
72
79
|
var _getPerformanceOption = getPerformanceOptions(this.view),
|
|
73
80
|
samplingRate = _getPerformanceOption.samplingRate,
|
|
74
81
|
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "93.1.
|
|
24
|
+
var packageVersion = "93.1.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -4,6 +4,7 @@ import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { EmojiId } from '@atlaskit/emoji/types';
|
|
7
|
+
import type { TooltipProps } from '@atlaskit/tooltip';
|
|
7
8
|
import type { DispatchAnalyticsEvent } from '../analytics/types/dispatch-analytics-event';
|
|
8
9
|
import type { ProviderFactory } from '../provider-factory';
|
|
9
10
|
import type { PaletteColor } from '../ui-color/ColorPalette/Palettes/type';
|
|
@@ -119,7 +120,7 @@ export type FloatingToolbarButton<T extends {}> = {
|
|
|
119
120
|
href?: string;
|
|
120
121
|
target?: string;
|
|
121
122
|
className?: string;
|
|
122
|
-
tooltipContent?:
|
|
123
|
+
tooltipContent?: TooltipProps['content'];
|
|
123
124
|
testId?: string;
|
|
124
125
|
hideTooltipOnClick?: boolean;
|
|
125
126
|
confirmDialog?: ConfirmDialogOptions | (() => ConfirmDialogOptions);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type TooltipProps } from '@atlaskit/tooltip';
|
|
2
3
|
import type { ButtonAppearance } from '../../types';
|
|
3
4
|
export type { ButtonAppearance };
|
|
4
5
|
export interface Props {
|
|
@@ -21,7 +22,7 @@ export interface Props {
|
|
|
21
22
|
target?: string;
|
|
22
23
|
children?: React.ReactNode;
|
|
23
24
|
className?: string;
|
|
24
|
-
tooltipContent?:
|
|
25
|
+
tooltipContent?: TooltipProps['content'];
|
|
25
26
|
tooltipStyle?: React.ForwardRefExoticComponent<any> | React.ComponentType<any>;
|
|
26
27
|
testId?: string;
|
|
27
28
|
hideTooltipOnClick?: boolean;
|
|
@@ -4,6 +4,7 @@ import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { EmojiId } from '@atlaskit/emoji/types';
|
|
7
|
+
import type { TooltipProps } from '@atlaskit/tooltip';
|
|
7
8
|
import type { DispatchAnalyticsEvent } from '../analytics/types/dispatch-analytics-event';
|
|
8
9
|
import type { ProviderFactory } from '../provider-factory';
|
|
9
10
|
import type { PaletteColor } from '../ui-color/ColorPalette/Palettes/type';
|
|
@@ -119,7 +120,7 @@ export type FloatingToolbarButton<T extends {}> = {
|
|
|
119
120
|
href?: string;
|
|
120
121
|
target?: string;
|
|
121
122
|
className?: string;
|
|
122
|
-
tooltipContent?:
|
|
123
|
+
tooltipContent?: TooltipProps['content'];
|
|
123
124
|
testId?: string;
|
|
124
125
|
hideTooltipOnClick?: boolean;
|
|
125
126
|
confirmDialog?: ConfirmDialogOptions | (() => ConfirmDialogOptions);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type TooltipProps } from '@atlaskit/tooltip';
|
|
2
3
|
import type { ButtonAppearance } from '../../types';
|
|
3
4
|
export type { ButtonAppearance };
|
|
4
5
|
export interface Props {
|
|
@@ -21,7 +22,7 @@ export interface Props {
|
|
|
21
22
|
target?: string;
|
|
22
23
|
children?: React.ReactNode;
|
|
23
24
|
className?: string;
|
|
24
|
-
tooltipContent?:
|
|
25
|
+
tooltipContent?: TooltipProps['content'];
|
|
25
26
|
tooltipStyle?: React.ForwardRefExoticComponent<any> | React.ComponentType<any>;
|
|
26
27
|
testId?: string;
|
|
27
28
|
hideTooltipOnClick?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "93.1.
|
|
3
|
+
"version": "93.1.2",
|
|
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/"
|
|
@@ -227,6 +227,9 @@
|
|
|
227
227
|
"platform.editor.media.extended-resize-experience": {
|
|
228
228
|
"type": "boolean"
|
|
229
229
|
},
|
|
230
|
+
"platform_editor_breakout_use_css": {
|
|
231
|
+
"type": "boolean"
|
|
232
|
+
},
|
|
230
233
|
"platform.editor.media.inline-image.base-support": {
|
|
231
234
|
"type": "boolean"
|
|
232
235
|
},
|