@atlaskit/editor-core 190.2.0 → 190.2.3
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/keymaps/index.js +36 -0
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -13
- package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +3 -1
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -4
- package/dist/cjs/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +72 -4
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +2 -11
- package/dist/cjs/ui/ContentStyles/extension.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/ContentStyles/layout.js +2 -13
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/keymaps/index.js +1 -1
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +6 -14
- package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +3 -1
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +3 -4
- package/dist/es2019/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +77 -5
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +5 -13
- package/dist/es2019/ui/ContentStyles/extension.js +5 -4
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ContentStyles/layout.js +5 -16
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/keymaps/index.js +1 -1
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +3 -14
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +3 -1
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -4
- package/dist/esm/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +74 -5
- package/dist/esm/plugins/extension/ui/Extension/styles.js +3 -12
- package/dist/esm/ui/ContentStyles/extension.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ContentStyles/layout.js +2 -15
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/keymaps/index.d.ts +1 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +2 -3
- package/dist/types/plugins/extension/ui/Extension/InlineExtension/styles.d.ts +1 -2
- package/dist/types/plugins/extension/ui/Extension/MultiBodiedExtension/index.d.ts +9 -1
- package/dist/types/plugins/extension/ui/Extension/styles.d.ts +1 -2
- package/dist/types/ui/ContentStyles/layout.d.ts +1 -2
- package/dist/types-ts4.5/keymaps/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/styles.d.ts +2 -3
- package/dist/types-ts4.5/plugins/extension/ui/Extension/InlineExtension/styles.d.ts +1 -2
- package/dist/types-ts4.5/plugins/extension/ui/Extension/MultiBodiedExtension/index.d.ts +9 -1
- package/dist/types-ts4.5/plugins/extension/ui/Extension/styles.d.ts +1 -2
- package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +1 -2
- package/package.json +12 -8
|
@@ -2,16 +2,17 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { blockNodesVerticalMargin, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackground, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
4
4
|
export const extensionStyles = css`
|
|
5
|
-
.multiBodiedExtensionView-content-wrap.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
6
|
-
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
5
|
.multiBodiedExtensionView-content-wrap {
|
|
10
6
|
&.danger > span > .multiBodiedExtension--container {
|
|
11
7
|
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
|
|
12
8
|
${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
13
9
|
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
|
|
14
10
|
}
|
|
11
|
+
&:not(.danger).${akEditorSelectedNodeClassName} {
|
|
12
|
+
& > span > .multiBodiedExtension--container {
|
|
13
|
+
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
15
16
|
.multiBodiedExtension--container {
|
|
16
17
|
width: 100%;
|
|
17
18
|
max-width: 100%; // ensure width can't go over 100%;
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
5
|
-
import { N40A, N50A, DN70, DN80 } from '@atlaskit/theme/colors';
|
|
6
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
7
|
-
import { themed } from '@atlaskit/theme/components';
|
|
2
|
+
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
8
3
|
import { columnLayoutSharedStyle, LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
9
4
|
import { gridMediumMaxWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akLayoutGutterOffset, akEditorSwoopCubicBezier, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
10
5
|
import { TableCssClassName } from '@atlaskit/editor-plugin-table/types';
|
|
11
6
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugin-table/ui/consts';
|
|
12
7
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
13
|
-
export const layoutStyles =
|
|
8
|
+
export const layoutStyles = css`
|
|
14
9
|
.ProseMirror {
|
|
15
10
|
${columnLayoutSharedStyle} [data-layout-section] {
|
|
16
11
|
// TODO: Migrate away from gridSize
|
|
17
12
|
// Recommendation: Replace directly with 7px
|
|
18
|
-
margin: ${
|
|
13
|
+
margin: ${8 - 1}px -${akLayoutGutterOffset}px 0;
|
|
19
14
|
transition: border-color 0.3s ${akEditorSwoopCubicBezier};
|
|
20
15
|
cursor: pointer;
|
|
21
16
|
|
|
@@ -24,10 +19,7 @@ export const layoutStyles = props => css`
|
|
|
24
19
|
flex: 1;
|
|
25
20
|
min-width: 0;
|
|
26
21
|
border: ${akEditorSelectedBorderSize}px solid
|
|
27
|
-
${
|
|
28
|
-
light: `var(--ds-border, ${N40A})`,
|
|
29
|
-
dark: `var(--ds-border, ${DN70})`
|
|
30
|
-
})(props)};
|
|
22
|
+
${`var(--ds-border, ${N40A})`};
|
|
31
23
|
border-radius: 4px;
|
|
32
24
|
padding: ${LAYOUT_COLUMN_PADDING}px;
|
|
33
25
|
box-sizing: border-box;
|
|
@@ -115,10 +107,7 @@ export const layoutStyles = props => css`
|
|
|
115
107
|
&.selected [data-layout-column],
|
|
116
108
|
&:hover [data-layout-column] {
|
|
117
109
|
border: ${akEditorSelectedBorderSize}px solid
|
|
118
|
-
${
|
|
119
|
-
light: `var(--ds-border, ${N50A})`,
|
|
120
|
-
dark: `var(--ds-border, ${DN80})`
|
|
121
|
-
})(props)};
|
|
110
|
+
${`var(--ds-border, ${N50A})`};
|
|
122
111
|
}
|
|
123
112
|
|
|
124
113
|
&.selected.danger > [data-layout-column] {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "190.2.
|
|
2
|
+
export const version = "190.2.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP } from '@atlaskit/editor-common/keymaps';
|
|
1
|
+
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, deleteColumn, deleteRow, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP } from '@atlaskit/editor-common/keymaps';
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
|
-
import { DN30, DN900, N30 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { N30 } from '@atlaskit/theme/colors';
|
|
7
5
|
import { wrapperDefault, padding } from '../styles';
|
|
8
6
|
export var widerLayoutClassName = 'wider-layout';
|
|
9
|
-
export var wrapperStyle =
|
|
10
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n &.without-frame {\n background: transparent;\n }\n cursor: pointer;\n width: 100%;\n\n .extension-overflow-wrapper:not(.with-body) {\n overflow-x: auto;\n }\n"])), wrapperDefault(theme));
|
|
11
|
-
};
|
|
7
|
+
export var wrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n &.without-frame {\n background: transparent;\n }\n cursor: pointer;\n width: 100%;\n\n .extension-overflow-wrapper:not(.with-body) {\n overflow-x: auto;\n }\n"])), wrapperDefault);
|
|
12
8
|
export var header = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: ", "px ", "px 0px;\n vertical-align: middle;\n\n &.with-children:not(.without-frame) {\n padding: ", " ", "\n ", ";\n }\n &.without-frame {\n padding: 0;\n }\n"])), padding / 2, padding / 2, "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
|
|
13
|
-
export var content =
|
|
14
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px;\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n cursor: initial;\n width: 100%;\n"])), padding, themed({
|
|
15
|
-
light: "var(--ds-surface, white)",
|
|
16
|
-
dark: "var(--ds-surface, ".concat(DN30, ")")
|
|
17
|
-
})(theme), themed({
|
|
18
|
-
dark: "var(--ds-text, ".concat(DN900, ")")
|
|
19
|
-
})(theme), "var(--ds-border, ".concat(N30, ")"), borderRadius());
|
|
20
|
-
};
|
|
9
|
+
export var content = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n cursor: initial;\n width: 100%;\n"])), padding, "var(--ds-surface, white)", "var(--ds-border, ".concat(N30, ")"), "var(--ds-border-radius, 3px)");
|
|
21
10
|
export var contentWrapper = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", "px ", "px;\n display: flex;\n justify-content: center;\n"])), padding, padding);
|
|
@@ -192,7 +192,9 @@ var ExtensionComponent = /*#__PURE__*/function (_Component) {
|
|
|
192
192
|
getPos: getPos,
|
|
193
193
|
handleContentDOMRef: handleContentDOMRef,
|
|
194
194
|
tryExtensionHandler: this.tryExtensionHandler.bind(this),
|
|
195
|
-
eventDispatcher: eventDispatcher
|
|
195
|
+
eventDispatcher: eventDispatcher,
|
|
196
|
+
pluginInjectionApi: pluginInjectionApi,
|
|
197
|
+
editorAppearance: editorAppearance
|
|
196
198
|
});
|
|
197
199
|
}
|
|
198
200
|
var extensionHandlerResult = this.tryExtensionHandler(undefined);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
4
|
import { wrapperDefault } from '../styles';
|
|
6
|
-
export var wrapperStyle =
|
|
7
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px 1px ", ";\n\n > img {\n border-radius: ", "px;\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background: ", ";\n }\n"])), wrapperDefault(theme), "var(--ds-space-050, 4px)", borderRadius(), "var(--ds-background-neutral-subtle, white)");
|
|
8
|
-
};
|
|
5
|
+
export var wrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px 1px ", ";\n\n > img {\n border-radius: ", ";\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background: ", ";\n }\n"])), wrapperDefault, "var(--ds-space-050, 4px)", "var(--ds-border-radius, 3px)", "var(--ds-background-neutral-subtle, white)");
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
5
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -11,7 +13,8 @@ import { N30, N40, N50 } from '@atlaskit/theme/colors';
|
|
|
11
13
|
import React, { useState } from 'react';
|
|
12
14
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
13
15
|
import { createDispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
14
|
-
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
16
|
+
import { analyticsEventKey, calculateBreakoutStyles } from '@atlaskit/editor-common/utils';
|
|
17
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
15
18
|
var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_ref) {
|
|
16
19
|
var updateActiveChild = _ref.updateActiveChild,
|
|
17
20
|
editorView = _ref.editorView,
|
|
@@ -117,14 +120,16 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
117
120
|
}, [node, editorView, getPos, updateActiveChild, eventDispatcher]);
|
|
118
121
|
return actions;
|
|
119
122
|
};
|
|
120
|
-
var navigationCSS = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // make sure the user can't see a range selection inside the navigation\n // This is really important to keep the navigation working properly\n user-select: none;\n -webkit-user-modify: read-only;\n border: 1px solid ", ";\n
|
|
121
|
-
var
|
|
123
|
+
var navigationCSS = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // make sure the user can't see a range selection inside the navigation\n // This is really important to keep the navigation working properly\n user-select: none;\n -webkit-user-modify: read-only;\n border: 1px solid ", ";\n"])), "var(--ds-border, ".concat(N40, ")"));
|
|
124
|
+
var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2) {
|
|
122
125
|
var node = _ref2.node,
|
|
123
126
|
handleContentDOMRef = _ref2.handleContentDOMRef,
|
|
124
127
|
getPos = _ref2.getPos,
|
|
125
128
|
tryExtensionHandler = _ref2.tryExtensionHandler,
|
|
126
129
|
editorView = _ref2.editorView,
|
|
127
|
-
eventDispatcher = _ref2.eventDispatcher
|
|
130
|
+
eventDispatcher = _ref2.eventDispatcher,
|
|
131
|
+
widthState = _ref2.widthState,
|
|
132
|
+
editorAppearance = _ref2.editorAppearance;
|
|
128
133
|
var _useState = useState(0),
|
|
129
134
|
_useState2 = _slicedToArray(_useState, 2),
|
|
130
135
|
activeChildIndex = _useState2[0],
|
|
@@ -152,11 +157,27 @@ var MultiBodiedExtension = function MultiBodiedExtension(_ref2) {
|
|
|
152
157
|
return handleContentDOMRef(node);
|
|
153
158
|
}, [handleContentDOMRef]);
|
|
154
159
|
var containerCSS = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n min-height: 100px;\n .multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true'] {\n display: none;\n }\n\n .multiBodiedExtension-content-dom-wrapper\n > [data-extension-frame='true']:nth-of-type(", ") {\n border: 1px solid ", ";\n display: block;\n min-height: 100px;\n }\n "])), "var(--ds-border, ".concat(N30, ")"), activeChildIndex + 1, "var(--ds-border, ".concat(N50, ")"));
|
|
160
|
+
var shouldBreakout =
|
|
161
|
+
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
162
|
+
['full-width', 'wide'].includes(node.attrs.layout) &&
|
|
163
|
+
// Extension breakout state should not be respected when the editor appearance is full-width mode
|
|
164
|
+
editorAppearance !== 'full-width';
|
|
165
|
+
var mbeContainerStyles = {};
|
|
166
|
+
if (shouldBreakout) {
|
|
167
|
+
var _calculateBreakoutSty = calculateBreakoutStyles({
|
|
168
|
+
mode: node.attrs.layout,
|
|
169
|
+
widthStateLineLength: widthState === null || widthState === void 0 ? void 0 : widthState.lineLength,
|
|
170
|
+
widthStateWidth: widthState === null || widthState === void 0 ? void 0 : widthState.width
|
|
171
|
+
}),
|
|
172
|
+
breakoutStyles = _extends({}, (_objectDestructuringEmpty(_calculateBreakoutSty), _calculateBreakoutSty));
|
|
173
|
+
mbeContainerStyles = breakoutStyles;
|
|
174
|
+
}
|
|
155
175
|
return jsx("section", {
|
|
156
176
|
className: "multiBodiedExtension--container",
|
|
157
177
|
css: containerCSS,
|
|
158
178
|
"data-testid": "multiBodiedExtension--container",
|
|
159
|
-
"data-active-child-index": activeChildIndex
|
|
179
|
+
"data-active-child-index": activeChildIndex,
|
|
180
|
+
style: mbeContainerStyles
|
|
160
181
|
}, jsx("nav", {
|
|
161
182
|
className: "multiBodiedExtension-navigation",
|
|
162
183
|
css: navigationCSS,
|
|
@@ -184,4 +205,52 @@ var sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDi
|
|
|
184
205
|
}
|
|
185
206
|
});
|
|
186
207
|
};
|
|
208
|
+
var MultiBodiedExtensionWithSharedState = function MultiBodiedExtensionWithSharedState(props) {
|
|
209
|
+
var pluginInjectionApi = props.pluginInjectionApi;
|
|
210
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
211
|
+
widthState = _useSharedPluginState.widthState;
|
|
212
|
+
return jsx(MultiBodiedExtensionWithWidth, _extends({
|
|
213
|
+
widthState: widthState
|
|
214
|
+
}, props));
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// Workaround taken from platform/packages/editor/editor-core/src/plugins/extension/ui/Extension/Extension/index.tsx
|
|
218
|
+
var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
219
|
+
// TODO: ED-17836 This code is here because confluence injects
|
|
220
|
+
// the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
|
|
221
|
+
// which cannot access the `pluginInjectionApi`. When we move
|
|
222
|
+
// Confluence to using presets we can remove this workaround.
|
|
223
|
+
var pluginInjectionApi = props.pluginInjectionApi;
|
|
224
|
+
return pluginInjectionApi === undefined ? jsx(MultiBodiedExtensionDeprecated, props) : jsx(MultiBodiedExtensionWithSharedState, props);
|
|
225
|
+
};
|
|
226
|
+
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
227
|
+
// TODO: ED-17836 This code is here because Confluence injects
|
|
228
|
+
// the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
|
|
229
|
+
// which cannot access the `pluginInjectionApi`. When we move
|
|
230
|
+
// Confluence to using presets we can remove this workaround.
|
|
231
|
+
// @ts-ignore
|
|
232
|
+
var widthPluginKey = {
|
|
233
|
+
key: 'widthPlugin$',
|
|
234
|
+
getState: function getState(state) {
|
|
235
|
+
return state['widthPlugin$'];
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
var MultiBodiedExtensionDeprecated = function MultiBodiedExtensionDeprecated(props) {
|
|
239
|
+
return jsx(WithPluginState, {
|
|
240
|
+
editorView: props.editorView,
|
|
241
|
+
plugins: {
|
|
242
|
+
widthState: widthPluginKey
|
|
243
|
+
},
|
|
244
|
+
render: function render(_ref3) {
|
|
245
|
+
var widthState = _ref3.widthState;
|
|
246
|
+
return jsx(MultiBodiedExtensionWithWidth, _extends({
|
|
247
|
+
widthState: widthState
|
|
248
|
+
}, props));
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* End workaround
|
|
254
|
+
*/
|
|
255
|
+
|
|
187
256
|
export default MultiBodiedExtension;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
|
-
import { N20, DN50, DN700, B200, N20A, N70 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { N20, B200, N20A, N70 } from '@atlaskit/theme/colors';
|
|
7
5
|
import { EXTENSION_PADDING, BODIED_EXT_PADDING } from '@atlaskit/editor-common/styles';
|
|
8
6
|
export { EXTENSION_PADDING as padding, BODIED_EXT_PADDING };
|
|
9
|
-
export var wrapperDefault =
|
|
10
|
-
|
|
11
|
-
light: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
12
|
-
dark: "var(--ds-background-neutral, ".concat(DN50, ")")
|
|
13
|
-
})(theme), borderRadius(), themed({
|
|
14
|
-
dark: "var(--ds-text, ".concat(DN700, ")")
|
|
15
|
-
})(theme), "var(--ds-border-selected, ".concat(B200, ")"), "var(--ds-background-neutral-hovered, ".concat(N20A, ")"));
|
|
16
|
-
};
|
|
17
|
-
export var overlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s;\n"])), borderRadius());
|
|
7
|
+
export var wrapperDefault = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", ";\n position: relative;\n vertical-align: middle;\n\n .ProseMirror-selectednode > span > & > .extension-overlay {\n box-shadow: inset 0px 0px 0px 2px ", ";\n opacity: 1;\n }\n\n &.with-overlay {\n .extension-overlay {\n background: ", ";\n color: transparent;\n }\n\n &:hover .extension-overlay {\n opacity: 1;\n }\n }\n"])), "var(--ds-background-neutral, ".concat(N20, ")"), "var(--ds-border-radius, 3px)", "var(--ds-border-selected, ".concat(B200, ")"), "var(--ds-background-neutral-hovered, ".concat(N20A, ")"));
|
|
8
|
+
export var overlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", ";\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s;\n"])), "var(--ds-border-radius, 3px)");
|
|
18
9
|
export var placeholderFallback = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n & > img {\n margin: 0 ", ";\n }\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: placeholder-fallback;\n"])), "var(--ds-space-050, 4px)");
|
|
19
10
|
export var placeholderFallbackParams = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n max-width: 200px;\n margin-left: 5px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), "var(--ds-text-subtlest, ".concat(N70, ")"));
|
|
20
11
|
export var styledImage = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: 16px;\n max-width: 16px;\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: lozenge-image;\n"])));
|
|
@@ -3,4 +3,4 @@ var _templateObject;
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { blockNodesVerticalMargin, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackground, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
6
|
-
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .multiBodiedExtensionView-content-wrap
|
|
6
|
+
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .multiBodiedExtensionView-content-wrap {\n &.danger > span > .multiBodiedExtension--container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n &:not(.danger).", " {\n & > span > .multiBodiedExtension--container {\n ", "\n }\n }\n .multiBodiedExtension--container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, blockNodesVerticalMargin);
|
|
@@ -39,7 +39,7 @@ export var placeholderStyles = css(_templateObject6 || (_templateObject6 = _tagg
|
|
|
39
39
|
var contentStyles = function contentStyles(props) {
|
|
40
40
|
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
41
41
|
theme: props.theme
|
|
42
|
-
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, listsStyles, ruleStyles(), mediaStyles, layoutStyles
|
|
42
|
+
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, listsStyles, ruleStyles(), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
43
43
|
};
|
|
44
44
|
export var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
45
45
|
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
6
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
|
-
import { N40A, N50A, DN70, DN80 } from '@atlaskit/theme/colors';
|
|
8
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
9
|
-
import { themed } from '@atlaskit/theme/components';
|
|
4
|
+
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
10
5
|
import { columnLayoutSharedStyle, LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
11
6
|
import { gridMediumMaxWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akLayoutGutterOffset, akEditorSwoopCubicBezier, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
12
7
|
import { TableCssClassName } from '@atlaskit/editor-plugin-table/types';
|
|
13
8
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugin-table/ui/consts';
|
|
14
9
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
15
|
-
export var layoutStyles =
|
|
16
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n // TODO: Migrate away from gridSize\n // Recommendation: Replace directly with 7px\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid\n ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > :not(style):first-child,\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n > .embedCardView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor.-right\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > .ProseMirror-gapcursor.-right:first-of-type\n + .embedCardView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n // TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n // This is because the default state already uses the same token and, as such, the hover style won't change anything.\n // https://product-fabric.atlassian.net/browse/DSP-4441\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border: ", "px solid\n ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, gridSize() - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, themed({
|
|
17
|
-
light: "var(--ds-border, ".concat(N40A, ")"),
|
|
18
|
-
dark: "var(--ds-border, ".concat(DN70, ")")
|
|
19
|
-
})(props), LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, akEditorSelectedBorderSize, themed({
|
|
20
|
-
light: "var(--ds-border, ".concat(N50A, ")"),
|
|
21
|
-
dark: "var(--ds-border, ".concat(DN80, ")")
|
|
22
|
-
})(props), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
23
|
-
};
|
|
10
|
+
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n // TODO: Migrate away from gridSize\n // Recommendation: Replace directly with 7px\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid\n ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > :not(style):first-child,\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n > .embedCardView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor.-right\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > .ProseMirror-gapcursor.-right:first-of-type\n + .embedCardView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n // TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n // This is because the default state already uses the same token and, as such, the hover style won't change anything.\n // https://product-fabric.atlassian.net/browse/DSP-4441\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border: ", "px solid\n ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, 8 - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, "var(--ds-border, ".concat(N40A, ")"), LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, akEditorSelectedBorderSize, "var(--ds-border, ".concat(N50A, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "190.2.
|
|
2
|
+
export var version = "190.2.3";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP, } from '@atlaskit/editor-common/keymaps';
|
|
1
|
+
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, deleteColumn, deleteRow, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP, } from '@atlaskit/editor-common/keymaps';
|
|
2
2
|
export type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const widerLayoutClassName = "wider-layout";
|
|
3
|
-
export declare const wrapperStyle:
|
|
2
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
4
3
|
export declare const header: import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const content:
|
|
4
|
+
export declare const content: import("@emotion/react").SerializedStyles;
|
|
6
5
|
export declare const contentWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const wrapperStyle: (theme: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -5,6 +5,9 @@ import type { MultiBodiedExtensionActions } from '@atlaskit/editor-common/extens
|
|
|
5
5
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
+
import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
|
|
9
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
|
+
import type { EditorAppearance, PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
|
|
8
11
|
export type TryExtensionHandlerType = (actions: MultiBodiedExtensionActions | undefined) => React.ReactElement | null;
|
|
9
12
|
type Props = {
|
|
10
13
|
node: PmNode;
|
|
@@ -13,6 +16,11 @@ type Props = {
|
|
|
13
16
|
getPos: () => number | undefined;
|
|
14
17
|
tryExtensionHandler: TryExtensionHandlerType;
|
|
15
18
|
eventDispatcher?: EventDispatcher;
|
|
19
|
+
pluginInjectionApi?: PluginInjectionAPIWithDependency<WidthPlugin>;
|
|
20
|
+
editorAppearance?: EditorAppearance;
|
|
16
21
|
};
|
|
17
|
-
declare const MultiBodiedExtension: (
|
|
22
|
+
declare const MultiBodiedExtension: (props: Props & OverflowShadowProps) => jsx.JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* End workaround
|
|
25
|
+
*/
|
|
18
26
|
export default MultiBodiedExtension;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
import { EXTENSION_PADDING, BODIED_EXT_PADDING } from '@atlaskit/editor-common/styles';
|
|
3
2
|
export { EXTENSION_PADDING as padding, BODIED_EXT_PADDING };
|
|
4
|
-
export declare const wrapperDefault:
|
|
3
|
+
export declare const wrapperDefault: import("@emotion/react").SerializedStyles;
|
|
5
4
|
export declare const overlay: import("@emotion/react").SerializedStyles;
|
|
6
5
|
export declare const placeholderFallback: import("@emotion/react").SerializedStyles;
|
|
7
6
|
export declare const placeholderFallbackParams: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
import { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
3
2
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
4
|
-
export declare const layoutStyles:
|
|
3
|
+
export declare const layoutStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP, } from '@atlaskit/editor-common/keymaps';
|
|
1
|
+
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, deleteColumn, deleteRow, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP, } from '@atlaskit/editor-common/keymaps';
|
|
2
2
|
export type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const widerLayoutClassName = "wider-layout";
|
|
3
|
-
export declare const wrapperStyle:
|
|
2
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
4
3
|
export declare const header: import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const content:
|
|
4
|
+
export declare const content: import("@emotion/react").SerializedStyles;
|
|
6
5
|
export declare const contentWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const wrapperStyle: (theme: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -5,6 +5,9 @@ import type { MultiBodiedExtensionActions } from '@atlaskit/editor-common/extens
|
|
|
5
5
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
+
import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
|
|
9
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
|
+
import type { EditorAppearance, PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
|
|
8
11
|
export type TryExtensionHandlerType = (actions: MultiBodiedExtensionActions | undefined) => React.ReactElement | null;
|
|
9
12
|
type Props = {
|
|
10
13
|
node: PmNode;
|
|
@@ -13,6 +16,11 @@ type Props = {
|
|
|
13
16
|
getPos: () => number | undefined;
|
|
14
17
|
tryExtensionHandler: TryExtensionHandlerType;
|
|
15
18
|
eventDispatcher?: EventDispatcher;
|
|
19
|
+
pluginInjectionApi?: PluginInjectionAPIWithDependency<WidthPlugin>;
|
|
20
|
+
editorAppearance?: EditorAppearance;
|
|
16
21
|
};
|
|
17
|
-
declare const MultiBodiedExtension: (
|
|
22
|
+
declare const MultiBodiedExtension: (props: Props & OverflowShadowProps) => jsx.JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* End workaround
|
|
25
|
+
*/
|
|
18
26
|
export default MultiBodiedExtension;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
import { EXTENSION_PADDING, BODIED_EXT_PADDING } from '@atlaskit/editor-common/styles';
|
|
3
2
|
export { EXTENSION_PADDING as padding, BODIED_EXT_PADDING };
|
|
4
|
-
export declare const wrapperDefault:
|
|
3
|
+
export declare const wrapperDefault: import("@emotion/react").SerializedStyles;
|
|
5
4
|
export declare const overlay: import("@emotion/react").SerializedStyles;
|
|
6
5
|
export declare const placeholderFallback: import("@emotion/react").SerializedStyles;
|
|
7
6
|
export declare const placeholderFallbackParams: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
import { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
3
2
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
4
|
-
export declare const layoutStyles:
|
|
3
|
+
export declare const layoutStyles: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "190.2.
|
|
3
|
+
"version": "190.2.3",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
49
49
|
"@atlaskit/avatar": "^21.4.0",
|
|
50
50
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
51
|
-
"@atlaskit/button": "^17.
|
|
51
|
+
"@atlaskit/button": "^17.2.0",
|
|
52
52
|
"@atlaskit/checkbox": "^13.0.0",
|
|
53
53
|
"@atlaskit/date": "^0.10.0",
|
|
54
54
|
"@atlaskit/datetime-picker": "^13.0.3",
|
|
55
|
-
"@atlaskit/editor-common": "^76.
|
|
55
|
+
"@atlaskit/editor-common": "^76.34.0",
|
|
56
56
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
57
57
|
"@atlaskit/editor-plugin-alignment": "^0.1.0",
|
|
58
58
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
79
79
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
80
80
|
"@atlaskit/editor-plugin-emoji": "^1.0.0",
|
|
81
|
-
"@atlaskit/editor-plugin-expand": "^0.
|
|
81
|
+
"@atlaskit/editor-plugin-expand": "^0.4.0",
|
|
82
82
|
"@atlaskit/editor-plugin-extension": "^0.4.0",
|
|
83
83
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
84
84
|
"@atlaskit/editor-plugin-feedback-dialog": "^0.1.0",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@atlaskit/editor-plugin-max-content-size": "^0.1.0",
|
|
100
100
|
"@atlaskit/editor-plugin-media": "^0.9.0",
|
|
101
101
|
"@atlaskit/editor-plugin-mentions": "^0.1.0",
|
|
102
|
-
"@atlaskit/editor-plugin-panel": "^0.
|
|
102
|
+
"@atlaskit/editor-plugin-panel": "^0.2.0",
|
|
103
103
|
"@atlaskit/editor-plugin-paste": "^0.2.0",
|
|
104
104
|
"@atlaskit/editor-plugin-paste-options-toolbar": "^0.3.0",
|
|
105
105
|
"@atlaskit/editor-plugin-placeholder": "^0.1.0",
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"@atlaskit/editor-plugin-text-color": "^0.1.0",
|
|
118
118
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
119
119
|
"@atlaskit/editor-plugin-toolbar-lists-indentation": "^0.2.0",
|
|
120
|
-
"@atlaskit/editor-plugin-type-ahead": "^0.
|
|
120
|
+
"@atlaskit/editor-plugin-type-ahead": "^0.9.0",
|
|
121
121
|
"@atlaskit/editor-plugin-undo-redo": "^0.1.0",
|
|
122
122
|
"@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
|
|
123
123
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
124
124
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
125
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
125
|
+
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
126
126
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
127
127
|
"@atlaskit/emoji": "^67.6.0",
|
|
128
128
|
"@atlaskit/empty-state": "^7.6.0",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
190
190
|
"@atlaskit/menu": "^2.1.0",
|
|
191
191
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
192
|
-
"@atlaskit/renderer": "^109.
|
|
192
|
+
"@atlaskit/renderer": "^109.2.0",
|
|
193
193
|
"@atlaskit/smart-card": "^26.43.0",
|
|
194
194
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
195
195
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
@@ -378,6 +378,10 @@
|
|
|
378
378
|
},
|
|
379
379
|
"platform.editor.deprecate-jira-issue-plugin": {
|
|
380
380
|
"type": "boolean"
|
|
381
|
+
},
|
|
382
|
+
"platform.editor.ordered-list-inserting-nodes_bh0vo": {
|
|
383
|
+
"type": "boolean",
|
|
384
|
+
"referenceOnly": "true"
|
|
381
385
|
}
|
|
382
386
|
}
|
|
383
387
|
}
|