@atlaskit/editor-plugin-paste-options-toolbar 9.1.6 → 9.1.8

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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ /**
7
+ * A compact dropdown button for paste options, styled like floating toolbar buttons.
8
+ * Renders as a ToolbarButton with an icon and dropdown caret that opens a
9
+ * dropdown menu below. Used when AI actions are not visible and the paste
10
+ * options menu is the only content.
11
+ */
12
+ export declare const PasteOptionsDropdownButton: ({ children, elemBefore, elemAfter, label, testId, tooltipContent, }: {
13
+ children?: React.ReactNode;
14
+ elemAfter: React.ReactNode;
15
+ elemBefore: React.ReactNode;
16
+ label: string;
17
+ testId?: string;
18
+ tooltipContent?: string;
19
+ }) => JSX.Element;
@@ -33,6 +33,22 @@ export declare function getVisualEndBottom(editorView: EditorView, pasteEndPos:
33
33
  * Returns `null` if no block ancestor can be resolved to a DOM element.
34
34
  */
35
35
  export declare function findBlockAncestorDOM(editorView: EditorView, pos: number): HTMLElement | null;
36
+ /**
37
+ * Positions the paste menu inline, immediately to the right of the cursor
38
+ * at the paste end position, vertically centered with the line.
39
+ * Used for short pastes without AI actions.
40
+ */
41
+ export declare function onInlinePositionCalculated(editorView: EditorView, pasteEndPos: number, targetElement: HTMLElement, popupContentRef: React.RefObject<HTMLDivElement | null>): (position: {
42
+ bottom?: number;
43
+ left?: number;
44
+ right?: number;
45
+ top?: number;
46
+ }) => {
47
+ bottom?: number;
48
+ left?: number;
49
+ right?: number;
50
+ top: number;
51
+ };
36
52
  /**
37
53
  * Adjusts the position of the paste menu so that:
38
54
  *
@@ -2,8 +2,9 @@ import React from 'react';
2
2
  import type { RegisterComponent } from '@atlaskit/editor-ui-control-model';
3
3
  interface PasteActionsMenuContentProps {
4
4
  components: RegisterComponent[];
5
+ contentRef?: React.RefObject<HTMLDivElement | null>;
5
6
  onMouseDown: (e: React.MouseEvent) => void;
6
7
  onMouseEnter: () => void;
7
8
  }
8
- export declare const PasteActionsMenuContent: ({ onMouseDown, onMouseEnter, components, }: PasteActionsMenuContentProps) => React.JSX.Element;
9
+ export declare const PasteActionsMenuContent: ({ onMouseDown, onMouseEnter, components, contentRef, }: PasteActionsMenuContentProps) => React.JSX.Element;
9
10
  export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ /**
7
+ * A compact dropdown button for paste options, styled like floating toolbar buttons.
8
+ * Renders as a ToolbarButton with an icon and dropdown caret that opens a
9
+ * dropdown menu below. Used when AI actions are not visible and the paste
10
+ * options menu is the only content.
11
+ */
12
+ export declare const PasteOptionsDropdownButton: ({ children, elemBefore, elemAfter, label, testId, tooltipContent, }: {
13
+ children?: React.ReactNode;
14
+ elemAfter: React.ReactNode;
15
+ elemBefore: React.ReactNode;
16
+ label: string;
17
+ testId?: string;
18
+ tooltipContent?: string;
19
+ }) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar",
3
- "version": "9.1.6",
3
+ "version": "9.1.8",
4
4
  "description": "Paste options toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,6 +30,7 @@
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
32
  "@atlaskit/css": "^0.19.0",
33
+ "@atlaskit/dropdown-menu": "^16.8.0",
33
34
  "@atlaskit/editor-markdown-transformer": "^5.20.0",
34
35
  "@atlaskit/editor-plugin-analytics": "^8.0.0",
35
36
  "@atlaskit/editor-plugin-paste": "^9.0.0",
@@ -38,17 +39,17 @@
38
39
  "@atlaskit/editor-shared-styles": "^3.10.0",
39
40
  "@atlaskit/editor-toolbar": "^0.20.0",
40
41
  "@atlaskit/editor-ui-control-model": "^1.1.0",
41
- "@atlaskit/icon": "^33.0.0",
42
+ "@atlaskit/icon": "^33.1.0",
42
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
- "@atlaskit/primitives": "^18.0.0",
44
- "@atlaskit/tokens": "^11.1.0",
44
+ "@atlaskit/primitives": "^18.1.0",
45
+ "@atlaskit/tokens": "^11.4.0",
45
46
  "@babel/runtime": "^7.0.0",
46
47
  "@compiled/react": "^0.20.0",
47
48
  "@emotion/react": "^11.7.1",
48
49
  "react-intl-next": "npm:react-intl@^5.18.1"
49
50
  },
50
51
  "peerDependencies": {
51
- "@atlaskit/editor-common": "^112.8.0",
52
+ "@atlaskit/editor-common": "^112.12.0",
52
53
  "react": "^18.2.0",
53
54
  "react-dom": "^18.2.0"
54
55
  },