@atlaskit/renderer 114.4.1 → 114.4.3
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 +15 -0
- package/dist/cjs/react/nodes/table/colgroup.js +1 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +36 -20
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/table/colgroup.js +1 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +37 -21
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/table/colgroup.js +1 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +36 -20
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 114.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 114.4.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#130002](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130002)
|
|
14
|
+
[`e273880dffa90`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e273880dffa90) -
|
|
15
|
+
Clean up feature flag platform_editor_nested_table_in_nested_parent_fix
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 114.4.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -84,7 +84,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
84
84
|
// Some extensions (for ex: Page Properties or Excerpt) do not renderer tables directly inside themselves. They use ReactRenderer.
|
|
85
85
|
// So if we add a check like isInsideExtension (similar to exising isInsideBlockNode), it will fail, and to the only way to learn
|
|
86
86
|
// if the table is rendered inside another node, is to check if the Renderer itself is nested.
|
|
87
|
-
var isRendererNested = isTopLevelRenderer === false
|
|
87
|
+
var isRendererNested = isTopLevelRenderer === false;
|
|
88
88
|
|
|
89
89
|
// appearance == comment && allowTableResizing && !tableNode?.attrs.width, means it is a comment
|
|
90
90
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
@@ -43,8 +43,6 @@ var LAYOUT_BREAKPOINT_RENDERER = 629;
|
|
|
43
43
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
44
44
|
// TODO: tableRowHeight can be moved into `@atlaskit/editor-common/table`
|
|
45
45
|
var tableRowHeight = 44;
|
|
46
|
-
var _getGlobalTheme = (0, _tokens.getGlobalTheme)(),
|
|
47
|
-
typography = _getGlobalTheme.typography;
|
|
48
46
|
var isBackgroundClipBrowserFixNeeded = function isBackgroundClipBrowserFixNeeded() {
|
|
49
47
|
return _browser.browser.isGecko || _browser.browser.isIE || _browser.browser.isMac && _browser.browser.isChrome;
|
|
50
48
|
};
|
|
@@ -326,62 +324,70 @@ var headingsSharedStyles = (0, _react.css)({
|
|
|
326
324
|
textTransform: 'none'
|
|
327
325
|
}
|
|
328
326
|
});
|
|
329
|
-
|
|
330
|
-
// Temporarily ignoring the below the owning team can add the ticket number for the TODO. Context: https://atlassian.slack.com/archives/CPUEVD9MY/p1741565387326829
|
|
331
|
-
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
332
|
-
// TODO: emotion refactor - check if we need UGC token?
|
|
333
327
|
var headingsSharedStylesWithEditorUGC = (0, _react.css)({
|
|
334
328
|
'& h1': {
|
|
335
|
-
|
|
329
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
330
|
+
font: "var(--ak-renderer-editor-font-heading-h1)",
|
|
336
331
|
marginBottom: 0,
|
|
337
332
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
338
333
|
marginTop: '1.45833em',
|
|
339
334
|
'& strong': {
|
|
340
|
-
|
|
335
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
336
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
341
337
|
},
|
|
342
338
|
'&::before': {}
|
|
343
339
|
},
|
|
344
340
|
'& h2': {
|
|
345
|
-
|
|
341
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
342
|
+
font: "var(--ak-renderer-editor-font-heading-h2)",
|
|
346
343
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
347
344
|
marginTop: '1.4em',
|
|
348
345
|
marginBottom: 0,
|
|
349
346
|
'& strong': {
|
|
350
|
-
|
|
347
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
348
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
351
349
|
}
|
|
352
350
|
},
|
|
353
351
|
'& h3': {
|
|
354
|
-
|
|
352
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
353
|
+
font: "var(--ak-renderer-editor-font-heading-h3)",
|
|
355
354
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
356
355
|
marginTop: '1.31249em',
|
|
357
356
|
marginBottom: 0,
|
|
358
357
|
'& strong': {
|
|
359
|
-
|
|
358
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
359
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
360
360
|
}
|
|
361
361
|
},
|
|
362
362
|
'& h4': {
|
|
363
|
-
|
|
363
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
364
|
+
font: "var(--ak-renderer-editor-font-heading-h4)",
|
|
364
365
|
marginTop: "var(--ds-space-250, 1.25em)",
|
|
365
366
|
'& strong': {
|
|
366
|
-
|
|
367
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
368
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
367
369
|
}
|
|
368
370
|
},
|
|
369
371
|
'& h5': {
|
|
370
|
-
|
|
372
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
373
|
+
font: "var(--ak-renderer-editor-font-heading-h5)",
|
|
371
374
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
372
375
|
marginTop: '1.45833em',
|
|
373
376
|
textTransform: 'none',
|
|
374
377
|
'& strong': {
|
|
375
|
-
|
|
378
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
379
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
376
380
|
}
|
|
377
381
|
},
|
|
378
382
|
'& h6': {
|
|
379
|
-
|
|
383
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
384
|
+
font: "var(--ak-renderer-editor-font-heading-h6)",
|
|
380
385
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
381
386
|
marginTop: '1.59091em',
|
|
382
387
|
textTransform: 'none',
|
|
383
388
|
'& strong': {
|
|
384
|
-
|
|
389
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
390
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
385
391
|
}
|
|
386
392
|
}
|
|
387
393
|
});
|
|
@@ -440,7 +446,8 @@ var ruleSharedStyles = (0, _react.css)({
|
|
|
440
446
|
});
|
|
441
447
|
var paragraphSharedStylesWithEditorUGC = (0, _react.css)({
|
|
442
448
|
'& p': {
|
|
443
|
-
|
|
449
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
450
|
+
font: "var(--ak-renderer-editor-font-normal-text)",
|
|
444
451
|
marginTop: _editorSharedStyles.blockNodesVerticalMargin,
|
|
445
452
|
marginBottom: 0
|
|
446
453
|
}
|
|
@@ -1345,6 +1352,8 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1345
1352
|
innerRef = props.innerRef,
|
|
1346
1353
|
testId = props.testId;
|
|
1347
1354
|
var isAdvancedLayoutsOn = (0, _experiments.editorExperiment)('advanced_layouts', true);
|
|
1355
|
+
var _getGlobalTheme = (0, _tokens.getGlobalTheme)(),
|
|
1356
|
+
typography = _getGlobalTheme.typography;
|
|
1348
1357
|
if ((0, _platformFeatureFlags.fg)('platform_editor_emotion_refactor_renderer')) {
|
|
1349
1358
|
return (
|
|
1350
1359
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
@@ -1353,7 +1362,14 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1353
1362
|
onClick: onClick,
|
|
1354
1363
|
onMouseDown: onMouseDown,
|
|
1355
1364
|
style: {
|
|
1356
|
-
'--ak-renderer-base-font-size': "".concat((0, _getBaseFontSize.getBaseFontSize)(appearance), "px")
|
|
1365
|
+
'--ak-renderer-base-font-size': "".concat((0, _getBaseFontSize.getBaseFontSize)(appearance), "px"),
|
|
1366
|
+
'--ak-renderer-editor-font-heading-h1': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h1', typography)),
|
|
1367
|
+
'--ak-renderer-editor-font-heading-h2': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h2', typography)),
|
|
1368
|
+
'--ak-renderer-editor-font-heading-h3': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h3', typography)),
|
|
1369
|
+
'--ak-renderer-editor-font-heading-h4': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h4', typography)),
|
|
1370
|
+
'--ak-renderer-editor-font-heading-h5': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h5', typography)),
|
|
1371
|
+
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6', typography)),
|
|
1372
|
+
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body', typography))
|
|
1357
1373
|
},
|
|
1358
1374
|
css: [baseStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_heading_margin_fix') && headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && smartCardStylesAvatarFix,
|
|
1359
1375
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -67,7 +67,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
67
67
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
68
68
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
69
69
|
var packageName = "@atlaskit/renderer";
|
|
70
|
-
var packageVersion = "114.4.
|
|
70
|
+
var packageVersion = "114.4.3";
|
|
71
71
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
72
72
|
containerName: 'ak-renderer-wrapper',
|
|
73
73
|
containerType: 'inline-size',
|
|
@@ -72,7 +72,7 @@ const renderScaleDownColgroup = props => {
|
|
|
72
72
|
// Some extensions (for ex: Page Properties or Excerpt) do not renderer tables directly inside themselves. They use ReactRenderer.
|
|
73
73
|
// So if we add a check like isInsideExtension (similar to exising isInsideBlockNode), it will fail, and to the only way to learn
|
|
74
74
|
// if the table is rendered inside another node, is to check if the Renderer itself is nested.
|
|
75
|
-
const isRendererNested = isTopLevelRenderer === false
|
|
75
|
+
const isRendererNested = isTopLevelRenderer === false;
|
|
76
76
|
|
|
77
77
|
// appearance == comment && allowTableResizing && !tableNode?.attrs.width, means it is a comment
|
|
78
78
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
@@ -34,9 +34,6 @@ const LAYOUT_BREAKPOINT_RENDERER = 629;
|
|
|
34
34
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
35
35
|
// TODO: tableRowHeight can be moved into `@atlaskit/editor-common/table`
|
|
36
36
|
const tableRowHeight = 44;
|
|
37
|
-
const {
|
|
38
|
-
typography
|
|
39
|
-
} = getGlobalTheme();
|
|
40
37
|
const isBackgroundClipBrowserFixNeeded = () => browser.isGecko || browser.isIE || browser.isMac && browser.isChrome;
|
|
41
38
|
|
|
42
39
|
// styles are copied from ./style.tsx
|
|
@@ -388,62 +385,70 @@ const headingsSharedStyles = css({
|
|
|
388
385
|
textTransform: 'none'
|
|
389
386
|
}
|
|
390
387
|
});
|
|
391
|
-
|
|
392
|
-
// Temporarily ignoring the below the owning team can add the ticket number for the TODO. Context: https://atlassian.slack.com/archives/CPUEVD9MY/p1741565387326829
|
|
393
|
-
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
394
|
-
// TODO: emotion refactor - check if we need UGC token?
|
|
395
388
|
const headingsSharedStylesWithEditorUGC = css({
|
|
396
389
|
'& h1': {
|
|
397
|
-
|
|
390
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
391
|
+
font: `var(--ak-renderer-editor-font-heading-h1)`,
|
|
398
392
|
marginBottom: 0,
|
|
399
393
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
400
394
|
marginTop: '1.45833em',
|
|
401
395
|
'& strong': {
|
|
402
|
-
|
|
396
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
397
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
403
398
|
},
|
|
404
399
|
'&::before': {}
|
|
405
400
|
},
|
|
406
401
|
'& h2': {
|
|
407
|
-
|
|
402
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
403
|
+
font: `var(--ak-renderer-editor-font-heading-h2)`,
|
|
408
404
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
409
405
|
marginTop: '1.4em',
|
|
410
406
|
marginBottom: 0,
|
|
411
407
|
'& strong': {
|
|
412
|
-
|
|
408
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
409
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
413
410
|
}
|
|
414
411
|
},
|
|
415
412
|
'& h3': {
|
|
416
|
-
|
|
413
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
414
|
+
font: `var(--ak-renderer-editor-font-heading-h3)`,
|
|
417
415
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
418
416
|
marginTop: '1.31249em',
|
|
419
417
|
marginBottom: 0,
|
|
420
418
|
'& strong': {
|
|
421
|
-
|
|
419
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
420
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
422
421
|
}
|
|
423
422
|
},
|
|
424
423
|
'& h4': {
|
|
425
|
-
|
|
424
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
425
|
+
font: `var(--ak-renderer-editor-font-heading-h4)`,
|
|
426
426
|
marginTop: "var(--ds-space-250, 1.25em)",
|
|
427
427
|
'& strong': {
|
|
428
|
-
|
|
428
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
429
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
429
430
|
}
|
|
430
431
|
},
|
|
431
432
|
'& h5': {
|
|
432
|
-
|
|
433
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
434
|
+
font: `var(--ak-renderer-editor-font-heading-h5)`,
|
|
433
435
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
434
436
|
marginTop: '1.45833em',
|
|
435
437
|
textTransform: 'none',
|
|
436
438
|
'& strong': {
|
|
437
|
-
|
|
439
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
440
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
438
441
|
}
|
|
439
442
|
},
|
|
440
443
|
'& h6': {
|
|
441
|
-
|
|
444
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
445
|
+
font: `var(--ak-renderer-editor-font-heading-h6)`,
|
|
442
446
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
443
447
|
marginTop: '1.59091em',
|
|
444
448
|
textTransform: 'none',
|
|
445
449
|
'& strong': {
|
|
446
|
-
|
|
450
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
451
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
447
452
|
}
|
|
448
453
|
}
|
|
449
454
|
});
|
|
@@ -502,7 +507,8 @@ const ruleSharedStyles = css({
|
|
|
502
507
|
});
|
|
503
508
|
const paragraphSharedStylesWithEditorUGC = css({
|
|
504
509
|
'& p': {
|
|
505
|
-
|
|
510
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
511
|
+
font: `var(--ak-renderer-editor-font-normal-text)`,
|
|
506
512
|
marginTop: blockNodesVerticalMargin,
|
|
507
513
|
marginBottom: 0
|
|
508
514
|
}
|
|
@@ -1720,6 +1726,9 @@ export const RendererStyleContainer = props => {
|
|
|
1720
1726
|
testId
|
|
1721
1727
|
} = props;
|
|
1722
1728
|
const isAdvancedLayoutsOn = editorExperiment('advanced_layouts', true);
|
|
1729
|
+
const {
|
|
1730
|
+
typography
|
|
1731
|
+
} = getGlobalTheme();
|
|
1723
1732
|
if (fg('platform_editor_emotion_refactor_renderer')) {
|
|
1724
1733
|
return (
|
|
1725
1734
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
@@ -1728,7 +1737,14 @@ export const RendererStyleContainer = props => {
|
|
|
1728
1737
|
onClick: onClick,
|
|
1729
1738
|
onMouseDown: onMouseDown,
|
|
1730
1739
|
style: {
|
|
1731
|
-
'--ak-renderer-base-font-size': `${getBaseFontSize(appearance)}px
|
|
1740
|
+
'--ak-renderer-base-font-size': `${getBaseFontSize(appearance)}px`,
|
|
1741
|
+
'--ak-renderer-editor-font-heading-h1': `${editorUGCToken('editor.font.heading.h1', typography)}`,
|
|
1742
|
+
'--ak-renderer-editor-font-heading-h2': `${editorUGCToken('editor.font.heading.h2', typography)}`,
|
|
1743
|
+
'--ak-renderer-editor-font-heading-h3': `${editorUGCToken('editor.font.heading.h3', typography)}`,
|
|
1744
|
+
'--ak-renderer-editor-font-heading-h4': `${editorUGCToken('editor.font.heading.h4', typography)}`,
|
|
1745
|
+
'--ak-renderer-editor-font-heading-h5': `${editorUGCToken('editor.font.heading.h5', typography)}`,
|
|
1746
|
+
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6', typography)}`,
|
|
1747
|
+
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body', typography)}`
|
|
1732
1748
|
},
|
|
1733
1749
|
css: [baseStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, fg('platform_editor_heading_margin_fix') && headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, fg('platform-linking-visual-refresh-v1') && smartCardStylesAvatarFix,
|
|
1734
1750
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -48,7 +48,7 @@ import { removeEmptySpaceAroundContent } from './rendererHelper';
|
|
|
48
48
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
49
49
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
50
50
|
const packageName = "@atlaskit/renderer";
|
|
51
|
-
const packageVersion = "114.4.
|
|
51
|
+
const packageVersion = "114.4.3";
|
|
52
52
|
const setAsQueryContainerStyles = css({
|
|
53
53
|
containerName: 'ak-renderer-wrapper',
|
|
54
54
|
containerType: 'inline-size',
|
|
@@ -78,7 +78,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
78
78
|
// Some extensions (for ex: Page Properties or Excerpt) do not renderer tables directly inside themselves. They use ReactRenderer.
|
|
79
79
|
// So if we add a check like isInsideExtension (similar to exising isInsideBlockNode), it will fail, and to the only way to learn
|
|
80
80
|
// if the table is rendered inside another node, is to check if the Renderer itself is nested.
|
|
81
|
-
var isRendererNested = isTopLevelRenderer === false
|
|
81
|
+
var isRendererNested = isTopLevelRenderer === false;
|
|
82
82
|
|
|
83
83
|
// appearance == comment && allowTableResizing && !tableNode?.attrs.width, means it is a comment
|
|
84
84
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
@@ -36,8 +36,6 @@ var LAYOUT_BREAKPOINT_RENDERER = 629;
|
|
|
36
36
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
37
37
|
// TODO: tableRowHeight can be moved into `@atlaskit/editor-common/table`
|
|
38
38
|
var tableRowHeight = 44;
|
|
39
|
-
var _getGlobalTheme = getGlobalTheme(),
|
|
40
|
-
typography = _getGlobalTheme.typography;
|
|
41
39
|
var isBackgroundClipBrowserFixNeeded = function isBackgroundClipBrowserFixNeeded() {
|
|
42
40
|
return browser.isGecko || browser.isIE || browser.isMac && browser.isChrome;
|
|
43
41
|
};
|
|
@@ -319,62 +317,70 @@ var headingsSharedStyles = css({
|
|
|
319
317
|
textTransform: 'none'
|
|
320
318
|
}
|
|
321
319
|
});
|
|
322
|
-
|
|
323
|
-
// Temporarily ignoring the below the owning team can add the ticket number for the TODO. Context: https://atlassian.slack.com/archives/CPUEVD9MY/p1741565387326829
|
|
324
|
-
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
325
|
-
// TODO: emotion refactor - check if we need UGC token?
|
|
326
320
|
var headingsSharedStylesWithEditorUGC = css({
|
|
327
321
|
'& h1': {
|
|
328
|
-
|
|
322
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
323
|
+
font: "var(--ak-renderer-editor-font-heading-h1)",
|
|
329
324
|
marginBottom: 0,
|
|
330
325
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
331
326
|
marginTop: '1.45833em',
|
|
332
327
|
'& strong': {
|
|
333
|
-
|
|
328
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
329
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
334
330
|
},
|
|
335
331
|
'&::before': {}
|
|
336
332
|
},
|
|
337
333
|
'& h2': {
|
|
338
|
-
|
|
334
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
335
|
+
font: "var(--ak-renderer-editor-font-heading-h2)",
|
|
339
336
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
340
337
|
marginTop: '1.4em',
|
|
341
338
|
marginBottom: 0,
|
|
342
339
|
'& strong': {
|
|
343
|
-
|
|
340
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
341
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
344
342
|
}
|
|
345
343
|
},
|
|
346
344
|
'& h3': {
|
|
347
|
-
|
|
345
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
346
|
+
font: "var(--ak-renderer-editor-font-heading-h3)",
|
|
348
347
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
349
348
|
marginTop: '1.31249em',
|
|
350
349
|
marginBottom: 0,
|
|
351
350
|
'& strong': {
|
|
352
|
-
|
|
351
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
352
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
353
353
|
}
|
|
354
354
|
},
|
|
355
355
|
'& h4': {
|
|
356
|
-
|
|
356
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
357
|
+
font: "var(--ak-renderer-editor-font-heading-h4)",
|
|
357
358
|
marginTop: "var(--ds-space-250, 1.25em)",
|
|
358
359
|
'& strong': {
|
|
359
|
-
|
|
360
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
361
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
360
362
|
}
|
|
361
363
|
},
|
|
362
364
|
'& h5': {
|
|
363
|
-
|
|
365
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
366
|
+
font: "var(--ak-renderer-editor-font-heading-h5)",
|
|
364
367
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
365
368
|
marginTop: '1.45833em',
|
|
366
369
|
textTransform: 'none',
|
|
367
370
|
'& strong': {
|
|
368
|
-
|
|
371
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
372
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
369
373
|
}
|
|
370
374
|
},
|
|
371
375
|
'& h6': {
|
|
372
|
-
|
|
376
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
377
|
+
font: "var(--ak-renderer-editor-font-heading-h6)",
|
|
373
378
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
374
379
|
marginTop: '1.59091em',
|
|
375
380
|
textTransform: 'none',
|
|
376
381
|
'& strong': {
|
|
377
|
-
|
|
382
|
+
// set all heading bold style to token font.weight.bold, as not matter what typography is used, the editorUGCToken will return the font weight 700
|
|
383
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
378
384
|
}
|
|
379
385
|
}
|
|
380
386
|
});
|
|
@@ -433,7 +439,8 @@ var ruleSharedStyles = css({
|
|
|
433
439
|
});
|
|
434
440
|
var paragraphSharedStylesWithEditorUGC = css({
|
|
435
441
|
'& p': {
|
|
436
|
-
|
|
442
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
443
|
+
font: "var(--ak-renderer-editor-font-normal-text)",
|
|
437
444
|
marginTop: blockNodesVerticalMargin,
|
|
438
445
|
marginBottom: 0
|
|
439
446
|
}
|
|
@@ -1338,6 +1345,8 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1338
1345
|
innerRef = props.innerRef,
|
|
1339
1346
|
testId = props.testId;
|
|
1340
1347
|
var isAdvancedLayoutsOn = editorExperiment('advanced_layouts', true);
|
|
1348
|
+
var _getGlobalTheme = getGlobalTheme(),
|
|
1349
|
+
typography = _getGlobalTheme.typography;
|
|
1341
1350
|
if (fg('platform_editor_emotion_refactor_renderer')) {
|
|
1342
1351
|
return (
|
|
1343
1352
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
@@ -1346,7 +1355,14 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1346
1355
|
onClick: onClick,
|
|
1347
1356
|
onMouseDown: onMouseDown,
|
|
1348
1357
|
style: {
|
|
1349
|
-
'--ak-renderer-base-font-size': "".concat(getBaseFontSize(appearance), "px")
|
|
1358
|
+
'--ak-renderer-base-font-size': "".concat(getBaseFontSize(appearance), "px"),
|
|
1359
|
+
'--ak-renderer-editor-font-heading-h1': "".concat(editorUGCToken('editor.font.heading.h1', typography)),
|
|
1360
|
+
'--ak-renderer-editor-font-heading-h2': "".concat(editorUGCToken('editor.font.heading.h2', typography)),
|
|
1361
|
+
'--ak-renderer-editor-font-heading-h3': "".concat(editorUGCToken('editor.font.heading.h3', typography)),
|
|
1362
|
+
'--ak-renderer-editor-font-heading-h4': "".concat(editorUGCToken('editor.font.heading.h4', typography)),
|
|
1363
|
+
'--ak-renderer-editor-font-heading-h5': "".concat(editorUGCToken('editor.font.heading.h5', typography)),
|
|
1364
|
+
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6', typography)),
|
|
1365
|
+
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body', typography))
|
|
1350
1366
|
},
|
|
1351
1367
|
css: [baseStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, fg('platform_editor_heading_margin_fix') && headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, fg('platform-linking-visual-refresh-v1') && smartCardStylesAvatarFix,
|
|
1352
1368
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -57,7 +57,7 @@ import { removeEmptySpaceAroundContent } from './rendererHelper';
|
|
|
57
57
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
58
58
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
59
59
|
var packageName = "@atlaskit/renderer";
|
|
60
|
-
var packageVersion = "114.4.
|
|
60
|
+
var packageVersion = "114.4.3";
|
|
61
61
|
var setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "114.4.
|
|
3
|
+
"version": "114.4.3",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,21 +31,21 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
32
32
|
"@atlaskit/button": "^21.1.0",
|
|
33
33
|
"@atlaskit/code": "^16.0.0",
|
|
34
|
-
"@atlaskit/editor-common": "^102.
|
|
34
|
+
"@atlaskit/editor-common": "^102.12.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
39
39
|
"@atlaskit/emoji": "^69.0.0",
|
|
40
|
-
"@atlaskit/feature-gate-js-client": "^
|
|
40
|
+
"@atlaskit/feature-gate-js-client": "^5.0.0",
|
|
41
41
|
"@atlaskit/icon": "^25.0.0",
|
|
42
|
-
"@atlaskit/link-datasource": "^4.
|
|
42
|
+
"@atlaskit/link-datasource": "^4.1.0",
|
|
43
43
|
"@atlaskit/media-card": "^79.0.0",
|
|
44
44
|
"@atlaskit/media-client": "^32.0.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
46
46
|
"@atlaskit/media-common": "^12.0.0",
|
|
47
47
|
"@atlaskit/media-filmstrip": "^49.0.0",
|
|
48
|
-
"@atlaskit/media-ui": "^28.
|
|
48
|
+
"@atlaskit/media-ui": "^28.1.0",
|
|
49
49
|
"@atlaskit/media-viewer": "^52.0.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags-react": "^0.1.0",
|
|
@@ -147,9 +147,6 @@
|
|
|
147
147
|
"platform_editor_allow_annotation_triple_click": {
|
|
148
148
|
"type": "boolean"
|
|
149
149
|
},
|
|
150
|
-
"platform_editor_nested_table_in_nested_parent_fix": {
|
|
151
|
-
"type": "boolean"
|
|
152
|
-
},
|
|
153
150
|
"platform-component-visual-refresh": {
|
|
154
151
|
"type": "boolean"
|
|
155
152
|
},
|