@atlaskit/editor-common 74.50.3 → 74.50.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/media-single/index.js +12 -0
  3. package/dist/cjs/media-single/utils.js +63 -3
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/quick-insert/assets/heading1.js +23 -6
  6. package/dist/cjs/quick-insert/assets/heading2.js +23 -6
  7. package/dist/cjs/quick-insert/assets/heading3.js +23 -6
  8. package/dist/cjs/quick-insert/assets/heading4.js +23 -6
  9. package/dist/cjs/quick-insert/assets/heading5.js +23 -6
  10. package/dist/cjs/quick-insert/assets/heading6.js +23 -6
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/es2019/media-single/index.js +1 -1
  13. package/dist/es2019/media-single/utils.js +59 -1
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/quick-insert/assets/heading1.js +24 -6
  16. package/dist/es2019/quick-insert/assets/heading2.js +24 -6
  17. package/dist/es2019/quick-insert/assets/heading3.js +24 -6
  18. package/dist/es2019/quick-insert/assets/heading4.js +24 -6
  19. package/dist/es2019/quick-insert/assets/heading5.js +24 -6
  20. package/dist/es2019/quick-insert/assets/heading6.js +24 -6
  21. package/dist/es2019/ui/DropList/index.js +1 -1
  22. package/dist/esm/media-single/index.js +1 -1
  23. package/dist/esm/media-single/utils.js +57 -0
  24. package/dist/esm/monitoring/error.js +1 -1
  25. package/dist/esm/quick-insert/assets/heading1.js +23 -6
  26. package/dist/esm/quick-insert/assets/heading2.js +23 -6
  27. package/dist/esm/quick-insert/assets/heading3.js +23 -6
  28. package/dist/esm/quick-insert/assets/heading4.js +23 -6
  29. package/dist/esm/quick-insert/assets/heading5.js +23 -6
  30. package/dist/esm/quick-insert/assets/heading6.js +23 -6
  31. package/dist/esm/ui/DropList/index.js +1 -1
  32. package/dist/types/media-single/index.d.ts +1 -1
  33. package/dist/types/media-single/utils.d.ts +15 -0
  34. package/dist/types-ts4.5/media-single/index.d.ts +1 -1
  35. package/dist/types-ts4.5/media-single/utils.d.ts +15 -0
  36. package/package.json +1 -1
@@ -1,7 +1,10 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading1() {
5
+ const {
6
+ iconThemed
7
+ } = useIconThemed();
5
8
  return /*#__PURE__*/React.createElement("svg", {
6
9
  focusable: "false",
7
10
  "aria-hidden": true,
@@ -11,24 +14,36 @@ export default function IconHeading1() {
11
14
  fill: "none",
12
15
  fillRule: "evenodd"
13
16
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
17
+ fill: iconThemed({
18
+ light: '#FFF',
19
+ dark: '#161A1D'
20
+ }),
15
21
  d: "M0 0h40v40H0z"
16
22
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
23
+ fill: iconThemed({
24
+ light: '#C1C7D0',
25
+ dark: '#454F59'
26
+ }),
18
27
  x: 6,
19
28
  y: 32,
20
29
  width: 20,
21
30
  height: 1,
22
31
  rx: 0.5
23
32
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
33
+ fill: iconThemed({
34
+ light: '#C1C7D0',
35
+ dark: '#454F59'
36
+ }),
25
37
  x: 6,
26
38
  y: 29,
27
39
  width: 28,
28
40
  height: 1,
29
41
  rx: 0.5
30
42
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
43
+ fill: iconThemed({
44
+ light: '#C1C7D0',
45
+ dark: '#454F59'
46
+ }),
32
47
  x: 6,
33
48
  y: 26,
34
49
  width: 28,
@@ -36,7 +51,10 @@ export default function IconHeading1() {
36
51
  rx: 0.5
37
52
  }), /*#__PURE__*/React.createElement("path", {
38
53
  d: "M16.336 7.232h2.88V23h-2.88v-6.528H8.944V23h-2.88V7.232h2.88v6.624h7.392V7.232zM28.206 23h-2.88V9.992l-3.264 1.2V8.504l4.056-1.272h2.088V23z",
39
- fill: "#172B4D",
54
+ fill: iconThemed({
55
+ light: '#172B4D',
56
+ dark: '#8696A7'
57
+ }),
40
58
  fillRule: "nonzero"
41
59
  })));
42
60
  }
