@atlaskit/editor-plugin-hyperlink 21.0.1 → 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/editor-plugin-hyperlink
2
2
 
3
+ ## 21.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9df8889f51f21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9df8889f51f21) -
8
+ Add an opt-in LinkPickerOptions.popupContainerSurface ('default' | 'none') that lets a custom link
9
+ picker component (e.g. RovoLinkPicker) suppress the editor's floating toolbar popup surface
10
+ (background, box-shadow, border-radius, padding) when it renders its own complete surface.
11
+ Threaded through FloatingToolbarConfig/Toolbar's new containerSurface prop. Defaults to the
12
+ existing wrapper surface; only a caller that explicitly opts in is affected.
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
18
+ ## 21.0.2
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 21.0.1
4
25
 
5
26
  ### Patch Changes
@@ -17,8 +17,8 @@ var _quickInsert = require("@atlaskit/editor-common/quick-insert");
17
17
  var _utils = require("@atlaskit/editor-common/utils");
18
18
  var _link3 = _interopRequireDefault(require("@atlaskit/icon/core/link"));
19
19
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
20
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
20
  var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
21
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
22
  var _commands = require("./editor-commands/commands");
23
23
  var _fakeCursorForToolbar = _interopRequireDefault(require("./pm-plugins/fake-cursor-for-toolbar"));
24
24
  var _inputRule = require("./pm-plugins/input-rule");
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.stateKey = exports.plugin = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _isSafeUrl = require("@atlaskit/adf-schema/is-safe-url");
10
- var _fg = require("@atlaskit/platform-feature-flags/fg");
11
9
  var _uuid = require("uuid");
10
+ var _isSafeUrl = require("@atlaskit/adf-schema/is-safe-url");
12
11
  var _link3 = require("@atlaskit/editor-common/link");
13
12
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
14
13
  var _utils = require("@atlaskit/editor-common/utils");
15
14
  var _state = require("@atlaskit/editor-prosemirror/state");
15
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
16
16
  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; }
17
17
  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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
