@atlaskit/editor-core 207.7.0 → 207.9.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 (53) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +11 -0
  3. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +4 -65
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
  5. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +15 -3
  6. package/dist/cjs/ui/EditorContentContainer/styles/blockMarksStyles.js +30 -0
  7. package/dist/cjs/ui/EditorContentContainer/styles/gridStyles.js +42 -0
  8. package/dist/cjs/ui/EditorContentContainer/styles/indentationStyles.js +45 -0
  9. package/dist/cjs/ui/EditorContentContainer/styles/paragraphStyles.js +54 -0
  10. package/dist/cjs/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +73 -0
  11. package/dist/cjs/ui/EditorContentContainer/styles/whitespaceStyles.js +14 -0
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/create-editor/ReactEditorView.js +11 -0
  14. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -66
  15. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
  16. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +17 -7
  17. package/dist/es2019/ui/EditorContentContainer/styles/blockMarksStyles.js +23 -0
  18. package/dist/es2019/ui/EditorContentContainer/styles/gridStyles.js +35 -0
  19. package/dist/es2019/ui/EditorContentContainer/styles/indentationStyles.js +38 -0
  20. package/dist/es2019/ui/EditorContentContainer/styles/paragraphStyles.js +47 -0
  21. package/dist/es2019/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +73 -0
  22. package/dist/es2019/ui/EditorContentContainer/styles/whitespaceStyles.js +7 -0
  23. package/dist/es2019/version-wrapper.js +1 -1
  24. package/dist/esm/create-editor/ReactEditorView.js +11 -0
  25. package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -66
  26. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
  27. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +16 -4
  28. package/dist/esm/ui/EditorContentContainer/styles/blockMarksStyles.js +23 -0
  29. package/dist/esm/ui/EditorContentContainer/styles/gridStyles.js +35 -0
  30. package/dist/esm/ui/EditorContentContainer/styles/indentationStyles.js +38 -0
  31. package/dist/esm/ui/EditorContentContainer/styles/paragraphStyles.js +47 -0
  32. package/dist/esm/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +65 -0
  33. package/dist/esm/ui/EditorContentContainer/styles/whitespaceStyles.js +7 -0
  34. package/dist/esm/version-wrapper.js +1 -1
  35. package/dist/types/create-editor/create-universal-preset.d.ts +0 -3
  36. package/dist/types/presets/universal.d.ts +0 -3
  37. package/dist/types/presets/useUniversalPreset.d.ts +0 -3
  38. package/dist/types/ui/EditorContentContainer/styles/blockMarksStyles.d.ts +1 -0
  39. package/dist/types/ui/EditorContentContainer/styles/gridStyles.d.ts +1 -0
  40. package/dist/types/ui/EditorContentContainer/styles/indentationStyles.d.ts +1 -0
  41. package/dist/types/ui/EditorContentContainer/styles/paragraphStyles.d.ts +3 -0
  42. package/dist/types/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.d.ts +7 -0
  43. package/dist/types/ui/EditorContentContainer/styles/whitespaceStyles.d.ts +1 -0
  44. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +0 -3
  45. package/dist/types-ts4.5/presets/universal.d.ts +0 -3
  46. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +0 -3
  47. package/dist/types-ts4.5/ui/EditorContentContainer/styles/blockMarksStyles.d.ts +1 -0
  48. package/dist/types-ts4.5/ui/EditorContentContainer/styles/gridStyles.d.ts +1 -0
  49. package/dist/types-ts4.5/ui/EditorContentContainer/styles/indentationStyles.d.ts +1 -0
  50. package/dist/types-ts4.5/ui/EditorContentContainer/styles/paragraphStyles.d.ts +3 -0
  51. package/dist/types-ts4.5/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.d.ts +7 -0
  52. package/dist/types-ts4.5/ui/EditorContentContainer/styles/whitespaceStyles.d.ts +1 -0
  53. package/package.json +14 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 207.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#160567](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160567)
