@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
|
@@ -15,7 +15,7 @@ import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/cons
|
|
|
15
15
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
|
-
var
|
|
18
|
+
var AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
19
19
|
var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
20
20
|
return fg('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
21
21
|
css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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
|
|
@@ -71,5 +71,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
|
|
|
71
71
|
|
|
72
72
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
73
73
|
export var layoutStyles = function layoutStyles(viewMode) {
|
|
74
|
-
return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\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
|
|
74
|
+
return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\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)", akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0), akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (fg('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('advanced_layouts', false) && 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)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
75
75
|
};
|
|
@@ -18,8 +18,9 @@ import React from 'react';
|
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
19
|
import { css, jsx } from '@emotion/react';
|
|
20
20
|
import Transition from 'react-transition-group/Transition';
|
|
21
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
21
|
+
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
22
22
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
23
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
23
24
|
import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
24
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
26
|
var ANIM_SPEED_MS = 500;
|
|
@@ -169,11 +170,16 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
169
170
|
}
|
|
170
171
|
}]);
|
|
171
172
|
}(React.PureComponent);
|
|
172
|
-
|
|
173
|
-
var
|
|
174
|
-
var _useSharedPluginState = useSharedPluginState(props.editorAPI, ['contextPanel']),
|
|
173
|
+
var useContextPanelSharedState = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
|
|
174
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['contextPanel']),
|
|
175
175
|
contextPanelState = _useSharedPluginState.contextPanelState;
|
|
176
|
-
|
|
176
|
+
return contextPanelState === null || contextPanelState === void 0 ? void 0 : contextPanelState.contents;
|
|
177
|
+
}, function (pluginInjectionApi) {
|
|
178
|
+
return useSharedPluginStateSelector(pluginInjectionApi, 'contextPanel.contents');
|
|
179
|
+
});
|
|
180
|
+
export function ContextPanel(props) {
|
|
181
|
+
var contextPanelContents = useContextPanelSharedState(props.editorAPI);
|
|
182
|
+
var firstContent = contextPanelContents && contextPanelContents.find(Boolean);
|
|
177
183
|
return (
|
|
178
184
|
// Ignored via go/ees005
|
|
179
185
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -17,7 +17,7 @@ import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-co
|
|
|
17
17
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
18
18
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
19
19
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
20
|
-
import { CodeBlockSharedCssClassName, GRID_GUTTER,
|
|
20
|
+
import { CodeBlockSharedCssClassName, GRID_GUTTER, SmartCardSharedCssClassName, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
21
21
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
22
22
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
23
23
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
@@ -33,14 +33,16 @@ import { codeBlockStyles } from '../ContentStyles/code-block';
|
|
|
33
33
|
import { dateStyles, dateVanillaStyles } from '../ContentStyles/date';
|
|
34
34
|
import { expandStyles } from '../ContentStyles/expand';
|
|
35
35
|
import { extensionStyles } from '../ContentStyles/extension';
|
|
36
|
-
import { mediaStyles } from '../ContentStyles/media';
|
|
37
36
|
import { panelStyles } from '../ContentStyles/panel';
|
|
38
37
|
import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
|
|
39
38
|
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
|
|
40
39
|
import { aiPanelBaseStyles, aiPanelDarkStyles } from './styles/ai-panel';
|
|
40
|
+
import { annotationStyles } from './styles/annotationStyles';
|
|
41
41
|
import { backgroundColorStyles } from './styles/backgroundColorStyles';
|
|
42
|
+
import { embedCardStyles } from './styles/embedCardStyles';
|
|
42
43
|
import { layoutBaseStyles, layoutViewStyles } from './styles/layout';
|
|
43
44
|
import { linkStyles, linkStylesOld } from './styles/link';
|
|
45
|
+
import { mediaStyles } from './styles/mediaStyles';
|
|
44
46
|
import { ruleStyles } from './styles/rule';
|
|
45
47
|
var vanillaMentionsStyles = css({
|
|
46
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -139,7 +141,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
139
141
|
|
|
140
142
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
141
143
|
var contentStyles = function contentStyles() {
|
|
142
|
-
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\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
|
|
144
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\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"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, whitespaceSharedStyles, paragraphSharedStyles(), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('editor_request_to_edit_task') ? null : css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\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"]))), fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\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, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\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)", placeholderTextStyles, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles, listsStyles, ruleStyles, mediaStyles, fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, gapCursorStyles, panelStyles(), mentionsStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
143
145
|
exposure: false
|
|
144
146
|
}) && vanillaMentionsStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
145
147
|
exposure: false
|
|
@@ -153,7 +155,7 @@ var contentStyles = function contentStyles() {
|
|
|
153
155
|
exposure: false
|
|
154
156
|
}) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
155
157
|
exposure: false
|
|
156
|
-
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null,
|
|
158
|
+
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationStyles, smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, pragmaticResizerStyles(), fixBlockControlStylesSSR(), !fg('platform-visual-refresh-icons') ? css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\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);
|
|
157
159
|
};
|
|
158
160
|
var CommentEditorMargin = 14;
|
|
159
161
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
3
|
+
|
|
4
|
+
import { AnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
6
|
+
export var annotationStyles = css({
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
8
|
+
'.ProseMirror': _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(AnnotationSharedClassNames.blur, ", .").concat(AnnotationSharedClassNames.focus, ", .").concat(AnnotationSharedClassNames.draft, ", .").concat(AnnotationSharedClassNames.hover), {
|
|
9
|
+
borderBottom: '2px solid transparent',
|
|
10
|
+
cursor: 'pointer',
|
|
11
|
+
padding: '1px 0 2px',
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
13
|
+
'&:has(.card), &:has([data-inline-card])': {
|
|
14
|
+
padding: '5px 0 3px 0'
|
|
15
|
+
},
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
17
|
+
'&:has(.date-lozenger-container)': {
|
|
18
|
+
paddingTop: "var(--ds-space-025, 2px)"
|
|
19
|
+
}
|
|
20
|
+
}), ".".concat(AnnotationSharedClassNames.focus), {
|
|
21
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
22
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
23
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
|
|
24
|
+
}), ".".concat(AnnotationSharedClassNames.draft), {
|
|
25
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
26
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
27
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)",
|
|
28
|
+
cursor: 'initial'
|
|
29
|
+
}), ".".concat(AnnotationSharedClassNames.blur), {
|
|
30
|
+
background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
|
|
31
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
|
|
32
|
+
}), ".".concat(AnnotationSharedClassNames.hover), {
|
|
33
|
+
background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
|
|
34
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
35
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
|
|
36
|
+
})
|
|
37
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
+
export var embedCardStyles = css({
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
|
+
'.ProseMirror': {
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
|
+
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
9
|
+
maxWidth: '100%',
|
|
10
|
+
position: 'relative',
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
12
|
+
zIndex: 2
|
|
13
|
+
},
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
15
|
+
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
16
|
+
float: 'left'
|
|
17
|
+
},
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
19
|
+
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
20
|
+
float: 'right'
|
|
21
|
+
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
23
|
+
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
24
|
+
clear: 'both'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
var _ProseMirror, _css;
|
|
3
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
4
|
+
|
|
5
|
+
import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
|
|
6
|
+
import { MediaSharedClassNames, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedBoxShadow, akEditorSelectedNodeClassName, akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
9
|
+
var wrappedMediaBreakoutPoint = 410;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Reference Heights
|
|
13
|
+
*
|
|
14
|
+
* These heights enforce consistent sizes with media inline nodes due to
|
|
15
|
+
* inconsistencies with center aligned inline nodes and text.
|
|
16
|
+
*
|
|
17
|
+
* There is conversation about refactoring media inline nodes to conform to
|
|
18
|
+
* aligning correctly with the surrounding text.
|
|
19
|
+
*
|
|
20
|
+
* These constants originally came from `headingSizes` from the `theme` package
|
|
21
|
+
* and have been copied here to remove this package.
|
|
22
|
+
*/
|
|
23
|
+
var referenceHeights = {
|
|
24
|
+
p: 24 - 2,
|
|
25
|
+
h1: 32 + 4,
|
|
26
|
+
h2: 28 + 3,
|
|
27
|
+
h3: 24 + 1,
|
|
28
|
+
h4: 20 + 3,
|
|
29
|
+
h5: 16 + 4,
|
|
30
|
+
h6: 16 + 2
|
|
31
|
+
};
|
|
32
|
+
var inlineImageSelector = "> .mediaInlineView-content-wrap > .".concat(INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > .").concat(INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > :is(a, span[data-mark-type='border']) .").concat(INLINE_IMAGE_WRAPPER_CLASS_NAME);
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles,@atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
35
|
+
export var mediaStyles = css((_css = {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'.ProseMirror': (_ProseMirror = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ProseMirror, "li .".concat(richMediaClassName), {
|
|
38
|
+
margin: 0
|
|
39
|
+
}), '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
40
|
+
content: "''",
|
|
41
|
+
display: 'block',
|
|
42
|
+
height: 0
|
|
43
|
+
}), '&.ua-firefox', {
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
|
+
'.mediaSingleView-content-wrap': {
|
|
46
|
+
userSelect: 'none'
|
|
47
|
+
},
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
|
+
'.captionView-content-wrap': {
|
|
50
|
+
userSelect: 'text'
|
|
51
|
+
}
|
|
52
|
+
}), ".mediaSingleView-content-wrap[layout^='wrap-']", {
|
|
53
|
+
position: 'relative',
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-imported-style-values
|
|
55
|
+
zIndex: akEditorWrappedNodeZIndex,
|
|
56
|
+
maxWidth: '100%',
|
|
57
|
+
/* overwrite default Prosemirror setting making it clear: both */
|
|
58
|
+
clear: 'inherit'
|
|
59
|
+
}), ".mediaSingleView-content-wrap[layout='center']", {
|
|
60
|
+
clear: 'both'
|
|
61
|
+
}), "table .".concat(richMediaClassName), {
|
|
62
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
63
|
+
marginBottom: "var(--ds-space-150, 12px)",
|
|
64
|
+
clear: 'both',
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
66
|
+
'&.image-wrap-left[data-layout], &.image-wrap-right[data-layout]': {
|
|
67
|
+
clear: 'none',
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
69
|
+
'&:first-child': {
|
|
70
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}), ".".concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left"), {
|
|
74
|
+
clear: 'both'
|
|
75
|
+
}), ".".concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-right, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-right"), {
|
|
76
|
+
marginRight: 0,
|
|
77
|
+
marginLeft: 0
|
|
78
|
+
}), "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
80
|
+
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
81
|
+
float: 'none',
|
|
82
|
+
overflow: 'auto',
|
|
83
|
+
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
84
|
+
}
|
|
85
|
+
}), "& [layout='full-width'] .".concat(richMediaClassName, ", & [layout='wide'] .").concat(richMediaClassName), {
|
|
86
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
87
|
+
marginLeft: '50%',
|
|
88
|
+
transform: 'translateX(-50%)'
|
|
89
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ProseMirror, ".media-extended-resize-experience[layout^='wrap-']", {
|
|
90
|
+
// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle
|
|
91
|
+
// to prevent scroll bar
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
93
|
+
overflow: 'visible !important'
|
|
94
|
+
}), "& [layout^='wrap-'] + [layout^='wrap-']", _defineProperty({
|
|
95
|
+
clear: 'none',
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
97
|
+
"& + p, & + div[class^='fabric-editor-align'], & + ul, & + ol, & + h1, & + h2, & + h3, & + h4, & + h5, & + h6": {
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
99
|
+
clear: 'both !important'
|
|
100
|
+
}
|
|
101
|
+
}, "& .".concat(richMediaClassName), {
|
|
102
|
+
marginLeft: 0,
|
|
103
|
+
marginRight: 0
|
|
104
|
+
})), ".".concat(INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
106
|
+
height: referenceHeights['p'],
|
|
107
|
+
transform: 'translateY(-2px)'
|
|
108
|
+
}), "h1", _defineProperty({}, inlineImageSelector, {
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
110
|
+
height: referenceHeights.h1,
|
|
111
|
+
transform: "translateY(-3px)"
|
|
112
|
+
})), "h2", _defineProperty({}, inlineImageSelector, {
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
114
|
+
height: referenceHeights.h2,
|
|
115
|
+
transform: "translateY(-3px)"
|
|
116
|
+
})), "h3", _defineProperty({}, inlineImageSelector, {
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
118
|
+
height: referenceHeights.h3,
|
|
119
|
+
transform: "translateY(-2px)"
|
|
120
|
+
})), "h4", _defineProperty({}, inlineImageSelector, {
|
|
121
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
122
|
+
height: referenceHeights.h4,
|
|
123
|
+
transform: "translateY(-2px)"
|
|
124
|
+
})), "h5", _defineProperty({}, inlineImageSelector, {
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
126
|
+
height: referenceHeights.h5,
|
|
127
|
+
transform: "translateY(-2px)"
|
|
128
|
+
})), "h6", _defineProperty({}, inlineImageSelector, {
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
130
|
+
height: referenceHeights.h6,
|
|
131
|
+
transform: "translateY(-2px)"
|
|
132
|
+
})), ".mediaSingleView-content-wrap[layout='wrap-left']", {
|
|
133
|
+
float: 'left'
|
|
134
|
+
}), _defineProperty(_defineProperty(_defineProperty(_ProseMirror, ".mediaSingleView-content-wrap[layout='wrap-right']", {
|
|
135
|
+
float: 'right'
|
|
136
|
+
}), ".mediaSingleView-content-wrap[layout='wrap-right'] + .mediaSingleView-content-wrap[layout='wrap-left']", {
|
|
137
|
+
clear: 'both'
|
|
138
|
+
}), '& > .mediaSingleView-content-wrap', {
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
140
|
+
'.richMedia-resize-handle-right': {
|
|
141
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
142
|
+
marginRight: "-".concat(akEditorMediaResizeHandlerPaddingWide, "px")
|
|
143
|
+
},
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
145
|
+
'.richMedia-resize-handle-left': {
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
147
|
+
marginLeft: "-".concat(akEditorMediaResizeHandlerPaddingWide, "px")
|
|
148
|
+
}
|
|
149
|
+
}))
|
|
150
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css, ".".concat(MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT), {
|
|
151
|
+
padding: 0
|
|
152
|
+
}), '.richMedia-resize-handle-right, .richMedia-resize-handle-left', {
|
|
153
|
+
display: 'flex',
|
|
154
|
+
flexDirection: 'column',
|
|
155
|
+
/* vertical align */
|
|
156
|
+
justifyContent: 'center'
|
|
157
|
+
}), '.richMedia-resize-handle-right', {
|
|
158
|
+
alignItems: 'flex-end',
|
|
159
|
+
paddingRight: "var(--ds-space-150, 12px)",
|
|
160
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
161
|
+
marginRight: "-".concat(akEditorMediaResizeHandlerPadding, "px")
|
|
162
|
+
}), '.richMedia-resize-handle-left', {
|
|
163
|
+
alignItems: 'flex-start',
|
|
164
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
166
|
+
marginLeft: "-".concat(akEditorMediaResizeHandlerPadding, "px")
|
|
167
|
+
}), '.richMedia-resize-handle-right::after, .richMedia-resize-handle-left::after', {
|
|
168
|
+
content: "' '",
|
|
169
|
+
display: 'flex',
|
|
170
|
+
width: 3,
|
|
171
|
+
height: 64,
|
|
172
|
+
borderRadius: 6
|
|
173
|
+
}), ".".concat(richMediaClassName, ":hover .richMedia-resize-handle-left::after, .").concat(richMediaClassName, ":hover .richMedia-resize-handle-right::after"), {
|
|
174
|
+
background: "var(--ds-border, #091E4224)"
|
|
175
|
+
}), ".".concat(akEditorSelectedNodeClassName, " .richMedia-resize-handle-right::after, .").concat(akEditorSelectedNodeClassName, " .richMedia-resize-handle-left::after, .").concat(richMediaClassName, " .richMedia-resize-handle-right:hover::after, .").concat(richMediaClassName, " .richMedia-resize-handle-left:hover::after, .").concat(richMediaClassName, ".is-resizing .richMedia-resize-handle-right::after, .").concat(richMediaClassName, ".is-resizing .richMedia-resize-handle-left::after"), {
|
|
176
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
177
|
+
}), '.__resizable_base__', {
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
179
|
+
left: 'unset !important',
|
|
180
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
181
|
+
width: 'auto !important',
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
183
|
+
height: 'auto !important'
|
|
184
|
+
}), '.danger > div > div > .media-card-frame, .danger > span > a', {
|
|
185
|
+
backgroundColor: "var(--ds-background-danger, #FFECEB)",
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
187
|
+
boxShadow: "0px 0px 0px ".concat(akEditorSelectedBorderBoldSize, "px, ", "var(--ds-border-danger, #E2483D)"),
|
|
188
|
+
transition: 'background-color 0s, box-shadow 0s'
|
|
189
|
+
}), '.danger', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(richMediaClassName, " .").concat(fileCardImageViewSelector, "::after"), {
|
|
190
|
+
border: "1px solid ".concat("var(--ds-border-danger, #E2483D)")
|
|
191
|
+
}), ".".concat(richMediaClassName, " .").concat(inlinePlayerClassName, "::after"), {
|
|
192
|
+
border: "1px solid ".concat("var(--ds-border-danger, #E2483D)")
|
|
193
|
+
}), ".".concat(richMediaClassName, " .").concat(newFileExperienceClassName), {
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
195
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)", " !important")
|
|
196
|
+
}), '.richMedia-resize-handle-right::after, .richMedia-resize-handle-left::after', {
|
|
197
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
198
|
+
background: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
199
|
+
}), '.resizer-handle-thumb', {
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
201
|
+
background: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
202
|
+
}), 'div div .media-card-frame, .inlineCardView-content-wrap > span > a', {
|
|
203
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)",
|
|
204
|
+
transition: "background-color 0s"
|
|
205
|
+
}), 'div div .media-card-frame::after', {
|
|
206
|
+
boxShadow: 'none'
|
|
207
|
+
})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_css, '.warning', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(richMediaClassName, " .").concat(fileCardImageViewSelector, "::after"), {
|
|
208
|
+
border: "1px solid ".concat("var(--ds-border-warning, #E56910)")
|
|
209
|
+
}), ".".concat(richMediaClassName, " .").concat(inlinePlayerClassName, "::after"), {
|
|
210
|
+
border: "1px solid ".concat("var(--ds-border-warning, #E56910)")
|
|
211
|
+
}), ".".concat(richMediaClassName, " .").concat(newFileExperienceClassName), {
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
213
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-warning, #E56910)", " !important")
|
|
214
|
+
}), '.resizer-handle-thumb', {
|
|
215
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
216
|
+
background: "var(--ds-icon-warning, #E56910)".concat(" !important")
|
|
217
|
+
})), '.media-filmstrip-list-item', {
|
|
218
|
+
cursor: 'pointer'
|
|
219
|
+
}), ".mediaGroupView-content-wrap.".concat(akEditorSelectedNodeClassName, " #newFileExperienceWrapper"), {
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
221
|
+
boxShadow: akEditorSelectedBoxShadow
|
|
222
|
+
}), '.ak-editor-no-interaction #newFileExperienceWrapper', {
|
|
223
|
+
boxShadow: 'none'
|
|
224
|
+
})));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "207.
|
|
2
|
+
export var version = "207.4.0";
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
|
|
4
|
-
import type { EditorAppearance, FeatureFlags,
|
|
4
|
+
import type { EditorAppearance, FeatureFlags, PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { BasePluginOptions } from '@atlaskit/editor-plugins/base';
|
|
6
6
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
7
|
-
import type {
|
|
7
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
8
|
+
import { type HyperlinkPluginOptions } from '@atlaskit/editor-plugins/hyperlink';
|
|
8
9
|
import type { PastePluginOptions } from '@atlaskit/editor-plugins/paste';
|
|
9
10
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugins/placeholder';
|
|
11
|
+
import type { QuickInsertPluginOptions } from '@atlaskit/editor-plugins/quick-insert';
|
|
12
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
10
13
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugins/type-ahead';
|
|
11
14
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
15
|
import type { DefaultPresetBuilder } from './default-preset-type';
|
|
@@ -15,10 +18,10 @@ export type DefaultPresetPluginOptions = {
|
|
|
15
18
|
base?: BasePluginOptions;
|
|
16
19
|
blockType?: BlockTypePluginOptions;
|
|
17
20
|
placeholder?: PlaceholderPluginOptions;
|
|
18
|
-
textFormatting?:
|
|
21
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
19
22
|
submitEditor?: (editorView: EditorView) => void;
|
|
20
23
|
quickInsert?: QuickInsertPluginOptions;
|
|
21
|
-
codeBlock?:
|
|
24
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
22
25
|
selection?: SelectionPluginOptions;
|
|
23
26
|
hyperlinkOptions?: HyperlinkPluginOptions;
|
|
24
27
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
@@ -44,6 +47,13 @@ export type DefaultPresetPluginOptions = {
|
|
|
44
47
|
/**
|
|
45
48
|
* Note: The order that presets are added determines
|
|
46
49
|
* their placement in the editor toolbar
|
|
50
|
+
* @param options
|
|
51
|
+
* @example
|
|
47
52
|
*/
|
|
48
53
|
export declare function createDefaultPreset(options: DefaultPresetPluginOptions): DefaultPresetBuilder;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param props
|
|
57
|
+
* @example
|
|
58
|
+
*/
|
|
49
59
|
export declare function useDefaultPreset(props: DefaultPresetPluginOptions): DefaultPresetBuilder[];
|
|
@@ -6,21 +6,22 @@ import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-report
|
|
|
6
6
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { AllEditorPresetPluginTypes, AllPluginNames, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
-
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions,
|
|
9
|
+
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions, Transformer } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
11
11
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
12
12
|
import type { AnnotationProviders } from '@atlaskit/editor-plugins/annotation';
|
|
13
13
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
14
|
-
import type {
|
|
14
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
15
15
|
import type { DatePluginOptions } from '@atlaskit/editor-plugins/date';
|
|
16
16
|
import type { FindReplaceOptions } from '@atlaskit/editor-plugins/find-replace';
|
|
17
17
|
import type { LayoutPluginOptions } from '@atlaskit/editor-plugins/layout';
|
|
18
|
-
import type {
|
|
18
|
+
import type { MediaPluginOptions, MediaState } from '@atlaskit/editor-plugins/media/types';
|
|
19
19
|
import type { MentionPluginConfig } from '@atlaskit/editor-plugins/mentions';
|
|
20
20
|
import type { PanelPluginConfig } from '@atlaskit/editor-plugins/panel';
|
|
21
|
-
import type {
|
|
21
|
+
import type { PlaceholderTextPluginOptions } from '@atlaskit/editor-plugins/placeholder-text';
|
|
22
22
|
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugins/table/types';
|
|
23
23
|
import type { TextColorPluginConfig } from '@atlaskit/editor-plugins/text-color';
|
|
24
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
24
25
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
25
26
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
26
27
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
@@ -160,7 +161,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
160
161
|
* Example:
|
|
161
162
|
* ```ts
|
|
162
163
|
* // In preset creation you can pass the props passed to the editor like this:
|
|
163
|
-
* preset.add([mediaPlugin,
|
|
164
|
+
* preset.add([mediaPlugin, MediaPluginOptions])
|
|
164
165
|
* ```
|
|
165
166
|
*
|
|
166
167
|
* Note: Props you pass to the media plugin via the preset do not re-render like in React.
|
|
@@ -173,7 +174,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
173
174
|
* editorApi?.media.actions.setProvider(mediaProvider);
|
|
174
175
|
* ```
|
|
175
176
|
*/
|
|
176
|
-
media?:
|
|
177
|
+
media?: MediaPluginOptions;
|
|
177
178
|
assistiveDescribedBy?: string;
|
|
178
179
|
emojiProvider?: Providers['emojiProvider'];
|
|
179
180
|
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
@@ -207,7 +208,7 @@ export interface EditorPluginFeatureProps {
|
|
|
207
208
|
allowPanel?: boolean | PanelPluginConfig;
|
|
208
209
|
allowExtension?: boolean | ExtensionConfig;
|
|
209
210
|
allowConfluenceInlineComment?: boolean;
|
|
210
|
-
allowTemplatePlaceholders?: boolean |
|
|
211
|
+
allowTemplatePlaceholders?: boolean | PlaceholderTextPluginOptions;
|
|
211
212
|
allowDate?: boolean | DatePluginOptions;
|
|
212
213
|
allowLayouts?: boolean | LayoutPluginOptions;
|
|
213
214
|
allowStatus?: boolean | {
|
|
@@ -259,14 +260,14 @@ export interface EditorPluginFeatureProps {
|
|
|
259
260
|
/** @deprecated Use linking.smartLinks prop instead. */
|
|
260
261
|
smartLinks?: CardOptions;
|
|
261
262
|
allowAnalyticsGASV3?: boolean;
|
|
262
|
-
codeBlock?:
|
|
263
|
-
textFormatting?:
|
|
263
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
264
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
264
265
|
placeholder?: string;
|
|
265
266
|
placeholderBracketHint?: string;
|
|
266
267
|
/**
|
|
267
268
|
* Configure and extend editor linking behaviour
|
|
268
269
|
*/
|
|
269
270
|
linking?: LinkingOptions;
|
|
270
|
-
media?:
|
|
271
|
+
media?: MediaPluginOptions;
|
|
271
272
|
}
|
|
272
273
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
|
-
import {
|
|
4
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
5
5
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
6
6
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
|
|
7
7
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
2
2
|
import type { ComponentProps } from './FullPage';
|
|
3
|
-
export declare const getEditorViewMode: (editorViewModeState: EditorViewModePluginState | undefined | null, preset: ComponentProps['preset']) => ViewMode;
|
|
3
|
+
export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, 'mode'> | undefined | null, preset: ComponentProps['preset']) => ViewMode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const annotationStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mediaStyles: import("@emotion/react").SerializedStyles;
|