@@ -1,7 +1,10 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading2() {
5
+ const {
6
+ iconThemed
7
+ } = useIconThemed();
5
8
  return /*#__PURE__*/React.createElement("svg", {
6
9
  focusable: "false",
7
10
  "aria-hidden": true,
@@ -11,24 +14,36 @@ export default function IconHeading2() {
11
14
  fill: "none",
12
15
  fillRule: "evenodd"
13
16
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
17
+ fill: iconThemed({
18
+ light: '#FFF',
19
+ dark: '#161A1D'
20
+ }),
15
21
  d: "M0 0h40v40H0z"
16
22
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
23
+ fill: iconThemed({
24
+ light: '#C1C7D0',
25
+ dark: '#454F59'
26
+ }),
18
27
  x: 6,
19
28
  y: 32,
20
29
  width: 20,
21
30
  height: 1,
22
31
  rx: 0.5
23
32
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
33
+ fill: iconThemed({
34
+ light: '#C1C7D0',
35
+ dark: '#454F59'
36
+ }),
25
37
  x: 6,
26
38
  y: 29,
27
39
  width: 28,
28
40
  height: 1,
29
41
  rx: 0.5
30
42
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
43
+ fill: iconThemed({
44
+ light: '#C1C7D0',
45
+ dark: '#454F59'
46
+ }),
32
47
  x: 6,
33
48
  y: 26,
34
49
  width: 28,
@@ -36,7 +51,10 @@ export default function IconHeading2() {
36
51
  rx: 0.5
37
52
  }), /*#__PURE__*/React.createElement("path", {
38
53
  d: "M14.68 8.86h2.4V22h-2.4v-5.44H8.52V22h-2.4V8.86h2.4v5.52h6.16V8.86zM28.88 22h-9.04v-2.2l4.66-3.7c1.14-.92 1.98-1.8 1.98-3.1 0-1.46-.98-2.1-2.48-2.1-1.28 0-2.6.44-3.86 1.16V9.78c.9-.52 2.06-1.12 4.14-1.12 3.14 0 4.58 1.74 4.58 4.26 0 2.02-1.28 3.4-3.04 4.7l-3.3 2.44c1.14-.14 2.74-.26 3.94-.26h2.42V22z",
39
- fill: "#172B4D",
54
+ fill: iconThemed({
55
+ light: '#172B4D',
56
+ dark: '#8696A7'
57
+ }),
40
58
  fillRule: "nonzero"
41
59
  })));
42
60
  }
