@atlaskit/editor-common 64.0.0 → 65.0.0
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 +20 -0
- package/dist/cjs/i18n/cs.js +3 -3
- package/dist/cjs/i18n/da.js +3 -3
- package/dist/cjs/i18n/de.js +3 -3
- package/dist/cjs/i18n/en_ZZ.js +27 -0
- package/dist/cjs/i18n/es.js +3 -3
- package/dist/cjs/i18n/fi.js +3 -3
- package/dist/cjs/i18n/fr.js +3 -3
- package/dist/cjs/i18n/hu.js +3 -3
- package/dist/cjs/i18n/it.js +3 -3
- package/dist/cjs/i18n/ja.js +3 -3
- package/dist/cjs/i18n/ko.js +3 -3
- package/dist/cjs/i18n/nb.js +3 -3
- package/dist/cjs/i18n/nl.js +3 -3
- package/dist/cjs/i18n/pl.js +3 -3
- package/dist/cjs/i18n/pt_BR.js +3 -3
- package/dist/cjs/i18n/ru.js +3 -3
- package/dist/cjs/i18n/sv.js +3 -3
- package/dist/cjs/i18n/th.js +3 -3
- package/dist/cjs/i18n/tr.js +3 -3
- package/dist/cjs/i18n/uk.js +3 -3
- package/dist/cjs/i18n/vi.js +3 -3
- package/dist/cjs/i18n/zh.js +3 -2
- package/dist/cjs/i18n/zh_TW.js +3 -3
- package/dist/cjs/index.js +1 -29
- package/dist/cjs/styles/shared/annotation.js +25 -17
- package/dist/cjs/styles/shared/block-marks.js +2 -2
- package/dist/cjs/styles/shared/blockquote.js +2 -2
- package/dist/cjs/styles/shared/code-mark.js +9 -5
- package/dist/cjs/styles/shared/column-layout.js +2 -2
- package/dist/cjs/styles/shared/date.js +2 -2
- package/dist/cjs/styles/shared/headings.js +5 -2
- package/dist/cjs/styles/shared/indentation.js +2 -2
- package/dist/cjs/styles/shared/lists.js +2 -2
- package/dist/cjs/styles/shared/media-single.js +2 -2
- package/dist/cjs/styles/shared/paragraph.js +2 -2
- package/dist/cjs/styles/shared/shadow.js +2 -2
- package/dist/cjs/styles/shared/table.js +37 -33
- package/dist/cjs/styles/shared/task-decision.js +2 -2
- package/dist/cjs/styles/shared/text-color.js +2 -2
- package/dist/cjs/styles/shared/whitespace.js +2 -2
- package/dist/cjs/ui/BaseTheme/index.js +27 -11
- package/dist/cjs/ui/Caption/index.js +10 -7
- package/dist/cjs/ui/MediaSingle/link.js +4 -6
- package/dist/cjs/ui/Messages/index.js +25 -22
- package/dist/cjs/ui/UnsupportedBlock/index.js +9 -6
- package/dist/cjs/ui/UnsupportedInline/index.js +8 -6
- package/dist/cjs/ui/WidthProvider/index.js +8 -9
- package/dist/cjs/ui/clear-next-sibling-margin-top.js +4 -5
- package/dist/cjs/ui/index.js +12 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/cs.js +3 -3
- package/dist/es2019/i18n/da.js +3 -3
- package/dist/es2019/i18n/de.js +3 -3
- package/dist/es2019/i18n/en_ZZ.js +19 -0
- package/dist/es2019/i18n/es.js +3 -3
- package/dist/es2019/i18n/fi.js +3 -3
- package/dist/es2019/i18n/fr.js +3 -3
- package/dist/es2019/i18n/hu.js +3 -3
- package/dist/es2019/i18n/it.js +3 -3
- package/dist/es2019/i18n/ja.js +3 -3
- package/dist/es2019/i18n/ko.js +3 -3
- package/dist/es2019/i18n/nb.js +3 -3
- package/dist/es2019/i18n/nl.js +3 -3
- package/dist/es2019/i18n/pl.js +3 -3
- package/dist/es2019/i18n/pt_BR.js +3 -3
- package/dist/es2019/i18n/ru.js +3 -3
- package/dist/es2019/i18n/sv.js +3 -3
- package/dist/es2019/i18n/th.js +3 -3
- package/dist/es2019/i18n/tr.js +3 -3
- package/dist/es2019/i18n/uk.js +3 -3
- package/dist/es2019/i18n/vi.js +3 -3
- package/dist/es2019/i18n/zh.js +3 -2
- package/dist/es2019/i18n/zh_TW.js +3 -3
- package/dist/es2019/index.js +2 -7
- package/dist/es2019/styles/shared/annotation.js +11 -11
- package/dist/es2019/styles/shared/block-marks.js +1 -1
- package/dist/es2019/styles/shared/blockquote.js +1 -1
- package/dist/es2019/styles/shared/code-mark.js +14 -11
- package/dist/es2019/styles/shared/column-layout.js +1 -1
- package/dist/es2019/styles/shared/date.js +1 -1
- package/dist/es2019/styles/shared/headings.js +8 -8
- package/dist/es2019/styles/shared/indentation.js +1 -1
- package/dist/es2019/styles/shared/lists.js +1 -1
- package/dist/es2019/styles/shared/media-single.js +1 -1
- package/dist/es2019/styles/shared/paragraph.js +1 -1
- package/dist/es2019/styles/shared/shadow.js +1 -1
- package/dist/es2019/styles/shared/table.js +14 -12
- package/dist/es2019/styles/shared/task-decision.js +1 -1
- package/dist/es2019/styles/shared/text-color.js +1 -1
- package/dist/es2019/styles/shared/whitespace.js +1 -1
- package/dist/es2019/ui/BaseTheme/index.js +16 -5
- package/dist/es2019/ui/Caption/index.js +11 -5
- package/dist/es2019/ui/MediaSingle/link.js +3 -4
- package/dist/es2019/ui/Messages/index.js +30 -22
- package/dist/es2019/ui/UnsupportedBlock/index.js +9 -5
- package/dist/es2019/ui/UnsupportedInline/index.js +8 -5
- package/dist/es2019/ui/WidthProvider/index.js +10 -8
- package/dist/es2019/ui/clear-next-sibling-margin-top.js +2 -2
- package/dist/es2019/ui/index.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/cs.js +3 -3
- package/dist/esm/i18n/da.js +3 -3
- package/dist/esm/i18n/de.js +3 -3
- package/dist/esm/i18n/en_ZZ.js +19 -0
- package/dist/esm/i18n/es.js +3 -3
- package/dist/esm/i18n/fi.js +3 -3
- package/dist/esm/i18n/fr.js +3 -3
- package/dist/esm/i18n/hu.js +3 -3
- package/dist/esm/i18n/it.js +3 -3
- package/dist/esm/i18n/ja.js +3 -3
- package/dist/esm/i18n/ko.js +3 -3
- package/dist/esm/i18n/nb.js +3 -3
- package/dist/esm/i18n/nl.js +3 -3
- package/dist/esm/i18n/pl.js +3 -3
- package/dist/esm/i18n/pt_BR.js +3 -3
- package/dist/esm/i18n/ru.js +3 -3
- package/dist/esm/i18n/sv.js +3 -3
- package/dist/esm/i18n/th.js +3 -3
- package/dist/esm/i18n/tr.js +3 -3
- package/dist/esm/i18n/uk.js +3 -3
- package/dist/esm/i18n/vi.js +3 -3
- package/dist/esm/i18n/zh.js +3 -2
- package/dist/esm/i18n/zh_TW.js +3 -3
- package/dist/esm/index.js +2 -7
- package/dist/esm/styles/shared/annotation.js +21 -17
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/blockquote.js +1 -1
- package/dist/esm/styles/shared/code-mark.js +9 -6
- package/dist/esm/styles/shared/column-layout.js +1 -1
- package/dist/esm/styles/shared/date.js +1 -1
- package/dist/esm/styles/shared/headings.js +4 -2
- package/dist/esm/styles/shared/indentation.js +1 -1
- package/dist/esm/styles/shared/lists.js +1 -1
- package/dist/esm/styles/shared/media-single.js +1 -1
- package/dist/esm/styles/shared/paragraph.js +1 -1
- package/dist/esm/styles/shared/shadow.js +1 -1
- package/dist/esm/styles/shared/table.js +37 -33
- package/dist/esm/styles/shared/task-decision.js +1 -1
- package/dist/esm/styles/shared/text-color.js +1 -1
- package/dist/esm/styles/shared/whitespace.js +1 -1
- package/dist/esm/ui/BaseTheme/index.js +23 -12
- package/dist/esm/ui/Caption/index.js +10 -5
- package/dist/esm/ui/MediaSingle/link.js +2 -3
- package/dist/esm/ui/Messages/index.js +26 -20
- package/dist/esm/ui/UnsupportedBlock/index.js +9 -5
- package/dist/esm/ui/UnsupportedInline/index.js +8 -5
- package/dist/esm/ui/WidthProvider/index.js +7 -6
- package/dist/esm/ui/clear-next-sibling-margin-top.js +2 -2
- package/dist/esm/ui/index.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/__tests_external__/page-objects/Editor.d.ts +0 -1
- package/dist/types/__tests_external__/page-objects/EditorMedia.d.ts +0 -1
- package/dist/types/__tests_external__/page-objects/EditorSmartLink.d.ts +0 -1
- package/dist/types/__tests_external__/page-objects/Renderer.d.ts +0 -1
- package/dist/types/collab/types.d.ts +2 -2
- package/dist/types/i18n/cs.d.ts +2 -2
- package/dist/types/i18n/da.d.ts +2 -2
- package/dist/types/i18n/de.d.ts +2 -2
- package/dist/types/i18n/en_ZZ.d.ts +19 -0
- package/dist/types/i18n/es.d.ts +2 -2
- package/dist/types/i18n/fi.d.ts +2 -2
- package/dist/types/i18n/fr.d.ts +2 -2
- package/dist/types/i18n/hu.d.ts +2 -2
- package/dist/types/i18n/it.d.ts +2 -2
- package/dist/types/i18n/ja.d.ts +2 -2
- package/dist/types/i18n/ko.d.ts +2 -2
- package/dist/types/i18n/nb.d.ts +2 -2
- package/dist/types/i18n/nl.d.ts +2 -2
- package/dist/types/i18n/pl.d.ts +2 -2
- package/dist/types/i18n/pt_BR.d.ts +2 -2
- package/dist/types/i18n/ru.d.ts +2 -2
- package/dist/types/i18n/sv.d.ts +2 -2
- package/dist/types/i18n/th.d.ts +2 -2
- package/dist/types/i18n/tr.d.ts +2 -2
- package/dist/types/i18n/uk.d.ts +2 -2
- package/dist/types/i18n/vi.d.ts +2 -2
- package/dist/types/i18n/zh.d.ts +2 -2
- package/dist/types/i18n/zh_TW.d.ts +2 -2
- package/dist/types/index.d.ts +1 -15
- package/dist/types/styles/shared/annotation.d.ts +5 -4
- package/dist/types/styles/shared/block-marks.d.ts +1 -1
- package/dist/types/styles/shared/blockquote.d.ts +1 -1
- package/dist/types/styles/shared/code-mark.d.ts +2 -1
- package/dist/types/styles/shared/column-layout.d.ts +1 -1
- package/dist/types/styles/shared/date.d.ts +1 -1
- package/dist/types/styles/shared/headings.d.ts +2 -1
- package/dist/types/styles/shared/indentation.d.ts +1 -1
- package/dist/types/styles/shared/lists.d.ts +1 -1
- package/dist/types/styles/shared/media-single.d.ts +1 -1
- package/dist/types/styles/shared/panel.d.ts +1 -1
- package/dist/types/styles/shared/paragraph.d.ts +1 -1
- package/dist/types/styles/shared/rule.d.ts +1 -1
- package/dist/types/styles/shared/shadow.d.ts +1 -1
- package/dist/types/styles/shared/table.d.ts +2 -1
- package/dist/types/styles/shared/task-decision.d.ts +1 -1
- package/dist/types/styles/shared/text-color.d.ts +1 -1
- package/dist/types/styles/shared/whitespace.d.ts +1 -1
- package/dist/types/ui/Caption/index.d.ts +3 -1
- package/dist/types/ui/Expand/index.d.ts +2 -2
- package/dist/types/ui/MediaSingle/link.d.ts +1 -2
- package/dist/types/ui/Messages/index.d.ts +5 -3
- package/dist/types/ui/UnsupportedBlock/index.d.ts +1 -0
- package/dist/types/ui/UnsupportedInline/index.d.ts +1 -0
- package/dist/types/ui/WidthProvider/index.d.ts +3 -1
- package/dist/types/ui/clear-next-sibling-margin-top.d.ts +1 -2
- package/dist/types/ui/index.d.ts +2 -2
- package/dist/types/utils/getModeFromTheme.d.ts +1 -1
- package/package.json +11 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from '
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
4
|
export const blockquoteSharedStyles = css`
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { css } from '
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { getCodeStyles } from '@atlaskit/code/inline';
|
|
3
3
|
import { DN70, N30A } from '@atlaskit/theme/colors';
|
|
4
|
-
import { themed } from '@atlaskit/theme/components';
|
|
5
|
-
export const codeMarkSharedStyles =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
4
|
+
import { getTheme, themed } from '@atlaskit/theme/components';
|
|
5
|
+
export const codeMarkSharedStyles = props => {
|
|
6
|
+
const theme = getTheme(props);
|
|
7
|
+
return css`
|
|
8
|
+
.code {
|
|
9
|
+
--ds--code--bg-color: ${themed({
|
|
10
|
+
light: N30A,
|
|
11
|
+
dark: DN70
|
|
12
|
+
})(props)};
|
|
13
|
+
${getCodeStyles(theme)}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { css } from '
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { h100, h300, h400, h500, h600, h700 } from '@atlaskit/theme/typography'; // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
3
3
|
// text sizing prototype: http://proto/fabricrender/
|
|
4
4
|
|
|
5
|
-
export const headingsSharedStyles = css`
|
|
5
|
+
export const headingsSharedStyles = props => css`
|
|
6
6
|
& h1 {
|
|
7
|
-
${h700};
|
|
7
|
+
${h700(props)};
|
|
8
8
|
margin-bottom: 0;
|
|
9
9
|
margin-top: 1.667em;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
& h2 {
|
|
13
|
-
${h600};
|
|
13
|
+
${h600(props)};
|
|
14
14
|
margin-top: 1.8em;
|
|
15
15
|
margin-bottom: 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
& h3 {
|
|
19
|
-
${h500};
|
|
19
|
+
${h500(props)};
|
|
20
20
|
margin-top: 2em;
|
|
21
21
|
margin-bottom: 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
& h4 {
|
|
25
|
-
${h400};
|
|
25
|
+
${h400(props)};
|
|
26
26
|
margin-top: 1.357em;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
& h5 {
|
|
30
|
-
${h300};
|
|
30
|
+
${h300(props)};
|
|
31
31
|
margin-top: 1.667em;
|
|
32
32
|
text-transform: none;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
& h6 {
|
|
36
|
-
${h100};
|
|
36
|
+
${h100(props)};
|
|
37
37
|
margin-top: 1.455em;
|
|
38
38
|
text-transform: none;
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from '
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles'; // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
3
3
|
|
|
4
4
|
export const paragraphSharedStyles = css`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from '
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
|
|
3
3
|
import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorTableToolbarDark, akEditorWideLayoutWidth, getTableCellBackgroundDarkModeColors, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { DN20 } from '@atlaskit/theme/colors';
|
|
@@ -26,7 +26,8 @@ export const TableSharedCssClassName = {
|
|
|
26
26
|
TABLE_CELL_WRAPPER: tableCellSelector,
|
|
27
27
|
TABLE_HEADER_CELL_WRAPPER: tableHeaderSelector
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
const tableSharedStyle = props => css`
|
|
30
31
|
.${TableSharedCssClassName.TABLE_CONTAINER} {
|
|
31
32
|
position: relative;
|
|
32
33
|
margin: 0 auto ${tableMarginBottom}px;
|
|
@@ -53,7 +54,7 @@ const tableSharedStyle = css`
|
|
|
53
54
|
${themed({
|
|
54
55
|
light: akEditorTableBorder,
|
|
55
56
|
dark: akEditorTableBorderDark
|
|
56
|
-
})};
|
|
57
|
+
})(props)};
|
|
57
58
|
table-layout: fixed;
|
|
58
59
|
font-size: 1em;
|
|
59
60
|
width: 100%;
|
|
@@ -85,7 +86,7 @@ const tableSharedStyle = css`
|
|
|
85
86
|
${themed({
|
|
86
87
|
light: akEditorTableBorder,
|
|
87
88
|
dark: akEditorTableBorderDark
|
|
88
|
-
})};
|
|
89
|
+
})(props)};
|
|
89
90
|
border-right-width: 0;
|
|
90
91
|
border-bottom-width: 0;
|
|
91
92
|
padding: ${tableCellPadding}px;
|
|
@@ -94,7 +95,7 @@ const tableSharedStyle = css`
|
|
|
94
95
|
|
|
95
96
|
${themed({
|
|
96
97
|
dark: getTableCellBackgroundDarkModeColors
|
|
97
|
-
})};
|
|
98
|
+
})(props)};
|
|
98
99
|
|
|
99
100
|
> *:first-child {
|
|
100
101
|
margin-top: 0;
|
|
@@ -117,7 +118,7 @@ const tableSharedStyle = css`
|
|
|
117
118
|
background-color: ${themed({
|
|
118
119
|
light: akEditorTableToolbar,
|
|
119
120
|
dark: akEditorTableToolbarDark
|
|
120
|
-
})};
|
|
121
|
+
})(props)};
|
|
121
122
|
text-align: left;
|
|
122
123
|
|
|
123
124
|
/* only apply this styling to codeblocks in default background headercells */
|
|
@@ -128,7 +129,7 @@ const tableSharedStyle = css`
|
|
|
128
129
|
background: themed({
|
|
129
130
|
light: 'rgb(235, 237, 240)',
|
|
130
131
|
dark: 'rgb(36, 47, 66)'
|
|
131
|
-
}),
|
|
132
|
+
})(props),
|
|
132
133
|
width: `${gridSize()}px`
|
|
133
134
|
})};
|
|
134
135
|
background-attachment: local, scroll, scroll;
|
|
@@ -136,13 +137,13 @@ const tableSharedStyle = css`
|
|
|
136
137
|
background-color: ${themed({
|
|
137
138
|
light: 'rgb(235, 237, 240)',
|
|
138
139
|
dark: 'rgb(36, 47, 66)'
|
|
139
|
-
})};
|
|
140
|
+
})(props)};
|
|
140
141
|
|
|
141
142
|
.line-number-gutter {
|
|
142
143
|
background-color: ${themed({
|
|
143
144
|
light: 'rgb(226, 229, 233)',
|
|
144
145
|
dark: DN20
|
|
145
|
-
})};
|
|
146
|
+
})(props)};
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
/* this is only relevant to the element taken care of by renderer */
|
|
@@ -151,20 +152,20 @@ const tableSharedStyle = css`
|
|
|
151
152
|
background: themed({
|
|
152
153
|
light: 'rgb(235, 237, 240)',
|
|
153
154
|
dark: 'rgb(36, 47, 66)'
|
|
154
|
-
}),
|
|
155
|
+
})(props),
|
|
155
156
|
width: `${gridSize()}px`
|
|
156
157
|
})}!important;
|
|
157
158
|
|
|
158
159
|
background-color: ${themed({
|
|
159
160
|
light: 'rgb(235, 237, 240)',
|
|
160
161
|
dark: 'rgb(36, 47, 66)'
|
|
161
|
-
})}!important;
|
|
162
|
+
})(props)}!important;
|
|
162
163
|
|
|
163
164
|
// selector lives inside @atlaskit/code
|
|
164
165
|
--ds--code--line-number-bg-color: ${themed({
|
|
165
166
|
light: 'rgb(226, 229, 233)',
|
|
166
167
|
dark: DN20
|
|
167
|
-
})};
|
|
168
|
+
})(props)};
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
}
|
|
@@ -172,6 +173,7 @@ const tableSharedStyle = css`
|
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
`;
|
|
176
|
+
|
|
175
177
|
export const calcTableWidth = (layout, containerWidth, addControllerPadding = true) => {
|
|
176
178
|
switch (layout) {
|
|
177
179
|
case 'full-width':
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { ThemeProvider } from '
|
|
2
|
+
import { ThemeProvider } from '@emotion/react';
|
|
3
|
+
import { ThemeProvider as DeprecatedThemeProvider } from 'styled-components';
|
|
3
4
|
import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import {
|
|
5
|
+
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
|
+
import { CHANNEL, fontSize } from '@atlaskit/theme/constants';
|
|
5
7
|
import { WidthConsumer } from '../WidthProvider';
|
|
6
8
|
|
|
7
9
|
function mapBreakpointToFontSize(breakpoint) {
|
|
@@ -35,13 +37,22 @@ export function BaseThemeWrapper({
|
|
|
35
37
|
baseFontSize,
|
|
36
38
|
children
|
|
37
39
|
}) {
|
|
40
|
+
const {
|
|
41
|
+
mode
|
|
42
|
+
} = useGlobalTheme();
|
|
38
43
|
const memoizedTheme = useMemo(() => ({
|
|
39
44
|
baseFontSize: dynamicTextSizing ? mapBreakpointToFontSize(breakpoint) : baseFontSize || mapBreakpointToFontSize('S'),
|
|
40
|
-
layoutMaxWidth: dynamicTextSizing ? mapBreakpointToLayoutMaxWidth(breakpoint) : akEditorDefaultLayoutWidth
|
|
41
|
-
|
|
45
|
+
layoutMaxWidth: dynamicTextSizing ? mapBreakpointToLayoutMaxWidth(breakpoint) : akEditorDefaultLayoutWidth,
|
|
46
|
+
// Below is used for editor dark mode.
|
|
47
|
+
[CHANNEL]: {
|
|
48
|
+
mode
|
|
49
|
+
}
|
|
50
|
+
}), [breakpoint, dynamicTextSizing, baseFontSize, mode]);
|
|
42
51
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
43
52
|
theme: memoizedTheme
|
|
44
|
-
},
|
|
53
|
+
}, /*#__PURE__*/React.createElement(DeprecatedThemeProvider, {
|
|
54
|
+
theme: memoizedTheme
|
|
55
|
+
}, children));
|
|
45
56
|
}
|
|
46
57
|
export function BaseTheme({
|
|
47
58
|
children,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
2
4
|
import React from 'react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
3
6
|
import { injectIntl } from 'react-intl-next';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
7
|
import { N200, N400 } from '@atlaskit/theme/colors';
|
|
6
8
|
import { messages } from './messages';
|
|
7
|
-
const
|
|
9
|
+
const captionWrapperStyle = css`
|
|
8
10
|
margin-top: 8px;
|
|
9
11
|
text-align: center;
|
|
10
12
|
position: relative;
|
|
11
13
|
color: ${N400};
|
|
12
14
|
`;
|
|
13
|
-
const
|
|
15
|
+
const placeholderStyle = css`
|
|
14
16
|
color: ${N200};
|
|
15
17
|
position: absolute;
|
|
16
18
|
top: 0;
|
|
@@ -28,10 +30,14 @@ export class CaptionComponent extends React.Component {
|
|
|
28
30
|
}
|
|
29
31
|
} = this.props;
|
|
30
32
|
const showPlaceholder = !selected && !hasContent;
|
|
31
|
-
return
|
|
33
|
+
return jsx("div", _extends({
|
|
32
34
|
"data-media-caption": true,
|
|
33
35
|
"data-testid": "media-caption"
|
|
34
|
-
}, dataAttributes
|
|
36
|
+
}, dataAttributes, {
|
|
37
|
+
css: captionWrapperStyle
|
|
38
|
+
}), showPlaceholder ? jsx("p", {
|
|
39
|
+
css: placeholderStyle
|
|
40
|
+
}, formatMessage(messages.placeholder)) : null, children);
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
export const mediaLinkStyle = css`
|
|
3
3
|
position: absolute;
|
|
4
4
|
background: transparent;
|
|
5
5
|
top: 0;
|
|
@@ -9,5 +9,4 @@ export const MediaLink = styled.a`
|
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
width: 100%;
|
|
11
11
|
height: 100%;
|
|
12
|
-
`;
|
|
13
|
-
MediaLink.displayName = 'MediaLink';
|
|
12
|
+
`;
|
|
@@ -1,48 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
4
4
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
5
5
|
import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
|
-
const
|
|
9
|
-
${
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (props.valid) {
|
|
16
|
-
return G400;
|
|
17
|
-
}
|
|
8
|
+
const errorColor = css`
|
|
9
|
+
color: ${R400};
|
|
10
|
+
`;
|
|
11
|
+
const validColor = css`
|
|
12
|
+
color: ${G400};
|
|
13
|
+
`;
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
}
|
|
15
|
+
const messageStyle = props => css`
|
|
16
|
+
${h200(props)} font-weight: normal;
|
|
17
|
+
color: ${N200};
|
|
21
18
|
margin-top: ${gridSize() / 2}px;
|
|
22
19
|
display: flex;
|
|
23
20
|
justify-content: baseline;
|
|
24
21
|
`;
|
|
25
|
-
|
|
22
|
+
|
|
23
|
+
const iconWrapperStyle = css`
|
|
26
24
|
display: flex;
|
|
27
25
|
margin-right: 4px;
|
|
28
26
|
`;
|
|
29
27
|
export const HelperMessage = ({
|
|
30
28
|
children
|
|
31
|
-
}) =>
|
|
29
|
+
}) => jsx("div", {
|
|
30
|
+
css: messageStyle
|
|
31
|
+
}, children);
|
|
32
32
|
export const ErrorMessage = ({
|
|
33
33
|
children
|
|
34
|
-
}) =>
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
}) => jsx("div", {
|
|
35
|
+
css: theme => {
|
|
36
|
+
return [messageStyle(theme), errorColor];
|
|
37
|
+
}
|
|
38
|
+
}, jsx("span", {
|
|
39
|
+
css: iconWrapperStyle
|
|
40
|
+
}, jsx(ErrorIcon, {
|
|
37
41
|
size: "small",
|
|
38
42
|
label: "error",
|
|
39
43
|
"aria-label": "error"
|
|
40
44
|
})), children);
|
|
41
45
|
export const ValidMessage = ({
|
|
42
46
|
children
|
|
43
|
-
}) =>
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
}) => jsx("div", {
|
|
48
|
+
css: theme => {
|
|
49
|
+
return [messageStyle(theme), validColor];
|
|
50
|
+
}
|
|
51
|
+
}, jsx("span", {
|
|
52
|
+
css: iconWrapperStyle
|
|
53
|
+
}, jsx(SuccessIcon, {
|
|
46
54
|
size: "small",
|
|
47
55
|
label: "success"
|
|
48
56
|
})), children);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useCallback, useRef } from 'react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
2
4
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
5
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
6
7
|
import { N30, N50 } from '@atlaskit/theme/colors';
|
|
@@ -10,7 +11,7 @@ import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
|
10
11
|
import { ACTION_SUBJECT_ID } from '../../utils/analytics';
|
|
11
12
|
import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
|
|
12
13
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
13
|
-
const
|
|
14
|
+
const blockNodeStyle = css`
|
|
14
15
|
align-items: center;
|
|
15
16
|
background: ${N30};
|
|
16
17
|
border: 1px dashed ${N50};
|
|
@@ -43,15 +44,18 @@ const UnsupportedBlockNode = ({
|
|
|
43
44
|
});
|
|
44
45
|
const originalNodeType = node === null || node === void 0 ? void 0 : node.attrs.originalValue.type;
|
|
45
46
|
const tooltipOnShowHandler = useCallback(() => dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_BLOCK, originalNodeType), [dispatchAnalyticsEvent, originalNodeType]);
|
|
46
|
-
return
|
|
47
|
+
return jsx("div", {
|
|
48
|
+
css: blockNodeStyle,
|
|
49
|
+
className: "unsupported"
|
|
50
|
+
}, message, jsx(Tooltip, {
|
|
47
51
|
content: tooltipContent,
|
|
48
52
|
hideTooltipOnClick: false,
|
|
49
53
|
position: "bottom",
|
|
50
54
|
onShow: tooltipOnShowHandler,
|
|
51
55
|
strategy: "absolute"
|
|
52
|
-
},
|
|
56
|
+
}, jsx("span", {
|
|
53
57
|
style: style
|
|
54
|
-
},
|
|
58
|
+
}, jsx(QuestionsIcon, {
|
|
55
59
|
label: "?",
|
|
56
60
|
size: "small"
|
|
57
61
|
}))));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useCallback, useRef } from 'react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
2
4
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
5
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
6
7
|
import { N30, N50 } from '@atlaskit/theme/colors';
|
|
@@ -10,7 +11,7 @@ import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
|
10
11
|
import { ACTION_SUBJECT_ID } from '../../utils/analytics';
|
|
11
12
|
import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
|
|
12
13
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
13
|
-
const
|
|
14
|
+
const inlineNodeStyle = css`
|
|
14
15
|
align-items: center;
|
|
15
16
|
background: ${N30};
|
|
16
17
|
border: 1px dashed ${N50};
|
|
@@ -40,15 +41,17 @@ const UnsupportedInlineNode = ({
|
|
|
40
41
|
});
|
|
41
42
|
const originalNodeType = node === null || node === void 0 ? void 0 : node.attrs.originalValue.type;
|
|
42
43
|
const tooltipOnShowHandler = useCallback(() => dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_INLINE, originalNodeType), [dispatchAnalyticsEvent, originalNodeType]);
|
|
43
|
-
return
|
|
44
|
+
return jsx("span", {
|
|
45
|
+
css: inlineNodeStyle
|
|
46
|
+
}, message, jsx(Tooltip, {
|
|
44
47
|
content: tooltipContent,
|
|
45
48
|
hideTooltipOnClick: false,
|
|
46
49
|
position: "bottom",
|
|
47
50
|
onShow: tooltipOnShowHandler,
|
|
48
51
|
strategy: "absolute"
|
|
49
|
-
},
|
|
52
|
+
}, jsx("span", {
|
|
50
53
|
style: style
|
|
51
|
-
},
|
|
54
|
+
}, jsx(QuestionsIcon, {
|
|
52
55
|
label: "?",
|
|
53
56
|
size: "small"
|
|
54
57
|
}))));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
2
4
|
import React from 'react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
3
6
|
import rafSchedule from 'raf-schd';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
7
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
6
8
|
const SCROLLBAR_WIDTH = 30;
|
|
7
9
|
export function getBreakpoint(width = 0) {
|
|
@@ -27,10 +29,6 @@ const {
|
|
|
27
29
|
Provider,
|
|
28
30
|
Consumer
|
|
29
31
|
} = WidthContext;
|
|
30
|
-
const RelativeContainer = /*#__PURE__*/React.memo(styled.div`
|
|
31
|
-
position: relative;
|
|
32
|
-
width: 100%;
|
|
33
|
-
`);
|
|
34
32
|
export class WidthProvider extends React.Component {
|
|
35
33
|
constructor(props) {
|
|
36
34
|
super(props);
|
|
@@ -54,12 +52,16 @@ export class WidthProvider extends React.Component {
|
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
render() {
|
|
57
|
-
return
|
|
55
|
+
return jsx("div", {
|
|
56
|
+
css: css`
|
|
57
|
+
position: relative;
|
|
58
|
+
width: 100%;
|
|
59
|
+
`,
|
|
58
60
|
className: this.props.className
|
|
59
|
-
},
|
|
61
|
+
}, jsx(WidthObserver, {
|
|
60
62
|
setWidth: this.setWidth,
|
|
61
63
|
offscreen: true
|
|
62
|
-
}),
|
|
64
|
+
}), jsx(Provider, {
|
|
63
65
|
value: createWidthContext(this.state.width)
|
|
64
66
|
}, this.props.children));
|
|
65
67
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { css } from '@emotion/react'; // We use !important to ensure next sibling gets the margin reset no matter what
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const clearNextSiblingMarginTopStyle = css`
|
|
4
4
|
& + * {
|
|
5
5
|
margin-top: 0 !important;
|
|
6
6
|
}
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { default as Caption } from './Caption';
|
|
|
2
2
|
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, shouldAddDefaultWrappedWidth } from './MediaSingle';
|
|
3
3
|
export { MediaSingleDimensionHelper } from './MediaSingle/styled';
|
|
4
4
|
export { layoutSupportsWidth, calcPxFromColumns, calcPctFromPx, calcPxFromPct, calcColumnsFromPx, snapToGrid } from './MediaSingle/grid';
|
|
5
|
-
export {
|
|
5
|
+
export { mediaLinkStyle } from './MediaSingle/link';
|
|
6
6
|
export { default as Popup, findOverflowScrollParent } from './Popup';
|
|
7
7
|
export { default as UnsupportedBlock } from './UnsupportedBlock';
|
|
8
8
|
export { default as UnsupportedInline } from './UnsupportedInline';
|
|
@@ -13,7 +13,7 @@ export { default as overflowShadow, shadowClassNames } from './OverflowShadow';
|
|
|
13
13
|
export { WithCreateAnalyticsEvent } from './WithCreateAnalyticsEvent';
|
|
14
14
|
export { messages as expandMessages, sharedExpandStyles, ExpandIconWrapper, ExpandLayoutWrapper } from './Expand';
|
|
15
15
|
export { ErrorMessage, HelperMessage, ValidMessage } from './Messages';
|
|
16
|
-
export {
|
|
16
|
+
export { clearNextSiblingMarginTopStyle } from './clear-next-sibling-margin-top';
|
|
17
17
|
export { IntlNextErrorBoundary, REACT_INTL_ERROR_MESSAGE } from './IntlNextErrorBoundary';
|
|
18
18
|
export { IntlLegacyFallbackProvider } from './IntlLegacyFallbackProvider';
|
|
19
19
|
export { LegacyToNextIntlProvider } from './LegacyToNextIntlProvider';
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/i18n/cs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Czech
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBidiWarningLabel': 'Obousměrné znaky mění pořadí vykreslování textu. Může to být použito k zakrytí škodlivého kódu.',
|
|
10
9
|
'fabric.editor.captionPlaceholder': 'Přidejte popisek',
|
|
10
|
+
'fabric.editor.codeBidiWarningLabel': 'Obousměrné znaky mění pořadí vykreslování textu. Může to být použito k zakrytí škodlivého kódu.',
|
|
11
11
|
'fabric.editor.collapseNode': 'Sbalit obsah',
|
|
12
12
|
'fabric.editor.expandDefaultTitle': 'Klikněte sem pro rozbalení...',
|
|
13
13
|
'fabric.editor.expandNode': 'Rozbalit obsah',
|
package/dist/esm/i18n/da.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Danish (Denmark)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBidiWarningLabel': 'Tegn med tovejsfunktionalitet ændrer rækkefølgen, som teksten er gengivet i. Dette kan udnyttes til at skjule skadelig kode.',
|
|
10
9
|
'fabric.editor.captionPlaceholder': 'Tilføj en billedtekst',
|
|
10
|
+
'fabric.editor.codeBidiWarningLabel': 'Tegn med tovejsfunktionalitet ændrer rækkefølgen, som teksten er gengivet i. Dette kan udnyttes til at skjule skadelig kode.',
|
|
11
11
|
'fabric.editor.collapseNode': 'skjul indhold',
|
|
12
12
|
'fabric.editor.expandDefaultTitle': 'Klik her for at udvide...',
|
|
13
13
|
'fabric.editor.expandNode': 'Udvid indhold',
|
package/dist/esm/i18n/de.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//German (Germany)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBidiWarningLabel': 'Bidirektionale Zeichen ändern die Reihenfolge, in der Text gerendert wird. Dies könnte verwendet werden, um bösartigen Code zu verbergen.',
|
|
10
9
|
'fabric.editor.captionPlaceholder': 'Eine Bildunterschrift hinzufügen',
|
|
10
|
+
'fabric.editor.codeBidiWarningLabel': 'Bidirektionale Zeichen ändern die Reihenfolge, in der Text gerendert wird. Dies könnte verwendet werden, um bösartigen Code zu verbergen.',
|
|
11
11
|
'fabric.editor.collapseNode': 'Inhaltsanzeige reduzieren',
|
|
12
12
|
'fabric.editor.expandDefaultTitle': 'Klicken Sie hier, um zu erweitern …',
|
|
13
13
|
'fabric.editor.expandNode': 'Inhaltsanzeige erweitern',
|