@atlaskit/editor-core 207.19.6 → 207.21.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-jira/tsconfig.json +3 -0
  4. package/afm-post-office/tsconfig.json +3 -0
  5. package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +4 -1
  6. package/dist/cjs/create-editor/ReactEditorView.js +8 -2
  7. package/dist/cjs/i18n/sl.js +19 -0
  8. package/dist/cjs/i18n/sr_RS.js +19 -0
  9. package/dist/cjs/presets/default.js +8 -1
  10. package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -1
  11. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +24 -4
  12. package/dist/cjs/ui/ContentStyles/index.js +2 -2
  13. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -1
  14. package/dist/cjs/ui/EditorContentContainer/styles/resizerStyles.js +15 -1
  15. package/dist/cjs/ui/EditorContentContainer/styles/telepointerStyles.js +28 -0
  16. package/dist/cjs/ui/Toolbar/getPrimaryToolbarComponents.js +21 -0
  17. package/dist/cjs/version-wrapper.js +1 -1
  18. package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +4 -1
  19. package/dist/es2019/create-editor/ReactEditorView.js +8 -2
  20. package/dist/es2019/i18n/sl.js +13 -0
  21. package/dist/es2019/i18n/sr_RS.js +13 -0
  22. package/dist/es2019/presets/default.js +6 -1
  23. package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -1
  24. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +24 -4
  25. package/dist/es2019/ui/ContentStyles/index.js +2 -1
  26. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +4 -2
  27. package/dist/es2019/ui/EditorContentContainer/styles/resizerStyles.js +14 -0
  28. package/dist/es2019/ui/EditorContentContainer/styles/telepointerStyles.js +28 -0
  29. package/dist/es2019/ui/Toolbar/getPrimaryToolbarComponents.js +16 -0
  30. package/dist/es2019/version-wrapper.js +1 -1
  31. package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +4 -1
  32. package/dist/esm/create-editor/ReactEditorView.js +8 -2
  33. package/dist/esm/i18n/sl.js +13 -0
  34. package/dist/esm/i18n/sr_RS.js +13 -0
  35. package/dist/esm/presets/default.js +8 -1
  36. package/dist/esm/ui/Appearance/Comment/Comment.js +3 -1
  37. package/dist/esm/ui/Appearance/FullPage/FullPage.js +24 -4
  38. package/dist/esm/ui/ContentStyles/index.js +3 -3
  39. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +4 -2
  40. package/dist/esm/ui/EditorContentContainer/styles/resizerStyles.js +14 -0
  41. package/dist/esm/ui/EditorContentContainer/styles/telepointerStyles.js +28 -0
  42. package/dist/esm/ui/Toolbar/getPrimaryToolbarComponents.js +16 -0
  43. package/dist/esm/version-wrapper.js +1 -1
  44. package/dist/types/create-editor/create-universal-preset.d.ts +125 -11
  45. package/dist/types/i18n/sl.d.ts +12 -0
  46. package/dist/types/i18n/sr_RS.d.ts +12 -0
  47. package/dist/types/presets/default-preset-type.d.ts +2 -0
  48. package/dist/types/presets/universal.d.ts +125 -11
  49. package/dist/types/presets/useUniversalPreset.d.ts +125 -11
  50. package/dist/types/ts-hack.d.ts +1 -1
  51. package/dist/types/types/editor-onchange.d.ts +10 -0
  52. package/dist/types/ui/Appearance/Chromeless.d.ts +1 -1
  53. package/dist/types/ui/EditorContentContainer/styles/resizerStyles.d.ts +1 -0
  54. package/dist/types/ui/Toolbar/getPrimaryToolbarComponents.d.ts +5 -0
  55. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +154 -9
  56. package/dist/types-ts4.5/i18n/sl.d.ts +12 -0
  57. package/dist/types-ts4.5/i18n/sr_RS.d.ts +12 -0
  58. package/dist/types-ts4.5/presets/default-preset-type.d.ts +2 -0
  59. package/dist/types-ts4.5/presets/universal.d.ts +154 -9
  60. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +154 -9
  61. package/dist/types-ts4.5/ts-hack.d.ts +1 -1
  62. package/dist/types-ts4.5/types/editor-onchange.d.ts +10 -0
  63. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +1 -1
  64. package/dist/types-ts4.5/ui/EditorContentContainer/styles/resizerStyles.d.ts +1 -0
  65. package/dist/types-ts4.5/ui/Toolbar/getPrimaryToolbarComponents.d.ts +7 -0
  66. package/package.json +20 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 207.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#172346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172346)