@@ -1,7 +1,10 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading3() {
5
+ const {
6
+ iconThemed
7
+ } = useIconThemed();
5
8
  return /*#__PURE__*/React.createElement("svg", {
6
9
  focusable: "false",
7
10
  "aria-hidden": true,
@@ -11,24 +14,36 @@ export default function IconHeading3() {
11
14
  fill: "none",
12
15
  fillRule: "evenodd"
13
16
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
17
+ fill: iconThemed({
18
+ light: '#FFF',
19
+ dark: '#161A1D'
20
+ }),
15
21
  d: "M0 0h40v40H0z"
16
22
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
23
+ fill: iconThemed({
24
+ light: '#C1C7D0',
25
+ dark: '#454F59'
26
+ }),
18
27
  x: 6,
19
28
  y: 31,
20
29
  width: 20,
21
30
  height: 1,
22
31
  rx: 0.5
23
32
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
33
+ fill: iconThemed({
34
+ light: '#C1C7D0',
35
+ dark: '#454F59'
36
+ }),
25
37
  x: 6,
26
38
  y: 28,
27
39
  width: 28,
28
40
  height: 1,
29
41
  rx: 0.5
30
42
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
43
+ fill: iconThemed({
44
+ light: '#C1C7D0',
45
+ dark: '#454F59'
46
+ }),
32
47
  x: 6,
33
48
  y: 25,
34
49
  width: 28,
@@ -36,7 +51,10 @@ export default function IconHeading3() {
36
51
  rx: 0.5
37
52
  }), /*#__PURE__*/React.createElement("path", {
38
53
  d: "M13.224 9.488h1.92V20h-1.92v-4.352H8.296V20h-1.92V9.488h1.92v4.416h4.928V9.488zM20.8 20.16c-1.712 0-2.736-.32-3.536-.88v-1.776c1.152.736 2.416.896 3.52.896 1.232 0 1.984-.432 1.984-1.504 0-1.104-.752-1.408-2.112-1.408H19.44v-1.472h1.232c1.216 0 1.92-.384 1.92-1.424 0-1.024-.688-1.52-1.92-1.52-.944 0-2.128.208-3.168.768v-1.744c.736-.416 1.776-.768 3.296-.768 2.544 0 3.696 1.296 3.696 2.816 0 1.424-.544 2.32-2.064 2.64 1.68.256 2.24 1.2 2.24 2.384 0 1.616-1.184 2.992-3.872 2.992z",
39
- fill: "#172B4D",
54
+ fill: iconThemed({
55
+ light: '#172B4D',
56
+ dark: '#8696A7'
57
+ }),
40
58
  fillRule: "nonzero"
41
59
  })));
42
60
  }
@@ -1,7 +1,10 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading4() {
5
+ const {
6
+ iconThemed
7
+ } = useIconThemed();
5
8
  return /*#__PURE__*/React.createElement("svg", {
6
9
  focusable: "false",
7
10
  "aria-hidden": true,
@@ -11,24 +14,36 @@ export default function IconHeading4() {
11
14
  fill: "none",
12
15
  fillRule: "evenodd"
13
16
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
17
+ fill: iconThemed({
18
+ light: '#FFF',
19
+ dark: '#161A1D'
20
+ }),
15
21
  d: "M0 0h40v40H0z"
16
22
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
23
+ fill: iconThemed({
24
+ light: '#C1C7D0',
25
+ dark: '#454F59'
26
+ }),
18
27
  x: 6,
19
28
  y: 30,
20
29
  width: 20,
21
30
  height: 1,
22
31
  rx: 0.5
23
32
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
33
+ fill: iconThemed({
34
+ light: '#C1C7D0',
35
+ dark: '#454F59'
36
+ }),
25
37
  x: 6,
26
38
  y: 27,
27
39
  width: 28,
28
40
  height: 1,
29
41
  rx: 0.5
30
42
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
43
+ fill: iconThemed({
44
+ light: '#C1C7D0',
45
+ dark: '#454F59'
46
+ }),
32
47
  x: 6,
33
48
  y: 24,
34
49
  width: 28,
@@ -36,7 +51,10 @@ export default function IconHeading4() {
36
51
  rx: 0.5
37
52
  }), /*#__PURE__*/React.createElement("path", {
38
53
  d: "M11.804 9.802h2.254V19h-2.254v-3.57H8.206V19H5.952V9.802h2.254v3.654h3.598V9.802zm6.188 4.186l-1.246 1.68a33.67 33.67 0 012.646-.098v-3.78c-.476.812-.994 1.638-1.4 2.198zM21.52 19h-2.24v-1.666h-4.116v-1.946l4.116-5.586h2.24v5.768h1.05v1.764h-1.05V19z",
39
- fill: "#172B4D",
54
+ fill: iconThemed({
55
+ light: '#172B4D',
56
+ dark: '#8696A7'
57
+ }),
40
58
  fillRule: "nonzero"
41
59
  })));
42
60
  }
