@atlaskit/renderer 137.2.5 → 137.2.7
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 +19 -0
- package/dist/cjs/actions/index.js +2 -2
- package/dist/cjs/react/marks/alignment.js +2 -2
- package/dist/cjs/react/marks/annotation.js +2 -2
- package/dist/cjs/react/marks/backgroundColor.js +2 -2
- package/dist/cjs/react/marks/link.js +2 -2
- package/dist/cjs/react/marks/textColor.js +2 -2
- package/dist/cjs/react/nodes/bulletList.js +2 -2
- package/dist/cjs/react/nodes/fallback.js +2 -2
- package/dist/cjs/react/nodes/layoutColumn.js +2 -2
- package/dist/cjs/react/nodes/media/index.js +4 -4
- package/dist/cjs/react/nodes/orderedList.js +2 -2
- package/dist/cjs/react/nodes/panel-compiled.js +2 -2
- package/dist/cjs/react/nodes/panel-emotion.js +2 -2
- package/dist/cjs/react/nodes/panel.js +9 -9
- package/dist/cjs/react/nodes/tableCell.js +2 -2
- package/dist/cjs/react/utils/EditorMediaClientProvider.js +5 -5
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +3 -2
- package/dist/cjs/ui/Renderer/index.js +5 -5
- package/dist/cjs/ui/annotations/contexts/AnnotationManagerContext.js +8 -8
- package/dist/cjs/ui/annotations/element/index.js +2 -2
- package/dist/cjs/ui/annotations/element/mark.js +8 -8
- package/dist/cjs/ui/annotations/hooks/use-events.js +3 -3
- package/dist/cjs/ui/annotations/hover/mounter.js +3 -3
- package/dist/cjs/ui/annotations/index.js +2 -2
- package/dist/cjs/ui/annotations/selection/mounter.js +4 -4
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/react/marks/alignment.js +1 -1
- package/dist/es2019/react/marks/annotation.js +1 -1
- package/dist/es2019/react/marks/backgroundColor.js +1 -1
- package/dist/es2019/react/marks/link.js +2 -2
- package/dist/es2019/react/marks/textColor.js +1 -1
- package/dist/es2019/react/nodes/bulletList.js +1 -1
- package/dist/es2019/react/nodes/fallback.js +1 -1
- package/dist/es2019/react/nodes/layoutColumn.js +2 -2
- package/dist/es2019/react/nodes/media/index.js +1 -1
- package/dist/es2019/react/nodes/orderedList.js +1 -1
- package/dist/es2019/react/nodes/panel-compiled.js +1 -1
- package/dist/es2019/react/nodes/panel-emotion.js +1 -1
- package/dist/es2019/react/nodes/panel.js +3 -3
- package/dist/es2019/react/nodes/tableCell.js +1 -1
- package/dist/es2019/react/utils/EditorMediaClientProvider.js +5 -5
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +2 -1
- package/dist/es2019/ui/Renderer/index.js +5 -5
- package/dist/es2019/ui/annotations/contexts/AnnotationManagerContext.js +1 -1
- package/dist/es2019/ui/annotations/element/index.js +1 -1
- package/dist/es2019/ui/annotations/element/mark.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +1 -1
- package/dist/es2019/ui/annotations/hover/mounter.js +1 -1
- package/dist/es2019/ui/annotations/index.js +1 -1
- package/dist/es2019/ui/annotations/selection/mounter.js +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/react/marks/alignment.js +1 -1
- package/dist/esm/react/marks/annotation.js +1 -1
- package/dist/esm/react/marks/backgroundColor.js +1 -1
- package/dist/esm/react/marks/link.js +2 -2
- package/dist/esm/react/marks/textColor.js +1 -1
- package/dist/esm/react/nodes/bulletList.js +1 -1
- package/dist/esm/react/nodes/fallback.js +1 -1
- package/dist/esm/react/nodes/layoutColumn.js +2 -2
- package/dist/esm/react/nodes/media/index.js +1 -1
- package/dist/esm/react/nodes/orderedList.js +1 -1
- package/dist/esm/react/nodes/panel-compiled.js +1 -1
- package/dist/esm/react/nodes/panel-emotion.js +1 -1
- package/dist/esm/react/nodes/panel.js +3 -3
- package/dist/esm/react/nodes/tableCell.js +1 -1
- package/dist/esm/react/utils/EditorMediaClientProvider.js +5 -5
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +2 -1
- package/dist/esm/ui/Renderer/index.js +5 -5
- package/dist/esm/ui/annotations/contexts/AnnotationManagerContext.js +1 -1
- package/dist/esm/ui/annotations/element/index.js +1 -1
- package/dist/esm/ui/annotations/element/mark.js +1 -1
- package/dist/esm/ui/annotations/hooks/use-events.js +1 -1
- package/dist/esm/ui/annotations/hover/mounter.js +1 -1
- package/dist/esm/ui/annotations/index.js +1 -1
- package/dist/esm/ui/annotations/selection/mounter.js +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/react/marks/alignment.d.ts +1 -1
- package/dist/types/react/marks/backgroundColor.d.ts +1 -1
- package/dist/types/react/marks/border.d.ts +1 -1
- package/dist/types/react/marks/breakout.d.ts +1 -1
- package/dist/types/react/marks/data-consumer.d.ts +1 -1
- package/dist/types/react/marks/fontSize.d.ts +1 -1
- package/dist/types/react/marks/fragment.d.ts +1 -1
- package/dist/types/react/marks/indentation.d.ts +1 -1
- package/dist/types/react/marks/link.d.ts +1 -1
- package/dist/types/react/marks/subsup.d.ts +1 -1
- package/dist/types/react/marks/textColor.d.ts +1 -1
- package/dist/types/react/nodes/blockCard.d.ts +1 -1
- package/dist/types/react/nodes/bodiedExtension.d.ts +1 -1
- package/dist/types/react/nodes/embedCard.d.ts +1 -1
- package/dist/types/react/nodes/emoji.d.ts +1 -1
- package/dist/types/react/nodes/extension.d.ts +1 -1
- package/dist/types/react/nodes/extensionFrame.d.ts +1 -1
- package/dist/types/react/nodes/index.d.ts +2 -1
- package/dist/types/react/nodes/layoutColumn-compiled.d.ts +1 -1
- package/dist/types/react/nodes/layoutColumn-emotion.d.ts +1 -1
- package/dist/types/react/nodes/layoutColumn.d.ts +1 -1
- package/dist/types/react/nodes/media/index.d.ts +4 -1
- package/dist/types/react/nodes/mediaSingle/index.d.ts +1 -1
- package/dist/types/react/nodes/mention.d.ts +1 -1
- package/dist/types/react/nodes/multiBodiedExtension.d.ts +1 -1
- package/dist/types/react/nodes/panel-compiled.d.ts +1 -1
- package/dist/types/react/nodes/panel-emotion.d.ts +1 -1
- package/dist/types/react/nodes/panel.d.ts +1 -1
- package/dist/types/react/nodes/table/sticky.d.ts +1 -1
- package/dist/types/react/nodes/table/types.d.ts +1 -1
- package/dist/types/react/nodes/tableCell.d.ts +1 -1
- package/dist/types/react/types.d.ts +1 -1
- package/dist/types/ui/ExtensionRenderer.d.ts +1 -1
- package/dist/types/ui/MediaCard.d.ts +1 -1
- package/dist/types/ui/annotations/context.d.ts +1 -1
- package/dist/types/ui/annotations/contexts/AnnotationManagerContext.d.ts +2 -2
- package/dist/types/ui/annotations/element/index.d.ts +1 -1
- package/dist/types/ui/annotations/element/mark.d.ts +2 -2
- package/dist/types/ui/annotations/hooks/use-events.d.ts +2 -2
- package/dist/types/ui/annotations/hooks/use-inline-comments-filter.d.ts +1 -1
- package/dist/types/ui/hooks/useScrollToBlock.d.ts +1 -1
- package/dist/types/ui/renderer-props.d.ts +5 -6
- package/package.json +5 -8
|
@@ -9,7 +9,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var
|
|
12
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
13
13
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
15
|
var _messages = require("../../../messages");
|
|
@@ -23,7 +23,7 @@ var markStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
|
23
23
|
color: 'inherit',
|
|
24
24
|
backgroundColor: 'unset',
|
|
25
25
|
WebkitTapHighlightColor: 'transparent'
|
|
26
|
-
}, "&[data-mark-annotation-state='".concat(
|
|
26
|
+
}, "&[data-mark-annotation-state='".concat(_annotation.AnnotationMarkStates.ACTIVE, "']"), {
|
|
27
27
|
// was from blur in AnnotationSharedCSSByState().blur
|
|
28
28
|
background: "var(--ds-background-accent-yellow-subtlest, #FEF7C8)",
|
|
29
29
|
borderBottom: "var(--ds-border-width-selected, 2px)".concat(" solid ", "var(--ds-border-accent-yellow, #B38600)"),
|
|
@@ -36,7 +36,7 @@ var markStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
|
36
36
|
cursor: 'pointer'
|
|
37
37
|
}
|
|
38
38
|
}));
|
|
39
|
-
var markStylesLayeringFix = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(
|
|
39
|
+
var markStylesLayeringFix = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(_annotation.AnnotationMarkStates.ACTIVE, "']"), {
|
|
40
40
|
// Only apply transparency to nested marks when parent is focused
|
|
41
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
42
42
|
'&[data-has-focus="true"] mark': {
|
|
@@ -49,7 +49,7 @@ var markStylesLayeringFix = (0, _react2.css)((0, _defineProperty2.default)({}, "
|
|
|
49
49
|
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #1E1F2140, 0px 0px 1px #1E1F214f)"
|
|
50
50
|
}
|
|
51
51
|
}));
|
|
52
|
-
var markStylesWithUpdatedShadow = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(
|
|
52
|
+
var markStylesWithUpdatedShadow = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(_annotation.AnnotationMarkStates.ACTIVE, "']"), {
|
|
53
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
54
54
|
'&[data-has-focus="true"]': {
|
|
55
55
|
background: "var(--ds-background-accent-yellow-subtlest-pressed, #EFDD4E)",
|
|
@@ -57,7 +57,7 @@ var markStylesWithUpdatedShadow = (0, _react2.css)((0, _defineProperty2.default)
|
|
|
57
57
|
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #1E1F2140, 0px 0px 1px #1E1F214f)"
|
|
58
58
|
}
|
|
59
59
|
}));
|
|
60
|
-
var markStylesWithInlineComments = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(
|
|
60
|
+
var markStylesWithInlineComments = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(_annotation.AnnotationMarkStates.ACTIVE, "']"), {
|
|
61
61
|
// was from common in AnnotationSharedCSSByState().common
|
|
62
62
|
borderBottom: "var(--ds-border-width-selected, 2px)".concat(" solid transparent"),
|
|
63
63
|
cursor: 'pointer',
|
|
@@ -80,7 +80,7 @@ var markStylesWithInlineComments = (0, _react2.css)((0, _defineProperty2.default
|
|
|
80
80
|
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)"
|
|
81
81
|
}
|
|
82
82
|
}));
|
|
83
|
-
var markStylesWithCommentsPanel = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(
|
|
83
|
+
var markStylesWithCommentsPanel = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(_annotation.AnnotationMarkStates.ACTIVE, "']"), {
|
|
84
84
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
85
85
|
'&[data-is-hovered="true"]:not([data-has-focus="true"])': {
|
|
86
86
|
background: "var(--ds-background-accent-yellow-subtlest-hovered, #F5E989)",
|
|
@@ -153,7 +153,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// prevents multiple callback on overlapping annotations
|
|
156
|
-
if (event.defaultPrevented || state !==
|
|
156
|
+
if (event.defaultPrevented || state !== _annotation.AnnotationMarkStates.ACTIVE) {
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
159
|
if ((0, _fg.fg)('editor_inline_comments_on_inline_nodes')) {
|
|
@@ -208,7 +208,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
208
208
|
onKeyDown: onMarkEnter,
|
|
209
209
|
'aria-expanded': hasFocus
|
|
210
210
|
};
|
|
211
|
-
var accessibility = state !==
|
|
211
|
+
var accessibility = state !== _annotation.AnnotationMarkStates.ACTIVE ? {
|
|
212
212
|
'aria-disabled': true
|
|
213
213
|
} : _objectSpread({
|
|
214
214
|
'aria-details': annotationIds.join(', ')
|
|
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _types = require("@atlaskit/editor-common/types");
|
|
12
|
-
var
|
|
12
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
13
13
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
14
14
|
var _types2 = require("@atlaskit/analytics-listeners/types");
|
|
15
15
|
var _AnnotationManagerContext = require("../contexts/AnnotationManagerContext");
|
|
@@ -144,7 +144,7 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
|
|
|
144
144
|
return currentSelectedAnnotationId && currentSelectedMarkRef && currentSelectedMarkRef.id === currentSelectedAnnotationId ? {
|
|
145
145
|
annotations: [{
|
|
146
146
|
id: currentSelectedAnnotationId,
|
|
147
|
-
type:
|
|
147
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
148
148
|
}],
|
|
149
149
|
clickElementTarget: currentSelectedMarkRef
|
|
150
150
|
} :
|
|
@@ -167,7 +167,7 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
|
|
|
167
167
|
}).map(function (id) {
|
|
168
168
|
return {
|
|
169
169
|
id: id,
|
|
170
|
-
type:
|
|
170
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
171
171
|
};
|
|
172
172
|
});
|
|
173
173
|
if (createAnalyticsEvent) {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.Mounter = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
|
-
var
|
|
10
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
11
11
|
var _dom = require("../draft/dom");
|
|
12
12
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
13
13
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -40,7 +40,7 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
40
40
|
}
|
|
41
41
|
var annotation = {
|
|
42
42
|
annotationId: annotationId,
|
|
43
|
-
annotationType:
|
|
43
|
+
annotationType: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
44
44
|
};
|
|
45
45
|
if (createAnalyticsEvent) {
|
|
46
46
|
createAnalyticsEvent({
|
|
@@ -131,7 +131,7 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
131
131
|
}
|
|
132
132
|
var annotation = {
|
|
133
133
|
annotationId: options.annotationId,
|
|
134
|
-
annotationType:
|
|
134
|
+
annotationType: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
135
135
|
};
|
|
136
136
|
return applyAnnotation(positionToAnnotate, annotation);
|
|
137
137
|
}, [documentPosition, hoverDraftDocumentPosition, isAnnotationAllowed, createAnalyticsEvent, applyAnnotation, actions, range, promoteHoverToDraft, clearHoverDraft]);
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.AnnotationsWrapperInner = exports.AnnotationsWrapper = exports.AnnotationsPositionContext = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
10
10
|
var _view = require("./view");
|
|
11
11
|
var _wrapper = require("./wrapper");
|
|
12
12
|
var _context = require("./context");
|
|
@@ -46,7 +46,7 @@ var AnnotationsWrapperInner = exports.AnnotationsWrapperInner = function Annotat
|
|
|
46
46
|
var providers = (0, _react.useContext)(_context.ProvidersContext);
|
|
47
47
|
var updateSubscriber = providers && providers.inlineComment && providers.inlineComment.updateSubscriber;
|
|
48
48
|
var inlineCommentAnnotationsState = (0, _useEvents.useAnnotationStateByTypeEvent)({
|
|
49
|
-
type:
|
|
49
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT,
|
|
50
50
|
updateSubscriber: updateSubscriber || null
|
|
51
51
|
});
|
|
52
52
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
@@ -10,7 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
11
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
12
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
13
|
-
var
|
|
13
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
14
14
|
var _dom = require("../draft/dom");
|
|
15
15
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
16
16
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -68,7 +68,7 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
|
|
|
68
68
|
}
|
|
69
69
|
var annotation = {
|
|
70
70
|
annotationId: annotationId,
|
|
71
|
-
annotationType:
|
|
71
|
+
annotationType: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
72
72
|
};
|
|
73
73
|
if (createAnalyticsEvent) {
|
|
74
74
|
createAnalyticsEvent({
|
|
@@ -163,7 +163,7 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
|
|
|
163
163
|
}
|
|
164
164
|
var annotation = {
|
|
165
165
|
annotationId: options.annotationId,
|
|
166
|
-
annotationType:
|
|
166
|
+
annotationType: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
167
167
|
};
|
|
168
168
|
return applyAnnotation(positionToAnnotate, annotation);
|
|
169
169
|
}, [documentPosition, isAnnotationAllowed, createAnalyticsEvent, applyAnnotation, actions, range, inlineNodeTypes, promoteSelectionToDraft, clearSelectionDraft, selectionDraftDocumentPosition]);
|
|
@@ -315,7 +315,7 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
|
|
|
315
315
|
data: {
|
|
316
316
|
id: id,
|
|
317
317
|
selected: true,
|
|
318
|
-
markState:
|
|
318
|
+
markState: _annotation.AnnotationMarkStates.ACTIVE
|
|
319
319
|
}
|
|
320
320
|
});
|
|
321
321
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelectionRenderer } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
|
|
5
5
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -6,7 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
|
-
import { alignmentPositionMap } from '@atlaskit/adf-schema';
|
|
9
|
+
import { alignmentPositionMap } from '@atlaskit/adf-schema/alignment';
|
|
10
10
|
const MarkWrapper = props => {
|
|
11
11
|
const dataAlign = props['data-align'] ? alignmentPositionMap[props['data-align']] : undefined;
|
|
12
12
|
return jsx("div", _extends({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { buildAnnotationMarkDataAttributes } from '@atlaskit/adf-schema';
|
|
3
|
+
import { buildDataAttributes as buildAnnotationMarkDataAttributes } from '@atlaskit/adf-schema/annotation';
|
|
4
4
|
import { MarkElement as AnnotationMark } from '../../ui/annotations/element';
|
|
5
5
|
export const isAnnotationMark = mark => {
|
|
6
6
|
return mark && mark.type && mark.type.name === 'annotation';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import { getDarkModeLCHColor } from '@atlaskit/adf-schema';
|
|
3
|
+
import { getDarkModeLCHColor } from '@atlaskit/adf-schema/get-dark-mode-lch-color';
|
|
4
4
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
5
5
|
import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
|
|
6
6
|
export default function BackgroundColor(props) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
4
5
|
import { getEventHandler } from '../../utils';
|
|
5
6
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
6
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
8
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
9
9
|
import { LinkUrlCompiled } from './link-compiled';
|
|
10
10
|
import { LinkUrlEmotion } from './link-emotion';
|
|
11
|
-
const LinkUrlMigration = componentWithCondition(() =>
|
|
11
|
+
const LinkUrlMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), LinkUrlCompiled, LinkUrlEmotion);
|
|
12
12
|
/**
|
|
13
13
|
* Render an ADF link mark in renderer.
|
|
14
14
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import { getDarkModeLCHColor } from '@atlaskit/adf-schema';
|
|
3
|
+
import { getDarkModeLCHColor } from '@atlaskit/adf-schema/get-dark-mode-lch-color';
|
|
4
4
|
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
5
5
|
import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
|
|
6
6
|
export default function TextColor(props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { bulletListSelector } from '@atlaskit/adf-schema';
|
|
2
|
+
import { bulletListSelector } from '@atlaskit/adf-schema/bullet-list';
|
|
3
3
|
import { getListIndentLevel } from '../utils/lists';
|
|
4
4
|
export default function BulletList(props) {
|
|
5
5
|
return /*#__PURE__*/React.createElement("ul", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
2
|
+
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
3
3
|
import Link from '@atlaskit/link/link';
|
|
4
4
|
import { LazyLoadedDatasourceRenderFailedAnalyticsWrapper } from '@atlaskit/link-datasource';
|
|
5
5
|
import React from 'react';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
3
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
4
|
import { LayoutSectionCompiled } from './layoutColumn-compiled';
|
|
5
5
|
import { LayoutSectionEmotion } from './layoutColumn-emotion';
|
|
6
|
-
const LayoutSectionMigration = componentWithCondition(() =>
|
|
6
|
+
const LayoutSectionMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), LayoutSectionCompiled, LayoutSectionEmotion);
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Render a layout column in renderer.
|
|
@@ -14,7 +14,7 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
|
14
14
|
import { MediaBorderGapFiller } from '@atlaskit/editor-common/ui';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
16
|
import { MediaCard } from '../../../ui/MediaCard';
|
|
17
|
-
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
17
|
+
import { AnnotationMarkStates } from '@atlaskit/adf-schema/annotation';
|
|
18
18
|
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
19
19
|
import { getEventHandler } from '../../../utils';
|
|
20
20
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { orderedListSelector } from '@atlaskit/adf-schema';
|
|
3
|
+
import { orderedListSelector } from '@atlaskit/adf-schema/ordered-list';
|
|
4
4
|
import { getOrderedListInlineStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { getItemCounterDigitsSize, resolveOrder } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { getListIndentLevel } from '../utils/lists';
|
|
@@ -9,7 +9,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
9
9
|
* Cleanup: delete this file once the experiment has shipped.
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import { PanelType } from '@atlaskit/adf-schema';
|
|
12
|
+
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
13
13
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
14
14
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -13,7 +13,7 @@ import React from 'react';
|
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration; `jsx` is used as the JSX pragma (see @jsx jsx above) so must be a value import
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
|
-
import { PanelType } from '@atlaskit/adf-schema';
|
|
16
|
+
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
17
17
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
18
18
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PanelType } from '@atlaskit/adf-schema';
|
|
2
|
+
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
3
3
|
import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, PanelErrorIcon } from '@atlaskit/editor-common/icons';
|
|
4
4
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
5
5
|
import EmojiIcon from '@atlaskit/icon/core/emoji';
|
|
6
6
|
import TipIcon from '@atlaskit/icon/core/lightbulb';
|
|
7
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
8
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import EmojiItem from './emoji';
|
|
10
10
|
import { PanelStyledCompiled } from './panel-compiled';
|
|
11
11
|
import { PanelStyledEmotion } from './panel-emotion';
|
|
@@ -18,7 +18,7 @@ const panelIcons = {
|
|
|
18
18
|
error: PanelErrorIcon,
|
|
19
19
|
custom: EmojiIcon
|
|
20
20
|
};
|
|
21
|
-
const PanelStyledMigration = componentWithCondition(() =>
|
|
21
|
+
const PanelStyledMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), PanelStyledCompiled, PanelStyledEmotion);
|
|
22
22
|
const Panel = props => {
|
|
23
23
|
const {
|
|
24
24
|
allowCustomPanels,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { tableBackgroundColorNameByHex } from '@atlaskit/adf-schema/tableNodes';
|
|
4
|
-
import { getDarkModeLCHColor } from '@atlaskit/adf-schema/lch-color
|
|
4
|
+
import { getDarkModeLCHColor } from '@atlaskit/adf-schema/get-dark-mode-lch-color';
|
|
5
5
|
import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
|
|
6
6
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
7
7
|
import { hexToEditorBackgroundPaletteRawValue } from '@atlaskit/editor-palette';
|
|
@@ -2,8 +2,8 @@ import React, { useContext, useEffect, useLayoutEffect, useMemo, useState } from
|
|
|
2
2
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
3
3
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
4
4
|
import { useProviderFactory, useProviderLayout } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
const getMediaClientConfigForRenderer = provider => {
|
|
8
8
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
9
9
|
return provider.viewAndUploadMediaClientConfig && fg('platform_media_video_captions') ? provider.viewAndUploadMediaClientConfig : provider.viewMediaClientConfig;
|
|
@@ -12,7 +12,7 @@ export const EditorMediaClientProvider = ({
|
|
|
12
12
|
children,
|
|
13
13
|
ssr
|
|
14
14
|
}) => {
|
|
15
|
-
const [mediaClientConfig, setMediaClientConfig] = useState(() =>
|
|
15
|
+
const [mediaClientConfig, setMediaClientConfig] = useState(() => isExperimentEnabled('platform_editor_media_reliability_enhancements') ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined);
|
|
16
16
|
const providerFactory = useProviderFactory();
|
|
17
17
|
const mediaProvider = useProviderLayout('mediaProvider');
|
|
18
18
|
|
|
@@ -30,7 +30,7 @@ export const EditorMediaClientProvider = ({
|
|
|
30
30
|
*
|
|
31
31
|
* hasProvider() is synchronous and correct from render 1, closing that window.
|
|
32
32
|
*/
|
|
33
|
-
const shouldSkipContext =
|
|
33
|
+
const shouldSkipContext = isExperimentEnabled('platform_editor_media_reliability_enhancements') ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
|
|
34
34
|
const contextMediaClient = useContext(MediaClientContext);
|
|
35
35
|
|
|
36
36
|
// MediaClientProvider currently requires a mediaClientConfig
|
|
@@ -54,7 +54,7 @@ export const EditorMediaClientProvider = ({
|
|
|
54
54
|
// The two hooks below are mutually exclusive — only one runs per render — so there is no
|
|
55
55
|
// actual chaining of state updates at runtime. The lint rule cannot statically prove this.
|
|
56
56
|
useEffect(() => {
|
|
57
|
-
if (!
|
|
57
|
+
if (!isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
if (ssr !== null && ssr !== void 0 && ssr.config) {
|
|
@@ -80,7 +80,7 @@ export const EditorMediaClientProvider = ({
|
|
|
80
80
|
// Legacy path (experiment off): keep useLayoutEffect to preserve existing behaviour.
|
|
81
81
|
// remove this when clean up platform_editor_media_reliability_enhancements
|
|
82
82
|
useLayoutEffect(() => {
|
|
83
|
-
if (
|
|
83
|
+
if (isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
if (ssr !== null && ssr !== void 0 && ssr.config) {
|
|
@@ -16,7 +16,8 @@ import { akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSma
|
|
|
16
16
|
import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
|
|
17
17
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
18
18
|
import { CodeBlockSharedCssClassName, DateSharedCssClassName, listItemCounterPadding, richMediaClassName, SmartCardSharedCssClassName, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginTop, TableSharedCssClassName, TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
19
|
-
import { bulletListSelector
|
|
19
|
+
import { bulletListSelector } from '@atlaskit/adf-schema/bullet-list';
|
|
20
|
+
import { orderedListSelector } from '@atlaskit/adf-schema/ordered-list';
|
|
20
21
|
import { shadowClassNames, shadowObserverClassNames } from '@atlaskit/editor-common/ui';
|
|
21
22
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
22
23
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -60,7 +60,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
61
61
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
62
62
|
const packageName = "@atlaskit/renderer";
|
|
63
|
-
const packageVersion = "137.2.
|
|
63
|
+
const packageVersion = "137.2.6";
|
|
64
64
|
const setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
|
@@ -341,13 +341,13 @@ export const RendererFunctionalComponent = props => {
|
|
|
341
341
|
let heightWidthAnalyticsRicID;
|
|
342
342
|
let heightWidthAnalyticsRafID;
|
|
343
343
|
const handleAnalytics = () => {
|
|
344
|
-
if (
|
|
344
|
+
if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
|
|
345
345
|
fireAnalyticsEvent({
|
|
346
346
|
action: ACTION.STARTED,
|
|
347
347
|
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
348
348
|
attributes: {
|
|
349
349
|
platform: PLATFORM.WEB,
|
|
350
|
-
sampleRate:
|
|
350
|
+
sampleRate: RENDER_EVENT_SAMPLE_RATE
|
|
351
351
|
},
|
|
352
352
|
eventType: EVENT_TYPE.UI
|
|
353
353
|
});
|
|
@@ -389,11 +389,11 @@ export const RendererFunctionalComponent = props => {
|
|
|
389
389
|
nodes,
|
|
390
390
|
nestedRendererType,
|
|
391
391
|
severity,
|
|
392
|
-
sampleRate:
|
|
392
|
+
sampleRate: RENDER_EVENT_SAMPLE_RATE
|
|
393
393
|
},
|
|
394
394
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
395
395
|
};
|
|
396
|
-
if (
|
|
396
|
+
if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
|
|
397
397
|
fireAnalyticsEvent(event);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useMemo, useReducer, useRef } from 'react';
|
|
2
|
-
import { AnnotationMarkStates, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationMarkStates, AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { RendererContext } from '../../../ui/RendererActionsContext';
|
|
5
5
|
const initState = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo, useCallback, useContext } from 'react';
|
|
2
|
-
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationMarkStates } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { MarkComponent } from './mark';
|
|
5
5
|
import { useInlineCommentsFilter } from '../hooks/use-inline-comments-filter';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { useMemo, useCallback } from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
9
|
+
import { AnnotationMarkStates } from '@atlaskit/adf-schema/annotation';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { useIntl } from 'react-intl';
|
|
12
12
|
import { inlineCommentMessages } from '../../../messages';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLayoutEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
6
6
|
import { useAnnotationManagerDispatch, useAnnotationManagerState } from '../contexts/AnnotationManagerContext';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useContext } from 'react';
|
|
2
2
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
4
4
|
import { updateWindowSelectionAroundDraft } from '../draft/dom';
|
|
5
5
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import { AnnotationView } from './view';
|
|
4
4
|
import { AnnotationsContextWrapper } from './wrapper';
|
|
5
5
|
import { ProvidersContext, InlineCommentsStateContext } from './context';
|
|
@@ -4,7 +4,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
6
|
import uuid from 'uuid/v4';
|
|
7
|
-
import { AnnotationTypes, AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
7
|
+
import { AnnotationTypes, AnnotationMarkStates } from '@atlaskit/adf-schema/annotation';
|
|
8
8
|
import { updateWindowSelectionAroundDraft } from '../draft/dom';
|
|
9
9
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
10
10
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
5
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
6
6
|
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelectionRenderer } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
|
|
8
8
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -6,7 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
|
-
import { alignmentPositionMap } from '@atlaskit/adf-schema';
|
|
9
|
+
import { alignmentPositionMap } from '@atlaskit/adf-schema/alignment';
|
|
10
10
|
var MarkWrapper = function MarkWrapper(props) {
|
|
11
11
|
var dataAlign = props['data-align'] ? alignmentPositionMap[props['data-align']] : undefined;
|
|
12
12
|
return jsx("div", _extends({
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
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) { _defineProperty(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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { buildAnnotationMarkDataAttributes } from '@atlaskit/adf-schema';
|
|
6
|
+
import { buildDataAttributes as buildAnnotationMarkDataAttributes } from '@atlaskit/adf-schema/annotation';
|
|
7
7
|
import { MarkElement as AnnotationMark } from '../../ui/annotations/element';
|
|
8
8
|
export var isAnnotationMark = function isAnnotationMark(mark) {
|
|
9
9
|
return mark && mark.type && mark.type.name === 'annotation';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
|
-
import { getDarkModeLCHColor } from '@atlaskit/adf-schema';
|
|
4
|
+
import { getDarkModeLCHColor } from '@atlaskit/adf-schema/get-dark-mode-lch-color';
|
|
5
5
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
6
6
|
import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
|
|
7
7
|
export default function BackgroundColor(props) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
4
5
|
import { getEventHandler } from '../../utils';
|
|
5
6
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
6
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
8
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
9
9
|
import { LinkUrlCompiled } from './link-compiled';
|
|
10
10
|
import { LinkUrlEmotion } from './link-emotion';
|
|
11
11
|
var LinkUrlMigration = componentWithCondition(function () {
|
|
12
|
-
return
|
|
12
|
+
return isExperimentEnabled('platform_editor_renderer_static_css');
|
|
13
13
|
}, LinkUrlCompiled, LinkUrlEmotion);
|
|
14
14
|
/**
|
|
15
15
|
* Render an ADF link mark in renderer.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
|
-
import { getDarkModeLCHColor } from '@atlaskit/adf-schema';
|
|
4
|
+
import { getDarkModeLCHColor } from '@atlaskit/adf-schema/get-dark-mode-lch-color';
|
|
5
5
|
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
6
6
|
import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
|
|
7
7
|
export default function TextColor(props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { bulletListSelector } from '@atlaskit/adf-schema';
|
|
2
|
+
import { bulletListSelector } from '@atlaskit/adf-schema/bullet-list';
|
|
3
3
|
import { getListIndentLevel } from '../utils/lists';
|
|
4
4
|
export default function BulletList(props) {
|
|
5
5
|
return /*#__PURE__*/React.createElement("ul", {
|
|
@@ -8,7 +8,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
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) { _defineProperty(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; }
|
|
9
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
11
|
+
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
12
12
|
import Link from '@atlaskit/link/link';
|
|
13
13
|
import { LazyLoadedDatasourceRenderFailedAnalyticsWrapper } from '@atlaskit/link-datasource';
|
|
14
14
|
import React from 'react';
|