@atlaskit/editor-common 84.5.0 → 85.0.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/afm-jira/tsconfig.json +3 -0
  3. package/dist/cjs/analytics/types/enums.js +2 -0
  4. package/dist/cjs/element-browser/components/ElementList/ElementList.js +27 -91
  5. package/dist/cjs/extensibility/extensionNodeView.js +1 -2
  6. package/dist/cjs/keymaps/keymap.js +25 -43
  7. package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +34 -9
  8. package/dist/cjs/link/ConfigureLinkOverlay/index.js +15 -5
  9. package/dist/cjs/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.js +46 -0
  10. package/dist/cjs/messages/table.js +30 -0
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +2 -4
  13. package/dist/cjs/react-node-view/index.js +4 -10
  14. package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +2 -5
  15. package/dist/cjs/ui/DropList/index.js +1 -1
  16. package/dist/es2019/analytics/types/enums.js +2 -0
  17. package/dist/es2019/element-browser/components/ElementList/ElementList.js +7 -70
  18. package/dist/es2019/extensibility/extensionNodeView.js +1 -2
  19. package/dist/es2019/keymaps/keymap.js +25 -43
  20. package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +33 -7
  21. package/dist/es2019/link/ConfigureLinkOverlay/index.js +16 -5
  22. package/dist/es2019/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.js +39 -0
  23. package/dist/es2019/messages/table.js +30 -0
  24. package/dist/es2019/monitoring/error.js +1 -1
  25. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +2 -4
  26. package/dist/es2019/react-node-view/index.js +5 -7
  27. package/dist/es2019/selection-based-node-view/SelectionBasedNodeView.js +3 -2
  28. package/dist/es2019/ui/DropList/index.js +1 -1
  29. package/dist/esm/analytics/types/enums.js +2 -0
  30. package/dist/esm/element-browser/components/ElementList/ElementList.js +27 -91
  31. package/dist/esm/extensibility/extensionNodeView.js +1 -2
  32. package/dist/esm/keymaps/keymap.js +25 -43
  33. package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +34 -9
  34. package/dist/esm/link/ConfigureLinkOverlay/index.js +15 -5
  35. package/dist/esm/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.js +40 -0
  36. package/dist/esm/messages/table.js +30 -0
  37. package/dist/esm/monitoring/error.js +1 -1
  38. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +2 -4
  39. package/dist/esm/react-node-view/index.js +4 -10
  40. package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +3 -5
  41. package/dist/esm/ui/DropList/index.js +1 -1
  42. package/dist/types/analytics/types/enums.d.ts +3 -1
  43. package/dist/types/extensibility/extensionNodeView.d.ts +1 -2
  44. package/dist/types/link/ConfigureLinkOverlay/Dropdown.d.ts +5 -4
  45. package/dist/types/link/ConfigureLinkOverlay/index.d.ts +2 -2
  46. package/dist/types/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.d.ts +5 -0
  47. package/dist/types/messages/table.d.ts +30 -0
  48. package/dist/types/react-node-view/index.d.ts +2 -5
  49. package/dist/types/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -2
  50. package/dist/types/types/plugin-factory.d.ts +1 -2
  51. package/dist/types-ts4.5/analytics/types/enums.d.ts +3 -1
  52. package/dist/types-ts4.5/extensibility/extensionNodeView.d.ts +1 -2
  53. package/dist/types-ts4.5/link/ConfigureLinkOverlay/Dropdown.d.ts +5 -4
  54. package/dist/types-ts4.5/link/ConfigureLinkOverlay/index.d.ts +2 -2
  55. package/dist/types-ts4.5/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.d.ts +5 -0
  56. package/dist/types-ts4.5/messages/table.d.ts +30 -0
  57. package/dist/types-ts4.5/react-node-view/index.d.ts +2 -5
  58. package/dist/types-ts4.5/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -2
  59. package/dist/types-ts4.5/types/plugin-factory.d.ts +1 -2
  60. package/package.json +6 -14
  61. package/dist/cjs/ui/PortalProvider/index.js +0 -235
  62. package/dist/es2019/ui/PortalProvider/index.js +0 -171
  63. package/dist/esm/ui/PortalProvider/index.js +0 -229
  64. package/dist/types/ui/PortalProvider/index.d.ts +0 -48
  65. package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +0 -48
  66. package/portal-provider/package.json +0 -15