@@ -1,7 +1,10 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading5() {
5
+ const {
6
+ iconThemed
7
+ } = useIconThemed();
5
8
  return /*#__PURE__*/React.createElement("svg", {
6
9
  focusable: "false",
7
10
  "aria-hidden": true,
@@ -11,24 +14,36 @@ export default function IconHeading5() {
11
14
  fill: "none",
12
15
  fillRule: "evenodd"
13
16
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
17
+ fill: iconThemed({
18
+ light: '#FFF',
19
+ dark: '#161A1D'
20
+ }),
15
21
  d: "M0 0h40v40H0z"
16
22
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
23
+ fill: iconThemed({
24
+ light: '#C1C7D0',
25
+ dark: '#454F59'
26
+ }),
18
27
  x: 6,
19
28
  y: 30,
20
29
  width: 20,
21
30
  height: 1,
22
31
  rx: 0.5
23
32
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
33
+ fill: iconThemed({
34
+ light: '#C1C7D0',
35
+ dark: '#454F59'
36
+ }),
25
37
  x: 6,
26
38
  y: 27,
27
39
  width: 28,
28
40
  height: 1,
29
41
  rx: 0.5
30
42
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
43
+ fill: iconThemed({
44
+ light: '#C1C7D0',
45
+ dark: '#454F59'
46
+ }),
32
47
  x: 6,
33
48
  y: 24,
34
49
  width: 28,
@@ -36,7 +51,10 @@ export default function IconHeading5() {
36
51
  rx: 0.5
37
52
  }), /*#__PURE__*/React.createElement("path", {
38
53
  d: "M10.832 11.116h1.932V19h-1.932v-3.06H7.748V19H5.816v-7.884h1.932v3.132h3.084v-3.132zm6.024 8.016c-1.152 0-2.124-.252-2.796-.684v-1.716a5.307 5.307 0 002.676.744c.852 0 1.308-.288 1.308-.984 0-.744-.456-.984-1.2-.984-.396 0-.816.096-1.176.24l-1.308-.504v-4.128h5.124v1.644h-3.48v1.896c.372-.168.852-.288 1.452-.288 1.656 0 2.4.9 2.4 2.304 0 1.476-.924 2.46-3 2.46z",
39
- fill: "#172B4D",
54
+ fill: iconThemed({
55
+ light: '#172B4D',
56
+ dark: '#8696A7'
57
+ }),
40
58
  fillRule: "nonzero"
41
59
  })));
42
60
  }
@@ -1,7 +1,10 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading6() {
5
+ const {
6
+ iconThemed
7
+ } = useIconThemed();
5
8
  return /*#__PURE__*/React.createElement("svg", {
6
9
  focusable: "false",
7
10
  "aria-hidden": true,
@@ -11,24 +14,36 @@ export default function IconHeading6() {
11
14
  fill: "none",
12
15
  fillRule: "evenodd"
13
16
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
17
+ fill: iconThemed({
18
+ light: '#FFF',
19
+ dark: '#161A1D'
20
+ }),
15
21
  d: "M0 0h40v40H0z"
16
22
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
23
+ fill: iconThemed({
24
+ light: '#C1C7D0',
25
+ dark: '#454F59'
26
+ }),
18
27
  x: 6,
19
28
  y: 30,
20
29
  width: 20,
21
30
  height: 1,
22
31
  rx: 0.5
23
32
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
33
+ fill: iconThemed({
34
+ light: '#C1C7D0',
35
+ dark: '#454F59'
36
+ }),
25
37
  x: 6,
26
38
  y: 27,
27
39
  width: 28,
28
40
  height: 1,
29
41
  rx: 0.5
30
42
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
43
+ fill: iconThemed({
44
+ light: '#C1C7D0',
45
+ dark: '#454F59'
46
+ }),
32
47
  x: 6,
33
48
  y: 24,
34
49
  width: 28,
@@ -36,7 +51,10 @@ export default function IconHeading6() {
36
51
  rx: 0.5
37
52
  }), /*#__PURE__*/React.createElement("path", {
38
53
  d: "M12.675 19h-1.622v-3.239H7.562V19H5.94v-7.75h1.622v3.125h3.491V11.25h1.622V19zm4.878.199c-1.122 0-2.025-.494-2.556-1.402-.43-.66-.65-1.552-.65-2.616 0-2.573 1.213-4.13 3.233-4.13 1.472 0 2.616.87 2.836 2.164H18.81c-.15-.51-.634-.832-1.24-.832-1.064 0-1.709 1.026-1.677 2.632h.097c.355-.73 1.074-1.144 1.977-1.144 1.471 0 2.551 1.09 2.551 2.572 0 1.612-1.23 2.756-2.965 2.756zm-.016-1.332c.795 0 1.407-.596 1.407-1.375 0-.79-.59-1.37-1.402-1.37-.81 0-1.407.58-1.407 1.354 0 .79.607 1.39 1.402 1.39z",
39
- fill: "#97A0AF",
54
+ fill: iconThemed({
55
+ light: '#97A0AF',
56
+ dark: '#5A6977'
57
+ }),
40
58
  fillRule: "nonzero"
41
59
  })));
42
60
  }
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import Layer from '../Layer';
10
10
  const packageName = "@atlaskit/editor-common";
