@atlaskit/editor-core 207.2.1 → 207.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 +33 -0
- package/dist/cjs/presets/default.js +8 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +27 -11
- package/dist/cjs/ui/Appearance/Comment/Comment.js +25 -5
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +26 -4
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/layout.js +2 -2
- package/dist/cjs/ui/ContextPanel/index.js +10 -4
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +5 -3
- package/dist/cjs/ui/EditorContentContainer/styles/annotationStyles.js +45 -0
- package/dist/cjs/ui/EditorContentContainer/styles/embedCardStyles.js +34 -0
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +230 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +8 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +28 -10
- package/dist/es2019/ui/Appearance/Comment/Comment.js +24 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +24 -2
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/layout.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +11 -5
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +8 -7
- package/dist/es2019/ui/EditorContentContainer/styles/annotationStyles.js +47 -0
- package/dist/es2019/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +357 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +8 -0
- package/dist/esm/ui/Appearance/Chromeless.js +28 -12
- package/dist/esm/ui/Appearance/Comment/Comment.js +26 -6
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +27 -5
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/layout.js +2 -2
- package/dist/esm/ui/ContextPanel/index.js +11 -5
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +6 -4
- package/dist/esm/ui/EditorContentContainer/styles/annotationStyles.js +37 -0
- package/dist/esm/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +224 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/presets/default.d.ts +14 -4
- package/dist/types/types/editor-props.d.ts +11 -10
- package/dist/types/ui/Appearance/Chromeless.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
- package/dist/types/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/dist/types-ts4.5/presets/default.d.ts +14 -4
- package/dist/types-ts4.5/types/editor-props.d.ts +11 -10
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +0 -4
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 207.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#158380](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158380)
|
|
8
|
+
[`6f655038684d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6f655038684d2) -
|
|
9
|
+
[https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor media CSS in
|
|
10
|
+
static emotion
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 207.3.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#157548](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157548)
|
|
21
|
+
[`586b29cfecfb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/586b29cfecfb2) -
|
|
22
|
+
refactor: editor-core appearances to useSharedPluginStateSelector
|
|
23
|
+
- [#159163](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159163)
|
|
24
|
+
[`aa05b5f45ce2a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aa05b5f45ce2a) -
|
|
25
|
+
[https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor annotation CSS
|
|
26
|
+
in static emotion
|
|
27
|
+
- [#159754](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159754)
|
|
28
|
+
[`4906474d30373`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4906474d30373) -
|
|
29
|
+
[https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor embed card CSS
|
|
30
|
+
in static emotion
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
|
|
3
36
|
## 207.2.1
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -47,6 +47,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
47
47
|
/**
|
|
48
48
|
* Note: The order that presets are added determines
|
|
49
49
|
* their placement in the editor toolbar
|
|
50
|
+
* @param options
|
|
51
|
+
* @example
|
|
50
52
|
*/
|
|
51
53
|
function createDefaultPreset(options) {
|
|
52
54
|
var _options$featureFlags, _options$featureFlags2;
|
|
@@ -73,6 +75,12 @@ function createDefaultPreset(options) {
|
|
|
73
75
|
})]).add([_codeBlock.codeBlockPlugin, options.codeBlock]);
|
|
74
76
|
return preset;
|
|
75
77
|
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param props
|
|
82
|
+
* @example
|
|
83
|
+
*/
|
|
76
84
|
function useDefaultPreset(props) {
|
|
77
85
|
var preset = createDefaultPreset(props);
|
|
78
86
|
return [preset];
|
|
@@ -15,6 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
18
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
18
19
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
19
20
|
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
20
21
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -60,6 +61,13 @@ var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(fun
|
|
|
60
61
|
exposure: true
|
|
61
62
|
});
|
|
62
63
|
}, _EditorContentContainer.default, ContentArea);
|
|
64
|
+
var useEditorViewModePluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
|
|
65
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['editorViewMode']),
|
|
66
|
+
editorViewModeState = _useSharedPluginState.editorViewModeState;
|
|
67
|
+
return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
68
|
+
}, function (pluginInjectionApi) {
|
|
69
|
+
return (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'editorViewMode.mode');
|
|
70
|
+
});
|
|
63
71
|
|
|
64
72
|
/**
|
|
65
73
|
* Render the editor in a chromeless appearance.
|
|
@@ -98,8 +106,7 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
98
106
|
pluginHooks = _this$props.pluginHooks,
|
|
99
107
|
featureFlags = _this$props.featureFlags;
|
|
100
108
|
var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
101
|
-
var
|
|
102
|
-
editorViewModeState = _useSharedPluginState.editorViewModeState;
|
|
109
|
+
var editorViewMode = useEditorViewModePluginState(_this.props.editorAPI);
|
|
103
110
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
104
111
|
animate: maxContentSizeReached
|
|
105
112
|
}, (0, _react2.jsx)("div", {
|
|
@@ -123,7 +130,7 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
123
130
|
, {
|
|
124
131
|
className: "ak-editor-content-area",
|
|
125
132
|
featureFlags: featureFlags,
|
|
126
|
-
viewMode:
|
|
133
|
+
viewMode: editorViewMode,
|
|
127
134
|
appearance: _this.appearance
|
|
128
135
|
}, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, (0, _react2.jsx)(_PluginSlot.default, {
|
|
129
136
|
editorView: editorView,
|
|
@@ -147,12 +154,7 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
147
154
|
(0, _inherits2.default)(Editor, _React$Component);
|
|
148
155
|
return (0, _createClass2.default)(Editor, [{
|
|
149
156
|
key: "render",
|
|
150
|
-
value:
|
|
151
|
-
/**
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
*/
|
|
155
|
-
function render() {
|
|
157
|
+
value: function render() {
|
|
156
158
|
return (0, _react2.jsx)(RenderWithPluginState, {
|
|
157
159
|
editorAPI: this.props.editorAPI,
|
|
158
160
|
renderChrome: this.renderChrome
|
|
@@ -161,11 +163,25 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
161
163
|
}]);
|
|
162
164
|
}(_react.default.Component);
|
|
163
165
|
(0, _defineProperty2.default)(Editor, "displayName", 'ChromelessEditorAppearance');
|
|
166
|
+
var useMaxContentSizePluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
|
|
167
|
+
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['maxContentSize']),
|
|
168
|
+
maxContentSizeState = _useSharedPluginState2.maxContentSizeState;
|
|
169
|
+
return {
|
|
170
|
+
maxContentSizeState: maxContentSizeState
|
|
171
|
+
};
|
|
172
|
+
}, function (pluginInjectionApi) {
|
|
173
|
+
var maxContentSizeReached = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'maxContentSize.maxContentSizeReached');
|
|
174
|
+
return {
|
|
175
|
+
maxContentSizeState: maxContentSizeReached === undefined ? undefined : {
|
|
176
|
+
maxContentSizeReached: maxContentSizeReached
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
});
|
|
164
180
|
function RenderWithPluginState(_ref3) {
|
|
165
181
|
var renderChrome = _ref3.renderChrome,
|
|
166
182
|
editorAPI = _ref3.editorAPI;
|
|
167
|
-
var
|
|
168
|
-
maxContentSizeState =
|
|
183
|
+
var _useMaxContentSizePlu = useMaxContentSizePluginState(editorAPI),
|
|
184
|
+
maxContentSizeState = _useMaxContentSizePlu.maxContentSizeState;
|
|
169
185
|
return (0, _react2.jsx)(_react.Fragment, null, renderChrome({
|
|
170
186
|
maxContentSize: maxContentSizeState
|
|
171
187
|
}));
|
|
@@ -18,6 +18,7 @@ var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages
|
|
|
18
18
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
19
19
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
20
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
21
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
21
22
|
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
22
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
23
24
|
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
@@ -94,13 +95,32 @@ var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(fun
|
|
|
94
95
|
exposure: true
|
|
95
96
|
});
|
|
96
97
|
}, _EditorContentContainer.default, ContentArea);
|
|
98
|
+
var useCommentEditorPluginsStates = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
|
|
99
|
+
return (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['maxContentSize', 'primaryToolbar', 'editorViewMode']);
|
|
100
|
+
}, function (pluginInjectionApi) {
|
|
101
|
+
var maxContentSizeReached = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'maxContentSize.maxContentSizeReached');
|
|
102
|
+
var primaryToolbarComponents = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'primaryToolbar.components');
|
|
103
|
+
var editorViewMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'editorViewMode.mode');
|
|
104
|
+
return {
|
|
105
|
+
maxContentSizeState: maxContentSizeReached === undefined ? undefined : {
|
|
106
|
+
maxContentSizeReached: maxContentSizeReached
|
|
107
|
+
},
|
|
108
|
+
primaryToolbarState: !primaryToolbarComponents ? undefined : {
|
|
109
|
+
components: primaryToolbarComponents
|
|
110
|
+
},
|
|
111
|
+
editorViewModeState: !editorViewMode ? undefined : {
|
|
112
|
+
mode: editorViewMode
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
});
|
|
97
116
|
var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
98
117
|
var editorAPI = props.editorAPI;
|
|
99
|
-
var
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
118
|
+
var _useCommentEditorPlug = useCommentEditorPluginsStates(editorAPI),
|
|
119
|
+
maxContentSizeState = _useCommentEditorPlug.maxContentSizeState,
|
|
120
|
+
primaryToolbarState = _useCommentEditorPlug.primaryToolbarState,
|
|
121
|
+
editorViewModeState = _useCommentEditorPlug.editorViewModeState;
|
|
122
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['media']),
|
|
123
|
+
mediaState = _useSharedPluginState.mediaState;
|
|
104
124
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
105
125
|
var editorDOMElement = props.editorDOMElement,
|
|
106
126
|
editorView = props.editorView,
|
|
@@ -66,6 +66,28 @@ var hasCustomComponents = function hasCustomComponents(components) {
|
|
|
66
66
|
}
|
|
67
67
|
return true;
|
|
68
68
|
};
|
|
69
|
+
var useFullPageEditorPluginsStates = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
|
|
70
|
+
return (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['editorViewMode', 'primaryToolbar', 'interaction']);
|
|
71
|
+
}, function (pluginInjectionApi) {
|
|
72
|
+
var primaryToolbarComponents = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'primaryToolbar.components');
|
|
73
|
+
var editorViewMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'editorViewMode.mode');
|
|
74
|
+
var showTopToolbar = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'editorViewMode._showTopToolbar');
|
|
75
|
+
var hasHadInteraction = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'interaction.hasHadInteraction');
|
|
76
|
+
var interactionState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'interaction.interactionState');
|
|
77
|
+
return {
|
|
78
|
+
primaryToolbarState: !primaryToolbarComponents ? undefined : {
|
|
79
|
+
components: primaryToolbarComponents
|
|
80
|
+
},
|
|
81
|
+
editorViewModeState: !editorViewMode ? undefined : {
|
|
82
|
+
mode: editorViewMode,
|
|
83
|
+
_showTopToolbar: showTopToolbar
|
|
84
|
+
},
|
|
85
|
+
interactionState: hasHadInteraction === undefined || interactionState === undefined ? undefined : {
|
|
86
|
+
hasHadInteraction: hasHadInteraction,
|
|
87
|
+
interactionState: interactionState
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
});
|
|
69
91
|
var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
70
92
|
var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
|
|
71
93
|
var wrapperElementRef = (0, _react.useMemo)(function () {
|
|
@@ -74,10 +96,10 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
74
96
|
var scrollContentContainerRef = (0, _react.useRef)(null);
|
|
75
97
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
76
98
|
var editorAPI = props.editorAPI;
|
|
77
|
-
var
|
|
78
|
-
editorViewModeState =
|
|
79
|
-
primaryToolbarState =
|
|
80
|
-
interactionState =
|
|
99
|
+
var _useFullPageEditorPlu = useFullPageEditorPluginsStates(editorAPI),
|
|
100
|
+
editorViewModeState = _useFullPageEditorPlu.editorViewModeState,
|
|
101
|
+
primaryToolbarState = _useFullPageEditorPlu.primaryToolbarState,
|
|
102
|
+
interactionState = _useFullPageEditorPlu.interactionState;
|
|
81
103
|
var viewMode = (0, _getEditorViewModeSync.getEditorViewMode)(editorViewModeState, props.preset);
|
|
82
104
|
var hasHadInteraction = (0, _platformFeatureFlags.fg)('platform_editor_interaction_api_refactor') ? (interactionState === null || interactionState === void 0 ? void 0 : interactionState.interactionState) !== 'hasNotHadInteraction' : Boolean(interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction);
|
|
83
105
|
var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
@@ -21,7 +21,7 @@ var SWOOP_ANIMATION = "0.5s ".concat(_editorSharedStyles.akEditorSwoopCubicBezie
|
|
|
21
21
|
var getTotalPadding = function getTotalPadding() {
|
|
22
22
|
return (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2;
|
|
23
23
|
};
|
|
24
|
-
var
|
|
24
|
+
var AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
25
25
|
|
|
26
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
27
27
|
var fullPageEditorWrapper = exports.fullPageEditorWrapper = (0, _react.css)({
|
|
@@ -127,7 +127,7 @@ var editorContentAreaContainerStyle = function editorContentAreaContainerStyle()
|
|
|
127
127
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
128
128
|
'[data-layout-section]': {
|
|
129
129
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
130
|
-
maxWidth: "calc(100% + ".concat((_editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ?
|
|
130
|
+
maxWidth: "calc(100% + ".concat((_editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)) * 2, "px)")
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
});
|
|
@@ -21,7 +21,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
21
21
|
* If you are making updates to this file, please updates in new location as well.
|
|
22
22
|
*/
|
|
23
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
24
|
-
var
|
|
24
|
+
var AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
25
25
|
var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
26
26
|
return (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
27
27
|
(0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
@@ -77,5 +77,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
|
|
|
77
77
|
|
|
78
78
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
79
79
|
var layoutStyles = exports.layoutStyles = function layoutStyles(viewMode) {
|
|
80
|
-
return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px
|
|
80
|
+
return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px\n\t\t\t\t0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('advanced_layouts', false) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
81
81
|
};
|
|
@@ -18,6 +18,7 @@ var _react2 = require("@emotion/react");
|
|
|
18
18
|
var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
|
|
19
19
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
20
20
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
21
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
21
22
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
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; }
|
|
@@ -174,11 +175,16 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
174
175
|
}
|
|
175
176
|
}]);
|
|
176
177
|
}(_react.default.PureComponent);
|
|
177
|
-
function
|
|
178
|
-
var
|
|
179
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(props.editorAPI, ['contextPanel']),
|
|
178
|
+
var useContextPanelSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
|
|
179
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['contextPanel']),
|
|
180
180
|
contextPanelState = _useSharedPluginState.contextPanelState;
|
|
181
|
-
|
|
181
|
+
return contextPanelState === null || contextPanelState === void 0 ? void 0 : contextPanelState.contents;
|
|
182
|
+
}, function (pluginInjectionApi) {
|
|
183
|
+
return (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'contextPanel.contents');
|
|
184
|
+
});
|
|
185
|
+
function ContextPanel(props) {
|
|
186
|
+
var contextPanelContents = useContextPanelSharedState(props.editorAPI);
|
|
187
|
+
var firstContent = contextPanelContents && contextPanelContents.find(Boolean);
|
|
182
188
|
return (
|
|
183
189
|
// Ignored via go/ees005
|
|
184
190
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -30,14 +30,16 @@ var _codeBlock = require("../ContentStyles/code-block");
|
|
|
30
30
|
var _date = require("../ContentStyles/date");
|
|
31
31
|
var _expand = require("../ContentStyles/expand");
|
|
32
32
|
var _extension = require("../ContentStyles/extension");
|
|
33
|
-
var _media = require("../ContentStyles/media");
|
|
34
33
|
var _panel2 = require("../ContentStyles/panel");
|
|
35
34
|
var _status = require("../ContentStyles/status");
|
|
36
35
|
var _tasksAndDecisions = require("../ContentStyles/tasks-and-decisions");
|
|
37
36
|
var _aiPanel = require("./styles/ai-panel");
|
|
37
|
+
var _annotationStyles = require("./styles/annotationStyles");
|
|
38
38
|
var _backgroundColorStyles = require("./styles/backgroundColorStyles");
|
|
39
|
+
var _embedCardStyles = require("./styles/embedCardStyles");
|
|
39
40
|
var _layout = require("./styles/layout");
|
|
40
41
|
var _link = require("./styles/link");
|
|
42
|
+
var _mediaStyles = require("./styles/mediaStyles");
|
|
41
43
|
var _rule = require("./styles/rule");
|
|
42
44
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
43
45
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
@@ -145,7 +147,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
145
147
|
|
|
146
148
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
147
149
|
var contentStyles = function contentStyles() {
|
|
148
|
-
return (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar
|
|
150
|
+
return (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, _backgroundColorStyles.backgroundColorStyles, listsStyles, _rule.ruleStyles, _mediaStyles.mediaStyles, (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
149
151
|
exposure: false
|
|
150
152
|
}) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
151
153
|
exposure: false
|
|
@@ -159,7 +161,7 @@ var contentStyles = function contentStyles() {
|
|
|
159
161
|
exposure: false
|
|
160
162
|
}) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
161
163
|
exposure: false
|
|
162
|
-
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null,
|
|
164
|
+
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, _annotationStyles.annotationStyles, (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, _embedCardStyles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), fixBlockControlStylesSSR(), !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
|
|
163
165
|
};
|
|
164
166
|
var CommentEditorMargin = 14;
|
|
165
167
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.annotationStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
14
|
+
var annotationStyles = exports.annotationStyles = (0, _react.css)({
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
16
|
+
'.ProseMirror': (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_styles.AnnotationSharedClassNames.blur, ", .").concat(_styles.AnnotationSharedClassNames.focus, ", .").concat(_styles.AnnotationSharedClassNames.draft, ", .").concat(_styles.AnnotationSharedClassNames.hover), {
|
|
17
|
+
borderBottom: '2px solid transparent',
|
|
18
|
+
cursor: 'pointer',
|
|
19
|
+
padding: '1px 0 2px',
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
21
|
+
'&:has(.card), &:has([data-inline-card])': {
|
|
22
|
+
padding: '5px 0 3px 0'
|
|
23
|
+
},
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
25
|
+
'&:has(.date-lozenger-container)': {
|
|
26
|
+
paddingTop: "var(--ds-space-025, 2px)"
|
|
27
|
+
}
|
|
28
|
+
}), ".".concat(_styles.AnnotationSharedClassNames.focus), {
|
|
29
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
30
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
31
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
|
|
32
|
+
}), ".".concat(_styles.AnnotationSharedClassNames.draft), {
|
|
33
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
34
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
35
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)",
|
|
36
|
+
cursor: 'initial'
|
|
37
|
+
}), ".".concat(_styles.AnnotationSharedClassNames.blur), {
|
|
38
|
+
background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
|
|
39
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
|
|
40
|
+
}), ".".concat(_styles.AnnotationSharedClassNames.hover), {
|
|
41
|
+
background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
|
|
42
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
43
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
|
|
44
|
+
})
|
|
45
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.embedCardStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
|
+
var embedCardStyles = exports.embedCardStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
+
'.ProseMirror': {
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
15
|
+
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
16
|
+
maxWidth: '100%',
|
|
17
|
+
position: 'relative',
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
19
|
+
zIndex: 2
|
|
20
|
+
},
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
|
+
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
23
|
+
float: 'left'
|
|
24
|
+
},
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
26
|
+
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
27
|
+
float: 'right'
|
|
28
|
+
},
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
30
|
+
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
31
|
+
clear: 'both'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|