18
18
  var mapTransactionToState = function mapTransactionToState(state, tr) {
@@ -241,7 +241,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
241
241
  case 'EDIT_INSERTED':
242
242
  case 'INSERT':
243
243
  {
244
- var _options$linkPicker$p, _options$linkPicker, _options$linkPicker$p2, _options$linkPicker2;
244
+ var _options$linkPicker$p, _options$linkPicker, _options$linkPicker$p2, _options$linkPicker2, _options$linkPicker3;
245
245
  var _link;
246
246
  if (isEditLink(activeLinkMark) && activeLinkMark.node) {
247
247
  var _linkMark = activeLinkMark.node.marks.filter(function (mark) {
@@ -256,6 +256,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
256
256
  preventPopupOverflow: true,
257
257
  height: popupHeight,
258
258
  width: popupWidth,
259
+ containerSurface: options === null || options === void 0 || (_options$linkPicker3 = options.linkPicker) === null || _options$linkPicker3 === void 0 ? void 0 : _options$linkPicker3.popupContainerSurface,
259
260
  items: [{
260
261
  type: 'custom',
261
262
  fallback: [],
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { hyperlinkPlugin } from '../hyperlinkPlugin';
@@ -9,8 +9,8 @@ import { IconLink } from '@atlaskit/editor-common/quick-insert';
9
9
  import { canLinkBeCreatedInRange } from '@atlaskit/editor-common/utils';
10
10
  import LinkIcon from '@atlaskit/icon/core/link';
11
11
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
13
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
14
  import { hideLinkToolbarSetMeta, insertLinkWithAnalytics, removeLinkEditorCommand, showLinkToolbar, updateLink, updateLinkEditorCommand } from './editor-commands/commands';
15
15
  import fakeCursorToolbarPlugin from './pm-plugins/fake-cursor-for-toolbar';
16
16
  import { createInputRulePlugin } from './pm-plugins/input-rule';
@@ -1,11 +1,11 @@
1
- import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
2
- import { fg } from '@atlaskit/platform-feature-flags/fg';
3
1
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
2
  import { v4 as uuid } from 'uuid';
3
+ import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
5
4
  import { InsertStatus, LinkAction, getActiveLinkMark } from '@atlaskit/editor-common/link';
6
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
6
  import { canLinkBeCreatedInRange, shallowEqual } from '@atlaskit/editor-common/utils';
8
7
  import { PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
8
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
9
9
  const mapTransactionToState = (state, tr) => {
10
10
  if (!state) {
11
11
  return undefined;
@@ -3,6 +3,7 @@
3
3
  * @jsxRuntime classic
4
4
  * @jsx jsx
5
5
  */
6
+
6
7
  import { useCallback } from 'react';
7
8
 
8
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -227,7 +227,7 @@ export const getToolbarConfig = (options, pluginInjectionApi) => (state, intl, p
227
227
  case 'EDIT_INSERTED':
228
228
  case 'INSERT':
229
229
  {
230
- var _options$linkPicker$p, _options$linkPicker, _options$linkPicker$p2, _options$linkPicker2;
230
+ var _options$linkPicker$p, _options$linkPicker, _options$linkPicker$p2, _options$linkPicker2, _options$linkPicker3;
231
231
  let link;
232
232
  if (isEditLink(activeLinkMark) && activeLinkMark.node) {
233
233
  const linkMark = activeLinkMark.node.marks.filter(mark => mark.type === state.schema.marks.link);
@@ -241,6 +241,7 @@ export const getToolbarConfig = (options, pluginInjectionApi) => (state, intl, p
241
241
  preventPopupOverflow: true,
242
242
  height: popupHeight,
243
243
  width: popupWidth,
244
+ containerSurface: options === null || options === void 0 ? void 0 : (_options$linkPicker3 = options.linkPicker) === null || _options$linkPicker3 === void 0 ? void 0 : _options$linkPicker3.popupContainerSurface,
244
245
  items: [{
245
246
  type: 'custom',
246
247
  fallback: [],
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { hyperlinkPlugin } from '../hyperlinkPlugin';
@@ -12,8 +12,8 @@ import { IconLink } from '@atlaskit/editor-common/quick-insert';
12
12
  import { canLinkBeCreatedInRange } from '@atlaskit/editor-common/utils';
13
13
  import LinkIcon from '@atlaskit/icon/core/link';
14
14
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
15
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
16
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
17
  import { hideLinkToolbarSetMeta, insertLinkWithAnalytics, removeLinkEditorCommand, showLinkToolbar as _showLinkToolbar, updateLink, updateLinkEditorCommand } from './editor-commands/commands';
18
18
  import fakeCursorToolbarPlugin from './pm-plugins/fake-cursor-for-toolbar';
19
19
  import { createInputRulePlugin } from './pm-plugins/input-rule';
@@ -1,14 +1,14 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
- import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
4
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
7
5
  import { v4 as uuid } from 'uuid';
6
+ import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
8
7
  import { InsertStatus, LinkAction, getActiveLinkMark } from '@atlaskit/editor-common/link';
9
8
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
10
9
  import { canLinkBeCreatedInRange, shallowEqual } from '@atlaskit/editor-common/utils';
11
10
  import { PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
11
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
12
12
  var mapTransactionToState = function mapTransactionToState(state, tr) {
13
13
  if (!state) {
14
14
  return undefined;
@@ -3,6 +3,7 @@
3
3
  * @jsxRuntime classic
4
4
  * @jsx jsx
5
5
  */
6
+
6
7
  import { useCallback } from 'react';
7
8
 
8
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -232,7 +232,7 @@ export var getToolbarConfig = function getToolbarConfig(options, pluginInjection
232
232
  case 'EDIT_INSERTED':
233
233
  case 'INSERT':
234
234
  {
235
- var _options$linkPicker$p, _options$linkPicker, _options$linkPicker$p2, _options$linkPicker2;
235
+ var _options$linkPicker$p, _options$linkPicker, _options$linkPicker$p2, _options$linkPicker2, _options$linkPicker3;
236
236
  var _link;
237
237
  if (isEditLink(activeLinkMark) && activeLinkMark.node) {
238
238
  var _linkMark = activeLinkMark.node.marks.filter(function (mark) {
@@ -247,6 +247,7 @@ export var getToolbarConfig = function getToolbarConfig(options, pluginInjection
247
247
  preventPopupOverflow: true,
248
248
  height: popupHeight,
249
249
  width: popupWidth,
250
+ containerSurface: options === null || options === void 0 || (_options$linkPicker3 = options.linkPicker) === null || _options$linkPicker3 === void 0 ? void 0 : _options$linkPicker3.popupContainerSurface,
250
251
  items: [{
251
252
  type: 'custom',
252
253
  fallback: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "21.0.1",
3
+ "version": "21.1.0",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,23 +30,23 @@
30
30
  "@atlaskit/editor-plugin-primary-toolbar": "^20.0.0",
31
31
  "@atlaskit/editor-plugin-selection-toolbar": "^20.0.0",
32
32
  "@atlaskit/editor-plugin-toolbar": "^16.0.0",
33
- "@atlaskit/editor-plugin-ui-control-registry": "^13.0.0",
33
+ "@atlaskit/editor-plugin-ui-control-registry": "^13.1.0",
34
34
  "@atlaskit/editor-plugin-user-intent": "^17.0.0",
35
35
  "@atlaskit/editor-prosemirror": "^9.0.0",
36
- "@atlaskit/editor-toolbar": "^2.6.0",
36
+ "@atlaskit/editor-toolbar": "^2.7.0",
37
37
  "@atlaskit/editor-toolbar-model": "^1.2.0",
38
- "@atlaskit/editor-ui-control-model": "^2.9.0",
38
+ "@atlaskit/editor-ui-control-model": "^2.10.0",
39
39
  "@atlaskit/icon": "^37.7.0",
40
40
  "@atlaskit/platform-feature-experiments": "^0.3.0",
41
41
  "@atlaskit/platform-feature-flags": "^2.2.0",
42
42
  "@atlaskit/prosemirror-input-rules": "^4.1.0",
43
- "@atlaskit/tmp-editor-statsig": "^200.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^201.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1",
46
46
  "uuid": "^11.1.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^123.0.0",
49
+ "@atlaskit/editor-common": "^123.4.0",
50
50
  "react": "^18.2.0 || ^19.2.0",
51
51
  "react-dom": "^18.2.0 || ^19.2.0",
52
52
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"