@atlaskit/editor-core 193.24.6 → 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 +8 -0
- 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/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/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/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 +135 -9
- 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 +120 -8
- package/dist/types/presets/universal.d.ts +135 -9
- package/dist/types/presets/useUniversalPreset.d.ts +135 -9
- 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 +153 -9
- 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 +136 -8
- package/dist/types-ts4.5/presets/universal.d.ts +153 -9
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +153 -9
- 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 +25 -12
- package/report.api.md +448 -473
|
@@ -34,97 +34,96 @@ import { taskDecisionStyles } from './tasks-and-decisions';
|
|
|
34
34
|
|
|
35
35
|
// eslint-disable-next-line @atlaskit/design-system/no-exported-css
|
|
36
36
|
export const linkStyles = css`
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
.ProseMirror {
|
|
38
|
+
${linkSharedStyle}
|
|
39
|
+
}
|
|
40
40
|
`;
|
|
41
41
|
const ruleStyles = () => css`
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
.ProseMirror {
|
|
43
|
+
${ruleSharedStyles()};
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
hr {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
padding: ${"var(--ds-space-050, 4px)"} 0;
|
|
48
|
+
margin: ${"var(--ds-space-300, 24px)"} 0;
|
|
49
|
+
background-clip: content-box;
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
&.${akEditorSelectedNodeClassName} {
|
|
52
|
+
outline: none;
|
|
53
|
+
background-color: ${`var(--ds-border-selected, ${akEditorSelectedBorderColor})`};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
57
|
`;
|
|
58
58
|
const mentionsStyles = css`
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
.${MentionSharedCssClassName.MENTION_CONTAINER} {
|
|
60
|
+
&.${akEditorSelectedNodeClassName} [data-mention-id] > span {
|
|
61
|
+
${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background])}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
/* need to specify dark text colour because personal mentions
|
|
64
64
|
(in dark blue) have white text by default */
|
|
65
65
|
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
.danger {
|
|
70
|
+
.${MentionSharedCssClassName.MENTION_CONTAINER}.${akEditorSelectedNodeClassName}
|
|
71
|
+
> span
|
|
72
|
+
> span
|
|
73
|
+
> span {
|
|
74
|
+
box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
|
|
75
|
+
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackgroundWithOpacity})`};
|
|
76
|
+
}
|
|
77
|
+
.${MentionSharedCssClassName.MENTION_CONTAINER} > span > span > span {
|
|
78
|
+
background-color: ${`var(--ds-background-neutral, ${N30A})`};
|
|
79
|
+
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
82
|
`;
|
|
83
83
|
const listsStyles = css`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
.ProseMirror {
|
|
85
|
+
li {
|
|
86
|
+
position: relative;
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
> p:not(:first-child) {
|
|
89
|
+
margin: ${"var(--ds-space-050, 4px)"} 0 0 0;
|
|
90
|
+
}
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
// In SSR the above rule will apply to all p tags because first-child would be a style tag.
|
|
93
|
+
// The following rule resets the first p tag back to its original margin
|
|
94
|
+
// defined in packages/editor/editor-common/src/styles/shared/paragraph.ts
|
|
95
|
+
> style:first-child + p {
|
|
96
|
+
margin-top: ${blockNodesVerticalMargin};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
&:not([data-node-type='decisionList']) > li,
|
|
101
101
|
// This prevents https://product-fabric.atlassian.net/browse/ED-20924
|
|
102
102
|
&:not(.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER}) > li {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
${browser.safari ? codeBlockInListSafariFix : ''}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
106
|
`;
|
|
107
107
|
const emojiStyles = css`
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
.${EmojiSharedCssClassName.EMOJI_CONTAINER} {
|
|
109
|
+
display: inline-block;
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
.${EmojiSharedCssClassName.EMOJI_NODE} {
|
|
112
|
+
cursor: pointer;
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
&.${EmojiSharedCssClassName.EMOJI_IMAGE} > span {
|
|
115
|
+
/** needed for selection style to cover custom emoji image properly */
|
|
116
|
+
display: flex;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
120
|
+
&.${akEditorSelectedNodeClassName} {
|
|
121
|
+
.${EmojiSharedCssClassName.EMOJI_SPRITE}, .${EmojiSharedCssClassName.EMOJI_IMAGE} {
|
|
122
|
+
border-radius: 2px;
|
|
123
|
+
${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow])}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
128
127
|
`;
|
|
129
128
|
|
|
130
129
|
// eslint-disable-next-line @atlaskit/design-system/no-exported-css
|
|
@@ -143,42 +142,42 @@ export const placeholderStyles = css({
|
|
|
143
142
|
}
|
|
144
143
|
});
|
|
145
144
|
const contentStyles = props => css`
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
.ProseMirror {
|
|
146
|
+
outline: none;
|
|
147
|
+
font-size: ${editorFontSize({
|
|
149
148
|
theme: props.theme
|
|
150
149
|
})}px;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
${whitespaceSharedStyles};
|
|
151
|
+
${paragraphSharedStyles};
|
|
152
|
+
${listsSharedStyles};
|
|
153
|
+
${indentationSharedStyles};
|
|
154
|
+
${shadowSharedStyle};
|
|
155
|
+
${InlineNodeViewSharedStyles};
|
|
156
|
+
}
|
|
158
157
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {
|
|
159
|
+
pointer-events: none;
|
|
160
|
+
opacity: 0.7;
|
|
161
|
+
}
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
.ProseMirror-hideselection *::selection {
|
|
164
|
+
background: transparent;
|
|
165
|
+
}
|
|
167
166
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
168
|
+
background: transparent;
|
|
169
|
+
}
|
|
171
170
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
.ProseMirror-selectednode {
|
|
172
|
+
outline: none;
|
|
173
|
+
}
|
|
175
174
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
.ProseMirror-selectednode:empty {
|
|
176
|
+
outline: 2px solid ${"var(--ds-border-focused, #8cf)"};
|
|
177
|
+
}
|
|
179
178
|
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
${placeholderTextStyles}
|
|
180
|
+
${placeholderStyles}
|
|
182
181
|
${codeBlockStyles()}
|
|
183
182
|
|
|
184
183
|
${blocktypeStyles()}
|
|
@@ -191,8 +190,8 @@ const contentStyles = props => css`
|
|
|
191
190
|
${layoutStyles(props.viewMode)}
|
|
192
191
|
${telepointerStyle}
|
|
193
192
|
${gapCursorStyles};
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
${tableStyles(props)}
|
|
194
|
+
${panelStyles()}
|
|
196
195
|
${mentionsStyles}
|
|
197
196
|
${emojiStyles}
|
|
198
197
|
${tasksAndDecisionsStyles}
|
|
@@ -216,62 +215,58 @@ const contentStyles = props => css`
|
|
|
216
215
|
${aiPanelStyles(props.colorMode)}
|
|
217
216
|
|
|
218
217
|
.panelView-content-wrap {
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
box-sizing: border-box;
|
|
219
|
+
}
|
|
221
220
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
.mediaGroupView-content-wrap ul {
|
|
222
|
+
padding: 0;
|
|
223
|
+
}
|
|
225
224
|
|
|
226
|
-
|
|
225
|
+
/** Needed to override any cleared floats, e.g. image wrapping */
|
|
227
226
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
div.fabric-editor-block-mark[class^='fabric-editor-align'] {
|
|
228
|
+
clear: none !important;
|
|
229
|
+
}
|
|
231
230
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
.fabric-editor-align-end {
|
|
232
|
+
text-align: right;
|
|
233
|
+
}
|
|
235
234
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
.fabric-editor-align-start {
|
|
236
|
+
text-align: left;
|
|
237
|
+
}
|
|
239
238
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
.fabric-editor-align-center {
|
|
240
|
+
text-align: center;
|
|
241
|
+
}
|
|
243
242
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
.pm-table-cell-content-wrap .mediaGroupView-content-wrap {
|
|
256
|
-
clear: both;
|
|
257
|
-
}
|
|
243
|
+
.pm-table-header-content-wrap :not(.fabric-editor-alignment),
|
|
244
|
+
.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,
|
|
245
|
+
.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {
|
|
246
|
+
p:first-of-type {
|
|
247
|
+
margin-top: 0;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
.pm-table-cell-content-wrap .mediaGroupView-content-wrap {
|
|
251
|
+
clear: both;
|
|
252
|
+
}
|
|
258
253
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
254
|
+
.hyperlink-floating-toolbar,
|
|
255
|
+
.${MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT} {
|
|
256
|
+
padding: 0;
|
|
257
|
+
}
|
|
263
258
|
|
|
264
|
-
|
|
259
|
+
/* Link icon in the Atlaskit package
|
|
265
260
|
is bigger than the others
|
|
266
261
|
*/
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
262
|
+
.hyperlink-open-link {
|
|
263
|
+
svg {
|
|
264
|
+
max-width: 18px;
|
|
265
|
+
}
|
|
266
|
+
&[href] {
|
|
267
|
+
padding: 0 4px;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
275
270
|
`;
|
|
276
271
|
export const createEditorContentStyle = styles => {
|
|
277
272
|
return /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
@@ -8,131 +8,131 @@ export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
10
10
|
export const layoutStyles = viewMode => css`
|
|
11
|
-
|
|
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
|
-
|
|
11
|
+
.ProseMirror {
|
|
12
|
+
${columnLayoutSharedStyle} [data-layout-section] {
|
|
13
|
+
// TODO: Migrate away from gridSize
|
|
14
|
+
// Recommendation: Replace directly with 7px
|
|
15
|
+
margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset}px 0;
|
|
16
|
+
transition: border-color 0.3s ${akEditorSwoopCubicBezier};
|
|
17
|
+
cursor: ${viewMode === 'view' ? 'default' : 'pointer'};
|
|
18
|
+
|
|
19
|
+
/* Inner cursor located 26px from left */
|
|
20
|
+
[data-layout-column] {
|
|
21
|
+
flex: 1;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
border: ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px solid
|
|
24
|
+
${`var(--ds-border, ${N40A})`};
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
padding: ${LAYOUT_COLUMN_PADDING}px;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
|
|
29
|
+
> div {
|
|
30
|
+
> :not(style):first-child,
|
|
31
|
+
> style:first-child + * {
|
|
32
|
+
margin-top: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
> .ProseMirror-gapcursor:first-child + *,
|
|
36
|
+
> style:first-child + .ProseMirror-gapcursor + * {
|
|
37
|
+
margin-top: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
> .ProseMirror-gapcursor:first-child + span + *,
|
|
41
|
+
> style:first-child + .ProseMirror-gapcursor:first-child + span + * {
|
|
42
|
+
margin-top: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
> .embedCardView-content-wrap:first-of-type .rich-media-item {
|
|
46
|
+
margin-top: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
> .mediaSingleView-content-wrap:first-of-type .rich-media-item {
|
|
50
|
+
margin-top: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
> .ProseMirror-gapcursor.-right:first-child
|
|
54
|
+
+ .mediaSingleView-content-wrap
|
|
55
|
+
.rich-media-item,
|
|
56
|
+
> style:first-child
|
|
57
|
+
+ .ProseMirror-gapcursor.-right
|
|
58
|
+
+ .mediaSingleView-content-wrap
|
|
59
|
+
.rich-media-item,
|
|
60
|
+
> .ProseMirror-gapcursor.-right:first-of-type
|
|
61
|
+
+ .embedCardView-content-wrap
|
|
62
|
+
.rich-media-item {
|
|
63
|
+
margin-top: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
> .ProseMirror-gapcursor:first-child
|
|
67
|
+
+ span
|
|
68
|
+
+ .mediaSingleView-content-wrap
|
|
69
|
+
.rich-media-item,
|
|
70
|
+
> style:first-child
|
|
71
|
+
+ .ProseMirror-gapcursor
|
|
72
|
+
+ span
|
|
73
|
+
+ .mediaSingleView-content-wrap
|
|
74
|
+
.rich-media-item {
|
|
75
|
+
margin-top: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down
|
|
79
79
|
and shrinking layout's node selectable area (leniency margin) */
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
> [data-node-type='decisionList'] {
|
|
81
|
+
li:first-of-type [data-decision-wrapper] {
|
|
82
|
+
margin-top: 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Make the 'content' fill the entire height of the layout column to allow click
|
|
88
88
|
handler of layout section nodeview to target only data-layout-column */
|
|
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
|
-
|
|
89
|
+
[data-layout-content] {
|
|
90
|
+
height: 100%;
|
|
91
|
+
cursor: text;
|
|
92
|
+
.mediaGroupView-content-wrap {
|
|
93
|
+
clear: both;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-layout-column] + [data-layout-column] {
|
|
99
|
+
margin-left: ${LAYOUT_SECTION_MARGIN}px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media screen and (max-width: ${gridMediumMaxWidth}px) {
|
|
103
|
+
[data-layout-column] + [data-layout-column] {
|
|
104
|
+
margin-left: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.
|
|
109
|
+
// This is because the default state already uses the same token and, as such, the hover style won't change anything.
|
|
110
|
+
// https://product-fabric.atlassian.net/browse/DSP-4441
|
|
111
|
+
/* Shows the border when cursor is inside a layout */
|
|
112
|
+
&.selected [data-layout-column],
|
|
113
|
+
&:hover [data-layout-column] {
|
|
114
|
+
border: ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px solid
|
|
115
|
+
${`var(--ds-border, ${N50A})`};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&.selected.danger > [data-layout-column] {
|
|
119
|
+
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
|
|
120
|
+
border-color: ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
124
|
+
[data-layout-column] {
|
|
125
|
+
${getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket])}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.fabric-editor--full-width-mode .ProseMirror {
|
|
132
|
+
[data-layout-section] {
|
|
133
|
+
.${TableCssClassName.TABLE_CONTAINER} {
|
|
134
|
+
margin: 0 ${tableMarginFullWidthMode}px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
138
|
`;
|