@atlaskit/editor-core 203.12.0 → 203.12.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 +12 -0
- package/dist/cjs/actions/index.js +6 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +7 -1
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +13 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +6 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +7 -1
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +13 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +6 -0
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +7 -1
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +13 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/actions/index.d.ts +6 -0
- package/dist/types-ts4.5/actions/index.d.ts +6 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 203.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#106923](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/106923)
|
|
8
|
+
[`5f44122535833`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5f44122535833) -
|
|
9
|
+
ED-26253 Update table css selectors so they don't get applied to table elements not owned by the
|
|
10
|
+
editor and nested inside an editor table
|
|
11
|
+
- [#107631](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107631)
|
|
12
|
+
[`4dd152f2bd7cb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4dd152f2bd7cb) -
|
|
13
|
+
updated jsdoc to include example for new replaceDocument core action
|
|
14
|
+
|
|
3
15
|
## 203.12.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -329,6 +329,12 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
329
329
|
/**
|
|
330
330
|
* @deprecated - please use `replaceDocument` found in the core plugin actions instead
|
|
331
331
|
* using this will reset your Editor State which could cause some things to break (like emojis)
|
|
332
|
+
* @example - use the `replaceDocument` from the core plugin actions instead
|
|
333
|
+
* ```ts
|
|
334
|
+
* const { editorApi, preset } = usePreset(...);
|
|
335
|
+
// where you need it
|
|
336
|
+
editorApi?.core.actions.replaceDocument(value);
|
|
337
|
+
return <ComposableEditor preset={preset} ... />
|
|
332
338
|
*/
|
|
333
339
|
}, {
|
|
334
340
|
key: "replaceDocument",
|
|
@@ -185,6 +185,7 @@ var hiddenStyle = (0, _react2.css)({
|
|
|
185
185
|
transition: '200ms opacity, 200ms visibility, 200ms transform',
|
|
186
186
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
187
187
|
'&[data-hidden="true"]': {
|
|
188
|
+
height: 0,
|
|
188
189
|
visibility: 'hidden',
|
|
189
190
|
opacity: 0
|
|
190
191
|
// transition: '0ms opacity, 0ms visibility, 0ms transform',
|
|
@@ -11,6 +11,7 @@ var _react2 = require("@emotion/react");
|
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
15
|
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
15
16
|
var _ContextPanel = require("../../ContextPanel");
|
|
16
17
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
@@ -53,10 +54,15 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
53
54
|
css: [
|
|
54
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
55
56
|
_StyledComponents.contentArea,
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
58
|
+
(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden &&
|
|
56
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
57
|
-
|
|
60
|
+
_StyledComponents.contentAreaHeightNoToolbar],
|
|
58
61
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
59
62
|
ref: containerRef
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
64
|
+
,
|
|
65
|
+
className: !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden ? 'ak-editor-content-area-no-toolbar' : undefined
|
|
60
66
|
}, (0, _react2.jsx)("div", {
|
|
61
67
|
css:
|
|
62
68
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -54,6 +54,12 @@ var contentArea = exports.contentArea = function contentArea() {
|
|
|
54
54
|
flexDirection: 'row',
|
|
55
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
56
|
height: "calc(100% - ".concat(editorToolbarHeight, ")"),
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
58
|
+
'&.ak-editor-content-area-no-toolbar': {
|
|
59
|
+
// The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
|
|
60
|
+
// to match the toolbar height
|
|
61
|
+
height: "calc(100% + 1px)"
|
|
62
|
+
},
|
|
57
63
|
boxSizing: 'border-box',
|
|
58
64
|
margin: 0,
|
|
59
65
|
padding: 0,
|
|
@@ -151,6 +157,13 @@ var editorContentArea = (0, _react.css)({
|
|
|
151
157
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
152
158
|
lineHeight: '24px',
|
|
153
159
|
paddingTop: "var(--ds-space-600, 48px)",
|
|
160
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
161
|
+
'.ak-editor-content-area-no-toolbar &': {
|
|
162
|
+
// When the toolbar is hidden, we don't want content to jump up
|
|
163
|
+
// the extra 1px is to account for the border on the toolbar
|
|
164
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
165
|
+
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ", (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)(), " + 1px)")
|
|
166
|
+
},
|
|
154
167
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
155
168
|
height: 'calc( 100% - 105px )',
|
|
156
169
|
width: '100%',
|
|
@@ -243,6 +243,12 @@ export default class EditorActions {
|
|
|
243
243
|
/**
|
|
244
244
|
* @deprecated - please use `replaceDocument` found in the core plugin actions instead
|
|
245
245
|
* using this will reset your Editor State which could cause some things to break (like emojis)
|
|
246
|
+
* @example - use the `replaceDocument` from the core plugin actions instead
|
|
247
|
+
* ```ts
|
|
248
|
+
* const { editorApi, preset } = usePreset(...);
|
|
249
|
+
// where you need it
|
|
250
|
+
editorApi?.core.actions.replaceDocument(value);
|
|
251
|
+
return <ComposableEditor preset={preset} ... />
|
|
246
252
|
*/
|
|
247
253
|
replaceDocument(
|
|
248
254
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -167,6 +167,7 @@ const hiddenStyle = css({
|
|
|
167
167
|
transition: '200ms opacity, 200ms visibility, 200ms transform',
|
|
168
168
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
169
169
|
'&[data-hidden="true"]': {
|
|
170
|
+
height: 0,
|
|
170
171
|
visibility: 'hidden',
|
|
171
172
|
opacity: 0
|
|
172
173
|
// transition: '0ms opacity, 0ms visibility, 0ms transform',
|
|
@@ -10,6 +10,7 @@ import { jsx, useTheme } from '@emotion/react';
|
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
14
|
// Ignored via go/ees005
|
|
14
15
|
// eslint-disable-next-line import/no-named-as-default
|
|
15
16
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
@@ -40,10 +41,15 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
40
41
|
css: [
|
|
41
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
42
43
|
contentArea,
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
45
|
+
editorExperiment('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden &&
|
|
43
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
44
|
-
|
|
47
|
+
contentAreaHeightNoToolbar],
|
|
45
48
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
46
49
|
ref: containerRef
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
51
|
+
,
|
|
52
|
+
className: !editorExperiment('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden ? 'ak-editor-content-area-no-toolbar' : undefined
|
|
47
53
|
}, jsx("div", {
|
|
48
54
|
css:
|
|
49
55
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -44,6 +44,12 @@ export const contentArea = () => {
|
|
|
44
44
|
flexDirection: 'row',
|
|
45
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
46
46
|
height: `calc(100% - ${editorToolbarHeight})`,
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
48
|
+
'&.ak-editor-content-area-no-toolbar': {
|
|
49
|
+
// The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
|
|
50
|
+
// to match the toolbar height
|
|
51
|
+
height: `calc(100% + 1px)`
|
|
52
|
+
},
|
|
47
53
|
boxSizing: 'border-box',
|
|
48
54
|
margin: 0,
|
|
49
55
|
padding: 0,
|
|
@@ -136,6 +142,13 @@ const editorContentArea = css({
|
|
|
136
142
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
137
143
|
lineHeight: '24px',
|
|
138
144
|
paddingTop: "var(--ds-space-600, 48px)",
|
|
145
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
146
|
+
'.ak-editor-content-area-no-toolbar &': {
|
|
147
|
+
// When the toolbar is hidden, we don't want content to jump up
|
|
148
|
+
// the extra 1px is to account for the border on the toolbar
|
|
149
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
150
|
+
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()} + 1px)`
|
|
151
|
+
},
|
|
139
152
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
140
153
|
height: 'calc( 100% - 105px )',
|
|
141
154
|
width: '100%',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "203.12.
|
|
2
|
+
export const version = "203.12.1";
|
|
@@ -323,6 +323,12 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
323
323
|
/**
|
|
324
324
|
* @deprecated - please use `replaceDocument` found in the core plugin actions instead
|
|
325
325
|
* using this will reset your Editor State which could cause some things to break (like emojis)
|
|
326
|
+
* @example - use the `replaceDocument` from the core plugin actions instead
|
|
327
|
+
* ```ts
|
|
328
|
+
* const { editorApi, preset } = usePreset(...);
|
|
329
|
+
// where you need it
|
|
330
|
+
editorApi?.core.actions.replaceDocument(value);
|
|
331
|
+
return <ComposableEditor preset={preset} ... />
|
|
326
332
|
*/
|
|
327
333
|
}, {
|
|
328
334
|
key: "replaceDocument",
|
|
@@ -174,6 +174,7 @@ var hiddenStyle = css({
|
|
|
174
174
|
transition: '200ms opacity, 200ms visibility, 200ms transform',
|
|
175
175
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
176
176
|
'&[data-hidden="true"]': {
|
|
177
|
+
height: 0,
|
|
177
178
|
visibility: 'hidden',
|
|
178
179
|
opacity: 0
|
|
179
180
|
// transition: '0ms opacity, 0ms visibility, 0ms transform',
|
|
@@ -10,6 +10,7 @@ import { jsx, useTheme } from '@emotion/react';
|
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
14
|
// Ignored via go/ees005
|
|
14
15
|
// eslint-disable-next-line import/no-named-as-default
|
|
15
16
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
@@ -42,10 +43,15 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
42
43
|
css: [
|
|
43
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
44
45
|
contentArea,
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
47
|
+
editorExperiment('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden &&
|
|
45
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
46
|
-
|
|
49
|
+
contentAreaHeightNoToolbar],
|
|
47
50
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
48
51
|
ref: containerRef
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
53
|
+
,
|
|
54
|
+
className: !editorExperiment('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden ? 'ak-editor-content-area-no-toolbar' : undefined
|
|
49
55
|
}, jsx("div", {
|
|
50
56
|
css:
|
|
51
57
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -47,6 +47,12 @@ export var contentArea = function contentArea() {
|
|
|
47
47
|
flexDirection: 'row',
|
|
48
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
49
49
|
height: "calc(100% - ".concat(editorToolbarHeight, ")"),
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
51
|
+
'&.ak-editor-content-area-no-toolbar': {
|
|
52
|
+
// The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
|
|
53
|
+
// to match the toolbar height
|
|
54
|
+
height: "calc(100% + 1px)"
|
|
55
|
+
},
|
|
50
56
|
boxSizing: 'border-box',
|
|
51
57
|
margin: 0,
|
|
52
58
|
padding: 0,
|
|
@@ -144,6 +150,13 @@ var editorContentArea = css({
|
|
|
144
150
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
145
151
|
lineHeight: '24px',
|
|
146
152
|
paddingTop: "var(--ds-space-600, 48px)",
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
154
|
+
'.ak-editor-content-area-no-toolbar &': {
|
|
155
|
+
// When the toolbar is hidden, we don't want content to jump up
|
|
156
|
+
// the extra 1px is to account for the border on the toolbar
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
158
|
+
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ", FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(), " + 1px)")
|
|
159
|
+
},
|
|
147
160
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
148
161
|
height: 'calc( 100% - 105px )',
|
|
149
162
|
width: '100%',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "203.12.
|
|
2
|
+
export var version = "203.12.1";
|
|
@@ -43,6 +43,12 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
43
43
|
/**
|
|
44
44
|
* @deprecated - please use `replaceDocument` found in the core plugin actions instead
|
|
45
45
|
* using this will reset your Editor State which could cause some things to break (like emojis)
|
|
46
|
+
* @example - use the `replaceDocument` from the core plugin actions instead
|
|
47
|
+
* ```ts
|
|
48
|
+
* const { editorApi, preset } = usePreset(...);
|
|
49
|
+
// where you need it
|
|
50
|
+
editorApi?.core.actions.replaceDocument(value);
|
|
51
|
+
return <ComposableEditor preset={preset} ... />
|
|
46
52
|
*/
|
|
47
53
|
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
48
54
|
/** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
|
|
@@ -43,6 +43,12 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
43
43
|
/**
|
|
44
44
|
* @deprecated - please use `replaceDocument` found in the core plugin actions instead
|
|
45
45
|
* using this will reset your Editor State which could cause some things to break (like emojis)
|
|
46
|
+
* @example - use the `replaceDocument` from the core plugin actions instead
|
|
47
|
+
* ```ts
|
|
48
|
+
* const { editorApi, preset } = usePreset(...);
|
|
49
|
+
// where you need it
|
|
50
|
+
editorApi?.core.actions.replaceDocument(value);
|
|
51
|
+
return <ComposableEditor preset={preset} ... />
|
|
46
52
|
*/
|
|
47
53
|
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
48
54
|
/** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "203.12.
|
|
3
|
+
"version": "203.12.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -410,6 +410,10 @@
|
|
|
410
410
|
},
|
|
411
411
|
"platform_editor_react_18_autofocus_fix": {
|
|
412
412
|
"type": "boolean"
|
|
413
|
+
},
|
|
414
|
+
"platform_editor_renderer_table_header_styles": {
|
|
415
|
+
"type": "boolean",
|
|
416
|
+
"referenceOnly": true
|
|
413
417
|
}
|
|
414
418
|
},
|
|
415
419
|
"stricter": {
|