@atlaskit/renderer 128.0.8 → 128.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/react/marks/fontSize.js +15 -0
- package/dist/cjs/react/marks/index.js +8 -0
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +14 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/marks/fontSize.js +8 -0
- package/dist/es2019/react/marks/index.js +3 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +14 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/marks/fontSize.js +8 -0
- package/dist/esm/react/marks/index.js +3 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +14 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/marks/fontSize.d.ts +4 -0
- package/dist/types/react/marks/index.d.ts +2 -1
- package/dist/types-ts4.5/react/marks/fontSize.d.ts +4 -0
- package/dist/types-ts4.5/react/marks/index.d.ts +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 128.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8b781b3b3f9ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b781b3b3f9ca) -
|
|
8
|
+
Add setSmallText and setSmallTextWithAnalytics commands, modify setNormalText to remove fontSize
|
|
9
|
+
mark, add FORMAT_SMALL_TEXT analytics enum.
|
|
10
|
+
|
|
11
|
+
Add support to the renderer to render 'small text'.
|
|
12
|
+
|
|
13
|
+
Add 'fontSize' to stage0 default schema.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 128.0.8
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = FontSize;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
function FontSize(props) {
|
|
10
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
12
|
+
className: "fabric-editor-block-mark fabric-editor-font-size",
|
|
13
|
+
"data-font-size": props.fontSize
|
|
14
|
+
}, props.children);
|
|
15
|
+
}
|
|
@@ -47,6 +47,12 @@ Object.defineProperty(exports, "Em", {
|
|
|
47
47
|
return _em.default;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
+
Object.defineProperty(exports, "FontSize", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _fontSize.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
50
56
|
Object.defineProperty(exports, "FragmentMark", {
|
|
51
57
|
enumerable: true,
|
|
52
58
|
get: function get() {
|
|
@@ -126,6 +132,7 @@ var _dataConsumer = _interopRequireDefault(require("./data-consumer"));
|
|
|
126
132
|
var _fragment = _interopRequireDefault(require("./fragment"));
|
|
127
133
|
var _annotation = _interopRequireWildcard(require("./annotation"));
|
|
128
134
|
var _border = _interopRequireDefault(require("./border"));
|
|
135
|
+
var _fontSize = _interopRequireDefault(require("./fontSize"));
|
|
129
136
|
var _confluenceInlineComment = _interopRequireDefault(require("./confluence-inline-comment"));
|
|
130
137
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
131
138
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
@@ -145,6 +152,7 @@ var markToReact = exports.markToReact = {
|
|
|
145
152
|
underline: _underline.default,
|
|
146
153
|
annotation: _annotation.default,
|
|
147
154
|
border: _border.default,
|
|
155
|
+
fontSize: _fontSize.default,
|
|
148
156
|
// Stage0
|
|
149
157
|
confluenceInlineComment: _confluenceInlineComment.default,
|
|
150
158
|
breakout: _breakout.default,
|
|
@@ -52,6 +52,19 @@ var isBackgroundClipBrowserFixNeeded = function isBackgroundClipBrowserFixNeeded
|
|
|
52
52
|
var baseFontStyle = (0, _react.css)({
|
|
53
53
|
font: (0, _ugcTokens.editorUGCToken)('editor.font.body')
|
|
54
54
|
});
|
|
55
|
+
var smallTextStyle = (0, _react.css)({
|
|
56
|
+
'--ak-renderer-editor-font-small-text': (0, _ugcTokens.editorUGCToken)('editor.font.body.small')
|
|
57
|
+
});
|
|
58
|
+
var fontSizeStyles = (0, _react.css)({
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'.fabric-editor-font-size': {
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
62
|
+
"&[data-font-size='small']": {
|
|
63
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
64
|
+
font: 'var(--ak-renderer-editor-font-small-text)'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
55
68
|
var originalBaseFontLineHeight = (0, _react.css)({
|
|
56
69
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
57
70
|
lineHeight: '1.5rem'
|
|
@@ -2014,7 +2027,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2014
2027
|
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
|
|
2015
2028
|
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
|
|
2016
2029
|
},
|
|
2017
|
-
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, (0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2030
|
+
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && smallTextStyle, (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, (0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2018
2031
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2019
2032
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && ((0, _expValEquals.expValEquals)('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2020
2033
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "
|
|
74
|
+
var packageVersion = "128.0.8";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function FontSize(props) {
|
|
3
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
5
|
+
className: "fabric-editor-block-mark fabric-editor-font-size",
|
|
6
|
+
"data-font-size": props.fontSize
|
|
7
|
+
}, props.children);
|
|
8
|
+
}
|
|
@@ -19,6 +19,7 @@ import DataConsumer from './data-consumer';
|
|
|
19
19
|
import FragmentMark from './fragment';
|
|
20
20
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
21
21
|
import Border from './border';
|
|
22
|
+
import FontSize from './fontSize';
|
|
22
23
|
|
|
23
24
|
// Stage0
|
|
24
25
|
import ConfluenceInlineComment from './confluence-inline-comment';
|
|
@@ -34,6 +35,7 @@ export const markToReact = {
|
|
|
34
35
|
underline: Underline,
|
|
35
36
|
annotation: Annotation,
|
|
36
37
|
border: Border,
|
|
38
|
+
fontSize: FontSize,
|
|
37
39
|
// Stage0
|
|
38
40
|
confluenceInlineComment: ConfluenceInlineComment,
|
|
39
41
|
breakout: Breakout,
|
|
@@ -50,4 +52,4 @@ export const markToReact = {
|
|
|
50
52
|
export const toReact = mark => {
|
|
51
53
|
return markToReact[mark.type.name];
|
|
52
54
|
};
|
|
53
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
55
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, FontSize, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
@@ -43,6 +43,19 @@ const isBackgroundClipBrowserFixNeeded = () => {
|
|
|
43
43
|
const baseFontStyle = css({
|
|
44
44
|
font: editorUGCToken('editor.font.body')
|
|
45
45
|
});
|
|
46
|
+
const smallTextStyle = css({
|
|
47
|
+
'--ak-renderer-editor-font-small-text': editorUGCToken('editor.font.body.small')
|
|
48
|
+
});
|
|
49
|
+
const fontSizeStyles = css({
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
+
'.fabric-editor-font-size': {
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
53
|
+
"&[data-font-size='small']": {
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
55
|
+
font: 'var(--ak-renderer-editor-font-small-text)'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
46
59
|
const originalBaseFontLineHeight = css({
|
|
47
60
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
48
61
|
lineHeight: '1.5rem'
|
|
@@ -2557,7 +2570,7 @@ export const RendererStyleContainer = props => {
|
|
|
2557
2570
|
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
|
|
2558
2571
|
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
|
|
2559
2572
|
},
|
|
2560
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, expValEquals('platform_editor_flexible_list_indentation', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2573
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && smallTextStyle, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, expValEquals('platform_editor_flexible_list_indentation', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2561
2574
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2562
2575
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2563
2576
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "
|
|
60
|
+
const packageVersion = "128.0.8";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function FontSize(props) {
|
|
3
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
5
|
+
className: "fabric-editor-block-mark fabric-editor-font-size",
|
|
6
|
+
"data-font-size": props.fontSize
|
|
7
|
+
}, props.children);
|
|
8
|
+
}
|
|
@@ -19,6 +19,7 @@ import DataConsumer from './data-consumer';
|
|
|
19
19
|
import FragmentMark from './fragment';
|
|
20
20
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
21
21
|
import Border from './border';
|
|
22
|
+
import FontSize from './fontSize';
|
|
22
23
|
|
|
23
24
|
// Stage0
|
|
24
25
|
import ConfluenceInlineComment from './confluence-inline-comment';
|
|
@@ -34,6 +35,7 @@ export var markToReact = {
|
|
|
34
35
|
underline: Underline,
|
|
35
36
|
annotation: Annotation,
|
|
36
37
|
border: Border,
|
|
38
|
+
fontSize: FontSize,
|
|
37
39
|
// Stage0
|
|
38
40
|
confluenceInlineComment: ConfluenceInlineComment,
|
|
39
41
|
breakout: Breakout,
|
|
@@ -50,4 +52,4 @@ export var markToReact = {
|
|
|
50
52
|
export var toReact = function toReact(mark) {
|
|
51
53
|
return markToReact[mark.type.name];
|
|
52
54
|
};
|
|
53
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
55
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, FontSize, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
@@ -45,6 +45,19 @@ var isBackgroundClipBrowserFixNeeded = function isBackgroundClipBrowserFixNeeded
|
|
|
45
45
|
var baseFontStyle = css({
|
|
46
46
|
font: editorUGCToken('editor.font.body')
|
|
47
47
|
});
|
|
48
|
+
var smallTextStyle = css({
|
|
49
|
+
'--ak-renderer-editor-font-small-text': editorUGCToken('editor.font.body.small')
|
|
50
|
+
});
|
|
51
|
+
var fontSizeStyles = css({
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
53
|
+
'.fabric-editor-font-size': {
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
55
|
+
"&[data-font-size='small']": {
|
|
56
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
57
|
+
font: 'var(--ak-renderer-editor-font-small-text)'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
48
61
|
var originalBaseFontLineHeight = css({
|
|
49
62
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
50
63
|
lineHeight: '1.5rem'
|
|
@@ -2007,7 +2020,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2007
2020
|
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
|
|
2008
2021
|
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
|
|
2009
2022
|
},
|
|
2010
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, expValEquals('platform_editor_flexible_list_indentation', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2023
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && smallTextStyle, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, expValEquals('platform_editor_flexible_list_indentation', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2011
2024
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2012
2025
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2013
2026
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "
|
|
65
|
+
var packageVersion = "128.0.8";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -16,8 +16,9 @@ import DataConsumer from './data-consumer';
|
|
|
16
16
|
import FragmentMark from './fragment';
|
|
17
17
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
18
18
|
import Border from './border';
|
|
19
|
+
import FontSize from './fontSize';
|
|
19
20
|
export declare const markToReact: {
|
|
20
21
|
[key: string]: ComponentType<React.PropsWithChildren<any>>;
|
|
21
22
|
};
|
|
22
23
|
export declare const toReact: (mark: Mark) => ComponentType<React.PropsWithChildren<any>>;
|
|
23
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
24
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, FontSize, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
@@ -16,8 +16,9 @@ import DataConsumer from './data-consumer';
|
|
|
16
16
|
import FragmentMark from './fragment';
|
|
17
17
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
18
18
|
import Border from './border';
|
|
19
|
+
import FontSize from './fontSize';
|
|
19
20
|
export declare const markToReact: {
|
|
20
21
|
[key: string]: ComponentType<React.PropsWithChildren<any>>;
|
|
21
22
|
};
|
|
22
23
|
export declare const toReact: (mark: Mark) => ComponentType<React.PropsWithChildren<any>>;
|
|
23
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
24
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, BackgroundColor, Underline, Breakout, Annotation, Border, FontSize, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "128.0
|
|
3
|
+
"version": "128.1.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/adf-schema": "^52.
|
|
26
|
+
"@atlaskit/adf-schema": "^52.4.0",
|
|
27
27
|
"@atlaskit/adf-utils": "^19.27.0",
|
|
28
28
|
"@atlaskit/afm-i18n-platform-editor-renderer": "2.10.0",
|
|
29
29
|
"@atlaskit/analytics-listeners": "^10.0.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
39
|
-
"@atlaskit/editor-smart-link-draggable": "^0.
|
|
39
|
+
"@atlaskit/editor-smart-link-draggable": "^0.2.0",
|
|
40
40
|
"@atlaskit/emoji": "^69.10.0",
|
|
41
41
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
42
42
|
"@atlaskit/icon": "^33.0.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/status": "^3.1.0",
|
|
60
60
|
"@atlaskit/task-decision": "^19.3.0",
|
|
61
61
|
"@atlaskit/theme": "^22.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^40.
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^40.3.0",
|
|
63
63
|
"@atlaskit/tokens": "^11.1.0",
|
|
64
64
|
"@atlaskit/tooltip": "^20.14.0",
|
|
65
65
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^3.1.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^112.
|
|
76
|
+
"@atlaskit/editor-common": "^112.5.0",
|
|
77
77
|
"@atlaskit/link-provider": "^4.2.0",
|
|
78
78
|
"@atlaskit/media-core": "^37.0.0",
|
|
79
79
|
"react": "^18.2.0",
|