@atlaskit/editor-common 82.2.2 → 82.4.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 +31 -0
- package/dist/cjs/collab/index.js +1 -1
- package/dist/cjs/element-browser/ViewMore.js +1 -0
- package/dist/cjs/element-browser/components/CategoryList.js +2 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +19 -1
- package/dist/cjs/element-browser/components/ElementSearch.js +56 -42
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +18 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +6 -3
- package/dist/cjs/extensibility/Extension/Extension/styles.js +24 -9
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +3 -2
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +9 -4
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +11 -6
- package/dist/cjs/extensibility/Extension/Lozenge/LozengeComponent.js +20 -15
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +1 -0
- package/dist/cjs/extensibility/Extension/styles.js +13 -0
- package/dist/cjs/extensibility/ExtensionNodeWrapper.js +2 -0
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +20 -4
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +14 -2
- package/dist/cjs/keymaps/index.js +2 -1
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +9 -0
- package/dist/cjs/link/LinkSearch/ToolbarComponents.js +7 -0
- package/dist/cjs/media-inline/inline-image-wrapper.js +9 -1
- package/dist/cjs/media-inline/styles.js +12 -1
- package/dist/cjs/media-inline/views/frame.js +7 -4
- package/dist/cjs/media-inline/views/icon-wrapper.js +1 -0
- package/dist/cjs/media-inline/views/wrapper.js +1 -0
- package/dist/cjs/media-single/CommentBadge.js +5 -1
- package/dist/cjs/messages/help-dialog.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/rank.js +1 -1
- package/dist/cjs/selection/gap-cursor/styles.js +1 -1
- package/dist/cjs/styles/shared/annotation.js +6 -0
- package/dist/cjs/styles/shared/background-color.js +4 -0
- package/dist/cjs/styles/shared/block-marks.js +1 -0
- package/dist/cjs/styles/shared/blockquote.js +8 -1
- package/dist/cjs/styles/shared/code-block.js +2 -0
- package/dist/cjs/styles/shared/code-mark.js +1 -0
- package/dist/cjs/styles/shared/column-layout.js +6 -1
- package/dist/cjs/styles/shared/date.js +2 -0
- package/dist/cjs/styles/shared/embedCard.js +8 -0
- package/dist/cjs/styles/shared/expand.js +1 -0
- package/dist/cjs/styles/shared/grid.js +7 -0
- package/dist/cjs/styles/shared/headings.js +6 -0
- package/dist/cjs/styles/shared/indentation.js +8 -0
- package/dist/cjs/styles/shared/link.js +4 -1
- package/dist/cjs/styles/shared/lists.js +1 -1
- package/dist/cjs/styles/shared/media-single.js +8 -1
- package/dist/cjs/styles/shared/paragraph.js +4 -1
- package/dist/cjs/styles/shared/plugins.js +8 -0
- package/dist/cjs/styles/shared/resizer.js +1 -1
- package/dist/cjs/styles/shared/rule.js +2 -1
- package/dist/cjs/styles/shared/shadow.js +4 -1
- package/dist/cjs/styles/shared/smartCard.js +1 -1
- package/dist/cjs/styles/shared/tableCell.js +1 -0
- package/dist/cjs/styles/shared/task-decision.js +2 -0
- package/dist/cjs/styles/shared/text-color.js +3 -0
- package/dist/cjs/styles/shared/unsupported-content.js +1 -1
- package/dist/cjs/styles/shared/whitespace.js +3 -1
- package/dist/cjs/table/SortingIcon.js +2 -2
- package/dist/cjs/ui/DropList/index.js +5 -1
- package/dist/cjs/ui/Expand/index.js +13 -0
- package/dist/cjs/ui/MediaSingle/index.js +3 -1
- package/dist/cjs/ui/MediaSingle/link.js +1 -0
- package/dist/cjs/ui/MediaSingle/styled.js +6 -3
- package/dist/cjs/ui/Messages/index.js +12 -7
- package/dist/cjs/ui/MultiBodiedExtension/index.js +24 -0
- package/dist/cjs/ui/PanelTextInput/index.js +1 -0
- package/dist/cjs/ui/PanelTextInput/styles.js +6 -0
- package/dist/cjs/ui/Popup/index.js +1 -0
- package/dist/cjs/ui/UnsupportedBlock/index.js +2 -0
- package/dist/cjs/ui/UnsupportedInline/index.js +2 -0
- package/dist/cjs/ui/clear-next-sibling-margin-top.js +6 -2
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +60 -8
- package/dist/cjs/ui-color/ColorPalette/Color/styles.js +3 -0
- package/dist/cjs/ui-color/ColorPalette/Palettes/highlightColorPalette.js +38 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +1 -1
- package/dist/cjs/ui-color/ColorPalette/index.js +5 -2
- package/dist/cjs/ui-color/ColorPalette/styles.js +1 -0
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +7 -0
- package/dist/cjs/ui-menu/DropdownMenu/index.js +1 -0
- package/dist/cjs/utils/annotation/index.js +24 -0
- package/dist/cjs/utils/index.js +6 -0
- package/dist/es2019/collab/index.js +1 -1
- package/dist/es2019/element-browser/ViewMore.js +1 -0
- package/dist/es2019/element-browser/components/CategoryList.js +3 -0
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +19 -1
- package/dist/es2019/element-browser/components/ElementSearch.js +56 -42
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +18 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +6 -3
- package/dist/es2019/extensibility/Extension/Extension/styles.js +24 -9
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +3 -2
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +10 -4
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +11 -6
- package/dist/es2019/extensibility/Extension/Lozenge/LozengeComponent.js +19 -14
- package/dist/es2019/extensibility/Extension/Lozenge/index.js +1 -0
- package/dist/es2019/extensibility/Extension/styles.js +14 -0
- package/dist/es2019/extensibility/ExtensionNodeWrapper.js +2 -0
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +21 -5
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +14 -2
- package/dist/es2019/keymaps/index.js +1 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +9 -0
- package/dist/es2019/link/LinkSearch/ToolbarComponents.js +8 -0
- package/dist/es2019/media-inline/inline-image-wrapper.js +9 -1
- package/dist/es2019/media-inline/styles.js +12 -1
- package/dist/es2019/media-inline/views/frame.js +3 -1
- package/dist/es2019/media-inline/views/icon-wrapper.js +1 -0
- package/dist/es2019/media-inline/views/wrapper.js +1 -0
- package/dist/es2019/media-single/CommentBadge.js +5 -1
- package/dist/es2019/messages/help-dialog.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/rank.js +1 -1
- package/dist/es2019/selection/gap-cursor/styles.js +1 -1
- package/dist/es2019/styles/shared/annotation.js +6 -0
- package/dist/es2019/styles/shared/background-color.js +5 -0
- package/dist/es2019/styles/shared/block-marks.js +2 -0
- package/dist/es2019/styles/shared/blockquote.js +8 -1
- package/dist/es2019/styles/shared/code-block.js +2 -0
- package/dist/es2019/styles/shared/code-mark.js +2 -0
- package/dist/es2019/styles/shared/column-layout.js +6 -0
- package/dist/es2019/styles/shared/date.js +3 -0
- package/dist/es2019/styles/shared/embedCard.js +8 -0
- package/dist/es2019/styles/shared/expand.js +1 -0
- package/dist/es2019/styles/shared/grid.js +7 -0
- package/dist/es2019/styles/shared/headings.js +12 -0
- package/dist/es2019/styles/shared/indentation.js +9 -0
- package/dist/es2019/styles/shared/link.js +3 -0
- package/dist/es2019/styles/shared/lists.js +1 -1
- package/dist/es2019/styles/shared/media-single.js +15 -0
- package/dist/es2019/styles/shared/panel.js +1 -0
- package/dist/es2019/styles/shared/paragraph.js +4 -1
- package/dist/es2019/styles/shared/plugins.js +8 -0
- package/dist/es2019/styles/shared/resizer.js +1 -1
- package/dist/es2019/styles/shared/rule.js +2 -1
- package/dist/es2019/styles/shared/shadow.js +9 -0
- package/dist/es2019/styles/shared/smartCard.js +1 -1
- package/dist/es2019/styles/shared/tableCell.js +1 -0
- package/dist/es2019/styles/shared/task-decision.js +2 -0
- package/dist/es2019/styles/shared/text-color.js +4 -0
- package/dist/es2019/styles/shared/unsupported-content.js +1 -1
- package/dist/es2019/styles/shared/whitespace.js +2 -0
- package/dist/es2019/table/SortingIcon.js +2 -2
- package/dist/es2019/ui/DropList/index.js +5 -1
- package/dist/es2019/ui/Expand/index.js +13 -0
- package/dist/es2019/ui/MediaSingle/index.js +3 -1
- package/dist/es2019/ui/MediaSingle/link.js +2 -0
- package/dist/es2019/ui/MediaSingle/styled.js +3 -1
- package/dist/es2019/ui/Messages/index.js +5 -1
- package/dist/es2019/ui/MultiBodiedExtension/index.js +24 -0
- package/dist/es2019/ui/PanelTextInput/index.js +1 -0
- package/dist/es2019/ui/PanelTextInput/styles.js +6 -0
- package/dist/es2019/ui/Popup/index.js +1 -0
- package/dist/es2019/ui/UnsupportedBlock/index.js +2 -0
- package/dist/es2019/ui/UnsupportedInline/index.js +2 -0
- package/dist/es2019/ui/clear-next-sibling-margin-top.js +7 -2
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +64 -2
- package/dist/es2019/ui-color/ColorPalette/Color/styles.js +3 -0
- package/dist/es2019/ui-color/ColorPalette/Palettes/highlightColorPalette.js +36 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessages.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/index.js +5 -2
- package/dist/es2019/ui-color/ColorPalette/styles.js +1 -0
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +7 -0
- package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -0
- package/dist/es2019/utils/annotation/index.js +22 -0
- package/dist/es2019/utils/index.js +1 -1
- package/dist/esm/collab/index.js +1 -1
- package/dist/esm/element-browser/ViewMore.js +1 -0
- package/dist/esm/element-browser/components/CategoryList.js +2 -0
- package/dist/esm/element-browser/components/ElementList/ElementList.js +19 -1
- package/dist/esm/element-browser/components/ElementSearch.js +56 -42
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +18 -0
- package/dist/esm/extensibility/Extension/Extension/index.js +6 -3
- package/dist/esm/extensibility/Extension/Extension/styles.js +24 -9
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +3 -2
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +10 -4
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +11 -6
- package/dist/esm/extensibility/Extension/Lozenge/LozengeComponent.js +20 -15
- package/dist/esm/extensibility/Extension/Lozenge/index.js +1 -0
- package/dist/esm/extensibility/Extension/styles.js +14 -0
- package/dist/esm/extensibility/ExtensionNodeWrapper.js +2 -0
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +20 -4
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +14 -2
- package/dist/esm/keymaps/index.js +1 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
- package/dist/esm/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +9 -0
- package/dist/esm/link/LinkSearch/ToolbarComponents.js +8 -0
- package/dist/esm/media-inline/inline-image-wrapper.js +9 -1
- package/dist/esm/media-inline/styles.js +12 -1
- package/dist/esm/media-inline/views/frame.js +7 -4
- package/dist/esm/media-inline/views/icon-wrapper.js +1 -0
- package/dist/esm/media-inline/views/wrapper.js +1 -0
- package/dist/esm/media-single/CommentBadge.js +5 -1
- package/dist/esm/messages/help-dialog.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/rank.js +1 -1
- package/dist/esm/selection/gap-cursor/styles.js +1 -1
- package/dist/esm/styles/shared/annotation.js +6 -0
- package/dist/esm/styles/shared/background-color.js +5 -0
- package/dist/esm/styles/shared/block-marks.js +2 -0
- package/dist/esm/styles/shared/blockquote.js +8 -1
- package/dist/esm/styles/shared/code-block.js +2 -0
- package/dist/esm/styles/shared/code-mark.js +1 -0
- package/dist/esm/styles/shared/column-layout.js +5 -0
- package/dist/esm/styles/shared/date.js +2 -0
- package/dist/esm/styles/shared/embedCard.js +8 -0
- package/dist/esm/styles/shared/expand.js +1 -0
- package/dist/esm/styles/shared/grid.js +7 -0
- package/dist/esm/styles/shared/headings.js +6 -0
- package/dist/esm/styles/shared/indentation.js +9 -0
- package/dist/esm/styles/shared/link.js +3 -0
- package/dist/esm/styles/shared/lists.js +1 -1
- package/dist/esm/styles/shared/media-single.js +7 -0
- package/dist/esm/styles/shared/paragraph.js +4 -1
- package/dist/esm/styles/shared/plugins.js +8 -0
- package/dist/esm/styles/shared/resizer.js +1 -1
- package/dist/esm/styles/shared/rule.js +2 -1
- package/dist/esm/styles/shared/shadow.js +3 -0
- package/dist/esm/styles/shared/smartCard.js +1 -1
- package/dist/esm/styles/shared/tableCell.js +1 -0
- package/dist/esm/styles/shared/task-decision.js +2 -0
- package/dist/esm/styles/shared/text-color.js +4 -0
- package/dist/esm/styles/shared/unsupported-content.js +1 -1
- package/dist/esm/styles/shared/whitespace.js +2 -0
- package/dist/esm/table/SortingIcon.js +2 -2
- package/dist/esm/ui/DropList/index.js +5 -1
- package/dist/esm/ui/Expand/index.js +13 -0
- package/dist/esm/ui/MediaSingle/index.js +3 -1
- package/dist/esm/ui/MediaSingle/link.js +2 -0
- package/dist/esm/ui/MediaSingle/styled.js +6 -3
- package/dist/esm/ui/Messages/index.js +12 -7
- package/dist/esm/ui/MultiBodiedExtension/index.js +24 -0
- package/dist/esm/ui/PanelTextInput/index.js +1 -0
- package/dist/esm/ui/PanelTextInput/styles.js +6 -0
- package/dist/esm/ui/Popup/index.js +1 -0
- package/dist/esm/ui/UnsupportedBlock/index.js +2 -0
- package/dist/esm/ui/UnsupportedInline/index.js +2 -0
- package/dist/esm/ui/clear-next-sibling-margin-top.js +6 -2
- package/dist/esm/ui-color/ColorPalette/Color/index.js +60 -8
- package/dist/esm/ui-color/ColorPalette/Color/styles.js +3 -0
- package/dist/esm/ui-color/ColorPalette/Palettes/highlightColorPalette.js +37 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessages.js +1 -1
- package/dist/esm/ui-color/ColorPalette/index.js +5 -2
- package/dist/esm/ui-color/ColorPalette/styles.js +1 -0
- package/dist/esm/ui-menu/ColorPickerButton/index.js +7 -0
- package/dist/esm/ui-menu/DropdownMenu/index.js +1 -0
- package/dist/esm/utils/annotation/index.js +22 -0
- package/dist/esm/utils/index.js +1 -1
- package/dist/types/analytics/types/highlight-events.d.ts +4 -2
- package/dist/types/analytics/types/inline-comment-events.d.ts +1 -0
- package/dist/types/keymaps/index.d.ts +1 -0
- package/dist/types/messages/help-dialog.d.ts +5 -0
- package/dist/types/types/feature-flags.d.ts +8 -0
- package/dist/types/ui-color/ColorPalette/Color/index.d.ts +5 -2
- package/dist/types/ui-color/ColorPalette/Palettes/highlightColorPalette.d.ts +3 -0
- package/dist/types/ui-color/ColorPalette/Palettes/type.d.ts +2 -0
- package/dist/types/utils/annotation/index.d.ts +10 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/highlight-events.d.ts +4 -2
- package/dist/types-ts4.5/analytics/types/inline-comment-events.d.ts +1 -0
- package/dist/types-ts4.5/keymaps/index.d.ts +1 -0
- package/dist/types-ts4.5/messages/help-dialog.d.ts +5 -0
- package/dist/types-ts4.5/types/feature-flags.d.ts +8 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Color/index.d.ts +5 -2
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/highlightColorPalette.d.ts +3 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/type.d.ts +2 -0
- package/dist/types-ts4.5/utils/annotation/index.d.ts +10 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -1
- package/package.json +5 -2
|
@@ -119,6 +119,7 @@ var PanelTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
119
119
|
inputId = _this$props2.inputId;
|
|
120
120
|
var value = this.state.value;
|
|
121
121
|
return jsx("input", {
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
122
123
|
css: [panelTextInput, width !== undefined && panelTextInputWithCustomWidth(width)],
|
|
123
124
|
role: role,
|
|
124
125
|
"aria-autocomplete": ariaAutoComplete ? 'list' : undefined,
|
|
@@ -2,7 +2,9 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { B100, N100, N30, N400 } from '@atlaskit/theme/colors';
|
|
4
4
|
// Normal .className gets overridden by input[type=text] hence this hack to produce input.className
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
5
6
|
export var panelTextInput = css({
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
6
8
|
'input&': {
|
|
7
9
|
background: 'transparent',
|
|
8
10
|
border: "2px solid ".concat("var(--ds-border, ".concat(N30, ")")),
|
|
@@ -10,11 +12,13 @@ export var panelTextInput = css({
|
|
|
10
12
|
boxSizing: 'content-box',
|
|
11
13
|
color: "var(--ds-text-subtle, ".concat(N400, ")"),
|
|
12
14
|
flexGrow: 1,
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
13
16
|
fontSize: relativeFontSizeToBase16(13),
|
|
14
17
|
lineHeight: '20px',
|
|
15
18
|
padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-400, 32px)", " ", "var(--ds-space-075, 6px)", " ", "var(--ds-space-100, 8px)"),
|
|
16
19
|
minWidth: '145px',
|
|
17
20
|
/* Hides IE10+ built-in [x] clear input button */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
18
22
|
'&::-ms-clear': {
|
|
19
23
|
display: 'none'
|
|
20
24
|
},
|
|
@@ -29,7 +33,9 @@ export var panelTextInput = css({
|
|
|
29
33
|
});
|
|
30
34
|
export var panelTextInputWithCustomWidth = function panelTextInputWithCustomWidth(width) {
|
|
31
35
|
return css({
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
32
37
|
'input&': {
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
33
39
|
width: "".concat(width, "px")
|
|
34
40
|
}
|
|
35
41
|
});
|
|
@@ -287,6 +287,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
287
287
|
style: _objectSpread(_objectSpread({
|
|
288
288
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
289
289
|
position: 'absolute',
|
|
290
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
290
291
|
zIndex: this.props.zIndex || akEditorFloatingPanelZIndex
|
|
291
292
|
}, position), this.props.style),
|
|
292
293
|
"aria-label": ariaLabel,
|
|
@@ -14,10 +14,12 @@ import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
|
14
14
|
var blockNodeStyle = css({
|
|
15
15
|
background: "var(--ds-background-disabled, ".concat(N30, ")"),
|
|
16
16
|
border: "1px dashed ".concat("var(--ds-border-disabled, ".concat(N50, ")")),
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
17
18
|
borderRadius: "".concat(borderRadius(), "px"),
|
|
18
19
|
boxSizing: 'border-box',
|
|
19
20
|
cursor: 'default',
|
|
20
21
|
display: 'flex',
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
23
|
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
22
24
|
margin: "var(--ds-space-100, 8px)".concat(" 0"),
|
|
23
25
|
minHeight: '24px',
|
|
@@ -15,10 +15,12 @@ var inlineNodeStyle = css({
|
|
|
15
15
|
alignItems: 'center',
|
|
16
16
|
background: "var(--ds-background-disabled, ".concat(N30, ")"),
|
|
17
17
|
border: "1px dashed ".concat("var(--ds-border-disabled, ".concat(N50, ")")),
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
19
|
borderRadius: "".concat(borderRadius(), "px"),
|
|
19
20
|
boxSizing: 'border-box',
|
|
20
21
|
cursor: 'default',
|
|
21
22
|
display: 'inline-flex',
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
22
24
|
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
23
25
|
margin: "0 ".concat("var(--ds-space-025, 2px)"),
|
|
24
26
|
minHeight: '24px',
|
|
@@ -3,9 +3,11 @@ import { css } from '@emotion/react';
|
|
|
3
3
|
|
|
4
4
|
// We use !important to ensure next sibling gets the margin reset no matter what
|
|
5
5
|
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
6
7
|
export var clearNextSiblingMarginTopStyle = css({
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
7
9
|
'& + *': {
|
|
8
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
9
11
|
marginTop: '0 !important'
|
|
10
12
|
}
|
|
11
13
|
});
|
|
@@ -13,7 +15,9 @@ var textElements = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
|
13
15
|
var nextSiblingBlockMarkContentSelectors = textElements.map(function (elem) {
|
|
14
16
|
return "+ .fabric-editor-block-mark > ".concat(elem);
|
|
15
17
|
}).join(',');
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
16
20
|
export var clearNextSiblingBlockMarkMarginTopStyle = css(_defineProperty({}, "".concat(nextSiblingBlockMarkContentSelectors), {
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
18
22
|
marginTop: '0 !important'
|
|
19
23
|
}));
|
|
@@ -11,15 +11,64 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
11
11
|
import React, { PureComponent } from 'react';
|
|
12
12
|
import { jsx } from '@emotion/react';
|
|
13
13
|
import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
14
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { N0 } from '@atlaskit/theme/colors';
|
|
15
16
|
import Tooltip from '@atlaskit/tooltip';
|
|
16
17
|
import { buttonStyle, buttonWrapperStyle } from './styles';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
function FunctionalComponentColor(props) {
|
|
19
|
+
var autoFocus = props.autoFocus,
|
|
20
|
+
tabIndex = props.tabIndex,
|
|
21
|
+
value = props.value,
|
|
22
|
+
label = props.label,
|
|
23
|
+
isSelected = props.isSelected,
|
|
24
|
+
borderColor = props.borderColor,
|
|
25
|
+
_props$checkMarkColor = props.checkMarkColor,
|
|
26
|
+
checkMarkColor = _props$checkMarkColor === void 0 ? N0 : _props$checkMarkColor,
|
|
27
|
+
hexToPaletteColor = props.hexToPaletteColor,
|
|
28
|
+
decorator = props.decorator;
|
|
29
|
+
var colorStyle = hexToPaletteColor ? hexToPaletteColor(value) : value;
|
|
30
|
+
var onMouseDown = function onMouseDown(e) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
};
|
|
33
|
+
var onClick = function onClick(e) {
|
|
34
|
+
var onClick = props.onClick,
|
|
35
|
+
value = props.value,
|
|
36
|
+
label = props.label;
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
onClick(value, label);
|
|
39
|
+
};
|
|
40
|
+
return jsx(Tooltip, {
|
|
41
|
+
content: label
|
|
42
|
+
}, jsx("span", {
|
|
43
|
+
css: buttonWrapperStyle
|
|
44
|
+
}, jsx("button", {
|
|
45
|
+
type: "button",
|
|
46
|
+
css: buttonStyle,
|
|
47
|
+
"aria-label": label,
|
|
48
|
+
role: "radio",
|
|
49
|
+
"aria-checked": isSelected,
|
|
50
|
+
onClick: onClick,
|
|
51
|
+
onMouseDown: onMouseDown,
|
|
52
|
+
tabIndex: tabIndex
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
54
|
+
,
|
|
55
|
+
className: "".concat(isSelected ? 'selected' : ''),
|
|
56
|
+
style: {
|
|
57
|
+
backgroundColor: colorStyle || 'transparent',
|
|
58
|
+
border: "1px solid ".concat(borderColor)
|
|
59
|
+
},
|
|
60
|
+
autoFocus: autoFocus
|
|
61
|
+
}, !decorator && isSelected && jsx(EditorDoneIcon, {
|
|
62
|
+
primaryColor: checkMarkColor,
|
|
63
|
+
label: ""
|
|
64
|
+
}), decorator)));
|
|
65
|
+
}
|
|
66
|
+
var ClassComponentColor = /*#__PURE__*/function (_PureComponent) {
|
|
67
|
+
_inherits(ClassComponentColor, _PureComponent);
|
|
68
|
+
var _super = _createSuper(ClassComponentColor);
|
|
69
|
+
function ClassComponentColor() {
|
|
21
70
|
var _this;
|
|
22
|
-
_classCallCheck(this,
|
|
71
|
+
_classCallCheck(this, ClassComponentColor);
|
|
23
72
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
73
|
args[_key] = arguments[_key];
|
|
25
74
|
}
|
|
@@ -37,7 +86,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
37
86
|
});
|
|
38
87
|
return _this;
|
|
39
88
|
}
|
|
40
|
-
_createClass(
|
|
89
|
+
_createClass(ClassComponentColor, [{
|
|
41
90
|
key: "render",
|
|
42
91
|
value: function render() {
|
|
43
92
|
var _this$props2 = this.props,
|
|
@@ -56,7 +105,9 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
56
105
|
}, jsx("span", {
|
|
57
106
|
css: buttonWrapperStyle
|
|
58
107
|
}, jsx("button", {
|
|
59
|
-
type: "button"
|
|
108
|
+
type: "button"
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
110
|
+
,
|
|
60
111
|
css: buttonStyle,
|
|
61
112
|
"aria-label": label,
|
|
62
113
|
role: "radio",
|
|
@@ -78,6 +129,7 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
78
129
|
}))));
|
|
79
130
|
}
|
|
80
131
|
}]);
|
|
81
|
-
return
|
|
132
|
+
return ClassComponentColor;
|
|
82
133
|
}(PureComponent);
|
|
134
|
+
var Color = getBooleanFF('platform.editor.transparent-diagonal-decorator') ? FunctionalComponentColor : ClassComponentColor;
|
|
83
135
|
export default Color;
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { N0, N50, N900 } from '@atlaskit/theme/colors';
|
|
3
3
|
/** this is not new usage - old code extracted from editor-core */
|
|
4
4
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
5
6
|
export var buttonStyle = css({
|
|
6
7
|
height: '26px',
|
|
7
8
|
width: '26px',
|
|
@@ -16,6 +17,7 @@ export var buttonStyle = css({
|
|
|
16
17
|
|
|
17
18
|
/** this is not new usage - old code extracted from editor-core */
|
|
18
19
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
19
21
|
export var buttonWrapperStyle = css({
|
|
20
22
|
border: '1px solid transparent',
|
|
21
23
|
fontSize: 0,
|
|
@@ -24,6 +26,7 @@ export var buttonWrapperStyle = css({
|
|
|
24
26
|
padding: "var(--ds-space-025, 2px)",
|
|
25
27
|
borderRadius: '6px',
|
|
26
28
|
'&:focus-within, &:focus, &:hover': {
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
27
30
|
borderColor: "".concat("var(--ds-border, ".concat(N50, ")"), " !important")
|
|
28
31
|
}
|
|
29
32
|
});
|
|
@@ -1,15 +1,51 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
1
4
|
import { backgroundColorPalette } from '@atlaskit/adf-schema';
|
|
5
|
+
import Icon from '@atlaskit/icon';
|
|
6
|
+
import { useThemeObserver } from '@atlaskit/tokens';
|
|
2
7
|
import { DEFAULT_BORDER_COLOR } from './common';
|
|
3
8
|
import getColorMessage from './getColorMessage';
|
|
4
9
|
import paletteMessages from './paletteMessages';
|
|
5
10
|
import { mapPaletteColor } from './textColorPalette';
|
|
6
11
|
export var REMOVE_HIGHLIGHT_COLOR = '#00000000';
|
|
12
|
+
var DiagonalLineGlyph = function DiagonalLineGlyph() {
|
|
13
|
+
return jsx("svg", {
|
|
14
|
+
width: "24",
|
|
15
|
+
height: "24",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
+
}, jsx("rect", {
|
|
20
|
+
width: "24",
|
|
21
|
+
height: "24",
|
|
22
|
+
fill: "white",
|
|
23
|
+
fillOpacity: "0.01"
|
|
24
|
+
}), jsx("path", {
|
|
25
|
+
fillRule: "evenodd",
|
|
26
|
+
clipRule: "evenodd",
|
|
27
|
+
d: "M17.2038 7.70388C17.5955 8.09565 17.5941 8.73128 17.2005 9.12127L9.1213 17.1277C8.73027 17.5152 8.09958 17.5138 7.71031 17.1245C7.31854 16.7328 7.31997 16.0971 7.71351 15.7071L15.7928 7.70069C16.1838 7.31318 16.8145 7.31461 17.2038 7.70388Z",
|
|
28
|
+
fill: "currentColor",
|
|
29
|
+
fillOpacity: "0.5"
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
export var EditorDiagonalLineIcon = function EditorDiagonalLineIcon() {
|
|
33
|
+
var _useThemeObserver = useThemeObserver(),
|
|
34
|
+
colorMode = _useThemeObserver.colorMode;
|
|
35
|
+
var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #626F86)" : "var(--ds-background-accent-gray-subtle, #8590A2)";
|
|
36
|
+
return jsx(Icon, {
|
|
37
|
+
glyph: DiagonalLineGlyph,
|
|
38
|
+
label: "",
|
|
39
|
+
primaryColor: primaryColor
|
|
40
|
+
});
|
|
41
|
+
};
|
|
7
42
|
export var highlightColorPalette = [{
|
|
8
43
|
value: REMOVE_HIGHLIGHT_COLOR,
|
|
9
44
|
label: 'No color',
|
|
10
45
|
// Mostly informative, only used for analytics
|
|
11
46
|
border: DEFAULT_BORDER_COLOR,
|
|
12
|
-
message: getColorMessage(paletteMessages, 'no-color')
|
|
47
|
+
message: getColorMessage(paletteMessages, 'no-color'),
|
|
48
|
+
decorator: jsx(EditorDiagonalLineIcon, null)
|
|
13
49
|
}];
|
|
14
50
|
backgroundColorPalette.forEach(function (label, color) {
|
|
15
51
|
highlightColorPalette.push(mapPaletteColor(label, color));
|
|
@@ -123,7 +123,7 @@ export default defineMessages({
|
|
|
123
123
|
// Colors only used in highlight palette
|
|
124
124
|
'no-color': {
|
|
125
125
|
id: 'fabric.theme.no-color',
|
|
126
|
-
defaultMessage: '
|
|
126
|
+
defaultMessage: 'No highlight',
|
|
127
127
|
description: 'Tooltip for the no color option in the highlight color palette in the main editor toolbar'
|
|
128
128
|
},
|
|
129
129
|
lime: {
|
|
@@ -54,6 +54,7 @@ var ColorPalette = function ColorPalette(props) {
|
|
|
54
54
|
}, [palette, cols]);
|
|
55
55
|
return jsx(React.Fragment, null, colorsPerRow.map(function (row) {
|
|
56
56
|
return jsx("div", {
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
57
58
|
css: colorPaletteWrapper
|
|
58
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
59
60
|
,
|
|
@@ -64,7 +65,8 @@ var ColorPalette = function ColorPalette(props) {
|
|
|
64
65
|
var value = _ref.value,
|
|
65
66
|
label = _ref.label,
|
|
66
67
|
border = _ref.border,
|
|
67
|
-
message = _ref.message
|
|
68
|
+
message = _ref.message,
|
|
69
|
+
decorator = _ref.decorator;
|
|
68
70
|
if (paletteColorTooltipMessages) {
|
|
69
71
|
if (tokenTheme === 'dark') {
|
|
70
72
|
message = getColorMessage(paletteColorTooltipMessages.dark, value.toUpperCase());
|
|
@@ -81,7 +83,8 @@ var ColorPalette = function ColorPalette(props) {
|
|
|
81
83
|
onClick: onClick,
|
|
82
84
|
isSelected: value === selectedColor,
|
|
83
85
|
checkMarkColor: getCheckMarkColor(value, useIconToken),
|
|
84
|
-
hexToPaletteColor: hexToPaletteColor
|
|
86
|
+
hexToPaletteColor: hexToPaletteColor,
|
|
87
|
+
decorator: decorator
|
|
85
88
|
});
|
|
86
89
|
}));
|
|
87
90
|
}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
2
3
|
export var colorPaletteWrapper = css({
|
|
3
4
|
padding: "0 ".concat("var(--ds-space-100, 8px)"),
|
|
4
5
|
/* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
|
|
@@ -25,6 +25,7 @@ var colorPickerExpandContainer = css({
|
|
|
25
25
|
// Control the size of color picker buttons and preview
|
|
26
26
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4134
|
|
27
27
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
28
29
|
var colorPickerWrapper = function colorPickerWrapper() {
|
|
29
30
|
return css({
|
|
30
31
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
@@ -168,17 +169,23 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
168
169
|
return css({
|
|
169
170
|
padding: "var(--ds-space-075, 6px)".concat(" 10px"),
|
|
170
171
|
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
171
173
|
height: "".concat(!!((_props$size = props.size) !== null && _props$size !== void 0 && _props$size.height) ? 'inherit' : ''),
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
172
175
|
'&:before': {
|
|
173
176
|
display: 'flex',
|
|
174
177
|
justifyContent: 'center',
|
|
175
178
|
alignItems: 'center',
|
|
176
179
|
alignSelf: 'center',
|
|
177
180
|
content: "''",
|
|
181
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
178
182
|
border: "1px solid ".concat(DEFAULT_BORDER_COLOR),
|
|
179
183
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
184
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
180
185
|
backgroundColor: currentColor || 'transparent',
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
181
187
|
width: ((_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.width) || '14px',
|
|
188
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
182
189
|
height: ((_props$size3 = props.size) === null || _props$size3 === void 0 ? void 0 : _props$size3.height) || '14px',
|
|
183
190
|
padding: 0,
|
|
184
191
|
margin: "0px ".concat("var(--ds-space-025, 2px)")
|
|
@@ -34,6 +34,7 @@ import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
|
34
34
|
import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
35
35
|
var wrapper = css({
|
|
36
36
|
/* tooltip in ToolbarButton is display:block */
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
38
|
'& > div > div': {
|
|
38
39
|
display: 'flex'
|
|
39
40
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
export var canApplyAnnotationOnRange = function canApplyAnnotationOnRange(rangeSelection, doc, schema) {
|
|
3
4
|
var from = rangeSelection.from,
|
|
@@ -89,4 +90,25 @@ export function containsAnyAnnotations(slice, state) {
|
|
|
89
90
|
});
|
|
90
91
|
});
|
|
91
92
|
return hasAnnotation;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* This returns a list of node names that are inline nodes in the range.
|
|
97
|
+
*/
|
|
98
|
+
export function getRangeInlineNodeNames(_ref) {
|
|
99
|
+
var doc = _ref.doc,
|
|
100
|
+
pos = _ref.pos;
|
|
101
|
+
if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
var nodeNames = new Set();
|
|
105
|
+
doc.nodesBetween(pos.from, pos.to, function (node) {
|
|
106
|
+
if (node.isInline) {
|
|
107
|
+
nodeNames.add(node.type.name);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// We sort the list alphabetically to make human consumption of the list easier (in tools like the analytics extension)
|
|
112
|
+
var sortedNames = _toConsumableArray(nodeNames).sort();
|
|
113
|
+
return sortedNames;
|
|
92
114
|
}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
2
2
|
import { hasDocAsParent } from './document';
|
|
3
3
|
import { isEmptyParagraph } from './editor-core-utils';
|
|
4
4
|
export { shouldAutoLinkifyMatch } from './should-auto-linkify-tld';
|
|
5
|
-
export { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, hasAnnotationMark } from './annotation';
|
|
5
|
+
export { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, hasAnnotationMark, getRangeInlineNodeNames } from './annotation';
|
|
6
6
|
export { getExtensionLozengeData } from './macro';
|
|
7
7
|
export { default as browser } from './browser';
|
|
8
8
|
export { default as ErrorReporter } from './error-reporter';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
2
|
import type { TrackAEP } from './utils';
|
|
3
|
-
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
|
|
3
|
+
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR, {
|
|
4
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
|
|
5
|
+
}, undefined>;
|
|
4
6
|
export type HighlightTextAEP = TrackAEP<ACTION.FORMATTED, ACTION_SUBJECT.TEXT, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR, {
|
|
5
7
|
newColor: string;
|
|
6
8
|
previousColor: string;
|
|
@@ -6,6 +6,7 @@ export type AnnotationAEPAttributes = undefined | {} | AnnotationDraftAEPAttribu
|
|
|
6
6
|
export type AnnotationDraftAEPAttributes = {
|
|
7
7
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
|
|
8
8
|
overlap: number;
|
|
9
|
+
inlineNodeNames?: string[];
|
|
9
10
|
};
|
|
10
11
|
export type AnnotationResolvedAEPAttributes = {
|
|
11
12
|
method: RESOLVE_METHOD;
|
|
@@ -89,6 +89,7 @@ export declare const selectTable: Keymap;
|
|
|
89
89
|
export declare const increaseMediaSize: Keymap;
|
|
90
90
|
export declare const decreaseMediaSize: Keymap;
|
|
91
91
|
export declare const activateVideoControls: Keymap;
|
|
92
|
+
export declare const toggleHighlightPalette: Keymap;
|
|
92
93
|
export declare function tooltip(keymap?: Keymap, description?: string): string | undefined;
|
|
93
94
|
export declare const ToolTipContent: React.MemoExoticComponent<({ description, shortcutOverride, keymap, }: {
|
|
94
95
|
description?: string | React.ReactNode;
|
|
@@ -285,6 +285,14 @@ export type FeatureFlags = {
|
|
|
285
285
|
* @default false
|
|
286
286
|
*/
|
|
287
287
|
commentsOnMediaAnalytics?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* @description
|
|
290
|
+
* Enables block elements drag and drop
|
|
291
|
+
*
|
|
292
|
+
* @see https://product-fabric.atlassian.net/browse/ED-22939
|
|
293
|
+
* @default false
|
|
294
|
+
*/
|
|
295
|
+
elementDragAndDrop?: boolean;
|
|
288
296
|
};
|
|
289
297
|
export type FeatureFlagKey = keyof FeatureFlags;
|
|
290
298
|
export type GetEditorFeatureFlags = () => FeatureFlags;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import React, { PureComponent } from 'react';
|
|
2
|
+
import React, { PureComponent, type ReactElement } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
export interface Props {
|
|
5
5
|
value: string;
|
|
@@ -11,10 +11,13 @@ export interface Props {
|
|
|
11
11
|
checkMarkColor?: string;
|
|
12
12
|
autoFocus?: boolean;
|
|
13
13
|
hexToPaletteColor?: (hexColor: string) => string | undefined;
|
|
14
|
+
decorator?: ReactElement;
|
|
14
15
|
}
|
|
15
|
-
declare
|
|
16
|
+
declare function FunctionalComponentColor(props: Props): jsx.JSX.Element;
|
|
17
|
+
declare class ClassComponentColor extends PureComponent<Props> {
|
|
16
18
|
render(): jsx.JSX.Element;
|
|
17
19
|
onMouseDown: (e: React.MouseEvent<{}>) => void;
|
|
18
20
|
onClick: (e: React.MouseEvent<{}>) => void;
|
|
19
21
|
}
|
|
22
|
+
declare const Color: typeof ClassComponentColor | typeof FunctionalComponentColor;
|
|
20
23
|
export default Color;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import type { PaletteColor } from './type';
|
|
2
4
|
export declare const REMOVE_HIGHLIGHT_COLOR = "#00000000";
|
|
5
|
+
export declare const EditorDiagonalLineIcon: () => jsx.JSX.Element;
|
|
3
6
|
export declare const highlightColorPalette: Array<PaletteColor>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
1
2
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
3
|
export interface PaletteColor {
|
|
3
4
|
value: string;
|
|
4
5
|
label: string;
|
|
5
6
|
border: string;
|
|
6
7
|
message?: MessageDescriptor;
|
|
8
|
+
decorator?: ReactElement;
|
|
7
9
|
}
|
|
8
10
|
export type Palette = Array<PaletteColor>;
|
|
9
11
|
export type PaletteTooltipMessages = {
|
|
@@ -8,4 +8,14 @@ export declare const canApplyAnnotationOnRange: (rangeSelection: Range, doc: PMN
|
|
|
8
8
|
export declare const getAnnotationIdsFromRange: (rangeSelection: Range, doc: PMNode, schema: Schema) => string[];
|
|
9
9
|
export declare function hasAnnotationMark(node: PMNode, state: EditorState): boolean;
|
|
10
10
|
export declare function containsAnyAnnotations(slice: Slice, state: EditorState): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* This returns a list of node names that are inline nodes in the range.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getRangeInlineNodeNames({ doc, pos, }: {
|
|
15
|
+
doc: PMNode;
|
|
16
|
+
pos: {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
};
|
|
20
|
+
}): string[] | undefined;
|
|
11
21
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prose
|
|
|
2
2
|
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
export { shouldAutoLinkifyMatch } from './should-auto-linkify-tld';
|
|
5
|
-
export { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, hasAnnotationMark, } from './annotation';
|
|
5
|
+
export { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, hasAnnotationMark, getRangeInlineNodeNames, } from './annotation';
|
|
6
6
|
export { getExtensionLozengeData } from './macro';
|
|
7
7
|
export type { Params } from './macro';
|
|
8
8
|
export { default as browser } from './browser';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
2
|
import type { TrackAEP } from './utils';
|
|
3
|
-
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
|
|
3
|
+
export type HighlightToolbarToggleAEP = TrackAEP<ACTION.OPENED | ACTION.CLOSED, ACTION_SUBJECT.TOOLBAR, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR, {
|
|
4
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
|
|
5
|
+
}, undefined>;
|
|
4
6
|
export type HighlightTextAEP = TrackAEP<ACTION.FORMATTED, ACTION_SUBJECT.TEXT, ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR, {
|
|
5
7
|
newColor: string;
|
|
6
8
|
previousColor: string;
|
|
@@ -6,6 +6,7 @@ export type AnnotationAEPAttributes = undefined | {} | AnnotationDraftAEPAttribu
|
|
|
6
6
|
export type AnnotationDraftAEPAttributes = {
|
|
7
7
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
|
|
8
8
|
overlap: number;
|
|
9
|
+
inlineNodeNames?: string[];
|
|
9
10
|
};
|
|
10
11
|
export type AnnotationResolvedAEPAttributes = {
|
|
11
12
|
method: RESOLVE_METHOD;
|
|
@@ -89,6 +89,7 @@ export declare const selectTable: Keymap;
|
|
|
89
89
|
export declare const increaseMediaSize: Keymap;
|
|
90
90
|
export declare const decreaseMediaSize: Keymap;
|
|
91
91
|
export declare const activateVideoControls: Keymap;
|
|
92
|
+
export declare const toggleHighlightPalette: Keymap;
|
|
92
93
|
export declare function tooltip(keymap?: Keymap, description?: string): string | undefined;
|
|
93
94
|
export declare const ToolTipContent: React.MemoExoticComponent<({ description, shortcutOverride, keymap, }: {
|
|
94
95
|
description?: string | React.ReactNode;
|
|
@@ -285,6 +285,14 @@ export type FeatureFlags = {
|
|
|
285
285
|
* @default false
|
|
286
286
|
*/
|
|
287
287
|
commentsOnMediaAnalytics?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* @description
|
|
290
|
+
* Enables block elements drag and drop
|
|
291
|
+
*
|
|
292
|
+
* @see https://product-fabric.atlassian.net/browse/ED-22939
|
|
293
|
+
* @default false
|
|
294
|
+
*/
|
|
295
|
+
elementDragAndDrop?: boolean;
|
|
288
296
|
};
|
|
289
297
|
export type FeatureFlagKey = keyof FeatureFlags;
|
|
290
298
|
export type GetEditorFeatureFlags = () => FeatureFlags;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import React, { PureComponent } from 'react';
|
|
2
|
+
import React, { PureComponent, type ReactElement } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
export interface Props {
|
|
5
5
|
value: string;
|
|
@@ -11,10 +11,13 @@ export interface Props {
|
|
|
11
11
|
checkMarkColor?: string;
|
|
12
12
|
autoFocus?: boolean;
|
|
13
13
|
hexToPaletteColor?: (hexColor: string) => string | undefined;
|
|
14
|
+
decorator?: ReactElement;
|
|
14
15
|
}
|
|
15
|
-
declare
|
|
16
|
+
declare function FunctionalComponentColor(props: Props): jsx.JSX.Element;
|
|
17
|
+
declare class ClassComponentColor extends PureComponent<Props> {
|
|
16
18
|
render(): jsx.JSX.Element;
|
|
17
19
|
onMouseDown: (e: React.MouseEvent<{}>) => void;
|
|
18
20
|
onClick: (e: React.MouseEvent<{}>) => void;
|
|
19
21
|
}
|
|
22
|
+
declare const Color: typeof ClassComponentColor | typeof FunctionalComponentColor;
|
|
20
23
|
export default Color;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import type { PaletteColor } from './type';
|
|
2
4
|
export declare const REMOVE_HIGHLIGHT_COLOR = "#00000000";
|
|
5
|
+
export declare const EditorDiagonalLineIcon: () => jsx.JSX.Element;
|
|
3
6
|
export declare const highlightColorPalette: Array<PaletteColor>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
1
2
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
3
|
export interface PaletteColor {
|
|
3
4
|
value: string;
|
|
4
5
|
label: string;
|
|
5
6
|
border: string;
|
|
6
7
|
message?: MessageDescriptor;
|
|
8
|
+
decorator?: ReactElement;
|
|
7
9
|
}
|
|
8
10
|
export type Palette = Array<PaletteColor>;
|
|
9
11
|
export type PaletteTooltipMessages = {
|