@atlaskit/editor-core 188.0.12 → 188.2.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 +23 -0
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/annotation/toolbar.js +5 -23
- package/dist/cjs/plugins/code-block/index.js +3 -3
- package/dist/cjs/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +2 -2
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +4 -4
- package/dist/cjs/plugins/media/index.js +12 -6
- package/dist/cjs/plugins/media/utils/media-common.js +7 -109
- package/dist/cjs/plugins/media/utils/media-single.js +7 -68
- package/dist/cjs/plugins/panel/index.js +13 -13
- package/dist/cjs/plugins/paste/handlers.js +4 -4
- package/dist/cjs/plugins/paste/plugins/media.js +181 -0
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/cjs/plugins/paste/pm-plugins/main.js +6 -7
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +3 -3
- package/dist/cjs/ui/Alignment/index.js +1 -1
- package/dist/cjs/ui/WithHelpTrigger/index.js +3 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/annotation/toolbar.js +2 -18
- package/dist/es2019/plugins/code-block/index.js +3 -3
- package/dist/es2019/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/es2019/plugins/media/index.js +13 -6
- package/dist/es2019/plugins/media/utils/media-common.js +2 -107
- package/dist/es2019/plugins/media/utils/media-single.js +6 -72
- package/dist/es2019/plugins/panel/index.js +13 -13
- package/dist/es2019/plugins/paste/handlers.js +4 -4
- package/dist/es2019/plugins/paste/plugins/media.js +176 -0
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +3 -4
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +3 -3
- package/dist/es2019/ui/Alignment/index.js +1 -1
- package/dist/es2019/ui/WithHelpTrigger/index.js +2 -7
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/annotation/toolbar.js +2 -18
- package/dist/esm/plugins/code-block/index.js +3 -3
- package/dist/esm/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/esm/plugins/media/index.js +13 -6
- package/dist/esm/plugins/media/utils/media-common.js +2 -106
- package/dist/esm/plugins/media/utils/media-single.js +6 -66
- package/dist/esm/plugins/panel/index.js +13 -13
- package/dist/esm/plugins/paste/handlers.js +4 -4
- package/dist/esm/plugins/paste/plugins/media.js +172 -0
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +3 -4
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +3 -3
- package/dist/esm/ui/Alignment/index.js +1 -1
- package/dist/esm/ui/WithHelpTrigger/index.js +2 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +6 -0
- package/dist/types/plugins/annotation/toolbar.d.ts +0 -17
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/media/next-plugin-type.d.ts +4 -0
- package/dist/types/plugins/media/utils/media-common.d.ts +2 -10
- package/dist/types/plugins/media/utils/media-single.d.ts +2 -4
- package/dist/types/plugins/paste/handlers.d.ts +2 -2
- package/dist/types/plugins/paste/index.d.ts +5 -2
- package/dist/types/plugins/paste/plugins/media.d.ts +12 -0
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +2 -2
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +2 -2
- package/dist/types/ui/Alignment/index.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/WithHelpTrigger/index.d.ts +0 -4
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +6 -0
- package/dist/types-ts4.5/plugins/annotation/toolbar.d.ts +0 -17
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/next-plugin-type.d.ts +4 -0
- package/dist/types-ts4.5/plugins/media/utils/media-common.d.ts +2 -10
- package/dist/types-ts4.5/plugins/media/utils/media-single.d.ts +2 -4
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +2 -2
- package/dist/types-ts4.5/plugins/paste/index.d.ts +5 -2
- package/dist/types-ts4.5/plugins/paste/plugins/media.d.ts +12 -0
- package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +2 -2
- package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/ui/Alignment/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/WithHelpTrigger/index.d.ts +0 -4
- package/package.json +8 -7
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +1 -1
- package/dist/cjs/plugins/help-dialog/commands.js +0 -19
- package/dist/cjs/plugins/help-dialog/index.js +0 -138
- package/dist/cjs/plugins/help-dialog/plugin-key.js +0 -8
- package/dist/cjs/plugins/help-dialog/ui/HelpDialogLoader.js +0 -24
- package/dist/cjs/plugins/help-dialog/ui/index.js +0 -568
- package/dist/cjs/plugins/help-dialog/ui/styles.js +0 -50
- package/dist/cjs/plugins/undo-redo/messages.js +0 -19
- package/dist/cjs/ui/Alignment/messages.js +0 -24
- package/dist/es2019/plugins/help-dialog/commands.js +0 -13
- package/dist/es2019/plugins/help-dialog/index.js +0 -125
- package/dist/es2019/plugins/help-dialog/plugin-key.js +0 -2
- package/dist/es2019/plugins/help-dialog/ui/HelpDialogLoader.js +0 -6
- package/dist/es2019/plugins/help-dialog/ui/index.js +0 -446
- package/dist/es2019/plugins/help-dialog/ui/styles.js +0 -110
- package/dist/es2019/plugins/undo-redo/messages.js +0 -13
- package/dist/es2019/ui/Alignment/messages.js +0 -18
- package/dist/esm/plugins/help-dialog/commands.js +0 -13
- package/dist/esm/plugins/help-dialog/index.js +0 -130
- package/dist/esm/plugins/help-dialog/plugin-key.js +0 -2
- package/dist/esm/plugins/help-dialog/ui/HelpDialogLoader.js +0 -12
- package/dist/esm/plugins/help-dialog/ui/index.js +0 -557
- package/dist/esm/plugins/help-dialog/ui/styles.js +0 -40
- package/dist/esm/plugins/undo-redo/messages.js +0 -13
- package/dist/esm/ui/Alignment/messages.js +0 -18
- package/dist/types/plugins/help-dialog/commands.d.ts +0 -3
- package/dist/types/plugins/help-dialog/index.d.ts +0 -18
- package/dist/types/plugins/help-dialog/plugin-key.d.ts +0 -2
- package/dist/types/plugins/help-dialog/ui/HelpDialogLoader.d.ts +0 -4
- package/dist/types/plugins/help-dialog/ui/index.d.ts +0 -27
- package/dist/types/plugins/help-dialog/ui/styles.d.ts +0 -33
- package/dist/types/plugins/undo-redo/messages.d.ts +0 -12
- package/dist/types/ui/Alignment/messages.d.ts +0 -17
- package/dist/types-ts4.5/plugins/help-dialog/commands.d.ts +0 -3
- package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +0 -18
- package/dist/types-ts4.5/plugins/help-dialog/plugin-key.d.ts +0 -2
- package/dist/types-ts4.5/plugins/help-dialog/ui/HelpDialogLoader.d.ts +0 -4
- package/dist/types-ts4.5/plugins/help-dialog/ui/index.d.ts +0 -27
- package/dist/types-ts4.5/plugins/help-dialog/ui/styles.d.ts +0 -33
- package/dist/types-ts4.5/plugins/undo-redo/messages.d.ts +0 -12
- package/dist/types-ts4.5/ui/Alignment/messages.d.ts +0 -17
|
@@ -1,568 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.getSupportedFormatting = exports.getComponentFromKeymap = exports.formatting = exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
var _react = require("react");
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
var _reactIntlNext = require("react-intl-next");
|
|
14
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
-
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
16
|
-
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
17
|
-
var _styles = require("./styles");
|
|
18
|
-
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
19
|
-
var _ToolbarButton = _interopRequireDefault(require("../../../ui/ToolbarButton"));
|
|
20
|
-
var _messages = require("@atlaskit/editor-common/messages");
|
|
21
|
-
var _messages2 = require("../../insert-block/ui/ToolbarInsertBlock/messages");
|
|
22
|
-
var _messages3 = require("@atlaskit/editor-plugin-block-type/messages");
|
|
23
|
-
var _messages4 = require("../../undo-redo/messages");
|
|
24
|
-
var _messages5 = require("../../../ui/Alignment/messages");
|
|
25
|
-
var _commands = require("../commands");
|
|
26
|
-
var _toolbar = require("../../annotation/toolbar");
|
|
27
|
-
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
28
|
-
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); }
|
|
29
|
-
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; }
|
|
30
|
-
/** @jsx jsx */
|
|
31
|
-
|
|
32
|
-
var messages = (0, _reactIntlNext.defineMessages)({
|
|
33
|
-
editorHelp: {
|
|
34
|
-
id: 'fabric.editor.editorHelp',
|
|
35
|
-
defaultMessage: 'Editor help',
|
|
36
|
-
description: 'Title of editor help dialog.'
|
|
37
|
-
},
|
|
38
|
-
helpDialogTips: {
|
|
39
|
-
id: 'fabric.editor.helpDialogTips',
|
|
40
|
-
defaultMessage: 'Press {keyMap} to quickly open this dialog at any time',
|
|
41
|
-
description: 'Hint about how to open a dialog quickly using a shortcut.'
|
|
42
|
-
},
|
|
43
|
-
keyboardShortcuts: {
|
|
44
|
-
id: 'fabric.editor.keyboardShortcuts',
|
|
45
|
-
defaultMessage: 'Keyboard shortcuts',
|
|
46
|
-
description: ''
|
|
47
|
-
},
|
|
48
|
-
markdown: {
|
|
49
|
-
id: 'fabric.editor.markdown',
|
|
50
|
-
defaultMessage: 'Markdown',
|
|
51
|
-
description: 'It is a name of popular markup language.'
|
|
52
|
-
},
|
|
53
|
-
pastePlainText: {
|
|
54
|
-
id: 'fabric.editor.pastePlainText',
|
|
55
|
-
defaultMessage: 'Paste plain text',
|
|
56
|
-
description: ''
|
|
57
|
-
},
|
|
58
|
-
CheckUncheckActionItem: {
|
|
59
|
-
id: 'fabric.editor.checkUncheckActionItem',
|
|
60
|
-
defaultMessage: 'Toggle action item',
|
|
61
|
-
description: 'For Check/Uncheck Action item use shortcut'
|
|
62
|
-
},
|
|
63
|
-
altText: {
|
|
64
|
-
id: 'fabric.editor.altText',
|
|
65
|
-
defaultMessage: 'Alt text',
|
|
66
|
-
description: 'Alternative text for image.'
|
|
67
|
-
},
|
|
68
|
-
closeHelpDialog: {
|
|
69
|
-
id: 'fabric.editor.closeHelpDialog',
|
|
70
|
-
defaultMessage: 'Close help dialog',
|
|
71
|
-
description: ''
|
|
72
|
-
},
|
|
73
|
-
// TODO: Move it inside quick insert plugin
|
|
74
|
-
quickInsert: {
|
|
75
|
-
id: 'fabric.editor.quickInsert',
|
|
76
|
-
defaultMessage: 'Quick insert',
|
|
77
|
-
description: 'Name of a feature, which let you insert items quickly.'
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
var navigationKeymaps = function navigationKeymaps(_ref) {
|
|
81
|
-
var formatMessage = _ref.formatMessage;
|
|
82
|
-
return [{
|
|
83
|
-
name: formatMessage(_messages.toolbarMessages.navigateToEditorToolbar),
|
|
84
|
-
type: 'navigation',
|
|
85
|
-
keymap: function keymap() {
|
|
86
|
-
return _keymaps.navToEditorToolbar;
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
name: formatMessage(_messages.toolbarMessages.navigateToFloatingToolbar),
|
|
90
|
-
type: 'navigation',
|
|
91
|
-
keymap: function keymap() {
|
|
92
|
-
return _keymaps.navToFloatingToolbar;
|
|
93
|
-
}
|
|
94
|
-
}];
|
|
95
|
-
};
|
|
96
|
-
var formatting = exports.formatting = function formatting(_ref2) {
|
|
97
|
-
var formatMessage = _ref2.formatMessage;
|
|
98
|
-
return [{
|
|
99
|
-
name: formatMessage(_messages.toolbarMessages.bold),
|
|
100
|
-
type: 'strong',
|
|
101
|
-
keymap: function keymap() {
|
|
102
|
-
return _keymaps.toggleBold;
|
|
103
|
-
},
|
|
104
|
-
autoFormatting: function autoFormatting() {
|
|
105
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
106
|
-
css: _styles.codeLg
|
|
107
|
-
}, "**", (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.toolbarMessages.bold), "**"));
|
|
108
|
-
}
|
|
109
|
-
}, {
|
|
110
|
-
name: formatMessage(_messages.toolbarMessages.italic),
|
|
111
|
-
type: 'em',
|
|
112
|
-
keymap: function keymap() {
|
|
113
|
-
return _keymaps.toggleItalic;
|
|
114
|
-
},
|
|
115
|
-
autoFormatting: function autoFormatting() {
|
|
116
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
117
|
-
css: _styles.codeLg
|
|
118
|
-
}, "*", (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.toolbarMessages.italic), "*"));
|
|
119
|
-
}
|
|
120
|
-
}, {
|
|
121
|
-
name: formatMessage(_messages.toolbarMessages.underline),
|
|
122
|
-
type: 'underline',
|
|
123
|
-
keymap: function keymap() {
|
|
124
|
-
return _keymaps.toggleUnderline;
|
|
125
|
-
}
|
|
126
|
-
}, {
|
|
127
|
-
name: formatMessage(_messages.toolbarMessages.strike),
|
|
128
|
-
type: 'strike',
|
|
129
|
-
keymap: function keymap() {
|
|
130
|
-
return _keymaps.toggleStrikethrough;
|
|
131
|
-
},
|
|
132
|
-
autoFormatting: function autoFormatting() {
|
|
133
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
134
|
-
css: _styles.codeLg
|
|
135
|
-
}, "~~", (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.toolbarMessages.strike), "~~"));
|
|
136
|
-
}
|
|
137
|
-
}, {
|
|
138
|
-
name: formatMessage(_messages.toolbarMessages.subscript),
|
|
139
|
-
type: 'subsup',
|
|
140
|
-
keymap: function keymap() {
|
|
141
|
-
return _keymaps.toggleSubscript;
|
|
142
|
-
}
|
|
143
|
-
}, {
|
|
144
|
-
name: formatMessage(_messages.toolbarMessages.superscript),
|
|
145
|
-
type: 'subsup',
|
|
146
|
-
keymap: function keymap() {
|
|
147
|
-
return _keymaps.toggleSuperscript;
|
|
148
|
-
}
|
|
149
|
-
}, {
|
|
150
|
-
name: formatMessage(_messages3.messages.heading1),
|
|
151
|
-
type: 'heading',
|
|
152
|
-
keymap: function keymap() {
|
|
153
|
-
return _keymaps.toggleHeading1;
|
|
154
|
-
},
|
|
155
|
-
autoFormatting: function autoFormatting() {
|
|
156
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
157
|
-
css: _styles.codeSm
|
|
158
|
-
}, "#"), " ", (0, _react2.jsx)("span", {
|
|
159
|
-
css: _styles.codeLg
|
|
160
|
-
}, "Space"));
|
|
161
|
-
}
|
|
162
|
-
}, {
|
|
163
|
-
name: formatMessage(_messages3.messages.heading2),
|
|
164
|
-
type: 'heading',
|
|
165
|
-
keymap: function keymap() {
|
|
166
|
-
return _keymaps.toggleHeading2;
|
|
167
|
-
},
|
|
168
|
-
autoFormatting: function autoFormatting() {
|
|
169
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
170
|
-
css: _styles.codeLg
|
|
171
|
-
}, "##"), " ", (0, _react2.jsx)("span", {
|
|
172
|
-
css: _styles.codeLg
|
|
173
|
-
}, "Space"));
|
|
174
|
-
}
|
|
175
|
-
}, {
|
|
176
|
-
name: formatMessage(_messages3.messages.heading3),
|
|
177
|
-
type: 'heading',
|
|
178
|
-
keymap: function keymap() {
|
|
179
|
-
return _keymaps.toggleHeading3;
|
|
180
|
-
},
|
|
181
|
-
autoFormatting: function autoFormatting() {
|
|
182
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
183
|
-
css: _styles.codeLg
|
|
184
|
-
}, "###"), " ", (0, _react2.jsx)("span", {
|
|
185
|
-
css: _styles.codeLg
|
|
186
|
-
}, "Space"));
|
|
187
|
-
}
|
|
188
|
-
}, {
|
|
189
|
-
name: formatMessage(_messages3.messages.heading4),
|
|
190
|
-
type: 'heading',
|
|
191
|
-
keymap: function keymap() {
|
|
192
|
-
return _keymaps.toggleHeading4;
|
|
193
|
-
},
|
|
194
|
-
autoFormatting: function autoFormatting() {
|
|
195
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
196
|
-
css: _styles.codeLg
|
|
197
|
-
}, "####"), " ", (0, _react2.jsx)("span", {
|
|
198
|
-
css: _styles.codeLg
|
|
199
|
-
}, "Space"));
|
|
200
|
-
}
|
|
201
|
-
}, {
|
|
202
|
-
name: formatMessage(_messages3.messages.heading5),
|
|
203
|
-
type: 'heading',
|
|
204
|
-
keymap: function keymap() {
|
|
205
|
-
return _keymaps.toggleHeading5;
|
|
206
|
-
},
|
|
207
|
-
autoFormatting: function autoFormatting() {
|
|
208
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
209
|
-
css: _styles.codeLg
|
|
210
|
-
}, "#####"), " ", (0, _react2.jsx)("span", {
|
|
211
|
-
css: _styles.codeLg
|
|
212
|
-
}, "Space"));
|
|
213
|
-
}
|
|
214
|
-
}, {
|
|
215
|
-
name: formatMessage(_messages3.messages.heading6),
|
|
216
|
-
type: 'heading',
|
|
217
|
-
keymap: function keymap() {
|
|
218
|
-
return _keymaps.toggleHeading6;
|
|
219
|
-
},
|
|
220
|
-
autoFormatting: function autoFormatting() {
|
|
221
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
222
|
-
css: _styles.codeLg
|
|
223
|
-
}, "######"), " ", (0, _react2.jsx)("span", {
|
|
224
|
-
css: _styles.codeLg
|
|
225
|
-
}, "Space"));
|
|
226
|
-
}
|
|
227
|
-
}, {
|
|
228
|
-
name: formatMessage(_messages3.messages.normal),
|
|
229
|
-
type: 'paragraph',
|
|
230
|
-
keymap: function keymap() {
|
|
231
|
-
return _keymaps.setNormalText;
|
|
232
|
-
}
|
|
233
|
-
}, {
|
|
234
|
-
name: formatMessage(_messages.listMessages.orderedList),
|
|
235
|
-
type: 'orderedList',
|
|
236
|
-
keymap: function keymap() {
|
|
237
|
-
return _keymaps.toggleOrderedList;
|
|
238
|
-
},
|
|
239
|
-
autoFormatting: function autoFormatting() {
|
|
240
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
241
|
-
css: _styles.codeSm
|
|
242
|
-
}, "1."), " ", (0, _react2.jsx)("span", {
|
|
243
|
-
css: _styles.codeLg
|
|
244
|
-
}, "Space"));
|
|
245
|
-
}
|
|
246
|
-
}, {
|
|
247
|
-
name: formatMessage(_messages.listMessages.unorderedList),
|
|
248
|
-
type: 'bulletList',
|
|
249
|
-
keymap: function keymap() {
|
|
250
|
-
return _keymaps.toggleBulletList;
|
|
251
|
-
},
|
|
252
|
-
autoFormatting: function autoFormatting() {
|
|
253
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
254
|
-
css: _styles.codeSm
|
|
255
|
-
}, "*"), " ", (0, _react2.jsx)("span", {
|
|
256
|
-
css: _styles.codeLg
|
|
257
|
-
}, "Space"));
|
|
258
|
-
}
|
|
259
|
-
}, {
|
|
260
|
-
name: formatMessage(_messages3.messages.blockquote),
|
|
261
|
-
type: 'blockquote',
|
|
262
|
-
keymap: function keymap() {
|
|
263
|
-
return _keymaps.toggleBlockQuote;
|
|
264
|
-
},
|
|
265
|
-
autoFormatting: function autoFormatting() {
|
|
266
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
267
|
-
css: _styles.codeLg
|
|
268
|
-
}, '>'), " ", (0, _react2.jsx)("span", {
|
|
269
|
-
css: _styles.codeLg
|
|
270
|
-
}, "Space"));
|
|
271
|
-
}
|
|
272
|
-
}, {
|
|
273
|
-
name: formatMessage(_messages3.messages.codeblock),
|
|
274
|
-
type: 'codeBlock',
|
|
275
|
-
autoFormatting: function autoFormatting() {
|
|
276
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
277
|
-
css: _styles.codeLg
|
|
278
|
-
}, "```"));
|
|
279
|
-
}
|
|
280
|
-
}, {
|
|
281
|
-
name: formatMessage(_messages2.messages.horizontalRule),
|
|
282
|
-
type: 'rule',
|
|
283
|
-
keymap: function keymap() {
|
|
284
|
-
return _keymaps.insertRule;
|
|
285
|
-
},
|
|
286
|
-
autoFormatting: function autoFormatting() {
|
|
287
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
288
|
-
css: _styles.codeLg
|
|
289
|
-
}, "---"));
|
|
290
|
-
}
|
|
291
|
-
}, {
|
|
292
|
-
name: formatMessage(_messages2.messages.link),
|
|
293
|
-
type: 'link',
|
|
294
|
-
keymap: function keymap() {
|
|
295
|
-
return _keymaps.addLink;
|
|
296
|
-
},
|
|
297
|
-
autoFormatting: function autoFormatting() {
|
|
298
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
299
|
-
css: _styles.codeLg
|
|
300
|
-
}, "[", (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages2.messages.link), "](http://a.com)"));
|
|
301
|
-
}
|
|
302
|
-
}, {
|
|
303
|
-
name: formatMessage(_messages.toolbarMessages.code),
|
|
304
|
-
type: 'code',
|
|
305
|
-
keymap: function keymap() {
|
|
306
|
-
return _keymaps.toggleCode;
|
|
307
|
-
},
|
|
308
|
-
autoFormatting: function autoFormatting() {
|
|
309
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
310
|
-
css: _styles.codeLg
|
|
311
|
-
}, "`", (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.toolbarMessages.code), "`"));
|
|
312
|
-
}
|
|
313
|
-
}, {
|
|
314
|
-
name: formatMessage(_messages2.messages.action),
|
|
315
|
-
type: 'taskItem',
|
|
316
|
-
autoFormatting: function autoFormatting() {
|
|
317
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
318
|
-
css: _styles.codeSm
|
|
319
|
-
}, "[]"), " ", (0, _react2.jsx)("span", {
|
|
320
|
-
css: _styles.codeLg
|
|
321
|
-
}, "Space"));
|
|
322
|
-
}
|
|
323
|
-
}, {
|
|
324
|
-
name: formatMessage(_messages2.messages.decision),
|
|
325
|
-
type: 'decisionItem',
|
|
326
|
-
autoFormatting: function autoFormatting() {
|
|
327
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
328
|
-
css: _styles.codeSm
|
|
329
|
-
}, "<>"), " ", (0, _react2.jsx)("span", {
|
|
330
|
-
css: _styles.codeLg
|
|
331
|
-
}, "Space"));
|
|
332
|
-
}
|
|
333
|
-
}, {
|
|
334
|
-
name: formatMessage(_messages2.messages.emoji),
|
|
335
|
-
type: 'emoji',
|
|
336
|
-
autoFormatting: function autoFormatting() {
|
|
337
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
338
|
-
css: _styles.codeLg
|
|
339
|
-
}, ":"));
|
|
340
|
-
}
|
|
341
|
-
}, {
|
|
342
|
-
name: formatMessage(_messages2.messages.mention),
|
|
343
|
-
type: 'mention',
|
|
344
|
-
autoFormatting: function autoFormatting() {
|
|
345
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
346
|
-
css: _styles.codeLg
|
|
347
|
-
}, "@"));
|
|
348
|
-
}
|
|
349
|
-
}, {
|
|
350
|
-
name: formatMessage(_messages5.alignmentMessages.alignLeft),
|
|
351
|
-
type: 'alignment',
|
|
352
|
-
keymap: function keymap() {
|
|
353
|
-
return _keymaps.alignLeft;
|
|
354
|
-
}
|
|
355
|
-
}, {
|
|
356
|
-
name: formatMessage(_messages5.alignmentMessages.alignRight),
|
|
357
|
-
type: 'alignment'
|
|
358
|
-
}];
|
|
359
|
-
};
|
|
360
|
-
var shortcutNamesWithoutKeymap = ['emoji', 'mention', 'quickInsert'];
|
|
361
|
-
var otherFormatting = function otherFormatting(_ref3) {
|
|
362
|
-
var formatMessage = _ref3.formatMessage;
|
|
363
|
-
return [{
|
|
364
|
-
name: formatMessage(_messages.toolbarMessages.clearFormatting),
|
|
365
|
-
type: 'clearFormatting',
|
|
366
|
-
keymap: function keymap() {
|
|
367
|
-
return _keymaps.clearFormatting;
|
|
368
|
-
}
|
|
369
|
-
}, {
|
|
370
|
-
name: formatMessage(_messages4.messages.undo),
|
|
371
|
-
type: 'undo',
|
|
372
|
-
keymap: function keymap() {
|
|
373
|
-
return _keymaps.undo;
|
|
374
|
-
}
|
|
375
|
-
}, {
|
|
376
|
-
name: formatMessage(_messages4.messages.redo),
|
|
377
|
-
type: 'redo',
|
|
378
|
-
keymap: function keymap() {
|
|
379
|
-
return _keymaps.redo;
|
|
380
|
-
}
|
|
381
|
-
}, {
|
|
382
|
-
name: formatMessage(messages.pastePlainText),
|
|
383
|
-
type: 'paste',
|
|
384
|
-
keymap: function keymap() {
|
|
385
|
-
return _keymaps.pastePlainText;
|
|
386
|
-
}
|
|
387
|
-
}, {
|
|
388
|
-
name: formatMessage(_toolbar.annotationMessages.createComment),
|
|
389
|
-
type: 'annotation',
|
|
390
|
-
keymap: function keymap() {
|
|
391
|
-
return _keymaps.addInlineComment;
|
|
392
|
-
}
|
|
393
|
-
}, {
|
|
394
|
-
name: formatMessage(messages.CheckUncheckActionItem),
|
|
395
|
-
type: 'checkbox',
|
|
396
|
-
keymap: function keymap() {
|
|
397
|
-
return _keymaps.toggleTaskItemCheckbox;
|
|
398
|
-
}
|
|
399
|
-
}];
|
|
400
|
-
};
|
|
401
|
-
var imageAutoFormat = {
|
|
402
|
-
name: 'Image',
|
|
403
|
-
type: 'image',
|
|
404
|
-
autoFormatting: function autoFormatting() {
|
|
405
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
406
|
-
css: _styles.codeLg
|
|
407
|
-
}, ""));
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref4) {
|
|
411
|
-
var formatMessage = _ref4.formatMessage;
|
|
412
|
-
return {
|
|
413
|
-
name: formatMessage(messages.quickInsert),
|
|
414
|
-
type: 'quickInsert',
|
|
415
|
-
autoFormatting: function autoFormatting() {
|
|
416
|
-
return (0, _react2.jsx)("span", null, (0, _react2.jsx)("span", {
|
|
417
|
-
css: _styles.codeLg
|
|
418
|
-
}, "/"));
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
};
|
|
422
|
-
var getKeyParts = function getKeyParts(keymap) {
|
|
423
|
-
var shortcut = keymap[_utils.browser.mac ? 'mac' : 'windows'];
|
|
424
|
-
if (_utils.browser.mac) {
|
|
425
|
-
shortcut = shortcut.replace('Alt', 'Opt');
|
|
426
|
-
}
|
|
427
|
-
return shortcut.replace(/\-(?=.)/g, ' + ').split(' ');
|
|
428
|
-
};
|
|
429
|
-
var getSupportedFormatting = exports.getSupportedFormatting = function getSupportedFormatting(schema, intl, imageEnabled, quickInsertEnabled) {
|
|
430
|
-
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
431
|
-
return schema.nodes[format.type] || schema.marks[format.type];
|
|
432
|
-
});
|
|
433
|
-
return [].concat((0, _toConsumableArray2.default)(navigationKeymaps(intl)), (0, _toConsumableArray2.default)(supportedBySchema), (0, _toConsumableArray2.default)(imageEnabled ? [imageAutoFormat] : []), (0, _toConsumableArray2.default)(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), (0, _toConsumableArray2.default)(otherFormatting(intl)));
|
|
434
|
-
};
|
|
435
|
-
var getComponentFromKeymap = exports.getComponentFromKeymap = function getComponentFromKeymap(keymap) {
|
|
436
|
-
var keyParts = getKeyParts(keymap);
|
|
437
|
-
return (0, _react2.jsx)("span", null, keyParts.map(function (part, index) {
|
|
438
|
-
if (part === '+') {
|
|
439
|
-
return (0, _react2.jsx)("span", {
|
|
440
|
-
key: "".concat(keyParts, "-").concat(index)
|
|
441
|
-
}, ' + ');
|
|
442
|
-
} else if (part === 'Cmd') {
|
|
443
|
-
return (0, _react2.jsx)("span", {
|
|
444
|
-
css: _styles.codeSm,
|
|
445
|
-
key: "".concat(keyParts, "-").concat(index)
|
|
446
|
-
}, "\u2318");
|
|
447
|
-
} else if (['ctrl', 'alt', 'opt', 'shift'].indexOf(part.toLowerCase()) >= 0) {
|
|
448
|
-
return (0, _react2.jsx)("span", {
|
|
449
|
-
css: _styles.codeMd,
|
|
450
|
-
key: "".concat(keyParts, "-").concat(index)
|
|
451
|
-
}, part);
|
|
452
|
-
} else if (['f9', 'f10'].indexOf(part.toLowerCase()) >= 0) {
|
|
453
|
-
return (0, _react2.jsx)("span", {
|
|
454
|
-
css: _styles.codeLg,
|
|
455
|
-
key: "".concat(keyParts, "-").concat(index)
|
|
456
|
-
}, part);
|
|
457
|
-
} else if (part.toLowerCase() === 'enter') {
|
|
458
|
-
return (0, _react2.jsx)("span", {
|
|
459
|
-
css: _styles.codeSm,
|
|
460
|
-
key: "".concat(keyParts, "-").concat(index)
|
|
461
|
-
}, '⏎');
|
|
462
|
-
}
|
|
463
|
-
return (0, _react2.jsx)("span", {
|
|
464
|
-
css: _styles.codeSm,
|
|
465
|
-
key: "".concat(keyParts, "-").concat(index)
|
|
466
|
-
}, part.toUpperCase());
|
|
467
|
-
}));
|
|
468
|
-
};
|
|
469
|
-
var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref5) {
|
|
470
|
-
var formatMessage = _ref5.intl.formatMessage;
|
|
471
|
-
var _useModal = (0, _modalDialog.useModal)(),
|
|
472
|
-
onClose = _useModal.onClose;
|
|
473
|
-
return (0, _react2.jsx)("div", {
|
|
474
|
-
css: _styles.header
|
|
475
|
-
}, (0, _react2.jsx)("h1", {
|
|
476
|
-
css: _styles.dialogHeader
|
|
477
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, messages.editorHelp)), (0, _react2.jsx)("div", null, (0, _react2.jsx)(_ToolbarButton.default
|
|
478
|
-
// @ts-ignore
|
|
479
|
-
, {
|
|
480
|
-
onClick: onClose,
|
|
481
|
-
title: formatMessage(messages.closeHelpDialog),
|
|
482
|
-
spacing: "compact",
|
|
483
|
-
iconBefore: (0, _react2.jsx)(_cross.default, {
|
|
484
|
-
label: formatMessage(messages.closeHelpDialog),
|
|
485
|
-
size: "medium"
|
|
486
|
-
})
|
|
487
|
-
})));
|
|
488
|
-
});
|
|
489
|
-
var ModalFooter = function ModalFooter() {
|
|
490
|
-
return (0, _react2.jsx)("div", {
|
|
491
|
-
css: _styles.footer
|
|
492
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, messages.helpDialogTips, {
|
|
493
|
-
values: {
|
|
494
|
-
keyMap: getComponentFromKeymap(_keymaps.openHelp)
|
|
495
|
-
}
|
|
496
|
-
})));
|
|
497
|
-
};
|
|
498
|
-
var HelpDialog = function HelpDialog(_ref6) {
|
|
499
|
-
var pluginInjectionApi = _ref6.pluginInjectionApi,
|
|
500
|
-
editorView = _ref6.editorView,
|
|
501
|
-
quickInsertEnabled = _ref6.quickInsertEnabled,
|
|
502
|
-
intl = _ref6.intl;
|
|
503
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['helpDialog']),
|
|
504
|
-
helpDialogState = _useSharedPluginState.helpDialogState;
|
|
505
|
-
var closeDialog = (0, _react.useCallback)(function () {
|
|
506
|
-
var tr = editorView.state.tr,
|
|
507
|
-
dispatch = editorView.dispatch;
|
|
508
|
-
(0, _commands.closeHelpCommand)(tr, dispatch);
|
|
509
|
-
}, [editorView]);
|
|
510
|
-
var handleEsc = (0, _react.useCallback)(function (e) {
|
|
511
|
-
if (e.key === 'Escape' && helpDialogState !== null && helpDialogState !== void 0 && helpDialogState.isVisible) {
|
|
512
|
-
closeDialog();
|
|
513
|
-
}
|
|
514
|
-
}, [closeDialog, helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.isVisible]);
|
|
515
|
-
(0, _react.useEffect)(function () {
|
|
516
|
-
document.addEventListener('keydown', handleEsc);
|
|
517
|
-
return function () {
|
|
518
|
-
document.removeEventListener('keydown', handleEsc);
|
|
519
|
-
};
|
|
520
|
-
}, [handleEsc]);
|
|
521
|
-
var formatting = getSupportedFormatting(editorView.state.schema, intl, helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.imageEnabled, quickInsertEnabled);
|
|
522
|
-
return (0, _react2.jsx)(_modalDialog.ModalTransition, null, helpDialogState !== null && helpDialogState !== void 0 && helpDialogState.isVisible ? (0, _react2.jsx)(_modalDialog.default, {
|
|
523
|
-
width: "large",
|
|
524
|
-
onClose: closeDialog,
|
|
525
|
-
testId: "help-modal-dialog"
|
|
526
|
-
}, (0, _react2.jsx)(ModalHeader, null), (0, _react2.jsx)("div", {
|
|
527
|
-
css: _styles.contentWrapper
|
|
528
|
-
}, (0, _react2.jsx)("div", {
|
|
529
|
-
css: _styles.line
|
|
530
|
-
}), (0, _react2.jsx)("div", {
|
|
531
|
-
css: _styles.content
|
|
532
|
-
}, (0, _react2.jsx)("div", {
|
|
533
|
-
css: _styles.column
|
|
534
|
-
}, (0, _react2.jsx)("h2", {
|
|
535
|
-
css: _styles.title
|
|
536
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, messages.keyboardShortcuts)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
|
|
537
|
-
var keymap = form.keymap && form.keymap();
|
|
538
|
-
return keymap && keymap[_utils.browser.mac ? 'mac' : 'windows'];
|
|
539
|
-
}).map(function (form) {
|
|
540
|
-
return (0, _react2.jsx)("li", {
|
|
541
|
-
css: _styles.row,
|
|
542
|
-
key: "textFormatting-".concat(form.name)
|
|
543
|
-
}, (0, _react2.jsx)("span", null, form.name), getComponentFromKeymap(form.keymap()));
|
|
544
|
-
}), formatting.filter(function (form) {
|
|
545
|
-
return shortcutNamesWithoutKeymap.indexOf(form.type) !== -1;
|
|
546
|
-
}).filter(function (form) {
|
|
547
|
-
return form.autoFormatting;
|
|
548
|
-
}).map(function (form) {
|
|
549
|
-
return (0, _react2.jsx)("li", {
|
|
550
|
-
css: _styles.row,
|
|
551
|
-
key: "autoFormatting-".concat(form.name)
|
|
552
|
-
}, (0, _react2.jsx)("span", null, form.name), form.autoFormatting());
|
|
553
|
-
}))), (0, _react2.jsx)("div", {
|
|
554
|
-
css: _styles.line
|
|
555
|
-
}), (0, _react2.jsx)("div", {
|
|
556
|
-
css: _styles.column
|
|
557
|
-
}, (0, _react2.jsx)("h2", {
|
|
558
|
-
css: _styles.title
|
|
559
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, messages.markdown)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
|
|
560
|
-
return shortcutNamesWithoutKeymap.indexOf(form.type) === -1;
|
|
561
|
-
}).map(function (form) {
|
|
562
|
-
return form.autoFormatting && (0, _react2.jsx)("li", {
|
|
563
|
-
key: "autoFormatting-".concat(form.name),
|
|
564
|
-
css: _styles.row
|
|
565
|
-
}, (0, _react2.jsx)("span", null, form.name), form.autoFormatting());
|
|
566
|
-
}))))), (0, _react2.jsx)(ModalFooter, null)) : null);
|
|
567
|
-
};
|
|
568
|
-
var _default = exports.default = (0, _reactIntlNext.injectIntl)(HelpDialog);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.title = exports.row = exports.line = exports.header = exports.footer = exports.dialogHeader = exports.contentWrapper = exports.content = exports.column = exports.codeSm = exports.codeMd = exports.codeLg = void 0;
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
|
-
var _react = require("@emotion/react");
|
|
11
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
12
|
-
var _colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
13
|
-
var colors = _colors;
|
|
14
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
16
|
-
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); }
|
|
17
|
-
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; }
|
|
18
|
-
var header = exports.header = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n min-height: 24px;\n padding: 20px 40px;\n font-size: ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-shadow: 'none';\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(24), "var(--ds-text, ".concat(colors.N400, ")"), "var(--ds-background-neutral-subtle, ".concat(colors.N0, ")"), (0, _constants.borderRadius)());
|
|
19
|
-
var footer = exports.footer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n font-size: ", ";\n line-height: 20px;\n color: ", ";\n padding: 24px;\n text-align: right;\n box-shadow: 'none';\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), "var(--ds-text-subtlest, ".concat(colors.N300, ")"));
|
|
20
|
-
var contentWrapper = exports.contentWrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 20px 44px;\n border-bottom-right-radius: ", "px;\n overflow: auto;\n position: relative;\n color: ", ";\n background-color: ", ";\n"])), (0, _constants.borderRadius)(), "var(--ds-text-subtle, ".concat(colors.N400, ")"), "var(--ds-background-neutral-subtle, ".concat(colors.N0, ")"));
|
|
21
|
-
var line = exports.line = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n content: '';\n display: block;\n height: 2px;\n left: 0;\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n min-width: 604px;\n"])), "var(--ds-background-neutral-subtle, #fff)");
|
|
22
|
-
var content = exports.content = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n min-width: 524px;\n width: 100%;\n position: relative;\n display: flex;\n justify-content: space-between;\n"])));
|
|
23
|
-
var column = exports.column = {
|
|
24
|
-
width: '44%',
|
|
25
|
-
'& > ul': {
|
|
26
|
-
padding: 0
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var row = exports.row = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin: 20px 0;\n display: flex;\n justify-content: space-between;\n"])));
|
|
30
|
-
var dialogHeader = exports.dialogHeader = {
|
|
31
|
-
'&': {
|
|
32
|
-
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(24),
|
|
33
|
-
fontWeight: 400,
|
|
34
|
-
color: "var(--ds-text-subtle, ".concat(_colors.N400, ")"),
|
|
35
|
-
letterSpacing: 'normal',
|
|
36
|
-
lineHeight: 1.42857142857143
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
var title = exports.title = {
|
|
40
|
-
'&': {
|
|
41
|
-
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(18),
|
|
42
|
-
fontWeight: 400,
|
|
43
|
-
color: "var(--ds-text-subtle, ".concat(_colors.N400, ")"),
|
|
44
|
-
letterSpacing: 'normal',
|
|
45
|
-
lineHeight: 1.42857142857143
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
var codeSm = exports.codeSm = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n width: 24px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n text-align: center;\n"])), "var(--ds-background-neutral, ".concat(colors.N20, ")"), (0, _constants.borderRadius)());
|
|
49
|
-
var codeMd = exports.codeMd = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n width: 50px;\n text-align: center;\n"])), "var(--ds-background-neutral, ".concat(colors.N20, ")"), (0, _constants.borderRadius)());
|
|
50
|
-
var codeLg = exports.codeLg = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n padding: 0 10px;\n text-align: center;\n"])), "var(--ds-background-neutral, ".concat(colors.N20, ")"), (0, _constants.borderRadius)());
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.messages = void 0;
|
|
7
|
-
var _reactIntlNext = require("react-intl-next");
|
|
8
|
-
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
-
undo: {
|
|
10
|
-
id: 'fabric.editor.undo',
|
|
11
|
-
defaultMessage: 'Undo',
|
|
12
|
-
description: 'Undo the previously performed action.'
|
|
13
|
-
},
|
|
14
|
-
redo: {
|
|
15
|
-
id: 'fabric.editor.redo',
|
|
16
|
-
defaultMessage: 'Redo',
|
|
17
|
-
description: 'Redo the previously undone action.'
|
|
18
|
-
}
|
|
19
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.alignmentMessages = void 0;
|
|
7
|
-
var _reactIntlNext = require("react-intl-next");
|
|
8
|
-
var alignmentMessages = exports.alignmentMessages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
-
alignLeft: {
|
|
10
|
-
id: 'fabric.editor.alignLeft',
|
|
11
|
-
defaultMessage: 'Align left',
|
|
12
|
-
description: 'Action to align/justify text to the left'
|
|
13
|
-
},
|
|
14
|
-
alignCenter: {
|
|
15
|
-
id: 'fabric.editor.alignCenter',
|
|
16
|
-
defaultMessage: 'Align center',
|
|
17
|
-
description: 'Action to align/justify text to the center/middle'
|
|
18
|
-
},
|
|
19
|
-
alignRight: {
|
|
20
|
-
id: 'fabric.editor.alignRight',
|
|
21
|
-
defaultMessage: 'Align right',
|
|
22
|
-
description: 'Action to align/justify text to the right'
|
|
23
|
-
}
|
|
24
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { pluginKey } from './plugin-key';
|
|
2
|
-
export const openHelpCommand = (tr, dispatch) => {
|
|
3
|
-
tr = tr.setMeta(pluginKey, true);
|
|
4
|
-
if (dispatch) {
|
|
5
|
-
dispatch(tr);
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
return false;
|
|
9
|
-
};
|
|
10
|
-
export const closeHelpCommand = (tr, dispatch) => {
|
|
11
|
-
tr = tr.setMeta(pluginKey, false);
|
|
12
|
-
dispatch(tr);
|
|
13
|
-
};
|