@atlaskit/editor-plugin-hyperlink 2.3.17 → 2.3.18
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 +10 -0
- package/dist/cjs/pm-plugins/decorations.js +9 -1
- package/dist/cjs/pm-plugins/main.js +22 -11
- package/dist/es2019/pm-plugins/decorations.js +10 -2
- package/dist/es2019/pm-plugins/main.js +19 -5
- package/dist/esm/pm-plugins/decorations.js +10 -2
- package/dist/esm/pm-plugins/main.js +21 -10
- package/dist/types/pm-plugins/decorations.d.ts +4 -1
- package/dist/types-ts4.5/pm-plugins/decorations.d.ts +4 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 2.3.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#119163](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119163)
|
|
8
|
+
[`45ae1b9a97c16`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/45ae1b9a97c16) -
|
|
9
|
+
[ux] Added onDropdownChange prop to overlay in editor-common. Used this prop to keep link
|
|
10
|
+
configure overlay open when dropdown is open, and hide overlay when dropdown is hidden.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 2.3.17
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -12,17 +12,25 @@ var _link = require("@atlaskit/editor-common/link");
|
|
|
12
12
|
var ButtonWrapper = exports.ButtonWrapper = function ButtonWrapper(_ref) {
|
|
13
13
|
var editorView = _ref.editorView,
|
|
14
14
|
pos = _ref.pos,
|
|
15
|
+
stateKey = _ref.stateKey,
|
|
15
16
|
intl = _ref.intl;
|
|
16
17
|
var wrapper = document.createElement('span');
|
|
17
18
|
wrapper.style.position = 'relative';
|
|
18
19
|
var nonBreakingCharacter = "\u2060";
|
|
20
|
+
var onDropdownChange = function onDropdownChange(isOpen) {
|
|
21
|
+
editorView.dispatch(editorView.state.tr.setMeta(stateKey, {
|
|
22
|
+
type: _link.LinkAction.SET_CONFIGURE_DROPDOWN_OPEN,
|
|
23
|
+
isOpen: isOpen
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
19
26
|
(0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
|
|
20
27
|
locale: intl.locale || 'en',
|
|
21
28
|
messages: intl.messages,
|
|
22
29
|
formats: intl.formats
|
|
23
30
|
}, /*#__PURE__*/_react.default.createElement(_link.OverlayButton, {
|
|
24
31
|
targetElementPos: pos,
|
|
25
|
-
editorView: editorView
|
|
32
|
+
editorView: editorView,
|
|
33
|
+
onDropdownChange: onDropdownChange
|
|
26
34
|
}), nonBreakingCharacter), wrapper);
|
|
27
35
|
return wrapper;
|
|
28
36
|
};
|
|
@@ -14,7 +14,7 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
14
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var
|
|
17
|
+
var _decorations2 = require("./decorations");
|
|
18
18
|
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; }
|
|
19
19
|
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; }
|
|
20
20
|
var isSelectionInsideLink = function isSelectionInsideLink(state) {
|
|
@@ -193,35 +193,46 @@ var plugin = exports.plugin = function plugin(dispatch, intl, editorAppearance)
|
|
|
193
193
|
timesViewed: state.timesViewed,
|
|
194
194
|
searchSessionId: state.searchSessionId
|
|
195
195
|
};
|
|
196
|
-
state = _objectSpread({
|
|
196
|
+
state = _objectSpread(_objectSpread({}, (0, _platformFeatureFlags.fg)('platform.linking-platform.smart-links-in-live-pages') && state), {}, {
|
|
197
197
|
activeText: state.activeText,
|
|
198
198
|
canInsertLink: state.canInsertLink,
|
|
199
199
|
inputMethod: inputMethod,
|
|
200
200
|
activeLinkMark: toState(state.activeLinkMark, action, newState),
|
|
201
201
|
editorAppearance: editorAppearance
|
|
202
202
|
}, stateForAnalytics);
|
|
203
|
-
if ((0, _platformFeatureFlags.
|
|
203
|
+
if ((0, _platformFeatureFlags.fg)('platform.linking-platform.smart-links-in-live-pages')) {
|
|
204
|
+
if (action === _link3.LinkAction.SET_CONFIGURE_DROPDOWN_OPEN) {
|
|
205
|
+
var configureDropdownOpen = tr.getMeta(stateKey).isOpen;
|
|
206
|
+
// Hide overlay when the dropdown is closed (state is updated to false)
|
|
207
|
+
var decorations = configureDropdownOpen ? {} : {
|
|
208
|
+
decorations: _view.DecorationSet.empty
|
|
209
|
+
};
|
|
210
|
+
state = _objectSpread(_objectSpread(_objectSpread({}, state), decorations), {}, {
|
|
211
|
+
configureDropdownOpen: configureDropdownOpen
|
|
212
|
+
});
|
|
213
|
+
}
|
|
204
214
|
if (action === _link3.LinkAction.SET_CONFIGURE_BUTTON_TARGET_POS) {
|
|
205
215
|
var configureButtonTargetPos = tr.getMeta(stateKey).pos;
|
|
206
216
|
var targetPosHasChanged = pluginState.configureButtonTargetPos !== configureButtonTargetPos;
|
|
207
|
-
var
|
|
208
|
-
if (targetPosHasChanged) {
|
|
217
|
+
var _decorations = pluginState.decorations;
|
|
218
|
+
if (targetPosHasChanged && state.configureDropdownOpen !== true) {
|
|
209
219
|
if (configureButtonTargetPos === undefined) {
|
|
210
|
-
|
|
220
|
+
_decorations = _view.DecorationSet.empty;
|
|
211
221
|
} else {
|
|
212
222
|
var decoration = _view.Decoration.widget(configureButtonTargetPos, function (view) {
|
|
213
|
-
return (0,
|
|
223
|
+
return (0, _decorations2.ButtonWrapper)({
|
|
214
224
|
editorView: view,
|
|
215
225
|
pos: configureButtonTargetPos,
|
|
226
|
+
stateKey: stateKey,
|
|
216
227
|
intl: intl
|
|
217
228
|
});
|
|
218
229
|
});
|
|
219
|
-
|
|
230
|
+
_decorations = _view.DecorationSet.create(newState.doc, [decoration]);
|
|
220
231
|
}
|
|
221
232
|
}
|
|
222
233
|
state = _objectSpread(_objectSpread({}, state), {}, {
|
|
223
234
|
configureButtonTargetPos: configureButtonTargetPos,
|
|
224
|
-
decorations:
|
|
235
|
+
decorations: _decorations
|
|
225
236
|
});
|
|
226
237
|
}
|
|
227
238
|
}
|
|
@@ -247,7 +258,7 @@ var plugin = exports.plugin = function plugin(dispatch, intl, editorAppearance)
|
|
|
247
258
|
key: stateKey,
|
|
248
259
|
props: _objectSpread({
|
|
249
260
|
decorations: function decorations(state) {
|
|
250
|
-
if ((0, _platformFeatureFlags.
|
|
261
|
+
if ((0, _platformFeatureFlags.fg)('platform.linking-platform.smart-links-in-live-pages')) {
|
|
251
262
|
var _stateKey$getState;
|
|
252
263
|
var _ref = (_stateKey$getState = stateKey.getState(state)) !== null && _stateKey$getState !== void 0 ? _stateKey$getState : {},
|
|
253
264
|
decorations = _ref.decorations;
|
|
@@ -286,7 +297,7 @@ var plugin = exports.plugin = function plugin(dispatch, intl, editorAppearance)
|
|
|
286
297
|
return false;
|
|
287
298
|
}
|
|
288
299
|
}
|
|
289
|
-
}, (0, _platformFeatureFlags.
|
|
300
|
+
}, (0, _platformFeatureFlags.fg)('platform.linking-platform.smart-links-in-live-pages') && {
|
|
290
301
|
markViews: {
|
|
291
302
|
link: function link(mark, view, inline) {
|
|
292
303
|
var toDOM = mark.type.spec.toDOM;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from 'react-dom';
|
|
3
3
|
import { IntlProvider } from 'react-intl-next';
|
|
4
|
-
import { OverlayButton } from '@atlaskit/editor-common/link';
|
|
4
|
+
import { LinkAction, OverlayButton } from '@atlaskit/editor-common/link';
|
|
5
5
|
export const ButtonWrapper = ({
|
|
6
6
|
editorView,
|
|
7
7
|
pos,
|
|
8
|
+
stateKey,
|
|
8
9
|
intl
|
|
9
10
|
}) => {
|
|
10
11
|
const wrapper = document.createElement('span');
|
|
11
12
|
wrapper.style.position = 'relative';
|
|
12
13
|
const nonBreakingCharacter = '\u2060';
|
|
14
|
+
const onDropdownChange = isOpen => {
|
|
15
|
+
editorView.dispatch(editorView.state.tr.setMeta(stateKey, {
|
|
16
|
+
type: LinkAction.SET_CONFIGURE_DROPDOWN_OPEN,
|
|
17
|
+
isOpen
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
13
20
|
render( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
14
21
|
locale: intl.locale || 'en',
|
|
15
22
|
messages: intl.messages,
|
|
16
23
|
formats: intl.formats
|
|
17
24
|
}, /*#__PURE__*/React.createElement(OverlayButton, {
|
|
18
25
|
targetElementPos: pos,
|
|
19
|
-
editorView: editorView
|
|
26
|
+
editorView: editorView,
|
|
27
|
+
onDropdownChange: onDropdownChange
|
|
20
28
|
}), nonBreakingCharacter), wrapper);
|
|
21
29
|
return wrapper;
|
|
22
30
|
};
|
|
@@ -5,7 +5,7 @@ import { canLinkBeCreatedInRange, shallowEqual } from '@atlaskit/editor-common/u
|
|
|
5
5
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import {
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { ButtonWrapper } from './decorations';
|
|
10
10
|
const isSelectionInsideLink = state => !!state.doc.type.schema.marks.link.isInSet(state.selection.$from.marks());
|
|
11
11
|
const isSelectionAroundLink = state => {
|
|
@@ -194,6 +194,7 @@ export const plugin = (dispatch, intl, editorAppearance) => new SafePlugin({
|
|
|
194
194
|
searchSessionId: state.searchSessionId
|
|
195
195
|
};
|
|
196
196
|
state = {
|
|
197
|
+
...(fg('platform.linking-platform.smart-links-in-live-pages') && state),
|
|
197
198
|
activeText: state.activeText,
|
|
198
199
|
canInsertLink: state.canInsertLink,
|
|
199
200
|
inputMethod,
|
|
@@ -201,12 +202,24 @@ export const plugin = (dispatch, intl, editorAppearance) => new SafePlugin({
|
|
|
201
202
|
editorAppearance,
|
|
202
203
|
...stateForAnalytics
|
|
203
204
|
};
|
|
204
|
-
if (
|
|
205
|
+
if (fg('platform.linking-platform.smart-links-in-live-pages')) {
|
|
206
|
+
if (action === LinkAction.SET_CONFIGURE_DROPDOWN_OPEN) {
|
|
207
|
+
const configureDropdownOpen = tr.getMeta(stateKey).isOpen;
|
|
208
|
+
// Hide overlay when the dropdown is closed (state is updated to false)
|
|
209
|
+
const decorations = configureDropdownOpen ? {} : {
|
|
210
|
+
decorations: DecorationSet.empty
|
|
211
|
+
};
|
|
212
|
+
state = {
|
|
213
|
+
...state,
|
|
214
|
+
...decorations,
|
|
215
|
+
configureDropdownOpen
|
|
216
|
+
};
|
|
217
|
+
}
|
|
205
218
|
if (action === LinkAction.SET_CONFIGURE_BUTTON_TARGET_POS) {
|
|
206
219
|
const configureButtonTargetPos = tr.getMeta(stateKey).pos;
|
|
207
220
|
const targetPosHasChanged = pluginState.configureButtonTargetPos !== configureButtonTargetPos;
|
|
208
221
|
let decorations = pluginState.decorations;
|
|
209
|
-
if (targetPosHasChanged) {
|
|
222
|
+
if (targetPosHasChanged && state.configureDropdownOpen !== true) {
|
|
210
223
|
if (configureButtonTargetPos === undefined) {
|
|
211
224
|
decorations = DecorationSet.empty;
|
|
212
225
|
} else {
|
|
@@ -214,6 +227,7 @@ export const plugin = (dispatch, intl, editorAppearance) => new SafePlugin({
|
|
|
214
227
|
return ButtonWrapper({
|
|
215
228
|
editorView: view,
|
|
216
229
|
pos: configureButtonTargetPos,
|
|
230
|
+
stateKey,
|
|
217
231
|
intl
|
|
218
232
|
});
|
|
219
233
|
});
|
|
@@ -249,7 +263,7 @@ export const plugin = (dispatch, intl, editorAppearance) => new SafePlugin({
|
|
|
249
263
|
key: stateKey,
|
|
250
264
|
props: {
|
|
251
265
|
decorations: state => {
|
|
252
|
-
if (
|
|
266
|
+
if (fg('platform.linking-platform.smart-links-in-live-pages')) {
|
|
253
267
|
var _stateKey$getState;
|
|
254
268
|
const {
|
|
255
269
|
decorations
|
|
@@ -295,7 +309,7 @@ export const plugin = (dispatch, intl, editorAppearance) => new SafePlugin({
|
|
|
295
309
|
return false;
|
|
296
310
|
}
|
|
297
311
|
},
|
|
298
|
-
...(
|
|
312
|
+
...(fg('platform.linking-platform.smart-links-in-live-pages') && {
|
|
299
313
|
markViews: {
|
|
300
314
|
link: (mark, view, inline) => {
|
|
301
315
|
const toDOM = mark.type.spec.toDOM;
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from 'react-dom';
|
|
3
3
|
import { IntlProvider } from 'react-intl-next';
|
|
4
|
-
import { OverlayButton } from '@atlaskit/editor-common/link';
|
|
4
|
+
import { LinkAction, OverlayButton } from '@atlaskit/editor-common/link';
|
|
5
5
|
export var ButtonWrapper = function ButtonWrapper(_ref) {
|
|
6
6
|
var editorView = _ref.editorView,
|
|
7
7
|
pos = _ref.pos,
|
|
8
|
+
stateKey = _ref.stateKey,
|
|
8
9
|
intl = _ref.intl;
|
|
9
10
|
var wrapper = document.createElement('span');
|
|
10
11
|
wrapper.style.position = 'relative';
|
|
11
12
|
var nonBreakingCharacter = "\u2060";
|
|
13
|
+
var onDropdownChange = function onDropdownChange(isOpen) {
|
|
14
|
+
editorView.dispatch(editorView.state.tr.setMeta(stateKey, {
|
|
15
|
+
type: LinkAction.SET_CONFIGURE_DROPDOWN_OPEN,
|
|
16
|
+
isOpen: isOpen
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
12
19
|
render( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
13
20
|
locale: intl.locale || 'en',
|
|
14
21
|
messages: intl.messages,
|
|
15
22
|
formats: intl.formats
|
|
16
23
|
}, /*#__PURE__*/React.createElement(OverlayButton, {
|
|
17
24
|
targetElementPos: pos,
|
|
18
|
-
editorView: editorView
|
|
25
|
+
editorView: editorView,
|
|
26
|
+
onDropdownChange: onDropdownChange
|
|
19
27
|
}), nonBreakingCharacter), wrapper);
|
|
20
28
|
return wrapper;
|
|
21
29
|
};
|
|
@@ -8,7 +8,7 @@ import { canLinkBeCreatedInRange, shallowEqual } from '@atlaskit/editor-common/u
|
|
|
8
8
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import { PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
11
|
-
import {
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { ButtonWrapper } from './decorations';
|
|
13
13
|
var isSelectionInsideLink = function isSelectionInsideLink(state) {
|
|
14
14
|
return !!state.doc.type.schema.marks.link.isInSet(state.selection.$from.marks());
|
|
@@ -186,35 +186,46 @@ export var plugin = function plugin(dispatch, intl, editorAppearance) {
|
|
|
186
186
|
timesViewed: state.timesViewed,
|
|
187
187
|
searchSessionId: state.searchSessionId
|
|
188
188
|
};
|
|
189
|
-
state = _objectSpread({
|
|
189
|
+
state = _objectSpread(_objectSpread({}, fg('platform.linking-platform.smart-links-in-live-pages') && state), {}, {
|
|
190
190
|
activeText: state.activeText,
|
|
191
191
|
canInsertLink: state.canInsertLink,
|
|
192
192
|
inputMethod: inputMethod,
|
|
193
193
|
activeLinkMark: toState(state.activeLinkMark, action, newState),
|
|
194
194
|
editorAppearance: editorAppearance
|
|
195
195
|
}, stateForAnalytics);
|
|
196
|
-
if (
|
|
196
|
+
if (fg('platform.linking-platform.smart-links-in-live-pages')) {
|
|
197
|
+
if (action === LinkAction.SET_CONFIGURE_DROPDOWN_OPEN) {
|
|
198
|
+
var configureDropdownOpen = tr.getMeta(stateKey).isOpen;
|
|
199
|
+
// Hide overlay when the dropdown is closed (state is updated to false)
|
|
200
|
+
var decorations = configureDropdownOpen ? {} : {
|
|
201
|
+
decorations: DecorationSet.empty
|
|
202
|
+
};
|
|
203
|
+
state = _objectSpread(_objectSpread(_objectSpread({}, state), decorations), {}, {
|
|
204
|
+
configureDropdownOpen: configureDropdownOpen
|
|
205
|
+
});
|
|
206
|
+
}
|
|
197
207
|
if (action === LinkAction.SET_CONFIGURE_BUTTON_TARGET_POS) {
|
|
198
208
|
var configureButtonTargetPos = tr.getMeta(stateKey).pos;
|
|
199
209
|
var targetPosHasChanged = pluginState.configureButtonTargetPos !== configureButtonTargetPos;
|
|
200
|
-
var
|
|
201
|
-
if (targetPosHasChanged) {
|
|
210
|
+
var _decorations = pluginState.decorations;
|
|
211
|
+
if (targetPosHasChanged && state.configureDropdownOpen !== true) {
|
|
202
212
|
if (configureButtonTargetPos === undefined) {
|
|
203
|
-
|
|
213
|
+
_decorations = DecorationSet.empty;
|
|
204
214
|
} else {
|
|
205
215
|
var decoration = Decoration.widget(configureButtonTargetPos, function (view) {
|
|
206
216
|
return ButtonWrapper({
|
|
207
217
|
editorView: view,
|
|
208
218
|
pos: configureButtonTargetPos,
|
|
219
|
+
stateKey: stateKey,
|
|
209
220
|
intl: intl
|
|
210
221
|
});
|
|
211
222
|
});
|
|
212
|
-
|
|
223
|
+
_decorations = DecorationSet.create(newState.doc, [decoration]);
|
|
213
224
|
}
|
|
214
225
|
}
|
|
215
226
|
state = _objectSpread(_objectSpread({}, state), {}, {
|
|
216
227
|
configureButtonTargetPos: configureButtonTargetPos,
|
|
217
|
-
decorations:
|
|
228
|
+
decorations: _decorations
|
|
218
229
|
});
|
|
219
230
|
}
|
|
220
231
|
}
|
|
@@ -240,7 +251,7 @@ export var plugin = function plugin(dispatch, intl, editorAppearance) {
|
|
|
240
251
|
key: stateKey,
|
|
241
252
|
props: _objectSpread({
|
|
242
253
|
decorations: function decorations(state) {
|
|
243
|
-
if (
|
|
254
|
+
if (fg('platform.linking-platform.smart-links-in-live-pages')) {
|
|
244
255
|
var _stateKey$getState;
|
|
245
256
|
var _ref = (_stateKey$getState = stateKey.getState(state)) !== null && _stateKey$getState !== void 0 ? _stateKey$getState : {},
|
|
246
257
|
decorations = _ref.decorations;
|
|
@@ -279,7 +290,7 @@ export var plugin = function plugin(dispatch, intl, editorAppearance) {
|
|
|
279
290
|
return false;
|
|
280
291
|
}
|
|
281
292
|
}
|
|
282
|
-
},
|
|
293
|
+
}, fg('platform.linking-platform.smart-links-in-live-pages') && {
|
|
283
294
|
markViews: {
|
|
284
295
|
link: function link(mark, view, inline) {
|
|
285
296
|
var toDOM = mark.type.spec.toDOM;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import { type HyperlinkState } from '@atlaskit/editor-common/link';
|
|
3
|
+
import { type PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
4
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const ButtonWrapper: ({ editorView, pos, intl, }: {
|
|
5
|
+
export declare const ButtonWrapper: ({ editorView, pos, stateKey, intl, }: {
|
|
4
6
|
editorView: EditorView;
|
|
5
7
|
pos?: number | undefined;
|
|
8
|
+
stateKey: PluginKey<HyperlinkState>;
|
|
6
9
|
intl: IntlShape;
|
|
7
10
|
}) => HTMLSpanElement;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import { type HyperlinkState } from '@atlaskit/editor-common/link';
|
|
3
|
+
import { type PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
4
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const ButtonWrapper: ({ editorView, pos, intl, }: {
|
|
5
|
+
export declare const ButtonWrapper: ({ editorView, pos, stateKey, intl, }: {
|
|
4
6
|
editorView: EditorView;
|
|
5
7
|
pos?: number | undefined;
|
|
8
|
+
stateKey: PluginKey<HyperlinkState>;
|
|
6
9
|
intl: IntlShape;
|
|
7
10
|
}) => HTMLSpanElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.18",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^39.0.3",
|
|
36
36
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
37
|
-
"@atlaskit/editor-common": "^84.
|
|
37
|
+
"@atlaskit/editor-common": "^84.5.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
39
|
-
"@atlaskit/editor-plugin-card": "2.5.
|
|
39
|
+
"@atlaskit/editor-plugin-card": "2.5.1",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
41
41
|
"@atlaskit/icon": "^22.6.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|