@atlaskit/editor-core 169.0.0 → 170.0.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 +38 -0
- package/dist/cjs/create-editor/create-plugins-list.js +7 -0
- package/dist/cjs/plugins/analytics/types/toolbar-button.js +2 -0
- package/dist/cjs/plugins/breakout/index.js +7 -0
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +3 -1
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +6 -1
- package/dist/cjs/plugins/card/styles.js +4 -2
- package/dist/cjs/plugins/card/toolbar.js +6 -1
- package/dist/cjs/plugins/code-block/styles.js +17 -41
- package/dist/cjs/plugins/code-block/ui/class-names.js +5 -2
- package/dist/cjs/plugins/copy-button/commands.js +85 -0
- package/dist/cjs/plugins/copy-button/index.js +27 -0
- package/dist/cjs/plugins/copy-button/pm-plugins/main.js +38 -0
- package/dist/cjs/plugins/copy-button/pm-plugins/plugin-key.js +11 -0
- package/dist/cjs/plugins/copy-button/utils.js +51 -0
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/cjs/plugins/indentation/messages.js +23 -0
- package/dist/cjs/plugins/index.js +16 -0
- package/dist/cjs/plugins/list/index.js +0 -43
- package/dist/cjs/plugins/panel/toolbar.js +10 -2
- package/dist/cjs/plugins/quick-insert/search.js +3 -4
- package/dist/cjs/plugins/table/commands/hover.js +2 -2
- package/dist/cjs/plugins/table/toolbar.js +5 -1
- package/dist/cjs/plugins/table/utils/decoration.js +5 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +65 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/types.js +5 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +122 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +173 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +58 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +48 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -5
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +17 -51
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +12 -39
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +31 -87
- package/dist/cjs/utils/clipboard.js +67 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +8 -1
- package/dist/es2019/plugins/analytics/types/toolbar-button.js +2 -0
- package/dist/es2019/plugins/breakout/index.js +7 -0
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +3 -1
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +6 -1
- package/dist/es2019/plugins/card/styles.js +5 -0
- package/dist/es2019/plugins/card/toolbar.js +5 -1
- package/dist/es2019/plugins/code-block/styles.js +18 -95
- package/dist/es2019/plugins/code-block/ui/class-names.js +3 -2
- package/dist/es2019/plugins/copy-button/commands.js +64 -0
- package/dist/es2019/plugins/copy-button/index.js +15 -0
- package/dist/es2019/plugins/copy-button/pm-plugins/main.js +28 -0
- package/dist/es2019/plugins/copy-button/pm-plugins/plugin-key.js +2 -0
- package/dist/es2019/plugins/copy-button/utils.js +29 -0
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/es2019/plugins/indentation/messages.js +14 -0
- package/dist/es2019/plugins/index.js +3 -1
- package/dist/es2019/plugins/list/index.js +1 -44
- package/dist/es2019/plugins/panel/toolbar.js +9 -2
- package/dist/es2019/plugins/quick-insert/search.js +3 -4
- package/dist/es2019/plugins/table/commands/hover.js +2 -2
- package/dist/es2019/plugins/table/toolbar.js +5 -2
- package/dist/es2019/plugins/table/utils/decoration.js +5 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +53 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/types.js +1 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +94 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +149 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +49 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +35 -0
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +11 -10
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +17 -48
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +10 -30
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +34 -93
- package/dist/es2019/utils/clipboard.js +26 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +8 -1
- package/dist/esm/plugins/analytics/types/toolbar-button.js +2 -0
- package/dist/esm/plugins/breakout/index.js +7 -0
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -1
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +6 -1
- package/dist/esm/plugins/card/styles.js +2 -1
- package/dist/esm/plugins/card/toolbar.js +5 -1
- package/dist/esm/plugins/code-block/styles.js +16 -35
- package/dist/esm/plugins/code-block/ui/class-names.js +3 -2
- package/dist/esm/plugins/copy-button/commands.js +66 -0
- package/dist/esm/plugins/copy-button/index.js +17 -0
- package/dist/esm/plugins/copy-button/pm-plugins/main.js +26 -0
- package/dist/esm/plugins/copy-button/pm-plugins/plugin-key.js +2 -0
- package/dist/esm/plugins/copy-button/utils.js +31 -0
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/esm/plugins/indentation/messages.js +14 -0
- package/dist/esm/plugins/index.js +3 -1
- package/dist/esm/plugins/list/index.js +1 -41
- package/dist/esm/plugins/panel/toolbar.js +9 -2
- package/dist/esm/plugins/quick-insert/search.js +3 -4
- package/dist/esm/plugins/table/commands/hover.js +2 -2
- package/dist/esm/plugins/table/toolbar.js +5 -2
- package/dist/esm/plugins/table/utils/decoration.js +5 -1
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +51 -0
- package/dist/esm/plugins/toolbar-lists-indentation/types.js +1 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +96 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +153 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +47 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +39 -0
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +6 -8
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +18 -51
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +12 -35
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +31 -89
- package/dist/esm/utils/clipboard.js +55 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/analytics/types/toolbar-button.d.ts +3 -1
- package/dist/types/plugins/card/styles.d.ts +1 -0
- package/dist/types/plugins/copy-button/commands.d.ts +4 -0
- package/dist/types/plugins/copy-button/index.d.ts +3 -0
- package/dist/types/plugins/copy-button/pm-plugins/main.d.ts +3 -0
- package/dist/types/plugins/copy-button/pm-plugins/plugin-key.d.ts +2 -0
- package/dist/types/plugins/copy-button/utils.d.ts +7 -0
- package/dist/types/plugins/indentation/messages.d.ts +12 -0
- package/dist/types/plugins/index.d.ts +2 -0
- package/dist/types/plugins/panel/toolbar.d.ts +1 -1
- package/dist/types/plugins/table/commands/hover.d.ts +1 -1
- package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +1 -1
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +5 -0
- package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +16 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/Toolbar.d.ts +4 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.d.ts +9 -0
- package/dist/types/plugins/{list/ui/ToolbarLists → toolbar-lists-indentation/ui}/index.d.ts +4 -10
- package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +6 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -25
- package/dist/types/types/feature-flags.d.ts +18 -0
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +11 -0
- package/dist/types/utils/clipboard.d.ts +1 -0
- package/package.json +21 -21
- package/report.api.md +5373 -1324
- package/dist/cjs/plugins/list/ui/ToolbarLists/index.js +0 -266
- package/dist/es2019/plugins/list/ui/ToolbarLists/index.js +0 -220
- package/dist/esm/plugins/list/ui/ToolbarLists/index.js +0 -241
|
@@ -4,10 +4,9 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import React, { useMemo, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
|
|
7
|
-
import { jsx, css } from '@emotion/react';
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import { ICON_HEIGHT, itemTheme, ITEM_PADDING } from './TypeAheadListItem';
|
|
7
|
+
import { jsx, css } from '@emotion/react';
|
|
8
|
+
import { MenuGroup } from '@atlaskit/menu';
|
|
9
|
+
import { ICON_HEIGHT, ITEM_PADDING } from './TypeAheadListItem';
|
|
11
10
|
import { VariableSizeList as List } from 'react-window';
|
|
12
11
|
import { ResizeObserverProvider } from './hooks/use-resize-observer';
|
|
13
12
|
import { useDynamicListHeightCalculation } from './hooks/use-dynamic-list-height-calculation';
|
|
@@ -104,12 +103,11 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
104
103
|
|
|
105
104
|
var estimatedHeight = items.length * LIST_ITEM_ESTIMATED_HEIGHT;
|
|
106
105
|
var height = Math.min(typeof renderedListHeight === 'number' ? renderedListHeight : estimatedHeight, fitHeight);
|
|
107
|
-
return jsx(
|
|
106
|
+
return jsx(MenuGroup, {
|
|
108
107
|
role: "listbox",
|
|
109
108
|
"aria-live": "polite",
|
|
110
109
|
"aria-label": intl.formatMessage(typeAheadListMessages.typeAheadResultLabel),
|
|
111
|
-
"aria-relevant": "additions removals"
|
|
112
|
-
theme: itemTheme
|
|
110
|
+
"aria-relevant": "additions removals"
|
|
113
111
|
}, jsx(ResizeObserverProvider, null, jsx(UpdateListItemHeightContext.Provider, {
|
|
114
112
|
value: setListItemHeight
|
|
115
113
|
}, jsx(ListItemActionsContext.Provider, {
|
|
@@ -128,7 +126,7 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
128
126
|
width: LIST_WIDTH,
|
|
129
127
|
height: height,
|
|
130
128
|
overscanCount: 3,
|
|
131
|
-
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
129
|
+
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n button {\n padding: 12px 12px 11px;\n\n span:last-child span:last-child {\n white-space: normal;\n }\n }\n "])))
|
|
132
130
|
}, DynamicHeightListItem))))));
|
|
133
131
|
});
|
|
134
132
|
export var TypeAheadList = injectIntl(TypeAheadListComponent);
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
|
|
4
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
4
|
|
|
6
5
|
/** @jsx jsx */
|
|
7
6
|
import React, { useCallback, useMemo, useRef, useLayoutEffect } from 'react';
|
|
8
7
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import {
|
|
8
|
+
import { DN600, N200, N800 } from '@atlaskit/theme/colors';
|
|
10
9
|
import { themed } from '@atlaskit/theme/components';
|
|
11
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
12
|
-
|
|
13
|
-
import Item, { itemThemeNamespace } from '@atlaskit/item';
|
|
10
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
11
|
+
import { ButtonItem } from '@atlaskit/menu';
|
|
14
12
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
15
13
|
import IconFallback from '../../quick-insert/assets/fallback';
|
|
16
14
|
import { shortcutStyle } from '../../../ui/styles';
|
|
@@ -19,46 +17,16 @@ import { token } from '@atlaskit/tokens';
|
|
|
19
17
|
export var ICON_HEIGHT = 40;
|
|
20
18
|
export var ICON_WIDTH = 40;
|
|
21
19
|
export var ITEM_PADDING = 12;
|
|
22
|
-
export var itemTheme = _defineProperty({}, itemThemeNamespace, {
|
|
23
|
-
padding: {
|
|
24
|
-
default: {
|
|
25
|
-
bottom: ITEM_PADDING,
|
|
26
|
-
left: ITEM_PADDING,
|
|
27
|
-
right: ITEM_PADDING,
|
|
28
|
-
top: ITEM_PADDING
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
beforeItemSpacing: {
|
|
32
|
-
default: function _default() {
|
|
33
|
-
return ITEM_PADDING;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
borderRadius: function borderRadius() {
|
|
37
|
-
return 0;
|
|
38
|
-
},
|
|
39
|
-
hover: {
|
|
40
|
-
// background: colors.transparent, transparent is not a thing
|
|
41
|
-
text: colorsText,
|
|
42
|
-
secondaryText: token('color.text.subtlest', N200)
|
|
43
|
-
},
|
|
44
|
-
selected: {
|
|
45
|
-
background: themed({
|
|
46
|
-
light: token('color.background.neutral.subtle.hovered', N20),
|
|
47
|
-
dark: token('color.background.neutral.subtle.hovered', DN70)
|
|
48
|
-
}),
|
|
49
|
-
text: themed({
|
|
50
|
-
light: token('color.text', N800),
|
|
51
|
-
dark: token('color.text', DN600)
|
|
52
|
-
}),
|
|
53
|
-
secondaryText: themed({
|
|
54
|
-
light: token('color.text.subtlest', N200),
|
|
55
|
-
dark: token('color.text.subtlest', DN300)
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
20
|
export var itemIcon = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), ICON_WIDTH, ICON_HEIGHT, token('color.border', 'rgba(223, 225, 229, 0.5)'), borderRadius(), ICON_WIDTH, ICON_HEIGHT);
|
|
60
21
|
var itemBody = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n"])));
|
|
61
|
-
|
|
22
|
+
|
|
23
|
+
var itemText = function itemText(theme) {
|
|
24
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n white-space: initial;\n color: ", ";\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 4px;\n }\n"])), themed({
|
|
25
|
+
light: token('color.text', N800),
|
|
26
|
+
dark: token('color.text', DN600)
|
|
27
|
+
})(theme), relativeFontSizeToBase16(11.67), token('color.text.subtlest', N200));
|
|
28
|
+
};
|
|
29
|
+
|
|
62
30
|
var itemAfter = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
|
|
63
31
|
var hidden = {
|
|
64
32
|
overflow: 'hidden'
|
|
@@ -134,26 +102,25 @@ export var TypeAheadListItem = function TypeAheadListItem(_ref2) {
|
|
|
134
102
|
return customItem;
|
|
135
103
|
}
|
|
136
104
|
|
|
137
|
-
return jsx(
|
|
105
|
+
return jsx("span", {
|
|
106
|
+
onMouseMove: onMouseMove
|
|
107
|
+
}, jsx(ButtonItem, {
|
|
138
108
|
onClick: insertSelectedItem,
|
|
139
|
-
|
|
140
|
-
elemBefore: elementIcon,
|
|
109
|
+
iconBefore: elementIcon,
|
|
141
110
|
isSelected: isSelected,
|
|
142
111
|
"aria-selected": isSelected,
|
|
143
112
|
"aria-label": item.title,
|
|
144
113
|
role: "option",
|
|
145
|
-
|
|
114
|
+
description: item.description
|
|
146
115
|
}, jsx("div", {
|
|
147
116
|
css: itemBody
|
|
148
117
|
}, jsx("div", {
|
|
149
118
|
css: itemText
|
|
150
119
|
}, jsx("div", {
|
|
151
120
|
className: "item-title"
|
|
152
|
-
}, item.title),
|
|
153
|
-
className: "item-description"
|
|
154
|
-
}, item.description)), jsx("div", {
|
|
121
|
+
}, item.title)), jsx("div", {
|
|
155
122
|
css: itemAfter
|
|
156
123
|
}, item.keyshortcut && jsx("div", {
|
|
157
124
|
css: shortcutStyle
|
|
158
|
-
}, item.keyshortcut))));
|
|
125
|
+
}, item.keyshortcut)))));
|
|
159
126
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
6
5
|
var _excluded = ["children"];
|
|
7
6
|
|
|
8
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
7
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
9
8
|
|
|
10
9
|
/** @jsx jsx */
|
|
11
|
-
import
|
|
10
|
+
import { useState, useCallback } from 'react';
|
|
12
11
|
import { css, jsx } from '@emotion/react';
|
|
13
|
-
|
|
14
|
-
import Item, { itemThemeNamespace } from '@atlaskit/item'; // AFP-2532 TODO: Fix automatic suppressions below
|
|
12
|
+
import { Section, ButtonItem } from '@atlaskit/menu'; // AFP-2532 TODO: Fix automatic suppressions below
|
|
15
13
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
16
14
|
|
|
17
15
|
import { borderRadius, gridSize } from '@atlaskit/theme';
|
|
@@ -115,26 +113,17 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
115
113
|
|
|
116
114
|
var ViewMore = function ViewMore(_ref3) {
|
|
117
115
|
var item = _ref3.item;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (e.which === ENTER_KEY || e.which === SPACE_KEY) {
|
|
123
|
-
// @ts-ignore We manually transformed "view more" to a quickInsert item
|
|
124
|
-
// action would always toggle the ModalElementBrowser
|
|
125
|
-
item.action();
|
|
126
|
-
}
|
|
127
|
-
}, [item]);
|
|
128
|
-
return jsx(Item, {
|
|
116
|
+
return jsx(Section, {
|
|
117
|
+
hasSeparator: true
|
|
118
|
+
}, jsx(ButtonItem, {
|
|
129
119
|
onClick: item.action,
|
|
130
|
-
|
|
120
|
+
iconBefore: jsx("div", {
|
|
131
121
|
css: itemBefore
|
|
132
122
|
}, item.icon()),
|
|
133
123
|
"aria-describedby": item.title,
|
|
134
124
|
"data-testid": "view-more-elements-item",
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}, item.title);
|
|
125
|
+
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0px 12px;\n "])))
|
|
126
|
+
}, item.title));
|
|
138
127
|
};
|
|
139
128
|
|
|
140
129
|
var getSvgIconForItem = function getSvgIconForItem(_ref4) {
|
|
@@ -167,7 +156,7 @@ var getInsertMenuHeight = function getInsertMenuHeight(_ref5) {
|
|
|
167
156
|
};
|
|
168
157
|
|
|
169
158
|
var insertMenuWrapper = function insertMenuWrapper(theme, itemCount) {
|
|
170
|
-
return css(
|
|
159
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 320px;\n height: ", "px;\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n"])), getInsertMenuHeight({
|
|
171
160
|
itemCount: itemCount
|
|
172
161
|
}), themed({
|
|
173
162
|
light: token('elevation.surface.overlay', N0),
|
|
@@ -175,20 +164,8 @@ var insertMenuWrapper = function insertMenuWrapper(theme, itemCount) {
|
|
|
175
164
|
})(theme), borderRadius(), token('elevation.shadow.overlay', "0 0 0 1px ".concat(N30A, ",\n 0 2px 1px ").concat(N30A, ",\n 0 0 20px -6px ").concat(N60A)));
|
|
176
165
|
};
|
|
177
166
|
|
|
178
|
-
var itemBefore = css(
|
|
179
|
-
var
|
|
180
|
-
var HEIGHT = 40;
|
|
181
|
-
|
|
182
|
-
var viewMoreItemTheme = _defineProperty({}, itemThemeNamespace, {
|
|
183
|
-
padding: {
|
|
184
|
-
default: {
|
|
185
|
-
left: PADDING_LEFT
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
height: HEIGHT
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
var flexWrapperStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n box-sizing: border-box;\n overflow: hidden;\n"])));
|
|
167
|
+
var itemBefore = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ", "px;\n"])), gridSize() / 2);
|
|
168
|
+
var flexWrapperStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n box-sizing: border-box;\n overflow: hidden;\n"])));
|
|
192
169
|
|
|
193
170
|
var FlexWrapper = function FlexWrapper(props) {
|
|
194
171
|
var children = props.children,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
4
|
|
|
@@ -7,19 +6,13 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
7
6
|
|
|
8
7
|
var _excluded = ["items", "mode", "selectedItemIndex", "focusedItemIndex", "setColumnCount", "createAnalyticsEvent", "emptyStateHandler", "selectedCategory", "searchTerm"];
|
|
9
8
|
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
|
|
14
9
|
/** @jsx jsx */
|
|
15
10
|
import React, { Fragment, memo, useCallback, useEffect, useMemo } from 'react';
|
|
16
11
|
import { css, jsx } from '@emotion/react';
|
|
17
|
-
import memoizeOne from 'memoize-one';
|
|
18
12
|
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
|
|
19
13
|
import { Collection } from 'react-virtualized/dist/commonjs/Collection';
|
|
20
|
-
|
|
21
|
-
import
|
|
22
|
-
import { B100, N20, N200 } from '@atlaskit/theme/colors';
|
|
14
|
+
import { ButtonItem } from '@atlaskit/menu';
|
|
15
|
+
import { B100, N200 } from '@atlaskit/theme/colors';
|
|
23
16
|
import Tooltip from '@atlaskit/tooltip';
|
|
24
17
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
25
18
|
import { token } from '@atlaskit/tokens';
|
|
@@ -28,7 +21,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../..
|
|
|
28
21
|
import IconFallback from '../../../../plugins/quick-insert/assets/fallback';
|
|
29
22
|
import { itemIcon } from '../../../../plugins/type-ahead/ui/TypeAheadListItem';
|
|
30
23
|
import { shortcutStyle } from '../../../styles';
|
|
31
|
-
import {
|
|
24
|
+
import { ELEMENT_LIST_PADDING, SCROLLBAR_THUMB_COLOR, SCROLLBAR_TRACK_COLOR, SCROLLBAR_WIDTH } from '../../constants';
|
|
32
25
|
import useContainerWidth from '../../hooks/use-container-width';
|
|
33
26
|
import useFocus from '../../hooks/use-focus';
|
|
34
27
|
import { Modes } from '../../types';
|
|
@@ -128,44 +121,9 @@ function ElementList(_ref) {
|
|
|
128
121
|
}))));
|
|
129
122
|
}
|
|
130
123
|
|
|
131
|
-
var getStyles = memoizeOne(function (mode) {
|
|
132
|
-
return _objectSpread(_objectSpread({}, mode === Modes.full && {
|
|
133
|
-
'-ms-flex': 'auto',
|
|
134
|
-
position: 'relative',
|
|
135
|
-
boxSizing: 'border-box'
|
|
136
|
-
}), {}, {
|
|
137
|
-
height: {
|
|
138
|
-
default: ELEMENT_ITEM_HEIGHT
|
|
139
|
-
},
|
|
140
|
-
padding: {
|
|
141
|
-
default: {
|
|
142
|
-
top: GRID_SIZE * 1.5,
|
|
143
|
-
right: GRID_SIZE * 1.5,
|
|
144
|
-
bottom: GRID_SIZE * 1.5,
|
|
145
|
-
left: GRID_SIZE * 1.5
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
borderRadius: GRID_SIZE / 2,
|
|
149
|
-
// TODO: apply a different background for when a selected item is hovered.
|
|
150
|
-
// Not possible due to current implementation of @atlaskit/item component.
|
|
151
|
-
selected: {
|
|
152
|
-
background: token('color.background.selected', N20)
|
|
153
|
-
},
|
|
154
|
-
hover: {
|
|
155
|
-
background: token('color.background.neutral.subtle.hovered', 'rgb(244, 245, 247)')
|
|
156
|
-
},
|
|
157
|
-
active: {
|
|
158
|
-
background: token('color.background.neutral.subtle.pressed', 'rgb(244, 245, 247)')
|
|
159
|
-
},
|
|
160
|
-
beforeItemSpacing: {
|
|
161
|
-
default: GRID_SIZE * 1.5
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
124
|
var MemoizedElementItem = /*#__PURE__*/memo(ElementItem);
|
|
166
125
|
MemoizedElementItem.displayName = 'MemoizedElementItem';
|
|
167
|
-
|
|
168
|
-
function ElementItem(_ref4) {
|
|
126
|
+
export function ElementItem(_ref4) {
|
|
169
127
|
var inlineMode = _ref4.inlineMode,
|
|
170
128
|
selected = _ref4.selected,
|
|
171
129
|
item = _ref4.item,
|
|
@@ -174,11 +132,6 @@ function ElementItem(_ref4) {
|
|
|
174
132
|
focus = _ref4.focus,
|
|
175
133
|
setFocusedItemIndex = _ref4.setFocusedItemIndex;
|
|
176
134
|
var ref = useFocus(focus);
|
|
177
|
-
var theme = useMemo(function () {
|
|
178
|
-
return {
|
|
179
|
-
'@atlaskit-shared-theme/item': getStyles(inlineMode ? 'inline' : 'full')
|
|
180
|
-
};
|
|
181
|
-
}, [inlineMode]);
|
|
182
135
|
/**
|
|
183
136
|
* Note: props.onSelectItem(item) is not called here as the StatelessElementBrowser's
|
|
184
137
|
* useEffect would trigger it on selectedItemIndex change. (Line 106-110)
|
|
@@ -190,33 +143,29 @@ function ElementItem(_ref4) {
|
|
|
190
143
|
e.stopPropagation();
|
|
191
144
|
setFocusedItemIndex(index);
|
|
192
145
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
var onDoubleClick = useCallback(function (e) {
|
|
198
|
-
if (inlineMode) {
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
146
|
+
switch (e.nativeEvent.detail) {
|
|
147
|
+
case 0:
|
|
148
|
+
onInsertItem(item);
|
|
149
|
+
break;
|
|
201
150
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
151
|
+
case 1:
|
|
152
|
+
if (inlineMode) {
|
|
153
|
+
onInsertItem(item);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
break;
|
|
208
157
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
158
|
+
case 2:
|
|
159
|
+
if (!inlineMode) {
|
|
160
|
+
onInsertItem(item);
|
|
161
|
+
}
|
|
212
162
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
onInsertItem(item);
|
|
163
|
+
break;
|
|
164
|
+
|
|
165
|
+
default:
|
|
166
|
+
return;
|
|
218
167
|
}
|
|
219
|
-
}, [index, item, onInsertItem, setFocusedItemIndex]);
|
|
168
|
+
}, [index, inlineMode, item, onInsertItem, setFocusedItemIndex]);
|
|
220
169
|
var icon = item.icon,
|
|
221
170
|
title = item.title,
|
|
222
171
|
description = item.description,
|
|
@@ -224,35 +173,28 @@ function ElementItem(_ref4) {
|
|
|
224
173
|
return jsx(Tooltip, {
|
|
225
174
|
content: description,
|
|
226
175
|
testId: "element-item-tooltip-".concat(index)
|
|
227
|
-
}, jsx(
|
|
176
|
+
}, jsx(ButtonItem, {
|
|
228
177
|
onClick: onClick,
|
|
229
|
-
|
|
230
|
-
elemBefore: jsx(ElementBefore, {
|
|
178
|
+
iconBefore: jsx(ElementBefore, {
|
|
231
179
|
icon: icon,
|
|
232
180
|
title: title
|
|
233
181
|
}),
|
|
234
182
|
isSelected: selected,
|
|
235
183
|
"aria-describedby": title,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
"data-testid": "element-item-".concat(index),
|
|
239
|
-
tabIndex: 0,
|
|
240
|
-
style: inlineMode ? null : itemStyleOverrides,
|
|
241
|
-
theme: theme
|
|
184
|
+
ref: ref,
|
|
185
|
+
testId: "element-item-".concat(index)
|
|
242
186
|
}, jsx(ItemContent, {
|
|
187
|
+
style: inlineMode ? null : itemStyleOverrides,
|
|
188
|
+
tabIndex: 0,
|
|
243
189
|
title: title,
|
|
244
190
|
description: description,
|
|
245
191
|
keyshortcut: keyshortcut
|
|
246
192
|
})));
|
|
247
193
|
}
|
|
248
194
|
/**
|
|
249
|
-
* Some properties (specified in 'BaseItem' packages/design-system/item/src/styled/Item.js) cannot be changed with
|
|
250
|
-
* ThemeProvider as they are of higher specificity.
|
|
251
|
-
*
|
|
252
195
|
* Inline mode should use the existing Align-items:center value.
|
|
253
196
|
*/
|
|
254
197
|
|
|
255
|
-
|
|
256
198
|
var itemStyleOverrides = {
|
|
257
199
|
alignItems: 'flex-start'
|
|
258
200
|
};
|
|
@@ -285,8 +227,8 @@ var ItemContent = /*#__PURE__*/memo(function (_ref6) {
|
|
|
285
227
|
}, description)));
|
|
286
228
|
});
|
|
287
229
|
var scrollbarStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n width: ", "px;\n }\n ::-webkit-scrollbar-track-piece {\n background: ", ";\n }\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n /** Firefox **/\n scrollbar-color: ", " ", ";\n\n -ms-overflow-style: -ms-autohiding-scrollbar;\n"])), SCROLLBAR_WIDTH, SCROLLBAR_TRACK_COLOR, SCROLLBAR_THUMB_COLOR, SCROLLBAR_THUMB_COLOR, SCROLLBAR_TRACK_COLOR);
|
|
288
|
-
var elementItemsWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n flex-flow: row wrap;\n align-items: flex-start;\n justify-content: flex-start;\n overflow: hidden;\n padding: ", "px; // For Focus outline\n\n .ReactVirtualized__Collection {\n ", ";\n border-radius: 3px; // Standard border-radius across other components like Search or Item.\n outline: none;\n\n :focus {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n .ReactVirtualized__Collection__innerScrollContainer {\n div[class='element-item-wrapper']:last-child {\n padding-bottom: 4px;\n }\n }\n
|
|
289
|
-
var elementItemWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
230
|
+
var elementItemsWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n flex-flow: row wrap;\n align-items: flex-start;\n justify-content: flex-start;\n overflow: hidden;\n padding: ", "px; // For Focus outline\n\n .ReactVirtualized__Collection {\n ", ";\n border-radius: 3px; // Standard border-radius across other components like Search or Item.\n outline: none;\n\n :focus {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n .ReactVirtualized__Collection__innerScrollContainer {\n div[class='element-item-wrapper']:last-child {\n padding-bottom: 4px;\n }\n }\n"])), ELEMENT_LIST_PADDING, scrollbarStyle, ELEMENT_LIST_PADDING, token('color.border.focused', B100));
|
|
231
|
+
var elementItemWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n div {\n button {\n height: 75px;\n align-items: flex-start;\n padding: 12px 12px 11px;\n }\n }\n"])));
|
|
290
232
|
var itemBody = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n width: 100%;\n\n margin-top: -2px; // Fixes the Item Icon and text's alignment issue\n"])));
|
|
291
233
|
/*
|
|
292
234
|
* -webkit-line-clamp is also supported by firefox 🎉
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import * as clipboard from 'clipboard-polyfill';
|
|
3
4
|
export function checkClipboardTypes(type, item) {
|
|
4
5
|
var isDOMStringList = function isDOMStringList(t) {
|
|
5
6
|
return !t.indexOf && !!t.contains;
|
|
@@ -91,4 +92,58 @@ export var copyToClipboard = /*#__PURE__*/function () {
|
|
|
91
92
|
return function copyToClipboard(_x) {
|
|
92
93
|
return _ref2.apply(this, arguments);
|
|
93
94
|
};
|
|
95
|
+
}();
|
|
96
|
+
export var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
97
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(htmlToCopy) {
|
|
98
|
+
var blobInput, data, Clipboard, dt;
|
|
99
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
100
|
+
while (1) {
|
|
101
|
+
switch (_context2.prev = _context2.next) {
|
|
102
|
+
case 0:
|
|
103
|
+
if (!(isClipboardApiSupported() && typeof ClipboardItem !== 'undefined')) {
|
|
104
|
+
_context2.next = 12;
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
_context2.prev = 1;
|
|
109
|
+
blobInput = new Blob([htmlToCopy], {
|
|
110
|
+
type: 'text/html'
|
|
111
|
+
}); // @ts-ignore
|
|
112
|
+
|
|
113
|
+
data = [new ClipboardItem({
|
|
114
|
+
'text/html': blobInput
|
|
115
|
+
})]; // @ts-ignore
|
|
116
|
+
|
|
117
|
+
navigator.clipboard.write(data);
|
|
118
|
+
_context2.next = 10;
|
|
119
|
+
break;
|
|
120
|
+
|
|
121
|
+
case 7:
|
|
122
|
+
_context2.prev = 7;
|
|
123
|
+
_context2.t0 = _context2["catch"](1);
|
|
124
|
+
throw new Error('Clipboard api is not supported');
|
|
125
|
+
|
|
126
|
+
case 10:
|
|
127
|
+
_context2.next = 16;
|
|
128
|
+
break;
|
|
129
|
+
|
|
130
|
+
case 12:
|
|
131
|
+
// At the time of development, Firefox doesn't support ClipboardItem API
|
|
132
|
+
// Hence of use of this polyfill
|
|
133
|
+
Clipboard = clipboard;
|
|
134
|
+
dt = new Clipboard.DT();
|
|
135
|
+
dt.setData('text/html', htmlToCopy);
|
|
136
|
+
Clipboard.write(dt);
|
|
137
|
+
|
|
138
|
+
case 16:
|
|
139
|
+
case "end":
|
|
140
|
+
return _context2.stop();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}, _callee2, null, [[1, 7]]);
|
|
144
|
+
}));
|
|
145
|
+
|
|
146
|
+
return function copyHTMLToClipboard(_x2) {
|
|
147
|
+
return _ref3.apply(this, arguments);
|
|
148
|
+
};
|
|
94
149
|
}();
|
package/dist/esm/version.json
CHANGED
|
@@ -13,7 +13,9 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
|
|
|
13
13
|
TEXT_FORMATTING_STRONG = "strong",
|
|
14
14
|
TEXT_FORMATTING_ITALIC = "italic",
|
|
15
15
|
UNDO = "undo",
|
|
16
|
-
REDO = "redo"
|
|
16
|
+
REDO = "redo",
|
|
17
|
+
INDENT = "indent",
|
|
18
|
+
OUTDENT = "outdent"
|
|
17
19
|
}
|
|
18
20
|
declare type ToolbarButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_BUTTON, undefined, {}, undefined>;
|
|
19
21
|
export declare type ToolbarEventPayload = ToolbarButtonClickedAEP;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
3
|
+
import { IntlShape } from 'react-intl-next';
|
|
4
|
+
import { Command } from '../../../src/types';
|
|
5
|
+
import { FloatingToolbarItem } from '../floating-toolbar/types';
|
|
6
|
+
export declare const getCopyButtonConfig: (state: EditorState, formatMessage: IntlShape['formatMessage'], nodeType: NodeType, onMouseEnter?: Command | undefined, onMouseLeave?: Command | undefined) => FloatingToolbarItem<Command>;
|
|
7
|
+
export declare const showCopyButton: (state?: EditorState<any> | undefined) => import("prosemirror-state").Plugin<any, any> | undefined;
|
|
@@ -17,6 +17,7 @@ export { default as insertBlockPlugin } from './insert-block';
|
|
|
17
17
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
18
18
|
export { default as layoutPlugin } from './layout';
|
|
19
19
|
export { default as listPlugin } from './list';
|
|
20
|
+
export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
|
|
20
21
|
export { default as macroPlugin } from './macro';
|
|
21
22
|
export { default as maxContentSizePlugin } from './max-content-size';
|
|
22
23
|
export { default as mediaPlugin } from './media';
|
|
@@ -66,3 +67,4 @@ export { default as avatarGroupPlugin } from './avatar-group';
|
|
|
66
67
|
export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
|
|
67
68
|
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
68
69
|
export { default as codeBidiWarningPlugin } from './code-bidi-warning';
|
|
70
|
+
export { default as copyButtonPlugin } from './copy-button';
|
|
@@ -9,5 +9,5 @@ import { PanelType } from '@atlaskit/adf-schema';
|
|
|
9
9
|
export declare const panelIconMap: {
|
|
10
10
|
[key in Exclude<PanelType, PanelType.CUSTOM>]: EmojiInfo;
|
|
11
11
|
};
|
|
12
|
-
export declare const getToolbarItems: (formatMessage: IntlShape['formatMessage'], panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined) => FloatingToolbarItem<Command>[];
|
|
12
|
+
export declare const getToolbarItems: (formatMessage: IntlShape['formatMessage'], panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined, state?: EditorState<any> | undefined) => FloatingToolbarItem<Command>[];
|
|
13
13
|
export declare const getToolbarConfig: (state: EditorState, intl: IntlShape, options: PanelPluginOptions | undefined, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
@@ -2,7 +2,7 @@ import { CellColumnPositioning } from '../types';
|
|
|
2
2
|
export declare const hoverMergedCells: () => import("../../..").Command;
|
|
3
3
|
export declare const hoverColumns: (hoveredColumns: number[], isInDanger?: boolean | undefined) => import("../../..").Command;
|
|
4
4
|
export declare const hoverRows: (hoveredRows: number[], isInDanger?: boolean | undefined) => import("../../..").Command;
|
|
5
|
-
export declare const hoverTable: (isInDanger?: boolean | undefined) => import("../../..").Command;
|
|
5
|
+
export declare const hoverTable: (isInDanger?: boolean | undefined, isSelected?: boolean | undefined) => import("../../..").Command;
|
|
6
6
|
export declare const clearHoverSelection: () => import("../../..").Command;
|
|
7
7
|
export declare const showResizeHandleLine: (cellColumnPositioning: CellColumnPositioning) => import("../../..").Command;
|
|
8
8
|
export declare const hideResizeHandleLine: () => import("../../..").Command;
|
|
@@ -5,7 +5,7 @@ import { Cell, CellColumnPositioning, TableDecorations } from '../types';
|
|
|
5
5
|
export declare const findColumnControlSelectedDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
6
6
|
export declare const findControlsHoverDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
7
7
|
export declare const createCellHoverDecoration: (cells: Cell[], type: 'warning') => Decoration[];
|
|
8
|
-
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', danger?: boolean | undefined) => Decoration[];
|
|
8
|
+
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', danger?: boolean | undefined, selected?: boolean | undefined) => Decoration[];
|
|
9
9
|
export declare const createColumnSelectedDecoration: (tr: Transaction | ReadonlyTransaction) => Decoration[];
|
|
10
10
|
export declare const createColumnControlsDecoration: (selection: Selection) => Decoration[];
|
|
11
11
|
export declare const updateDecorations: (node: PmNode, decorationSet: DecorationSet, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
|
@@ -15,6 +15,6 @@ export declare const markActive: (state: EditorState, mark: PMMark) => boolean;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const anyMarkActive: (state: EditorState, markType: MarkType) => boolean;
|
|
17
17
|
export declare const checkFormattingIsPresent: (state: EditorState) => boolean;
|
|
18
|
-
export declare const usePreviousObjectState: (value:
|
|
18
|
+
export declare const usePreviousObjectState: (value: MenuIconItem[]) => MenuIconItem[];
|
|
19
19
|
export declare const compareItemsArrays: (items: MenuIconItem[], prevItems: MenuIconItem[]) => MenuIconItem[];
|
|
20
20
|
export declare const isArrayContainsContent: (items: MenuIconItem[], content: string) => boolean;
|