@atlaskit/editor-core 187.35.4 → 187.36.0
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/index.js +10 -24
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -3
- package/dist/cjs/plugins/rule/commands.js +11 -9
- package/dist/cjs/plugins/rule/index.js +17 -9
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +10 -9
- package/dist/cjs/plugins/rule/pm-plugins/keymap.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +15 -13
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +0 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -3
- package/dist/es2019/plugins/rule/commands.js +2 -2
- package/dist/es2019/plugins/rule/index.js +19 -7
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +11 -11
- package/dist/es2019/plugins/rule/pm-plugins/keymap.js +2 -2
- package/dist/es2019/ui/ContentStyles/index.js +28 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -3
- package/dist/esm/plugins/rule/commands.js +11 -9
- package/dist/esm/plugins/rule/index.js +15 -7
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +11 -11
- package/dist/esm/plugins/rule/pm-plugins/keymap.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +8 -6
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/plugins/insert-block/types.d.ts +2 -0
- package/dist/types/plugins/rule/commands.d.ts +3 -4
- package/dist/types/plugins/rule/index.d.ts +9 -3
- package/dist/types/plugins/rule/pm-plugins/input-rule.d.ts +5 -4
- package/dist/types/plugins/rule/pm-plugins/keymap.d.ts +2 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/rule/commands.d.ts +3 -4
- package/dist/types-ts4.5/plugins/rule/index.d.ts +10 -3
- package/dist/types-ts4.5/plugins/rule/pm-plugins/input-rule.d.ts +5 -4
- package/dist/types-ts4.5/plugins/rule/pm-plugins/keymap.d.ts +2 -1
- package/package.json +2 -2
- package/report.api.md +0 -14
- package/tmp/api-report-tmp.d.ts +0 -6
- package/dist/cjs/plugins/mentions/styles.js +0 -15
- package/dist/es2019/plugins/mentions/styles.js +0 -29
- package/dist/esm/plugins/mentions/styles.js +0 -7
- package/dist/types/plugins/mentions/styles.d.ts +0 -1
- package/dist/types-ts4.5/plugins/mentions/styles.d.ts +0 -1
|
@@ -2,7 +2,8 @@
|
|
|
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 { akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
6
7
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
7
8
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
8
9
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
@@ -14,7 +15,6 @@ import { mediaStyles } from '../../plugins/media/styles';
|
|
|
14
15
|
import { layoutStyles } from '../../plugins/layout/styles';
|
|
15
16
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
16
17
|
import { fakeCursorStyles } from '../../plugins/fake-text-cursor/styles';
|
|
17
|
-
import { mentionsStyles } from '../../plugins/mentions/styles';
|
|
18
18
|
import { placeholderTextStyles } from '../../plugins/placeholder-text/styles';
|
|
19
19
|
import { extensionStyles } from '../../plugins/extension/ui/styles';
|
|
20
20
|
import { expandStyles } from '../../plugins/expand/ui/styles';
|
|
@@ -27,11 +27,37 @@ import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewPro
|
|
|
27
27
|
import { linkSharedStyle, codeMarkSharedStyles } from '@atlaskit/editor-common/styles';
|
|
28
28
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
29
29
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
30
|
+
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
30
31
|
export const linkStyles = css`
|
|
31
32
|
.ProseMirror {
|
|
32
33
|
${linkSharedStyle}
|
|
33
34
|
}
|
|
34
35
|
`;
|
|
36
|
+
const mentionsStyles = css`
|
|
37
|
+
.${MentionSharedCssClassName.MENTION_CONTAINER} {
|
|
38
|
+
&.${akEditorSelectedNodeClassName} [data-mention-id] > span {
|
|
39
|
+
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background])}
|
|
40
|
+
|
|
41
|
+
/* need to specify dark text colour because personal mentions
|
|
42
|
+
(in dark blue) have white text by default */
|
|
43
|
+
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.danger {
|
|
48
|
+
.${MentionSharedCssClassName.MENTION_CONTAINER}.${akEditorSelectedNodeClassName}
|
|
49
|
+
> span
|
|
50
|
+
> span
|
|
51
|
+
> span {
|
|
52
|
+
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
|
|
53
|
+
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackgroundWithOpacity})`};
|
|
54
|
+
}
|
|
55
|
+
.${MentionSharedCssClassName.MENTION_CONTAINER} > span > span > span {
|
|
56
|
+
background-color: ${`var(--ds-background-neutral, ${N30A})`};
|
|
57
|
+
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
35
61
|
const listsStyles = css`
|
|
36
62
|
.ProseMirror {
|
|
37
63
|
li {
|
package/dist/esm/index.js
CHANGED
|
@@ -16,10 +16,8 @@ export { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
|
16
16
|
export { AnnotationUpdateEmitter } from './plugins/annotation';
|
|
17
17
|
// Used in mobile bridge
|
|
18
18
|
export { stateKey as mediaPluginKey } from './plugins/media/pm-plugins/main';
|
|
19
|
-
export { mentionPluginKey } from './plugins/mentions';
|
|
20
19
|
export { textColorPluginKey } from './plugins/text-color';
|
|
21
20
|
export { changeColor } from './plugins/text-color/commands/change-color';
|
|
22
|
-
export { insertHorizontalRule } from './plugins/rule/commands';
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
23
|
* @private
|
|
@@ -30,7 +30,6 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
30
30
|
import { messages } from './messages';
|
|
31
31
|
import { createItems } from './create-items';
|
|
32
32
|
import { BlockInsertMenu } from './block-insert-menu';
|
|
33
|
-
import { insertHorizontalRule } from '../../../rule/commands';
|
|
34
33
|
import withOuterListeners from '../../../../ui/with-outer-listeners';
|
|
35
34
|
|
|
36
35
|
/**
|
|
@@ -250,12 +249,13 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
250
249
|
};
|
|
251
250
|
});
|
|
252
251
|
_defineProperty(_assertThisInitialized(_this), "insertHorizontalRule", function (inputMethod) {
|
|
252
|
+
var _pluginInjectionApi$r, _pluginInjectionApi$r2;
|
|
253
253
|
var _this$props4 = _this.props,
|
|
254
254
|
_this$props4$editorVi = _this$props4.editorView,
|
|
255
255
|
state = _this$props4$editorVi.state,
|
|
256
256
|
dispatch = _this$props4$editorVi.dispatch,
|
|
257
|
-
|
|
258
|
-
return insertHorizontalRule(inputMethod
|
|
257
|
+
pluginInjectionApi = _this$props4.pluginInjectionApi;
|
|
258
|
+
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
259
259
|
});
|
|
260
260
|
_defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
|
|
261
261
|
var _this$props$editorVie2 = _this.props.editorView,
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { createHorizontalRule } from './pm-plugins/input-rule';
|
|
2
|
-
export var insertHorizontalRule = function insertHorizontalRule(
|
|
3
|
-
return function (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (
|
|
7
|
-
dispatch
|
|
2
|
+
export var insertHorizontalRule = function insertHorizontalRule(featureFlags, editorAnalyticsAPI) {
|
|
3
|
+
return function (inputMethod) {
|
|
4
|
+
return function (state, dispatch) {
|
|
5
|
+
var tr = createHorizontalRule(state, featureFlags, state.selection.from, state.selection.to, inputMethod, editorAnalyticsAPI);
|
|
6
|
+
if (tr) {
|
|
7
|
+
if (dispatch) {
|
|
8
|
+
dispatch(tr);
|
|
9
|
+
}
|
|
10
|
+
return true;
|
|
8
11
|
}
|
|
9
|
-
return
|
|
10
|
-
}
|
|
11
|
-
return false;
|
|
12
|
+
return false;
|
|
13
|
+
};
|
|
12
14
|
};
|
|
13
15
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { rule } from '@atlaskit/adf-schema';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID,
|
|
4
|
-
import { messages } from '
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconDivider } from '@atlaskit/editor-common/quick-insert';
|
|
6
6
|
import inputRulePlugin from './pm-plugins/input-rule';
|
|
7
7
|
import keymapPlugin from './pm-plugins/keymap';
|
|
8
|
+
import { insertHorizontalRule } from './commands';
|
|
8
9
|
var rulePlugin = function rulePlugin(_ref) {
|
|
9
|
-
var _api$featureFlags;
|
|
10
|
+
var _api$featureFlags, _api$analytics;
|
|
10
11
|
var api = _ref.api;
|
|
11
12
|
var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
12
13
|
return {
|
|
@@ -17,17 +18,22 @@ var rulePlugin = function rulePlugin(_ref) {
|
|
|
17
18
|
node: rule
|
|
18
19
|
}];
|
|
19
20
|
},
|
|
21
|
+
actions: {
|
|
22
|
+
insertHorizontalRule: insertHorizontalRule(featureFlags, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)
|
|
23
|
+
},
|
|
20
24
|
pmPlugins: function pmPlugins() {
|
|
21
25
|
return [{
|
|
22
26
|
name: 'ruleInputRule',
|
|
23
27
|
plugin: function plugin(_ref2) {
|
|
28
|
+
var _api$analytics2;
|
|
24
29
|
var schema = _ref2.schema;
|
|
25
|
-
return inputRulePlugin(schema, featureFlags);
|
|
30
|
+
return inputRulePlugin(schema, featureFlags, api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions);
|
|
26
31
|
}
|
|
27
32
|
}, {
|
|
28
33
|
name: 'ruleKeymap',
|
|
29
34
|
plugin: function plugin() {
|
|
30
|
-
|
|
35
|
+
var _api$analytics3;
|
|
36
|
+
return keymapPlugin(featureFlags, api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions);
|
|
31
37
|
}
|
|
32
38
|
}];
|
|
33
39
|
},
|
|
@@ -45,8 +51,9 @@ var rulePlugin = function rulePlugin(_ref) {
|
|
|
45
51
|
return /*#__PURE__*/React.createElement(IconDivider, null);
|
|
46
52
|
},
|
|
47
53
|
action: function action(insert, state) {
|
|
54
|
+
var _api$analytics4;
|
|
48
55
|
var tr = insert(state.schema.nodes.rule.createChecked());
|
|
49
|
-
|
|
56
|
+
api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions.attachAnalyticsEvent({
|
|
50
57
|
action: ACTION.INSERTED,
|
|
51
58
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
52
59
|
actionSubjectId: ACTION_SUBJECT_ID.DIVIDER,
|
|
@@ -54,7 +61,8 @@ var rulePlugin = function rulePlugin(_ref) {
|
|
|
54
61
|
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
55
62
|
},
|
|
56
63
|
eventType: EVENT_TYPE.TRACK
|
|
57
|
-
});
|
|
64
|
+
})(tr);
|
|
65
|
+
return tr;
|
|
58
66
|
}
|
|
59
67
|
}];
|
|
60
68
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { createRule, createPlugin } from '@atlaskit/prosemirror-input-rules';
|
|
3
|
-
import { leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
|
|
2
|
+
import { createRule, createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
|
|
4
3
|
import { safeInsert } from '@atlaskit/editor-common/insert';
|
|
5
4
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID,
|
|
7
|
-
export var createHorizontalRule = function createHorizontalRule(state, featureFlags, start, end, inputMethod) {
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
export var createHorizontalRule = function createHorizontalRule(state, featureFlags, start, end, inputMethod, editorAnalyticsAPI) {
|
|
8
7
|
if (!state.selection.empty) {
|
|
9
8
|
return null;
|
|
10
9
|
}
|
|
@@ -23,7 +22,7 @@ export var createHorizontalRule = function createHorizontalRule(state, featureFl
|
|
|
23
22
|
if (!tr) {
|
|
24
23
|
tr = state.tr.replaceRange(start, end, new Slice(Fragment.from(state.schema.nodes.rule.createChecked()), 0, 0));
|
|
25
24
|
}
|
|
26
|
-
|
|
25
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
27
26
|
action: ACTION.INSERTED,
|
|
28
27
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
29
28
|
actionSubjectId: ACTION_SUBJECT_ID.DIVIDER,
|
|
@@ -31,21 +30,22 @@ export var createHorizontalRule = function createHorizontalRule(state, featureFl
|
|
|
31
30
|
inputMethod: inputMethod
|
|
32
31
|
},
|
|
33
32
|
eventType: EVENT_TYPE.TRACK
|
|
34
|
-
});
|
|
33
|
+
})(tr);
|
|
34
|
+
return tr;
|
|
35
35
|
};
|
|
36
|
-
var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, featureFlags, start, end) {
|
|
36
|
+
var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, featureFlags, start, end, editorAnalyticsAPI) {
|
|
37
37
|
var listItem = state.schema.nodes.listItem;
|
|
38
38
|
if (hasParentNodeOfType(listItem)(state.selection)) {
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
|
-
return createHorizontalRule(state, featureFlags, start, end, INPUT_METHOD.FORMATTING);
|
|
41
|
+
return createHorizontalRule(state, featureFlags, start, end, INPUT_METHOD.FORMATTING, editorAnalyticsAPI);
|
|
42
42
|
};
|
|
43
|
-
export function inputRulePlugin(schema, featureFlags) {
|
|
43
|
+
export function inputRulePlugin(schema, featureFlags, editorAnalyticsAPI) {
|
|
44
44
|
var rules = [];
|
|
45
45
|
if (schema.nodes.rule) {
|
|
46
46
|
// '---' and '***' for hr
|
|
47
47
|
rules.push(createRule(/^(\-\-\-|\*\*\*)$/, function (state, _match, start, end) {
|
|
48
|
-
return createHorizontalRuleAutoformat(state, featureFlags, start, end);
|
|
48
|
+
return createHorizontalRuleAutoformat(state, featureFlags, start, end, editorAnalyticsAPI);
|
|
49
49
|
}));
|
|
50
50
|
|
|
51
51
|
// '---' and '***' after shift+enter for hr
|
|
@@ -54,7 +54,7 @@ export function inputRulePlugin(schema, featureFlags) {
|
|
|
54
54
|
if (state.doc.resolve(start).nodeAfter.type !== hardBreak) {
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
|
-
return createHorizontalRuleAutoformat(state, featureFlags, start, end);
|
|
57
|
+
return createHorizontalRuleAutoformat(state, featureFlags, start, end, editorAnalyticsAPI);
|
|
58
58
|
}));
|
|
59
59
|
}
|
|
60
60
|
if (rules.length !== 0) {
|
|
@@ -2,9 +2,9 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
2
2
|
import { bindKeymapWithCommand, insertRule, escape } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { insertHorizontalRule } from '../commands';
|
|
5
|
-
export function keymapPlugin(featureFlags) {
|
|
5
|
+
export function keymapPlugin(featureFlags, editorAnalyticsAPI) {
|
|
6
6
|
var list = {};
|
|
7
|
-
bindKeymapWithCommand(insertRule.common, insertHorizontalRule(INPUT_METHOD.SHORTCUT
|
|
7
|
+
bindKeymapWithCommand(insertRule.common, insertHorizontalRule(featureFlags, editorAnalyticsAPI)(INPUT_METHOD.SHORTCUT), list);
|
|
8
8
|
bindKeymapWithCommand(escape.common, function () {
|
|
9
9
|
return true;
|
|
10
10
|
}, list);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
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 { akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
7
|
+
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
8
9
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
9
10
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
10
11
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
@@ -16,7 +17,6 @@ import { mediaStyles } from '../../plugins/media/styles';
|
|
|
16
17
|
import { layoutStyles } from '../../plugins/layout/styles';
|
|
17
18
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
18
19
|
import { fakeCursorStyles } from '../../plugins/fake-text-cursor/styles';
|
|
19
|
-
import { mentionsStyles } from '../../plugins/mentions/styles';
|
|
20
20
|
import { placeholderTextStyles } from '../../plugins/placeholder-text/styles';
|
|
21
21
|
import { extensionStyles } from '../../plugins/extension/ui/styles';
|
|
22
22
|
import { expandStyles } from '../../plugins/expand/ui/styles';
|
|
@@ -29,11 +29,13 @@ import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewPro
|
|
|
29
29
|
import { linkSharedStyle, codeMarkSharedStyles } from '@atlaskit/editor-common/styles';
|
|
30
30
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
31
31
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
32
|
+
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
32
33
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
|
|
33
|
-
var
|
|
34
|
-
var
|
|
34
|
+
var mentionsStyles = css(_templateObject2 || (_templateObject2 = _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, ")"));
|
|
35
|
+
var listsStyles = css(_templateObject3 || (_templateObject3 = _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 : '');
|
|
36
|
+
var emojiStyles = css(_templateObject4 || (_templateObject4 = _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]));
|
|
35
37
|
var contentStyles = function contentStyles(props) {
|
|
36
|
-
return css(
|
|
38
|
+
return css(_templateObject5 || (_templateObject5 = _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({
|
|
37
39
|
theme: props.theme
|
|
38
40
|
}), 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);
|
|
39
41
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,11 +19,9 @@ export { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
|
19
19
|
export { AnnotationUpdateEmitter } from './plugins/annotation';
|
|
20
20
|
export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationInfo, AnnotationState, AnnotationTypeProvider, InlineCommentState, UpdateEvent, } from './plugins/annotation';
|
|
21
21
|
export { stateKey as mediaPluginKey } from './plugins/media/pm-plugins/main';
|
|
22
|
-
export { mentionPluginKey } from './plugins/mentions';
|
|
23
22
|
export { textColorPluginKey } from './plugins/text-color';
|
|
24
23
|
export type { TextColorPluginState } from './plugins/text-color';
|
|
25
24
|
export { changeColor } from './plugins/text-color/commands/change-color';
|
|
26
|
-
export { insertHorizontalRule } from './plugins/rule/commands';
|
|
27
25
|
export type { BlockTypeState } from './plugins/block-type/pm-plugins/main';
|
|
28
26
|
/**
|
|
29
27
|
* @private
|
|
@@ -11,6 +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 '../rule';
|
|
14
15
|
export type InsertBlockPluginDependencies = [
|
|
15
16
|
FeatureFlagsPlugin,
|
|
16
17
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -22,6 +23,7 @@ export type InsertBlockPluginDependencies = [
|
|
|
22
23
|
OptionalPlugin<typeof mentionsPlugin>,
|
|
23
24
|
OptionalPlugin<EmojiPlugin>,
|
|
24
25
|
OptionalPlugin<typeof quickInsertPlugin>,
|
|
26
|
+
OptionalPlugin<RulePlugin>,
|
|
25
27
|
OptionalPlugin<typeof codeBlockPlugin>,
|
|
26
28
|
OptionalPlugin<typeof panelPlugin>
|
|
27
29
|
];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const insertHorizontalRule: (inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT, featureFlags: FeatureFlags) => Command;
|
|
1
|
+
import type { FeatureFlags, Command } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
export declare const insertHorizontalRule: (featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT) => Command;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { insertHorizontalRule } from './commands';
|
|
2
3
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
|
-
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
export type RulePlugin = NextEditorPlugin<'rule', {
|
|
4
6
|
pluginConfiguration: undefined;
|
|
5
|
-
dependencies: [FeatureFlagsPlugin];
|
|
7
|
+
dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
|
|
8
|
+
actions: {
|
|
9
|
+
insertHorizontalRule: ReturnType<typeof insertHorizontalRule>;
|
|
10
|
+
};
|
|
6
11
|
}>;
|
|
12
|
+
declare const rulePlugin: RulePlugin;
|
|
7
13
|
export default rulePlugin;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { FeatureFlags } from '
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export declare
|
|
4
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
export declare const createHorizontalRule: (state: EditorState, featureFlags: FeatureFlags, start: number, end: number, inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Transaction | null;
|
|
8
|
+
export declare function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
8
9
|
export default inputRulePlugin;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
-
export declare function keymapPlugin(featureFlags: FeatureFlags): SafePlugin;
|
|
4
|
+
export declare function keymapPlugin(featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin;
|
|
4
5
|
export default keymapPlugin;
|
|
@@ -19,11 +19,9 @@ export { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
|
19
19
|
export { AnnotationUpdateEmitter } from './plugins/annotation';
|
|
20
20
|
export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationInfo, AnnotationState, AnnotationTypeProvider, InlineCommentState, UpdateEvent, } from './plugins/annotation';
|
|
21
21
|
export { stateKey as mediaPluginKey } from './plugins/media/pm-plugins/main';
|
|
22
|
-
export { mentionPluginKey } from './plugins/mentions';
|
|
23
22
|
export { textColorPluginKey } from './plugins/text-color';
|
|
24
23
|
export type { TextColorPluginState } from './plugins/text-color';
|
|
25
24
|
export { changeColor } from './plugins/text-color/commands/change-color';
|
|
26
|
-
export { insertHorizontalRule } from './plugins/rule/commands';
|
|
27
25
|
export type { BlockTypeState } from './plugins/block-type/pm-plugins/main';
|
|
28
26
|
/**
|
|
29
27
|
* @private
|
|
@@ -11,6 +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 '../rule';
|
|
14
15
|
export type InsertBlockPluginDependencies = [
|
|
15
16
|
FeatureFlagsPlugin,
|
|
16
17
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -22,6 +23,7 @@ export type InsertBlockPluginDependencies = [
|
|
|
22
23
|
OptionalPlugin<typeof mentionsPlugin>,
|
|
23
24
|
OptionalPlugin<EmojiPlugin>,
|
|
24
25
|
OptionalPlugin<typeof quickInsertPlugin>,
|
|
26
|
+
OptionalPlugin<RulePlugin>,
|
|
25
27
|
OptionalPlugin<typeof codeBlockPlugin>,
|
|
26
28
|
OptionalPlugin<typeof panelPlugin>
|
|
27
29
|
];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const insertHorizontalRule: (inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT, featureFlags: FeatureFlags) => Command;
|
|
1
|
+
import type { FeatureFlags, Command } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
export declare const insertHorizontalRule: (featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT) => Command;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { insertHorizontalRule } from './commands';
|
|
2
3
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
|
-
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
export type RulePlugin = NextEditorPlugin<'rule', {
|
|
4
6
|
pluginConfiguration: undefined;
|
|
5
7
|
dependencies: [
|
|
6
|
-
FeatureFlagsPlugin
|
|
8
|
+
FeatureFlagsPlugin,
|
|
9
|
+
OptionalPlugin<AnalyticsPlugin>
|
|
7
10
|
];
|
|
11
|
+
actions: {
|
|
12
|
+
insertHorizontalRule: ReturnType<typeof insertHorizontalRule>;
|
|
13
|
+
};
|
|
8
14
|
}>;
|
|
15
|
+
declare const rulePlugin: RulePlugin;
|
|
9
16
|
export default rulePlugin;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { FeatureFlags } from '
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export declare
|
|
4
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
export declare const createHorizontalRule: (state: EditorState, featureFlags: FeatureFlags, start: number, end: number, inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Transaction | null;
|
|
8
|
+
export declare function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
8
9
|
export default inputRulePlugin;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
-
export declare function keymapPlugin(featureFlags: FeatureFlags): SafePlugin;
|
|
4
|
+
export declare function keymapPlugin(featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin;
|
|
4
5
|
export default keymapPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.
|
|
3
|
+
"version": "187.36.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@atlaskit/task-decision": "^17.7.0",
|
|
114
114
|
"@atlaskit/textarea": "^4.7.0",
|
|
115
115
|
"@atlaskit/textfield": "^5.6.0",
|
|
116
|
-
"@atlaskit/theme": "^12.
|
|
116
|
+
"@atlaskit/theme": "^12.6.0",
|
|
117
117
|
"@atlaskit/toggle": "^12.6.0",
|
|
118
118
|
"@atlaskit/tokens": "^1.18.0",
|
|
119
119
|
"@atlaskit/tooltip": "^17.8.0",
|
package/report.api.md
CHANGED
|
@@ -1144,17 +1144,6 @@ export const insertDate: (
|
|
|
1144
1144
|
// @public (undocumented)
|
|
1145
1145
|
export const insertExpand: Command;
|
|
1146
1146
|
|
|
1147
|
-
// @public (undocumented)
|
|
1148
|
-
export const insertHorizontalRule: (
|
|
1149
|
-
inputMethod:
|
|
1150
|
-
| INPUT_METHOD.FORMATTING
|
|
1151
|
-
| INPUT_METHOD.INSERT_MENU
|
|
1152
|
-
| INPUT_METHOD.QUICK_INSERT
|
|
1153
|
-
| INPUT_METHOD.SHORTCUT
|
|
1154
|
-
| INPUT_METHOD.TOOLBAR,
|
|
1155
|
-
featureFlags: EditorFeatureFlags,
|
|
1156
|
-
) => Command;
|
|
1157
|
-
|
|
1158
1147
|
// @public (undocumented)
|
|
1159
1148
|
type InsertItemProps = {
|
|
1160
1149
|
contentItem: TypeAheadItem;
|
|
@@ -1526,9 +1515,6 @@ interface MentionPluginConfig {
|
|
|
1526
1515
|
insertDisplayName?: boolean;
|
|
1527
1516
|
}
|
|
1528
1517
|
|
|
1529
|
-
// @public (undocumented)
|
|
1530
|
-
export const mentionPluginKey: PluginKey<MentionPluginState>;
|
|
1531
|
-
|
|
1532
1518
|
// @public (undocumented)
|
|
1533
1519
|
export type MentionPluginState = {
|
|
1534
1520
|
mentionProvider?: MentionProvider_2;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -1045,9 +1045,6 @@ export const insertDate: (date?: DateType, inputMethod?: InsertBlockInputMethodT
|
|
|
1045
1045
|
// @public (undocumented)
|
|
1046
1046
|
export const insertExpand: Command;
|
|
1047
1047
|
|
|
1048
|
-
// @public (undocumented)
|
|
1049
|
-
export const insertHorizontalRule: (inputMethod: INPUT_METHOD.FORMATTING | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TOOLBAR, featureFlags: EditorFeatureFlags) => Command;
|
|
1050
|
-
|
|
1051
1048
|
// @public (undocumented)
|
|
1052
1049
|
type InsertItemProps = {
|
|
1053
1050
|
contentItem: TypeAheadItem;
|
|
@@ -1362,9 +1359,6 @@ interface MentionPluginConfig {
|
|
|
1362
1359
|
insertDisplayName?: boolean;
|
|
1363
1360
|
}
|
|
1364
1361
|
|
|
1365
|
-
// @public (undocumented)
|
|
1366
|
-
export const mentionPluginKey: PluginKey<MentionPluginState>;
|
|
1367
|
-
|
|
1368
1362
|
// @public (undocumented)
|
|
1369
1363
|
export type MentionPluginState = {
|
|
1370
1364
|
mentionProvider?: MentionProvider_2;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.mentionsStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _mention = require("@atlaskit/editor-common/mention");
|
|
11
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
13
|
-
var _templateObject;
|
|
14
|
-
var mentionsStyles = (0, _react.css)(_templateObject || (_templateObject = (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, ")"));
|
|
15
|
-
exports.mentionsStyles = mentionsStyles;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
3
|
-
import { SelectionStyle, getSelectionStyles, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
5
|
-
export const mentionsStyles = css`
|
|
6
|
-
.${MentionSharedCssClassName.MENTION_CONTAINER} {
|
|
7
|
-
&.${akEditorSelectedNodeClassName} [data-mention-id] > span {
|
|
8
|
-
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background])}
|
|
9
|
-
|
|
10
|
-
/* need to specify dark text colour because personal mentions
|
|
11
|
-
(in dark blue) have white text by default */
|
|
12
|
-
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.danger {
|
|
17
|
-
.${MentionSharedCssClassName.MENTION_CONTAINER}.${akEditorSelectedNodeClassName}
|
|
18
|
-
> span
|
|
19
|
-
> span
|
|
20
|
-
> span {
|
|
21
|
-
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
|
|
22
|
-
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackgroundWithOpacity})`};
|
|
23
|
-
}
|
|
24
|
-
.${MentionSharedCssClassName.MENTION_CONTAINER} > span > span > span {
|
|
25
|
-
background-color: ${`var(--ds-background-neutral, ${N30A})`};
|
|
26
|
-
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
`;
|