@atlaskit/editor-core 193.24.0 → 193.24.15
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/.eslintrc.js +37 -37
- package/CHANGELOG.md +17424 -17539
- package/architecture/0001-record-architecture-decisions.md +6 -3
- package/architecture/0002-deep-equality-check-for-getsharedstate.md +9 -8
- package/architecture/0003-explicit-plugin-dependencies.md +47 -18
- package/codemods/140.0.0-rc-kraken-fix-type-errors.ts +1 -3
- package/codemods/145.0.0-deprecate-props.ts +1 -3
- package/codemods/172.0.0-transform-smartlinks-prop.ts +1 -3
- package/codemods/175.0.0-rename-unsafe-allowUndoRedoButton-prop.ts +1 -1
- package/codemods/180.1.0-update-to-editor-migration-component.ts +1 -3
- package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +29 -31
- package/codemods/__tests__/remove-config-panel-width-prop.ts +29 -31
- package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +43 -45
- package/codemods/__tests__/rename-smartlinks-prop.ts +57 -59
- package/codemods/__tests__/rename-unsafe-allowUndoRedoButtons-prop.ts +43 -43
- package/codemods/__tests__/rename-unsafe-cards-prop.ts +43 -45
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +41 -45
- package/codemods/migrates/remove-config-panel-width-prop.ts +20 -29
- package/codemods/migrates/rename-editor-to-editor-migration-component.ts +20 -24
- package/codemods/migrates/rename-smartlinks-prop.ts +30 -38
- package/codemods/migrates/rename-unsafe-allowUndoRedoButtons-prop.ts +4 -5
- package/codemods/migrates/rename-unsafe-cards-prop.ts +1 -4
- package/codemods/utils.ts +62 -72
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +3 -3
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/cjs/ui/ContentStyles/ai-panels.js +1 -1
- package/dist/cjs/ui/ContentStyles/code-block.js +2 -2
- package/dist/cjs/ui/ContentStyles/date.js +1 -1
- package/dist/cjs/ui/ContentStyles/expand.js +1 -1
- package/dist/cjs/ui/ContentStyles/extension.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +6 -6
- package/dist/cjs/ui/ContentStyles/layout.js +1 -1
- package/dist/cjs/ui/ContentStyles/media.js +1 -1
- package/dist/cjs/ui/ContentStyles/panel.js +1 -1
- package/dist/cjs/ui/ContentStyles/status.js +1 -1
- package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/cjs/utils/extensions.js +5 -5
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -40
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/es2019/ui/ContentStyles/ai-panels.js +80 -80
- package/dist/es2019/ui/ContentStyles/code-block.js +58 -58
- package/dist/es2019/ui/ContentStyles/date.js +19 -19
- package/dist/es2019/ui/ContentStyles/expand.js +98 -98
- package/dist/es2019/ui/ContentStyles/extension.js +154 -159
- package/dist/es2019/ui/ContentStyles/index.js +139 -144
- package/dist/es2019/ui/ContentStyles/layout.js +125 -125
- package/dist/es2019/ui/ContentStyles/media.js +179 -178
- package/dist/es2019/ui/ContentStyles/panel.js +29 -30
- package/dist/es2019/ui/ContentStyles/status.js +30 -32
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +18 -19
- package/dist/es2019/utils/extensions.js +5 -5
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -3
- package/dist/esm/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/esm/ui/ContentStyles/ai-panels.js +1 -1
- package/dist/esm/ui/ContentStyles/code-block.js +2 -2
- package/dist/esm/ui/ContentStyles/date.js +1 -1
- package/dist/esm/ui/ContentStyles/expand.js +1 -1
- package/dist/esm/ui/ContentStyles/extension.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +6 -6
- package/dist/esm/ui/ContentStyles/layout.js +1 -1
- package/dist/esm/ui/ContentStyles/media.js +1 -1
- package/dist/esm/ui/ContentStyles/panel.js +1 -1
- package/dist/esm/ui/ContentStyles/status.js +1 -1
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/esm/utils/extensions.js +5 -5
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/editor.d.ts +1 -1
- package/dist/types/composable-editor/hooks/useProviders.d.ts +1 -1
- package/dist/types/create-editor/create-preset.d.ts +137 -11
- package/dist/types/create-editor/sort-by-order.d.ts +1 -1
- package/dist/types/event-dispatcher/index.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/presets/default.d.ts +122 -10
- package/dist/types/presets/universal.d.ts +137 -11
- package/dist/types/presets/useUniversalPreset.d.ts +137 -11
- package/dist/types/test-utils.d.ts +1 -1
- package/dist/types/types/browser.d.ts +1 -1
- package/dist/types/types/editor-plugin.d.ts +1 -1
- package/dist/types/types/empty-state-handler.d.ts +1 -1
- package/dist/types/types/feature-flags.d.ts +1 -1
- package/dist/types/types/index.d.ts +3 -3
- package/dist/types/types/pm-config.d.ts +1 -1
- package/dist/types/types/ui-components.d.ts +1 -1
- package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
- package/dist/types/ui/Toolbar/types.d.ts +1 -1
- package/dist/types/utils/action.d.ts +1 -4
- package/dist/types/utils/performance/plugin-performance-report.d.ts +1 -1
- package/dist/types/utils/slice.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/editor.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +155 -11
- package/dist/types-ts4.5/create-editor/sort-by-order.d.ts +1 -1
- package/dist/types-ts4.5/event-dispatcher/index.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/presets/default.d.ts +138 -10
- package/dist/types-ts4.5/presets/universal.d.ts +155 -11
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +155 -11
- package/dist/types-ts4.5/test-utils.d.ts +1 -1
- package/dist/types-ts4.5/types/browser.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-plugin.d.ts +1 -1
- package/dist/types-ts4.5/types/empty-state-handler.d.ts +1 -1
- package/dist/types-ts4.5/types/feature-flags.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +3 -3
- package/dist/types-ts4.5/types/pm-config.d.ts +1 -1
- package/dist/types-ts4.5/types/ui-components.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/types.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +1 -1
- package/dist/types-ts4.5/utils/slice.d.ts +1 -1
- package/docs/0-intro.tsx +13 -19
- package/docs/1-legacy-editor.tsx +13 -19
- package/docs/4-annotations.tsx +222 -223
- package/package.json +28 -20
- package/report.api.md +448 -473
|
@@ -6,185 +6,186 @@ import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClas
|
|
|
6
6
|
import { B200, N60, Y500 } from '@atlaskit/theme/colors';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation
|
|
8
8
|
export const mediaStyles = css`
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
.ProseMirror {
|
|
10
|
+
${mediaSingleSharedStyle} & [layout='full-width'] .${richMediaClassName},
|
|
11
11
|
& [layout='wide'] .${richMediaClassName} {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
12
|
+
margin-left: 50%;
|
|
13
|
+
transform: translateX(-50%);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.media-extended-resize-experience[layout^='wrap-'] {
|
|
17
|
+
// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle
|
|
18
|
+
// to prevent scroll bar
|
|
19
|
+
overflow: visible !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& [layout^='wrap-'] + [layout^='wrap-'] {
|
|
23
|
+
clear: none;
|
|
24
|
+
& + p,
|
|
25
|
+
& + div[class^='fabric-editor-align'],
|
|
26
|
+
& + ul,
|
|
27
|
+
& + ol,
|
|
28
|
+
& + h1,
|
|
29
|
+
& + h2,
|
|
30
|
+
& + h3,
|
|
31
|
+
& + h4,
|
|
32
|
+
& + h5,
|
|
33
|
+
& + h6 {
|
|
34
|
+
clear: both !important;
|
|
35
|
+
}
|
|
36
|
+
& .${richMediaClassName} {
|
|
37
|
+
margin-left: 0;
|
|
38
|
+
margin-right: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${mediaInlineImageStyles}
|
|
43
|
+
|
|
44
|
+
.mediaSingleView-content-wrap[layout^='wrap-'] {
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
// overwrite default Prosemirror setting making it clear: both
|
|
47
|
+
clear: inherit;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mediaSingleView-content-wrap[layout='wrap-left'] {
|
|
51
|
+
float: left;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.mediaSingleView-content-wrap[layout='wrap-right'] {
|
|
55
|
+
float: right;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mediaSingleView-content-wrap[layout='wrap-right']
|
|
59
|
+
+ .mediaSingleView-content-wrap[layout='wrap-left'] {
|
|
60
|
+
clear: both;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Larger margins for resize handlers when at depth 0 of the document */
|
|
64
|
+
& > .mediaSingleView-content-wrap {
|
|
65
|
+
.richMedia-resize-handle-right {
|
|
66
|
+
margin-right: -${akEditorMediaResizeHandlerPaddingWide}px;
|
|
67
|
+
}
|
|
68
|
+
.richMedia-resize-handle-left {
|
|
69
|
+
margin-left: -${akEditorMediaResizeHandlerPaddingWide}px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.richMedia-resize-handle-right,
|
|
75
|
+
.richMedia-resize-handle-left {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
|
|
79
|
+
/* vertical align */
|
|
80
|
+
justify-content: center;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.richMedia-resize-handle-right {
|
|
84
|
+
align-items: flex-end;
|
|
85
|
+
padding-right: ${"var(--ds-space-150, 12px)"};
|
|
86
|
+
margin-right: -${akEditorMediaResizeHandlerPadding}px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.richMedia-resize-handle-left {
|
|
90
|
+
align-items: flex-start;
|
|
91
|
+
padding-left: ${"var(--ds-space-150, 12px)"};
|
|
92
|
+
margin-left: -${akEditorMediaResizeHandlerPadding}px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.richMedia-resize-handle-right::after,
|
|
96
|
+
.richMedia-resize-handle-left::after {
|
|
97
|
+
content: ' ';
|
|
98
|
+
display: flex;
|
|
99
|
+
width: 3px;
|
|
100
|
+
height: 64px;
|
|
101
|
+
|
|
102
|
+
border-radius: 6px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.${richMediaClassName}:hover .richMedia-resize-handle-left::after,
|
|
106
|
+
.${richMediaClassName}:hover .richMedia-resize-handle-right::after {
|
|
107
|
+
background: ${`var(--ds-border, ${N60})`};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.${akEditorSelectedNodeClassName} .richMedia-resize-handle-right::after,
|
|
111
|
+
.${akEditorSelectedNodeClassName} .richMedia-resize-handle-left::after,
|
|
112
|
+
.${richMediaClassName} .richMedia-resize-handle-right:hover::after,
|
|
113
|
+
.${richMediaClassName} .richMedia-resize-handle-left:hover::after,
|
|
114
|
+
.${richMediaClassName}.is-resizing .richMedia-resize-handle-right::after,
|
|
115
|
+
.${richMediaClassName}.is-resizing .richMedia-resize-handle-left::after {
|
|
116
|
+
background: ${`var(--ds-border-focused, ${B200})`};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.__resizable_base__ {
|
|
120
|
+
left: unset !important;
|
|
121
|
+
width: auto !important;
|
|
122
|
+
height: auto !important;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Danger when top level node for smart cards / inline links */
|
|
126
|
+
.danger > div > div > .media-card-frame,
|
|
127
|
+
.danger > span > a {
|
|
128
|
+
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
|
|
129
|
+
box-shadow: 0px 0px 0px ${akEditorSelectedBorderBoldSize}px
|
|
130
|
+
${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
131
|
+
transition:
|
|
132
|
+
background-color 0s,
|
|
133
|
+
box-shadow 0s;
|
|
134
|
+
}
|
|
135
|
+
/* Danger when nested node or common */
|
|
136
|
+
.danger {
|
|
137
|
+
/* Media single */
|
|
138
|
+
.${richMediaClassName} .${fileCardImageViewSelector}::after {
|
|
139
|
+
border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
|
|
140
|
+
}
|
|
141
|
+
/* Media single video player */
|
|
142
|
+
.${richMediaClassName} .${inlinePlayerClassName}::after {
|
|
143
|
+
border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
|
|
144
|
+
}
|
|
145
|
+
/* New file experience */
|
|
146
|
+
.${richMediaClassName} .${newFileExperienceClassName} {
|
|
147
|
+
box-shadow: 0 0 0 1px ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`} !important;
|
|
148
|
+
}
|
|
149
|
+
/* Media resize legacy handlers */
|
|
150
|
+
.richMedia-resize-handle-right::after,
|
|
151
|
+
.richMedia-resize-handle-left::after {
|
|
152
|
+
background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
|
|
153
|
+
}
|
|
154
|
+
/* Media resize new handlers */
|
|
155
|
+
.resizer-handle-thumb {
|
|
156
|
+
background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Smart cards */
|
|
160
|
+
div div .media-card-frame,
|
|
161
|
+
.inlineCardView-content-wrap > span > a {
|
|
162
|
+
background-color: ${"var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))"}; /* R75 with 50% opactiy */
|
|
163
|
+
transition: background-color 0s;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
div div .media-card-frame::after {
|
|
167
|
+
box-shadow: none;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.warning {
|
|
172
|
+
/* Media single */
|
|
173
|
+
.${richMediaClassName} .${fileCardImageViewSelector}::after {
|
|
174
|
+
border: 1px solid ${`var(--ds-border-warning, ${Y500})`};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.${richMediaClassName} .${inlinePlayerClassName}::after {
|
|
178
|
+
border: 1px solid ${`var(--ds-border-warning, ${Y500})`};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.${richMediaClassName} .${newFileExperienceClassName} {
|
|
182
|
+
box-shadow: 0 0 0 1px ${`var(--ds-border-warning, ${Y500})`} !important;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.resizer-handle-thumb {
|
|
186
|
+
background: ${`var(--ds-icon-warning, ${Y500})`} !important;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
188
189
|
`;
|
|
189
190
|
|
|
190
191
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
@@ -3,41 +3,40 @@ import { PanelSharedCssClassName, panelSharedStyles } from '@atlaskit/editor-com
|
|
|
3
3
|
import { akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixin usage
|
|
5
5
|
export const panelStyles = () => css`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
.ProseMirror {
|
|
7
|
+
.${PanelSharedCssClassName.prefix} {
|
|
8
|
+
cursor: pointer;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`} !important;
|
|
10
|
+
/* Danger when top level node */
|
|
11
|
+
&.danger {
|
|
12
|
+
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
|
|
13
|
+
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`} !important;
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
.${PanelSharedCssClassName.icon} {
|
|
16
|
+
color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
.${PanelSharedCssClassName.content} {
|
|
22
|
+
cursor: text;
|
|
23
|
+
}
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
/* Danger when nested node */
|
|
26
|
+
.danger .${PanelSharedCssClassName.prefix} {
|
|
27
|
+
&[data-panel-type] {
|
|
28
|
+
background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
.${PanelSharedCssClassName.icon} {
|
|
31
|
+
color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
${panelSharedStyles()};
|
|
37
|
+
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
.${PanelSharedCssClassName.prefix}.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
40
|
+
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
|
|
41
|
+
}
|
|
43
42
|
`;
|
|
@@ -4,40 +4,38 @@ import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSele
|
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
6
6
|
export const statusStyles = css`
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
.${TableSharedCssClassName.TABLE_CELL_WRAPPER},
|
|
8
|
+
.${TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER},
|
|
9
|
+
[data-layout-section] {
|
|
10
|
+
.${StatusSharedCssClassName.STATUS_CONTAINER} {
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
line-height: 0;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
> span {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.${StatusSharedCssClassName.STATUS_CONTAINER} {
|
|
20
|
+
> span {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
line-height: 0; /* Prevent responsive layouts increasing height of container. */
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}
|
|
25
|
+
&.${akEditorSelectedNodeClassName} .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
|
|
26
|
+
${getSelectionStyles([SelectionStyle.BoxShadow])}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
.danger {
|
|
31
|
+
.${StatusSharedCssClassName.STATUS_LOZENGE} > span {
|
|
32
|
+
background-color: ${akEditorDeleteBackgroundWithOpacity};
|
|
33
|
+
}
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
.${StatusSharedCssClassName.STATUS_CONTAINER}.${akEditorSelectedNodeClassName}
|
|
36
|
+
.${StatusSharedCssClassName.STATUS_LOZENGE}
|
|
37
|
+
> span {
|
|
38
|
+
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
43
41
|
`;
|
|
@@ -3,25 +3,24 @@ import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
3
3
|
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation due to `getSelectionStyles`
|
|
5
5
|
export const taskDecisionStyles = css`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
[data-decision-wrapper] {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
.${akEditorSelectedNodeClassName} > [data-decision-wrapper],
|
|
11
|
+
ol[data-node-type='decisionList'].${akEditorSelectedNodeClassName} {
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
|
|
14
|
+
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
16
|
+
.danger {
|
|
17
|
+
.${TaskDecisionSharedCssClassName.DECISION_CONTAINER}.${akEditorSelectedNodeClassName} > div {
|
|
18
|
+
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
|
|
19
|
+
${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
20
|
+
background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
|
|
21
|
+
&::after {
|
|
22
|
+
content: none; /* reset the Blanket selection style */
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
27
26
|
`;
|
|
@@ -6,7 +6,7 @@ import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
|
|
|
6
6
|
/**
|
|
7
7
|
* Utils to send analytics event when a extension is inserted using quickInsert
|
|
8
8
|
*/
|
|
9
|
-
function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent) {
|
|
9
|
+
function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source) {
|
|
10
10
|
if (createAnalyticsEvent) {
|
|
11
11
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
12
12
|
payload: {
|
|
@@ -17,7 +17,7 @@ function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent) {
|
|
|
17
17
|
extensionType: item.extensionType,
|
|
18
18
|
extensionKey: item.extensionKey,
|
|
19
19
|
key: item.key,
|
|
20
|
-
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
20
|
+
inputMethod: source || INPUT_METHOD.QUICK_INSERT
|
|
21
21
|
},
|
|
22
22
|
eventType: EVENT_TYPE.TRACK
|
|
23
23
|
}
|
|
@@ -42,17 +42,17 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
|
|
|
42
42
|
keywords: item.keywords,
|
|
43
43
|
featured: item.featured,
|
|
44
44
|
categories: item.categories,
|
|
45
|
-
action: insert => {
|
|
45
|
+
action: (insert, state, source) => {
|
|
46
46
|
if (typeof item.node === 'function') {
|
|
47
47
|
resolveImport(item.node()).then(node => {
|
|
48
|
-
sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent);
|
|
48
|
+
sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source);
|
|
49
49
|
if (node) {
|
|
50
50
|
editorActions.replaceSelection(node);
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
return insert('');
|
|
54
54
|
} else {
|
|
55
|
-
sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent);
|
|
55
|
+
sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source);
|
|
56
56
|
return insert(item.node);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "193.24.
|
|
2
|
+
export const version = "193.24.15";
|
|
@@ -13,11 +13,11 @@ var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
14
14
|
var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
|
|
15
15
|
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
16
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
16
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\tpadding-left: ", ";\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
20
|
-
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
20
|
+
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t/* stylelint-disable declaration-block-no-duplicate-properties */\n\tposition: relative;\n\tposition: sticky;\n\t/* stylelint-enable declaration-block-no-duplicate-properties */\n\tpadding-bottom: ", ";\n\tz-index: ", ";\n\ttransition: box-shadow ease-in-out 0.2s;\n\t&.show-keyline {\n\t\tbox-shadow: 0 ", "px 0 0\n\t\t\t", ";\n\t}\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
|
|
21
21
|
var StickyToolbar = function StickyToolbar(props) {
|
|
22
22
|
var _useState = useState(0),
|
|
23
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -104,6 +104,6 @@ export var MainToolbar = function MainToolbar(_ref) {
|
|
|
104
104
|
export var mainToolbarCustomComponentsSlotStyle = function mainToolbarCustomComponentsSlotStyle() {
|
|
105
105
|
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
106
106
|
return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
107
|
-
css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
107
|
+
css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\t\tpadding-right: ", ";\n\t\t> div {\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t", "\n\t"])), "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n {\n padding-right: 0;\n }\n }\n "))
|
|
108
108
|
);
|
|
109
109
|
};
|
|
@@ -53,11 +53,11 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
53
53
|
var keyboardHeight = (_basePluginState$keyb = basePluginState === null || basePluginState === void 0 ? void 0 : basePluginState.keyboardHeight) !== null && _basePluginState$keyb !== void 0 ? _basePluginState$keyb : -1;
|
|
54
54
|
|
|
55
55
|
/*
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
We calculate the min-height based on the windowHeight - keyboardHeight - paddingTop.
|
|
57
|
+
This is needed due to scrolling issues when there is no content to scroll (like, only having 1 paragraph),
|
|
58
|
+
but if the clickable area is bigger than the windowHeight - keyboard (including toolbar) then the view
|
|
59
|
+
is scrolled nevertheless, and it gives the sensation that the content was lost.
|
|
60
|
+
*/
|
|
61
61
|
|
|
62
62
|
if (!persistScrollGutter) {
|
|
63
63
|
// in iOS Hybrid Editor windowHeight doesn't exclude keyboardHeight
|