8
+ [`2088abf31e988`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2088abf31e988) -
9
+ [https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor block marks CSS
10
+ in static emotion
11
+ - [#156919](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/156919)
12
+ [`379f5c27f4939`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/379f5c27f4939) -
13
+ delay table sticky headers until table is in viewport
14
+ - [#160638](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160638)
15
+ [`73485f1de1b41`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73485f1de1b41) -
16
+ [https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor grid,
17
+ indentation, whitespace CSS in static emotion
18
+
19
+ ### Patch Changes
20
+
21
+ - [#159655](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159655)
22
+ [`24f8c627d50f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/24f8c627d50f2) - ##
23
+ WHAT? Remove experimental graceful edit mode from view mode plugin and associated props.
24
+
25
+ ## WHY?
26
+
27
+ This experiment is being cleaned up and we are no longer proceeding in this direction.
28
+
29
+ ## HOW to adjust?
30
+
31
+ This experiment was only enabled for Confluence and should not have been enabled in other places.
32
+ If for some reason any of the following props/state/methdos were used please remove them:
33
+
34
+ - isConsumption
35
+ - contentMode
36
+ - initialContentMode
37
+ - updateContentMode
38
+
39
+ - Updated dependencies
40
+
41
+ ## 207.8.0
42
+
43
+ ### Minor Changes
44
+
45
+ - [#160606](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160606)
46
+ [`cd15d7ce813fb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd15d7ce813fb) -
47
+ [https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor paragraph CSS in
48
+ static emotion
49
+ - [#160652](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160652)
50
+ [`907e9afb86169`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/907e9afb86169) -
51
+ [https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor tasks and
52
+ decisions CSS in static emotion
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies
57
+
3
58
  ## 207.7.0
4
59
 
5
60
  ### Minor Changes
@@ -15,6 +15,7 @@ var _v = _interopRequireDefault(require("uuid/v4"));
15
15
  var _analytics = require("@atlaskit/editor-common/analytics");
16
16
  var _eventDispatcher = require("@atlaskit/editor-common/event-dispatcher");
17
17
  var _hooks = require("@atlaskit/editor-common/hooks");
18
+ var _nodeVisibility = require("@atlaskit/editor-common/node-visibility");
18
19
  var _normalizeFeatureFlags = require("@atlaskit/editor-common/normalize-feature-flags");
19
20
  var _measureRender = require("@atlaskit/editor-common/performance/measure-render");
20
21
  var _navigation = require("@atlaskit/editor-common/performance/navigation");
@@ -26,6 +27,7 @@ var _document = require("@atlaskit/editor-common/utils/document");
26
27
  var _state2 = require("@atlaskit/editor-prosemirror/state");
27
28
  var _view = require("@atlaskit/editor-prosemirror/view");
28
29
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
30
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
29
31
  var _useProviders = require("../composable-editor/hooks/useProviders");
30
32
  var _featureFlagsFromProps = require("../utils/feature-flags-from-props");
31
33
  var _getNodesCount = require("../utils/getNodesCount");
@@ -492,6 +494,12 @@ function ReactEditorView(props) {
492
494
  }, [editorView, shouldFocus, __livePage, mitigateScrollJump]);
493
495
  var handleEditorViewRef = (0, _react.useCallback)(function (node) {
494
496
  if (!viewRef.current && node) {
497
+ // make sure this doesn't expose the experiment
498
+ if ((0, _experiments.editorExperiment)('platform_editor_nodevisibility', true, {
499
+ exposure: false
500
+ })) {
501
+ (0, _nodeVisibility.nodeVisibilityManager)(node).initialiseNodeObserver();
502
+ }
495
503
  var view = createEditorView(node);
496
504
  if ((0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start')) {
497
505
  if (mitigateScrollJump) {
@@ -562,6 +570,9 @@ function ReactEditorView(props) {
562
570
  } else {
563
571
  viewRef.current.destroy(); // Destroys the dom node & all node views
564
572
  }
573
+ if ((0, _experiments.editorExperiment)('platform_editor_nodevisibility', true)) {
574
+ (0, _nodeVisibility.nodeVisibilityManager)(viewRef.current.dom).disconnect();
575
+ }
565
576
  viewRef.current = undefined;
566
577
  }
567
578
  }, [createEditorView, onEditorCreated, eventDispatcher, shouldFocus, __livePage, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
@@ -71,7 +71,6 @@ var useFullPageEditorPluginsStates = (0, _hooks.sharedPluginStateHookMigratorFac
71
71
  }, function (pluginInjectionApi) {
72
72
  var primaryToolbarComponents = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'primaryToolbar.components');
73
73
  var editorViewMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'editorViewMode.mode');
74
- var showTopToolbar = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'editorViewMode._showTopToolbar');
75
74
  var hasHadInteraction = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'interaction.hasHadInteraction');
76
75
  var interactionState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'interaction.interactionState');
77
76
  return {
@@ -79,8 +78,7 @@ var useFullPageEditorPluginsStates = (0, _hooks.sharedPluginStateHookMigratorFac
79
78
  components: primaryToolbarComponents
80
79
  },
81
80
  editorViewModeState: !editorViewMode ? undefined : {
82
- mode: editorViewMode,
83
- _showTopToolbar: showTopToolbar
81
+ mode: editorViewMode
84
82
  },
85
83
  interactionState: hasHadInteraction === undefined || interactionState === undefined ? undefined : {
86
84
  hasHadInteraction: hasHadInteraction,
@@ -89,7 +87,7 @@ var useFullPageEditorPluginsStates = (0, _hooks.sharedPluginStateHookMigratorFac
89
87
  };
90
88
  });
91
89
  var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
92
- var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
90
+ var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _wrapperElementRef$cu;
93
91
  var wrapperElementRef = (0, _react.useMemo)(function () {
94
92
  return props.innerRef;
95
93
  }, [props.innerRef]);
@@ -128,23 +126,6 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
128
126
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
129
127
  }
130
128
  var isEditorToolbarHidden = (0, _platformFeatureFlags.fg)('platform_editor_sync_editor_view_mode_state') ? viewMode === 'view' : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
131
- if (props.__livePage && !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control')) {
132
- // the custom toolbar logic should only be applied when the experiment cohort is not control,
133
- // and the editor is in live page mode.
134
- if (!editorViewModeState) {
135
- // when first loading the editor, the toolbar should be hidden for all content modes
136
- // the editorViewMode plugin state is not able to be relied as it will not be setup when
137
- // the appearance component is being rendered.
138
- // In this case we set the toolbar to be hidden by default.
139
- isEditorToolbarHidden = true;
140
- } else {
141
- if ((0, _experiments.editorExperiment)('live_pages_graceful_edit', 'initially-hide-toolbar')) {
142
- // for the initially-hide-toolbar variant, the toolbar should be hidden based on
143
- // a separate flag in the editorViewMode plugin state.
144
- isEditorToolbarHidden = !editorViewModeState._showTopToolbar || false;
145
- }
146
- }
147
- }
148
129
  var customPrimaryToolbarComponents = props.customPrimaryToolbarComponents;
149
130
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
150
131
  exposure: true
@@ -174,10 +155,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
174
155
  ,
175
156
  className: "akEditor",
176
157
  ref: wrapperElementRef
177
- }, !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && (0, _react2.jsx)("div", {
178
- css: hiddenStyle,
179
- "data-hidden": isEditorToolbarHidden
180
- }, (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
158
+ }, !isEditorToolbarHidden && (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
181
159
  appearance: props.appearance,
182
160
  editorAPI: editorAPI,
183
161
  beforeIcon: props.primaryToolbarIconBefore,
@@ -204,33 +182,6 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
204
182
  providerFactory: props.providerFactory,
205
183
  showKeyline: showKeyline,
206
184
  featureFlags: props.featureFlags
207
- })), (0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && !isEditorToolbarHidden && (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
208
- appearance: props.appearance,
209
- editorAPI: editorAPI,
210
- beforeIcon: props.primaryToolbarIconBefore,
211
- collabEdit: props.collabEdit,
212
- containerElement: (_scrollContentContain4 = (_scrollContentContain5 = scrollContentContainerRef.current) === null || _scrollContentContain5 === void 0 ? void 0 : _scrollContentContain5.scrollContainer) !== null && _scrollContentContain4 !== void 0 ? _scrollContentContain4 : null,
213
- customPrimaryToolbarComponents: props.customPrimaryToolbarComponents,
214
- disabled: !!props.disabled,
215
- dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
216
- editorActions: props.editorActions,
217
- editorDOMElement: props.editorDOMElement
218
- // Ignored via go/ees005
219
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
220
- ,
221
- editorView: props.editorView
222
- // Ignored via go/ees005
223
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
224
- ,
225
- eventDispatcher: props.eventDispatcher,
226
- hasMinWidth: props.enableToolbarMinWidth,
227
- popupsBoundariesElement: props.popupsBoundariesElement,
228
- popupsMountPoint: props.popupsMountPoint,
229
- popupsScrollableElement: props.popupsScrollableElement,
230
- primaryToolbarComponents: primaryToolbarComponents,
231
- providerFactory: props.providerFactory,
232
- showKeyline: showKeyline,
233
- featureFlags: props.featureFlags
234
185
  }), (0, _react2.jsx)(_FullPageContentArea.FullPageContentArea, {
235
186
  editorAPI: editorAPI,
236
187
  ref: scrollContentContainerRef,
@@ -258,16 +209,4 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
258
209
  viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
259
210
  hasHadInteraction: hasHadInteraction
260
211
  })));
261
- };
262
- var hiddenStyle = (0, _react2.css)({
263
- visibility: 'visible',
264
- opacity: 1,
265
- transition: '200ms opacity, 200ms visibility, 200ms transform',
266
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
267
- '&[data-hidden="true"]': {
268
- height: 0,
269
- visibility: 'hidden',
270
- opacity: 0
271
- // transition: '0ms opacity, 0ms visibility, 0ms transform',
272
- }
273
- });
212
+ };
@@ -102,14 +102,11 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
102
102
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
103
103
  _StyledComponents.contentArea,
104
104
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
105
- (0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden &&
105
+ props.isEditorToolbarHidden &&
106
106
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
107
107
  _StyledComponents.contentAreaHeightNoToolbar],
108
108
  "data-testid": CONTENT_AREA_TEST_ID,
109
109
  ref: containerRef
110
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
111
- ,
112
- className: !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden ? 'ak-editor-content-area-no-toolbar' : undefined
113
110
  }, (0, _react2.jsx)("div", {
114
111
  css:
115
112
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -33,15 +33,21 @@ var _tasksAndDecisions = require("../ContentStyles/tasks-and-decisions");
33
33
  var _aiPanel = require("./styles/ai-panel");
34
34
  var _annotationStyles = require("./styles/annotationStyles");
35
35
  var _backgroundColorStyles = require("./styles/backgroundColorStyles");
36
+ var _blockMarksStyles = require("./styles/blockMarksStyles");
36
37
  var _codeBlockStyles = require("./styles/codeBlockStyles");
37
38
  var _codeMarkStyles = require("./styles/codeMarkStyles");
38
39
  var _embedCardStyles = require("./styles/embedCardStyles");
39
40
  var _firstBlockNodeStyles = require("./styles/firstBlockNodeStyles");
41
+ var _gridStyles = require("./styles/gridStyles");
42
+ var _indentationStyles = require("./styles/indentationStyles");
40
43
  var _layout = require("./styles/layout");
41
44
  var _link = require("./styles/link");
42
45
  var _mediaStyles = require("./styles/mediaStyles");
46
+ var _paragraphStyles = require("./styles/paragraphStyles");
43
47
  var _resizerStyles = require("./styles/resizerStyles");
44
48
  var _rule = require("./styles/rule");
49
+ var _tasksAndDecisionsStyles = require("./styles/tasksAndDecisionsStyles");
50
+ var _whitespaceStyles = require("./styles/whitespaceStyles");
45
51
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
46
52
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
47
53
  /* eslint-disable react-hooks/rules-of-hooks */
@@ -140,13 +146,13 @@ var akEditorBreakpointForSmallDevice = "1266px";
140
146
 
141
147
  // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
142
148
  var contentStyles = function contentStyles() {
143
- return (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject8 || (_templateObject8 = (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)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, _codeBlockStyles.codeBlockStyles, (0, _styles2.blocktypeStyles)(), _codeMarkStyles.codeMarkStyles, _styles.textColorStyles, _backgroundColorStyles.backgroundColorStyles, listsStyles, _rule.ruleStyles, _mediaStyles.mediaStyles, (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
149
+ return (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, _whitespaceStyles.whitespaceStyles, _styles.listsSharedStyles, _indentationStyles.indentationStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject8 || (_templateObject8 = (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)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, _codeBlockStyles.codeBlockStyles, (0, _styles2.blocktypeStyles)(), _codeMarkStyles.codeMarkStyles, _styles.textColorStyles, _backgroundColorStyles.backgroundColorStyles, listsStyles, _rule.ruleStyles, _mediaStyles.mediaStyles, (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
144
150
  exposure: false
145
151
  }) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
146
152
  exposure: false
147
153
  }) && vanillaSelectionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
148
154
  exposure: false
149
- }) ? emojiStyles : reactEmojiStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
155
+ }) ? emojiStyles : reactEmojiStyles, emojiStyles, _tasksAndDecisionsStyles.tasksAndDecisionsStyles, _gridStyles.gridStyles, _blockMarksStyles.blockMarksStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
150
156
  exposure: false
151
157
  }) && _tasksAndDecisions.vanillaTaskItemStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