11
- const packageVersion = "74.50.3";
11
+ const packageVersion = "74.50.4";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = '0, 8';
14
14
  class DropList extends Component {
@@ -1,2 +1,2 @@
1
1
  export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts } from './constants';
2
- export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest } from './utils';
2
+ export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest, getMaxWidthForNestedNode, getMaxWidthForNestedNodeNext } from './utils';
@@ -1,4 +1,5 @@
1
1
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
+ import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
2
3
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
3
4
 
4
5
  /**
@@ -127,4 +128,60 @@ export function calculateOffsetLeft(insideInlineLike, insideLayout, pmViewDom, w
127
128
  export var roundToNearest = function roundToNearest(value) {
128
129
  var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_ROUNDING_INTERVAL;
129
130
  return Math.round(value / interval) * interval;
131
+ };
132
+
133
+ /**
134
+ * Get parent width for a nested media single node
135
+ * @param view Editor view
136
+ * @param pos node position
137
+ */
138
+ export var getMaxWidthForNestedNode = function getMaxWidthForNestedNode(view, pos) {
139
+ if (typeof pos !== 'number') {
140
+ return null;
141
+ }
142
+ if (isRichMediaInsideOfBlockNode(view, pos)) {
143
+ var $pos = view.state.doc.resolve(pos);
144
+ var domNode = view.nodeDOM($pos.pos);
145
+ if ($pos.nodeAfter && floatingLayouts.indexOf($pos.nodeAfter.attrs.layout) > -1 && domNode && domNode.parentElement) {
146
+ return domNode.parentElement.offsetWidth;
147
+ }
148
+ if (domNode instanceof HTMLElement) {
149
+ return domNode.offsetWidth;
150
+ }
151
+ }
152
+ return null;
153
+ };
154
+
155
+ /**
156
+ * Get parent width for a nested media single node for new experience
157
+ * @param view Editor view
158
+ * @param pos node position
159
+ */
160
+ export var getMaxWidthForNestedNodeNext = function getMaxWidthForNestedNodeNext(view, pos) {
161
+ if (typeof pos !== 'number') {
162
+ return null;
163
+ }
164
+ var $pos = view.state.doc.resolve(pos);
165
+ if ($pos && $pos.parent.type.name !== 'doc') {
166
+ return getParentWidthForNestedMediaSingleNode($pos, view);
167
+ }
168
+ return null;
169
+ };
170
+ export var getParentWidthForNestedMediaSingleNode = function getParentWidthForNestedMediaSingleNode(resolvedPos, view) {
171
+ var domNode = view.nodeDOM(resolvedPos.pos);
172
+ if (resolvedPos.nodeAfter && floatingLayouts.includes(resolvedPos.nodeAfter.attrs.layout) && domNode && domNode.parentElement) {
173
+ var _view$state$schema$no = view.state.schema.nodes,
174
+ tableCell = _view$state$schema$no.tableCell,
175
+ tableHeader = _view$state$schema$no.tableHeader;
176
+ if ([tableCell, tableHeader].includes(resolvedPos.parent.type)) {
177
+ // since table has constant padding, use hardcoded constant instead of query the dom
178
+ var tablePadding = 8;
179
+ return domNode.parentElement.offsetWidth - tablePadding * 2;
180
+ }
181
+ return domNode.parentElement.offsetWidth;
182
+ }
183
+ if (domNode instanceof HTMLElement) {
184
+ return domNode.offsetWidth;
185
+ }
186
+ return null;
130
187
  };
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "74.50.3";
9
+ var packageVersion = "74.50.4";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -1,7 +1,9 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading1() {
5
+ var _useIconThemed = useIconThemed(),
6
+ iconThemed = _useIconThemed.iconThemed;
5
7
  return /*#__PURE__*/React.createElement("svg", {
6
8
  focusable: "false",
7
9
  "aria-hidden": true,
@@ -11,24 +13,36 @@ export default function IconHeading1() {
11
13
  fill: "none",
12
14
  fillRule: "evenodd"
13
15
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
16
+ fill: iconThemed({
17
+ light: '#FFF',
18
+ dark: '#161A1D'
19
+ }),
15
20
  d: "M0 0h40v40H0z"
16
21
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
22
+ fill: iconThemed({
23
+ light: '#C1C7D0',
24
+ dark: '#454F59'
25
+ }),
18
26
  x: 6,
19
27
  y: 32,
20
28
  width: 20,
21
29
  height: 1,
22
30
  rx: 0.5
23
31
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
32
+ fill: iconThemed({
33
+ light: '#C1C7D0',
34
+ dark: '#454F59'
35
+ }),
25
36
  x: 6,
26
37
  y: 29,
27
38
  width: 28,
28
39
  height: 1,
29
40
  rx: 0.5
30
41
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
42
+ fill: iconThemed({
43
+ light: '#C1C7D0',
44
+ dark: '#454F59'
45
+ }),
32
46
  x: 6,
33
47
  y: 26,
34
48
  width: 28,
@@ -36,7 +50,10 @@ export default function IconHeading1() {
36
50
  rx: 0.5
37
51
  }), /*#__PURE__*/React.createElement("path", {
38
52
  d: "M16.336 7.232h2.88V23h-2.88v-6.528H8.944V23h-2.88V7.232h2.88v6.624h7.392V7.232zM28.206 23h-2.88V9.992l-3.264 1.2V8.504l4.056-1.272h2.088V23z",
39
- fill: "#172B4D",
53
+ fill: iconThemed({
54
+ light: '#172B4D',
55
+ dark: '#8696A7'
56
+ }),
40
57
  fillRule: "nonzero"
41
58
  })));
42
59
  }
