@atlaskit/editor-common 94.1.0 → 94.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,26 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 94.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#155345](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155345)
8
+ [`9f00717c4915b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9f00717c4915b) -
9
+ [ux] Add layout placeholder behind feature gate
10
+ - Updated dependencies
11
+
12
+ ## 94.2.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#152897](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152897)
17
+ [`ecafb0e3e4fdf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ecafb0e3e4fdf) -
18
+ [ux] [ED-25418] Fix z-indexes for media badges in renderer
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 94.1.0
4
25
 
5
26
  ### Minor Changes
@@ -24,6 +24,15 @@ var containerStyles = (0, _primitives.xcss)({
24
24
  width: 'fit-content',
25
25
  margin: 'space.075'
26
26
  });
27
+
28
+ // The above styles are used for both editor and renderer, and in renderer the
29
+ // document body is the main scroll area. This means it overscrolls the primary
30
+ // toolbar, where the z-index is "2". We have to hack in our own z-index less
31
+ // than that to ensure our badge appears under the toolbar when scrolled.
32
+ var hackedZIndexStyles = (0, _primitives.xcss)({
33
+ // @ts-ignore
34
+ zIndex: '1'
35
+ });
27
36
  var resizeOffsetStyles = (0, _primitives.xcss)({
28
37
  right: 'space.150'
29
38
  });
@@ -39,7 +48,9 @@ var MediaBadges = exports.MediaBadges = function MediaBadges(_ref) {
39
48
  mediaElement = _ref.mediaElement,
40
49
  mediaWidth = _ref.mediaWidth,
41
50
  mediaHeight = _ref.mediaHeight,
42
- extendedResizeOffset = _ref.extendedResizeOffset;
51
+ extendedResizeOffset = _ref.extendedResizeOffset,
52
+ _ref$useMinimumZIndex = _ref.useMinimumZIndex,
53
+ useMinimumZIndex = _ref$useMinimumZIndex === void 0 ? false : _ref$useMinimumZIndex;
43
54
  var _useState = (0, _react.useState)(getBadgeSize(mediaWidth, mediaHeight)),
44
55
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
45
56
  badgeSize = _useState2[0],
@@ -73,6 +84,6 @@ var MediaBadges = exports.MediaBadges = function MediaBadges(_ref) {
73
84
  testId: "media-badges",
74
85
  "data-media-badges": "true",
75
86
  contentEditable: false,
76
- xcss: [containerStyles, extendedResizeOffset && resizeOffsetStyles, badgeSize === 'small' && smallBadgeStyles]
87
+ xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles, badgeSize === 'small' && smallBadgeStyles]
77
88
  }, children);
78
89
  };
@@ -40,5 +40,10 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntlNext.defineMessage
40
40
  id: 'fabric.editor.floatingToolbar.floatingToolbarRadioGroupAriaLabel',
41
41
  defaultMessage: 'Layout options',
42
42
  description: "a floating toolbar radiogroup's aria label"
43
+ },
44
+ layoutPlaceholder: {
45
+ id: 'fabric.editor.layout.placeholder',
46
+ defaultMessage: 'Add content',
47
+ description: 'Add placeholder text for empty layout'
43
48
  }
44
49
  });
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "94.1.0";
20
+ var packageVersion = "94.2.1";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "94.1.0";
27
+ var packageVersion = "94.2.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -13,6 +13,15 @@ const containerStyles = xcss({
13
13
  width: 'fit-content',
14
14
  margin: 'space.075'
15
15
  });
16
+
17
+ // The above styles are used for both editor and renderer, and in renderer the
18
+ // document body is the main scroll area. This means it overscrolls the primary
19
+ // toolbar, where the z-index is "2". We have to hack in our own z-index less
20
+ // than that to ensure our badge appears under the toolbar when scrolled.
21
+ const hackedZIndexStyles = xcss({
22
+ // @ts-ignore
23
+ zIndex: '1'
24
+ });
16
25
  const resizeOffsetStyles = xcss({
17
26
  right: 'space.150'
18
27
  });