8
+ [`615322847dc3b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/615322847dc3b) -
9
+ Adds dirty change metadata to onchange handler.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#172526](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172526)
14
+ [`4db369dced9ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4db369dced9ec) -
15
+ trigger editor core bump to use newer editor common
16
+ - Updated dependencies
17
+
18
+ ## 207.20.1
19
+
20
+ ### Patch Changes
21
+
22
+ - [#171539](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/171539)
23
+ [`823e66121b671`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/823e66121b671) -
24
+ [ux] Fixes height of the resize handle when advanced layouts feature is enabled.
25
+ - [#171777](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/171777)
26
+ [`befd8b6d56e78`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/befd8b6d56e78) -
27
+ [ux] Update selection marker fake-cursor to use an inline element when placed inside words, to
28
+ prevent erroneous text wrapping.
29
+ - Updated dependencies
30
+
31
+ ## 207.20.0
32
+
33
+ ### Minor Changes
34
+
35
+ - [#158546](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158546)
36
+ [`b7fe4e6f226f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b7fe4e6f226f3) -
37
+ ED-27284 use user preferences plugin in editor preset.
38
+
39
+ ### Patch Changes
40
+
41
+ - [#171482](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/171482)
42
+ [`aaa3084f0ce5e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aaa3084f0ce5e) - \*
43
+ I18n translations, see
44
+ [commit](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c5e33f6fd2cf86464047d15fc050a0759daa17a6)
45
+ - Add `platform_editor_disable_context_panel_animation`, see
46
+ [commit](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5354e057194e15abfc9fa16aa288e42044d710c)
47
+ - Updated dependencies
48
+
3
49
  ## 207.19.6
4
50
 
5
51
  ### Patch Changes
@@ -45,6 +45,9 @@
45
45
  {
46
46
  "path": "../../editor-plugin-quick-insert/afm-cc/tsconfig.json"
47
47
  },
48
+ {
49
+ "path": "../../editor-plugin-user-preferences/afm-cc/tsconfig.json"
50
+ },
48
51
  {
49
52
  "path": "../../editor-plugins/afm-cc/tsconfig.json"
50
53
  },
@@ -45,6 +45,9 @@
45
45
  {
46
46
  "path": "../../editor-plugin-quick-insert/afm-jira/tsconfig.json"
47
47
  },
48
+ {
49
+ "path": "../../editor-plugin-user-preferences/afm-jira/tsconfig.json"
50
+ },
48
51
  {
49
52
  "path": "../../editor-plugins/afm-jira/tsconfig.json"
50
53
  },
@@ -45,6 +45,9 @@
45
45
  {
46
46
  "path": "../../editor-plugin-quick-insert/afm-post-office/tsconfig.json"
47
47
  },
48
+ {
49
+ "path": "../../editor-plugin-user-preferences/afm-post-office/tsconfig.json"
50
+ },
48
51
  {
49
52
  "path": "../../editor-plugins/afm-post-office/tsconfig.json"
50
53
  },
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useDispatchTransaction = void 0;
7
7
  var _react = require("react");
8
8
  var _analytics = require("@atlaskit/editor-common/analytics");
9
+ var _collab = require("@atlaskit/editor-common/collab");
9
10
  var _coreUtils = require("@atlaskit/editor-common/core-utils");
10
11
  var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
11
12
  var _findChangedNodesFromTransaction = require("../../utils/findChangedNodesFromTransaction");
@@ -57,9 +58,11 @@ var useDispatchTransaction = exports.useDispatchTransaction = function useDispat
57
58
  });
58
59
  if (onChangeRef.current && transaction.docChanged) {
59
60
  var source = transaction.getMeta('isRemote') ? 'remote' : 'local';
61
+ var isDirtyChange = (0, _collab.isDirtyTransaction)(transaction);
60
62
  (0, _performanceMeasures.startMeasure)(_trackTransactions.EVENT_NAME_ON_CHANGE);
61
63
  onChangeRef.current(view, {
62
- source: source
64
+ source: source,
65
+ isDirtyChange: isDirtyChange
63
66
  });
64
67
  (0, _performanceMeasures.stopMeasure)(_trackTransactions.EVENT_NAME_ON_CHANGE);
65
68
  }
@@ -117,7 +117,9 @@ function ReactEditorView(props) {
117
117
  fireAnalyticsEvent: handleAnalyticsEvent
118
118
  }));
