@atlaskit/editor-common 120.11.0 → 120.11.2
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 +28 -0
- package/dist/cjs/analytics/utils.js +2 -2
- package/dist/cjs/card/addLinkMetadata.js +2 -2
- package/dist/cjs/card/getLinkMetadataFromTransaction.js +2 -2
- package/dist/cjs/code-block/index.js +2 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/cjs/media-inline/media-inline-image-card.js +2 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/paste/md-plugins/linkify-md-plugin.js +2 -2
- package/dist/cjs/resizer/BreakoutResizer.js +6 -6
- package/dist/cjs/styles/shared/TableSharedCssClassName.js +21 -21
- package/dist/cjs/styles/shared/mapBackgroundColors.js +2 -2
- package/dist/cjs/styles/shared/panel.js +6 -6
- package/dist/cjs/transforms/extension.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +2 -2
- package/dist/cjs/ui/TableSelector/index.js +3 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/borderColorPalette.js +2 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +3 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -2
- package/dist/cjs/ui-color/ColorPalette/utils.js +5 -4
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +2 -2
- package/dist/cjs/utils/LinkMatcher.js +2 -2
- package/dist/cjs/utils/annotation/index.js +2 -2
- package/dist/cjs/utils/hyperlink.js +2 -2
- package/dist/cjs/utils/normalizeUrl.js +4 -3
- package/dist/cjs/utils/validator.js +19 -16
- package/dist/cjs/vanilla-tooltip/index.js +96 -25
- package/dist/es2019/analytics/utils.js +1 -1
- package/dist/es2019/card/addLinkMetadata.js +1 -1
- package/dist/es2019/card/getLinkMetadataFromTransaction.js +1 -1
- package/dist/es2019/code-block/index.js +1 -1
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/es2019/media-inline/media-inline-image-card.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/paste/md-plugins/linkify-md-plugin.js +1 -1
- package/dist/es2019/resizer/BreakoutResizer.js +1 -1
- package/dist/es2019/styles/shared/TableSharedCssClassName.js +1 -1
- package/dist/es2019/styles/shared/mapBackgroundColors.js +1 -1
- package/dist/es2019/styles/shared/panel.js +1 -1
- package/dist/es2019/transforms/extension.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/borderColorPalette.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/highlightColorPalette.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/utils.js +3 -2
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/es2019/utils/LinkMatcher.js +1 -1
- package/dist/es2019/utils/annotation/index.js +1 -1
- package/dist/es2019/utils/hyperlink.js +1 -1
- package/dist/es2019/utils/normalizeUrl.js +2 -1
- package/dist/es2019/utils/validator.js +4 -1
- package/dist/es2019/vanilla-tooltip/index.js +96 -27
- package/dist/esm/analytics/utils.js +1 -1
- package/dist/esm/card/addLinkMetadata.js +1 -1
- package/dist/esm/card/getLinkMetadataFromTransaction.js +1 -1
- package/dist/esm/code-block/index.js +1 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/esm/media-inline/media-inline-image-card.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/paste/md-plugins/linkify-md-plugin.js +1 -1
- package/dist/esm/resizer/BreakoutResizer.js +1 -1
- package/dist/esm/styles/shared/TableSharedCssClassName.js +1 -1
- package/dist/esm/styles/shared/mapBackgroundColors.js +1 -1
- package/dist/esm/styles/shared/panel.js +1 -1
- package/dist/esm/transforms/extension.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Mention/mention-with-profilecard.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/borderColorPalette.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/highlightColorPalette.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/esm/ui-color/ColorPalette/utils.js +3 -2
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/esm/utils/LinkMatcher.js +1 -1
- package/dist/esm/utils/annotation/index.js +1 -1
- package/dist/esm/utils/hyperlink.js +1 -1
- package/dist/esm/utils/normalizeUrl.js +2 -1
- package/dist/esm/utils/validator.js +4 -1
- package/dist/esm/vanilla-tooltip/index.js +96 -25
- package/dist/types/analytics/types/extension-events.d.ts +1 -1
- package/dist/types/analytics/types/general-events.d.ts +1 -1
- package/dist/types/analytics/types/insert-events.d.ts +2 -1
- package/dist/types/analytics/types/media-events.d.ts +1 -1
- package/dist/types/analytics/types/node-events.d.ts +1 -1
- package/dist/types/analytics/types/table-events.d.ts +1 -1
- package/dist/types/annotation/index.d.ts +1 -1
- package/dist/types/annotation/manager.d.ts +1 -1
- package/dist/types/block-menu/scroll-to-block-utils.d.ts +1 -1
- package/dist/types/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
- package/dist/types/card/addLinkMetadata.d.ts +1 -1
- package/dist/types/card/getLinkMetadataFromTransaction.d.ts +1 -1
- package/dist/types/card/utils.d.ts +1 -1
- package/dist/types/code-block/index.d.ts +1 -1
- package/dist/types/collab/index.d.ts +2 -1
- package/dist/types/guideline/getGuidelineSnaps.d.ts +1 -1
- package/dist/types/media-single/ExternalImageBadge.d.ts +1 -1
- package/dist/types/media-single/constants.d.ts +1 -1
- package/dist/types/media-single/utils.d.ts +1 -1
- package/dist/types/provider-factory/macro-provider.d.ts +1 -1
- package/dist/types/provider-factory/profile-card-provider.d.ts +2 -1
- package/dist/types/styles/shared/calcTableWidth.d.ts +1 -1
- package/dist/types/styles/shared/panel.d.ts +1 -1
- package/dist/types/types/annotation/emitter.d.ts +1 -1
- package/dist/types/types/annotation/index.d.ts +1 -1
- package/dist/types/ui/MediaSingle/calcResizedWidth.d.ts +1 -1
- package/dist/types/ui/MediaSingle/grid.d.ts +1 -1
- package/dist/types/ui/MediaSingle/index.d.ts +1 -1
- package/dist/types/ui/MediaSingle/styled.d.ts +1 -1
- package/dist/types/ui/MediaSingle/wrappedLayouts.d.ts +1 -1
- package/dist/types/ui/Mention/index.d.ts +1 -1
- package/dist/types/ui/Mention/mention-with-profilecard.d.ts +1 -1
- package/dist/types/ui/Mention/mention-with-providers.d.ts +1 -1
- package/dist/types/ui/ResizerLegacy/index.d.ts +1 -1
- package/dist/types/ui/ResizerLegacy/types.d.ts +1 -1
- package/dist/types/utils/breakout.d.ts +1 -1
- package/dist/types/utils/compareNodes.d.ts +1 -1
- package/dist/types/utils/create-adf-from-html.d.ts +1 -1
- package/dist/types/utils/grid.d.ts +1 -1
- package/dist/types/utils/nonWrappedLayouts.d.ts +1 -1
- package/dist/types/utils/parse-html-text-content.d.ts +1 -1
- package/dist/types/utils/referentiality.d.ts +1 -1
- package/dist/types/utils/rich-media-utils.d.ts +1 -1
- package/dist/types/utils/should-auto-linkify-tld.d.ts +1 -1
- package/dist/types/utils/shouldAddDefaultWrappedWidth.d.ts +1 -1
- package/dist/types/vanilla-tooltip/index.d.ts +9 -0
- package/package.json +2 -5
|
@@ -31,7 +31,10 @@ Object.defineProperty(exports, "markOrder", {
|
|
|
31
31
|
});
|
|
32
32
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
33
33
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
34
|
-
var
|
|
34
|
+
var _inlineNodes = require("@atlaskit/adf-schema/inline-nodes");
|
|
35
|
+
var _isSafeUrl = require("@atlaskit/adf-schema/is-safe-url");
|
|
36
|
+
var _panel = require("@atlaskit/adf-schema/panel");
|
|
37
|
+
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
35
38
|
var _schemaDefault = require("@atlaskit/adf-schema/schema-default");
|
|
36
39
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
37
40
|
var _isSubSupType = require("./isSubSupType");
|
|
@@ -85,7 +88,7 @@ var getValidDocument = exports.getValidDocument = function getValidDocument(doc)
|
|
|
85
88
|
var wrapInlineNodes = function wrapInlineNodes() {
|
|
86
89
|
var nodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
87
90
|
return nodes.map(function (node) {
|
|
88
|
-
return
|
|
91
|
+
return _inlineNodes.inlineNodes.has(node.type) ? {
|
|
89
92
|
type: 'paragraph',
|
|
90
93
|
content: [node]
|
|
91
94
|
} : node;
|
|
@@ -163,7 +166,7 @@ var getValidUnknownNode = exports.getValidUnknownNode = function getValidUnknown
|
|
|
163
166
|
text: text || attrs.text || "[".concat(type, "]")
|
|
164
167
|
};
|
|
165
168
|
var textUrl = attrs.textUrl;
|
|
166
|
-
if (textUrl && (0,
|
|
169
|
+
if (textUrl && (0, _isSafeUrl.isSafeUrl)(textUrl)) {
|
|
167
170
|
unknownInlineNode.marks = [{
|
|
168
171
|
type: 'link',
|
|
169
172
|
attrs: {
|
|
@@ -320,7 +323,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
320
323
|
}
|
|
321
324
|
case 'inlineCard':
|
|
322
325
|
{
|
|
323
|
-
if (attrs && (attrs.datasource && !attrs.url || attrs.url && (0,
|
|
326
|
+
if (attrs && (attrs.datasource && !attrs.url || attrs.url && (0, _isSafeUrl.isSafeUrl)(attrs.url) || attrs.data && attrs.data.url && (0, _isSafeUrl.isSafeUrl)(attrs.data.url))) {
|
|
324
327
|
return _objectSpread({
|
|
325
328
|
type: type,
|
|
326
329
|
attrs: attrs
|
|
@@ -332,7 +335,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
332
335
|
}
|
|
333
336
|
case 'blockCard':
|
|
334
337
|
{
|
|
335
|
-
if (attrs && (attrs.datasource && !attrs.url || attrs.url && (0,
|
|
338
|
+
if (attrs && (attrs.datasource && !attrs.url || attrs.url && (0, _isSafeUrl.isSafeUrl)(attrs.url) || attrs.data && attrs.data.url && (0, _isSafeUrl.isSafeUrl)(attrs.data.url))) {
|
|
336
339
|
return {
|
|
337
340
|
type: type,
|
|
338
341
|
attrs: attrs
|
|
@@ -342,7 +345,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
342
345
|
}
|
|
343
346
|
case 'embedCard':
|
|
344
347
|
{
|
|
345
|
-
if (attrs && (attrs.url && (0,
|
|
348
|
+
if (attrs && (attrs.url && (0, _isSafeUrl.isSafeUrl)(attrs.url) || attrs.data && attrs.data.url && (0, _isSafeUrl.isSafeUrl)(attrs.data.url)) && attrs.layout) {
|
|
346
349
|
return {
|
|
347
350
|
type: type,
|
|
348
351
|
attrs: attrs
|
|
@@ -681,7 +684,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
681
684
|
{
|
|
682
685
|
if (attrs && content) {
|
|
683
686
|
var panelType = attrs.panelType;
|
|
684
|
-
if (Object.values(
|
|
687
|
+
if (Object.values(_panel.PanelType).includes(panelType)) {
|
|
685
688
|
return {
|
|
686
689
|
type: type,
|
|
687
690
|
attrs: attrs,
|
|
@@ -721,7 +724,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
721
724
|
type: type,
|
|
722
725
|
content: content,
|
|
723
726
|
attrs: {
|
|
724
|
-
localId: attrs && attrs.localId || (0,
|
|
727
|
+
localId: attrs && attrs.localId || (0, _uuid.generateUuid)()
|
|
725
728
|
}
|
|
726
729
|
};
|
|
727
730
|
}
|
|
@@ -731,7 +734,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
731
734
|
type: type,
|
|
732
735
|
content: content,
|
|
733
736
|
attrs: {
|
|
734
|
-
localId: attrs && attrs.localId || (0,
|
|
737
|
+
localId: attrs && attrs.localId || (0, _uuid.generateUuid)(),
|
|
735
738
|
state: attrs && attrs.state || 'DECIDED'
|
|
736
739
|
}
|
|
737
740
|
};
|
|
@@ -742,7 +745,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
742
745
|
type: type,
|
|
743
746
|
content: content,
|
|
744
747
|
attrs: {
|
|
745
|
-
localId: attrs && attrs.localId || (0,
|
|
748
|
+
localId: attrs && attrs.localId || (0, _uuid.generateUuid)()
|
|
746
749
|
}
|
|
747
750
|
};
|
|
748
751
|
}
|
|
@@ -752,7 +755,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
752
755
|
type: type,
|
|
753
756
|
content: content,
|
|
754
757
|
attrs: {
|
|
755
|
-
localId: attrs && attrs.localId || (0,
|
|
758
|
+
localId: attrs && attrs.localId || (0, _uuid.generateUuid)(),
|
|
756
759
|
state: attrs && attrs.state || 'TODO'
|
|
757
760
|
}
|
|
758
761
|
};
|
|
@@ -763,7 +766,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
763
766
|
type: type,
|
|
764
767
|
content: content,
|
|
765
768
|
attrs: {
|
|
766
|
-
localId: attrs && attrs.localId || (0,
|
|
769
|
+
localId: attrs && attrs.localId || (0, _uuid.generateUuid)(),
|
|
767
770
|
state: attrs && attrs.state || 'TODO'
|
|
768
771
|
}
|
|
769
772
|
};
|
|
@@ -778,7 +781,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
778
781
|
type: type,
|
|
779
782
|
content: content,
|
|
780
783
|
attrs: _objectSpread(_objectSpread({}, attrs), {}, {
|
|
781
|
-
localId: (attrs === null || attrs === void 0 ? void 0 : attrs.localId) || (0,
|
|
784
|
+
localId: (attrs === null || attrs === void 0 ? void 0 : attrs.localId) || (0, _uuid.generateUuid)(),
|
|
782
785
|
width: (attrs === null || attrs === void 0 ? void 0 : attrs.width) || null
|
|
783
786
|
})
|
|
784
787
|
};
|
|
@@ -867,7 +870,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
867
870
|
type: type,
|
|
868
871
|
attrs: {
|
|
869
872
|
resourceId: attrs.resourceId,
|
|
870
|
-
localId: attrs.localId || (0,
|
|
873
|
+
localId: attrs.localId || (0, _uuid.generateUuid)()
|
|
871
874
|
},
|
|
872
875
|
marks: marks
|
|
873
876
|
};
|
|
@@ -881,7 +884,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
881
884
|
type: type,
|
|
882
885
|
attrs: {
|
|
883
886
|
resourceId: attrs.resourceId,
|
|
884
|
-
localId: attrs.localId || (0,
|
|
887
|
+
localId: attrs.localId || (0, _uuid.generateUuid)()
|
|
885
888
|
},
|
|
886
889
|
marks: marks,
|
|
887
890
|
content: content
|
|
@@ -940,7 +943,7 @@ var getValidMark = exports.getValidMark = function getValidMark(mark) {
|
|
|
940
943
|
if (__confluenceMetadata) {
|
|
941
944
|
linkAttrs.__confluenceMetadata = __confluenceMetadata;
|
|
942
945
|
}
|
|
943
|
-
if (linkHref && (0,
|
|
946
|
+
if (linkHref && (0, _isSafeUrl.isSafeUrl)(linkHref)) {
|
|
944
947
|
return {
|
|
945
948
|
type: type,
|
|
946
949
|
attrs: linkAttrs
|
|
@@ -164,14 +164,37 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
164
164
|
}));
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
// Hide the tooltip if the hide transition has completed
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
// Hide the tooltip if the hide transition has completed.
|
|
168
|
+
//
|
|
169
|
+
// Only reachable in the control arm: no consumer declares a transition on the tooltip, so
|
|
170
|
+
// this never fires today, and the experiment closes the popover in `hide()` regardless.
|
|
171
|
+
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
172
|
+
this.tooltip.ontransitionend = function () {
|
|
173
|
+
if (_this.shouldHidePopover) {
|
|
174
|
+
_this.tooltip.hidePopover();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
173
178
|
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Closes the popover, tolerating it already being closed.
|
|
182
|
+
*
|
|
183
|
+
* `hidePopover()` throws `InvalidStateError` when the popover is not showing, and that is a
|
|
184
|
+
* routine state rather than an exceptional one: showing any other `hint` or `auto` popover
|
|
185
|
+
* light-dismisses this one without notifying us, so the caller cannot know whether it is
|
|
186
|
+
* still open.
|
|
187
|
+
*/
|
|
174
188
|
return (0, _createClass2.default)(VanillaTooltip, [{
|
|
189
|
+
key: "closePopover",
|
|
190
|
+
value: function closePopover() {
|
|
191
|
+
try {
|
|
192
|
+
this.tooltip.hidePopover();
|
|
193
|
+
} catch (_error) {
|
|
194
|
+
// Already closed — nothing to do.
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
175
198
|
key: "createPopperInstance",
|
|
176
199
|
value: function createPopperInstance() {
|
|
177
200
|
this.popperInstance = getCreatePopper()(this.trigger, this.tooltip, {
|
|
@@ -192,6 +215,18 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
192
215
|
this.listeners.forEach(function (listener) {
|
|
193
216
|
listener();
|
|
194
217
|
});
|
|
218
|
+
|
|
219
|
+
// Undoes what the constructor added to the trigger, matching the React `@atlaskit/tooltip`
|
|
220
|
+
// callers are moving off, whose unmount took its DOM with it.
|
|
221
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
222
|
+
this.tooltip.remove();
|
|
223
|
+
if (this.trigger.getAttribute('aria-describedby') === this.tooltip.id) {
|
|
224
|
+
this.trigger.removeAttribute('aria-describedby');
|
|
225
|
+
}
|
|
226
|
+
if (this.trigger.getAttribute('popovertarget') === this.tooltip.id) {
|
|
227
|
+
this.trigger.removeAttribute('popovertarget');
|
|
228
|
+
}
|
|
229
|
+
}
|
|
195
230
|
}
|
|
196
231
|
|
|
197
232
|
/**
|
|
@@ -243,20 +278,48 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
243
278
|
this.shouldHidePopover = true;
|
|
244
279
|
// Disable the event listeners
|
|
245
280
|
this.currentTimeoutId = setTimeout(function () {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
281
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
282
|
+
var _this3$popperInstance;
|
|
283
|
+
// Released rather than reconfigured. The instance was previously kept for the
|
|
284
|
+
// trigger's whole lifetime, so every element the pointer passed over retained
|
|
285
|
+
// one — and under `platform-dst-popper-consolidation` an instance owns a
|
|
286
|
+
// detached React root, so that was a retained root per hovered trigger.
|
|
287
|
+
//
|
|
288
|
+
// Destroying is also the only way to release that root's capture-phase
|
|
289
|
+
// `scroll`/`resize` listeners on the consolidated path, where the
|
|
290
|
+
// `eventListeners: false` reconfiguration in the control arm is accepted but
|
|
291
|
+
// does nothing.
|
|
292
|
+
(_this3$popperInstance = _this3.popperInstance) === null || _this3$popperInstance === void 0 || _this3$popperInstance.destroy();
|
|
293
|
+
_this3.popperInstance = undefined;
|
|
294
|
+
_this3.tooltip.style.opacity = '0';
|
|
295
|
+
_this3.isDisplayed = false;
|
|
296
|
+
|
|
297
|
+
// Closed here rather than from `ontransitionend`. No consumer declares a
|
|
298
|
+
// transition on the tooltip and none sets one inline, so that event never
|
|
299
|
+
// fires and the popover stayed open in the top layer for good: an invisible
|
|
300
|
+
// hit target over the content, and — because `showPopover()` throws
|
|
301
|
+
// `InvalidStateError` on an already-showing popover — an uncaught error out of
|
|
302
|
+
// the next `mouseenter`, after which the tooltip never appeared again.
|
|
303
|
+
_this3.closePopover();
|
|
304
|
+
// Paired with the `visibility` that `show()` sets, so a popover left open by
|
|
305
|
+
// a failed close cannot intercept pointer events over the content.
|
|
306
|
+
_this3.tooltip.style.visibility = 'hidden';
|
|
307
|
+
} else {
|
|
308
|
+
var _this3$popperInstance2;
|
|
309
|
+
(_this3$popperInstance2 = _this3.popperInstance) === null || _this3$popperInstance2 === void 0 || _this3$popperInstance2.setOptions(function (options) {
|
|
310
|
+
return _objectSpread(_objectSpread({}, options), {}, {
|
|
311
|
+
modifiers: [startingOffset, {
|
|
312
|
+
name: 'eventListeners',
|
|
313
|
+
enabled: false
|
|
314
|
+
}]
|
|
315
|
+
});
|
|
253
316
|
});
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
317
|
+
_this3.tooltip.style.opacity = '0';
|
|
318
|
+
_this3.isDisplayed = false;
|
|
319
|
+
// If transition animations are disabled immediately hide the popover
|
|
320
|
+
if (_this3.tooltip.style.transition === 'none') {
|
|
321
|
+
_this3.tooltip.hidePopover();
|
|
322
|
+
}
|
|
260
323
|
}
|
|
261
324
|
}, immediate ? 0 : this.timeout);
|
|
262
325
|
}
|
|
@@ -264,18 +327,26 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
264
327
|
key: "show",
|
|
265
328
|
value: function show() {
|
|
266
329
|
var _this4 = this;
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
//
|
|
270
|
-
//
|
|
330
|
+
// Ahead of the `isDisplayed` guard, unlike the equivalent below: `hide()` takes effect
|
|
331
|
+
// synchronously but leaves the tooltip on screen until its timeout, so a pointer
|
|
332
|
+
// returning in that window finds `isDisplayed` still true and returns early. Cancelling
|
|
333
|
+
// first keeps the tooltip up and stops it being left undismissable with a hide pending.
|
|
271
334
|
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
272
335
|
this.bindEscapeListener();
|
|
336
|
+
clearTimeout(this.currentTimeoutId);
|
|
337
|
+
this.shouldHidePopover = false;
|
|
273
338
|
}
|
|
274
339
|
if (this.isDisplayed) {
|
|
275
340
|
return;
|
|
276
341
|
}
|
|
277
|
-
|
|
278
|
-
|
|
342
|
+
|
|
343
|
+
// Control only: the experiment cancels above, ahead of the guard. Kept gated rather than
|
|
344
|
+
// left unconditional — despite being a no-op once the block above has run — so that
|
|
345
|
+
// experiment cleanup can delete it outright instead of having to reason about it.
|
|
346
|
+
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
347
|
+
clearTimeout(this.currentTimeoutId);
|
|
348
|
+
this.shouldHidePopover = false;
|
|
349
|
+
}
|
|
279
350
|
|
|
280
351
|
// Make the tooltip visible - but hide until
|
|
281
352
|
this.tooltip.style.visibility = 'hidden';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
|
|
1
|
+
import { AnalyticsStep } from '@atlaskit/adf-schema/steps/analytics';
|
|
2
2
|
export function getAnalyticsEventsFromTransaction(tr) {
|
|
3
3
|
return tr.steps.filter(step => step instanceof AnalyticsStep).reduce((acc, step) => [...acc, ...step.analyticsEvents], []);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LinkMetaStep } from '@atlaskit/adf-schema/steps';
|
|
1
|
+
import { LinkMetaStep } from '@atlaskit/adf-schema/steps/link-meta-step';
|
|
2
2
|
/**
|
|
3
3
|
* Records metadata about the user action and input method relating to a transaction
|
|
4
4
|
* as a custom LinkStepMetadata prosemirror step so that it is preserved in
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LinkMetaStep } from '@atlaskit/adf-schema/steps';
|
|
1
|
+
import { LinkMetaStep } from '@atlaskit/adf-schema/steps/link-meta-step';
|
|
2
2
|
export function getLinkMetadataFromTransaction(tr) {
|
|
3
3
|
return tr.steps.reduce((metadata, step) => {
|
|
4
4
|
if (!(step instanceof LinkMetaStep)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
2
|
-
import { uuid } from '@atlaskit/adf-schema';
|
|
2
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
3
3
|
import { ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -13,7 +13,7 @@ import debounce from 'lodash/debounce';
|
|
|
13
13
|
import { flushSync } from 'react-dom';
|
|
14
14
|
import FocusLock from 'react-focus-lock';
|
|
15
15
|
import { injectIntl } from 'react-intl';
|
|
16
|
-
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
16
|
+
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
17
17
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
18
18
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
19
19
|
import PageObject from '@atlaskit/object/page';
|
|
@@ -14,7 +14,7 @@ import { FileFetcherError } from '@atlaskit/media-client';
|
|
|
14
14
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
15
15
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
16
16
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import { messages } from '../messages/media-inline-card';
|
|
19
19
|
import { referenceHeights } from './constants';
|
|
20
20
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "120.
|
|
17
|
+
const packageVersion = "120.11.1";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// See https://product-fabric.atlassian.net/browse/ED-3097 for why this file exists.
|
|
5
5
|
|
|
6
6
|
import LinkifyIt from 'linkify-it';
|
|
7
|
-
import { linkifyMatch } from '@atlaskit/adf-schema';
|
|
7
|
+
import { linkifyMatch } from '@atlaskit/adf-schema/linkify-match';
|
|
8
8
|
import { findFilepaths, isLinkInMatches, shouldAutoLinkifyMatch } from '../../utils';
|
|
9
9
|
|
|
10
10
|
// Ignored via go/ees005
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useSta
|
|
|
2
2
|
import { bind, bindAll } from 'bind-event-listener';
|
|
3
3
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
7
7
|
import { LAYOUT_SECTION_MARGIN } from '../styles';
|
|
8
8
|
import { getBrowserInfo } from '../utils/browser';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
|
|
1
|
+
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema/tableNodes';
|
|
2
2
|
export const TableSharedCssClassName = {
|
|
3
3
|
TABLE_CONTAINER: `${tablePrefixSelector}-container`,
|
|
4
4
|
TABLE_NODE_WRAPPER: `${tablePrefixSelector}-wrapper`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tableBackgroundColorNames } from '@atlaskit/adf-schema';
|
|
1
|
+
import { tableBackgroundColorNames } from '@atlaskit/adf-schema/tableNodes';
|
|
2
2
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
3
3
|
|
|
4
4
|
// This is used in order to support usage of DS tokens. Table cell background-color
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "120.
|
|
17
|
+
const packageVersion = "120.11.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -5,7 +5,7 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
|
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
|
|
7
7
|
import { Anchor } from '@atlaskit/primitives/anchor';
|
|
8
|
-
import ProfileCardTrigger from '@atlaskit/profilecard/
|
|
8
|
+
import ProfileCardTrigger from '@atlaskit/profilecard/profile-card-trigger';
|
|
9
9
|
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
// Lazy-loaded so the agent profile card chunk (and its `@atlaskit/rovo-agent-components`
|
|
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
10
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
13
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
14
14
|
import Popup from '../Popup';
|
|
15
15
|
import tableSelectorPopup, { TABLE_SELECTOR_BUTTON_GAP, TABLE_SELECTOR_BUTTON_SIZE } from './table-selector';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { borderColorPalette as colorPalette } from '@atlaskit/adf-schema';
|
|
1
|
+
import { borderColorPalette as colorPalette } from '@atlaskit/adf-schema/border';
|
|
2
2
|
import { DEFAULT_BORDER_COLOR } from './common';
|
|
3
3
|
import getColorMessage from './getColorMessage';
|
|
4
4
|
import paletteMessages from './paletteMessages';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tableBackgroundBorderColor, tableBackgroundColorPalette } from '@atlaskit/adf-schema';
|
|
1
|
+
import { tableBackgroundBorderColor, tableBackgroundColorPalette } from '@atlaskit/adf-schema/tableNodes';
|
|
2
2
|
import getColorMessage from './getColorMessage';
|
|
3
3
|
import paletteMessages from './paletteMessages';
|
|
4
4
|
const cellBackgroundColorPalette = [];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
|
-
import { backgroundColorPalette } from '@atlaskit/adf-schema';
|
|
8
|
+
import { backgroundColorPalette } from '@atlaskit/adf-schema/background-color';
|
|
9
9
|
import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
|
|
10
10
|
import getColorMessage from './getColorMessage';
|
|
11
11
|
import { mapPaletteColor } from './mapPaletteColor';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import paletteRaw from '@atlaskit/tokens/
|
|
1
|
+
import paletteRaw from '@atlaskit/tokens/palette';
|
|
2
2
|
import tokenNames from '@atlaskit/tokens/token-names';
|
|
3
|
-
import
|
|
3
|
+
import darkTokensRaw from '@atlaskit/tokens/atlassian-dark';
|
|
4
|
+
import lightTokensRaw from '@atlaskit/tokens/atlassian-light';
|
|
4
5
|
import { getSelectedRowAndColumn } from './getSelectedRowAndColumn';
|
|
5
6
|
export const DEFAULT_COLOR_PICKER_COLUMNS = 7;
|
|
6
7
|
// Ignored via go/ees005
|
|
@@ -14,7 +14,7 @@ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
|
14
14
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
16
16
|
import { Box, xcss, Inline } from '@atlaskit/primitives';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
19
19
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
20
20
|
import { colorPickerButtonMessages } from '../../messages/color-picker-button';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
export const canApplyAnnotationOnRange = (rangeSelection, doc, schema) => {
|
|
5
5
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File has been copied to packages/editor/editor-plugin-ai/src/provider/markdown-transformer/utils/hyperlink.ts
|
|
2
2
|
// If changes are made to this file, please make the same update in the linked file.
|
|
3
3
|
|
|
4
|
-
import { linkify } from '@atlaskit/adf-schema';
|
|
4
|
+
import { linkify } from '@atlaskit/adf-schema/url';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics/types/enums';
|
|
6
6
|
import { FILEPATH_REGEXP } from './FILEPATH_REGEXP';
|
|
7
7
|
import { getLinkDomain } from './getLinkDomain';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { isSafeUrl
|
|
1
|
+
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
2
|
+
import { normalizeUrl as normaliseLinkHref } from '@atlaskit/adf-schema/normalize-url';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Adds protocol to url if needed.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { inlineNodes
|
|
1
|
+
import { inlineNodes } from '@atlaskit/adf-schema/inline-nodes';
|
|
2
|
+
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
3
|
+
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
4
|
+
import { generateUuid as uuid } from '@atlaskit/adf-schema/uuid';
|
|
2
5
|
import { defaultSchema } from '@atlaskit/adf-schema/schema-default';
|
|
3
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
7
|
import { isSubSupType } from './isSubSupType';
|