@@ -28,7 +37,8 @@ export const MediaBadges = ({
28
37
  mediaElement,
29
38
  mediaWidth,
30
39
  mediaHeight,
31
- extendedResizeOffset
40
+ extendedResizeOffset,
41
+ useMinimumZIndex = false
32
42
  }) => {
33
43
  const [badgeSize, setBadgeSize] = useState(getBadgeSize(mediaWidth, mediaHeight));
34
44
  useEffect(() => {
@@ -60,6 +70,6 @@ export const MediaBadges = ({
60
70
  testId: "media-badges",
61
71
  "data-media-badges": "true",
62
72
  contentEditable: false,
63
- xcss: [containerStyles, extendedResizeOffset && resizeOffsetStyles, badgeSize === 'small' && smallBadgeStyles]
73
+ xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles, badgeSize === 'small' && smallBadgeStyles]
64
74
  }, children);
65
75
  };
@@ -34,5 +34,10 @@ export const toolbarMessages = defineMessages({
34
34
  id: 'fabric.editor.floatingToolbar.floatingToolbarRadioGroupAriaLabel',
35
35
  defaultMessage: 'Layout options',
36
36
  description: "a floating toolbar radiogroup's aria label"
37
+ },
38
+ layoutPlaceholder: {
39
+ id: 'fabric.editor.layout.placeholder',
40
+ defaultMessage: 'Add content',
41
+ description: 'Add placeholder text for empty layout'
37
42
  }
38
43
  });
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "94.1.0";
4
+ const packageVersion = "94.2.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "94.1.0";
16
+ const packageVersion = "94.2.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -14,6 +14,15 @@ var containerStyles = xcss({
14
14
  width: 'fit-content',
15
15
  margin: 'space.075'
16
16
  });
17
+
18
+ // The above styles are used for both editor and renderer, and in renderer the
19
+ // document body is the main scroll area. This means it overscrolls the primary
20
+ // toolbar, where the z-index is "2". We have to hack in our own z-index less
21
+ // than that to ensure our badge appears under the toolbar when scrolled.
22
+ var hackedZIndexStyles = xcss({
23
+ // @ts-ignore
24
+ zIndex: '1'
25
+ });
17
26
  var resizeOffsetStyles = xcss({
18
27
  right: 'space.150'
19
28
  });
@@ -29,7 +38,9 @@ export var MediaBadges = function MediaBadges(_ref) {
29
38
  mediaElement = _ref.mediaElement,
30
39
  mediaWidth = _ref.mediaWidth,
31
40
  mediaHeight = _ref.mediaHeight,
32
- extendedResizeOffset = _ref.extendedResizeOffset;
41
+ extendedResizeOffset = _ref.extendedResizeOffset,
42
+ _ref$useMinimumZIndex = _ref.useMinimumZIndex,
43
+ useMinimumZIndex = _ref$useMinimumZIndex === void 0 ? false : _ref$useMinimumZIndex;
33
44
  var _useState = useState(getBadgeSize(mediaWidth, mediaHeight)),
34
45
  _useState2 = _slicedToArray(_useState, 2),
35
46
  badgeSize = _useState2[0],
@@ -63,6 +74,6 @@ export var MediaBadges = function MediaBadges(_ref) {
63
74
  testId: "media-badges",
64
75
  "data-media-badges": "true",
65
76
  contentEditable: false,
66
- xcss: [containerStyles, extendedResizeOffset && resizeOffsetStyles, badgeSize === 'small' && smallBadgeStyles]
77
+ xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles, badgeSize === 'small' && smallBadgeStyles]
67
78
  }, children);
68
79
  };
@@ -34,5 +34,10 @@ export var toolbarMessages = defineMessages({
34
34
  id: 'fabric.editor.floatingToolbar.floatingToolbarRadioGroupAriaLabel',
35
35
  defaultMessage: 'Layout options',
36
36
  description: "a floating toolbar radiogroup's aria label"
37
+ },
38
+ layoutPlaceholder: {
39
+ id: 'fabric.editor.layout.placeholder',
40
+ defaultMessage: 'Add content',
41
+ description: 'Add placeholder text for empty layout'
37
42
  }
38
43
  });
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "94.1.0";
10
+ var packageVersion = "94.2.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
21
21
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "94.1.0";
24
+ var packageVersion = "94.2.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -4,9 +4,10 @@ type ExternalImageBadgeProps = {
4
4
  mediaHeight?: number;
5
5
  mediaWidth?: number;
6
6
  extendedResizeOffset?: boolean;
7
+ useMinimumZIndex?: boolean;
7
8
  children: ReactNode | ((props: {
8
9
  badgeSize: 'medium' | 'small';
9
10
  }) => ReactNode);
10
11
  };
11
- export declare const MediaBadges: ({ children, mediaElement, mediaWidth, mediaHeight, extendedResizeOffset, }: ExternalImageBadgeProps) => JSX.Element | null;
12
+ export declare const MediaBadges: ({ children, mediaElement, mediaWidth, mediaHeight, extendedResizeOffset, useMinimumZIndex, }: ExternalImageBadgeProps) => JSX.Element | null;
12
13
  export {};
@@ -34,4 +34,9 @@ export declare const toolbarMessages: {
34
34
  defaultMessage: string;
35
35
  description: string;
36
36
  };
37
+ layoutPlaceholder: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
37
42
  };
