@atlaskit/renderer 112.5.5 → 112.6.1
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 +22 -0
- package/dist/cjs/react/marks/breakout.js +9 -3
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +1 -1
- package/dist/cjs/ui/annotations/element/index.js +7 -4
- package/dist/cjs/ui/annotations/element/mark.js +4 -2
- package/dist/cjs/ui/annotations/hooks/use-events.js +25 -5
- package/dist/es2019/react/marks/breakout.js +8 -3
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +2 -1
- package/dist/es2019/ui/annotations/element/index.js +5 -1
- package/dist/es2019/ui/annotations/element/mark.js +7 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +18 -1
- package/dist/esm/react/marks/breakout.js +8 -3
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +1 -1
- package/dist/esm/ui/annotations/element/index.js +7 -4
- package/dist/esm/ui/annotations/element/mark.js +4 -2
- package/dist/esm/ui/annotations/hooks/use-events.js +25 -5
- package/dist/types/ui/annotations/element/mark.d.ts +5 -1
- package/dist/types/ui/annotations/hooks/use-events.d.ts +4 -1
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +5 -1
- package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +4 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 112.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#168591](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168591)
|
|
8
|
+
[`b75a552ecb1c6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b75a552ecb1c6) -
|
|
9
|
+
[ED-25816] Fix: non full-width resized layout becomes full width in full-width renderer
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 112.6.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#167231](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167231)
|
|
17
|
+
[`335a373081eaf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/335a373081eaf) -
|
|
18
|
+
[ux] Added hoveredAnnotation for the renderer and the editor to accomodate the newly implemented
|
|
19
|
+
comment's panel
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 112.5.5
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = Breakout;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
9
|
var _react = require("@emotion/react");
|
|
8
10
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
9
11
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
15
|
/**
|
|
13
16
|
* @jsxRuntime classic
|
|
@@ -25,9 +28,12 @@ var wrapperStyles = (0, _react.css)({
|
|
|
25
28
|
function Breakout(props) {
|
|
26
29
|
return (0, _react.jsx)(_ui.WidthConsumer, null, function (_ref) {
|
|
27
30
|
var width = _ref.width;
|
|
28
|
-
return (0, _react.jsx)("div", {
|
|
31
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
29
32
|
css: wrapperStyles,
|
|
30
|
-
"data-mode": props.mode
|
|
33
|
+
"data-mode": props.mode
|
|
34
|
+
}, (0, _experiments.editorExperiment)('advanced_layouts', true) && {
|
|
35
|
+
'data-has-width': !!props.width
|
|
36
|
+
}, {
|
|
31
37
|
style: {
|
|
32
38
|
width: (0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_breakout_resizing') ?
|
|
33
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -38,6 +44,6 @@ function Breakout(props) {
|
|
|
38
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
45
|
,
|
|
40
46
|
className: "fabric-editor-breakout-mark fabric-editor-block-mark"
|
|
41
|
-
}, props.children);
|
|
47
|
+
}), props.children);
|
|
42
48
|
});
|
|
43
49
|
}
|
|
@@ -65,7 +65,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
65
65
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
66
66
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
67
67
|
var packageName = "@atlaskit/renderer";
|
|
68
|
-
var packageVersion = "112.
|
|
68
|
+
var packageVersion = "112.6.1";
|
|
69
69
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
70
70
|
containerName: 'ak-renderer-wrapper',
|
|
71
71
|
containerType: 'inline-size',
|
|
@@ -100,7 +100,7 @@ var fullWidthStyles = function fullWidthStyles(_ref5) {
|
|
|
100
100
|
if (appearance !== 'full-width') {
|
|
101
101
|
return '';
|
|
102
102
|
}
|
|
103
|
-
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t.fabric-editor-breakout-mark,\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _table.isTableResizingEnabled)(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
|
|
103
|
+
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t/* don't override if the breakout mark has width attribute defined */\n\t\t.fabric-editor-breakout-mark:not([data-has-width='true']),\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _table.isTableResizingEnabled)(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
|
|
104
104
|
};
|
|
105
105
|
var breakoutWidthStyle = function breakoutWidthStyle() {
|
|
106
106
|
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t\t*:not([data-mark-type='fragment']) .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\n\t\t[data-mark-type='fragment'] * .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\t"])), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
|
|
@@ -21,10 +21,12 @@ var MarkElement = exports.MarkElement = function MarkElement(_ref) {
|
|
|
21
21
|
useBlockLevel = _ref.useBlockLevel;
|
|
22
22
|
var updateSubscriber = (0, _hooks.useInlineCommentSubscriberContext)();
|
|
23
23
|
var states = (0, _react.useContext)(_context.InlineCommentsStateContext);
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
var _useHasFocusEvent = (0, _hooks.useHasFocusEvent)({
|
|
25
|
+
id: id,
|
|
26
|
+
updateSubscriber: updateSubscriber
|
|
27
|
+
}),
|
|
28
|
+
hasFocus = _useHasFocusEvent.hasFocus,
|
|
29
|
+
isHovered = _useHasFocusEvent.isHovered;
|
|
28
30
|
var dataAttributesMemorized = (0, _react.useMemo)(function () {
|
|
29
31
|
return dataAttributes;
|
|
30
32
|
}, [dataAttributes]);
|
|
@@ -54,6 +56,7 @@ var MarkElement = exports.MarkElement = function MarkElement(_ref) {
|
|
|
54
56
|
annotationParentIds: activeParentIds,
|
|
55
57
|
onClick: onClick,
|
|
56
58
|
hasFocus: hasFocus,
|
|
59
|
+
isHovered: isHovered,
|
|
57
60
|
state: states[id],
|
|
58
61
|
useBlockLevel: useBlockLevel
|
|
59
62
|
}, children);
|
|
@@ -26,7 +26,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
26
26
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
27
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
|
|
28
28
|
var markStyles = function markStyles() {
|
|
29
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus);
|
|
29
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']),\n\t\t&:hover:not(:focus) {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus, (0, _styles.AnnotationSharedCSSByState)().hover);
|
|
30
30
|
};
|
|
31
31
|
var isMobile = function isMobile() {
|
|
32
32
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
@@ -59,6 +59,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
59
59
|
id = _ref.id,
|
|
60
60
|
state = _ref.state,
|
|
61
61
|
hasFocus = _ref.hasFocus,
|
|
62
|
+
isHovered = _ref.isHovered,
|
|
62
63
|
onClick = _ref.onClick,
|
|
63
64
|
useBlockLevel = _ref.useBlockLevel;
|
|
64
65
|
var isInlineCommentsKbAccessible = _featureGateJsClient.default.checkGate('inline_comments_keyboard_accessible_renderer');
|
|
@@ -106,7 +107,8 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
106
107
|
};
|
|
107
108
|
var overriddenData = !state ? dataAttributes : _objectSpread(_objectSpread({}, dataAttributes), {}, {
|
|
108
109
|
'data-mark-annotation-state': state,
|
|
109
|
-
'data-has-focus': hasFocus
|
|
110
|
+
'data-has-focus': hasFocus,
|
|
111
|
+
'data-is-hovered': isHovered
|
|
110
112
|
});
|
|
111
113
|
var desktopAccessibilityAttributes = isInlineCommentsKbAccessible ? isMobile() ? {} : {
|
|
112
114
|
role: 'button',
|
|
@@ -54,6 +54,10 @@ var useHasFocusEvent = exports.useHasFocusEvent = function useHasFocusEvent(_ref
|
|
|
54
54
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
55
55
|
hasFocus = _useState4[0],
|
|
56
56
|
setHasFocus = _useState4[1];
|
|
57
|
+
var _useState5 = (0, _react.useState)(false),
|
|
58
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
59
|
+
isHovered = _useState6[0],
|
|
60
|
+
setIsHovered = _useState6[1];
|
|
57
61
|
var isInlineCommentsKbAccessible = _featureGateJsClient.default.checkGate('inline_comments_keyboard_accessible_renderer');
|
|
58
62
|
(0, _react.useLayoutEffect)(function () {
|
|
59
63
|
if (!updateSubscriber) {
|
|
@@ -62,26 +66,42 @@ var useHasFocusEvent = exports.useHasFocusEvent = function useHasFocusEvent(_ref
|
|
|
62
66
|
var cb = function cb(payload) {
|
|
63
67
|
setHasFocus(payload && payload.annotationId === id);
|
|
64
68
|
};
|
|
69
|
+
var callbackForHoveredAnnotation = function callbackForHoveredAnnotation(payload) {
|
|
70
|
+
setIsHovered(payload && payload.annotationId === id);
|
|
71
|
+
};
|
|
65
72
|
var removeFocus = function removeFocus() {
|
|
66
73
|
setHasFocus(false);
|
|
67
74
|
if (isInlineCommentsKbAccessible && document.activeElement instanceof HTMLElement) {
|
|
68
75
|
document.activeElement.blur();
|
|
69
76
|
}
|
|
70
77
|
};
|
|
78
|
+
var removeHoverEffect = function removeHoverEffect() {
|
|
79
|
+
setIsHovered(false);
|
|
80
|
+
if (isInlineCommentsKbAccessible && document.activeElement instanceof HTMLElement) {
|
|
81
|
+
document.activeElement.blur();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
71
84
|
updateSubscriber.on(_types.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
85
|
+
updateSubscriber.on(_types.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
72
86
|
updateSubscriber.on(_types.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
87
|
+
updateSubscriber.on(_types.AnnotationUpdateEvent.REMOVE_ANNOTATION_HOVERED, removeHoverEffect);
|
|
73
88
|
return function () {
|
|
74
89
|
updateSubscriber.off(_types.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
90
|
+
updateSubscriber.off(_types.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
75
91
|
updateSubscriber.off(_types.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
92
|
+
updateSubscriber.off(_types.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, removeHoverEffect);
|
|
76
93
|
};
|
|
77
94
|
}, [id, updateSubscriber, isInlineCommentsKbAccessible]);
|
|
78
|
-
return
|
|
95
|
+
return {
|
|
96
|
+
hasFocus: hasFocus,
|
|
97
|
+
isHovered: isHovered
|
|
98
|
+
};
|
|
79
99
|
};
|
|
80
100
|
var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnnotationClickEvent(props) {
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
annotationClickEvent =
|
|
84
|
-
setAnnotationClickEvent =
|
|
101
|
+
var _useState7 = (0, _react.useState)(null),
|
|
102
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
103
|
+
annotationClickEvent = _useState8[0],
|
|
104
|
+
setAnnotationClickEvent = _useState8[1];
|
|
85
105
|
var updateSubscriber = props.updateSubscriber,
|
|
86
106
|
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
87
107
|
isNestedRender = props.isNestedRender;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -7,6 +8,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
8
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
8
9
|
import { calcBreakoutWithCustomWidth, calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
9
10
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
13
|
const wrapperStyles = css({
|
|
12
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -18,9 +20,12 @@ const wrapperStyles = css({
|
|
|
18
20
|
export default function Breakout(props) {
|
|
19
21
|
return jsx(WidthConsumer, null, ({
|
|
20
22
|
width
|
|
21
|
-
}) => jsx("div", {
|
|
23
|
+
}) => jsx("div", _extends({
|
|
22
24
|
css: wrapperStyles,
|
|
23
|
-
"data-mode": props.mode
|
|
25
|
+
"data-mode": props.mode
|
|
26
|
+
}, editorExperiment('advanced_layouts', true) && {
|
|
27
|
+
'data-has-width': !!props.width
|
|
28
|
+
}, {
|
|
24
29
|
style: {
|
|
25
30
|
width: fg('platform_editor_advanced_layouts_breakout_resizing') ?
|
|
26
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -31,5 +36,5 @@ export default function Breakout(props) {
|
|
|
31
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
32
37
|
,
|
|
33
38
|
className: "fabric-editor-breakout-mark fabric-editor-block-mark"
|
|
34
|
-
}, props.children));
|
|
39
|
+
}), props.children));
|
|
35
40
|
}
|
|
@@ -45,7 +45,7 @@ import { countNodes } from './count-nodes';
|
|
|
45
45
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
const packageName = "@atlaskit/renderer";
|
|
48
|
-
const packageVersion = "112.
|
|
48
|
+
const packageVersion = "112.6.1";
|
|
49
49
|
const setAsQueryContainerStyles = css({
|
|
50
50
|
containerName: 'ak-renderer-wrapper',
|
|
51
51
|
containerType: 'inline-size',
|
|
@@ -306,7 +306,8 @@ const fullWidthStyles = ({
|
|
|
306
306
|
max-width: ${akEditorFullWidthLayoutWidth}px;
|
|
307
307
|
margin: 0 auto;
|
|
308
308
|
|
|
309
|
-
|
|
309
|
+
/* don't override if the breakout mark has width attribute defined */
|
|
310
|
+
.fabric-editor-breakout-mark:not([data-has-width='true']),
|
|
310
311
|
.ak-renderer-extension {
|
|
311
312
|
width: 100% !important;
|
|
312
313
|
}
|
|
@@ -13,7 +13,10 @@ const MarkElement = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
const updateSubscriber = useInlineCommentSubscriberContext();
|
|
15
15
|
const states = useContext(InlineCommentsStateContext);
|
|
16
|
-
const
|
|
16
|
+
const {
|
|
17
|
+
hasFocus,
|
|
18
|
+
isHovered
|
|
19
|
+
} = useHasFocusEvent({
|
|
17
20
|
id,
|
|
18
21
|
updateSubscriber
|
|
19
22
|
});
|
|
@@ -46,6 +49,7 @@ const MarkElement = ({
|
|
|
46
49
|
annotationParentIds: activeParentIds,
|
|
47
50
|
onClick: onClick,
|
|
48
51
|
hasFocus: hasFocus,
|
|
52
|
+
isHovered: isHovered,
|
|
49
53
|
state: states[id],
|
|
50
54
|
useBlockLevel: useBlockLevel
|
|
51
55
|
}, children);
|
|
@@ -27,6 +27,10 @@ const markStyles = () => css`
|
|
|
27
27
|
&[data-has-focus='true'] {
|
|
28
28
|
${AnnotationSharedCSSByState().focus}
|
|
29
29
|
}
|
|
30
|
+
&[data-is-hovered='true']:not([data-has-focus='true']),
|
|
31
|
+
&:hover:not(:focus) {
|
|
32
|
+
${AnnotationSharedCSSByState().hover}
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
`;
|
|
32
36
|
const isMobile = () => {
|
|
@@ -58,6 +62,7 @@ export const MarkComponent = ({
|
|
|
58
62
|
id,
|
|
59
63
|
state,
|
|
60
64
|
hasFocus,
|
|
65
|
+
isHovered,
|
|
61
66
|
onClick,
|
|
62
67
|
useBlockLevel
|
|
63
68
|
}) => {
|
|
@@ -105,7 +110,8 @@ export const MarkComponent = ({
|
|
|
105
110
|
const overriddenData = !state ? dataAttributes : {
|
|
106
111
|
...dataAttributes,
|
|
107
112
|
'data-mark-annotation-state': state,
|
|
108
|
-
'data-has-focus': hasFocus
|
|
113
|
+
'data-has-focus': hasFocus,
|
|
114
|
+
'data-is-hovered': isHovered
|
|
109
115
|
};
|
|
110
116
|
const desktopAccessibilityAttributes = isInlineCommentsKbAccessible ? isMobile() ? {} : {
|
|
111
117
|
role: 'button',
|
|
@@ -45,6 +45,7 @@ export const useHasFocusEvent = ({
|
|
|
45
45
|
updateSubscriber
|
|
46
46
|
}) => {
|
|
47
47
|
const [hasFocus, setHasFocus] = useState(false);
|
|
48
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
48
49
|
const isInlineCommentsKbAccessible = FeatureGates.checkGate('inline_comments_keyboard_accessible_renderer');
|
|
49
50
|
useLayoutEffect(() => {
|
|
50
51
|
if (!updateSubscriber) {
|
|
@@ -53,20 +54,36 @@ export const useHasFocusEvent = ({
|
|
|
53
54
|
const cb = payload => {
|
|
54
55
|
setHasFocus(payload && payload.annotationId === id);
|
|
55
56
|
};
|
|
57
|
+
const callbackForHoveredAnnotation = payload => {
|
|
58
|
+
setIsHovered(payload && payload.annotationId === id);
|
|
59
|
+
};
|
|
56
60
|
const removeFocus = () => {
|
|
57
61
|
setHasFocus(false);
|
|
58
62
|
if (isInlineCommentsKbAccessible && document.activeElement instanceof HTMLElement) {
|
|
59
63
|
document.activeElement.blur();
|
|
60
64
|
}
|
|
61
65
|
};
|
|
66
|
+
const removeHoverEffect = () => {
|
|
67
|
+
setIsHovered(false);
|
|
68
|
+
if (isInlineCommentsKbAccessible && document.activeElement instanceof HTMLElement) {
|
|
69
|
+
document.activeElement.blur();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
62
72
|
updateSubscriber.on(AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
73
|
+
updateSubscriber.on(AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
63
74
|
updateSubscriber.on(AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
75
|
+
updateSubscriber.on(AnnotationUpdateEvent.REMOVE_ANNOTATION_HOVERED, removeHoverEffect);
|
|
64
76
|
return () => {
|
|
65
77
|
updateSubscriber.off(AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
78
|
+
updateSubscriber.off(AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
66
79
|
updateSubscriber.off(AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
80
|
+
updateSubscriber.off(AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, removeHoverEffect);
|
|
67
81
|
};
|
|
68
82
|
}, [id, updateSubscriber, isInlineCommentsKbAccessible]);
|
|
69
|
-
return
|
|
83
|
+
return {
|
|
84
|
+
hasFocus,
|
|
85
|
+
isHovered
|
|
86
|
+
};
|
|
70
87
|
};
|
|
71
88
|
export const useAnnotationClickEvent = props => {
|
|
72
89
|
const [annotationClickEvent, setAnnotationClickEvent] = useState(null);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -7,6 +8,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
8
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
8
9
|
import { calcBreakoutWithCustomWidth, calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
9
10
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
13
|
var wrapperStyles = css({
|
|
12
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -18,9 +20,12 @@ var wrapperStyles = css({
|
|
|
18
20
|
export default function Breakout(props) {
|
|
19
21
|
return jsx(WidthConsumer, null, function (_ref) {
|
|
20
22
|
var width = _ref.width;
|
|
21
|
-
return jsx("div", {
|
|
23
|
+
return jsx("div", _extends({
|
|
22
24
|
css: wrapperStyles,
|
|
23
|
-
"data-mode": props.mode
|
|
25
|
+
"data-mode": props.mode
|
|
26
|
+
}, editorExperiment('advanced_layouts', true) && {
|
|
27
|
+
'data-has-width': !!props.width
|
|
28
|
+
}, {
|
|
24
29
|
style: {
|
|
25
30
|
width: fg('platform_editor_advanced_layouts_breakout_resizing') ?
|
|
26
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -31,6 +36,6 @@ export default function Breakout(props) {
|
|
|
31
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
32
37
|
,
|
|
33
38
|
className: "fabric-editor-breakout-mark fabric-editor-block-mark"
|
|
34
|
-
}, props.children);
|
|
39
|
+
}), props.children);
|
|
35
40
|
});
|
|
36
41
|
}
|
|
@@ -55,7 +55,7 @@ import { countNodes } from './count-nodes';
|
|
|
55
55
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
56
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "112.
|
|
58
|
+
var packageVersion = "112.6.1";
|
|
59
59
|
var setAsQueryContainerStyles = css({
|
|
60
60
|
containerName: 'ak-renderer-wrapper',
|
|
61
61
|
containerType: 'inline-size',
|
|
@@ -91,7 +91,7 @@ var fullWidthStyles = function fullWidthStyles(_ref5) {
|
|
|
91
91
|
if (appearance !== 'full-width') {
|
|
92
92
|
return '';
|
|
93
93
|
}
|
|
94
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t.fabric-editor-breakout-mark,\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), akEditorFullWidthLayoutWidth, isTableResizingEnabled(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
|
|
94
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t/* don't override if the breakout mark has width attribute defined */\n\t\t.fabric-editor-breakout-mark:not([data-has-width='true']),\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), akEditorFullWidthLayoutWidth, isTableResizingEnabled(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
|
|
95
95
|
};
|
|
96
96
|
var breakoutWidthStyle = function breakoutWidthStyle() {
|
|
97
97
|
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t\t*:not([data-mark-type='fragment']) .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\n\t\t[data-mark-type='fragment'] * .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\t"])), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
|
|
@@ -12,10 +12,12 @@ var MarkElement = function MarkElement(_ref) {
|
|
|
12
12
|
useBlockLevel = _ref.useBlockLevel;
|
|
13
13
|
var updateSubscriber = useInlineCommentSubscriberContext();
|
|
14
14
|
var states = useContext(InlineCommentsStateContext);
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
var _useHasFocusEvent = useHasFocusEvent({
|
|
16
|
+
id: id,
|
|
17
|
+
updateSubscriber: updateSubscriber
|
|
18
|
+
}),
|
|
19
|
+
hasFocus = _useHasFocusEvent.hasFocus,
|
|
20
|
+
isHovered = _useHasFocusEvent.isHovered;
|
|
19
21
|
var dataAttributesMemorized = useMemo(function () {
|
|
20
22
|
return dataAttributes;
|
|
21
23
|
}, [dataAttributes]);
|
|
@@ -45,6 +47,7 @@ var MarkElement = function MarkElement(_ref) {
|
|
|
45
47
|
annotationParentIds: activeParentIds,
|
|
46
48
|
onClick: onClick,
|
|
47
49
|
hasFocus: hasFocus,
|
|
50
|
+
isHovered: isHovered,
|
|
48
51
|
state: states[id],
|
|
49
52
|
useBlockLevel: useBlockLevel
|
|
50
53
|
}, children);
|
|
@@ -21,7 +21,7 @@ import { inlineCommentMessages } from '../../../messages';
|
|
|
21
21
|
|
|
22
22
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
|
|
23
23
|
var markStyles = function markStyles() {
|
|
24
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus);
|
|
24
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']),\n\t\t&:hover:not(:focus) {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus, AnnotationSharedCSSByState().hover);
|
|
25
25
|
};
|
|
26
26
|
var isMobile = function isMobile() {
|
|
27
27
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
@@ -54,6 +54,7 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
54
54
|
id = _ref.id,
|
|
55
55
|
state = _ref.state,
|
|
56
56
|
hasFocus = _ref.hasFocus,
|
|
57
|
+
isHovered = _ref.isHovered,
|
|
57
58
|
onClick = _ref.onClick,
|
|
58
59
|
useBlockLevel = _ref.useBlockLevel;
|
|
59
60
|
var isInlineCommentsKbAccessible = FeatureGates.checkGate('inline_comments_keyboard_accessible_renderer');
|
|
@@ -101,7 +102,8 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
101
102
|
};
|
|
102
103
|
var overriddenData = !state ? dataAttributes : _objectSpread(_objectSpread({}, dataAttributes), {}, {
|
|
103
104
|
'data-mark-annotation-state': state,
|
|
104
|
-
'data-has-focus': hasFocus
|
|
105
|
+
'data-has-focus': hasFocus,
|
|
106
|
+
'data-is-hovered': isHovered
|
|
105
107
|
});
|
|
106
108
|
var desktopAccessibilityAttributes = isInlineCommentsKbAccessible ? isMobile() ? {} : {
|
|
107
109
|
role: 'button',
|
|
@@ -47,6 +47,10 @@ export var useHasFocusEvent = function useHasFocusEvent(_ref2) {
|
|
|
47
47
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
48
|
hasFocus = _useState4[0],
|
|
49
49
|
setHasFocus = _useState4[1];
|
|
50
|
+
var _useState5 = useState(false),
|
|
51
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
52
|
+
isHovered = _useState6[0],
|
|
53
|
+
setIsHovered = _useState6[1];
|
|
50
54
|
var isInlineCommentsKbAccessible = FeatureGates.checkGate('inline_comments_keyboard_accessible_renderer');
|
|
51
55
|
useLayoutEffect(function () {
|
|
52
56
|
if (!updateSubscriber) {
|
|
@@ -55,26 +59,42 @@ export var useHasFocusEvent = function useHasFocusEvent(_ref2) {
|
|
|
55
59
|
var cb = function cb(payload) {
|
|
56
60
|
setHasFocus(payload && payload.annotationId === id);
|
|
57
61
|
};
|
|
62
|
+
var callbackForHoveredAnnotation = function callbackForHoveredAnnotation(payload) {
|
|
63
|
+
setIsHovered(payload && payload.annotationId === id);
|
|
64
|
+
};
|
|
58
65
|
var removeFocus = function removeFocus() {
|
|
59
66
|
setHasFocus(false);
|
|
60
67
|
if (isInlineCommentsKbAccessible && document.activeElement instanceof HTMLElement) {
|
|
61
68
|
document.activeElement.blur();
|
|
62
69
|
}
|
|
63
70
|
};
|
|
71
|
+
var removeHoverEffect = function removeHoverEffect() {
|
|
72
|
+
setIsHovered(false);
|
|
73
|
+
if (isInlineCommentsKbAccessible && document.activeElement instanceof HTMLElement) {
|
|
74
|
+
document.activeElement.blur();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
64
77
|
updateSubscriber.on(AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
78
|
+
updateSubscriber.on(AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
65
79
|
updateSubscriber.on(AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
80
|
+
updateSubscriber.on(AnnotationUpdateEvent.REMOVE_ANNOTATION_HOVERED, removeHoverEffect);
|
|
66
81
|
return function () {
|
|
67
82
|
updateSubscriber.off(AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
83
|
+
updateSubscriber.off(AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
68
84
|
updateSubscriber.off(AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
85
|
+
updateSubscriber.off(AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, removeHoverEffect);
|
|
69
86
|
};
|
|
70
87
|
}, [id, updateSubscriber, isInlineCommentsKbAccessible]);
|
|
71
|
-
return
|
|
88
|
+
return {
|
|
89
|
+
hasFocus: hasFocus,
|
|
90
|
+
isHovered: isHovered
|
|
91
|
+
};
|
|
72
92
|
};
|
|
73
93
|
export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
annotationClickEvent =
|
|
77
|
-
setAnnotationClickEvent =
|
|
94
|
+
var _useState7 = useState(null),
|
|
95
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
96
|
+
annotationClickEvent = _useState8[0],
|
|
97
|
+
setAnnotationClickEvent = _useState8[1];
|
|
78
98
|
var updateSubscriber = props.updateSubscriber,
|
|
79
99
|
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
80
100
|
isNestedRender = props.isNestedRender;
|
|
@@ -12,10 +12,11 @@ type MarkComponentProps = {
|
|
|
12
12
|
dataAttributes: AnnotationDataAttributes;
|
|
13
13
|
state: AnnotationMarkStates | null;
|
|
14
14
|
hasFocus: boolean;
|
|
15
|
+
isHovered: boolean;
|
|
15
16
|
onClick: (props: OnAnnotationClickPayload) => void;
|
|
16
17
|
useBlockLevel?: boolean;
|
|
17
18
|
};
|
|
18
|
-
export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
|
|
19
|
+
export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, isHovered, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
|
|
19
20
|
css?: {}[] | undefined;
|
|
20
21
|
'data-mark-type': string;
|
|
21
22
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
@@ -27,6 +28,7 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
27
28
|
css?: {}[] | undefined;
|
|
28
29
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
29
30
|
'data-has-focus': boolean;
|
|
31
|
+
'data-is-hovered': boolean;
|
|
30
32
|
'data-mark-type': string;
|
|
31
33
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
32
34
|
'data-id': string;
|
|
@@ -49,6 +51,7 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
49
51
|
css?: {}[] | undefined;
|
|
50
52
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
51
53
|
'data-has-focus': boolean;
|
|
54
|
+
'data-is-hovered': boolean;
|
|
52
55
|
'data-mark-type': string;
|
|
53
56
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
54
57
|
'data-id': string;
|
|
@@ -76,6 +79,7 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
76
79
|
css?: {}[] | undefined;
|
|
77
80
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
78
81
|
'data-has-focus': boolean;
|
|
82
|
+
'data-is-hovered': boolean;
|
|
79
83
|
'data-mark-type': string;
|
|
80
84
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
81
85
|
'data-id': string;
|
|
@@ -13,7 +13,10 @@ type UseAnnotationUpdateSatteByEventProps = {
|
|
|
13
13
|
updateSubscriber: AnnotationUpdateEmitter | null;
|
|
14
14
|
};
|
|
15
15
|
export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
|
|
16
|
-
export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) =>
|
|
16
|
+
export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) => {
|
|
17
|
+
hasFocus: boolean;
|
|
18
|
+
isHovered: boolean;
|
|
19
|
+
};
|
|
17
20
|
type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
|
|
18
21
|
export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent' | 'isNestedRender'>) => AnnotationsWithClickTarget;
|
|
19
22
|
export {};
|
|
@@ -12,10 +12,11 @@ type MarkComponentProps = {
|
|
|
12
12
|
dataAttributes: AnnotationDataAttributes;
|
|
13
13
|
state: AnnotationMarkStates | null;
|
|
14
14
|
hasFocus: boolean;
|
|
15
|
+
isHovered: boolean;
|
|
15
16
|
onClick: (props: OnAnnotationClickPayload) => void;
|
|
16
17
|
useBlockLevel?: boolean;
|
|
17
18
|
};
|
|
18
|
-
export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
|
|
19
|
+
export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, isHovered, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
|
|
19
20
|
css?: {}[] | undefined;
|
|
20
21
|
'data-mark-type': string;
|
|
21
22
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
@@ -27,6 +28,7 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
27
28
|
css?: {}[] | undefined;
|
|
28
29
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
29
30
|
'data-has-focus': boolean;
|
|
31
|
+
'data-is-hovered': boolean;
|
|
30
32
|
'data-mark-type': string;
|
|
31
33
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
32
34
|
'data-id': string;
|
|
@@ -49,6 +51,7 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
49
51
|
css?: {}[] | undefined;
|
|
50
52
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
51
53
|
'data-has-focus': boolean;
|
|
54
|
+
'data-is-hovered': boolean;
|
|
52
55
|
'data-mark-type': string;
|
|
53
56
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
54
57
|
'data-id': string;
|
|
@@ -76,6 +79,7 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
76
79
|
css?: {}[] | undefined;
|
|
77
80
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
78
81
|
'data-has-focus': boolean;
|
|
82
|
+
'data-is-hovered': boolean;
|
|
79
83
|
'data-mark-type': string;
|
|
80
84
|
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
81
85
|
'data-id': string;
|
|
@@ -13,7 +13,10 @@ type UseAnnotationUpdateSatteByEventProps = {
|
|
|
13
13
|
updateSubscriber: AnnotationUpdateEmitter | null;
|
|
14
14
|
};
|
|
15
15
|
export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
|
|
16
|
-
export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) =>
|
|
16
|
+
export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) => {
|
|
17
|
+
hasFocus: boolean;
|
|
18
|
+
isHovered: boolean;
|
|
19
|
+
};
|
|
17
20
|
type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
|
|
18
21
|
export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent' | 'isNestedRender'>) => AnnotationsWithClickTarget;
|
|
19
22
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.6.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@atlaskit/adf-schema": "^44.2.0",
|
|
26
26
|
"@atlaskit/adf-utils": "^19.13.0",
|
|
27
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
27
|
+
"@atlaskit/analytics-listeners": "^8.12.0",
|
|
28
28
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
29
29
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
30
30
|
"@atlaskit/button": "^20.3.0",
|
|
31
31
|
"@atlaskit/code": "^15.6.0",
|
|
32
|
-
"@atlaskit/editor-common": "^95.
|
|
32
|
+
"@atlaskit/editor-common": "^95.6.0",
|
|
33
33
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.6.3",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
37
37
|
"@atlaskit/emoji": "^67.11.0",
|
|
38
38
|
"@atlaskit/feature-gate-js-client": "^4.23.0",
|
|
39
|
-
"@atlaskit/icon": "^22.
|
|
40
|
-
"@atlaskit/link-datasource": "^3.
|
|
39
|
+
"@atlaskit/icon": "^22.26.0",
|
|
40
|
+
"@atlaskit/link-datasource": "^3.13.0",
|
|
41
41
|
"@atlaskit/media-card": "^78.14.0",
|
|
42
42
|
"@atlaskit/media-client": "^28.3.0",
|
|
43
43
|
"@atlaskit/media-client-react": "^2.3.0",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"@atlaskit/media-viewer": "^49.4.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
49
|
"@atlaskit/smart-card": "^30.3.0",
|
|
50
|
-
"@atlaskit/status": "^1.
|
|
50
|
+
"@atlaskit/status": "^1.8.0",
|
|
51
51
|
"@atlaskit/task-decision": "^17.11.0",
|
|
52
52
|
"@atlaskit/theme": "^14.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^2.20.0",
|
|
54
54
|
"@atlaskit/tokens": "^2.3.0",
|
|
55
55
|
"@atlaskit/tooltip": "^18.9.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"uuid": "^3.1.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@atlaskit/link-provider": "^1.
|
|
65
|
+
"@atlaskit/link-provider": "^1.17.0",
|
|
66
66
|
"@atlaskit/media-core": "^34.3.0",
|
|
67
67
|
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
68
68
|
"react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@af/visual-regression": "*",
|
|
73
73
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
74
74
|
"@atlaskit/css-reset": "^6.11.0",
|
|
75
|
-
"@atlaskit/link-provider": "^1.
|
|
75
|
+
"@atlaskit/link-provider": "^1.17.0",
|
|
76
76
|
"@atlaskit/link-test-helpers": "^7.5.0",
|
|
77
77
|
"@atlaskit/linking-common": "^6.0.0",
|
|
78
78
|
"@atlaskit/media-core": "^34.3.0",
|