119
119
  (0, _react.useLayoutEffect)(function () {
120
- setEditorAPI(pluginInjectionAPI.current.api());
120
+ if (!(0, _platformFeatureFlags.fg)('platform_editor_setup_editorapi_sync')) {
121
+ setEditorAPI(pluginInjectionAPI.current.api());
122
+ }
121
123
  }, []);
122
124
  var createEditorState = (0, _react.useCallback)(function (options) {
123
125
  var _api$editorViewMode;
@@ -145,6 +147,9 @@ function ReactEditorView(props) {
145
147
  } else {
146
148
  config.current = (0, _createEditor.processPluginsList)((0, _createPluginsList.default)(options.props.preset, props.editorProps, pluginInjectionAPI.current));
147
149
  schema = (0, _createSchema.createSchema)(config.current);
150
+ if ((0, _platformFeatureFlags.fg)('platform_editor_setup_editorapi_sync')) {
151
+ setEditorAPI(pluginInjectionAPI.current.api());
152
+ }
148
153
  }
149
154
  var contentTransformerProvider = options.props.editorProps.contentTransformerProvider;
150
155
  var plugins = (0, _createEditor.createPMPlugins)({
@@ -253,7 +258,8 @@ function ReactEditorView(props) {
253
258
  });
254
259
  viewRef.current.updateState(newEditorState);
255
260
  (_props$editorProps$on = (_props$editorProps2 = props.editorProps).onChange) === null || _props$editorProps$on === void 0 || _props$editorProps$on.call(_props$editorProps2, viewRef.current, {
256
- source: 'local'
261
+ source: 'local',
262
+ isDirtyChange: false
257
263
  });
258
264
  }, [blur, createEditorState, props]);
259
265
 
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /* prettier-ignore */
8
+ /**
9
+ * NOTE:
10
+ *
11
+ * This file is automatically generated by Traduki 2.0.
12
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
13
+ */
14
+ //Slovenian (Slovenia) [sl-SI]
15
+ var _default = exports.default = {
16
+ 'fabric.editor.chromeCollapsedPlaceholder': 'Vnesite nekaj …',
17
+ 'fabric.editor.editorAssistiveLabel': 'Glavno področje za vsebino; začnite tipkati, da vnesete besedilo.',
18
+ 'fabric.editor.headingLink.toolbarHelpTitle': 'Odpri pogovorno okno pomoči'
19
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /* prettier-ignore */
8
+ /**
9
+ * NOTE:
10
+ *
11
+ * This file is automatically generated by Traduki 2.0.
12
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
13
+ */
14
+ //Serbian (Serbia) [sr-RS]
15
+ var _default = exports.default = {
16
+ 'fabric.editor.chromeCollapsedPlaceholder': 'Unesite tekst…',
17
+ 'fabric.editor.editorAssistiveLabel': 'Glavna oblast za sadržaj, počnite da unosite tekst.',
18
+ 'fabric.editor.headingLink.toolbarHelpTitle': 'Otvori dijalog pomoći'
19
+ };
@@ -8,6 +8,7 @@ exports.createDefaultPreset = createDefaultPreset;
8
8
  exports.useDefaultPreset = useDefaultPreset;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _preset = require("@atlaskit/editor-common/preset");
11
+ var _editorPluginUserPreferences = require("@atlaskit/editor-plugin-user-preferences");
11
12
  var _analytics = require("@atlaskit/editor-plugins/analytics");
12
13
  var _base = require("@atlaskit/editor-plugins/base");
13
14
  var _betterTypeHistory = require("@atlaskit/editor-plugins/better-type-history");
@@ -59,7 +60,13 @@ function createDefaultPreset(options) {
59
60
  performanceTracking: options.performanceTracking
60
61
  }], Boolean(options.allowAnalyticsGASV3)).add(_betterTypeHistory.betterTypeHistoryPlugin).add([_paste.pastePlugin, _objectSpread(_objectSpread({}, options === null || options === void 0 ? void 0 : options.paste), {}, {
61
62
  isFullPage: isFullPage
62
- })]).add(_clipboard.clipboardPlugin).add(_focus.focusPlugin).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') : (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
63
+ })]).add(_clipboard.clipboardPlugin).add(_focus.focusPlugin).maybeAdd([_editorPluginUserPreferences.userPreferencesPlugin, {
64
+ initialUserPreferences: {
65
+ toolbarDockingPosition: isFullPage ? 'none' : 'top'
66
+ }
67
+ }], function () {
68
+ return (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin');
69
+ }).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') : (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
63
70
  contextIdentifierProvider: options.contextIdentifierProvider
64
71
  }]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).add([_primaryToolbar.primaryToolbarPlugin, {
65
72
  contextualFormattingEnabled: isFullPage
@@ -28,6 +28,7 @@ var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentCompon
28
28
  var _ContentStyles = require("../../ContentStyles");
29
29
  var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
30
30
  var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
31
+ var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
31
32
  var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
32
33
  var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
33
34
  var _Toolbar = require("./Toolbar");
@@ -116,8 +117,9 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
116
117
  var editorAPI = props.editorAPI;
117
118
  var _useCommentEditorPlug = useCommentEditorPluginsStates(editorAPI),
118
119
  maxContentSizeState = _useCommentEditorPlug.maxContentSizeState,
119
- primaryToolbarState = _useCommentEditorPlug.primaryToolbarState,
120
+ primaryToolbarHookState = _useCommentEditorPlug.primaryToolbarState,
120
121
  editorViewModeState = _useCommentEditorPlug.editorViewModeState;
122
+ var primaryToolbarState = (0, _getPrimaryToolbarComponents.getPrimaryToolbarComponents)(editorAPI, primaryToolbarHookState === null || primaryToolbarHookState === void 0 ? void 0 : primaryToolbarHookState.components);
121
123
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['media']),
122
124
  mediaState = _useSharedPluginState.mediaState;
123
125
  var intl = (0, _reactIntlNext.useIntl)();
@@ -15,6 +15,7 @@ var _ui = require("@atlaskit/editor-common/ui");
15
15
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
16
16
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
17
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
+ var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
18
19
  var _FullPageContentArea = require("./FullPageContentArea");
19
20
  var _FullPageToolbar = require("./FullPageToolbar");
20
21
  var _getEditorViewModeSync = require("./getEditorViewModeSync");
@@ -95,8 +96,9 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
95
96
  var editorAPI = props.editorAPI;
96
97
  var _useFullPageEditorPlu = useFullPageEditorPluginsStates(editorAPI),
97
98
  editorViewModeState = _useFullPageEditorPlu.editorViewModeState,
98
- primaryToolbarState = _useFullPageEditorPlu.primaryToolbarState,
99
+ primaryToolbarHookState = _useFullPageEditorPlu.primaryToolbarState,
99
100
  interactionState = _useFullPageEditorPlu.interactionState;
101
+ var primaryToolbarState = (0, _getPrimaryToolbarComponents.getPrimaryToolbarComponents)(editorAPI, primaryToolbarHookState === null || primaryToolbarHookState === void 0 ? void 0 : primaryToolbarHookState.components);
100
102
  var viewMode = (0, _getEditorViewModeSync.getEditorViewMode)(editorViewModeState, props.preset);
101
103
 
102
104
  // Remove all this logic when platform_editor_interaction_api_refactor is cleaned up
@@ -111,8 +113,18 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
111
113
  } else {
112
114
  hasHadInteraction = interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction;
113
115
  }
114
- var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
115
- if (!toolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
116
+ var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking', {
117
+ disabled: (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')
118
+ });
119
+ var toolbarDockingPref = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'userPreferences.preferences.toolbarDockingPosition', {
120
+ disabled: !(0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')
121
+ });
122
+ if ((0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')) {
123
+ if (!toolbarDockingPref) {
124
+ var _editorAPI$userPrefer;
125
+ toolbarDockingPref = editorAPI === null || editorAPI === void 0 || (_editorAPI$userPrefer = editorAPI.userPreferences) === null || _editorAPI$userPrefer === void 0 || (_editorAPI$userPrefer = _editorAPI$userPrefer.sharedState.currentState()) === null || _editorAPI$userPrefer === void 0 ? void 0 : _editorAPI$userPrefer.preferences.toolbarDockingPosition;
126
+ }
127
+ } else if (!toolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
116
128
  var _editorAPI$selectionT, _editorAPI$selectionT2;
117
129
  // This is a workaround for the rendering issue with the selection toolbar
118
130
  // where using useSharedPluginStateSelector or useSharedPluginState the state are not
@@ -129,7 +141,15 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
129
141
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
130
142
  exposure: true
131
143
  })) {
132
- if ((0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
144
+ if ((0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')) {
145
+ // need to check if the toolbarDockingPref is set to 'none' or 'top'
146
+ if (toolbarDockingPref === 'none') {
147
+ primaryToolbarComponents = [];
148
+ if (!hasCustomComponents(customPrimaryToolbarComponents)) {
149
+ isEditorToolbarHidden = true;
150
+ }
151
+ }
152
+ } else if ((0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
133
153
  if (toolbarDocking === 'none') {
134
154
  primaryToolbarComponents = [];
135
155
  if (!hasCustomComponents(customPrimaryToolbarComponents)) {
@@ -152,7 +152,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
152
152
  // Under editor experiment platform_editor_core_static_emotion
153
153
  // If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
154
154
  var legacyContentStyles = function legacyContentStyles(props) {
155
- return (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "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 * 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\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 ", "\n ", "\n /* Switch between the two icons based on the visual refresh feature gate */\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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\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, _editorSharedStyles.editorFontSize)({
155
+ return (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "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 * 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\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 ", "\n ", "\n /* Switch between the two icons based on the visual refresh feature gate */\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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\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, _editorSharedStyles.editorFontSize)({
156
156
  theme: props.theme
157
157
  }), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", (0, _platformFeatureFlags.fg)('platform_editor_fix_floating_toolbar_focus') ? firstFloatingToolbarButtonStyles : null, _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
158
158
  exposure: false
@@ -168,7 +168,7 @@ var legacyContentStyles = function legacyContentStyles(props) {
168
168
  exposure: false
169
169
  }) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
170
170
  exposure: false
171
- }) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), (0, _styles.pragmaticResizerStylesForTooltip)(), (0, _aiPanels.aiPanelStyles)(props.colorMode), firstBlockNodeStylesNew, _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);
171
+ }) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), (0, _styles.pragmaticStylesLayoutFirstNodeResizeHandleFix)(), (0, _styles.pragmaticResizerStylesForTooltip)(), (0, _aiPanels.aiPanelStyles)(props.colorMode), firstBlockNodeStylesNew, _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);
172
172
  };
