@atlaskit/renderer 92.0.1 → 93.0.2
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 +76 -0
- package/dist/cjs/analytics/enums.js +1 -0
- package/dist/cjs/i18n/en.js +28 -0
- package/dist/cjs/i18n/en_GB.js +28 -0
- package/dist/cjs/i18n/pl.js +7 -1
- package/dist/cjs/i18n/pt_BR.js +1 -1
- package/dist/cjs/react/marks/alignment.js +11 -12
- package/dist/cjs/react/marks/breakout.js +7 -9
- package/dist/cjs/react/marks/link.js +13 -6
- package/dist/cjs/react/nodes/codeBlock.js +1 -1
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +13 -11
- package/dist/cjs/react/nodes/embedCard.js +25 -33
- package/dist/cjs/react/nodes/heading-anchor.js +7 -6
- package/dist/cjs/react/nodes/mediaSingle/index.js +15 -4
- package/dist/cjs/react/nodes/mediaSingle/styles.js +7 -10
- package/dist/cjs/react/nodes/panel.js +36 -20
- package/dist/cjs/react/nodes/table/sticky.js +51 -54
- package/dist/cjs/react/nodes/table.js +2 -10
- package/dist/cjs/react/utils/performance/RenderTracking.js +52 -0
- package/dist/cjs/render-document.js +2 -2
- package/dist/cjs/text/index.js +2 -2
- package/dist/cjs/ui/Expand.js +40 -20
- package/dist/cjs/ui/MediaCard.js +4 -14
- package/dist/cjs/ui/Renderer/click-to-edit.js +4 -4
- package/dist/cjs/ui/Renderer/index.js +39 -50
- package/dist/cjs/ui/Renderer/style.js +58 -63
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +19 -21
- package/dist/cjs/ui/SortingIcon.js +8 -9
- package/dist/cjs/ui/renderer-props.js +1 -3
- package/dist/cjs/utils.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/enums.js +1 -0
- package/dist/es2019/i18n/en.js +20 -0
- package/dist/es2019/i18n/en_GB.js +20 -0
- package/dist/es2019/i18n/pl.js +7 -1
- package/dist/es2019/i18n/pt_BR.js +1 -1
- package/dist/es2019/react/marks/alignment.js +15 -7
- package/dist/es2019/react/marks/breakout.js +6 -5
- package/dist/es2019/react/marks/link.js +8 -5
- package/dist/es2019/react/nodes/codeBlock.js +1 -1
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +12 -9
- package/dist/es2019/react/nodes/embedCard.js +16 -16
- package/dist/es2019/react/nodes/heading-anchor.js +9 -6
- package/dist/es2019/react/nodes/mediaSingle/index.js +10 -6
- package/dist/es2019/react/nodes/mediaSingle/styles.js +6 -7
- package/dist/es2019/react/nodes/panel.js +38 -18
- package/dist/es2019/react/nodes/table/sticky.js +48 -41
- package/dist/es2019/react/nodes/table.js +2 -5
- package/dist/es2019/react/utils/performance/RenderTracking.js +37 -0
- package/dist/es2019/render-document.js +1 -1
- package/dist/es2019/text/index.js +1 -1
- package/dist/es2019/ui/Expand.js +52 -28
- package/dist/es2019/ui/MediaCard.js +3 -6
- package/dist/es2019/ui/Renderer/click-to-edit.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +38 -43
- package/dist/es2019/ui/Renderer/style.js +363 -337
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +26 -15
- package/dist/es2019/ui/SortingIcon.js +9 -7
- package/dist/es2019/ui/renderer-props.js +1 -1
- package/dist/es2019/utils.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/enums.js +1 -0
- package/dist/esm/i18n/en.js +20 -0
- package/dist/esm/i18n/en_GB.js +20 -0
- package/dist/esm/i18n/pl.js +7 -1
- package/dist/esm/i18n/pt_BR.js +1 -1
- package/dist/esm/react/marks/alignment.js +13 -6
- package/dist/esm/react/marks/breakout.js +6 -5
- package/dist/esm/react/marks/link.js +7 -5
- package/dist/esm/react/nodes/codeBlock.js +1 -1
- package/dist/esm/react/nodes/codeBlockCopyButton.js +10 -7
- package/dist/esm/react/nodes/embedCard.js +19 -19
- package/dist/esm/react/nodes/heading-anchor.js +8 -6
- package/dist/esm/react/nodes/mediaSingle/index.js +11 -6
- package/dist/esm/react/nodes/mediaSingle/styles.js +5 -7
- package/dist/esm/react/nodes/panel.js +34 -17
- package/dist/esm/react/nodes/table/sticky.js +53 -52
- package/dist/esm/react/nodes/table.js +2 -8
- package/dist/esm/react/utils/performance/RenderTracking.js +39 -0
- package/dist/esm/render-document.js +1 -1
- package/dist/esm/text/index.js +1 -1
- package/dist/esm/ui/Expand.js +45 -21
- package/dist/esm/ui/MediaCard.js +3 -9
- package/dist/esm/ui/Renderer/click-to-edit.js +1 -1
- package/dist/esm/ui/Renderer/index.js +39 -47
- package/dist/esm/ui/Renderer/style.js +56 -57
- package/dist/esm/ui/Renderer/truncated-wrapper.js +20 -14
- package/dist/esm/ui/SortingIcon.js +9 -7
- package/dist/esm/ui/renderer-props.js +1 -1
- package/dist/esm/utils.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +1 -4
- package/dist/types/analytics/enums.d.ts +1 -0
- package/dist/types/analytics/events.d.ts +7 -2
- package/dist/types/i18n/en.d.ts +20 -0
- package/dist/types/i18n/en_GB.d.ts +20 -0
- package/dist/types/i18n/pl.d.ts +6 -0
- package/dist/types/react/marks/alignment.d.ts +2 -2
- package/dist/types/react/marks/breakout.d.ts +4 -3
- package/dist/types/react/marks/link.d.ts +2 -2
- package/dist/types/react/nodes/copy-text-provider.d.ts +1 -1
- package/dist/types/react/nodes/embedCard.d.ts +3 -2
- package/dist/types/react/nodes/extension.d.ts +2 -2
- package/dist/types/react/nodes/fallback.d.ts +1 -1
- package/dist/types/react/nodes/heading-anchor.d.ts +1 -0
- package/dist/types/react/nodes/index.d.ts +20 -38
- package/dist/types/react/nodes/inlineCard.d.ts +20 -20
- package/dist/types/react/nodes/media.d.ts +1 -1
- package/dist/types/react/nodes/mediaGroup.d.ts +3 -3
- package/dist/types/react/nodes/mediaSingle/index.d.ts +1 -0
- package/dist/types/react/nodes/mediaSingle/styles.d.ts +2 -3
- package/dist/types/react/nodes/panel.d.ts +3 -1
- package/dist/types/react/nodes/table/sticky.d.ts +4 -2
- package/dist/types/react/nodes/table.d.ts +80 -80
- package/dist/types/react/utils/performance/RenderTracking.d.ts +15 -0
- package/dist/types/ui/Expand.d.ts +2 -2
- package/dist/types/ui/MediaCard.d.ts +2 -4
- package/dist/types/ui/Renderer/index.d.ts +0 -25
- package/dist/types/ui/Renderer/style.d.ts +1 -4
- package/dist/types/ui/Renderer/truncated-wrapper.d.ts +3 -1
- package/dist/types/ui/SmartCardStorage.d.ts +21 -20
- package/dist/types/ui/SortingIcon.d.ts +8 -6
- package/dist/types/ui/renderer-props.d.ts +14 -2
- package/dist/types/utils.d.ts +1 -1
- package/package.json +23 -25
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import styled, { css as deprecatedCss } from 'styled-components';
|
|
2
1
|
import { css } from '@emotion/react';
|
|
3
2
|
import { themed } from '@atlaskit/theme/components';
|
|
4
3
|
import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/constants';
|
|
5
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
6
5
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
7
|
-
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles,
|
|
6
|
+
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles } from '@atlaskit/editor-common/styles';
|
|
8
7
|
import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
9
8
|
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
10
9
|
import { RendererCssClassName } from '../../consts';
|
|
@@ -34,7 +33,7 @@ export const headingSizes = {
|
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
const headingAnchorStyle = headingTag =>
|
|
36
|
+
const headingAnchorStyle = headingTag => css`
|
|
38
37
|
/**
|
|
39
38
|
* The copy link button doesn't reserve space in the DOM so that
|
|
40
39
|
* the text alignment isn't impacted by the button/icon's space.
|
|
@@ -85,9 +84,14 @@ const alignedHeadingAnchorStyle = ({
|
|
|
85
84
|
return '';
|
|
86
85
|
}
|
|
87
86
|
|
|
88
|
-
return `
|
|
87
|
+
return css`
|
|
89
88
|
.fabric-editor-block-mark[data-align] > {
|
|
90
|
-
h1,
|
|
89
|
+
h1,
|
|
90
|
+
h2,
|
|
91
|
+
h3,
|
|
92
|
+
h4,
|
|
93
|
+
h5,
|
|
94
|
+
h6 {
|
|
91
95
|
position: relative;
|
|
92
96
|
}
|
|
93
97
|
}
|
|
@@ -98,41 +102,45 @@ const alignedHeadingAnchorStyle = ({
|
|
|
98
102
|
* container edge.
|
|
99
103
|
*/
|
|
100
104
|
.fabric-editor-block-mark:not([data-align='center'])[data-align] {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
105
|
+
> {
|
|
106
|
+
h1,
|
|
107
|
+
h2,
|
|
108
|
+
h3,
|
|
109
|
+
h4,
|
|
110
|
+
h5,
|
|
111
|
+
h6 {
|
|
112
|
+
// Using right to left text to achieve the inverse effect
|
|
113
|
+
// of where the copy link button icon sits for left/center
|
|
114
|
+
// alignment.
|
|
115
|
+
// Although this is unorthodox it's the only approach which
|
|
116
|
+
// allows the button to sit flush against the left edge of
|
|
117
|
+
// bottom line of text.
|
|
118
|
+
direction: rtl;
|
|
119
|
+
|
|
120
|
+
// By default RTL will negatively impact the layout of special
|
|
121
|
+
// characters within the heading text, and potentially other
|
|
122
|
+
// nested inline nodes. To prevent this we insert pseudo elements
|
|
123
|
+
// containing HTML entities to retain LTR for all heading content
|
|
124
|
+
// except for the copy link button.
|
|
125
|
+
> *:not(.${HeadingAnchorWrapperClassName}):not(br) {
|
|
126
|
+
::before {
|
|
127
|
+
// Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm
|
|
128
|
+
content: '\u202A';
|
|
129
|
+
}
|
|
130
|
+
::after {
|
|
131
|
+
// Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm
|
|
132
|
+
content: '\u202C';
|
|
125
133
|
}
|
|
126
134
|
}
|
|
127
135
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
}
|
|
137
|
+
.${HeadingAnchorWrapperClassName} {
|
|
138
|
+
margin: 0 6px 0 0;
|
|
139
|
+
}
|
|
131
140
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
141
|
+
@media (hover: hover) and (pointer: fine) {
|
|
142
|
+
.${HeadingAnchorWrapperClassName} > button {
|
|
143
|
+
transform: translate(8px, 0px);
|
|
136
144
|
}
|
|
137
145
|
}
|
|
138
146
|
}
|
|
@@ -175,7 +183,7 @@ const tableSortableColumnStyle = ({
|
|
|
175
183
|
`;
|
|
176
184
|
}
|
|
177
185
|
|
|
178
|
-
return `
|
|
186
|
+
return css`
|
|
179
187
|
.${RendererCssClassName.SORTABLE_COLUMN} {
|
|
180
188
|
padding: 0;
|
|
181
189
|
|
|
@@ -212,7 +220,8 @@ const tableSortableColumnStyle = ({
|
|
|
212
220
|
${headingsCss}
|
|
213
221
|
}
|
|
214
222
|
|
|
215
|
-
&.${RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED}
|
|
223
|
+
&.${RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED}
|
|
224
|
+
.${RendererCssClassName.SORTABLE_COLUMN_BUTTON} {
|
|
216
225
|
cursor: default;
|
|
217
226
|
}
|
|
218
227
|
|
|
@@ -236,14 +245,15 @@ const tableSortableColumnStyle = ({
|
|
|
236
245
|
};
|
|
237
246
|
|
|
238
247
|
const fullPageStyles = ({
|
|
239
|
-
theme,
|
|
240
248
|
appearance
|
|
249
|
+
}, {
|
|
250
|
+
theme
|
|
241
251
|
}) => {
|
|
242
252
|
if (appearance !== 'full-page' && appearance !== 'mobile') {
|
|
243
253
|
return '';
|
|
244
254
|
}
|
|
245
255
|
|
|
246
|
-
return `
|
|
256
|
+
return css`
|
|
247
257
|
max-width: ${theme && theme.layoutMaxWidth ? `${theme.layoutMaxWidth}px` : 'none'};
|
|
248
258
|
margin: 0 auto;
|
|
249
259
|
padding: 0 ${appearance === 'full-page' ? FullPagePadding : 0}px;
|
|
@@ -257,378 +267,394 @@ const fullWidthStyles = ({
|
|
|
257
267
|
return '';
|
|
258
268
|
}
|
|
259
269
|
|
|
260
|
-
return `
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
return css`
|
|
271
|
+
max-width: ${akEditorFullWidthLayoutWidth}px;
|
|
272
|
+
margin: 0 auto;
|
|
263
273
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
274
|
+
.fabric-editor-breakout-mark,
|
|
275
|
+
.pm-table-container,
|
|
276
|
+
.ak-renderer-extension {
|
|
277
|
+
width: 100% !important;
|
|
278
|
+
}
|
|
269
279
|
`;
|
|
270
280
|
};
|
|
271
281
|
|
|
272
|
-
export const rendererStyles = theme => {
|
|
282
|
+
export const rendererStyles = wrapperProps => theme => {
|
|
273
283
|
// This is required to be compatible with styled-components prop structure.
|
|
274
|
-
const
|
|
284
|
+
const themeProps = {
|
|
275
285
|
theme
|
|
276
286
|
};
|
|
277
287
|
return css`
|
|
278
|
-
${
|
|
279
|
-
|
|
280
|
-
${
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
/* plugin styles*/
|
|
296
|
-
${mediaSingleSharedStyle} &
|
|
297
|
-
div[class^='image-wrap-'] + div[class^='image-wrap-'] {
|
|
298
|
-
margin-left: 0;
|
|
299
|
-
margin-right: 0;
|
|
288
|
+
font-size: ${editorFontSize(themeProps)}px;
|
|
289
|
+
line-height: 1.5rem;
|
|
290
|
+
color: ${themed({
|
|
291
|
+
light: colors.N800,
|
|
292
|
+
dark: '#B8C7E0'
|
|
293
|
+
})(themeProps)};
|
|
294
|
+
|
|
295
|
+
.${RendererCssClassName.DOCUMENT}::after {
|
|
296
|
+
// we add a clearfix after ak-renderer-document in order to
|
|
297
|
+
// contain internal floats (such as media images that are "wrap-left")
|
|
298
|
+
// to just the renderer (and not spill outside of it)
|
|
299
|
+
content: '';
|
|
300
|
+
visibility: hidden;
|
|
301
|
+
display: block;
|
|
302
|
+
height: 0;
|
|
303
|
+
clear: both;
|
|
300
304
|
}
|
|
301
305
|
|
|
302
|
-
${
|
|
303
|
-
|
|
304
|
-
}; // prettier-ignore
|
|
305
|
-
|
|
306
|
-
export const DeprecatedWrapper = styled.div`
|
|
307
|
-
font-size: ${editorFontSize}px;
|
|
308
|
-
line-height: 1.5rem;
|
|
309
|
-
color: ${themed({
|
|
310
|
-
light: colors.N800,
|
|
311
|
-
dark: '#B8C7E0'
|
|
312
|
-
})};
|
|
313
|
-
|
|
314
|
-
${fullPageStyles}
|
|
315
|
-
${fullWidthStyles}
|
|
316
|
-
|
|
317
|
-
& h1 {
|
|
318
|
-
${headingAnchorStyle('h1')}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
& h2 {
|
|
322
|
-
${headingAnchorStyle('h2')}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
& h3 {
|
|
326
|
-
${headingAnchorStyle('h3')}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
& h4 {
|
|
330
|
-
${headingAnchorStyle('h4')}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
& h5 {
|
|
334
|
-
${headingAnchorStyle('h5')}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
& h6 {
|
|
338
|
-
${headingAnchorStyle('h6')}
|
|
339
|
-
}
|
|
306
|
+
${fullPageStyles(wrapperProps, themeProps)}
|
|
307
|
+
${fullWidthStyles(wrapperProps)}
|
|
340
308
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
309
|
+
& h1 {
|
|
310
|
+
${headingAnchorStyle('h1')}
|
|
311
|
+
}
|
|
344
312
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
text-decoration: underline;
|
|
313
|
+
& h2 {
|
|
314
|
+
${headingAnchorStyle('h2')}
|
|
348
315
|
}
|
|
349
|
-
}
|
|
350
316
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
317
|
+
& h3 {
|
|
318
|
+
${headingAnchorStyle('h3')}
|
|
319
|
+
}
|
|
354
320
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
321
|
+
& h4 {
|
|
322
|
+
${headingAnchorStyle('h4')}
|
|
323
|
+
}
|
|
358
324
|
|
|
359
|
-
|
|
360
|
-
|
|
325
|
+
& h5 {
|
|
326
|
+
${headingAnchorStyle('h5')}
|
|
327
|
+
}
|
|
361
328
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
font-weight: 400;
|
|
366
|
-
white-space: pre-wrap;
|
|
367
|
-
word-wrap: break-word;
|
|
368
|
-
}
|
|
329
|
+
& h6 {
|
|
330
|
+
${headingAnchorStyle('h6')}
|
|
331
|
+
}
|
|
369
332
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
dark: colors.DN70
|
|
374
|
-
})};
|
|
375
|
-
border-radius: ${borderRadius()}px;
|
|
376
|
-
color: ${themed({
|
|
377
|
-
light: colors.N800,
|
|
378
|
-
dark: colors.DN600
|
|
379
|
-
})};
|
|
380
|
-
padding: 2px 4px;
|
|
381
|
-
margin: 0 1px;
|
|
382
|
-
transition: background 0.3s;
|
|
383
|
-
}
|
|
333
|
+
& span.akActionMark {
|
|
334
|
+
color: ${colors.B400};
|
|
335
|
+
text-decoration: none;
|
|
384
336
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
337
|
+
&:hover {
|
|
338
|
+
color: ${colors.B300};
|
|
339
|
+
text-decoration: underline;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
389
342
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
margin: ${gridSize() * 3}px 0;
|
|
394
|
-
}
|
|
343
|
+
& span.akActionMark {
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
}
|
|
395
346
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
347
|
+
& span[data-placeholder] {
|
|
348
|
+
color: ${colors.placeholderText(themeProps)};
|
|
349
|
+
}
|
|
399
350
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
351
|
+
${whitespaceSharedStyles};
|
|
352
|
+
${blockquoteSharedStyles};
|
|
353
|
+
${headingsSharedStyles(themeProps)};
|
|
354
|
+
${ruleSharedStyles(themeProps)};
|
|
355
|
+
${paragraphSharedStyles};
|
|
356
|
+
${listsSharedStyles};
|
|
357
|
+
${indentationSharedStyles};
|
|
358
|
+
${blockMarksSharedStyles};
|
|
359
|
+
${codeMarkSharedStyles(themeProps)};
|
|
360
|
+
${shadowSharedStyle};
|
|
361
|
+
${dateSharedStyle};
|
|
362
|
+
${textColorStyles};
|
|
363
|
+
${tasksAndDecisionsStyles};
|
|
364
|
+
${smartCardSharedStyles}
|
|
411
365
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
& + h6 {
|
|
419
|
-
margin-top: 8px;
|
|
366
|
+
& .UnknownBlock {
|
|
367
|
+
font-family: ${fontFamily()};
|
|
368
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
369
|
+
font-weight: 400;
|
|
370
|
+
white-space: pre-wrap;
|
|
371
|
+
word-wrap: break-word;
|
|
420
372
|
}
|
|
421
|
-
}
|
|
422
373
|
|
|
423
|
-
|
|
374
|
+
& span.date-node {
|
|
375
|
+
background: ${themed({
|
|
376
|
+
light: colors.N30A,
|
|
377
|
+
dark: colors.DN70
|
|
378
|
+
})(themeProps)};
|
|
379
|
+
border-radius: ${borderRadius()}px;
|
|
380
|
+
color: ${themed({
|
|
381
|
+
light: colors.N800,
|
|
382
|
+
dark: colors.DN600
|
|
383
|
+
})(themeProps)};
|
|
384
|
+
padding: 2px 4px;
|
|
385
|
+
margin: 0 1px;
|
|
386
|
+
transition: background 0.3s;
|
|
387
|
+
}
|
|
424
388
|
|
|
389
|
+
& span.date-node-highlighted {
|
|
390
|
+
background: ${colors.R50};
|
|
391
|
+
color: ${colors.R500};
|
|
392
|
+
}
|
|
425
393
|
|
|
394
|
+
& .renderer-image {
|
|
395
|
+
max-width: 100%;
|
|
396
|
+
display: block;
|
|
397
|
+
margin: ${gridSize() * 3}px 0;
|
|
398
|
+
}
|
|
426
399
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
width: 100% !important;
|
|
431
|
-
left: 0 !important;
|
|
400
|
+
.${richMediaClassName}.rich-media-wrapped
|
|
401
|
+
+ .${richMediaClassName}:not(.rich-media-wrapped) {
|
|
402
|
+
clear: both;
|
|
432
403
|
}
|
|
433
404
|
|
|
434
|
-
|
|
435
|
-
|
|
405
|
+
& .code-block,
|
|
406
|
+
& blockquote,
|
|
407
|
+
& hr,
|
|
408
|
+
& > div > div:not(.rich-media-wrapped),
|
|
409
|
+
.${richMediaClassName}.rich-media-wrapped
|
|
410
|
+
+ .rich-media-wrapped
|
|
411
|
+
+ *:not(.rich-media-wrapped),
|
|
412
|
+
.${richMediaClassName}.rich-media-wrapped + div:not(.rich-media-wrapped),
|
|
413
|
+
.${richMediaClassName}.image-align-start,
|
|
414
|
+
.${richMediaClassName}.image-center,
|
|
415
|
+
.${richMediaClassName}.image-align-end {
|
|
416
|
+
clear: both;
|
|
436
417
|
}
|
|
437
418
|
|
|
438
|
-
&
|
|
439
|
-
|
|
419
|
+
& .rich-media-wrapped {
|
|
420
|
+
& + h1,
|
|
421
|
+
& + h2,
|
|
422
|
+
& + h3,
|
|
423
|
+
& + h4,
|
|
424
|
+
& + h5,
|
|
425
|
+
& + h6 {
|
|
426
|
+
margin-top: 8px;
|
|
427
|
+
}
|
|
440
428
|
}
|
|
441
|
-
}
|
|
442
429
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
430
|
+
${alignedHeadingAnchorStyle(wrapperProps)}
|
|
431
|
+
/* plugin styles */
|
|
432
|
+
${mediaSingleSharedStyle} &
|
|
433
|
+
div[class^='image-wrap-'] + div[class^='image-wrap-'] {
|
|
434
|
+
margin-left: 0;
|
|
435
|
+
margin-right: 0;
|
|
436
|
+
}
|
|
446
437
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
438
|
+
/* Breakout for tables and extensions */
|
|
439
|
+
.${RendererCssClassName.DOCUMENT} > {
|
|
440
|
+
* .${TableSharedCssClassName.TABLE_CONTAINER} {
|
|
441
|
+
width: 100% !important;
|
|
442
|
+
left: 0 !important;
|
|
443
|
+
}
|
|
451
444
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
445
|
+
* .${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER} {
|
|
446
|
+
overflow-x: auto;
|
|
447
|
+
}
|
|
455
448
|
|
|
449
|
+
& .${RendererCssClassName.EXTENSION}:first-child {
|
|
450
|
+
margin-top: 0;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
456
453
|
|
|
454
|
+
.${RendererCssClassName.DOCUMENT} {
|
|
455
|
+
.${RendererCssClassName.EXTENSION} {
|
|
456
|
+
margin-top: ${blockNodesVerticalMargin};
|
|
457
|
+
}
|
|
457
458
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
.${RendererCssClassName.EXTENSION_CENTER_ALIGN} {
|
|
460
|
+
margin-left: 50%;
|
|
461
|
+
transform: translateX(-50%);
|
|
462
|
+
}
|
|
462
463
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
height: calc(100% - ${tableMarginTop}px);
|
|
467
|
-
z-index: ${akEditorStickyHeaderZIndex};
|
|
464
|
+
.${TableSharedCssClassName.TABLE_NODE_WRAPPER} {
|
|
465
|
+
overflow-x: auto;
|
|
466
|
+
}
|
|
468
467
|
}
|
|
469
468
|
|
|
470
|
-
|
|
469
|
+
${tableSharedStyle(themeProps)}
|
|
470
|
+
|
|
471
|
+
.${RendererCssClassName.DOCUMENT} .${TableSharedCssClassName.TABLE_CONTAINER} {
|
|
472
|
+
z-index: 0;
|
|
473
|
+
transition: all 0.1s linear;
|
|
474
|
+
display: flex; /* needed to avoid position: fixed jumpiness in Chrome */
|
|
475
|
+
|
|
476
|
+
/** Shadow overrides */
|
|
477
|
+
&.${shadowClassNames.RIGHT_SHADOW}::after,
|
|
478
|
+
&.${shadowClassNames.LEFT_SHADOW}::before {
|
|
479
|
+
top: ${tableMarginTop - 1}px;
|
|
480
|
+
height: calc(100% - ${tableMarginTop}px);
|
|
481
|
+
z-index: ${akEditorStickyHeaderZIndex};
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
471
485
|
* A hack for making all the <th /> heights equal in case some have shorter
|
|
472
486
|
* content than others.
|
|
473
487
|
*
|
|
474
488
|
* This is done to make sort buttons fill entire <th />.
|
|
475
489
|
*/
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
490
|
+
table {
|
|
491
|
+
height: 1px; /* will be ignored */
|
|
492
|
+
${tableSortableColumnStyle(wrapperProps)};
|
|
493
|
+
margin-left: 0;
|
|
494
|
+
margin-right: 0;
|
|
495
|
+
}
|
|
482
496
|
|
|
483
|
-
|
|
484
|
-
|
|
497
|
+
table tr:first-child {
|
|
498
|
+
height: 100%;
|
|
485
499
|
|
|
486
|
-
|
|
487
|
-
|
|
500
|
+
td,
|
|
501
|
+
th {
|
|
502
|
+
position: relative;
|
|
503
|
+
}
|
|
488
504
|
}
|
|
489
|
-
}
|
|
490
505
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
})};
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
506
|
+
table[data-number-column='true'] {
|
|
507
|
+
.${RendererCssClassName.NUMBER_COLUMN} {
|
|
508
|
+
background-color: ${themed({
|
|
509
|
+
light: akEditorTableToolbar,
|
|
510
|
+
dark: akEditorTableToolbarDark
|
|
511
|
+
})(themeProps)};
|
|
512
|
+
border-right: 1px solid
|
|
513
|
+
${themed({
|
|
514
|
+
light: akEditorTableBorder,
|
|
515
|
+
dark: akEditorTableBorderDark
|
|
516
|
+
})(themeProps)};
|
|
517
|
+
width: ${akEditorTableNumberColumnWidth}px;
|
|
518
|
+
text-align: center;
|
|
519
|
+
color: ${themed({
|
|
520
|
+
light: colors.N200,
|
|
521
|
+
dark: colors.DN400
|
|
522
|
+
})(themeProps)};
|
|
523
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
524
|
+
}
|
|
509
525
|
|
|
510
|
-
|
|
511
|
-
|
|
526
|
+
.fixed .${RendererCssClassName.NUMBER_COLUMN} {
|
|
527
|
+
border-right: 0px none;
|
|
528
|
+
}
|
|
512
529
|
}
|
|
513
530
|
}
|
|
514
|
-
}
|
|
515
531
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
border-right: 1px solid ${themed({
|
|
523
|
-
light: akEditorTableBorder,
|
|
524
|
-
dark: akEditorTableBorderDark
|
|
525
|
-
})};
|
|
526
|
-
border-bottom: 1px solid ${themed({
|
|
527
|
-
light: akEditorTableBorder,
|
|
528
|
-
dark: akEditorTableBorderDark
|
|
529
|
-
})};
|
|
530
|
-
|
|
531
|
-
/* this is to compensate for the table border */
|
|
532
|
-
transform: translateX(-1px);
|
|
533
|
-
}
|
|
532
|
+
tr[data-header-row].fixed {
|
|
533
|
+
position: fixed !important;
|
|
534
|
+
display: flex;
|
|
535
|
+
overflow: hidden;
|
|
536
|
+
z-index: ${akEditorStickyHeaderZIndex};
|
|
534
537
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}
|
|
538
|
+
border-right: 1px solid
|
|
539
|
+
${themed({
|
|
540
|
+
light: akEditorTableBorder,
|
|
541
|
+
dark: akEditorTableBorderDark
|
|
542
|
+
})(themeProps)};
|
|
543
|
+
border-bottom: 1px solid
|
|
544
|
+
${themed({
|
|
545
|
+
light: akEditorTableBorder,
|
|
546
|
+
dark: akEditorTableBorderDark
|
|
547
|
+
})(themeProps)};
|
|
548
|
+
|
|
549
|
+
/* this is to compensate for the table border */
|
|
550
|
+
transform: translateX(-1px);
|
|
551
|
+
}
|
|
540
552
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
553
|
+
.sticky > th {
|
|
554
|
+
z-index: ${akEditorStickyHeaderZIndex};
|
|
555
|
+
position: sticky !important;
|
|
556
|
+
top: 0;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/* Make the number column header sticky */
|
|
560
|
+
.sticky > td {
|
|
561
|
+
position: sticky !important;
|
|
562
|
+
top: 0;
|
|
563
|
+
}
|
|
546
564
|
|
|
547
|
-
|
|
565
|
+
/* add border for position: sticky
|
|
548
566
|
and work around background-clip: padding-box
|
|
549
567
|
bug for FF causing box-shadow bug in Chrome */
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
})},
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
568
|
+
.sticky th,
|
|
569
|
+
.sticky td {
|
|
570
|
+
box-shadow: 0px 1px
|
|
571
|
+
${themed({
|
|
572
|
+
light: akEditorTableBorder,
|
|
573
|
+
dark: akEditorTableBorderDark
|
|
574
|
+
})(themeProps)},
|
|
575
|
+
0px -0.5px ${themed({
|
|
576
|
+
light: akEditorTableBorder,
|
|
577
|
+
dark: akEditorTableBorderDark
|
|
578
|
+
})(themeProps)},
|
|
579
|
+
inset -1px 0px ${themed({
|
|
580
|
+
light: akEditorTableToolbar,
|
|
581
|
+
dark: akEditorTableToolbarDark
|
|
582
|
+
})(themeProps)},
|
|
583
|
+
0px -1px ${themed({
|
|
584
|
+
light: akEditorTableToolbar,
|
|
585
|
+
dark: akEditorTableToolbarDark
|
|
586
|
+
})(themeProps)};
|
|
587
|
+
}
|
|
565
588
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
589
|
+
/* this will remove jumpiness caused in Chrome for sticky headers */
|
|
590
|
+
.fixed + tr {
|
|
591
|
+
min-height: 0px;
|
|
592
|
+
}
|
|
570
593
|
|
|
571
|
-
|
|
594
|
+
/*
|
|
572
595
|
* We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.
|
|
573
596
|
* See ED-4159.
|
|
574
597
|
*/
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
grid-template-columns: minmax(0, 1fr);
|
|
585
|
-
position: relative;
|
|
586
|
-
border-radius: ${borderRadius()}px;
|
|
598
|
+
& .code-block {
|
|
599
|
+
max-width: 100%;
|
|
600
|
+
/* -ms- properties are necessary until MS supports the latest version of the grid spec */
|
|
601
|
+
/* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */
|
|
602
|
+
display: -ms-grid;
|
|
603
|
+
display: grid;
|
|
604
|
+
-ms-grid-columns: auto 1fr;
|
|
605
|
+
/* stylelint-enable */
|
|
587
606
|
|
|
588
|
-
|
|
607
|
+
grid-template-columns: minmax(0, 1fr);
|
|
608
|
+
position: relative;
|
|
609
|
+
border-radius: ${borderRadius()}px;
|
|
610
|
+
|
|
611
|
+
/*
|
|
589
612
|
* The overall renderer has word-wrap: break; which causes issues with
|
|
590
613
|
* code block line numbers in Safari / iOS.
|
|
591
614
|
*/
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
615
|
+
word-wrap: normal;
|
|
616
|
+
|
|
617
|
+
& > span {
|
|
618
|
+
/* stylelint-disable value-no-vendor-prefix */
|
|
619
|
+
-ms-grid-row: 1;
|
|
620
|
+
-ms-grid-column: 2;
|
|
621
|
+
/* stylelint-enable */
|
|
622
|
+
grid-column: 1;
|
|
623
|
+
}
|
|
600
624
|
}
|
|
601
|
-
}
|
|
602
625
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
626
|
+
& .MediaGroup,
|
|
627
|
+
& .code-block {
|
|
628
|
+
margin-top: ${blockNodesVerticalMargin};
|
|
606
629
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
&:hover button.copy-to-clipboard, .copy-to-clipboard:focus{
|
|
612
|
-
opacity: 1;
|
|
613
|
-
position: absolute;
|
|
614
|
-
height: 32px;
|
|
615
|
-
width: 32px;
|
|
616
|
-
right: 6px;
|
|
617
|
-
top: 4px;
|
|
618
|
-
padding: 2px;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
630
|
+
&:first-child {
|
|
631
|
+
margin-top: 0;
|
|
632
|
+
}
|
|
621
633
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
634
|
+
&:hover button.copy-to-clipboard,
|
|
635
|
+
.copy-to-clipboard:focus {
|
|
636
|
+
opacity: 1;
|
|
637
|
+
position: absolute;
|
|
638
|
+
height: 32px;
|
|
639
|
+
width: 32px;
|
|
640
|
+
right: 6px;
|
|
641
|
+
top: 4px;
|
|
642
|
+
padding: 2px;
|
|
643
|
+
}
|
|
626
644
|
}
|
|
627
645
|
|
|
628
|
-
|
|
646
|
+
${columnLayoutSharedStyle};
|
|
647
|
+
& [data-layout-section] {
|
|
648
|
+
margin-top: ${gridSize() * 2.5}px;
|
|
629
649
|
& > div + div {
|
|
630
|
-
margin-left:
|
|
650
|
+
margin-left: ${gridSize() * 4}px;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
@media screen and (max-width: ${gridMediumMaxWidth}px) {
|
|
654
|
+
& > div + div {
|
|
655
|
+
margin-left: 0;
|
|
656
|
+
}
|
|
631
657
|
}
|
|
632
658
|
}
|
|
633
|
-
|
|
634
|
-
|
|
659
|
+
`;
|
|
660
|
+
};
|