@atlaskit/editor-common 81.1.4 → 81.2.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/codemods/migrates/entry-points.ts +14 -30
- package/dist/cjs/clipboard/index.js +4 -4
- package/dist/cjs/collab/index.js +1 -1
- package/dist/cjs/doc-utils/editor-use-only.js +2 -2
- package/dist/cjs/i18n/cs.js +1 -0
- package/dist/cjs/i18n/da.js +3 -2
- package/dist/cjs/i18n/de.js +3 -2
- package/dist/cjs/i18n/en.js +1 -0
- package/dist/cjs/i18n/en_GB.js +1 -0
- package/dist/cjs/i18n/en_ZZ.js +1 -0
- package/dist/cjs/i18n/es.js +2 -1
- package/dist/cjs/i18n/fi.js +2 -1
- package/dist/cjs/i18n/fr.js +1 -0
- package/dist/cjs/i18n/hu.js +1 -0
- package/dist/cjs/i18n/it.js +1 -0
- package/dist/cjs/i18n/ja.js +2 -1
- package/dist/cjs/i18n/ko.js +2 -1
- package/dist/cjs/i18n/nb.js +1 -0
- package/dist/cjs/i18n/nl.js +1 -0
- package/dist/cjs/i18n/pl.js +1 -0
- package/dist/cjs/i18n/pt_BR.js +1 -0
- package/dist/cjs/i18n/ru.js +1 -0
- package/dist/cjs/i18n/sv.js +1 -0
- package/dist/cjs/i18n/th.js +1 -0
- package/dist/cjs/i18n/tr.js +1 -0
- package/dist/cjs/i18n/uk.js +7 -6
- package/dist/cjs/i18n/vi.js +1 -0
- package/dist/cjs/i18n/zh.js +3 -2
- package/dist/cjs/i18n/zh_TW.js +1 -0
- package/dist/cjs/lists/node.js +8 -8
- package/dist/cjs/lists/replace-content.js +8 -8
- package/dist/cjs/media-inline/styles.js +2 -2
- package/dist/cjs/messages/card.js +20 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/selection/gap-cursor/styles.js +1 -1
- package/dist/cjs/styles/shared/annotation.js +1 -1
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/code-block.js +2 -2
- package/dist/cjs/styles/shared/lists.js +1 -1
- package/dist/cjs/styles/shared/panel.js +1 -1
- package/dist/cjs/styles/shared/resizer.js +1 -1
- package/dist/cjs/styles/shared/smartCard.js +1 -1
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/styles/shared/task-decision.js +1 -1
- package/dist/cjs/styles/shared/unsupported-content.js +1 -1
- package/dist/cjs/table/SortingIcon.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Expand/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +4 -4
- package/dist/cjs/ui/MediaSingle/styled.js +5 -5
- package/dist/cjs/ui/ResizerLegacy/styled.js +1 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -2
- package/dist/cjs/utils/calculate-toolbar-position.js +8 -8
- package/dist/cjs/utils/compareNodes.js +7 -7
- package/dist/cjs/utils/dedupe.js +10 -10
- package/dist/es2019/clipboard/index.js +4 -4
- package/dist/es2019/collab/index.js +29 -29
- package/dist/es2019/doc-utils/editor-use-only.js +2 -2
- package/dist/es2019/i18n/cs.js +1 -0
- package/dist/es2019/i18n/da.js +3 -2
- package/dist/es2019/i18n/de.js +3 -2
- package/dist/es2019/i18n/en.js +1 -0
- package/dist/es2019/i18n/en_GB.js +1 -0
- package/dist/es2019/i18n/en_ZZ.js +1 -0
- package/dist/es2019/i18n/es.js +2 -1
- package/dist/es2019/i18n/fi.js +2 -1
- package/dist/es2019/i18n/fr.js +1 -0
- package/dist/es2019/i18n/hu.js +1 -0
- package/dist/es2019/i18n/it.js +1 -0
- package/dist/es2019/i18n/ja.js +2 -1
- package/dist/es2019/i18n/ko.js +2 -1
- package/dist/es2019/i18n/nb.js +1 -0
- package/dist/es2019/i18n/nl.js +1 -0
- package/dist/es2019/i18n/pl.js +1 -0
- package/dist/es2019/i18n/pt_BR.js +1 -0
- package/dist/es2019/i18n/ru.js +1 -0
- package/dist/es2019/i18n/sv.js +1 -0
- package/dist/es2019/i18n/th.js +1 -0
- package/dist/es2019/i18n/tr.js +1 -0
- package/dist/es2019/i18n/uk.js +7 -6
- package/dist/es2019/i18n/vi.js +1 -0
- package/dist/es2019/i18n/zh.js +3 -2
- package/dist/es2019/i18n/zh_TW.js +1 -0
- package/dist/es2019/lists/node.js +8 -8
- package/dist/es2019/lists/replace-content.js +8 -8
- package/dist/es2019/media-inline/styles.js +28 -28
- package/dist/es2019/messages/card.js +20 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/selection/gap-cursor/styles.js +80 -80
- package/dist/es2019/styles/shared/annotation.js +12 -12
- package/dist/es2019/styles/shared/block-marks.js +16 -16
- package/dist/es2019/styles/shared/code-block.js +101 -89
- package/dist/es2019/styles/shared/lists.js +83 -86
- package/dist/es2019/styles/shared/panel.js +78 -78
- package/dist/es2019/styles/shared/resizer.js +180 -178
- package/dist/es2019/styles/shared/smartCard.js +92 -102
- package/dist/es2019/styles/shared/table.js +125 -127
- package/dist/es2019/styles/shared/task-decision.js +46 -46
- package/dist/es2019/styles/shared/unsupported-content.js +15 -15
- package/dist/es2019/table/SortingIcon.js +34 -34
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Expand/index.js +14 -14
- package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
- package/dist/es2019/ui/MediaSingle/styled.js +55 -55
- package/dist/es2019/ui/ResizerLegacy/styled.js +10 -10
- package/dist/es2019/ui-menu/DropdownMenu/index.js +30 -30
- package/dist/es2019/utils/calculate-toolbar-position.js +8 -8
- package/dist/es2019/utils/compareNodes.js +7 -7
- package/dist/es2019/utils/dedupe.js +10 -10
- package/dist/esm/clipboard/index.js +4 -4
- package/dist/esm/collab/index.js +1 -1
- package/dist/esm/doc-utils/editor-use-only.js +2 -2
- package/dist/esm/i18n/cs.js +1 -0
- package/dist/esm/i18n/da.js +3 -2
- package/dist/esm/i18n/de.js +3 -2
- package/dist/esm/i18n/en.js +1 -0
- package/dist/esm/i18n/en_GB.js +1 -0
- package/dist/esm/i18n/en_ZZ.js +1 -0
- package/dist/esm/i18n/es.js +2 -1
- package/dist/esm/i18n/fi.js +2 -1
- package/dist/esm/i18n/fr.js +1 -0
- package/dist/esm/i18n/hu.js +1 -0
- package/dist/esm/i18n/it.js +1 -0
- package/dist/esm/i18n/ja.js +2 -1
- package/dist/esm/i18n/ko.js +2 -1
- package/dist/esm/i18n/nb.js +1 -0
- package/dist/esm/i18n/nl.js +1 -0
- package/dist/esm/i18n/pl.js +1 -0
- package/dist/esm/i18n/pt_BR.js +1 -0
- package/dist/esm/i18n/ru.js +1 -0
- package/dist/esm/i18n/sv.js +1 -0
- package/dist/esm/i18n/th.js +1 -0
- package/dist/esm/i18n/tr.js +1 -0
- package/dist/esm/i18n/uk.js +7 -6
- package/dist/esm/i18n/vi.js +1 -0
- package/dist/esm/i18n/zh.js +3 -2
- package/dist/esm/i18n/zh_TW.js +1 -0
- package/dist/esm/lists/node.js +8 -8
- package/dist/esm/lists/replace-content.js +8 -8
- package/dist/esm/media-inline/styles.js +2 -2
- package/dist/esm/messages/card.js +20 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/selection/gap-cursor/styles.js +1 -1
- package/dist/esm/styles/shared/annotation.js +1 -1
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/code-block.js +2 -2
- package/dist/esm/styles/shared/lists.js +1 -1
- package/dist/esm/styles/shared/panel.js +1 -1
- package/dist/esm/styles/shared/resizer.js +1 -1
- package/dist/esm/styles/shared/smartCard.js +1 -1
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/styles/shared/task-decision.js +1 -1
- package/dist/esm/styles/shared/unsupported-content.js +1 -1
- package/dist/esm/table/SortingIcon.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Expand/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +4 -4
- package/dist/esm/ui/MediaSingle/styled.js +5 -5
- package/dist/esm/ui/ResizerLegacy/styled.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +2 -2
- package/dist/esm/utils/calculate-toolbar-position.js +8 -8
- package/dist/esm/utils/compareNodes.js +7 -7
- package/dist/esm/utils/dedupe.js +10 -10
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/index.d.ts +3 -3
- package/dist/types/analytics/types/insert-events.d.ts +1 -1
- package/dist/types/card/LinkToolbarButtonGroup.d.ts +1 -1
- package/dist/types/card/index.d.ts +1 -1
- package/dist/types/element-browser/ViewMore.d.ts +1 -1
- package/dist/types/element-browser/components/ElementList/EmptyState.d.ts +1 -1
- package/dist/types/extensibility/index.d.ts +1 -1
- package/dist/types/extensions/index.d.ts +1 -1
- package/dist/types/extensions/types/index.d.ts +2 -2
- package/dist/types/guideline/index.d.ts +3 -3
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/en.d.ts +1 -0
- package/dist/types/i18n/en_GB.d.ts +1 -0
- package/dist/types/i18n/en_ZZ.d.ts +1 -0
- package/dist/types/i18n/es.d.ts +1 -0
- package/dist/types/i18n/fi.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/it.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/nl.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/sv.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +1 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/link/index.d.ts +3 -3
- package/dist/types/lists/index.d.ts +3 -3
- package/dist/types/lists/replace-content.d.ts +1 -1
- package/dist/types/mark/index.d.ts +1 -1
- package/dist/types/media-inline/index.d.ts +1 -1
- package/dist/types/media-inline/views/frame.d.ts +1 -1
- package/dist/types/messages/card.d.ts +20 -0
- package/dist/types/portal/index.d.ts +1 -1
- package/dist/types/preset/index.d.ts +1 -1
- package/dist/types/preset/plugin-injection-api.d.ts +1 -1
- package/dist/types/provider-factory/quick-insert-provider.d.ts +2 -1
- package/dist/types/provider-factory.d.ts +2 -2
- package/dist/types/react-node-view/index.d.ts +1 -1
- package/dist/types/selection/index.d.ts +2 -2
- package/dist/types/styles/index.d.ts +4 -4
- package/dist/types/types/feature-flags.d.ts +6 -6
- package/dist/types/types/index.d.ts +12 -12
- package/dist/types/types/next-editor-plugin.d.ts +2 -8
- package/dist/types/types/performance-tracking.d.ts +4 -4
- package/dist/types/ufo/index.d.ts +1 -1
- package/dist/types/ui/BaseTheme/index.d.ts +1 -1
- package/dist/types/ui/FloatingToolbar/styles.d.ts +4 -4
- package/dist/types/ui/MediaSingle/styled.d.ts +1 -1
- package/dist/types/ui/index.d.ts +4 -4
- package/dist/types/ui-color/index.d.ts +1 -1
- package/dist/types/utils/get-performance-options.d.ts +1 -1
- package/dist/types/utils/index.d.ts +6 -6
- package/dist/types/validator.d.ts +1 -1
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/index.d.ts +3 -3
- package/dist/types-ts4.5/analytics/types/insert-events.d.ts +1 -1
- package/dist/types-ts4.5/card/LinkToolbarButtonGroup.d.ts +1 -1
- package/dist/types-ts4.5/card/index.d.ts +1 -1
- package/dist/types-ts4.5/element-browser/ViewMore.d.ts +1 -1
- package/dist/types-ts4.5/element-browser/components/ElementList/EmptyState.d.ts +1 -1
- package/dist/types-ts4.5/extensibility/index.d.ts +1 -1
- package/dist/types-ts4.5/extensions/index.d.ts +1 -1
- package/dist/types-ts4.5/extensions/types/index.d.ts +2 -2
- package/dist/types-ts4.5/guideline/index.d.ts +3 -3
- package/dist/types-ts4.5/i18n/cs.d.ts +1 -0
- package/dist/types-ts4.5/i18n/da.d.ts +1 -0
- package/dist/types-ts4.5/i18n/de.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -0
- package/dist/types-ts4.5/i18n/es.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
- package/dist/types-ts4.5/i18n/it.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +1 -0
- package/dist/types-ts4.5/i18n/th.d.ts +1 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
- package/dist/types-ts4.5/link/index.d.ts +3 -3
- package/dist/types-ts4.5/lists/index.d.ts +3 -3
- package/dist/types-ts4.5/lists/replace-content.d.ts +1 -1
- package/dist/types-ts4.5/mark/index.d.ts +1 -1
- package/dist/types-ts4.5/media-inline/index.d.ts +1 -1
- package/dist/types-ts4.5/media-inline/views/frame.d.ts +1 -1
- package/dist/types-ts4.5/messages/card.d.ts +20 -0
- package/dist/types-ts4.5/portal/index.d.ts +1 -1
- package/dist/types-ts4.5/preset/index.d.ts +1 -1
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +2 -1
- package/dist/types-ts4.5/provider-factory.d.ts +2 -2
- package/dist/types-ts4.5/react-node-view/index.d.ts +1 -1
- package/dist/types-ts4.5/selection/index.d.ts +2 -2
- package/dist/types-ts4.5/styles/index.d.ts +4 -4
- package/dist/types-ts4.5/types/feature-flags.d.ts +6 -6
- package/dist/types-ts4.5/types/index.d.ts +12 -12
- package/dist/types-ts4.5/types/performance-tracking.d.ts +4 -4
- package/dist/types-ts4.5/ufo/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingToolbar/styles.d.ts +4 -4
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +1 -1
- package/dist/types-ts4.5/ui/index.d.ts +4 -4
- package/dist/types-ts4.5/ui-color/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -1
- package/dist/types-ts4.5/utils/index.d.ts +6 -6
- package/dist/types-ts4.5/validator.d.ts +1 -1
- package/package.json +4 -6
- package/report.api.md +6 -5
|
@@ -15,70 +15,70 @@ const wrapRight = '[layout="wrap-right"]';
|
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- This needs manual remediation, it autofixes seemingly safely, but the code style and readability is destroyed.
|
|
17
17
|
export const gapCursorStyles = css`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
/* =============== GAP CURSOR ================== */
|
|
19
|
+
.ProseMirror {
|
|
20
|
+
&.${hideCaretModifier} {
|
|
21
|
+
caret-color: transparent;
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
${gapCursor} {
|
|
25
|
+
display: none;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
position: relative;
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
& span {
|
|
30
|
+
caret-color: transparent;
|
|
31
|
+
position: absolute;
|
|
32
|
+
height: 100%;
|
|
33
|
+
width: 100%;
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
& span::after {
|
|
38
|
+
animation: 1s ${gapCursorBlink} step-end infinite;
|
|
39
|
+
border-left: 1px solid;
|
|
40
|
+
content: '';
|
|
41
|
+
display: block;
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 0;
|
|
44
|
+
height: 100%;
|
|
45
|
+
}
|
|
46
|
+
&.-left span::after {
|
|
47
|
+
left: ${"var(--ds-space-negative-050, -4px)"};
|
|
48
|
+
}
|
|
49
|
+
&.-right span::after {
|
|
50
|
+
right: ${"var(--ds-space-negative-050, -4px)"};
|
|
51
|
+
}
|
|
52
|
+
& span[layout='full-width'],
|
|
53
|
+
& span[layout='wide'],
|
|
54
|
+
& span[layout='fixed-width'] {
|
|
55
|
+
margin-left: 50%;
|
|
56
|
+
transform: translateX(-50%);
|
|
57
|
+
}
|
|
58
|
+
&${wrapRight} {
|
|
59
|
+
float: right;
|
|
60
|
+
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
/* fix vertical alignment of gap cursor */
|
|
63
|
+
&:first-of-type + ul,
|
|
64
|
+
&:first-of-type + span + ul,
|
|
65
|
+
&:first-of-type + ol,
|
|
66
|
+
&:first-of-type + span + ol,
|
|
67
|
+
&:first-of-type + pre,
|
|
68
|
+
&:first-of-type + span + pre,
|
|
69
|
+
&:first-of-type + blockquote,
|
|
70
|
+
&:first-of-type + span + blockquote {
|
|
71
|
+
margin-top: 0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
&.ProseMirror-focused ${gapCursor} {
|
|
75
|
+
display: block;
|
|
76
|
+
border-color: transparent;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
/* This hack below is for two images aligned side by side */
|
|
81
|
+
${gapCursor}${wrapLeft} + span + ${wrapLeft},
|
|
82
82
|
${gapCursor}${wrapRight} + span + ${wrapRight},
|
|
83
83
|
${gapCursor} + ${wrapLeft} + ${wrapRight},
|
|
84
84
|
${gapCursor} + ${wrapLeft} + span + ${wrapRight},
|
|
@@ -89,10 +89,10 @@ export const gapCursorStyles = css`
|
|
|
89
89
|
${wrapRight} + ${gapCursor} + ${wrapLeft},
|
|
90
90
|
${wrapRight} + ${gapCursor} + span + ${wrapLeft},
|
|
91
91
|
${wrapLeft} + ${gapCursor} {
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
clear: none;
|
|
93
|
+
}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
${wrapLeft} + ${gapCursor} + ${wrapRight} > div,
|
|
96
96
|
${wrapLeft} + ${gapCursor} + span + ${wrapRight} > div,
|
|
97
97
|
${wrapRight} + ${gapCursor} + ${wrapLeft} > div,
|
|
98
98
|
${wrapRight} + ${gapCursor} + span + ${wrapLeft} > div,
|
|
@@ -100,31 +100,31 @@ export const gapCursorStyles = css`
|
|
|
100
100
|
${gapCursor} + ${wrapRight} + span + ${wrapLeft} > div,
|
|
101
101
|
${gapCursor} + ${wrapLeft} + ${wrapRight} > div,
|
|
102
102
|
${gapCursor} + ${wrapLeft} + span + ${wrapRight} > div {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
margin-right: 0;
|
|
104
|
+
margin-left: 0;
|
|
105
|
+
margin-bottom: 0;
|
|
106
|
+
}
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
${wrapLeft} + ${gapCursor},
|
|
109
109
|
${wrapRight} + ${gapCursor} {
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
float: left;
|
|
111
|
+
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
${gapCursor} + ${wrapLeft} + span + ${wrapRight}::after,
|
|
114
114
|
${gapCursor} + ${wrapRight} + span + ${wrapLeft}::after,
|
|
115
115
|
${wrapLeft} + ${gapCursor} + ${wrapRight}::after,
|
|
116
116
|
${wrapLeft} + ${gapCursor} + span + ${wrapRight}::after,
|
|
117
117
|
${wrapRight} + ${gapCursor} + ${wrapLeft}::after,
|
|
118
118
|
${wrapRight} + ${gapCursor} + span + ${wrapLeft}::after {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
visibility: hidden;
|
|
120
|
+
display: block;
|
|
121
|
+
font-size: 0;
|
|
122
|
+
content: ' ';
|
|
123
|
+
clear: both;
|
|
124
|
+
height: 0;
|
|
125
|
+
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
${wrapLeft} + ${gapCursor} + ${wrapRight} + *,
|
|
128
128
|
${wrapLeft} + ${gapCursor} + ${wrapRight} + span + *,
|
|
129
129
|
${wrapRight} + ${gapCursor} + ${wrapLeft} + *,
|
|
130
130
|
${wrapRight} + ${gapCursor} + ${wrapLeft} + span + *,
|
|
@@ -142,6 +142,6 @@ export const gapCursorStyles = css`
|
|
|
142
142
|
${gapCursor} + ${wrapRight} + span + ${wrapLeft} + * > *,
|
|
143
143
|
${prosemirrorwidget} + ${gapCursor} + *,
|
|
144
144
|
${prosemirrorwidget} + ${gapCursor} + span + * {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
margin-top: 0;
|
|
146
|
+
}
|
|
147
147
|
`;
|
|
@@ -60,18 +60,18 @@ export const AnnotationSharedCSSByState = () => getBooleanFF('platform.editor.al
|
|
|
60
60
|
|
|
61
61
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
|
|
62
62
|
export const annotationSharedStyles = () => css`
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
.ProseMirror {
|
|
64
|
+
.${AnnotationSharedClassNames.focus} {
|
|
65
|
+
${AnnotationSharedCSSByState().focus};
|
|
66
|
+
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
.${AnnotationSharedClassNames.draft} {
|
|
69
|
+
${AnnotationSharedCSSByState().focus};
|
|
70
|
+
cursor: initial;
|
|
71
|
+
}
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
.${AnnotationSharedClassNames.blur} {
|
|
74
|
+
${AnnotationSharedCSSByState().blur};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
77
|
`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Perfectly safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing */
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
export const blockMarksSharedStyles = css`
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
5
|
* We need to remove margin-top from first item
|
|
6
6
|
* inside doc, tableCell, tableHeader, blockquote, etc.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
*:not(.fabric-editor-block-mark) >,
|
|
9
9
|
/* For nested block marks apart from those with indentation mark */
|
|
10
10
|
*:not(.fabric-editor-block-mark) >
|
|
11
11
|
div.fabric-editor-block-mark:first-of-type
|
|
@@ -17,18 +17,18 @@ export const blockMarksSharedStyles = css`
|
|
|
17
17
|
.fabric-editor-alignment:first-of-type:first-child,
|
|
18
18
|
// If first document element has indentation mark remove margin-top
|
|
19
19
|
.ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
p,
|
|
21
|
+
h1,
|
|
22
|
+
h2,
|
|
23
|
+
h3,
|
|
24
|
+
h4,
|
|
25
|
+
h5,
|
|
26
|
+
h6,
|
|
27
|
+
.heading-wrapper {
|
|
28
|
+
:first-child:not(style),
|
|
29
|
+
style:first-child + * {
|
|
30
|
+
margin-top: 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
34
|
`;
|
|
@@ -13,111 +13,123 @@ export const CodeBlockSharedCssClassName = {
|
|
|
13
13
|
DS_CODEBLOCK: '[data-ds--code--code-block]'
|
|
14
14
|
};
|
|
15
15
|
export const codeBlockSharedStyles = () => css`
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
|
|
17
|
+
position: relative;
|
|
18
|
+
background-color: ${"var(--ds-surface-raised, transparent)"};
|
|
19
|
+
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
20
|
+
margin: ${blockNodesVerticalMargin} 0 0 0;
|
|
21
|
+
font-family: ${akEditorCodeFontFamily};
|
|
22
|
+
min-width: ${akEditorTableCellMinWidth}px;
|
|
23
|
+
cursor: pointer;
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
--ds--code--bg-color: transparent;
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */
|
|
28
|
+
white-space: normal;
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_START} {
|
|
31
|
+
position: absolute;
|
|
32
|
+
visibility: hidden;
|
|
33
|
+
height: 1.5rem;
|
|
34
|
+
top: 0px;
|
|
35
|
+
left: 0px;
|
|
36
|
+
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_END} {
|
|
39
|
+
position: absolute;
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
height: 1.5rem;
|
|
42
|
+
bottom: 0px;
|
|
43
|
+
right: 0px;
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
|
|
47
|
+
background-color: ${`var(--ds-background-neutral, ${N20})`};
|
|
48
|
+
display: flex;
|
|
49
|
+
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
50
|
+
width: 100%;
|
|
51
|
+
counter-reset: line;
|
|
52
|
+
overflow-x: auto;
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
background-image: ${overflowShadow({
|
|
55
55
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
56
56
|
})};
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
background-repeat: no-repeat;
|
|
59
|
+
background-attachment: local, local, local, local, scroll, scroll, scroll, scroll;
|
|
60
|
+
background-size:
|
|
61
|
+
${"var(--ds-space-300, 24px)"} 100%,
|
|
62
|
+
${"var(--ds-space-300, 24px)"} 100%,
|
|
63
|
+
${"var(--ds-space-100, 8px)"} 100%,
|
|
64
|
+
${"var(--ds-space-100, 8px)"} 100%,
|
|
65
|
+
${"var(--ds-space-100, 8px)"} 100%,
|
|
66
|
+
1px 100%,
|
|
67
|
+
${"var(--ds-space-100, 8px)"} 100%,
|
|
68
|
+
1px 100%;
|
|
69
|
+
background-position:
|
|
70
|
+
0 0,
|
|
71
|
+
0 0,
|
|
72
|
+
100% 0,
|
|
73
|
+
100% 0,
|
|
74
|
+
100% 0,
|
|
75
|
+
100% 0,
|
|
76
|
+
0 0,
|
|
77
|
+
0 0;
|
|
66
78
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */
|
|
80
|
+
overflow-y: hidden;
|
|
81
|
+
}
|
|
70
82
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
text-align: right;
|
|
86
|
+
background-color: ${`var(--ds-background-neutral, ${N30})`};
|
|
87
|
+
padding: ${"var(--ds-space-100, 8px)"};
|
|
88
|
+
position: relative;
|
|
77
89
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
span {
|
|
91
|
+
display: block;
|
|
92
|
+
line-height: 0;
|
|
93
|
+
font-size: 0;
|
|
82
94
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
::before {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
content: counter(line);
|
|
98
|
+
counter-increment: line;
|
|
99
|
+
color: ${`var(--ds-text-subtlest, ${N400})`};
|
|
100
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
101
|
+
line-height: 1.5rem;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
93
105
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex: 1;
|
|
97
109
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
code {
|
|
111
|
+
flex-grow: 1;
|
|
112
|
+
tab-size: 4;
|
|
113
|
+
cursor: text;
|
|
114
|
+
color: ${`var(--ds-text, ${N800})`};
|
|
115
|
+
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
116
|
+
margin: ${"var(--ds-space-100, 8px)"};
|
|
117
|
+
white-space: pre;
|
|
118
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
119
|
+
line-height: 1.5rem;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
111
123
|
`;
|
|
112
124
|
export const codeBlockInListSafariFix = css`
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
::before {
|
|
126
|
+
content: ' ';
|
|
127
|
+
line-height: ${akEditorLineHeight};
|
|
128
|
+
}
|
|
117
129
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
130
|
+
> p:first-child,
|
|
131
|
+
> .code-block:first-child,
|
|
132
|
+
> .ProseMirror-gapcursor:first-child + .code-block {
|
|
133
|
+
margin-top: -${akEditorLineHeight}em !important;
|
|
134
|
+
}
|
|
123
135
|
`;
|