@atlaskit/editor-common 93.1.3 → 93.1.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 +8 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/headings.js +40 -5
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/headings.js +35 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/headings.js +40 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 93.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149749](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149749)
|
|
8
|
+
[`0b3df6a89bf6c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0b3df6a89bf6c) -
|
|
9
|
+
[ux] ED-24886 Set marginTop of first heading with right or centre align to default marginTop
|
|
10
|
+
|
|
3
11
|
## 93.1.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -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 = "93.1.
|
|
20
|
+
var packageVersion = "93.1.4";
|
|
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
|
|
@@ -1,18 +1,53 @@
|
|
|
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.headingsSharedStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _react = require("@emotion/react");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @atlaskit/design-system/use-tokens-space */ /* eslint-disable @atlaskit/design-system/use-tokens-typography */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
+
var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
14
|
+
return (
|
|
15
|
+
// Override marginTop: 0 with default margin found in headingsSharedStyles for first heading in alignment block that is not the first child
|
|
16
|
+
(0, _platformFeatureFlags.fg)('platform_editor_heading_margin_fix') ? {
|
|
17
|
+
'.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
|
|
18
|
+
'> h1:first-child': {
|
|
19
|
+
marginTop: '1.667em'
|
|
20
|
+
},
|
|
21
|
+
' > h2:first-child': {
|
|
22
|
+
marginTop: '1.8em'
|
|
23
|
+
},
|
|
24
|
+
'> h3:first-child': {
|
|
25
|
+
marginTop: '2em'
|
|
26
|
+
},
|
|
27
|
+
'> h4:first-child': {
|
|
28
|
+
marginTop: '1.357em'
|
|
29
|
+
},
|
|
30
|
+
'> h5:first-child': {
|
|
31
|
+
marginTop: '1.667em'
|
|
32
|
+
},
|
|
33
|
+
'> h6:first-child': {
|
|
34
|
+
marginTop: '1.455em'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
// Set marginTop: 0 if alignment block is next to a gap cursor or widget that is first child
|
|
38
|
+
'.ProseMirror-gapcursor:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .ProseMirror-widget:nth-child(2) + .fabric-editor-block-mark.fabric-editor-alignment': {
|
|
39
|
+
'> :is(h1, h2, h3, h4, h5, h6):first-child': {
|
|
40
|
+
marginTop: '0'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
} : {}
|
|
44
|
+
);
|
|
45
|
+
};
|
|
11
46
|
|
|
12
47
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
13
48
|
// text sizing prototype: http://proto/fabricrender/
|
|
14
49
|
var headingsSharedStyles = exports.headingsSharedStyles = function headingsSharedStyles() {
|
|
15
|
-
return (0, _react.css)({
|
|
50
|
+
return (0, _react.css)(_objectSpread({
|
|
16
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
52
|
'& h1': {
|
|
18
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -82,5 +117,5 @@ var headingsSharedStyles = exports.headingsSharedStyles = function headingsShare
|
|
|
82
117
|
marginTop: '1.455em',
|
|
83
118
|
textTransform: 'none'
|
|
84
119
|
}
|
|
85
|
-
});
|
|
120
|
+
}, headingWithAlignmentStyles()));
|
|
86
121
|
};
|
|
@@ -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 = "93.1.
|
|
27
|
+
var packageVersion = "93.1.4";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -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 = "93.1.
|
|
4
|
+
const packageVersion = "93.1.4";
|
|
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
|
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
const headingWithAlignmentStyles = () =>
|
|
7
|
+
// Override marginTop: 0 with default margin found in headingsSharedStyles for first heading in alignment block that is not the first child
|
|
8
|
+
fg('platform_editor_heading_margin_fix') ? {
|
|
9
|
+
'.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
|
|
10
|
+
'> h1:first-child': {
|
|
11
|
+
marginTop: '1.667em'
|
|
12
|
+
},
|
|
13
|
+
' > h2:first-child': {
|
|
14
|
+
marginTop: '1.8em'
|
|
15
|
+
},
|
|
16
|
+
'> h3:first-child': {
|
|
17
|
+
marginTop: '2em'
|
|
18
|
+
},
|
|
19
|
+
'> h4:first-child': {
|
|
20
|
+
marginTop: '1.357em'
|
|
21
|
+
},
|
|
22
|
+
'> h5:first-child': {
|
|
23
|
+
marginTop: '1.667em'
|
|
24
|
+
},
|
|
25
|
+
'> h6:first-child': {
|
|
26
|
+
marginTop: '1.455em'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
// Set marginTop: 0 if alignment block is next to a gap cursor or widget that is first child
|
|
30
|
+
'.ProseMirror-gapcursor:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .ProseMirror-widget:nth-child(2) + .fabric-editor-block-mark.fabric-editor-alignment': {
|
|
31
|
+
'> :is(h1, h2, h3, h4, h5, h6):first-child': {
|
|
32
|
+
marginTop: '0'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
} : {};
|
|
36
|
+
|
|
5
37
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
6
38
|
// text sizing prototype: http://proto/fabricrender/
|
|
7
39
|
export const headingsSharedStyles = () => css({
|
|
@@ -73,5 +105,7 @@ export const headingsSharedStyles = () => css({
|
|
|
73
105
|
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
74
106
|
marginTop: '1.455em',
|
|
75
107
|
textTransform: 'none'
|
|
76
|
-
}
|
|
108
|
+
},
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
110
|
+
...headingWithAlignmentStyles()
|
|
77
111
|
});
|
|
@@ -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 = "93.1.
|
|
16
|
+
const packageVersion = "93.1.4";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -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 = "93.1.
|
|
10
|
+
var packageVersion = "93.1.4";
|
|
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
|
|
@@ -1,11 +1,49 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1
4
|
/* eslint-disable @atlaskit/design-system/use-tokens-space */
|
|
2
5
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { css } from '@emotion/react';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
10
|
+
return (
|
|
11
|
+
// Override marginTop: 0 with default margin found in headingsSharedStyles for first heading in alignment block that is not the first child
|
|
12
|
+
fg('platform_editor_heading_margin_fix') ? {
|
|
13
|
+
'.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
|
|
14
|
+
'> h1:first-child': {
|
|
15
|
+
marginTop: '1.667em'
|
|
16
|
+
},
|
|
17
|
+
' > h2:first-child': {
|
|
18
|
+
marginTop: '1.8em'
|
|
19
|
+
},
|
|
20
|
+
'> h3:first-child': {
|
|
21
|
+
marginTop: '2em'
|
|
22
|
+
},
|
|
23
|
+
'> h4:first-child': {
|
|
24
|
+
marginTop: '1.357em'
|
|
25
|
+
},
|
|
26
|
+
'> h5:first-child': {
|
|
27
|
+
marginTop: '1.667em'
|
|
28
|
+
},
|
|
29
|
+
'> h6:first-child': {
|
|
30
|
+
marginTop: '1.455em'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
// Set marginTop: 0 if alignment block is next to a gap cursor or widget that is first child
|
|
34
|
+
'.ProseMirror-gapcursor:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .ProseMirror-widget:nth-child(2) + .fabric-editor-block-mark.fabric-editor-alignment': {
|
|
35
|
+
'> :is(h1, h2, h3, h4, h5, h6):first-child': {
|
|
36
|
+
marginTop: '0'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
} : {}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
5
43
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
6
44
|
// text sizing prototype: http://proto/fabricrender/
|
|
7
45
|
export var headingsSharedStyles = function headingsSharedStyles() {
|
|
8
|
-
return css({
|
|
46
|
+
return css(_objectSpread({
|
|
9
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
10
48
|
'& h1': {
|
|
11
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -75,5 +113,5 @@ export var headingsSharedStyles = function headingsSharedStyles() {
|
|
|
75
113
|
marginTop: '1.455em',
|
|
76
114
|
textTransform: 'none'
|
|
77
115
|
}
|
|
78
|
-
});
|
|
116
|
+
}, headingWithAlignmentStyles()));
|
|
79
117
|
};
|
|
@@ -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 = "93.1.
|
|
24
|
+
var packageVersion = "93.1.4";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "93.1.
|
|
3
|
+
"version": "93.1.4",
|
|
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/"
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"@atlaskit/editor-shared-styles": "^3.0.0",
|
|
126
126
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
127
127
|
"@atlaskit/emoji": "^67.8.0",
|
|
128
|
-
"@atlaskit/icon": "^22.
|
|
128
|
+
"@atlaskit/icon": "^22.22.0",
|
|
129
129
|
"@atlaskit/icon-object": "^6.5.0",
|
|
130
130
|
"@atlaskit/link-datasource": "^3.4.0",
|
|
131
131
|
"@atlaskit/link-picker": "^1.47.0",
|
|
@@ -277,6 +277,9 @@
|
|
|
277
277
|
},
|
|
278
278
|
"platform_editor_allow_annotation_triple_click": {
|
|
279
279
|
"type": "boolean"
|
|
280
|
+
},
|
|
281
|
+
"platform_editor_heading_margin_fix": {
|
|
282
|
+
"type": "boolean"
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
285
|
}
|