152
158
  exposure: false
@@ -224,7 +230,13 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
224
230
  ref: ref,
225
231
  css: [contentStyles(),
226
232
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
227
- (0, _layout.layoutBaseStyles)(),
233
+ (0, _layout.layoutBaseStyles)(), (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? (0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed') ?
234
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
235
+ _paragraphStyles.paragraphStylesUGCRefreshed :
236
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
237
+ _paragraphStyles.paragraphStylesUGCModernized :
238
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
239
+ _paragraphStyles.paragraphStylesOld,
228
240
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
229
241
  (0, _platformFeatureFlags.fg)('platform_editor_hyperlink_underline') ? _link.linkStyles : _link.linkStylesOld, (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) &&
230
242
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.blockMarksStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
11
+ var blockMarksStyles = exports.blockMarksStyles = (0, _react.css)({
12
+ // We need to remove margin-top from first item
13
+ // inside doc, tableCell, tableHeader, blockquote, etc.
14
+ //
15
+ // - For nested block marks apart from those with indentation mark.
16
+ // - Do not remove the margin top for nodes inside indentation marks.
17
+ // - Do not remove the margin top for nodes inside alignment marks.
18
+ //- If first element inside a block node has alignment mark, then remove the margin-top.
19
+ //- If first document element has indentation mark remove margin-top.
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
21
+ '*:not(.fabric-editor-block-mark) >, *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-of-type:not(.fabric-editor-indentation-mark):not(.fabric-editor-alignment), .fabric-editor-alignment:first-of-type:first-child, .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child': {
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
23
+ 'p, h1, h2, h3, h4, h5, h6, .heading-wrapper': {
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
25
+ '&:first-child:not(style), style:first-child + *': {
26
+ marginTop: 0
27
+ }
28
+ }
29
+ }
30
+ });
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.gridStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
11
+ var gridStyles = exports.gridStyles = (0, _react.css)({
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
13
+ '.gridParent': {
14
+ width: "calc(100% + 24px)",
15
+ marginLeft: "var(--ds-space-negative-150, -12px)",
16
+ marginRight: "var(--ds-space-negative-150, -12px)",
17
+ transform: 'scale(1)',
18
+ zIndex: 2
19
+ },
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
21
+ '.gridContainer': {
22
+ position: 'fixed',
23
+ height: '100vh',
24
+ width: '100%',
25
+ pointerEvents: 'none'
26
+ },
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
28
+ '.gridLine': {
29
+ borderLeft: "1px solid ".concat("var(--ds-border, #091E4224)"),
30
+ display: 'inline-block',
31
+ boxSizing: 'border-box',
32
+ height: '100%',
33
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
34
+ marginLeft: '-1px',
35
+ transition: 'border-color 0.15s linear',
36
+ zIndex: 0
37
+ },
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
39
+ '.highlight': {
40
+ borderLeft: "1px solid ".concat("var(--ds-border-focused, #388BFF)")
41
+ }
42
+ });
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.indentationStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
11
+ var indentationStyles = exports.indentationStyles = (0, _react.css)({
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
13
+ '.fabric-editor-indentation-mark': {
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
+ "&[data-level='1']": {
16
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
17
+ marginLeft: 30
18
+ },
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
20
+ "&[data-level='2']": {
21
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
22
+ marginLeft: 60
23
+ },
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
+ "&[data-level='3']": {
26
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
27
+ marginLeft: 90
28
+ },
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
30
+ "&[data-level='4']": {
31
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
32
+ marginLeft: 120
33
+ },
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
35
+ "&[data-level='5']": {
36
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
37
+ marginLeft: 150
38
+ },
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
40
+ "&[data-level='6']": {
41
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
42
+ marginLeft: 180
43
+ }
44
+ }
45
+ });
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.paragraphStylesUGCRefreshed = exports.paragraphStylesUGCModernized = exports.paragraphStylesOld = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ var blockNodesVerticalMargin = '0.75rem';
11
+
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
13
+ var paragraphStylesUGCRefreshed = exports.paragraphStylesUGCRefreshed = (0, _react.css)({
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
+ '.ProseMirror p': {
16
+ // The `editor.font.body` token is used for the UGC typography theme.
17
+ // We don't use `editorUGCToken('editor.font.body')` here because we want to build this styles statically.
18
+ // See platform/packages/editor/editor-common/src/ugc-tokens/get-editor-ugc-token.tsx
19
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
20
+ font: 'normal 400 1em/1.714 "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
21
+ marginTop: blockNodesVerticalMargin,
22
+ marginBottom: 0
23
+ }
24
+ });
25
+
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
27
+ var paragraphStylesUGCModernized = exports.paragraphStylesUGCModernized = (0, _react.css)({
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
29
+ '.ProseMirror p': {
30
+ // The `editor.font.body` token is used for the UGC typography theme.
31
+ // We don't use `editorUGCToken('editor.font.body')` here because we want to build this styles statically.
32
+ // See platform/packages/editor/editor-common/src/ugc-tokens/get-editor-ugc-token.tsx
33
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
34
+ font: 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
35
+ marginTop: blockNodesVerticalMargin,
36
+ marginBottom: 0
37
+ }
38
+ });
39
+
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
41
+ var paragraphStylesOld = exports.paragraphStylesOld = (0, _react.css)({
42
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
43
+ '.ProseMirror p': {
44
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
45
+ fontSize: '1em',
46
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
47
+ lineHeight: 1.714,
48
+ fontWeight: "var(--ds-font-weight-regular, 400)",
49
+ marginTop: blockNodesVerticalMargin,
50
+ marginBottom: 0,
51
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
52
+ letterSpacing: '-0.005em'
53
+ }
54
+ });
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.tasksAndDecisionsStyles = exports.TaskDecisionSharedCssClassName = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = require("@emotion/react");
10
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
11
+
12
+ var akEditorLineHeight = 1.714;
13
+ var TaskDecisionSharedCssClassName = exports.TaskDecisionSharedCssClassName = {
14
+ DECISION_CONTAINER: 'decisionItemView-content-wrap',
15
+ TASK_CONTAINER: 'taskItemView-content-wrap',
16
+ TASK_ITEM: 'task-item',
17
+ TASK_CHECKBOX_CONTAINER: 'task-item-checkbox-wrap'
18
+ };
19
+
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
21
+ var tasksAndDecisionsStyles = exports.tasksAndDecisionsStyles = (0, _react.css)({
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
23
+ '.ProseMirror': (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".taskItemView-content-wrap, .".concat(TaskDecisionSharedCssClassName.DECISION_CONTAINER), {
24
+ position: 'relative',
25
+ minWidth: 48
26
+ }), ".".concat(TaskDecisionSharedCssClassName.DECISION_CONTAINER), {
27
+ marginTop: 0
28
+ }), ".".concat(TaskDecisionSharedCssClassName.TASK_CONTAINER), {
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
30
+ "span[contenteditable='false']": {
31
+ height: "".concat(akEditorLineHeight, "em")
32
+ }
33
+ }), ".".concat(TaskDecisionSharedCssClassName.TASK_ITEM), {
34
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
35
+ lineHeight: akEditorLineHeight
36
+ }),
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
38
+ 'div[data-task-local-id]': {
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
40
+ "span[contenteditable='false']": {
41
+ height: "".concat(akEditorLineHeight, "em")
42
+ },
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
44
+ "span[contenteditable='false'] + div": {
45
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
46
+ lineHeight: "".concat(akEditorLineHeight, "em")
47
+ }
48
+ },
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
50
+ 'div[data-task-list-local-id]': {
51
+ margin: "var(--ds-space-150, 12px)".concat(" 0 0 0"),
52
+ // If task item is not first in the list then set margin top to 4px.
53
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
54
+ 'div + div': {
55
+ marginTop: "var(--ds-space-050, 4px)"
56
+ }
57
+ },
58
+ // If task list is not first in the document then set margin top to 4px.
59
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
60
+ 'div[data-task-list-local-id] div[data-task-list-local-id]': {
61
+ marginTop: "var(--ds-space-050, 4px)",
62
+ marginLeft: "var(--ds-space-300, 24px)"
63
+ },
64
+ // When action list is inside panel
65
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
66
+ '.ak-editor-panel__content': {
67
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
68
+ '> div[data-task-list-local-id]:first-child': {
69
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
70
+ margin: '0 !important'
71
+ }
72
+ }
73
+ });
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.whitespaceStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
11
+ var whitespaceStyles = exports.whitespaceStyles = (0, _react.css)({
12
+ wordWrap: 'break-word',
13
+ whiteSpace: 'pre-wrap'
14
+ });
@@ -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.7.0";
8
+ var version = exports.version = "207.9.0";
@@ -4,6 +4,7 @@ import uuid from 'uuid/v4';
4
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, PLATFORMS } from '@atlaskit/editor-common/analytics';
5
5
  import { createDispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
6
6
  import { useConstructor, usePreviousState } from '@atlaskit/editor-common/hooks';
7
+ import { nodeVisibilityManager } from '@atlaskit/editor-common/node-visibility';
7
8
  import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
8
9
  import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
9
10
  import { getResponseEndTime } from '@atlaskit/editor-common/performance/navigation';
@@ -15,6 +16,7 @@ import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
15
16
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
16
17
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
17
18
  import { fg } from '@atlaskit/platform-feature-flags';
19
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
20
  import { useProviders } from '../composable-editor/hooks/useProviders';
19
21
  import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
20
22
  import { getNodesCount } from '../utils/getNodesCount';
@@ -462,6 +464,12 @@ export function ReactEditorView(props) {
462
464
  }, [editorView, shouldFocus, __livePage, mitigateScrollJump]);
463
465
  const handleEditorViewRef = useCallback(node => {
464
466
  if (!viewRef.current && node) {
467
+ // make sure this doesn't expose the experiment
468
+ if (editorExperiment('platform_editor_nodevisibility', true, {
469
+ exposure: false
470
+ })) {
471
+ nodeVisibilityManager(node).initialiseNodeObserver();
472
+ }
465
473
  const view = createEditorView(node);
466
474
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
467
475
  if (mitigateScrollJump) {
@@ -530,6 +538,9 @@ export function ReactEditorView(props) {
530
538
  } else {
531
539
  viewRef.current.destroy(); // Destroys the dom node & all node views
532
540
  }
541
+ if (editorExperiment('platform_editor_nodevisibility', true)) {
542
+ nodeVisibilityManager(viewRef.current.dom).disconnect();
543
+ }
533
544
  viewRef.current = undefined;
534
545
  }
535
546
  }, [createEditorView, onEditorCreated, eventDispatcher, shouldFocus, __livePage, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);