173
173
  var listLayoutShiftFix = (0, _react2.css)({
174
174
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -278,7 +278,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
278
278
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
279
279
  _browser.browser.safari && _list.listsStylesSafariFix, (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) &&
280
280
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
281
- _resizerStyles.pragmaticResizerStyles, (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release') &&
281
+ _resizerStyles.pragmaticResizerStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release') &&
282
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
283
+ _resizerStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release') &&
282
284
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
283
285
  _resizerStyles.pragmaticResizerStylesForTooltip,
284
286
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.resizerStyles = exports.resizerItemClassName = exports.resizerHoverZoneClassName = exports.resizerHandleTrackClassName = exports.resizerHandleThumbWidth = exports.resizerHandleThumbClassName = exports.resizerHandleClassName = exports.resizerExtendedZone = exports.resizerDangerClassName = exports.pragmaticResizerStylesForTooltip = exports.pragmaticResizerStyles = exports.handleWrapperClass = void 0;
7
+ exports.resizerStyles = exports.resizerItemClassName = exports.resizerHoverZoneClassName = exports.resizerHandleTrackClassName = exports.resizerHandleThumbWidth = exports.resizerHandleThumbClassName = exports.resizerHandleClassName = exports.resizerExtendedZone = exports.resizerDangerClassName = exports.pragmaticStylesLayoutFirstNodeResizeHandleFix = exports.pragmaticResizerStylesForTooltip = exports.pragmaticResizerStyles = exports.handleWrapperClass = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
10
  // eslint-disable-line
@@ -187,6 +187,20 @@ var pragmaticResizerStylesForTooltip = exports.pragmaticResizerStylesForTooltip
187
187
  }
188
188
  });
