@atlaskit/editor-plugin-layout 2.2.0 → 2.2.1

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,14 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 2.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#127914](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/127914)
8
+ [`1240912e13dd0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1240912e13dd0) -
9
+ [ux] ED-27097 Hide layout placeholder when editor is not focussed
10
+ - Updated dependencies
11
+
3
12
  ## 2.2.0
4
13
 
5
14
  ### Minor Changes
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.GlobalStylesWrapper = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
7
9
  var _react = require("react");
8
10
  var _react2 = require("@emotion/react");
9
11
  var _reactIntlNext = require("react-intl-next");
@@ -16,22 +18,19 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
18
 
17
19
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled
18
20
 
21
+ var PLACEHOLDER_SELECTOR = '.ProseMirror-focused .layoutSectionView-content-wrap.selected [data-layout-column] > [data-layout-content] > p:only-child:has(.ProseMirror-trailingBreak:only-child)';
19
22
  var getPlaceholderStyle = function getPlaceholderStyle(message) {
20
23
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
21
- return (0, _react2.css)({
22
- // when paragraph is the only child, and it only has a trailingBreak.
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
24
- '.ProseMirror .layoutSectionView-content-wrap.selected [data-layout-column] > [data-layout-content] > p:only-child:has(.ProseMirror-trailingBreak:only-child)': {
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
26
- '&::before': {
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
28
- content: "\"".concat(message, "\""),
29
- position: 'absolute',
30
- color: "var(--ds-text-subtlest, #626F86)",
31
- pointerEvents: 'none'
32
- }
24
+ return (0, _react2.css)((0, _defineProperty2.default)({}, "".concat(PLACEHOLDER_SELECTOR), {
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
26
+ '&::before': {
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
28
+ content: "\"".concat(message, "\""),
29
+ position: 'absolute',
30
+ color: "var(--ds-text-subtlest, #626F86)",
31
+ pointerEvents: 'none'
33
32
  }
34
- });
33
+ }));
35
34
  }
36
35
  return (0, _react2.css)({
37
36
  // when paragraph is the only child, and it only has a trailingBreak.
@@ -9,12 +9,13 @@ import { css, Global, jsx } from '@emotion/react';
9
9
  import { useIntl } from 'react-intl-next';
10
10
  import { layoutMessages as messages } from '@atlaskit/editor-common/messages';
11
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
+ const PLACEHOLDER_SELECTOR = '.ProseMirror-focused .layoutSectionView-content-wrap.selected [data-layout-column] > [data-layout-content] > p:only-child:has(.ProseMirror-trailingBreak:only-child)';
12
13
  const getPlaceholderStyle = message => {
13
14
  if (editorExperiment('platform_editor_controls', 'variant1')) {
14
15
  return css({
15
16
  // when paragraph is the only child, and it only has a trailingBreak.
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
17
- '.ProseMirror .layoutSectionView-content-wrap.selected [data-layout-column] > [data-layout-content] > p:only-child:has(.ProseMirror-trailingBreak:only-child)': {
17
+ // 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 -- Ignored via go/DSP-18766
18
+ [`${PLACEHOLDER_SELECTOR}`]: {
18
19
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
19
20
  '&::before': {
20
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
@@ -1,3 +1,4 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
@@ -9,22 +10,19 @@ import { css, Global, jsx } from '@emotion/react';
9
10
  import { useIntl } from 'react-intl-next';
10
11
  import { layoutMessages as messages } from '@atlaskit/editor-common/messages';
11
12
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
+ var PLACEHOLDER_SELECTOR = '.ProseMirror-focused .layoutSectionView-content-wrap.selected [data-layout-column] > [data-layout-content] > p:only-child:has(.ProseMirror-trailingBreak:only-child)';
12
14
  var getPlaceholderStyle = function getPlaceholderStyle(message) {
13
15
  if (editorExperiment('platform_editor_controls', 'variant1')) {
14
- return css({
15
- // when paragraph is the only child, and it only has a trailingBreak.
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
17
- '.ProseMirror .layoutSectionView-content-wrap.selected [data-layout-column] > [data-layout-content] > p:only-child:has(.ProseMirror-trailingBreak:only-child)': {
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
19
- '&::before': {
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
21
- content: "\"".concat(message, "\""),
22
- position: 'absolute',
23
- color: "var(--ds-text-subtlest, #626F86)",
24
- pointerEvents: 'none'
25
- }
16
+ return css(_defineProperty({}, "".concat(PLACEHOLDER_SELECTOR), {
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
18
+ '&::before': {
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
20
+ content: "\"".concat(message, "\""),
21
+ position: 'absolute',
22
+ color: "var(--ds-text-subtlest, #626F86)",
23
+ pointerEvents: 'none'
26
24
  }
27
- });
25
+ }));
28
26
  }
29
27
  return css({
30
28
  // when paragraph is the only child, and it only has a trailingBreak.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^47.6.0",
37
- "@atlaskit/editor-common": "^102.9.0",
37
+ "@atlaskit/editor-common": "^102.10.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
40
40
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",