@atlaskit/editor-plugin-block-controls 3.13.2 → 3.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 3.13.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#149231](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149231)
8
+ [`1c807d5c27e51`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c807d5c27e51) -
9
+ Fix cursor being hidden on empty lines in safari.
10
+
11
+ ## 3.13.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 3.13.2
4
18
 
5
19
  ### Patch Changes
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.GlobalStylesWrapper = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
+ var _whitespace = require("@atlaskit/editor-common/whitespace");
10
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
@@ -157,12 +158,23 @@ var headingWithIndentationInLayoutStyleFix = (0, _react.css)((0, _defineProperty
157
158
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
158
159
  marginTop: '0 !important'
159
160
  }));
160
- var withRelativePosStyle = (0, _react.css)({
161
+ var withRelativePosStyleLegacy = (0, _react.css)({
161
162
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
162
163
  '.ProseMirror': (0, _defineProperty2.default)({}, "&& ".concat(dragHandlerAnchorSelector), {
163
164
  position: 'relative'
164
165
  })
165
166
  });
167
+ var withRelativePosStyle = (0, _react.css)({
168
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
169
+ '.ProseMirror': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "&& ".concat(dragHandlerAnchorSelector), {
170
+ position: 'relative'
171
+ }), "&& ".concat(dragHandlerAnchorSelector, ":has(> .ProseMirror-trailingBreak:only-child)::before"), {
172
+ // Workaround to force safari to show the cursor on blank lines even when there is no content
173
+ // See: CONFCLOUD-80210
174
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
175
+ content: "\"".concat(_whitespace.ZERO_WIDTH_SPACE, "\"")
176
+ })
177
+ });
166
178
  var withAnchorNameZindexStyle = (0, _react.css)({
167
179
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
168
180
  '.ProseMirror': {
@@ -189,6 +201,6 @@ var blockCardWithoutLayout = (0, _react.css)({
189
201
  });
190
202
  var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWrapper() {
191
203
  return (0, _react.jsx)(_react.Global, {
192
- styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, withRelativePosStyle, topLevelNodeMarginStyles, withAnchorNameZindexStyle,,]
204
+ styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle,,]
193
205
  });
194
206
  };
@@ -4,6 +4,7 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, Global, jsx } from '@emotion/react';
7
+ import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
7
8
  import { akEditorBreakoutPadding, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport } from '@atlaskit/editor-shared-styles';
8
9
  import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -184,12 +185,28 @@ const headingWithIndentationInLayoutStyleFix = css({
184
185
  marginTop: '0 !important'
185
186
  }
186
187
  });
188
+ const withRelativePosStyleLegacy = css({
189
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
190
+ '.ProseMirror': {
191
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
192
+ [`&& ${dragHandlerAnchorSelector}`]: {
193
+ position: 'relative'
194
+ }
195
+ }
196
+ });
187
197
  const withRelativePosStyle = css({
188
198
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
189
199
  '.ProseMirror': {
190
200
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
191
201
  [`&& ${dragHandlerAnchorSelector}`]: {
192
202
  position: 'relative'
203
+ },
204
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
205
+ [`&& ${dragHandlerAnchorSelector}:has(> .ProseMirror-trailingBreak:only-child)::before`]: {
206
+ // Workaround to force safari to show the cursor on blank lines even when there is no content
207
+ // See: CONFCLOUD-80210
208
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
209
+ content: `"${ZERO_WIDTH_SPACE}"`
193
210
  }
194
211
  }
195
212
  });
@@ -219,6 +236,6 @@ const blockCardWithoutLayout = css({
219
236
  });
220
237
  export const GlobalStylesWrapper = () => {
221
238
  return jsx(Global, {
222
- styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_widget_visibility') ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, withRelativePosStyle, topLevelNodeMarginStyles, withAnchorNameZindexStyle,,]
239
+ styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_widget_visibility') ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle,,]
223
240
  });
224
241
  };
@@ -5,6 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, Global, jsx } from '@emotion/react';
8
+ import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
8
9
  import { akEditorBreakoutPadding, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport } from '@atlaskit/editor-shared-styles';
9
10
  import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -150,12 +151,23 @@ var headingWithIndentationInLayoutStyleFix = css(_defineProperty({}, "".concat(d
150
151
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
151
152
  marginTop: '0 !important'
152
153
  }));
153
- var withRelativePosStyle = css({
154
+ var withRelativePosStyleLegacy = css({
154
155
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
155
156
  '.ProseMirror': _defineProperty({}, "&& ".concat(dragHandlerAnchorSelector), {
156
157
  position: 'relative'
157
158
  })
158
159
  });
160
+ var withRelativePosStyle = css({
161
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
162
+ '.ProseMirror': _defineProperty(_defineProperty({}, "&& ".concat(dragHandlerAnchorSelector), {
163
+ position: 'relative'
164
+ }), "&& ".concat(dragHandlerAnchorSelector, ":has(> .ProseMirror-trailingBreak:only-child)::before"), {
165
+ // Workaround to force safari to show the cursor on blank lines even when there is no content
166
+ // See: CONFCLOUD-80210
167
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
168
+ content: "\"".concat(ZERO_WIDTH_SPACE, "\"")
169
+ })
170
+ });
159
171
  var withAnchorNameZindexStyle = css({
160
172
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
161
173
  '.ProseMirror': {
@@ -182,6 +194,6 @@ var blockCardWithoutLayout = css({
182
194
  });
183
195
  export var GlobalStylesWrapper = function GlobalStylesWrapper() {
184
196
  return jsx(Global, {
185
- styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_widget_visibility') ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, withRelativePosStyle, topLevelNodeMarginStyles, withAnchorNameZindexStyle,,]
197
+ styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_widget_visibility') ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle,,]
186
198
  });
187
199
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.13.2",
3
+ "version": "3.13.4",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^47.6.0",
36
- "@atlaskit/editor-common": "^103.22.0",
36
+ "@atlaskit/editor-common": "^104.0.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
39
39
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.1.0",
56
56
  "@atlaskit/primitives": "^14.7.0",
57
57
  "@atlaskit/theme": "^18.0.0",
58
- "@atlaskit/tmp-editor-statsig": "^4.15.0",
58
+ "@atlaskit/tmp-editor-statsig": "^4.16.0",
59
59
  "@atlaskit/tokens": "^4.8.0",
60
60
  "@atlaskit/tooltip": "^20.0.0",
61
61
  "@babel/runtime": "^7.0.0",
@@ -160,6 +160,9 @@
160
160
  "platform_editor_controls_sticky_controls": {
161
161
  "type": "boolean"
162
162
  },
163
+ "platform_editor_fix_safari_cursor_hidden_empty": {
164
+ "type": "boolean"
165
+ },
163
166
  "platform_editor_controls_patch_2": {
164
167
  "type": "boolean"
165
168
  },