@atlaskit/editor-common 78.11.5 → 78.11.7
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 +17 -0
- package/dist/cjs/collab/index.js +38 -11
- package/dist/cjs/extensibility/Extension/Extension/index.js +16 -2
- package/dist/cjs/extensibility/Extension/Lozenge.js +2 -0
- package/dist/cjs/extensibility/Extension/LozengeComponent.js +23 -18
- package/dist/cjs/extensibility/Extension/styles.js +9 -1
- package/dist/cjs/extensibility/ExtensionComponent.js +11 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +17 -3
- package/dist/cjs/keymaps/index.js +9 -6
- package/dist/cjs/media-inline/styles.js +2 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/plugin-injection-api.js +0 -4
- package/dist/cjs/selection/gap-cursor/styles.js +12 -3
- package/dist/cjs/styles/shared/annotation.js +18 -4
- package/dist/cjs/styles/shared/block-marks.js +1 -0
- package/dist/cjs/styles/shared/blockquote.js +29 -4
- package/dist/cjs/styles/shared/code-block.js +1 -0
- package/dist/cjs/styles/shared/code-mark.js +8 -3
- package/dist/cjs/styles/shared/column-layout.js +17 -3
- package/dist/cjs/styles/shared/date.js +4 -3
- package/dist/cjs/styles/shared/expand.js +3 -5
- package/dist/cjs/styles/shared/headings.js +34 -3
- package/dist/cjs/styles/shared/indentation.js +28 -5
- package/dist/cjs/styles/shared/link.js +5 -4
- package/dist/cjs/styles/shared/lists.js +2 -0
- package/dist/cjs/styles/shared/media-single.js +39 -3
- package/dist/cjs/styles/shared/panel.js +5 -2
- package/dist/cjs/styles/shared/paragraph.js +11 -4
- package/dist/cjs/styles/shared/plugins.js +30 -7
- package/dist/cjs/styles/shared/resizer.js +2 -0
- package/dist/cjs/styles/shared/rule.js +10 -4
- package/dist/cjs/styles/shared/shadow.js +1 -2
- package/dist/cjs/styles/shared/smartCard.js +2 -0
- package/dist/cjs/styles/shared/table.js +2 -0
- package/dist/cjs/styles/shared/tableCell.js +2 -4
- package/dist/cjs/styles/shared/text-color.js +8 -4
- package/dist/cjs/styles/shared/unsupported-content.js +2 -0
- package/dist/cjs/styles/shared/whitespace.js +4 -4
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/styled.js +16 -8
- package/dist/cjs/ui/ResizerLegacy/styled.js +1 -0
- package/dist/cjs/ui/clear-next-sibling-margin-top.js +12 -5
- package/dist/es2019/collab/index.js +34 -41
- package/dist/es2019/extensibility/Extension/Extension/index.js +12 -2
- package/dist/es2019/extensibility/Extension/Lozenge.js +2 -0
- package/dist/es2019/extensibility/Extension/LozengeComponent.js +22 -17
- package/dist/es2019/extensibility/Extension/styles.js +9 -1
- package/dist/es2019/extensibility/ExtensionComponent.js +11 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +13 -3
- package/dist/es2019/keymaps/index.js +7 -11
- package/dist/es2019/media-inline/media-inline-image-card.js +0 -1
- package/dist/es2019/media-inline/styles.js +2 -0
- package/dist/es2019/media-inline/views/icon-wrapper.js +0 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/plugin-injection-api.js +0 -4
- package/dist/es2019/selection/gap-cursor/styles.js +9 -7
- package/dist/es2019/styles/shared/annotation.js +13 -12
- package/dist/es2019/styles/shared/block-marks.js +1 -0
- package/dist/es2019/styles/shared/blockquote.js +27 -34
- package/dist/es2019/styles/shared/code-block.js +1 -0
- package/dist/es2019/styles/shared/code-mark.js +5 -5
- package/dist/es2019/styles/shared/column-layout.js +15 -17
- package/dist/es2019/styles/shared/date.js +4 -4
- package/dist/es2019/styles/shared/expand.js +3 -4
- package/dist/es2019/styles/shared/headings.js +36 -35
- package/dist/es2019/styles/shared/indentation.js +26 -22
- package/dist/es2019/styles/shared/link.js +4 -4
- package/dist/es2019/styles/shared/lists.js +2 -0
- package/dist/es2019/styles/shared/media-single.js +42 -65
- package/dist/es2019/styles/shared/panel.js +5 -5
- package/dist/es2019/styles/shared/paragraph.js +10 -9
- package/dist/es2019/styles/shared/plugins.js +29 -34
- package/dist/es2019/styles/shared/resizer.js +2 -0
- package/dist/es2019/styles/shared/rule.js +9 -8
- package/dist/es2019/styles/shared/shadow.js +1 -2
- package/dist/es2019/styles/shared/smartCard.js +2 -0
- package/dist/es2019/styles/shared/table.js +2 -0
- package/dist/es2019/styles/shared/tableCell.js +1 -3
- package/dist/es2019/styles/shared/text-color.js +7 -8
- package/dist/es2019/styles/shared/unsupported-content.js +2 -0
- package/dist/es2019/styles/shared/whitespace.js +4 -4
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/styled.js +37 -31
- package/dist/es2019/ui/ResizerLegacy/styled.js +2 -0
- package/dist/es2019/ui/clear-next-sibling-margin-top.js +11 -9
- package/dist/esm/collab/index.js +38 -11
- package/dist/esm/extensibility/Extension/Extension/index.js +16 -2
- package/dist/esm/extensibility/Extension/Lozenge.js +2 -0
- package/dist/esm/extensibility/Extension/LozengeComponent.js +23 -18
- package/dist/esm/extensibility/Extension/styles.js +9 -1
- package/dist/esm/extensibility/ExtensionComponent.js +11 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +17 -3
- package/dist/esm/keymaps/index.js +7 -5
- package/dist/esm/media-inline/media-inline-image-card.js +0 -1
- package/dist/esm/media-inline/styles.js +2 -0
- package/dist/esm/media-inline/views/icon-wrapper.js +0 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/plugin-injection-api.js +0 -4
- package/dist/esm/selection/gap-cursor/styles.js +12 -3
- package/dist/esm/styles/shared/annotation.js +18 -4
- package/dist/esm/styles/shared/block-marks.js +1 -0
- package/dist/esm/styles/shared/blockquote.js +29 -3
- package/dist/esm/styles/shared/code-block.js +1 -0
- package/dist/esm/styles/shared/code-mark.js +8 -3
- package/dist/esm/styles/shared/column-layout.js +17 -3
- package/dist/esm/styles/shared/date.js +4 -3
- package/dist/esm/styles/shared/expand.js +3 -4
- package/dist/esm/styles/shared/headings.js +34 -3
- package/dist/esm/styles/shared/indentation.js +28 -5
- package/dist/esm/styles/shared/link.js +5 -3
- package/dist/esm/styles/shared/lists.js +2 -0
- package/dist/esm/styles/shared/media-single.js +39 -3
- package/dist/esm/styles/shared/panel.js +5 -2
- package/dist/esm/styles/shared/paragraph.js +11 -3
- package/dist/esm/styles/shared/plugins.js +30 -6
- package/dist/esm/styles/shared/resizer.js +2 -0
- package/dist/esm/styles/shared/rule.js +10 -3
- package/dist/esm/styles/shared/shadow.js +1 -2
- package/dist/esm/styles/shared/smartCard.js +2 -0
- package/dist/esm/styles/shared/table.js +2 -0
- package/dist/esm/styles/shared/tableCell.js +1 -3
- package/dist/esm/styles/shared/text-color.js +8 -3
- package/dist/esm/styles/shared/unsupported-content.js +2 -0
- package/dist/esm/styles/shared/whitespace.js +4 -3
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/styled.js +16 -8
- package/dist/esm/ui/ResizerLegacy/styled.js +2 -0
- package/dist/esm/ui/clear-next-sibling-margin-top.js +12 -5
- package/dist/types/collab/index.d.ts +1 -1
- package/dist/types/element-browser/components/ElementBrowserLoader.d.ts +1 -1
- package/dist/types/extensibility/Extension/Extension/index.d.ts +2 -0
- package/dist/types/extensibility/Extension/Lozenge.d.ts +1 -0
- package/dist/types/extensibility/Extension/LozengeComponent.d.ts +2 -1
- package/dist/types/extensibility/ExtensionComponent.d.ts +2 -0
- package/dist/types/extensibility/MultiBodiedExtension/index.d.ts +2 -0
- package/dist/types/extensions/types/extension-manifest-common.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest.d.ts +1 -1
- package/dist/types/icons/index.d.ts +1 -1
- package/dist/types/link/LinkSearch/withActivityProvider.d.ts +1 -1
- package/dist/types/media-inline/inline-image-wrapper.d.ts +3 -2
- package/dist/types/media-inline/media-inline-image-card.d.ts +4 -4
- package/dist/types/media-inline/views/error-view.d.ts +3 -2
- package/dist/types/media-inline/views/frame.d.ts +3 -2
- package/dist/types/media-inline/views/icon-wrapper.d.ts +3 -2
- package/dist/types/media-inline/views/loading-view.d.ts +2 -2
- package/dist/types/quick-insert/assets/index.d.ts +24 -24
- package/dist/types/react-node-view/getInlineNodeViewProducer.d.ts +1 -1
- package/dist/types/react-node-view/index.d.ts +2 -2
- package/dist/types/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -1
- package/dist/types/types/annotation/index.d.ts +2 -2
- package/dist/types/types/floating-toolbar.d.ts +3 -3
- package/dist/types/ui/Announcer/announcer.d.ts +1 -1
- package/dist/types/ui/DropList/index.d.ts +1 -2
- package/dist/types/ui/ErrorBoundary/index.d.ts +1 -0
- package/dist/types/ui/IntlErrorBoundary/index.d.ts +1 -0
- package/dist/types/ui/Layer/index.d.ts +2 -1
- package/dist/types/ui/MediaSingle/styled.d.ts +1 -1
- package/dist/types/ui/OverflowShadow/index.d.ts +1 -1
- package/dist/types/ui/Popup/index.d.ts +1 -0
- package/dist/types/ui/with-outer-listeners.d.ts +3 -2
- package/dist/types/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types/ui-menu/ArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui-menu/Dropdown/index.d.ts +1 -1
- package/dist/types/ui-menu/DropdownMenu/index.d.ts +1 -1
- package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -0
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -2
- package/dist/types/utils/imageLoader.d.ts +1 -1
- package/dist/types-ts4.5/collab/index.d.ts +1 -1
- package/dist/types-ts4.5/element-browser/components/ElementBrowserLoader.d.ts +1 -1
- package/dist/types-ts4.5/extensibility/Extension/Extension/index.d.ts +2 -0
- package/dist/types-ts4.5/extensibility/Extension/Lozenge.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/Extension/LozengeComponent.d.ts +2 -1
- package/dist/types-ts4.5/extensibility/ExtensionComponent.d.ts +2 -0
- package/dist/types-ts4.5/extensibility/MultiBodiedExtension/index.d.ts +2 -0
- package/dist/types-ts4.5/extensions/types/extension-manifest-common.d.ts +1 -1
- package/dist/types-ts4.5/extensions/types/extension-manifest.d.ts +1 -1
- package/dist/types-ts4.5/icons/index.d.ts +1 -1
- package/dist/types-ts4.5/link/LinkSearch/withActivityProvider.d.ts +1 -1
- package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +3 -2
- package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +4 -4
- package/dist/types-ts4.5/media-inline/views/error-view.d.ts +3 -2
- package/dist/types-ts4.5/media-inline/views/frame.d.ts +3 -2
- package/dist/types-ts4.5/media-inline/views/icon-wrapper.d.ts +3 -2
- package/dist/types-ts4.5/media-inline/views/loading-view.d.ts +2 -2
- package/dist/types-ts4.5/quick-insert/assets/index.d.ts +24 -24
- package/dist/types-ts4.5/react-node-view/getInlineNodeViewProducer.d.ts +1 -1
- package/dist/types-ts4.5/react-node-view/index.d.ts +2 -2
- package/dist/types-ts4.5/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -1
- package/dist/types-ts4.5/types/annotation/index.d.ts +2 -2
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +3 -3
- package/dist/types-ts4.5/ui/Announcer/announcer.d.ts +1 -1
- package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/ErrorBoundary/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/IntlErrorBoundary/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/Layer/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +1 -1
- package/dist/types-ts4.5/ui/OverflowShadow/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Popup/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +3 -2
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/DropdownMenu/types.d.ts +1 -0
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -2
- package/dist/types-ts4.5/utils/imageLoader.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
3
|
// We use !important to ensure next sibling gets the margin reset no matter what
|
|
4
|
-
|
|
5
|
-
export const clearNextSiblingMarginTopStyle = css
|
|
6
|
-
& + * {
|
|
7
|
-
|
|
4
|
+
|
|
5
|
+
export const clearNextSiblingMarginTopStyle = css({
|
|
6
|
+
'& + *': {
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
8
|
+
marginTop: '0 !important'
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
+
});
|
|
10
11
|
const textElements = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
11
12
|
const nextSiblingBlockMarkContentSelectors = textElements.map(elem => `+ .fabric-editor-block-mark > ${elem}`).join(',');
|
|
12
|
-
export const clearNextSiblingBlockMarkMarginTopStyle = css
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
export const clearNextSiblingBlockMarkMarginTopStyle = css({
|
|
14
|
+
[`${nextSiblingBlockMarkContentSelectors}`]: {
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
16
|
+
marginTop: '0 !important'
|
|
15
17
|
}
|
|
16
|
-
|
|
18
|
+
});
|
package/dist/esm/collab/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
5
5
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
@@ -136,16 +136,43 @@ export var colors = [themeColors.R100, themeColors.R300, themeColors.R500, theme
|
|
|
136
136
|
selection: hexToRgba(solid, 0.2)
|
|
137
137
|
};
|
|
138
138
|
});
|
|
139
|
-
var telepointerColorStyle = function telepointerColorStyle(color, index) {
|
|
140
|
-
return "\n &.color-".concat(index, " {\n background-color: ").concat(color.selection, ";\n &::after {\n background-color: ").concat(color.solid, ";\n color: ", "var(--ds-text-inverse, #fff)", ";\n border-color: ").concat(color.solid, ";\n }\n }\n");
|
|
141
|
-
};
|
|
142
139
|
export var TELEPOINTER_DIM_CLASS = 'telepointer-dim';
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
140
|
+
export var telepointerStyle = css.apply(void 0, [{
|
|
141
|
+
'.ProseMirror .telepointer': _defineProperty({
|
|
142
|
+
position: 'relative',
|
|
143
|
+
transition: 'opacity 200ms',
|
|
144
|
+
'&.telepointer-selection': {
|
|
145
|
+
lineHeight: 1.2,
|
|
146
|
+
pointerEvents: 'none',
|
|
147
|
+
userSelect: 'none'
|
|
148
|
+
},
|
|
149
|
+
'&.telepointer-selection-badge::after': {
|
|
150
|
+
content: 'attr(data-initial)',
|
|
151
|
+
position: 'absolute',
|
|
152
|
+
display: 'block',
|
|
153
|
+
// Disable top: -14px since it is necessary to align to cursor
|
|
154
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
155
|
+
top: '-14px',
|
|
156
|
+
fontSize: relativeFontSizeToBase16(9),
|
|
157
|
+
padding: "var(--ds-space-025, 2px)",
|
|
158
|
+
color: "var(--ds-text-inverse, white)",
|
|
159
|
+
left: '0px',
|
|
160
|
+
borderRadius: '2px 2px 2px 0',
|
|
161
|
+
lineHeight: 'initial'
|
|
162
|
+
}
|
|
163
|
+
}, "&.".concat(TELEPOINTER_DIM_CLASS), {
|
|
164
|
+
opacity: 0.2
|
|
165
|
+
})
|
|
166
|
+
}].concat(_toConsumableArray(colors.map(function (color, index) {
|
|
167
|
+
return _defineProperty({}, "&.color-".concat(index), {
|
|
168
|
+
backgroundColor: color.selection,
|
|
169
|
+
'&::after': {
|
|
170
|
+
backgroundColor: color.solid,
|
|
171
|
+
color: "var(--ds-text-inverse, #fff)",
|
|
172
|
+
borderColor: color.solid
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}))));
|
|
149
176
|
var tintKey = 'collab:isDirtyTransaction';
|
|
150
177
|
export var isDirtyTransaction = function isDirtyTransaction(tr) {
|
|
151
178
|
return Boolean(tr.getMeta(tintKey));
|
|
@@ -29,7 +29,9 @@ function ExtensionWithPluginState(props) {
|
|
|
29
29
|
hideFrame = props.hideFrame,
|
|
30
30
|
editorAppearance = props.editorAppearance,
|
|
31
31
|
showMacroInteractionDesignUpdates = props.showMacroInteractionDesignUpdates,
|
|
32
|
-
isNodeSelected = props.isNodeSelected
|
|
32
|
+
isNodeSelected = props.isNodeSelected,
|
|
33
|
+
isNodeHovered = props.isNodeHovered,
|
|
34
|
+
setIsNodeHovered = props.setIsNodeHovered;
|
|
33
35
|
var hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
|
|
34
36
|
var isMobile = editorAppearance === 'mobile';
|
|
35
37
|
var hasChildren = !!children;
|
|
@@ -75,8 +77,14 @@ function ExtensionWithPluginState(props) {
|
|
|
75
77
|
customContainerStyles = breakoutStyles;
|
|
76
78
|
}
|
|
77
79
|
newContentStyles = _objectSpread(_objectSpread({}, newContentStyles), contentWrapper);
|
|
80
|
+
var handleMouseEvent = function handleMouseEvent(didHover) {
|
|
81
|
+
if (setIsNodeHovered) {
|
|
82
|
+
setIsNodeHovered(didHover);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
78
85
|
return jsx(Fragment, null, showMacroInteractionDesignUpdates && jsx(ExtensionLozenge, {
|
|
79
86
|
isNodeSelected: isNodeSelected,
|
|
87
|
+
isNodeHovered: isNodeHovered,
|
|
80
88
|
node: node,
|
|
81
89
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
82
90
|
customContainerStyles: customContainerStyles
|
|
@@ -85,7 +93,13 @@ function ExtensionWithPluginState(props) {
|
|
|
85
93
|
"data-layout": node.attrs.layout,
|
|
86
94
|
className: classNames,
|
|
87
95
|
css: wrapperStyle,
|
|
88
|
-
style: customContainerStyles
|
|
96
|
+
style: customContainerStyles,
|
|
97
|
+
onMouseOver: function onMouseOver() {
|
|
98
|
+
return handleMouseEvent(true);
|
|
99
|
+
},
|
|
100
|
+
onMouseLeave: function onMouseLeave() {
|
|
101
|
+
return handleMouseEvent(false);
|
|
102
|
+
}
|
|
89
103
|
}, jsx("div", {
|
|
90
104
|
className: "extension-overflow-wrapper ".concat(hasBody ? 'with-body' : '')
|
|
91
105
|
}, jsx("div", {
|
|
@@ -41,6 +41,7 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
41
41
|
var _this$props = _this.props,
|
|
42
42
|
showMacroInteractionDesignUpdates = _this$props.showMacroInteractionDesignUpdates,
|
|
43
43
|
isNodeSelected = _this$props.isNodeSelected,
|
|
44
|
+
isNodeHovered = _this$props.isNodeHovered,
|
|
44
45
|
customContainerStyles = _this$props.customContainerStyles;
|
|
45
46
|
var _this$props$node$attr = _this.props.node.attrs,
|
|
46
47
|
parameters = _this$props$node$attr.parameters,
|
|
@@ -50,6 +51,7 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
50
51
|
var title = parameters && parameters.extensionTitle || parameters && parameters.macroMetadata && parameters.macroMetadata.title || extensionKey;
|
|
51
52
|
var isBlockExtension = name === 'extension';
|
|
52
53
|
return jsx(LozengeComponent, {
|
|
54
|
+
isNodeHovered: isNodeHovered,
|
|
53
55
|
isNodeSelected: isNodeSelected,
|
|
54
56
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
55
57
|
isBlockExtension: isBlockExtension,
|
|
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import classnames from 'classnames';
|
|
7
8
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
8
9
|
import { SimpleTag as Tag } from '@atlaskit/tag';
|
|
9
10
|
import { lozengeWrapper, placeholderFallback, placeholderFallbackParams } from './styles';
|
|
@@ -19,12 +20,15 @@ export var LozengeComponent = function LozengeComponent(_ref) {
|
|
|
19
20
|
renderImage = _ref.renderImage,
|
|
20
21
|
isNodeSelected = _ref.isNodeSelected,
|
|
21
22
|
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
22
|
-
customContainerStyles = _ref.customContainerStyles
|
|
23
|
+
customContainerStyles = _ref.customContainerStyles,
|
|
24
|
+
isNodeHovered = _ref.isNodeHovered;
|
|
23
25
|
var capitalizedTitle = capitalizeFirstLetter(title);
|
|
24
|
-
// TODO: only show on lozenge on hover: https://product-fabric.atlassian.net/browse/PGXT-4945
|
|
25
26
|
if (showMacroInteractionDesignUpdates) {
|
|
27
|
+
var lozengeClassNames = classnames('extension-title', {
|
|
28
|
+
'show-lozenge': isNodeHovered || isNodeSelected
|
|
29
|
+
});
|
|
26
30
|
return jsx("div", {
|
|
27
|
-
className:
|
|
31
|
+
className: lozengeClassNames,
|
|
28
32
|
css: lozengeWrapper,
|
|
29
33
|
"data-testid": "new-lozenge",
|
|
30
34
|
style: customContainerStyles
|
|
@@ -32,20 +36,21 @@ export var LozengeComponent = function LozengeComponent(_ref) {
|
|
|
32
36
|
text: capitalizedTitle,
|
|
33
37
|
color: isNodeSelected ? 'blueLight' : 'greyLight'
|
|
34
38
|
}));
|
|
39
|
+
} else {
|
|
40
|
+
return jsx("div", {
|
|
41
|
+
"data-testid": "lozenge-fallback",
|
|
42
|
+
css: placeholderFallback
|
|
43
|
+
}, lozengeData && !isBlockExtension ? renderImage(_objectSpread({
|
|
44
|
+
height: ICON_SIZE,
|
|
45
|
+
width: ICON_SIZE
|
|
46
|
+
}, lozengeData)) : jsx(EditorFileIcon, {
|
|
47
|
+
label: title
|
|
48
|
+
}), jsx("span", {
|
|
49
|
+
className: "extension-title"
|
|
50
|
+
}, capitalizedTitle), params && !isBlockExtension && jsx("span", {
|
|
51
|
+
css: placeholderFallbackParams
|
|
52
|
+
}, Object.keys(params).map(function (key) {
|
|
53
|
+
return key && " | ".concat(key, " = ").concat(params[key].value);
|
|
54
|
+
})));
|
|
35
55
|
}
|
|
36
|
-
return jsx("div", {
|
|
37
|
-
"data-testid": "lozenge-fallback",
|
|
38
|
-
css: placeholderFallback
|
|
39
|
-
}, lozengeData && !isBlockExtension ? renderImage(_objectSpread({
|
|
40
|
-
height: ICON_SIZE,
|
|
41
|
-
width: ICON_SIZE
|
|
42
|
-
}, lozengeData)) : jsx(EditorFileIcon, {
|
|
43
|
-
label: title
|
|
44
|
-
}), jsx("span", {
|
|
45
|
-
className: "extension-title"
|
|
46
|
-
}, capitalizedTitle), params && !isBlockExtension && jsx("span", {
|
|
47
|
-
css: placeholderFallbackParams
|
|
48
|
-
}, Object.keys(params).map(function (key) {
|
|
49
|
-
return key && " | ".concat(key, " = ").concat(params[key].value);
|
|
50
|
-
})));
|
|
51
56
|
};
|
|
@@ -60,6 +60,14 @@ export var lozengeWrapper = css({
|
|
|
60
60
|
display: 'flex',
|
|
61
61
|
justifyContent: 'left',
|
|
62
62
|
width: '100%',
|
|
63
|
+
/* -0.75rem neutralizes the margin top coming from extensionView-content-wrap.
|
|
64
|
+
The lozenge takes up space so we don't need the extra padding anymore. */
|
|
65
|
+
marginTop: "var(--ds-space-negative-150, -0.75rem)",
|
|
63
66
|
marginLeft: "var(--ds-space-050, 4px)",
|
|
64
|
-
marginBottom: "var(--ds-space-negative-050, -4px)"
|
|
67
|
+
marginBottom: "var(--ds-space-negative-050, -4px)",
|
|
68
|
+
// Using opacity so that lozenge takes up space and doesn't cause shift on render
|
|
69
|
+
opacity: '0',
|
|
70
|
+
'&.show-lozenge': {
|
|
71
|
+
opacity: '1'
|
|
72
|
+
}
|
|
65
73
|
});
|
|
@@ -33,6 +33,11 @@ export var ExtensionComponent = /*#__PURE__*/function (_Component) {
|
|
|
33
33
|
// memoized to avoid rerender on extension state changes
|
|
34
34
|
_defineProperty(_assertThisInitialized(_this), "getNodeRenderer", memoizeOne(getNodeRenderer));
|
|
35
35
|
_defineProperty(_assertThisInitialized(_this), "getExtensionModuleNodePrivateProps", memoizeOne(getExtensionModuleNodePrivateProps));
|
|
36
|
+
_defineProperty(_assertThisInitialized(_this), "setIsNodeHovered", function (isHovered) {
|
|
37
|
+
_this.setState({
|
|
38
|
+
isNodeHovered: isHovered
|
|
39
|
+
});
|
|
40
|
+
});
|
|
36
41
|
_defineProperty(_assertThisInitialized(_this), "setStateFromPromise", function (stateKey, promise) {
|
|
37
42
|
promise && promise.then(function (p) {
|
|
38
43
|
if (!_this.mounted) {
|
|
@@ -199,7 +204,9 @@ export var ExtensionComponent = /*#__PURE__*/function (_Component) {
|
|
|
199
204
|
pluginInjectionApi: pluginInjectionApi,
|
|
200
205
|
editorAppearance: editorAppearance,
|
|
201
206
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
202
|
-
isNodeSelected: selectedNode === node
|
|
207
|
+
isNodeSelected: selectedNode === node,
|
|
208
|
+
isNodeHovered: this.state.isNodeHovered,
|
|
209
|
+
setIsNodeHovered: this.setIsNodeHovered
|
|
203
210
|
});
|
|
204
211
|
}
|
|
205
212
|
var extensionHandlerResult = this.tryExtensionHandler(undefined);
|
|
@@ -217,7 +224,9 @@ export var ExtensionComponent = /*#__PURE__*/function (_Component) {
|
|
|
217
224
|
hideFrame: (_this$state$_privateP = this.state._privateProps) === null || _this$state$_privateP === void 0 ? void 0 : _this$state$_privateP.__hideFrame,
|
|
218
225
|
pluginInjectionApi: pluginInjectionApi,
|
|
219
226
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
220
|
-
isNodeSelected: selectedNode === node
|
|
227
|
+
isNodeSelected: selectedNode === node,
|
|
228
|
+
isNodeHovered: this.state.isNodeHovered,
|
|
229
|
+
setIsNodeHovered: this.setIsNodeHovered
|
|
221
230
|
}, extensionHandlerResult);
|
|
222
231
|
case 'inlineExtension':
|
|
223
232
|
return /*#__PURE__*/React.createElement(InlineExtension, {
|
|
@@ -55,7 +55,9 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
55
55
|
widthState = _ref.widthState,
|
|
56
56
|
editorAppearance = _ref.editorAppearance,
|
|
57
57
|
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
58
|
-
isNodeSelected = _ref.isNodeSelected
|
|
58
|
+
isNodeSelected = _ref.isNodeSelected,
|
|
59
|
+
isNodeHovered = _ref.isNodeHovered,
|
|
60
|
+
setIsNodeHovered = _ref.setIsNodeHovered;
|
|
59
61
|
var _node$attrs = node.attrs,
|
|
60
62
|
parameters = _node$attrs.parameters,
|
|
61
63
|
extensionKey = _node$attrs.extensionKey;
|
|
@@ -115,16 +117,28 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
115
117
|
var navigationClassNames = classnames('multiBodiedExtension--navigation', {
|
|
116
118
|
'remove-margins': showMacroInteractionDesignUpdates
|
|
117
119
|
});
|
|
120
|
+
var handleMouseEvent = function handleMouseEvent(didHover) {
|
|
121
|
+
if (setIsNodeHovered) {
|
|
122
|
+
setIsNodeHovered(didHover);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
118
125
|
return jsx(Fragment, null, showMacroInteractionDesignUpdates && jsx(ExtensionLozenge, {
|
|
119
126
|
isNodeSelected: isNodeSelected,
|
|
120
127
|
node: node,
|
|
121
128
|
showMacroInteractionDesignUpdates: true,
|
|
122
|
-
customContainerStyles: mbeWrapperStyles
|
|
129
|
+
customContainerStyles: mbeWrapperStyles,
|
|
130
|
+
isNodeHovered: isNodeHovered
|
|
123
131
|
}), jsx("div", {
|
|
124
132
|
className: wrapperClassNames,
|
|
125
133
|
css: mbeExtensionWrapperCSS,
|
|
126
134
|
"data-testid": "multiBodiedExtension--wrapper",
|
|
127
|
-
style: mbeWrapperStyles
|
|
135
|
+
style: mbeWrapperStyles,
|
|
136
|
+
onMouseOver: function onMouseOver() {
|
|
137
|
+
return handleMouseEvent(true);
|
|
138
|
+
},
|
|
139
|
+
onMouseLeave: function onMouseLeave() {
|
|
140
|
+
return handleMouseEvent(false);
|
|
141
|
+
}
|
|
128
142
|
}, getWrapperTitleContent(imageData, title, showMacroInteractionDesignUpdates), jsx("div", {
|
|
129
143
|
className: containerClassNames,
|
|
130
144
|
css: containerCssExtended,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject;
|
|
4
2
|
/** @jsx jsx */
|
|
5
3
|
import React, { Fragment } from 'react';
|
|
6
4
|
import { css, jsx } from '@emotion/react';
|
|
@@ -93,9 +91,13 @@ var arrowKeysMap = {
|
|
|
93
91
|
ARROWUP: "\u2191",
|
|
94
92
|
ARROWDOWN: "\u2193"
|
|
95
93
|
};
|
|
96
|
-
var tooltipShortcutStyle = css(
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
var tooltipShortcutStyle = css({
|
|
95
|
+
borderRadius: '2px',
|
|
96
|
+
backgroundColor: "var(--ds-background-inverse-subtle, ".concat(N400, ")"),
|
|
97
|
+
padding: "0 ".concat("var(--ds-space-025, 2px)"),
|
|
98
|
+
// NOTE: This might not actually do anything: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E
|
|
99
|
+
label: 'tooltip-shortcut'
|
|
100
|
+
});
|
|
99
101
|
function formatShortcut(keymap) {
|
|
100
102
|
var shortcut;
|
|
101
103
|
if (browser.mac) {
|
|
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
/** @jsx jsx */
|
|
6
|
-
|
|
7
6
|
import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
7
|
import { jsx } from '@emotion/react';
|
|
9
8
|
import ReactDOM from 'react-dom';
|
|
@@ -9,6 +9,7 @@ export var INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY = '--editor-media-inline-image-b
|
|
|
9
9
|
export var INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY = '--editor-media-inline-image-border-color';
|
|
10
10
|
|
|
11
11
|
// We implemented such selectors to ensure specificity:
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Nested and dynamic css calls are violations, needs manual remediation
|
|
12
13
|
var inlineImageHeight = function inlineImageHeight(height) {
|
|
13
14
|
var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
14
15
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* Editor style */\n > .mediaInlineView-content-wrap > .", ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .", ",\n /* Renderer style */\n > .", ",\n > :is(a, span[data-mark-type='border']) .", " {\n height: ", "px;\n transform: translateY(", "px);\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, height, margin);
|
|
@@ -20,6 +21,7 @@ var inlineImageHeight = function inlineImageHeight(height) {
|
|
|
20
21
|
* shift in top and bottom and size adjustments to make up for lack of 1to1 size
|
|
21
22
|
* mapping
|
|
22
23
|
*/
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Nested and dynamic css calls are violations, needs manual remediation
|
|
23
25
|
export var mediaInlineImageStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n // p, h3, and action items\n .", " {\n height: ", "px;\n transform: translateY(-2px);\n }\n\n h1 {\n ", "\n }\n\n h2 {\n ", "\n }\n\n h3 {\n ", "\n }\n\n h4 {\n ", "\n }\n\n h5 {\n ", "\n }\n\n h6 {\n ", "\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, referenceHeights['p'], inlineImageHeight(referenceHeights['h1'], -3), inlineImageHeight(referenceHeights['h2'], -3), inlineImageHeight(referenceHeights['h3'], -2), inlineImageHeight(referenceHeights['h4'], -2), inlineImageHeight(referenceHeights['h5'], -2), inlineImageHeight(referenceHeights['h6'], -2));
|
|
24
26
|
export var wrapperStyle = css({
|
|
25
27
|
display: 'inline-flex',
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "78.11.
|
|
9
|
+
var packageVersion = "78.11.7";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -292,10 +292,6 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
|
|
|
292
292
|
}
|
|
293
293
|
var plugin = getPluginByName(prop);
|
|
294
294
|
if (!plugin) {
|
|
295
|
-
if (process.env.NODE_ENV === 'development') {
|
|
296
|
-
// eslint-disable-next-line
|
|
297
|
-
console.warn("Plugin: ".concat(prop, " does not exist"));
|
|
298
|
-
}
|
|
299
295
|
return undefined;
|
|
300
296
|
}
|
|
301
297
|
var sharedState = sharedStateAPI.createAPI(plugin);
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject
|
|
2
|
+
var _templateObject;
|
|
3
3
|
import { css, keyframes } from '@emotion/react';
|
|
4
|
-
var gapCursorBlink = keyframes(
|
|
4
|
+
var gapCursorBlink = keyframes({
|
|
5
|
+
'from, to': {
|
|
6
|
+
opacity: 0
|
|
7
|
+
},
|
|
8
|
+
'50%': {
|
|
9
|
+
opacity: 1
|
|
10
|
+
}
|
|
11
|
+
});
|
|
5
12
|
export var hideCaretModifier = 'ProseMirror-hide-gapcursor';
|
|
6
13
|
var gapCursor = '.ProseMirror-gapcursor';
|
|
7
14
|
var prosemirrorwidget = '.ProseMirror-widget';
|
|
8
15
|
var wrapLeft = '[layout="wrap-left"]';
|
|
9
16
|
var wrapRight = '[layout="wrap-right"]';
|
|
10
|
-
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- This needs manual remediation, it autofixes seemingly safely, but the code style and readability is destroyed.
|
|
19
|
+
export var gapCursorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: ", ";\n }\n &.-right span::after {\n right: ", ";\n }\n & span[layout='full-width'],\n & span[layout='wide'],\n & span[layout='fixed-width'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject
|
|
2
|
+
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
|
|
5
5
|
export var annotationPrefix = 'ak-editor-annotation';
|
|
@@ -12,10 +12,24 @@ var Y75a = 'rgba(255, 240, 179, 0.5)';
|
|
|
12
12
|
var Y200a = 'rgba(255, 196, 0, 0.82)';
|
|
13
13
|
export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
|
|
14
14
|
return {
|
|
15
|
-
focus: css(
|
|
16
|
-
|
|
15
|
+
focus: css({
|
|
16
|
+
// Background is not coming through in confluence, suspecting to be caused by some specific combination of
|
|
17
|
+
// emotion and token look up
|
|
18
|
+
background: "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"),
|
|
19
|
+
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(Y300, ")")),
|
|
20
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4147
|
|
21
|
+
boxShadow: "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A), ")"),
|
|
22
|
+
cursor: 'pointer'
|
|
23
|
+
}),
|
|
24
|
+
blur: css({
|
|
25
|
+
background: "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"),
|
|
26
|
+
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(Y200a, ")")),
|
|
27
|
+
cursor: 'pointer'
|
|
28
|
+
})
|
|
17
29
|
};
|
|
18
30
|
};
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
|
|
19
33
|
export var annotationSharedStyles = function annotationSharedStyles() {
|
|
20
|
-
return css(
|
|
34
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
|
|
21
35
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Perfectly safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing */
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
5
|
export var blockMarksSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks apart from those with indentation mark */\n *:not(.fabric-editor-block-mark) >\n div.fabric-editor-block-mark:first-of-type\n /* Do not remove the margin top for nodes inside indentation marks */\n :not(.fabric-editor-indentation-mark)\n /* Do not remove the margin top for nodes inside alignment marks */\n :not(.fabric-editor-alignment),\n // If first element inside a block node has alignment mark, then remove the margin-top\n .fabric-editor-alignment:first-of-type:first-child,\n // If first document element has indentation mark remove margin-top\n .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n }\n }\n"])));
|
|
@@ -1,5 +1,31 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
export var blockquoteSharedStyles = css(
|
|
3
|
+
export var blockquoteSharedStyles = css({
|
|
4
|
+
'& blockquote': {
|
|
5
|
+
boxSizing: 'border-box',
|
|
6
|
+
paddingLeft: "var(--ds-space-200, 16px)",
|
|
7
|
+
borderLeft: "2px solid ".concat("var(--ds-border, ".concat(akEditorBlockquoteBorderColor, ")")),
|
|
8
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
9
|
+
margin: "".concat(blockNodesVerticalMargin, " 0 0 0"),
|
|
10
|
+
marginRight: 0,
|
|
11
|
+
"[dir='rtl'] &": {
|
|
12
|
+
paddingLeft: 0,
|
|
13
|
+
paddingRight: "var(--ds-space-200, 16px)"
|
|
14
|
+
},
|
|
15
|
+
'&:first-child': {
|
|
16
|
+
marginTop: 0
|
|
17
|
+
},
|
|
18
|
+
'&::before': {
|
|
19
|
+
content: "''"
|
|
20
|
+
},
|
|
21
|
+
'&::after': {
|
|
22
|
+
content: 'none'
|
|
23
|
+
},
|
|
24
|
+
'& p': {
|
|
25
|
+
display: 'block'
|
|
26
|
+
},
|
|
27
|
+
'& table, & table:last-child': {
|
|
28
|
+
display: 'inline-table'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Should be safe to autofix, but ignoring for now */
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
5
|
import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
import { N20, N30, N400, N800 } from '@atlaskit/theme/colors';
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
5
|
import { getCodeStyles } from '@atlaskit/code/inline';
|
|
5
6
|
import { N30A } from '@atlaskit/theme/colors';
|
|
6
7
|
export var codeMarkSharedStyles = function codeMarkSharedStyles() {
|
|
7
|
-
return css(
|
|
8
|
+
return css({
|
|
9
|
+
'.code': _objectSpread({
|
|
10
|
+
'--ds--code--bg-color': "var(--ds-background-neutral, ".concat(N30A, ")")
|
|
11
|
+
}, getCodeStyles())
|
|
12
|
+
});
|
|
8
13
|
};
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
var _templateObject;
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import { css } from '@emotion/react';
|
|
4
3
|
import { gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
var columnLayoutSharedStyle = css(
|
|
4
|
+
var columnLayoutSharedStyle = css({
|
|
5
|
+
'[data-layout-section]': _defineProperty({
|
|
6
|
+
position: 'relative',
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
'& > *': {
|
|
10
|
+
flex: 1,
|
|
11
|
+
minWidth: 0
|
|
12
|
+
},
|
|
13
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
14
|
+
minWidth: 'initial'
|
|
15
|
+
}
|
|
16
|
+
}, "@media screen and (max-width: ".concat(gridMediumMaxWidth, "px)"), {
|
|
17
|
+
flexDirection: 'column'
|
|
18
|
+
})
|
|
19
|
+
});
|
|
6
20
|
export { columnLayoutSharedStyle };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
var _templateObject;
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import { css } from '@emotion/react';
|
|
4
3
|
export var DateSharedCssClassName = {
|
|
5
4
|
DATE_WRAPPER: "date-lozenger-container",
|
|
6
5
|
DATE_CONTAINER: 'dateView-content-wrap'
|
|
7
6
|
};
|
|
8
|
-
export var dateSharedStyle = css(
|
|
7
|
+
export var dateSharedStyle = css(_defineProperty({}, ".".concat(DateSharedCssClassName.DATE_WRAPPER, " span"), {
|
|
8
|
+
whiteSpace: 'unset'
|
|
9
|
+
}));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export var expandIconWrapperStyle = css({
|
|
3
|
+
marginLeft: "var(--ds-space-negative-100, -8px)"
|
|
4
|
+
});
|
|
6
5
|
var prefix = 'ak-editor-expand';
|
|
7
6
|
export var expandClassNames = {
|
|
8
7
|
prefix: prefix,
|