@atlaskit/editor-core 210.0.4 → 210.1.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 +20 -0
- package/dist/cjs/presets/default.js +1 -1
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/styles/baseStyles.js +3 -1
- package/dist/cjs/ui/Toolbar/Toolbar.js +5 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +1 -1
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/ContentStyles/index.js +2 -0
- package/dist/es2019/ui/EditorContentContainer/styles/baseStyles.js +3 -1
- package/dist/es2019/ui/Toolbar/Toolbar.js +5 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +1 -1
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/baseStyles.js +3 -1
- package/dist/esm/ui/Toolbar/Toolbar.js +5 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +4 -3
- package/dist/types/presets/default.d.ts +2 -0
- package/dist/types/presets/universal.d.ts +7 -3
- package/dist/types/presets/useUniversalPreset.d.ts +4 -3
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +6 -3
- package/dist/types-ts4.5/presets/default.d.ts +2 -0
- package/dist/types-ts4.5/presets/universal.d.ts +9 -3
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +6 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 210.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`44b183a57537a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44b183a57537a) -
|
|
8
|
+
Introduce a new plugin config option for editor-plugin-toolbar to disable the selection toolbar
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 210.0.5
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`205cf133d4d59`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/205cf133d4d59) -
|
|
19
|
+
[ux] Update max width for breakout to be the same as for non-breakout nodes to fix vc90 regression
|
|
20
|
+
behind platform_editor_breakout_resizing_vc90_fix and platform_editor_breakout_resizing
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 210.0.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -69,7 +69,7 @@ function createDefaultPreset(options) {
|
|
|
69
69
|
return (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin');
|
|
70
70
|
}).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
|
|
71
71
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
72
|
-
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd(_toolbar.toolbarPlugin, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)).add([_primaryToolbar.primaryToolbarPlugin, {
|
|
72
|
+
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([_toolbar.toolbarPlugin, options.toolbar], (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)).add([_primaryToolbar.primaryToolbarPlugin, {
|
|
73
73
|
contextualFormattingEnabled: isFullPage
|
|
74
74
|
}]).maybeAdd(_undoRedo.undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([_blockType.blockTypePlugin, _objectSpread(_objectSpread({}, options.blockType), {}, {
|
|
75
75
|
includeBlockQuoteAsTextstyleOption: isFullPage
|
|
@@ -101,7 +101,8 @@ function createUniversalPresetInternal(_ref) {
|
|
|
101
101
|
hyperlinkOptions: _objectSpread({
|
|
102
102
|
lpLinkPicker: (_featureFlags$lpLinkP = featureFlags.lpLinkPicker) !== null && _featureFlags$lpLinkP !== void 0 ? _featureFlags$lpLinkP : false
|
|
103
103
|
}, props.hyperlinkOptions),
|
|
104
|
-
__livePage: props.__livePage
|
|
104
|
+
__livePage: props.__livePage,
|
|
105
|
+
toolbar: initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.toolbarPlugin
|
|
105
106
|
}));
|
|
106
107
|
var statusMenuDisabled = !props.allowStatus ? true : (0, _typeof2.default)(props.allowStatus) === 'object' ? Boolean(props.allowStatus.menuDisabled) : false;
|
|
107
108
|
var hasBeforePrimaryToolbar = function hasBeforePrimaryToolbar(components) {
|
|
@@ -169,7 +169,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
169
169
|
// Under editor experiment platform_editor_core_static_emotion
|
|
170
170
|
// If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
|
|
171
171
|
var legacyContentStyles = function legacyContentStyles(props) {
|
|
172
|
-
return (0, _react2.css)(_templateObject0 || (_templateObject0 = (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--resizer-handle-spacing: 12px;\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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\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", "\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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.ProseMirror-hideselection {\n\t\tcaret-color: transparent;\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\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n 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, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t\t\t\t@container editor-area (max-width: ", "px) {\n\t\t\t\t\t--ak-editor--large-gutter-padding: ", "px;\n\t\t\t\t}\n\t\t\t"])), _editorSharedStyles.akEditorFullPageNarrowBreakout, _editorSharedStyles.akEditorGutterPaddingReduced) : null, (0, _editorSharedStyles.editorFontSize)({
|
|
172
|
+
return (0, _react2.css)(_templateObject0 || (_templateObject0 = (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--resizer-handle-spacing: 12px;\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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-padding)\n\t);\n\t--ak-editor--breakout-min-width: 100%;\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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\n\t\t--ak-editor--breakout-min-width: 0px;\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", "\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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.ProseMirror-hideselection {\n\t\tcaret-color: transparent;\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\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n 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, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t\t\t\t@container editor-area (max-width: ", "px) {\n\t\t\t\t\t--ak-editor--large-gutter-padding: ", "px;\n\t\t\t\t}\n\t\t\t"])), _editorSharedStyles.akEditorFullPageNarrowBreakout, _editorSharedStyles.akEditorGutterPaddingReduced) : null, (0, _editorSharedStyles.editorFontSize)({
|
|
173
173
|
theme: props.theme
|
|
174
174
|
}), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", firstFloatingToolbarButtonStyles, _styles5.placeholderTextStyles, (0, _platformFeatureFlags.fg)('platform_editor_system_fake_text_highlight_colour') && _styles5.placeholderTextStyles_fg_platform_editor_system_fake_text_highlight_colour, 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)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), _collab.telepointerStyle, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, mentionNodeStyles, (0, _platformFeatureFlags.fg)('platform_editor_centre_mention_padding') && mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_improvements_1') ? mentionsSelectionStylesWithSearchMatch : mentionSelectionStyles, (0, _platformFeatureFlags.fg)('platform_editor_fix_emoji_style_selectors') ? emojiStylesWithSelectorFixes : emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_improvements_1') ? _styles3.findReplaceStylesNewNoImportant : _styles3.findReplaceStylesNew : _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_blocktaskitem_node', 'isEnabled', true) ? _tasksAndDecisions.taskItemStylesWithBlockTaskItem : _tasksAndDecisions.taskItemStyles, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithVisualRefresh, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithoutVisualRefresh, (0, _status.statusStyles)(), (0, _status.statusNodeStyles)(), (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _styles.getSmartCardSharedStyles)(), _date.dateStyles, _date.dateNodeStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), (0, _styles.pragmaticStylesLayoutFirstNodeResizeHandleFix)(), (0, _styles.pragmaticResizerStylesForTooltip)(), (0, _styles.pragmaticResizerStylesWithReducedEditorGutter)(), (0, _aiPanels.aiPanelStyles)(props.colorMode), firstBlockNodeStylesNew, (0, _platformFeatureFlags.fg)('platform_editor_vanilla_codebidi_warning') && _codeBidiWarning.codeBidiWarningStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject10 || (_templateObject10 = (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);
|
|
175
175
|
};
|
|
@@ -33,11 +33,13 @@ var baseStyles = exports.baseStyles = (0, _react.css)((0, _defineProperty2.defau
|
|
|
33
33
|
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidthSmallViewport, "px"),
|
|
34
34
|
'--ak-editor--breakout-full-page-guttering-padding': 'calc(var(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding))',
|
|
35
35
|
'--ak-editor--breakout-fallback-width': 'calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))',
|
|
36
|
+
'--ak-editor--breakout-min-width': '100%',
|
|
36
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
38
|
'.fabric-editor--full-width-mode': {
|
|
38
39
|
'--ak-editor--line-length': 'min(calc(100cqw - var(--ak-editor--large-gutter-padding) * 2), var(--ak-editor--full-width-layout-width))',
|
|
39
40
|
/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */
|
|
40
|
-
'--ak-editor--breakout-fallback-width': '100%'
|
|
41
|
+
'--ak-editor--breakout-fallback-width': '100%',
|
|
42
|
+
'--ak-editor--breakout-min-width': '0px'
|
|
41
43
|
},
|
|
42
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
43
45
|
'.ProseMirror': {
|
|
@@ -8,6 +8,7 @@ exports.ToolbarNext = exports.Toolbar = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
10
10
|
var _types = require("@atlaskit/editor-common/types");
|
|
11
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
11
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
12
13
|
var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
|
|
13
14
|
var _ToolbarInner = require("./ToolbarInner");
|
|
@@ -45,10 +46,13 @@ var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
|
|
|
45
46
|
components = _ref.components,
|
|
46
47
|
editorView = _ref.editorView,
|
|
47
48
|
editorAPI = _ref.editorAPI;
|
|
49
|
+
var connectivityStateMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'connectivity.mode');
|
|
50
|
+
var isOffline = connectivityStateMode === 'offline';
|
|
48
51
|
return /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarProvider, {
|
|
49
52
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null
|
|
50
53
|
}, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarUIProvider, {
|
|
51
|
-
api: editorAPI
|
|
54
|
+
api: editorAPI,
|
|
55
|
+
isDisabled: isOffline
|
|
52
56
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbarModel.ToolbarModelRenderer, {
|
|
53
57
|
toolbar: toolbar,
|
|
54
58
|
components: components,
|
|
@@ -60,7 +60,7 @@ export function createDefaultPreset(options) {
|
|
|
60
60
|
}
|
|
61
61
|
}], () => fg('platform_editor_use_preferences_plugin')).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
62
62
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
63
|
-
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd(toolbarPlugin, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)).add([primaryToolbarPlugin, {
|
|
63
|
+
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar], expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)).add([primaryToolbarPlugin, {
|
|
64
64
|
contextualFormattingEnabled: isFullPage
|
|
65
65
|
}]).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([blockTypePlugin, {
|
|
66
66
|
...options.blockType,
|
|
@@ -91,7 +91,8 @@ export default function createUniversalPresetInternal({
|
|
|
91
91
|
lpLinkPicker: (_featureFlags$lpLinkP = featureFlags.lpLinkPicker) !== null && _featureFlags$lpLinkP !== void 0 ? _featureFlags$lpLinkP : false,
|
|
92
92
|
...props.hyperlinkOptions
|
|
93
93
|
},
|
|
94
|
-
__livePage: props.__livePage
|
|
94
|
+
__livePage: props.__livePage,
|
|
95
|
+
toolbar: initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.toolbarPlugin
|
|
95
96
|
});
|
|
96
97
|
const statusMenuDisabled = !props.allowStatus ? true : typeof props.allowStatus === 'object' ? Boolean(props.allowStatus.menuDisabled) : false;
|
|
97
98
|
const hasBeforePrimaryToolbar = components => {
|
|
@@ -350,6 +350,7 @@ const legacyContentStyles = props => css`
|
|
|
350
350
|
--ak-editor--breakout-fallback-width: calc(
|
|
351
351
|
100cqw - var(--ak-editor--breakout-full-page-guttering-padding)
|
|
352
352
|
);
|
|
353
|
+
--ak-editor--breakout-min-width: 100%;
|
|
353
354
|
|
|
354
355
|
.fabric-editor--full-width-mode {
|
|
355
356
|
--ak-editor--line-length: min(
|
|
@@ -359,6 +360,7 @@ const legacyContentStyles = props => css`
|
|
|
359
360
|
|
|
360
361
|
/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */
|
|
361
362
|
--ak-editor--breakout-fallback-width: 100%;
|
|
363
|
+
--ak-editor--breakout-min-width: 0px;
|
|
362
364
|
}
|
|
363
365
|
|
|
364
366
|
.ProseMirror {
|
|
@@ -25,11 +25,13 @@ export const baseStyles = css({
|
|
|
25
25
|
'--ak-editor--breakout-wide-layout-width': `${akEditorCalculatedWideLayoutWidthSmallViewport}px`,
|
|
26
26
|
'--ak-editor--breakout-full-page-guttering-padding': 'calc(var(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding))',
|
|
27
27
|
'--ak-editor--breakout-fallback-width': 'calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))',
|
|
28
|
+
'--ak-editor--breakout-min-width': '100%',
|
|
28
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
30
|
'.fabric-editor--full-width-mode': {
|
|
30
31
|
'--ak-editor--line-length': 'min(calc(100cqw - var(--ak-editor--large-gutter-padding) * 2), var(--ak-editor--full-width-layout-width))',
|
|
31
32
|
/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */
|
|
32
|
-
'--ak-editor--breakout-fallback-width': '100%'
|
|
33
|
+
'--ak-editor--breakout-fallback-width': '100%',
|
|
34
|
+
'--ak-editor--breakout-min-width': '0px'
|
|
33
35
|
},
|
|
34
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
35
37
|
'.ProseMirror': {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EditorToolbarProvider, EditorToolbarUIProvider } from '@atlaskit/editor-common/toolbar';
|
|
3
3
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
4
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
4
5
|
import { ToolbarButtonGroup, ToolbarDropdownItemSection, ToolbarSection } from '@atlaskit/editor-toolbar';
|
|
5
6
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
6
7
|
import { ToolbarInner } from './ToolbarInner';
|
|
@@ -40,10 +41,13 @@ export const ToolbarNext = ({
|
|
|
40
41
|
editorView,
|
|
41
42
|
editorAPI
|
|
42
43
|
}) => {
|
|
44
|
+
const connectivityStateMode = useSharedPluginStateSelector(editorAPI, 'connectivity.mode');
|
|
45
|
+
const isOffline = connectivityStateMode === 'offline';
|
|
43
46
|
return /*#__PURE__*/React.createElement(EditorToolbarProvider, {
|
|
44
47
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null
|
|
45
48
|
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
46
|
-
api: editorAPI
|
|
49
|
+
api: editorAPI,
|
|
50
|
+
isDisabled: isOffline
|
|
47
51
|
}, /*#__PURE__*/React.createElement(ToolbarModelRenderer, {
|
|
48
52
|
toolbar: toolbar,
|
|
49
53
|
components: components,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "210.0.
|
|
2
|
+
export const version = "210.0.5";
|
|
@@ -64,7 +64,7 @@ export function createDefaultPreset(options) {
|
|
|
64
64
|
return fg('platform_editor_use_preferences_plugin');
|
|
65
65
|
}).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
66
66
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
67
|
-
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd(toolbarPlugin, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)).add([primaryToolbarPlugin, {
|
|
67
|
+
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar], expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)).add([primaryToolbarPlugin, {
|
|
68
68
|
contextualFormattingEnabled: isFullPage
|
|
69
69
|
}]).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([blockTypePlugin, _objectSpread(_objectSpread({}, options.blockType), {}, {
|
|
70
70
|
includeBlockQuoteAsTextstyleOption: isFullPage
|
|
@@ -94,7 +94,8 @@ export default function createUniversalPresetInternal(_ref) {
|
|
|
94
94
|
hyperlinkOptions: _objectSpread({
|
|
95
95
|
lpLinkPicker: (_featureFlags$lpLinkP = featureFlags.lpLinkPicker) !== null && _featureFlags$lpLinkP !== void 0 ? _featureFlags$lpLinkP : false
|
|
96
96
|
}, props.hyperlinkOptions),
|
|
97
|
-
__livePage: props.__livePage
|
|
97
|
+
__livePage: props.__livePage,
|
|
98
|
+
toolbar: initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.toolbarPlugin
|
|
98
99
|
}));
|
|
99
100
|
var statusMenuDisabled = !props.allowStatus ? true : _typeof(props.allowStatus) === 'object' ? Boolean(props.allowStatus.menuDisabled) : false;
|
|
100
101
|
var hasBeforePrimaryToolbar = function hasBeforePrimaryToolbar(components) {
|
|
@@ -163,7 +163,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
163
163
|
// Under editor experiment platform_editor_core_static_emotion
|
|
164
164
|
// If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
|
|
165
165
|
var legacyContentStyles = function legacyContentStyles(props) {
|
|
166
|
-
return css(_templateObject0 || (_templateObject0 = _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--resizer-handle-spacing: 12px;\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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\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", "\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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.ProseMirror-hideselection {\n\t\tcaret-color: transparent;\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\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, expValEqualsNoExposure('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? css(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\n\t\t\t\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t\t\t\t@container editor-area (max-width: ", "px) {\n\t\t\t\t\t--ak-editor--large-gutter-padding: ", "px;\n\t\t\t\t}\n\t\t\t"])), akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced) : null, editorFontSize({
|
|
166
|
+
return css(_templateObject0 || (_templateObject0 = _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--resizer-handle-spacing: 12px;\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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-padding)\n\t);\n\t--ak-editor--breakout-min-width: 100%;\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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\n\t\t--ak-editor--breakout-min-width: 0px;\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", "\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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.ProseMirror-hideselection {\n\t\tcaret-color: transparent;\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\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, expValEqualsNoExposure('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? css(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\n\t\t\t\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t\t\t\t@container editor-area (max-width: ", "px) {\n\t\t\t\t\t--ak-editor--large-gutter-padding: ", "px;\n\t\t\t\t}\n\t\t\t"])), akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced) : null, editorFontSize({
|
|
167
167
|
theme: props.theme
|
|
168
168
|
}), whitespaceSharedStyles, paragraphSharedStyles(props.typographyTheme), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", firstFloatingToolbarButtonStyles, placeholderTextStyles, fg('platform_editor_system_fake_text_highlight_colour') && placeholderTextStyles_fg_platform_editor_system_fake_text_highlight_colour, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles(), blocktypeStyles(props.typographyTheme), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles(), listsStyles, ruleStyles(), mediaStyles(), layoutStyles(props.viewMode), telepointerStyle, gapCursorStyles, panelStyles(), mentionsStyles, mentionNodeStyles, fg('platform_editor_centre_mention_padding') && mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? mentionsSelectionStylesWithSearchMatch : mentionSelectionStyles, fg('platform_editor_fix_emoji_style_selectors') ? emojiStylesWithSelectorFixes : emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? fg('platform_editor_find_and_replace_improvements_1') ? findReplaceStylesNewNoImportant : findReplaceStylesNew : findReplaceStyles, textHighlightStyle, taskDecisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node', 'isEnabled', true) ? taskItemStylesWithBlockTaskItem : taskItemStyles, fg('platform-visual-refresh-icons') && decisionIconWithVisualRefresh, !fg('platform-visual-refresh-icons') && decisionIconWithoutVisualRefresh, statusStyles(), statusNodeStyles(), annotationSharedStyles(), smartCardStyles(), getSmartCardSharedStyles(), dateStyles, dateNodeStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), pragmaticStylesLayoutFirstNodeResizeHandleFix(), pragmaticResizerStylesForTooltip(), pragmaticResizerStylesWithReducedEditorGutter(), aiPanelStyles(props.colorMode), firstBlockNodeStylesNew, fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject10 || (_templateObject10 = _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);
|
|
169
169
|
};
|
|
@@ -26,11 +26,13 @@ export var baseStyles = css(_defineProperty({
|
|
|
26
26
|
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidthSmallViewport, "px"),
|
|
27
27
|
'--ak-editor--breakout-full-page-guttering-padding': 'calc(var(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding))',
|
|
28
28
|
'--ak-editor--breakout-fallback-width': 'calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))',
|
|
29
|
+
'--ak-editor--breakout-min-width': '100%',
|
|
29
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
30
31
|
'.fabric-editor--full-width-mode': {
|
|
31
32
|
'--ak-editor--line-length': 'min(calc(100cqw - var(--ak-editor--large-gutter-padding) * 2), var(--ak-editor--full-width-layout-width))',
|
|
32
33
|
/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */
|
|
33
|
-
'--ak-editor--breakout-fallback-width': '100%'
|
|
34
|
+
'--ak-editor--breakout-fallback-width': '100%',
|
|
35
|
+
'--ak-editor--breakout-min-width': '0px'
|
|
34
36
|
},
|
|
35
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
36
38
|
'.ProseMirror': {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EditorToolbarProvider, EditorToolbarUIProvider } from '@atlaskit/editor-common/toolbar';
|
|
3
3
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
4
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
4
5
|
import { ToolbarButtonGroup, ToolbarDropdownItemSection, ToolbarSection } from '@atlaskit/editor-toolbar';
|
|
5
6
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
6
7
|
import { ToolbarInner } from './ToolbarInner';
|
|
@@ -39,10 +40,13 @@ export var ToolbarNext = function ToolbarNext(_ref) {
|
|
|
39
40
|
components = _ref.components,
|
|
40
41
|
editorView = _ref.editorView,
|
|
41
42
|
editorAPI = _ref.editorAPI;
|
|
43
|
+
var connectivityStateMode = useSharedPluginStateSelector(editorAPI, 'connectivity.mode');
|
|
44
|
+
var isOffline = connectivityStateMode === 'offline';
|
|
42
45
|
return /*#__PURE__*/React.createElement(EditorToolbarProvider, {
|
|
43
46
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null
|
|
44
47
|
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
45
|
-
api: editorAPI
|
|
48
|
+
api: editorAPI,
|
|
49
|
+
isDisabled: isOffline
|
|
46
50
|
}, /*#__PURE__*/React.createElement(ToolbarModelRenderer, {
|
|
47
51
|
toolbar: toolbar,
|
|
48
52
|
components: components,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "210.0.
|
|
2
|
+
export var version = "210.0.5";
|
|
@@ -471,7 +471,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
471
471
|
clearFormatting: (inputMethod: import("@atlaskit/editor-plugins/block-type").ClearFormattingInputMethod) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
472
472
|
};
|
|
473
473
|
}, import("@atlaskit/editor-plugins/block-type").BlockTypePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"undoRedoPlugin", {
|
|
474
|
-
dependencies: [import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-plugins/history").HistoryPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>];
|
|
474
|
+
dependencies: [import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-plugins/history").HistoryPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/toolbar").ToolbarPlugin>];
|
|
475
475
|
actions: {
|
|
476
476
|
undo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
477
477
|
redo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
@@ -486,12 +486,13 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
486
486
|
};
|
|
487
487
|
pluginConfiguration?: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions;
|
|
488
488
|
}, import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
489
|
-
|
|
489
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
490
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>];
|
|
490
491
|
actions: {
|
|
491
492
|
registerComponents: (toolbarComponents: Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>) => void;
|
|
492
493
|
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
493
494
|
};
|
|
494
|
-
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
495
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
495
496
|
sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginSharedState | undefined;
|
|
496
497
|
commands: {
|
|
497
498
|
updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
|
|
@@ -10,6 +10,7 @@ import type { PastePluginOptions } from '@atlaskit/editor-plugins/paste';
|
|
|
10
10
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugins/placeholder';
|
|
11
11
|
import type { QuickInsertPluginOptions } from '@atlaskit/editor-plugins/quick-insert';
|
|
12
12
|
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
13
|
+
import type { ToolbarPluginOptions } from '@atlaskit/editor-plugins/toolbar';
|
|
13
14
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugins/type-ahead';
|
|
14
15
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
15
16
|
import type { DefaultPresetBuilder } from './default-preset-type';
|
|
@@ -34,6 +35,7 @@ export type DefaultPresetPluginOptions = {
|
|
|
34
35
|
featureFlags?: FeatureFlags;
|
|
35
36
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
36
37
|
disabled?: boolean;
|
|
38
|
+
toolbar?: ToolbarPluginOptions;
|
|
37
39
|
/**
|
|
38
40
|
* There is expected to be temporary divergence between Live Page editor expand behaviour and the standard expand behaviour.
|
|
39
41
|
*
|
|
@@ -33,6 +33,9 @@ export type InitialPluginConfiguration = {
|
|
|
33
33
|
trackChangesPlugin?: {
|
|
34
34
|
showOnToolbar?: boolean;
|
|
35
35
|
};
|
|
36
|
+
toolbarPlugin?: {
|
|
37
|
+
disableSelectionToolbar?: boolean;
|
|
38
|
+
};
|
|
36
39
|
};
|
|
37
40
|
/**
|
|
38
41
|
* Creates a preset with all of the available plugins.
|
|
@@ -523,7 +526,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
523
526
|
clearFormatting: (inputMethod: import("@atlaskit/editor-plugins/block-type").ClearFormattingInputMethod) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
524
527
|
};
|
|
525
528
|
}, import("@atlaskit/editor-plugins/block-type").BlockTypePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"undoRedoPlugin", {
|
|
526
|
-
dependencies: [import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-plugins/history").HistoryPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>];
|
|
529
|
+
dependencies: [import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-plugins/history").HistoryPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/toolbar").ToolbarPlugin>];
|
|
527
530
|
actions: {
|
|
528
531
|
undo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
529
532
|
redo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
@@ -538,12 +541,13 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
538
541
|
};
|
|
539
542
|
pluginConfiguration?: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions;
|
|
540
543
|
}, import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
541
|
-
|
|
544
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
545
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>];
|
|
542
546
|
actions: {
|
|
543
547
|
registerComponents: (toolbarComponents: Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>) => void;
|
|
544
548
|
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
545
549
|
};
|
|
546
|
-
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
550
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
547
551
|
sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginSharedState | undefined;
|
|
548
552
|
commands: {
|
|
549
553
|
updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
|
|
@@ -471,7 +471,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
471
471
|
clearFormatting: (inputMethod: import("@atlaskit/editor-plugins/block-type").ClearFormattingInputMethod) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
472
472
|
};
|
|
473
473
|
}, import("@atlaskit/editor-plugins/block-type").BlockTypePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"undoRedoPlugin", {
|
|
474
|
-
dependencies: [import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-plugins/history").HistoryPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>];
|
|
474
|
+
dependencies: [import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-plugins/history").HistoryPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/toolbar").ToolbarPlugin>];
|
|
475
475
|
actions: {
|
|
476
476
|
undo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
477
477
|
redo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
@@ -486,12 +486,13 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
486
486
|
};
|
|
487
487
|
pluginConfiguration?: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions;
|
|
488
488
|
}, import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
489
|
-
|
|
489
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
490
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>];
|
|
490
491
|
actions: {
|
|
491
492
|
registerComponents: (toolbarComponents: Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>) => void;
|
|
492
493
|
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
493
494
|
};
|
|
494
|
-
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
495
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
495
496
|
sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginSharedState | undefined;
|
|
496
497
|
commands: {
|
|
497
498
|
updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
|
|
@@ -678,7 +678,8 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
678
678
|
import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin,
|
|
679
679
|
import("@atlaskit/editor-plugins/history").HistoryPlugin,
|
|
680
680
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>,
|
|
681
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin
|
|
681
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>,
|
|
682
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/toolbar").ToolbarPlugin>
|
|
682
683
|
];
|
|
683
684
|
actions: {
|
|
684
685
|
undo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
@@ -696,17 +697,19 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
696
697
|
pluginConfiguration?: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions;
|
|
697
698
|
}, import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions | undefined>,
|
|
698
699
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
700
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
699
701
|
dependencies: [
|
|
700
702
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>,
|
|
701
703
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>,
|
|
702
704
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>,
|
|
703
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin
|
|
705
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>,
|
|
706
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>
|
|
704
707
|
];
|
|
705
708
|
actions: {
|
|
706
709
|
registerComponents: (toolbarComponents: Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>) => void;
|
|
707
710
|
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
708
711
|
};
|
|
709
|
-
}, undefined> | undefined,
|
|
712
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined> | undefined,
|
|
710
713
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
711
714
|
sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginSharedState | undefined;
|
|
712
715
|
commands: {
|
|
@@ -10,6 +10,7 @@ import type { PastePluginOptions } from '@atlaskit/editor-plugins/paste';
|
|
|
10
10
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugins/placeholder';
|
|
11
11
|
import type { QuickInsertPluginOptions } from '@atlaskit/editor-plugins/quick-insert';
|
|
12
12
|
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
13
|
+
import type { ToolbarPluginOptions } from '@atlaskit/editor-plugins/toolbar';
|
|
13
14
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugins/type-ahead';
|
|
14
15
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
15
16
|
import type { DefaultPresetBuilder } from './default-preset-type';
|
|
@@ -34,6 +35,7 @@ export type DefaultPresetPluginOptions = {
|
|
|
34
35
|
featureFlags?: FeatureFlags;
|
|
35
36
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
36
37
|
disabled?: boolean;
|
|
38
|
+
toolbar?: ToolbarPluginOptions;
|
|
37
39
|
/**
|
|
38
40
|
* There is expected to be temporary divergence between Live Page editor expand behaviour and the standard expand behaviour.
|
|
39
41
|
*
|
|
@@ -33,6 +33,9 @@ export type InitialPluginConfiguration = {
|
|
|
33
33
|
trackChangesPlugin?: {
|
|
34
34
|
showOnToolbar?: boolean;
|
|
35
35
|
};
|
|
36
|
+
toolbarPlugin?: {
|
|
37
|
+
disableSelectionToolbar?: boolean;
|
|
38
|
+
};
|
|
36
39
|
};
|
|
37
40
|
/**
|
|
38
41
|
* Creates a preset with all of the available plugins.
|
|
@@ -730,7 +733,8 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
730
733
|
import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin,
|
|
731
734
|
import("@atlaskit/editor-plugins/history").HistoryPlugin,
|
|
732
735
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>,
|
|
733
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin
|
|
736
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>,
|
|
737
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/toolbar").ToolbarPlugin>
|
|
734
738
|
];
|
|
735
739
|
actions: {
|
|
736
740
|
undo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
@@ -748,17 +752,19 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
748
752
|
pluginConfiguration?: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions;
|
|
749
753
|
}, import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions | undefined>,
|
|
750
754
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
755
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
751
756
|
dependencies: [
|
|
752
757
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>,
|
|
753
758
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>,
|
|
754
759
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>,
|
|
755
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin
|
|
760
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>,
|
|
761
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>
|
|
756
762
|
];
|
|
757
763
|
actions: {
|
|
758
764
|
registerComponents: (toolbarComponents: Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>) => void;
|
|
759
765
|
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
760
766
|
};
|
|
761
|
-
}, undefined> | undefined,
|
|
767
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined> | undefined,
|
|
762
768
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
763
769
|
sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginSharedState | undefined;
|
|
764
770
|
commands: {
|
|
@@ -678,7 +678,8 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
678
678
|
import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin,
|
|
679
679
|
import("@atlaskit/editor-plugins/history").HistoryPlugin,
|
|
680
680
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPlugin>,
|
|
681
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin
|
|
681
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>,
|
|
682
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/toolbar").ToolbarPlugin>
|
|
682
683
|
];
|
|
683
684
|
actions: {
|
|
684
685
|
undo: import("@atlaskit/editor-plugins/undo-redo").UndoRedoAction;
|
|
@@ -696,17 +697,19 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
696
697
|
pluginConfiguration?: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions;
|
|
697
698
|
}, import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginOptions | undefined>,
|
|
698
699
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
700
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
699
701
|
dependencies: [
|
|
700
702
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>,
|
|
701
703
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>,
|
|
702
704
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>,
|
|
703
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin
|
|
705
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>,
|
|
706
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>
|
|
704
707
|
];
|
|
705
708
|
actions: {
|
|
706
709
|
registerComponents: (toolbarComponents: Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>) => void;
|
|
707
710
|
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
708
711
|
};
|
|
709
|
-
}, undefined> | undefined,
|
|
712
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined> | undefined,
|
|
710
713
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
|
|
711
714
|
sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginSharedState | undefined;
|
|
712
715
|
commands: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "210.0
|
|
3
|
+
"version": "210.1.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
46
46
|
"@atlaskit/button": "^23.4.0",
|
|
47
47
|
"@atlaskit/css": "^0.12.0",
|
|
48
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
48
|
+
"@atlaskit/editor-json-transformer": "^8.26.0",
|
|
49
49
|
"@atlaskit/editor-performance-metrics": "^2.1.0",
|
|
50
50
|
"@atlaskit/editor-plugin-quick-insert": "^3.0.0",
|
|
51
51
|
"@atlaskit/editor-plugin-user-preferences": "^1.2.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
64
64
|
"@atlaskit/react-ufo": "^4.4.0",
|
|
65
65
|
"@atlaskit/task-decision": "^19.2.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^11.3.0",
|
|
67
67
|
"@atlaskit/tokens": "^6.0.0",
|
|
68
68
|
"@atlaskit/tooltip": "^20.4.0",
|
|
69
69
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"uuid": "^3.1.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@atlaskit/editor-common": "^107.
|
|
83
|
+
"@atlaskit/editor-common": "^107.26.0",
|
|
84
84
|
"@atlaskit/link-provider": "^3.7.0",
|
|
85
85
|
"@atlaskit/media-core": "^37.0.0",
|
|
86
86
|
"react": "^18.2.0",
|