@atlaskit/editor-core 187.37.3 → 187.37.5
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 +14 -0
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/utils/analytics.js +25 -2
- package/dist/cjs/ui/ContentStyles/index.js +20 -18
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/es2019/plugins/media/utils/analytics.js +24 -0
- package/dist/es2019/ui/ContentStyles/index.js +19 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +2 -2
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/esm/plugins/media/utils/analytics.js +22 -0
- package/dist/esm/ui/ContentStyles/index.js +10 -8
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +1 -1
- package/dist/types/plugins/media/utils/analytics.d.ts +2 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/utils/analytics.d.ts +2 -1
- package/package.json +2 -1
- package/dist/cjs/plugins/rule/commands.js +0 -22
- package/dist/cjs/plugins/rule/index.js +0 -80
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +0 -76
- package/dist/cjs/plugins/rule/pm-plugins/keymap.js +0 -21
- package/dist/cjs/plugins/rule/styles.js +0 -16
- package/dist/es2019/plugins/rule/commands.js +0 -11
- package/dist/es2019/plugins/rule/index.js +0 -71
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +0 -73
- package/dist/es2019/plugins/rule/pm-plugins/keymap.js +0 -11
- package/dist/es2019/plugins/rule/styles.js +0 -20
- package/dist/esm/plugins/rule/commands.js +0 -15
- package/dist/esm/plugins/rule/index.js +0 -72
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +0 -67
- package/dist/esm/plugins/rule/pm-plugins/keymap.js +0 -13
- package/dist/esm/plugins/rule/styles.js +0 -8
- package/dist/types/plugins/rule/commands.d.ts +0 -3
- package/dist/types/plugins/rule/index.d.ts +0 -13
- package/dist/types/plugins/rule/pm-plugins/input-rule.d.ts +0 -9
- package/dist/types/plugins/rule/pm-plugins/keymap.d.ts +0 -5
- package/dist/types/plugins/rule/styles.d.ts +0 -2
- package/dist/types-ts4.5/plugins/rule/commands.d.ts +0 -3
- package/dist/types-ts4.5/plugins/rule/index.d.ts +0 -16
- package/dist/types-ts4.5/plugins/rule/pm-plugins/input-rule.d.ts +0 -9
- package/dist/types-ts4.5/plugins/rule/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.5/plugins/rule/styles.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.37.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1f6e908f2bd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f6e908f2bd) - Workaround invalid getPos error occuring for TableComponent
|
|
8
|
+
- [`94662d7c5af`](https://bitbucket.org/atlassian/atlassian-frontend/commits/94662d7c5af) - Extracted rule plugin from editor-core to editor-plugin-rule.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 187.37.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`e31a001b8b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e31a001b8b8) - Add pixel entry resize analytic event payload
|
|
16
|
+
|
|
3
17
|
## 187.37.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _api = require("../../../selection-api/api");
|
|
11
11
|
var _plugins = require("../../../plugins");
|
|
12
|
+
var _editorPluginRule = require("@atlaskit/editor-plugin-rule");
|
|
12
13
|
var _editorPluginEmoji = require("@atlaskit/editor-plugin-emoji");
|
|
13
14
|
var _editorPluginList = require("@atlaskit/editor-plugin-list");
|
|
14
15
|
var _editorPluginImageUpload = require("@atlaskit/editor-plugin-image-upload");
|
|
@@ -74,7 +75,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
74
75
|
return builder;
|
|
75
76
|
}).add([_editorPluginList.listPlugin, {
|
|
76
77
|
restartNumberedLists: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.restartNumberedLists
|
|
77
|
-
}]).maybeAdd(
|
|
78
|
+
}]).maybeAdd(_editorPluginRule.rulePlugin, function (plugin, builder) {
|
|
78
79
|
if (props.allowRule) {
|
|
79
80
|
return builder.add(plugin);
|
|
80
81
|
}
|
|
@@ -275,12 +275,6 @@ Object.defineProperty(exports, "quickInsertPlugin", {
|
|
|
275
275
|
return _quickInsert.default;
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
|
-
Object.defineProperty(exports, "rulePlugin", {
|
|
279
|
-
enumerable: true,
|
|
280
|
-
get: function get() {
|
|
281
|
-
return _rule.default;
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
278
|
Object.defineProperty(exports, "saveOnEnterPlugin", {
|
|
285
279
|
enumerable: true,
|
|
286
280
|
get: function get() {
|
|
@@ -369,7 +363,6 @@ var _panel = _interopRequireDefault(require("./panel"));
|
|
|
369
363
|
var _paste = _interopRequireDefault(require("./paste"));
|
|
370
364
|
var _placeholder = _interopRequireDefault(require("./placeholder"));
|
|
371
365
|
var _placeholderText = _interopRequireDefault(require("./placeholder-text"));
|
|
372
|
-
var _rule = _interopRequireDefault(require("./rule"));
|
|
373
366
|
var _quickInsert = _interopRequireDefault(require("./quick-insert"));
|
|
374
367
|
var _saveOnEnter = _interopRequireDefault(require("./save-on-enter"));
|
|
375
368
|
var _submitEditor = _interopRequireDefault(require("./submit-editor"));
|
|
@@ -35,11 +35,11 @@ var isMediaGroupSelectedFromProps = function isMediaGroupSelectedFromProps(props
|
|
|
35
35
|
/**
|
|
36
36
|
* ED-19831
|
|
37
37
|
* There is a getPos issue coming from this code. We need to apply this workaround for now and apply a patch
|
|
38
|
-
* directly to confluence since this bug is now
|
|
38
|
+
* directly to confluence since this bug is now in production.
|
|
39
39
|
*/
|
|
40
40
|
var pos;
|
|
41
41
|
try {
|
|
42
|
-
pos =
|
|
42
|
+
pos = props.getPos ? props.getPos() : undefined;
|
|
43
43
|
} catch (e) {
|
|
44
44
|
pos = undefined;
|
|
45
45
|
}
|
|
@@ -473,11 +473,11 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
473
473
|
/**
|
|
474
474
|
* ED-19831
|
|
475
475
|
* There is a getPos issue coming from this code. We need to apply this workaround for now and apply a patch
|
|
476
|
-
* directly to confluence since this bug is now
|
|
476
|
+
* directly to confluence since this bug is now in production.
|
|
477
477
|
*/
|
|
478
478
|
var pos;
|
|
479
479
|
try {
|
|
480
|
-
pos =
|
|
480
|
+
pos = getPos ? getPos() : undefined;
|
|
481
481
|
} catch (e) {
|
|
482
482
|
pos = undefined;
|
|
483
483
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getMediaResizeAnalyticsEvent = void 0;
|
|
6
|
+
exports.getMediaResizeAnalyticsEvent = exports.getMediaInputResizeAnalyticsEvent = void 0;
|
|
7
7
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
8
8
|
var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(type, attributes) {
|
|
9
9
|
if (!attributes) {
|
|
@@ -29,4 +29,27 @@ var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(type, a
|
|
|
29
29
|
eventType: _analytics.EVENT_TYPE.UI
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
exports.getMediaResizeAnalyticsEvent = getMediaResizeAnalyticsEvent;
|
|
32
|
+
exports.getMediaResizeAnalyticsEvent = getMediaResizeAnalyticsEvent;
|
|
33
|
+
var getMediaInputResizeAnalyticsEvent = function getMediaInputResizeAnalyticsEvent(type, attributes) {
|
|
34
|
+
if (!attributes) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
var width = attributes.width,
|
|
38
|
+
layout = attributes.layout,
|
|
39
|
+
validation = attributes.validation,
|
|
40
|
+
parentNode = attributes.parentNode;
|
|
41
|
+
var actionSubject = type === 'embed' ? _analytics.ACTION_SUBJECT.EMBEDS : _analytics.ACTION_SUBJECT.MEDIA_SINGLE;
|
|
42
|
+
return {
|
|
43
|
+
action: _analytics.ACTION.EDITED,
|
|
44
|
+
actionSubject: actionSubject,
|
|
45
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.INPUT_RESIZED,
|
|
46
|
+
attributes: {
|
|
47
|
+
width: width,
|
|
48
|
+
layout: layout,
|
|
49
|
+
validation: validation,
|
|
50
|
+
parentNode: parentNode
|
|
51
|
+
},
|
|
52
|
+
eventType: _analytics.EVENT_TYPE.UI
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.getMediaInputResizeAnalyticsEvent = getMediaInputResizeAnalyticsEvent;
|
|
@@ -18,36 +18,38 @@ var _commonStyles = require("@atlaskit/editor-plugin-table/ui/common-styles");
|
|
|
18
18
|
var _styles4 = require("../../plugins/placeholder/styles");
|
|
19
19
|
var _styles5 = require("../../plugins/block-type/styles");
|
|
20
20
|
var _styles6 = require("../../plugins/code-block/styles");
|
|
21
|
-
var _styles7 = require("../../plugins/
|
|
22
|
-
var _styles8 = require("../../plugins/
|
|
23
|
-
var _styles9 = require("../../plugins/
|
|
24
|
-
var _styles10 = require("../../plugins/
|
|
25
|
-
var _styles11 = require("../../plugins/
|
|
26
|
-
var _styles12 = require("../../plugins/
|
|
27
|
-
var _styles13 = require("../../plugins/
|
|
28
|
-
var _styles14 = require("../../plugins/expand/ui/styles");
|
|
21
|
+
var _styles7 = require("../../plugins/media/styles");
|
|
22
|
+
var _styles8 = require("../../plugins/layout/styles");
|
|
23
|
+
var _styles9 = require("../../plugins/panel/styles");
|
|
24
|
+
var _styles10 = require("../../plugins/fake-text-cursor/styles");
|
|
25
|
+
var _styles11 = require("../../plugins/placeholder-text/styles");
|
|
26
|
+
var _styles12 = require("../../plugins/extension/ui/styles");
|
|
27
|
+
var _styles13 = require("../../plugins/expand/ui/styles");
|
|
29
28
|
var _style = require("../../plugins/media/pm-plugins/alt-text/style");
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
29
|
+
var _styles14 = require("../../plugins/find-replace/styles");
|
|
30
|
+
var _styles15 = require("../../plugins/tasks-and-decisions/styles");
|
|
31
|
+
var _styles16 = require("../../plugins/status/styles");
|
|
32
|
+
var _styles17 = require("../../plugins/date/styles");
|
|
34
33
|
var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
|
|
35
34
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
36
35
|
var _emoji = require("@atlaskit/editor-common/emoji");
|
|
37
36
|
var _colors = require("@atlaskit/theme/colors");
|
|
38
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
37
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
39
38
|
/** @jsx jsx */
|
|
40
39
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
41
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
42
41
|
var linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n"])), _styles.linkSharedStyle);
|
|
43
42
|
exports.linkStyles = linkStyles;
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
var ruleStyles = function ruleStyles(props) {
|
|
44
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), (0, _styles.ruleSharedStyles)(props), "var(--ds-space-050, 4px)", _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
|
|
45
|
+
};
|
|
46
|
+
var mentionsStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(_colors.N500, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(_colors.N30A, ")"), "var(--ds-text-subtle, ".concat(_colors.N500, ")"));
|
|
47
|
+
var listsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n }\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
48
|
+
var emojiStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_NODE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
|
|
47
49
|
var contentStyles = function contentStyles(props) {
|
|
48
|
-
return (0, _react2.css)(
|
|
50
|
+
return (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _editorSharedStyles.editorFontSize)({
|
|
49
51
|
theme: props.theme
|
|
50
|
-
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)",
|
|
52
|
+
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles11.placeholderTextStyles, _styles4.placeholderStyles, (0, _styles6.codeBlockStyles)(props), (0, _styles5.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _styles7.mediaStyles, (0, _styles8.layoutStyles)(props), _styles2.telepointerStyle, _styles3.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles9.panelStyles)(props), _styles10.fakeCursorStyles, mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles12.extensionStyles, (0, _styles13.expandStyles)(props), _styles14.findReplaceStyles, _styles15.taskDecisionStyles, _styles16.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _styles17.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _style.ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
51
53
|
};
|
|
52
54
|
var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
53
55
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.37.
|
|
9
|
+
var version = "187.37.5";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createEditorSelectionAPI } from '../../../selection-api/api';
|
|
2
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin,
|
|
2
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
|
|
3
|
+
import { rulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
3
4
|
import { emojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
4
5
|
import { listPlugin } from '@atlaskit/editor-plugin-list';
|
|
5
6
|
import { imageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
|
|
@@ -20,7 +20,6 @@ export { default as panelPlugin } from './panel';
|
|
|
20
20
|
export { default as pastePlugin } from './paste';
|
|
21
21
|
export { default as placeholderPlugin } from './placeholder';
|
|
22
22
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
23
|
-
export { default as rulePlugin } from './rule';
|
|
24
23
|
export { default as quickInsertPlugin } from './quick-insert';
|
|
25
24
|
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
26
25
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
@@ -16,11 +16,11 @@ const isMediaGroupSelectedFromProps = props => {
|
|
|
16
16
|
/**
|
|
17
17
|
* ED-19831
|
|
18
18
|
* There is a getPos issue coming from this code. We need to apply this workaround for now and apply a patch
|
|
19
|
-
* directly to confluence since this bug is now
|
|
19
|
+
* directly to confluence since this bug is now in production.
|
|
20
20
|
*/
|
|
21
21
|
let pos;
|
|
22
22
|
try {
|
|
23
|
-
pos =
|
|
23
|
+
pos = props.getPos ? props.getPos() : undefined;
|
|
24
24
|
} catch (e) {
|
|
25
25
|
pos = undefined;
|
|
26
26
|
}
|
|
@@ -377,11 +377,11 @@ class MediaSingleNodeView extends ReactNodeView {
|
|
|
377
377
|
/**
|
|
378
378
|
* ED-19831
|
|
379
379
|
* There is a getPos issue coming from this code. We need to apply this workaround for now and apply a patch
|
|
380
|
-
* directly to confluence since this bug is now
|
|
380
|
+
* directly to confluence since this bug is now in production.
|
|
381
381
|
*/
|
|
382
382
|
let pos;
|
|
383
383
|
try {
|
|
384
|
-
pos =
|
|
384
|
+
pos = getPos ? getPos() : undefined;
|
|
385
385
|
} catch (e) {
|
|
386
386
|
pos = undefined;
|
|
387
387
|
}
|
|
@@ -24,4 +24,28 @@ export const getMediaResizeAnalyticsEvent = (type, attributes) => {
|
|
|
24
24
|
},
|
|
25
25
|
eventType: EVENT_TYPE.UI
|
|
26
26
|
};
|
|
27
|
+
};
|
|
28
|
+
export const getMediaInputResizeAnalyticsEvent = (type, attributes) => {
|
|
29
|
+
if (!attributes) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const {
|
|
33
|
+
width,
|
|
34
|
+
layout,
|
|
35
|
+
validation,
|
|
36
|
+
parentNode
|
|
37
|
+
} = attributes;
|
|
38
|
+
const actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
|
|
39
|
+
return {
|
|
40
|
+
action: ACTION.EDITED,
|
|
41
|
+
actionSubject,
|
|
42
|
+
actionSubjectId: ACTION_SUBJECT_ID.INPUT_RESIZED,
|
|
43
|
+
attributes: {
|
|
44
|
+
width,
|
|
45
|
+
layout,
|
|
46
|
+
validation,
|
|
47
|
+
parentNode
|
|
48
|
+
},
|
|
49
|
+
eventType: EVENT_TYPE.UI
|
|
50
|
+
};
|
|
27
51
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
4
4
|
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
7
7
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
8
8
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
@@ -10,7 +10,6 @@ import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
|
10
10
|
import { placeholderStyles } from '../../plugins/placeholder/styles';
|
|
11
11
|
import { blocktypeStyles } from '../../plugins/block-type/styles';
|
|
12
12
|
import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
13
|
-
import { ruleStyles } from '../../plugins/rule/styles';
|
|
14
13
|
import { mediaStyles } from '../../plugins/media/styles';
|
|
15
14
|
import { layoutStyles } from '../../plugins/layout/styles';
|
|
16
15
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
@@ -24,7 +23,7 @@ import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
|
|
|
24
23
|
import { statusStyles } from '../../plugins/status/styles';
|
|
25
24
|
import { dateStyles } from '../../plugins/date/styles';
|
|
26
25
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
27
|
-
import { linkSharedStyle, codeMarkSharedStyles } from '@atlaskit/editor-common/styles';
|
|
26
|
+
import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
28
27
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
29
28
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
30
29
|
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
@@ -33,6 +32,23 @@ export const linkStyles = css`
|
|
|
33
32
|
${linkSharedStyle}
|
|
34
33
|
}
|
|
35
34
|
`;
|
|
35
|
+
const ruleStyles = props => css`
|
|
36
|
+
.ProseMirror {
|
|
37
|
+
${ruleSharedStyles(props)};
|
|
38
|
+
|
|
39
|
+
hr {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
padding: ${"var(--ds-space-050, 4px)"} 0;
|
|
42
|
+
margin: calc(${akEditorLineHeight}em - 4px) 0;
|
|
43
|
+
background-clip: content-box;
|
|
44
|
+
|
|
45
|
+
&.${akEditorSelectedNodeClassName} {
|
|
46
|
+
outline: none;
|
|
47
|
+
background-color: ${`var(--ds-border-selected, ${akEditorSelectedBorderColor})`};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
36
52
|
const mentionsStyles = css`
|
|
37
53
|
.${MentionSharedCssClassName.MENTION_CONTAINER} {
|
|
38
54
|
&.${akEditorSelectedNodeClassName} [data-mention-id] > span {
|
|
@@ -3,7 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import { createEditorSelectionAPI } from '../../../selection-api/api';
|
|
6
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin,
|
|
6
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
|
|
7
|
+
import { rulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
7
8
|
import { emojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
8
9
|
import { listPlugin } from '@atlaskit/editor-plugin-list';
|
|
9
10
|
import { imageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
|
|
@@ -20,7 +20,6 @@ export { default as panelPlugin } from './panel';
|
|
|
20
20
|
export { default as pastePlugin } from './paste';
|
|
21
21
|
export { default as placeholderPlugin } from './placeholder';
|
|
22
22
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
23
|
-
export { default as rulePlugin } from './rule';
|
|
24
23
|
export { default as quickInsertPlugin } from './quick-insert';
|
|
25
24
|
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
26
25
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
@@ -28,11 +28,11 @@ var isMediaGroupSelectedFromProps = function isMediaGroupSelectedFromProps(props
|
|
|
28
28
|
/**
|
|
29
29
|
* ED-19831
|
|
30
30
|
* There is a getPos issue coming from this code. We need to apply this workaround for now and apply a patch
|
|
31
|
-
* directly to confluence since this bug is now
|
|
31
|
+
* directly to confluence since this bug is now in production.
|
|
32
32
|
*/
|
|
33
33
|
var pos;
|
|
34
34
|
try {
|
|
35
|
-
pos =
|
|
35
|
+
pos = props.getPos ? props.getPos() : undefined;
|
|
36
36
|
} catch (e) {
|
|
37
37
|
pos = undefined;
|
|
38
38
|
}
|
|
@@ -464,11 +464,11 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
464
464
|
/**
|
|
465
465
|
* ED-19831
|
|
466
466
|
* There is a getPos issue coming from this code. We need to apply this workaround for now and apply a patch
|
|
467
|
-
* directly to confluence since this bug is now
|
|
467
|
+
* directly to confluence since this bug is now in production.
|
|
468
468
|
*/
|
|
469
469
|
var pos;
|
|
470
470
|
try {
|
|
471
|
-
pos =
|
|
471
|
+
pos = getPos ? getPos() : undefined;
|
|
472
472
|
} catch (e) {
|
|
473
473
|
pos = undefined;
|
|
474
474
|
}
|
|
@@ -22,4 +22,26 @@ export var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(
|
|
|
22
22
|
},
|
|
23
23
|
eventType: EVENT_TYPE.UI
|
|
24
24
|
};
|
|
25
|
+
};
|
|
26
|
+
export var getMediaInputResizeAnalyticsEvent = function getMediaInputResizeAnalyticsEvent(type, attributes) {
|
|
27
|
+
if (!attributes) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
var width = attributes.width,
|
|
31
|
+
layout = attributes.layout,
|
|
32
|
+
validation = attributes.validation,
|
|
33
|
+
parentNode = attributes.parentNode;
|
|
34
|
+
var actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
|
|
35
|
+
return {
|
|
36
|
+
action: ACTION.EDITED,
|
|
37
|
+
actionSubject: actionSubject,
|
|
38
|
+
actionSubjectId: ACTION_SUBJECT_ID.INPUT_RESIZED,
|
|
39
|
+
attributes: {
|
|
40
|
+
width: width,
|
|
41
|
+
layout: layout,
|
|
42
|
+
validation: validation,
|
|
43
|
+
parentNode: parentNode
|
|
44
|
+
},
|
|
45
|
+
eventType: EVENT_TYPE.UI
|
|
46
|
+
};
|
|
25
47
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
6
6
|
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
7
|
-
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
7
|
+
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
9
9
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
10
10
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
@@ -12,7 +12,6 @@ import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
|
12
12
|
import { placeholderStyles } from '../../plugins/placeholder/styles';
|
|
13
13
|
import { blocktypeStyles } from '../../plugins/block-type/styles';
|
|
14
14
|
import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
15
|
-
import { ruleStyles } from '../../plugins/rule/styles';
|
|
16
15
|
import { mediaStyles } from '../../plugins/media/styles';
|
|
17
16
|
import { layoutStyles } from '../../plugins/layout/styles';
|
|
18
17
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
@@ -26,16 +25,19 @@ import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
|
|
|
26
25
|
import { statusStyles } from '../../plugins/status/styles';
|
|
27
26
|
import { dateStyles } from '../../plugins/date/styles';
|
|
28
27
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
29
|
-
import { linkSharedStyle, codeMarkSharedStyles } from '@atlaskit/editor-common/styles';
|
|
28
|
+
import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
30
29
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
31
30
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
32
31
|
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
33
32
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
var ruleStyles = function ruleStyles(props) {
|
|
34
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), ruleSharedStyles(props), "var(--ds-space-050, 4px)", akEditorLineHeight, akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
|
|
35
|
+
};
|
|
36
|
+
var mentionsStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(N500, ")"), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(N30A, ")"), "var(--ds-text-subtle, ".concat(N500, ")"));
|
|
37
|
+
var listsStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n }\n"])), "var(--ds-space-050, 4px)", blockNodesVerticalMargin, browser.safari ? codeBlockInListSafariFix : '');
|
|
38
|
+
var emojiStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_NODE, EmojiSharedCssClassName.EMOJI_IMAGE, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
37
39
|
var contentStyles = function contentStyles(props) {
|
|
38
|
-
return css(
|
|
40
|
+
return css(_templateObject6 || (_templateObject6 = _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({
|
|
39
41
|
theme: props.theme
|
|
40
42
|
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(props), codeMarkSharedStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles(props), telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
41
43
|
};
|
|
@@ -20,7 +20,6 @@ export { default as panelPlugin } from './panel';
|
|
|
20
20
|
export { default as pastePlugin } from './paste';
|
|
21
21
|
export { default as placeholderPlugin } from './placeholder';
|
|
22
22
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
23
|
-
export { default as rulePlugin } from './rule';
|
|
24
23
|
export { default as quickInsertPlugin } from './quick-insert';
|
|
25
24
|
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
26
25
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
@@ -11,7 +11,7 @@ import type quickInsertPlugin from '../quick-insert';
|
|
|
11
11
|
import type blockTypePlugin from '../block-type';
|
|
12
12
|
import type codeBlockPlugin from '../code-block';
|
|
13
13
|
import type panelPlugin from '../panel';
|
|
14
|
-
import type { RulePlugin } from '
|
|
14
|
+
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
export type InsertBlockPluginDependencies = [
|
|
16
16
|
FeatureFlagsPlugin,
|
|
17
17
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { MediaEventPayload, MediaResizeTrackAction } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { MediaEventPayload, MediaResizeTrackAction, MediaInputResizeTrackAction } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
|
|
3
|
+
export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
|
|
@@ -20,7 +20,6 @@ export { default as panelPlugin } from './panel';
|
|
|
20
20
|
export { default as pastePlugin } from './paste';
|
|
21
21
|
export { default as placeholderPlugin } from './placeholder';
|
|
22
22
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
23
|
-
export { default as rulePlugin } from './rule';
|
|
24
23
|
export { default as quickInsertPlugin } from './quick-insert';
|
|
25
24
|
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
26
25
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
@@ -11,7 +11,7 @@ import type quickInsertPlugin from '../quick-insert';
|
|
|
11
11
|
import type blockTypePlugin from '../block-type';
|
|
12
12
|
import type codeBlockPlugin from '../code-block';
|
|
13
13
|
import type panelPlugin from '../panel';
|
|
14
|
-
import type { RulePlugin } from '
|
|
14
|
+
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
export type InsertBlockPluginDependencies = [
|
|
16
16
|
FeatureFlagsPlugin,
|
|
17
17
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { MediaEventPayload, MediaResizeTrackAction } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { MediaEventPayload, MediaResizeTrackAction, MediaInputResizeTrackAction } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
|
|
3
|
+
export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.37.
|
|
3
|
+
"version": "187.37.5",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"@atlaskit/editor-plugin-hyperlink": "^0.4.0",
|
|
77
77
|
"@atlaskit/editor-plugin-image-upload": "^0.2.0",
|
|
78
78
|
"@atlaskit/editor-plugin-list": "^1.2.0",
|
|
79
|
+
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
79
80
|
"@atlaskit/editor-plugin-table": "^2.12.0",
|
|
80
81
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
81
82
|
"@atlaskit/editor-plugin-type-ahead": "^0.2.0",
|