@atlaskit/renderer 95.0.1 → 96.0.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 +25 -0
- package/dist/cjs/react/index.js +0 -2
- package/dist/cjs/react/nodes/embedCard.js +2 -5
- package/dist/cjs/react/nodes/inlineCard.js +5 -1
- package/dist/cjs/react/nodes/mediaInline.js +41 -4
- package/dist/cjs/react/nodes/mediaSingle/index.js +3 -7
- package/dist/cjs/react/nodes/table/colgroup.js +6 -12
- package/dist/cjs/react/nodes/table/sticky.js +2 -4
- package/dist/cjs/react/nodes/table/table.js +1 -3
- package/dist/cjs/react/nodes/table.js +20 -9
- package/dist/cjs/react/nodes/tableCell.js +5 -3
- package/dist/cjs/render-document.js +2 -2
- package/dist/cjs/ui/MediaCard.js +2 -2
- package/dist/cjs/ui/Renderer/breakout-ssr.js +6 -8
- package/dist/cjs/ui/Renderer/index.js +4 -12
- package/dist/cjs/ui/Renderer/style.js +3 -3
- package/dist/cjs/ui/annotations/hooks/use-events.js +4 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/react/index.js +0 -2
- package/dist/es2019/react/nodes/embedCard.js +4 -7
- package/dist/es2019/react/nodes/inlineCard.js +4 -1
- package/dist/es2019/react/nodes/mediaInline.js +36 -4
- package/dist/es2019/react/nodes/mediaSingle/index.js +5 -9
- package/dist/es2019/react/nodes/table/colgroup.js +2 -8
- package/dist/es2019/react/nodes/table/sticky.js +2 -4
- package/dist/es2019/react/nodes/table/table.js +1 -3
- package/dist/es2019/react/nodes/table.js +18 -9
- package/dist/es2019/react/nodes/tableCell.js +4 -1
- package/dist/es2019/render-document.js +1 -1
- package/dist/es2019/ui/MediaCard.js +1 -1
- package/dist/es2019/ui/Renderer/breakout-ssr.js +6 -8
- package/dist/es2019/ui/Renderer/index.js +3 -11
- package/dist/es2019/ui/Renderer/style.js +16 -3
- package/dist/es2019/ui/annotations/hooks/use-events.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/react/index.js +0 -2
- package/dist/esm/react/nodes/embedCard.js +4 -7
- package/dist/esm/react/nodes/inlineCard.js +4 -1
- package/dist/esm/react/nodes/mediaInline.js +36 -4
- package/dist/esm/react/nodes/mediaSingle/index.js +5 -9
- package/dist/esm/react/nodes/table/colgroup.js +6 -12
- package/dist/esm/react/nodes/table/sticky.js +2 -4
- package/dist/esm/react/nodes/table/table.js +1 -3
- package/dist/esm/react/nodes/table.js +20 -9
- package/dist/esm/react/nodes/tableCell.js +5 -3
- package/dist/esm/render-document.js +1 -1
- package/dist/esm/ui/MediaCard.js +1 -1
- package/dist/esm/ui/Renderer/breakout-ssr.js +6 -8
- package/dist/esm/ui/Renderer/index.js +3 -11
- package/dist/esm/ui/Renderer/style.js +4 -3
- package/dist/esm/ui/annotations/hooks/use-events.js +4 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/react/index.d.ts +0 -2
- package/dist/types/react/nodes/embedCard.d.ts +0 -1
- package/dist/types/react/nodes/extension.d.ts +6 -0
- package/dist/types/react/nodes/index.d.ts +1 -2
- package/dist/types/react/nodes/media.d.ts +0 -1
- package/dist/types/react/nodes/mediaInline.d.ts +6 -3
- package/dist/types/react/nodes/mediaSingle/index.d.ts +0 -1
- package/dist/types/react/nodes/table/sticky.d.ts +1 -2
- package/dist/types/react/nodes/table/table.d.ts +1 -1
- package/dist/types/react/nodes/table/types.d.ts +0 -1
- package/dist/types/react/types.d.ts +0 -1
- package/dist/types/renderer-context.d.ts +1 -0
- package/dist/types/ui/MediaCard.d.ts +1 -1
- package/dist/types/ui/Renderer/breakout-ssr.d.ts +2 -4
- package/dist/types/ui/renderer-props.d.ts +1 -0
- package/package.json +13 -12
|
@@ -13,6 +13,7 @@ import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
|
13
13
|
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import { RendererCssClassName } from '../../consts';
|
|
15
15
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
16
|
+
import { shadowObserverClassNames } from '@atlaskit/editor-common/ui';
|
|
16
17
|
export var FullPagePadding = 32;
|
|
17
18
|
|
|
18
19
|
var getLineHeight = function getLineHeight(fontCode) {
|
|
@@ -68,7 +69,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
|
68
69
|
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n cursor: pointer;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-
|
|
72
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n cursor: pointer;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-of-type + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-of-type + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n &.", "\n .", " {\n cursor: default;\n }\n\n .", " {\n margin: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n\n .", " {\n opacity: 0;\n }\n\n &:hover {\n .", " {\n opacity: 1;\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN, RendererCssClassName.SORTABLE_COLUMN_BUTTON, tableCellPadding, token('color.border.focused', colors.B300), headingsCss, RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED, RendererCssClassName.SORTABLE_COLUMN_BUTTON, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER);
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
|
|
@@ -98,7 +99,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
98
99
|
var themeProps = {
|
|
99
100
|
theme: theme
|
|
100
101
|
};
|
|
101
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-
|
|
102
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n "])), editorFontSize(themeProps), themed({
|
|
102
103
|
light: token('color.text', colors.N800),
|
|
103
104
|
dark: token('color.text', '#B8C7E0')
|
|
104
105
|
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), token('color.link', colors.B400), token('color.link', colors.B300), token('color.link.pressed', colors.B500), colors.placeholderText(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
@@ -107,7 +108,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
107
108
|
})(themeProps), borderRadius(), themed({
|
|
108
109
|
light: token('color.text', colors.N800),
|
|
109
110
|
dark: token('color.text', colors.DN600)
|
|
110
|
-
})(themeProps), token('color.background.danger', colors.R50), token('color.text.danger', colors.R500), gridSize() * 3, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(themeProps), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
|
|
111
|
+
})(themeProps), token('color.background.danger', colors.R50), token('color.text.danger', colors.R500), gridSize() * 3, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(themeProps), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
|
|
111
112
|
light: token('color.background.neutral', akEditorTableToolbar),
|
|
112
113
|
dark: token('color.background.neutral', akEditorTableToolbarDark)
|
|
113
114
|
})(themeProps), themed({
|
|
@@ -30,7 +30,7 @@ export var useAnnotationStateByTypeEvent = function useAnnotationStateByTypeEven
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
var nextStates = Object.values(payload).reduce(function (acc, curr) {
|
|
33
|
-
if (curr.annotationType === type) {
|
|
33
|
+
if (curr.id && curr.annotationType === type) {
|
|
34
34
|
// Check for empty state to prevent additional renders
|
|
35
35
|
var isEmpty = curr.state === null || curr.state === undefined;
|
|
36
36
|
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, curr.id, !isEmpty ? curr.state : states[curr.id]));
|
|
@@ -95,7 +95,9 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
|
|
|
95
95
|
var cb = function cb(_ref3) {
|
|
96
96
|
var annotationIds = _ref3.annotationIds,
|
|
97
97
|
eventTarget = _ref3.eventTarget;
|
|
98
|
-
var annotationsByType = annotationIds.
|
|
98
|
+
var annotationsByType = annotationIds.filter(function (id) {
|
|
99
|
+
return !!id;
|
|
100
|
+
}).map(function (id) {
|
|
99
101
|
return {
|
|
100
102
|
id: id,
|
|
101
103
|
type: AnnotationTypes.INLINE_COMMENT
|
package/dist/esm/version.json
CHANGED
|
@@ -19,7 +19,6 @@ export interface ReactSerializerInit {
|
|
|
19
19
|
appearance?: RendererAppearance;
|
|
20
20
|
disableHeadingIDs?: boolean;
|
|
21
21
|
disableActions?: boolean;
|
|
22
|
-
allowDynamicTextSizing?: boolean;
|
|
23
22
|
allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
|
|
24
23
|
allowColumnSorting?: boolean;
|
|
25
24
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
@@ -60,7 +59,6 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
|
|
|
60
59
|
* for headers under this ticket -> https://product-fabric.atlassian.net/browse/ED-9668
|
|
61
60
|
*/
|
|
62
61
|
private expandHeadingIds;
|
|
63
|
-
private allowDynamicTextSizing?;
|
|
64
62
|
private allowHeadingAnchorLinks?;
|
|
65
63
|
private allowColumnSorting?;
|
|
66
64
|
private allowCopyToClipboard?;
|
|
@@ -28,6 +28,8 @@ declare const _default: {
|
|
|
28
28
|
new (props: Readonly<Props>): {
|
|
29
29
|
overflowContainer?: HTMLElement | null | undefined;
|
|
30
30
|
container?: HTMLElement | undefined;
|
|
31
|
+
shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
|
|
32
|
+
overflowContainerWidth: number;
|
|
31
33
|
scrollable?: NodeList | undefined;
|
|
32
34
|
diff?: number | undefined;
|
|
33
35
|
state: {
|
|
@@ -42,6 +44,7 @@ declare const _default: {
|
|
|
42
44
|
calcOverflowDiff: () => number;
|
|
43
45
|
calcScrollableWidth: () => number;
|
|
44
46
|
handleContainer: (container: HTMLElement | null) => void;
|
|
47
|
+
initShadowObserver(): void;
|
|
45
48
|
render(): JSX.Element;
|
|
46
49
|
context: any;
|
|
47
50
|
setState<K extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
@@ -66,6 +69,8 @@ declare const _default: {
|
|
|
66
69
|
new (props: Props, context?: any): {
|
|
67
70
|
overflowContainer?: HTMLElement | null | undefined;
|
|
68
71
|
container?: HTMLElement | undefined;
|
|
72
|
+
shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
|
|
73
|
+
overflowContainerWidth: number;
|
|
69
74
|
scrollable?: NodeList | undefined;
|
|
70
75
|
diff?: number | undefined;
|
|
71
76
|
state: {
|
|
@@ -80,6 +85,7 @@ declare const _default: {
|
|
|
80
85
|
calcOverflowDiff: () => number;
|
|
81
86
|
calcScrollableWidth: () => number;
|
|
82
87
|
handleContainer: (container: HTMLElement | null) => void;
|
|
88
|
+
initShadowObserver(): void;
|
|
83
89
|
render(): JSX.Element;
|
|
84
90
|
context: any;
|
|
85
91
|
setState<K_1 extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null, callback?: (() => void) | undefined): void;
|
|
@@ -41,7 +41,6 @@ declare const EmbedCard: React.ComponentType<{
|
|
|
41
41
|
layout: import("@atlaskit/adf-schema").RichMediaLayout;
|
|
42
42
|
rendererAppearance?: import("../..").RendererAppearance;
|
|
43
43
|
isInsideOfBlockNode?: boolean | undefined;
|
|
44
|
-
allowDynamicTextSizing?: boolean | undefined;
|
|
45
44
|
}> & Loadable.LoadableComponent;
|
|
46
45
|
declare const InlineCard: React.ComponentType<import("@atlaskit/editor-common/utils").Diff<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, import("../../ui/SmartCardStorage").WithSmartCardStorageProps>> & Loadable.LoadableComponent;
|
|
47
46
|
declare const BlockCard: React.ComponentType<{
|
|
@@ -53,7 +52,7 @@ declare const BlockCard: React.ComponentType<{
|
|
|
53
52
|
}> & Loadable.LoadableComponent;
|
|
54
53
|
declare const Media: React.ComponentType<import("./media").MediaProps> & Loadable.LoadableComponent;
|
|
55
54
|
declare const MediaGroup: React.ComponentType<import("./mediaGroup").MediaGroupProps> & Loadable.LoadableComponent;
|
|
56
|
-
declare const MediaInline: React.ComponentType<import("./mediaInline").MediaInlineProps
|
|
55
|
+
declare const MediaInline: React.ComponentType<import("react-intl-next").WithIntlProps<import("./mediaInline").MediaInlineProps & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent;
|
|
57
56
|
declare const MediaSingle: React.ComponentType<import("react-intl-next").WithIntlProps<import("./mediaSingle").Props & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent;
|
|
58
57
|
declare const Mention: React.ComponentType<import("./mention").Props> & Loadable.LoadableComponent;
|
|
59
58
|
declare const Expand: React.ComponentType<import("react-intl-next").WithIntlProps<import("../../ui/Expand").ExpandProps & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent;
|
|
@@ -12,7 +12,6 @@ export declare type MediaProps = MediaCardProps & {
|
|
|
12
12
|
providers?: ProviderFactory;
|
|
13
13
|
allowAltTextOnImages?: boolean;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
-
allowDynamicTextSizing?: boolean;
|
|
16
15
|
isInsideOfBlockNode?: boolean;
|
|
17
16
|
marks: Array<LinkDefinition>;
|
|
18
17
|
isLinkMark: () => boolean;
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { FileIdentifier } from '@atlaskit/media-client';
|
|
4
4
|
import { MediaProvider } from '../../ui/MediaCard';
|
|
5
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
6
|
export declare type RenderMediaInlineProps = {
|
|
6
7
|
identifier: FileIdentifier;
|
|
7
|
-
mediaProvider
|
|
8
|
+
mediaProvider: Promise<MediaProvider>;
|
|
8
9
|
children?: React.ReactNode;
|
|
9
10
|
};
|
|
10
11
|
export declare type MediaInlineProps = {
|
|
@@ -13,5 +14,7 @@ export declare type MediaInlineProps = {
|
|
|
13
14
|
providers: ProviderFactory;
|
|
14
15
|
};
|
|
15
16
|
export declare const RenderMediaInline: React.FC<RenderMediaInlineProps>;
|
|
16
|
-
declare const
|
|
17
|
-
|
|
17
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl">>> & {
|
|
18
|
+
WrappedComponent: React.ComponentType<MediaInlineProps & WrappedComponentProps<"intl">>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -11,7 +11,6 @@ export interface Props {
|
|
|
11
11
|
layout: MediaSingleLayout;
|
|
12
12
|
eventHandlers?: EventHandlers;
|
|
13
13
|
width?: number;
|
|
14
|
-
allowDynamicTextSizing?: boolean;
|
|
15
14
|
isInsideOfBlockNode?: boolean;
|
|
16
15
|
rendererAppearance: RendererAppearance;
|
|
17
16
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
@@ -24,9 +24,8 @@ export declare type StickyTableProps = {
|
|
|
24
24
|
layout: TableLayout;
|
|
25
25
|
columnWidths?: number[];
|
|
26
26
|
renderWidth: number;
|
|
27
|
-
allowDynamicTextSizing?: boolean;
|
|
28
27
|
} & OverflowShadowProps;
|
|
29
|
-
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth,
|
|
28
|
+
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, }: StickyTableProps) => jsx.JSX.Element;
|
|
30
29
|
export declare class OverflowParent {
|
|
31
30
|
private ref;
|
|
32
31
|
private constructor();
|
|
@@ -4,4 +4,4 @@ export declare type TableProps = SharedTableProps & {
|
|
|
4
4
|
innerRef?: React.RefObject<HTMLTableElement>;
|
|
5
5
|
children: React.ReactNode[];
|
|
6
6
|
};
|
|
7
|
-
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth,
|
|
7
|
+
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, }: TableProps) => JSX.Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { ADFEntity } from '@atlaskit/adf-utils';
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import { CardAppearance, CardDimensions, CardOnClickCallback, NumericalCardDimensions } from '@atlaskit/media-card';
|
|
4
4
|
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
5
5
|
import { ImageResizeMode, Identifier, FileState } from '@atlaskit/media-client';
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
7
7
|
*/
|
|
8
|
-
export declare function BreakoutSSRInlineScript(
|
|
9
|
-
|
|
10
|
-
}): JSX.Element | null;
|
|
11
|
-
export declare function createBreakoutInlineScript(id: number, allowDynamicTextSizing: boolean): string;
|
|
8
|
+
export declare function BreakoutSSRInlineScript(): JSX.Element | null;
|
|
9
|
+
export declare function createBreakoutInlineScript(id: number): string;
|
|
12
10
|
export declare const breakoutInlineScriptContext: string;
|
|
13
11
|
export declare const calcLineLength: any;
|
|
@@ -39,6 +39,7 @@ export interface RendererProps {
|
|
|
39
39
|
adfStage?: ADFStage;
|
|
40
40
|
disableHeadingIDs?: boolean;
|
|
41
41
|
disableActions?: boolean;
|
|
42
|
+
/** @deprecated [ED-14507] allowDynamicTextSizing is no longer in use */
|
|
42
43
|
allowDynamicTextSizing?: boolean;
|
|
43
44
|
allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
|
|
44
45
|
allowPlaceholderText?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "96.0.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,22 +24,23 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^23.
|
|
28
|
-
"@atlaskit/adf-utils": "^
|
|
27
|
+
"@atlaskit/adf-schema": "^23.1.0",
|
|
28
|
+
"@atlaskit/adf-utils": "^17.0.0",
|
|
29
29
|
"@atlaskit/analytics-listeners": "^8.2.0",
|
|
30
30
|
"@atlaskit/analytics-namespaced-context": "^6.4.0",
|
|
31
31
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
32
32
|
"@atlaskit/button": "^16.3.0",
|
|
33
33
|
"@atlaskit/code": "^14.3.0",
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^68.0.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^2.1.0",
|
|
37
37
|
"@atlaskit/icon": "^21.10.0",
|
|
38
|
-
"@atlaskit/media-card": "^73.
|
|
38
|
+
"@atlaskit/media-card": "^73.7.0",
|
|
39
39
|
"@atlaskit/media-client": "^16.0.0",
|
|
40
|
-
"@atlaskit/media-common": "^2.
|
|
40
|
+
"@atlaskit/media-common": "^2.14.0",
|
|
41
41
|
"@atlaskit/media-filmstrip": "^44.0.0",
|
|
42
|
-
"@atlaskit/media-
|
|
42
|
+
"@atlaskit/media-ui": "^22.1.0",
|
|
43
|
+
"@atlaskit/media-viewer": "^46.4.0",
|
|
43
44
|
"@atlaskit/status": "^1.1.0",
|
|
44
45
|
"@atlaskit/task-decision": "^17.4.0",
|
|
45
46
|
"@atlaskit/theme": "^12.1.0",
|
|
@@ -58,18 +59,18 @@
|
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
60
61
|
"@atlaskit/media-core": "^33.0.0",
|
|
61
|
-
"@atlaskit/smart-card": "^19.1.
|
|
62
|
+
"@atlaskit/smart-card": "^19.1.12",
|
|
62
63
|
"react": "^16.8.0",
|
|
63
64
|
"react-dom": "^16.8.0"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@atlaskit/analytics-gas-types": "^5.0.5",
|
|
67
|
-
"@atlaskit/avatar": "^
|
|
68
|
+
"@atlaskit/avatar": "^21.0.0",
|
|
68
69
|
"@atlaskit/css-reset": "^6.3.0",
|
|
69
70
|
"@atlaskit/docs": "*",
|
|
70
|
-
"@atlaskit/editor-core": "^
|
|
71
|
+
"@atlaskit/editor-core": "^167.0.0",
|
|
71
72
|
"@atlaskit/editor-test-helpers": "^17.0.0",
|
|
72
|
-
"@atlaskit/logo": "^13.
|
|
73
|
+
"@atlaskit/logo": "^13.7.0",
|
|
73
74
|
"@atlaskit/media-core": "^33.0.0",
|
|
74
75
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
75
76
|
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
"enzyme": "^3.10.0",
|
|
93
94
|
"jsdom": "^16.2.2",
|
|
94
95
|
"mockdate": "^3.0.2",
|
|
95
|
-
"puppeteer": "
|
|
96
|
+
"puppeteer": "13.7.0",
|
|
96
97
|
"react": "^16.8.0",
|
|
97
98
|
"react-dom": "^16.8.0",
|
|
98
99
|
"react-live-clock": "^4.0.0",
|