@@ -1,7 +1,9 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading2() {
5
+ var _useIconThemed = useIconThemed(),
6
+ iconThemed = _useIconThemed.iconThemed;
5
7
  return /*#__PURE__*/React.createElement("svg", {
6
8
  focusable: "false",
7
9
  "aria-hidden": true,
@@ -11,24 +13,36 @@ export default function IconHeading2() {
11
13
  fill: "none",
12
14
  fillRule: "evenodd"
13
15
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
16
+ fill: iconThemed({
17
+ light: '#FFF',
18
+ dark: '#161A1D'
19
+ }),
15
20
  d: "M0 0h40v40H0z"
16
21
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
22
+ fill: iconThemed({
23
+ light: '#C1C7D0',
24
+ dark: '#454F59'
25
+ }),
18
26
  x: 6,
19
27
  y: 32,
20
28
  width: 20,
21
29
  height: 1,
22
30
  rx: 0.5
23
31
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
32
+ fill: iconThemed({
33
+ light: '#C1C7D0',
34
+ dark: '#454F59'
35
+ }),
25
36
  x: 6,
26
37
  y: 29,
27
38
  width: 28,
28
39
  height: 1,
29
40
  rx: 0.5
30
41
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
42
+ fill: iconThemed({
43
+ light: '#C1C7D0',
44
+ dark: '#454F59'
45
+ }),
32
46
  x: 6,
33
47
  y: 26,
34
48
  width: 28,
@@ -36,7 +50,10 @@ export default function IconHeading2() {
36
50
  rx: 0.5
37
51
  }), /*#__PURE__*/React.createElement("path", {
38
52
  d: "M14.68 8.86h2.4V22h-2.4v-5.44H8.52V22h-2.4V8.86h2.4v5.52h6.16V8.86zM28.88 22h-9.04v-2.2l4.66-3.7c1.14-.92 1.98-1.8 1.98-3.1 0-1.46-.98-2.1-2.48-2.1-1.28 0-2.6.44-3.86 1.16V9.78c.9-.52 2.06-1.12 4.14-1.12 3.14 0 4.58 1.74 4.58 4.26 0 2.02-1.28 3.4-3.04 4.7l-3.3 2.44c1.14-.14 2.74-.26 3.94-.26h2.42V22z",
39
- fill: "#172B4D",
53
+ fill: iconThemed({
54
+ light: '#172B4D',
55
+ dark: '#8696A7'
56
+ }),
40
57
  fillRule: "nonzero"
41
58
  })));
42
59
  }