@@ -11,11 +11,8 @@ import { analyticsEventKey } from '../utils/analytics';
11
11
  import { generateUniqueNodeKey } from './generateUniqueNodeKey';
12
12
  export { getInlineNodeViewProducer, inlineNodeViewClassname } from './getInlineNodeViewProducer';
13
13
  var ReactNodeView = /*#__PURE__*/function () {
14
- function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent) {
14
+ function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate) {
15
15
  var _this = this;
16
- var hasAnalyticsContext = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
17
- var viewShouldUpdate = arguments.length > 8 ? arguments[8] : undefined;
18
- var hasIntlContext = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
19
16
  _classCallCheck(this, ReactNodeView);
20
17
  _defineProperty(this, "decorations", []);
21
18
  _defineProperty(this, "handleRef", function (node) {
@@ -35,10 +32,8 @@ var ReactNodeView = /*#__PURE__*/function () {
35
32
  this.portalProviderAPI = portalProviderAPI;
36
33
  this.reactComponentProps = reactComponentProps || {};
37
34
  this.reactComponent = reactComponent;
38
- this.hasAnalyticsContext = hasAnalyticsContext;
39
35
  this._viewShouldUpdate = viewShouldUpdate;
40
36
  this.eventDispatcher = eventDispatcher;
41
- this.hasIntlContext = hasIntlContext;
42
37
  this.key = generateUniqueNodeKey();
43
38
  }
44
39
 
@@ -107,7 +102,7 @@ var ReactNodeView = /*#__PURE__*/function () {
107
102
  dispatchAnalyticsEvent: _this3.dispatchAnalyticsEvent
108
103
  }, component());
109
104
  };
110
- this.portalProviderAPI.render(componentWithErrorBoundary, this.domRef, this.key, this.hasAnalyticsContext, this.hasIntlContext);
105
+ this.portalProviderAPI.render(componentWithErrorBoundary, this.domRef, this.key);
111
106
  }
112
107
  }, {
113
108
  key: "createDomRef",
@@ -204,16 +199,15 @@ var ReactNodeView = /*#__PURE__*/function () {
204
199
  if (!this.domRef) {
205
200
  return;
206
201
  }
207
- this.portalProviderAPI.remove(this.key, this.domRef);
202
+ this.portalProviderAPI.remove(this.key);
208
203
  this.domRef = undefined;
209
204
  this.contentDOM = undefined;
210
205
  }
211
206
  }], [{
212
207
  key: "fromComponent",
213
208
  value: function fromComponent(component, portalProviderAPI, eventDispatcher, props, viewShouldUpdate) {
214
- var hasIntlContext = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
215
209
  return function (node, view, getPos) {
216
- return new ReactNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, props, component, false, viewShouldUpdate, hasIntlContext).init();
210
+ return new ReactNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, props, component, viewShouldUpdate).init();
217
211
  };
218
212
  }
219
213
  }]);