189
189
 
190
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
191
+ var pragmaticStylesLayoutFirstNodeResizeHandleFix = exports.pragmaticStylesLayoutFirstNodeResizeHandleFix = (0, _react.css)({
192
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
193
+ '.fabric-editor-breakout-mark': {
194
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
195
+ '&:has([data-prosemirror-node-name="layoutSection"].first-node-in-document)': {
196
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
197
+ '> .pm-breakout-resize-handle-container': {
198
+ height: 'calc(100% - 8px)'
199
+ }
200
+ }
201
+ }
202
+ });
203
+
190
204
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
191
205
  var pragmaticResizerStyles = exports.pragmaticResizerStyles = (0, _react.css)({
192
206
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -33,6 +33,26 @@ var pulseOut = (0, _react.keyframes)({
33
33
  opacity: 0
34
34
  }
35
35
  });
36
+ var pulseInDuringTr = (0, _react.keyframes)({
37
+ '0%, 95%': {
38
+ transform: 'scaleX(1)',
39
+ opacity: 1
40
+ },
41
+ '100%': {
42
+ transform: 'scaleX(0)',
43
+ opacity: 0
44
+ }
45
+ });
46
+ var pulseOutDuringTr = (0, _react.keyframes)({
47
+ '100%': {
48
+ transform: 'scaleX(1)',
49
+ opacity: 1
50
+ },
51
+ '0%, 90%': {
52
+ transform: 'scaleX(0)',
53
+ opacity: 0
54
+ }
55
+ });
36
56
  var telepointerColorAndCommonStyle = exports.telepointerColorAndCommonStyle = (0, _react.css)({
37
57
  '.ProseMirror .telepointer': {
38
58
  position: 'relative',
@@ -174,6 +194,14 @@ var telepointerStyle = exports.telepointerStyle = (0, _react.css)({
174
194
  animation: "".concat(pulseIn, " 2s ease-in-out")
175
195
  }
176
196
  },
197
+ '&.telepointer-pulse-during-tr': {
198
+ '.telepointer-initial': {
199
+ animation: "".concat(pulseOutDuringTr, " 7500ms ease-in-out")
200
+ },
201
+ '.telepointer-fullname': {
202
+ animation: "".concat(pulseInDuringTr, " 7500ms ease-in-out")
203
+ }
204
+ },
177
205
  '&:hover': {
178
206
  '.telepointer-initial': {
179
207
  opacity: 0,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getPrimaryToolbarComponents = void 0;
7
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
+ // Primary toolbar doesn't actually use plugin state so the state selector doesn't update as intended
9
+ // We need a proper API to deal with non-prosemirror based state in plugins but until then we can retrieve
10
+ // the latest
11
+ var getPrimaryToolbarComponents = exports.getPrimaryToolbarComponents = function getPrimaryToolbarComponents(editorAPI, components) {
12
+ if ((0, _platformFeatureFlags.fg)('platform_editor_setup_editorapi_sync')) {
13
+ var _editorAPI$primaryToo;
14
+ return {
15
+ components: components !== null && components !== void 0 ? components : editorAPI === null || editorAPI === void 0 || (_editorAPI$primaryToo = editorAPI.primaryToolbar) === null || _editorAPI$primaryToo === void 0 || (_editorAPI$primaryToo = _editorAPI$primaryToo.sharedState.currentState()) === null || _editorAPI$primaryToo === void 0 ? void 0 : _editorAPI$primaryToo.components
16
+ };
17
+ }
18
+ return {
19
+ components: components
20
+ };
21
+ };
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "207.19.6";
8
+ var version = exports.version = "207.20.1";
@@ -1,5 +1,6 @@
1
1
  import { useCallback, useEffect, useRef } from 'react';
2
2
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
3
+ import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
3
4
  import { getDocStructure } from '@atlaskit/editor-common/core-utils';
4
5
  import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
5
6
  import { findChangedNodesFromTransaction } from '../../utils/findChangedNodesFromTransaction';
@@ -53,9 +54,11 @@ export const useDispatchTransaction = ({
53
54
  });
54
55
  if (onChangeRef.current && transaction.docChanged) {
55
56
  const source = transaction.getMeta('isRemote') ? 'remote' : 'local';
57
+ const isDirtyChange = isDirtyTransaction(transaction);
56
58
  startMeasure(EVENT_NAME_ON_CHANGE);
57
59
  onChangeRef.current(view, {
58
- source
60
+ source,
61
+ isDirtyChange
59
62
  });
60
63
  stopMeasure(EVENT_NAME_ON_CHANGE);
61
64
  }
@@ -93,7 +93,9 @@ export function ReactEditorView(props) {
93
93
  fireAnalyticsEvent: handleAnalyticsEvent
94
94
  }));
95
95
  useLayoutEffect(() => {
96
- setEditorAPI(pluginInjectionAPI.current.api());
96
+ if (!fg('platform_editor_setup_editorapi_sync')) {
97
+ setEditorAPI(pluginInjectionAPI.current.api());
98
+ }
97
99
  }, []);
98
100
  const createEditorState = useCallback(options => {
99
101
  var _api$editorViewMode;
@@ -121,6 +123,9 @@ export function ReactEditorView(props) {
121
123
  } else {
122
124
  config.current = processPluginsList(createPluginsList(options.props.preset, props.editorProps, pluginInjectionAPI.current));
123
125
  schema = createSchema(config.current);
126
+ if (fg('platform_editor_setup_editorapi_sync')) {
127
+ setEditorAPI(pluginInjectionAPI.current.api());
128
+ }
124
129
  }
125
130
  const {
126
131
  contentTransformerProvider
@@ -228,7 +233,8 @@ export function ReactEditorView(props) {
228
233
  });
229
234
  viewRef.current.updateState(newEditorState);
230
235
  (_props$editorProps$on = (_props$editorProps = props.editorProps).onChange) === null || _props$editorProps$on === void 0 ? void 0 : _props$editorProps$on.call(_props$editorProps, viewRef.current, {
231
- source: 'local'
236
+ source: 'local',
237
+ isDirtyChange: false
232
238
  });
233
239
  }, [blur, createEditorState, props]);
234
240
 
@@ -0,0 +1,13 @@
1
+ /* prettier-ignore */
2
+ /**
3
+ * NOTE:
4
+ *
5
+ * This file is automatically generated by Traduki 2.0.
6
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
+ */
8
+ //Slovenian (Slovenia) [sl-SI]
9
+ export default {
10
+ 'fabric.editor.chromeCollapsedPlaceholder': 'Vnesite nekaj …',
11
+ 'fabric.editor.editorAssistiveLabel': 'Glavno področje za vsebino; začnite tipkati, da vnesete besedilo.',
12
+ 'fabric.editor.headingLink.toolbarHelpTitle': 'Odpri pogovorno okno pomoči'
13
+ };
@@ -0,0 +1,13 @@
1
+ /* prettier-ignore */
2
+ /**
3
+ * NOTE:
4
+ *
5
+ * This file is automatically generated by Traduki 2.0.
6
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
+ */
8
+ //Serbian (Serbia) [sr-RS]
9
+ export default {
10
+ 'fabric.editor.chromeCollapsedPlaceholder': 'Unesite tekst…',
11
+ 'fabric.editor.editorAssistiveLabel': 'Glavna oblast za sadržaj, počnite da unosite tekst.',
12
+ 'fabric.editor.headingLink.toolbarHelpTitle': 'Otvori dijalog pomoći'
13
+ };
@@ -1,6 +1,7 @@
1
1
  // #region Imports
2
2
 
3
3
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
4
+ import { userPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
4
5
  import { analyticsPlugin } from '@atlaskit/editor-plugins/analytics';
5
6
  import { basePlugin } from '@atlaskit/editor-plugins/base';
6
7
  import { betterTypeHistoryPlugin } from '@atlaskit/editor-plugins/better-type-history';
@@ -52,7 +53,11 @@ export function createDefaultPreset(options) {
52
53
  }], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, {
53
54
  ...(options === null || options === void 0 ? void 0 : options.paste),
54
55
  isFullPage
55
- }]).add(clipboardPlugin).add(focusPlugin).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? fg('platform_editor_no_cursor_on_live_doc_init') : expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
56
+ }]).add(clipboardPlugin).add(focusPlugin).maybeAdd([userPreferencesPlugin, {
57
+ initialUserPreferences: {
58
+ toolbarDockingPosition: isFullPage ? 'none' : 'top'
59
+ }
60
+ }], () => fg('platform_editor_use_preferences_plugin')).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? fg('platform_editor_no_cursor_on_live_doc_init') : expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
56
61
  contextIdentifierProvider: options.contextIdentifierProvider
57
62
  }]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).add([primaryToolbarPlugin, {
58
63
  contextualFormattingEnabled: isFullPage
@@ -27,6 +27,7 @@ import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/content
27
27
  import { createEditorContentStyle } from '../../ContentStyles';
28
28
  import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
29
29
  import PluginSlot from '../../PluginSlot';
30
+ import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
30
31
  import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
31
32
  import WithFlash from '../../WithFlash';
32
33
  import { MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
@@ -104,9 +105,10 @@ export const CommentEditorWithIntl = props => {
104
105
  } = props;
105
106
  const {
106
107
  maxContentSizeState,
107
- primaryToolbarState,
108
+ primaryToolbarState: primaryToolbarHookState,
108
109
  editorViewModeState
109
110
  } = useCommentEditorPluginsStates(editorAPI);
111
+ const primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarHookState === null || primaryToolbarHookState === void 0 ? void 0 : primaryToolbarHookState.components);
110
112
  const {
111
113
  mediaState
112
114
  } = useSharedPluginState(editorAPI, ['media']);