@@ -1,7 +1,9 @@
1
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4138
2
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
2
  import React from 'react';
3
+ import { useIconThemed } from '../use-icon-themed';
4
4
  export default function IconHeading3() {
5
+ var _useIconThemed = useIconThemed(),
6
+ iconThemed = _useIconThemed.iconThemed;
5
7
  return /*#__PURE__*/React.createElement("svg", {
6
8
  focusable: "false",
7
9
  "aria-hidden": true,
@@ -11,24 +13,36 @@ export default function IconHeading3() {
11
13
  fill: "none",
12
14
  fillRule: "evenodd"
13
15
  }, /*#__PURE__*/React.createElement("path", {
14
- fill: "#FFF",
16
+ fill: iconThemed({
17
+ light: '#FFF',
18
+ dark: '#161A1D'
19
+ }),
15
20
  d: "M0 0h40v40H0z"
16
21
  }), /*#__PURE__*/React.createElement("rect", {
17
- fill: "#C1C7D0",
22
+ fill: iconThemed({
23
+ light: '#C1C7D0',
24
+ dark: '#454F59'
25
+ }),
18
26
  x: 6,
19
27
  y: 31,
20
28
  width: 20,
21
29
  height: 1,
22
30
  rx: 0.5
23
31
  }), /*#__PURE__*/React.createElement("rect", {
24
- fill: "#C1C7D0",
32
+ fill: iconThemed({
33
+ light: '#C1C7D0',
34
+ dark: '#454F59'
35
+ }),
25
36
  x: 6,
26
37
  y: 28,
27
38
  width: 28,
28
39
  height: 1,
29
40
  rx: 0.5
30
41
  }), /*#__PURE__*/React.createElement("rect", {
31
- fill: "#C1C7D0",
42
+ fill: iconThemed({
43
+ light: '#C1C7D0',
44
+ dark: '#454F59'
45
+ }),
32
46
  x: 6,
33
47
  y: 25,
34
48
  width: 28,
@@ -36,7 +50,10 @@ export default function IconHeading3() {
36
50
  rx: 0.5
37
51
  }), /*#__PURE__*/React.createElement("path", {
38
52
  d: "M13.224 9.488h1.92V20h-1.92v-4.352H8.296V20h-1.92V9.488h1.92v4.416h4.928V9.488zM20.8 20.16c-1.712 0-2.736-.32-3.536-.88v-1.776c1.152.736 2.416.896 3.52.896 1.232 0 1.984-.432 1.984-1.504 0-1.104-.752-1.408-2.112-1.408H19.44v-1.472h1.232c1.216 0 1.92-.384 1.92-1.424 0-1.024-.688-1.52-1.92-1.52-.944 0-2.128.208-3.168.768v-1.744c.736-.416 1.776-.768 3.296-.768 2.544 0 3.696 1.296 3.696 2.816 0 1.424-.544 2.32-2.064 2.64 1.68.256 2.24 1.2 2.24 2.384 0 1.616-1.184 2.992-3.872 2.992z",
39
- fill: "#172B4D",
53
+ fill: iconThemed({
54
+ light: '#172B4D',
55
+ dark: '#8696A7'
56
+ }),
40
57
  fillRule: "nonzero"
41
58
  })));
42
59
  }