@@ -8,6 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import ReactNodeView from '../react-node-view';
11
+
11
12
  /**
12
13
  * A ReactNodeView that handles React components sensitive
13
14
  * to selection changes.
@@ -35,13 +36,10 @@ import ReactNodeView from '../react-node-view';
35
36
  export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
36
37
  _inherits(SelectionBasedNodeView, _ReactNodeView);
37
38
  var _super = _createSuper(SelectionBasedNodeView);
38
- function SelectionBasedNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent) {
39
+ function SelectionBasedNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate) {
39
40
  var _this;
40
- var hasContext = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
41
- var viewShouldUpdate = arguments.length > 8 ? arguments[8] : undefined;
42
- var hasIntlContext = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
43
41
  _classCallCheck(this, SelectionBasedNodeView);
44
- _this = _super.call(this, node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, hasContext, viewShouldUpdate, hasIntlContext);
42
+ _this = _super.call(this, node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate);
45
43
  _defineProperty(_assertThisInitialized(_this), "isSelectedNode", false);
46
44
  _defineProperty(_assertThisInitialized(_this), "isNodeInsideSelection", function (from, to, pos, posEnd) {
47
45
  var _this$getPositionsWit = _this.getPositionsWithDefault(pos, posEnd);
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "84.5.0";
20
+ var packageVersion = "85.0.0";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -238,7 +238,8 @@ export declare enum ACTION_SUBJECT {
238
238
  DROP_TARGET = "dropTarget",
239
239
  DRAG = "drag",
240
240
  ELEMENT = "element",
241
- CONTEXT_MENU = "contextMenu"
241
+ CONTEXT_MENU = "contextMenu",
242
+ INLINE_DIALOG = "inlineDialog"
242
243
  }
243
244
  export declare enum ACTION_SUBJECT_ID {
244
245
  ACTION = "action",
@@ -352,6 +353,7 @@ export declare enum ACTION_SUBJECT_ID {
352
353
  SAVE = "save",
353
354
  SECTION = "section",
354
355
  SMART_LINK = "smartLink",
356
+ SMART_LINK_TOOLBAR = "smartLinkToolbar",
355
357
  STATUS = "status",
356
358
  SYMBOL = "symbol",
357
359
  TABLE = "table",
@@ -8,7 +8,6 @@ import type { ProviderFactory } from '../provider-factory';
8
8
  import type { ForwardRef, getPosHandler } from '../react-node-view';
9
9
  import ReactNodeView from '../react-node-view';
10
10
  import type { EditorAppearance } from '../types';
11
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
12
11
  import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags } from './types';
13
12
  interface ExtensionNodeViewOptions {
14
13
  appearance?: EditorAppearance;
@@ -29,5 +28,5 @@ export declare class ExtensionNode extends ReactNodeView {
29
28
  macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags;
30
29
  }, forwardRef: ForwardRef): JSX.Element;
31
30
  }
32
- export default function ExtensionNodeView(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI, macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
31
+ export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI, macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
33
32
  export {};
@@ -1,8 +1,9 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  export type OnDropdownChange = (isOpen: boolean) => void;
3
3
  export type DropdownProps = {
4
- testId: string;
4
+ /** Callback fired when the dropdown is open or close */
5
5
  onDropdownChange?: OnDropdownChange;
6
+ testId: string;
6
7
  };