@@ -4,9 +4,10 @@ type ExternalImageBadgeProps = {
4
4
  mediaHeight?: number;
5
5
  mediaWidth?: number;
6
6
  extendedResizeOffset?: boolean;
7
+ useMinimumZIndex?: boolean;
7
8
  children: ReactNode | ((props: {
8
9
  badgeSize: 'medium' | 'small';
9
10
  }) => ReactNode);
10
11
  };
11
- export declare const MediaBadges: ({ children, mediaElement, mediaWidth, mediaHeight, extendedResizeOffset, }: ExternalImageBadgeProps) => JSX.Element | null;
12
+ export declare const MediaBadges: ({ children, mediaElement, mediaWidth, mediaHeight, extendedResizeOffset, useMinimumZIndex, }: ExternalImageBadgeProps) => JSX.Element | null;
12
13
  export {};
@@ -34,4 +34,9 @@ export declare const toolbarMessages: {
34
34
  defaultMessage: string;
35
35
  description: string;
36
36
  };
37
+ layoutPlaceholder: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
37
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "94.1.0",
3
+ "version": "94.2.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -110,47 +110,47 @@
110
110
  "dependencies": {
111
111
  "@atlaskit/activity-provider": "^2.4.0",
112
112
  "@atlaskit/adf-schema": "^42.3.1",
113
- "@atlaskit/adf-utils": "^19.9.0",
113
+ "@atlaskit/adf-utils": "^19.10.0",
114
114
  "@atlaskit/analytics-listeners": "^8.11.0",
115
115
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
116
116
  "@atlaskit/analytics-next": "^10.1.0",
117
117
  "@atlaskit/atlassian-context": "^0.0.2",
118
- "@atlaskit/button": "^20.2.0",
118
+ "@atlaskit/button": "^20.3.0",
119
119
  "@atlaskit/code": "^15.6.0",
120
120
  "@atlaskit/codemod-utils": "^4.2.0",
121
121
  "@atlaskit/custom-steps": "^0.8.0",
122
- "@atlaskit/dropdown-menu": "^12.20.0",
122
+ "@atlaskit/dropdown-menu": "^12.21.0",
123
123
  "@atlaskit/editor-json-transformer": "^8.20.0",
124
- "@atlaskit/editor-palette": "1.6.1",
124
+ "@atlaskit/editor-palette": "1.6.2",
125
125
  "@atlaskit/editor-prosemirror": "6.0.0",
126
126
  "@atlaskit/editor-shared-styles": "^3.0.0",
127
127
  "@atlaskit/editor-tables": "^2.8.0",
128
128
  "@atlaskit/emoji": "^67.8.0",
129
- "@atlaskit/icon": "^22.23.0",
130
- "@atlaskit/icon-object": "^6.6.0",
129
+ "@atlaskit/icon": "^22.24.0",
130
+ "@atlaskit/icon-object": "^6.7.0",
131
131
  "@atlaskit/link-datasource": "^3.6.0",
132
132
  "@atlaskit/link-picker": "^1.47.0",
133
- "@atlaskit/media-card": "^78.7.0",
133
+ "@atlaskit/media-card": "^78.8.0",
134
134
  "@atlaskit/media-client": "^28.0.0",
135
135
  "@atlaskit/media-client-react": "^2.2.0",
136
136
  "@atlaskit/media-common": "^11.6.0",
137
137
  "@atlaskit/media-file-preview": "^0.9.0",
138
138
  "@atlaskit/media-picker": "^66.7.0",
139
139
  "@atlaskit/media-ui": "^25.16.0",
140
- "@atlaskit/media-viewer": "49.2.1",
140
+ "@atlaskit/media-viewer": "49.2.2",
141
141
  "@atlaskit/mention": "^23.3.0",
142
142
  "@atlaskit/menu": "^2.13.0",
143
143
  "@atlaskit/onboarding": "^11.2.0",
144
144
  "@atlaskit/platform-feature-flags": "^0.3.0",
145
145
  "@atlaskit/primitives": "^12.2.0",
146
- "@atlaskit/profilecard": "^20.6.0",
146
+ "@atlaskit/profilecard": "^20.8.0",
147
147
  "@atlaskit/section-message": "^6.6.0",
148
148
  "@atlaskit/smart-card": "^30.1.0",
149
149
  "@atlaskit/smart-user-picker": "^6.11.0",
150
150
  "@atlaskit/spinner": "^16.3.0",
151
151
  "@atlaskit/task-decision": "^17.11.0",
152
152
  "@atlaskit/textfield": "^6.5.0",
153
- "@atlaskit/tmp-editor-statsig": "^2.7.0",
153
+ "@atlaskit/tmp-editor-statsig": "^2.8.0",
154
154
  "@atlaskit/tokens": "^2.0.0",
155
155
  "@atlaskit/tooltip": "^18.8.0",
156
156
  "@atlaskit/width-detector": "^4.3.0",