@atlaskit/editor-core 215.9.9 → 215.10.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 +18 -0
- package/dist/cjs/composable-editor/core-editor.js +2 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +2 -2
- package/dist/cjs/create-editor/ReactEditorView.js +3 -1
- package/dist/cjs/ui/EditorContentContainer/styles/expandStyles.js +40 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +2 -0
- package/dist/es2019/create-editor/ErrorBoundary.js +3 -0
- package/dist/es2019/create-editor/ReactEditorView.js +3 -0
- package/dist/es2019/ui/EditorContentContainer/styles/expandStyles.js +41 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +2 -0
- package/dist/esm/create-editor/ErrorBoundary.js +3 -1
- package/dist/esm/create-editor/ReactEditorView.js +3 -0
- package/dist/esm/ui/EditorContentContainer/styles/expandStyles.js +41 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +14 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 215.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 215.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`236d9310035ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/236d9310035ae) -
|
|
14
|
+
[https://product-fabric.atlassian.net/browse/ED-29205](ED-29205) - use native DOM element for
|
|
15
|
+
editor expand icon
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 215.9.9
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -33,6 +33,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
33
33
|
* @jsxRuntime classic
|
|
34
34
|
* @jsx jsx
|
|
35
35
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
36
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
36
37
|
// Ignored via go/ees005
|
|
37
38
|
// eslint-disable-next-line import/no-named-as-default
|
|
38
39
|
/**
|
|
@@ -120,6 +121,7 @@ var useMemoEditorFeatureFlags = function useMemoEditorFeatureFlags(featureFlags)
|
|
|
120
121
|
* @example
|
|
121
122
|
*/
|
|
122
123
|
function CoreEditor(props) {
|
|
124
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
123
125
|
var editorSessionId = (0, _react.useRef)((0, _v.default)());
|
|
124
126
|
var data = (0, _react.useMemo)(function () {
|
|
125
127
|
return {
|
|
@@ -22,7 +22,7 @@ var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
|
22
22
|
var _outdatedBrowsers = require("../utils/outdatedBrowsers");
|
|
23
23
|
var _WithEditorView = require("./WithEditorView");
|
|
24
24
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
25
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
26
26
|
// Ignored via go/ees005
|
|
27
27
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
28
|
var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
@@ -45,7 +45,7 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
|
|
|
45
45
|
return _this.getProductName();
|
|
46
46
|
case 2:
|
|
47
47
|
product = _context.sent;
|
|
48
|
-
error = analyticsErrorPayload.error, errorInfo = analyticsErrorPayload.errorInfo;
|
|
48
|
+
error = analyticsErrorPayload.error, errorInfo = analyticsErrorPayload.errorInfo; // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
49
49
|
sharedId = (0, _uuid.default)();
|
|
50
50
|
browserInfo = ((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) || 'unknown';
|
|
51
51
|
attributes = {
|
|
@@ -54,7 +54,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
54
54
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
55
55
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
56
56
|
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; }
|
|
57
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
57
|
+
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) { (0, _defineProperty2.default)(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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
58
58
|
var EDIT_AREA_ID = 'ak-editor-textarea';
|
|
59
59
|
function ReactEditorView(props) {
|
|
60
60
|
var _pluginInjectionAPI$c, _media, _linking, _document$querySelect, _props$render, _props$render2;
|
|
@@ -79,6 +79,8 @@ function ReactEditorView(props) {
|
|
|
79
79
|
// ProseMirror is instantiated prior to the initial React render cycle,
|
|
80
80
|
// so we allow transactions by default, to avoid discarding the initial one.
|
|
81
81
|
var canDispatchTransactions = (0, _react.useRef)(true);
|
|
82
|
+
|
|
83
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
82
84
|
var editorId = (0, _react.useRef)((0, _v.default)());
|
|
83
85
|
var eventDispatcher = (0, _react.useMemo)(function () {
|
|
84
86
|
return new _eventDispatcher.EventDispatcher();
|
|
@@ -163,6 +163,39 @@ var expandStyles = exports.expandStyles = (0, _react.css)({
|
|
|
163
163
|
overflow: 'visible'
|
|
164
164
|
},
|
|
165
165
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
166
|
+
'.ak-editor-expand__icon-button': {
|
|
167
|
+
appearance: 'none',
|
|
168
|
+
width: "var(--ds-space-300, 24px)",
|
|
169
|
+
height: "var(--ds-space-300, 24px)",
|
|
170
|
+
border: 'none',
|
|
171
|
+
borderRadius: "var(--ds-radius-small, 4px)",
|
|
172
|
+
background: "var(--ds-background-neutral-subtle, #00000000)",
|
|
173
|
+
padding: 0,
|
|
174
|
+
margin: 0,
|
|
175
|
+
display: 'flex',
|
|
176
|
+
alignItems: 'center',
|
|
177
|
+
justifyContent: 'center',
|
|
178
|
+
cursor: 'pointer',
|
|
179
|
+
'&:disabled': {
|
|
180
|
+
cursor: 'not-allowed'
|
|
181
|
+
},
|
|
182
|
+
'&:focus-visible': {
|
|
183
|
+
outline: "2px solid ".concat("var(--ds-border-focused, #388BFF)"),
|
|
184
|
+
outlineOffset: "var(--ds-space-025, 2px)"
|
|
185
|
+
},
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
187
|
+
'&:hover:not(:disabled)': {
|
|
188
|
+
background: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
|
|
189
|
+
},
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
191
|
+
'.ak-editor-expand__icon-svg': {
|
|
192
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
193
|
+
transform: 'rotate(0deg)',
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
195
|
+
transition: "transform 0.2s ".concat(_editorSharedStyles.akEditorSwoopCubicBezier, ";")
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
166
199
|
'.ak-editor-expand__expanded': {
|
|
167
200
|
background: "var(--ds-background-neutral-subtle, #00000000)",
|
|
168
201
|
borderColor: "var(--ds-border, #091E4224)",
|
|
@@ -170,6 +203,13 @@ var expandStyles = exports.expandStyles = (0, _react.css)({
|
|
|
170
203
|
'.ak-editor-expand__content': {
|
|
171
204
|
paddingTop: "var(--ds-space-100, 8px)"
|
|
172
205
|
// If fg('platform_editor_nested_dnd_styles_changes') then this needs to be extended
|
|
206
|
+
},
|
|
207
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
208
|
+
'.ak-editor-expand__icon-button': {
|
|
209
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
210
|
+
'.ak-editor-expand__icon-svg': {
|
|
211
|
+
transform: 'rotate(90deg)'
|
|
212
|
+
}
|
|
173
213
|
}
|
|
174
214
|
},
|
|
175
215
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -8,6 +8,7 @@ import { useCallback, useMemo, useRef, Fragment } from 'react';
|
|
|
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
10
|
import isEqual from 'lodash/isEqual';
|
|
11
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
11
12
|
import uuid from 'uuid/v4';
|
|
12
13
|
import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
13
14
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
@@ -118,6 +119,7 @@ const useMemoEditorFeatureFlags = featureFlags => {
|
|
|
118
119
|
* @example
|
|
119
120
|
*/
|
|
120
121
|
export function CoreEditor(props) {
|
|
122
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
121
123
|
const editorSessionId = useRef(uuid());
|
|
122
124
|
const data = useMemo(() => {
|
|
123
125
|
return {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
5
|
import uuid from 'uuid';
|
|
4
6
|
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
7
|
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
@@ -23,6 +25,7 @@ export class ErrorBoundaryWithEditorView extends React.Component {
|
|
|
23
25
|
error,
|
|
24
26
|
errorInfo
|
|
25
27
|
} = analyticsErrorPayload;
|
|
28
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
26
29
|
const sharedId = uuid();
|
|
27
30
|
const browserInfo = ((_window = window) === null || _window === void 0 ? void 0 : (_window$navigator = _window.navigator) === null || _window$navigator === void 0 ? void 0 : _window$navigator.userAgent) || 'unknown';
|
|
28
31
|
const attributes = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
4
|
import uuid from 'uuid/v4';
|
|
4
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
@@ -61,6 +62,8 @@ export function ReactEditorView(props) {
|
|
|
61
62
|
// ProseMirror is instantiated prior to the initial React render cycle,
|
|
62
63
|
// so we allow transactions by default, to avoid discarding the initial one.
|
|
63
64
|
const canDispatchTransactions = useRef(true);
|
|
65
|
+
|
|
66
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
64
67
|
const editorId = useRef(uuid());
|
|
65
68
|
const eventDispatcher = useMemo(() => new EventDispatcher(), []);
|
|
66
69
|
const config = useRef({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { akEditorFullPageDefaultFontSize, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
5
|
export const expandStyles = css({
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -156,6 +156,39 @@ export const expandStyles = css({
|
|
|
156
156
|
overflow: 'visible'
|
|
157
157
|
},
|
|
158
158
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
159
|
+
'.ak-editor-expand__icon-button': {
|
|
160
|
+
appearance: 'none',
|
|
161
|
+
width: "var(--ds-space-300, 24px)",
|
|
162
|
+
height: "var(--ds-space-300, 24px)",
|
|
163
|
+
border: 'none',
|
|
164
|
+
borderRadius: "var(--ds-radius-small, 4px)",
|
|
165
|
+
background: "var(--ds-background-neutral-subtle, #00000000)",
|
|
166
|
+
padding: 0,
|
|
167
|
+
margin: 0,
|
|
168
|
+
display: 'flex',
|
|
169
|
+
alignItems: 'center',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
cursor: 'pointer',
|
|
172
|
+
'&:disabled': {
|
|
173
|
+
cursor: 'not-allowed'
|
|
174
|
+
},
|
|
175
|
+
'&:focus-visible': {
|
|
176
|
+
outline: `2px solid ${"var(--ds-border-focused, #388BFF)"}`,
|
|
177
|
+
outlineOffset: "var(--ds-space-025, 2px)"
|
|
178
|
+
},
|
|
179
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
180
|
+
'&:hover:not(:disabled)': {
|
|
181
|
+
background: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
|
|
182
|
+
},
|
|
183
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
184
|
+
'.ak-editor-expand__icon-svg': {
|
|
185
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
186
|
+
transform: 'rotate(0deg)',
|
|
187
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
188
|
+
transition: `transform 0.2s ${akEditorSwoopCubicBezier};`
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
159
192
|
'.ak-editor-expand__expanded': {
|
|
160
193
|
background: "var(--ds-background-neutral-subtle, #00000000)",
|
|
161
194
|
borderColor: "var(--ds-border, #091E4224)",
|
|
@@ -163,6 +196,13 @@ export const expandStyles = css({
|
|
|
163
196
|
'.ak-editor-expand__content': {
|
|
164
197
|
paddingTop: "var(--ds-space-100, 8px)"
|
|
165
198
|
// If fg('platform_editor_nested_dnd_styles_changes') then this needs to be extended
|
|
199
|
+
},
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
201
|
+
'.ak-editor-expand__icon-button': {
|
|
202
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
203
|
+
'.ak-editor-expand__icon-svg': {
|
|
204
|
+
transform: 'rotate(90deg)'
|
|
205
|
+
}
|
|
166
206
|
}
|
|
167
207
|
},
|
|
168
208
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "
|
|
2
|
+
export const version = "215.10.0";
|
|
@@ -11,6 +11,7 @@ import { useCallback, useMemo, useRef, Fragment } from 'react';
|
|
|
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
13
|
import isEqual from 'lodash/isEqual';
|
|
14
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
15
|
import uuid from 'uuid/v4';
|
|
15
16
|
import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
16
17
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
@@ -116,6 +117,7 @@ var useMemoEditorFeatureFlags = function useMemoEditorFeatureFlags(featureFlags)
|
|
|
116
117
|
* @example
|
|
117
118
|
*/
|
|
118
119
|
export function CoreEditor(props) {
|
|
120
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
119
121
|
var editorSessionId = useRef(uuid());
|
|
120
122
|
var data = useMemo(function () {
|
|
121
123
|
return {
|
|
@@ -9,6 +9,8 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
9
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
12
14
|
import uuid from 'uuid';
|
|
13
15
|
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
14
16
|
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
@@ -38,7 +40,7 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
38
40
|
return _this.getProductName();
|
|
39
41
|
case 2:
|
|
40
42
|
product = _context.sent;
|
|
41
|
-
error = analyticsErrorPayload.error, errorInfo = analyticsErrorPayload.errorInfo;
|
|
43
|
+
error = analyticsErrorPayload.error, errorInfo = analyticsErrorPayload.errorInfo; // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
42
44
|
sharedId = uuid();
|
|
43
45
|
browserInfo = ((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) || 'unknown';
|
|
44
46
|
attributes = {
|
|
@@ -8,6 +8,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
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; }
|
|
9
9
|
import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
11
12
|
import uuid from 'uuid/v4';
|
|
12
13
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
13
14
|
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
@@ -69,6 +70,8 @@ export function ReactEditorView(props) {
|
|
|
69
70
|
// ProseMirror is instantiated prior to the initial React render cycle,
|
|
70
71
|
// so we allow transactions by default, to avoid discarding the initial one.
|
|
71
72
|
var canDispatchTransactions = useRef(true);
|
|
73
|
+
|
|
74
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
72
75
|
var editorId = useRef(uuid());
|
|
73
76
|
var eventDispatcher = useMemo(function () {
|
|
74
77
|
return new EventDispatcher();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { akEditorFullPageDefaultFontSize, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
5
|
export var expandStyles = css({
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -156,6 +156,39 @@ export var expandStyles = css({
|
|
|
156
156
|
overflow: 'visible'
|
|
157
157
|
},
|
|
158
158
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
159
|
+
'.ak-editor-expand__icon-button': {
|
|
160
|
+
appearance: 'none',
|
|
161
|
+
width: "var(--ds-space-300, 24px)",
|
|
162
|
+
height: "var(--ds-space-300, 24px)",
|
|
163
|
+
border: 'none',
|
|
164
|
+
borderRadius: "var(--ds-radius-small, 4px)",
|
|
165
|
+
background: "var(--ds-background-neutral-subtle, #00000000)",
|
|
166
|
+
padding: 0,
|
|
167
|
+
margin: 0,
|
|
168
|
+
display: 'flex',
|
|
169
|
+
alignItems: 'center',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
cursor: 'pointer',
|
|
172
|
+
'&:disabled': {
|
|
173
|
+
cursor: 'not-allowed'
|
|
174
|
+
},
|
|
175
|
+
'&:focus-visible': {
|
|
176
|
+
outline: "2px solid ".concat("var(--ds-border-focused, #388BFF)"),
|
|
177
|
+
outlineOffset: "var(--ds-space-025, 2px)"
|
|
178
|
+
},
|
|
179
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
180
|
+
'&:hover:not(:disabled)': {
|
|
181
|
+
background: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
|
|
182
|
+
},
|
|
183
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
184
|
+
'.ak-editor-expand__icon-svg': {
|
|
185
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
186
|
+
transform: 'rotate(0deg)',
|
|
187
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
188
|
+
transition: "transform 0.2s ".concat(akEditorSwoopCubicBezier, ";")
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
159
192
|
'.ak-editor-expand__expanded': {
|
|
160
193
|
background: "var(--ds-background-neutral-subtle, #00000000)",
|
|
161
194
|
borderColor: "var(--ds-border, #091E4224)",
|
|
@@ -163,6 +196,13 @@ export var expandStyles = css({
|
|
|
163
196
|
'.ak-editor-expand__content': {
|
|
164
197
|
paddingTop: "var(--ds-space-100, 8px)"
|
|
165
198
|
// If fg('platform_editor_nested_dnd_styles_changes') then this needs to be extended
|
|
199
|
+
},
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
201
|
+
'.ak-editor-expand__icon-button': {
|
|
202
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
203
|
+
'.ak-editor-expand__icon-svg': {
|
|
204
|
+
transform: 'rotate(90deg)'
|
|
205
|
+
}
|
|
166
206
|
}
|
|
167
207
|
},
|
|
168
208
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "
|
|
2
|
+
export var version = "215.10.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "215.
|
|
3
|
+
"version": "215.10.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/analytics-namespaced-context": "^7.1.0",
|
|
45
45
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
|
-
"@atlaskit/button": "^23.
|
|
47
|
+
"@atlaskit/button": "^23.6.0",
|
|
48
48
|
"@atlaskit/css": "^0.15.0",
|
|
49
49
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
50
50
|
"@atlaskit/editor-performance-metrics": "^2.1.0",
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"@atlaskit/icon": "^28.5.0",
|
|
60
60
|
"@atlaskit/link": "^3.2.0",
|
|
61
61
|
"@atlaskit/media-card": "^79.6.0",
|
|
62
|
-
"@atlaskit/mention": "^24.
|
|
62
|
+
"@atlaskit/mention": "^24.4.0",
|
|
63
63
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
64
64
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
65
65
|
"@atlaskit/react-ufo": "^4.14.0",
|
|
66
66
|
"@atlaskit/task-decision": "^19.2.0",
|
|
67
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
68
|
-
"@atlaskit/tokens": "^
|
|
69
|
-
"@atlaskit/tooltip": "^20.
|
|
67
|
+
"@atlaskit/tmp-editor-statsig": "^13.32.0",
|
|
68
|
+
"@atlaskit/tokens": "^8.0.0",
|
|
69
|
+
"@atlaskit/tooltip": "^20.8.0",
|
|
70
70
|
"@atlaskit/width-detector": "^5.0.0",
|
|
71
71
|
"@babel/runtime": "^7.0.0",
|
|
72
72
|
"@emotion/react": "^11.7.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"uuid": "^3.1.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@atlaskit/editor-common": "^110.
|
|
84
|
+
"@atlaskit/editor-common": "^110.24.0",
|
|
85
85
|
"@atlaskit/link-provider": "^4.0.0",
|
|
86
86
|
"@atlaskit/media-core": "^37.0.0",
|
|
87
87
|
"react": "^18.2.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@atlaskit/analytics-listeners": "^9.1.0",
|
|
96
96
|
"@atlaskit/collab-provider": "^14.0.0",
|
|
97
97
|
"@atlaskit/editor-plugin-annotation": "^6.2.0",
|
|
98
|
-
"@atlaskit/editor-plugin-card": "^11.
|
|
98
|
+
"@atlaskit/editor-plugin-card": "^11.5.0",
|
|
99
99
|
"@atlaskit/editor-plugin-list": "^8.2.0",
|
|
100
100
|
"@atlaskit/editor-plugin-paste": "^7.4.0",
|
|
101
101
|
"@atlaskit/link-provider": "^4.0.0",
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
106
106
|
"@atlaskit/modal-dialog": "^14.6.0",
|
|
107
107
|
"@atlaskit/primitives": "^16.1.0",
|
|
108
|
-
"@atlaskit/renderer": "^124.
|
|
108
|
+
"@atlaskit/renderer": "^124.10.0",
|
|
109
109
|
"@atlaskit/section-message": "^8.9.0",
|
|
110
|
-
"@atlaskit/smart-card": "^43.
|
|
110
|
+
"@atlaskit/smart-card": "^43.6.0",
|
|
111
111
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
112
112
|
"@atlaskit/toggle": "^15.1.0",
|
|
113
113
|
"@atlaskit/util-data-test": "^18.3.0",
|
|
@@ -387,6 +387,10 @@
|
|
|
387
387
|
},
|
|
388
388
|
"platform_editor_ai_aifc_patch_beta_2": {
|
|
389
389
|
"type": "boolean"
|
|
390
|
+
},
|
|
391
|
+
"platform_editor_table_width_refactor": {
|
|
392
|
+
"type": "boolean",
|
|
393
|
+
"referenceOnly": true
|
|
390
394
|
}
|
|
391
395
|
},
|
|
392
396
|
"stricter": {
|