7
- declare const Dropdown: ({ testId, onDropdownChange }: DropdownProps) => jsx.JSX.Element;
8
- export default Dropdown;
8
+ declare const _default: import("react").ForwardRefExoticComponent<DropdownProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
9
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import { type OnDropdownChange } from './Dropdown';
4
4
  export interface OverlayButtonProps {
@@ -10,4 +10,4 @@ export interface OverlayButtonProps {
10
10
  */
11
11
  onDropdownChange?: OnDropdownChange;
12
12
  }
13
- export declare const OverlayButton: ({ editorView, testId, targetElementPos, onDropdownChange, }: OverlayButtonProps) => jsx.JSX.Element | null;
13
+ export declare const OverlayButton: import("react").ForwardRefExoticComponent<OverlayButtonProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
@@ -0,0 +1,5 @@
1
+ export declare const useLinkOverlayAnalyticsEvents: () => {
2
+ fireActionClickEvent: (linkAction: string) => void;
3
+ fireLinkClickEvent: () => void;
4
+ fireToolbarViewEvent: () => void;
5
+ };
@@ -124,6 +124,21 @@ export declare const messages: {
124
124
  defaultMessage: string;
125
125
  description: string;
126
126
  };
127
+ rowSelected: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ description: string;
131
+ };
132
+ rowMovedUp: {
133
+ id: string;
134
+ defaultMessage: string;
135
+ description: string;
136
+ };
137
+ rowMovedDown: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ description: string;
141
+ };
127
142
  columnsAreInserted: {
128
143
  id: string;
129
144
  defaultMessage: string;
@@ -134,6 +149,21 @@ export declare const messages: {
134
149
  defaultMessage: string;
135
150
  description: string;
136
151
  };
152
+ columnSelected: {
153
+ id: string;
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ columnMovedLeft: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ columnMovedRight: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
137
167
  cellOptions: {
138
168
  id: string;
139
169
  defaultMessage: string;
@@ -3,7 +3,6 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { EventDispatcher } from '../event-dispatcher';
5
5
  import type { PortalProviderAPI } from '../portal';
6
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
7
6
  import type { ForwardRef, getPosHandler, ProsemirrorGetPosHandler, ReactComponentProps, shouldUpdate } from './types';
8
7
  export type { getPosHandler, ReactComponentProps, shouldUpdate, ProsemirrorGetPosHandler, ForwardRef, };
9
8
  export type { InlineNodeViewComponentProps } from './getInlineNodeViewProducer';
@@ -13,10 +12,8 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
13
12
  private contentDOMWrapper?;
14
13
  private reactComponent?;
15
14
  private portalProviderAPI;
16
- private hasAnalyticsContext;
17
15
  private _viewShouldUpdate?;
18
16
  protected eventDispatcher?: EventDispatcher;
19
- private hasIntlContext;
20
17
  protected decorations: ReadonlyArray<Decoration>;
21
18
  reactComponentProps: P;
22
19
  view: EditorView;
@@ -24,7 +21,7 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
24
21
  contentDOM: HTMLElement | null | undefined;
25
22
  node: PMNode;
26
23
  key: string;
27
- constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps?: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, hasAnalyticsContext?: boolean, viewShouldUpdate?: shouldUpdate, hasIntlContext?: boolean);
24
+ constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps?: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, viewShouldUpdate?: shouldUpdate);
28
25
  /**
29
26
  * This method exists to move initialization logic out of the constructor,
30
27
  * so object can be initialized properly before calling render first time.
@@ -54,5 +51,5 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
54
51
  get dom(): HTMLElement;
55
52
  destroy(): void;
56
53
  private dispatchAnalyticsEvent;
57
- static fromComponent(component: React.ComponentType<React.PropsWithChildren<any>>, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, props?: ReactComponentProps, viewShouldUpdate?: (nextNode: PMNode) => boolean, hasIntlContext?: boolean): (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<ReactComponentProps>;
54
+ static fromComponent(component: React.ComponentType<React.PropsWithChildren<any>>, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, props?: ReactComponentProps, viewShouldUpdate?: (nextNode: PMNode) => boolean): (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<ReactComponentProps>;
58
55
  }
@@ -4,7 +4,6 @@ import { type EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import { type EventDispatcher } from '../event-dispatcher';
5
5
  import { type PortalProviderAPI } from '../portal';
6
6
  import ReactNodeView, { type getPosHandler, type ReactComponentProps, type shouldUpdate } from '../react-node-view';
7
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
8
7
  /**
9
8
  * A ReactNodeView that handles React components sensitive
10
9
  * to selection changes.
@@ -32,7 +31,7 @@ export declare class SelectionBasedNodeView<P = ReactComponentProps> extends Rea
32
31
  protected isSelectedNode: boolean;
33
32
  pos: number | undefined;
34
33
  posEnd: number | undefined;
35
- constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, hasContext?: boolean, viewShouldUpdate?: shouldUpdate, hasIntlContext?: boolean);
34
+ constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, viewShouldUpdate?: shouldUpdate);
36
35
  /**
37
36
  * Update current node's start and end positions.
38
37
  *
@@ -5,7 +5,6 @@ import type { Dispatch, EventDispatcher } from '../event-dispatcher';
5
5
  import { type PortalProviderAPI } from '../portal';
6
6
  import type { ProviderFactory } from '../provider-factory';
7
7
  import type { SafePlugin } from '../safe-plugin';
8
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
9
8
  import type { ErrorReporter } from '../utils';
10
9
  import type { EditorReactContext } from './editor-react-context';
11
10
  import type { FeatureFlags } from './feature-flags';
@@ -15,7 +14,7 @@ export type PMPluginFactoryParams = {
15
14
  eventDispatcher: EventDispatcher;
16
15
  providerFactory: ProviderFactory;
17
16
  errorReporter?: ErrorReporter;
18
- portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI;
17
+ portalProviderAPI: PortalProviderAPI;
19
18
  reactContext: () => EditorReactContext;
20
19
  dispatchAnalyticsEvent: DispatchAnalyticsEvent;
21
20
  featureFlags: FeatureFlags;
@@ -238,7 +238,8 @@ export declare enum ACTION_SUBJECT {
238
238
  DROP_TARGET = "dropTarget",
239
239
  DRAG = "drag",
240
240
  ELEMENT = "element",
241
- CONTEXT_MENU = "contextMenu"
241
+ CONTEXT_MENU = "contextMenu",
242
+ INLINE_DIALOG = "inlineDialog"
242
243
  }
243
244
  export declare enum ACTION_SUBJECT_ID {
244
245
  ACTION = "action",
@@ -352,6 +353,7 @@ export declare enum ACTION_SUBJECT_ID {
352
353
  SAVE = "save",
353
354
  SECTION = "section",
354
355
  SMART_LINK = "smartLink",
356
+ SMART_LINK_TOOLBAR = "smartLinkToolbar",
355
357
  STATUS = "status",
356
358
  SYMBOL = "symbol",
357
359
  TABLE = "table",
@@ -8,7 +8,6 @@ import type { ProviderFactory } from '../provider-factory';
8
8
  import type { ForwardRef, getPosHandler } from '../react-node-view';
9
9
  import ReactNodeView from '../react-node-view';
10
10
  import type { EditorAppearance } from '../types';
11
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
12
11
  import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags } from './types';
13
12
  interface ExtensionNodeViewOptions {
14
13
  appearance?: EditorAppearance;
@@ -29,5 +28,5 @@ export declare class ExtensionNode extends ReactNodeView {
29
28
  macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags;
30
29
  }, forwardRef: ForwardRef): JSX.Element;
31
30
  }
32
- export default function ExtensionNodeView(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI, macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
31
+ export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI, macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
33
32
  export {};
@@ -1,8 +1,9 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  export type OnDropdownChange = (isOpen: boolean) => void;
3
3
  export type DropdownProps = {
4
- testId: string;
4
+ /** Callback fired when the dropdown is open or close */
5
5
  onDropdownChange?: OnDropdownChange;
6
+ testId: string;
6
7
  };
7
- declare const Dropdown: ({ testId, onDropdownChange }: DropdownProps) => jsx.JSX.Element;
8
- export default Dropdown;
8
+ declare const _default: import("react").ForwardRefExoticComponent<DropdownProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
9
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import { type OnDropdownChange } from './Dropdown';
4
4
  export interface OverlayButtonProps {
@@ -10,4 +10,4 @@ export interface OverlayButtonProps {
10
10
  */
11
11
  onDropdownChange?: OnDropdownChange;
12
12
  }
13
- export declare const OverlayButton: ({ editorView, testId, targetElementPos, onDropdownChange, }: OverlayButtonProps) => jsx.JSX.Element | null;
13
+ export declare const OverlayButton: import("react").ForwardRefExoticComponent<OverlayButtonProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
@@ -0,0 +1,5 @@
1
+ export declare const useLinkOverlayAnalyticsEvents: () => {
2
+ fireActionClickEvent: (linkAction: string) => void;
3
+ fireLinkClickEvent: () => void;
4
+ fireToolbarViewEvent: () => void;
5
+ };
@@ -124,6 +124,21 @@ export declare const messages: {
124
124
  defaultMessage: string;
125
125
  description: string;
126
126
  };
127
+ rowSelected: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ description: string;
131
+ };
132
+ rowMovedUp: {
133
+ id: string;
134
+ defaultMessage: string;
135
+ description: string;
136
+ };
137
+ rowMovedDown: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ description: string;
141
+ };
127
142
  columnsAreInserted: {
128
143
  id: string;
129
144
  defaultMessage: string;
@@ -134,6 +149,21 @@ export declare const messages: {
134
149
  defaultMessage: string;
135
150
  description: string;
136
151
  };
152
+ columnSelected: {
153
+ id: string;
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ columnMovedLeft: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ columnMovedRight: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
137
167
  cellOptions: {
138
168
  id: string;
139
169
  defaultMessage: string;
@@ -3,7 +3,6 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { EventDispatcher } from '../event-dispatcher';
5
5
  import type { PortalProviderAPI } from '../portal';
6
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
7
6
  import type { ForwardRef, getPosHandler, ProsemirrorGetPosHandler, ReactComponentProps, shouldUpdate } from './types';
8
7
  export type { getPosHandler, ReactComponentProps, shouldUpdate, ProsemirrorGetPosHandler, ForwardRef, };
9
8
  export type { InlineNodeViewComponentProps } from './getInlineNodeViewProducer';
@@ -13,10 +12,8 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
13
12
  private contentDOMWrapper?;
14
13
  private reactComponent?;
15
14
  private portalProviderAPI;
16
- private hasAnalyticsContext;
17
15
  private _viewShouldUpdate?;
18
16
  protected eventDispatcher?: EventDispatcher;
19
- private hasIntlContext;
20
17
  protected decorations: ReadonlyArray<Decoration>;
21
18
  reactComponentProps: P;
22
19
  view: EditorView;
@@ -24,7 +21,7 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
24
21
  contentDOM: HTMLElement | null | undefined;
25
22
  node: PMNode;
26
23
  key: string;
27
- constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps?: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, hasAnalyticsContext?: boolean, viewShouldUpdate?: shouldUpdate, hasIntlContext?: boolean);
24
+ constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps?: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, viewShouldUpdate?: shouldUpdate);
28
25
  /**
29
26
  * This method exists to move initialization logic out of the constructor,
30
27
  * so object can be initialized properly before calling render first time.
@@ -54,5 +51,5 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
54
51
  get dom(): HTMLElement;
55
52
  destroy(): void;
56
53
  private dispatchAnalyticsEvent;
57
- static fromComponent(component: React.ComponentType<React.PropsWithChildren<any>>, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, props?: ReactComponentProps, viewShouldUpdate?: (nextNode: PMNode) => boolean, hasIntlContext?: boolean): (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<ReactComponentProps>;
54
+ static fromComponent(component: React.ComponentType<React.PropsWithChildren<any>>, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, props?: ReactComponentProps, viewShouldUpdate?: (nextNode: PMNode) => boolean): (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<ReactComponentProps>;
58
55
  }
@@ -4,7 +4,6 @@ import { type EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import { type EventDispatcher } from '../event-dispatcher';
5
5
  import { type PortalProviderAPI } from '../portal';
6
6
  import ReactNodeView, { type getPosHandler, type ReactComponentProps, type shouldUpdate } from '../react-node-view';
7
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
8
7
  /**
9
8
  * A ReactNodeView that handles React components sensitive
10
9
  * to selection changes.
@@ -32,7 +31,7 @@ export declare class SelectionBasedNodeView<P = ReactComponentProps> extends Rea
32
31
  protected isSelectedNode: boolean;
33
32
  pos: number | undefined;
34
33
  posEnd: number | undefined;
35
- constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, hasContext?: boolean, viewShouldUpdate?: shouldUpdate, hasIntlContext?: boolean);
34
+ constructor(node: PMNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, reactComponentProps: P, reactComponent?: React.ComponentType<React.PropsWithChildren<any>>, viewShouldUpdate?: shouldUpdate);
36
35
  /**
37
36
  * Update current node's start and end positions.
38
37
  *
@@ -5,7 +5,6 @@ import type { Dispatch, EventDispatcher } from '../event-dispatcher';
5
5
  import { type PortalProviderAPI } from '../portal';
6
6
  import type { ProviderFactory } from '../provider-factory';
7
7
  import type { SafePlugin } from '../safe-plugin';
8
- import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
9
8
  import type { ErrorReporter } from '../utils';
10
9
  import type { EditorReactContext } from './editor-react-context';
11
10
  import type { FeatureFlags } from './feature-flags';
@@ -15,7 +14,7 @@ export type PMPluginFactoryParams = {
15
14
  eventDispatcher: EventDispatcher;
16
15
  providerFactory: ProviderFactory;
17
16
  errorReporter?: ErrorReporter;
18
- portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI;
17
+ portalProviderAPI: PortalProviderAPI;
19
18
  reactContext: () => EditorReactContext;
20
19
  dispatchAnalyticsEvent: DispatchAnalyticsEvent;
21
20
  featureFlags: FeatureFlags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "84.5.0",
3
+ "version": "85.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -56,7 +56,6 @@
56
56
  "./panel": "./src/panel.ts",
57
57
  "./analytics": "./src/analytics/index.ts",
58
58
  "./error-boundary": "./src/ui/ErrorBoundary/index.tsx",
59
- "./portal-provider": "./src/ui/PortalProvider/index.tsx",
60
59
  "./react-node-view": "./src/react-node-view/index.tsx",
61
60
  "./with-plugin-state": "./src/with-plugin-state/index.tsx",
62
61
  "./node-width": "./src/node-width/index.ts",
@@ -102,9 +101,8 @@
102
101
  "@atlaskit/analytics-listeners": "^8.10.0",
103
102
  "@atlaskit/analytics-namespaced-context": "^6.10.0",
104
103
  "@atlaskit/analytics-next": "^9.3.0",
105
- "@atlaskit/analytics-next-stable-react-context": "1.0.1",
106
104
  "@atlaskit/atlassian-context": "^0.0.0",
107
- "@atlaskit/button": "^18.3.0",
105
+ "@atlaskit/button": "^18.4.0",
108
106
  "@atlaskit/code": "^15.4.0",
109
107
  "@atlaskit/codemod-utils": "^4.2.0",
110
108
  "@atlaskit/custom-steps": "^0.4.0",
@@ -123,15 +121,15 @@
123
121
  "@atlaskit/media-client": "^27.3.0",
124
122
  "@atlaskit/media-client-react": "^2.0.0",
125
123
  "@atlaskit/media-common": "^11.3.0",
126
- "@atlaskit/media-file-preview": "^0.5.0",
124
+ "@atlaskit/media-file-preview": "^0.6.0",
127
125
  "@atlaskit/media-picker": "^66.4.0",
128
126
  "@atlaskit/media-ui": "^25.10.0",
129
127
  "@atlaskit/media-viewer": "48.6.11",
130
128
  "@atlaskit/mention": "^23.2.0",
131
- "@atlaskit/menu": "^2.7.0",
129
+ "@atlaskit/menu": "^2.8.0",
132
130
  "@atlaskit/platform-feature-flags": "^0.3.0",
133
131
  "@atlaskit/primitives": "^11.0.0",
134
- "@atlaskit/profilecard": "^19.15.0",
132
+ "@atlaskit/profilecard": "^19.16.0",
135
133
  "@atlaskit/section-message": "^6.5.0",
136
134
  "@atlaskit/smart-card": "^27.9.0",
137
135
  "@atlaskit/smart-user-picker": "^6.9.0",
@@ -139,7 +137,7 @@
139
137
  "@atlaskit/task-decision": "^17.10.0",
140
138
  "@atlaskit/textfield": "^6.4.0",
141
139
  "@atlaskit/theme": "^12.11.0",
142
- "@atlaskit/tokens": "^1.53.0",
140
+ "@atlaskit/tokens": "^1.54.0",
143
141
  "@atlaskit/tooltip": "^18.5.0",
144
142
  "@atlaskit/ufo": "^0.2.0",
145
143
  "@atlaskit/width-detector": "^4.2.0",
@@ -242,15 +240,9 @@
242
240
  "platform.editor.simplify-inline-cards-in-code-blocks_jw6t1": {
243
241
  "type": "boolean"
244
242
  },
245
- "platform.editor.a11y-element-browser": {
246
- "type": "boolean"
247
- },
248
243
  "platform_editor_tables_padding_increase": {
249
244
  "type": "boolean"
250
245
  },
251
- "platform.editor.text-alignment-keyboard-shortcuts": {
252
- "type": "boolean"
253
- },
254
246
  "platform.editor.a11y-table-context-menu_y4c9c": {
255
247
  "type": "boolean"
256
248
  },