@atlaskit/editor-plugin-selection-extension 3.4.3 → 3.4.4
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 +6 -0
- package/dist/cjs/pm-plugins/utils/getOffsetByPath.js +1 -0
- package/dist/es2019/pm-plugins/utils/getOffsetByPath.js +1 -0
- package/dist/esm/pm-plugins/utils/getOffsetByPath.js +1 -0
- package/dist/types/pm-plugins/actions.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +9 -9
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/ui/extensions.d.ts +1 -1
- package/dist/types/ui/toolbar/SelectionExtensionDropdownMenu.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +9 -9
- package/dist/types-ts4.5/types/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/extensions.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/SelectionExtensionDropdownMenu.d.ts +6 -6
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,7 @@ function getOffsetByPath(root, pos, pointer) {
|
|
|
20
20
|
|
|
21
21
|
for (var i = 1; i < len; i++) {
|
|
22
22
|
var key = parts[i];
|
|
23
|
+
// @ts-ignore - TS1501 TypeScript 5.9.2 upgrade
|
|
23
24
|
if (ref instanceof _model.Fragment && /^[0-9]+$/.test(key)) {
|
|
24
25
|
var index = parseInt(key, 10);
|
|
25
26
|
if (index >= ref.childCount) {
|
|
@@ -13,6 +13,7 @@ export function getOffsetByPath(root, pos, pointer, from = 0, to) {
|
|
|
13
13
|
|
|
14
14
|
for (let i = 1; i < len; i++) {
|
|
15
15
|
const key = parts[i];
|
|
16
|
+
// @ts-ignore - TS1501 TypeScript 5.9.2 upgrade
|
|
16
17
|
if (ref instanceof Fragment && /^[0-9]+$/u.test(key)) {
|
|
17
18
|
let index = parseInt(key, 10);
|
|
18
19
|
if (index >= ref.childCount) {
|
|
@@ -15,6 +15,7 @@ export function getOffsetByPath(root, pos, pointer) {
|
|
|
15
15
|
|
|
16
16
|
for (var i = 1; i < len; i++) {
|
|
17
17
|
var key = parts[i];
|
|
18
|
+
// @ts-ignore - TS1501 TypeScript 5.9.2 upgrade
|
|
18
19
|
if (ref instanceof Fragment && /^[0-9]+$/.test(key)) {
|
|
19
20
|
var index = parseInt(key, 10);
|
|
20
21
|
if (index >= ref.childCount) {
|
|
@@ -3,6 +3,6 @@ import type { CommandDispatch } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { type LinkInsertionOption } from '../types';
|
|
5
5
|
export declare const insertSmartLinks: (linkInsertionOption: LinkInsertionOption[], selectedNodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => {
|
|
6
|
-
status:
|
|
6
|
+
status: "success" | "error";
|
|
7
7
|
message?: string;
|
|
8
8
|
};
|
|
@@ -4,10 +4,10 @@ import { type SelectionExtensionPluginState } from '../types';
|
|
|
4
4
|
export declare const selectionExtensionPluginKey: PluginKey<SelectionExtensionPluginState>;
|
|
5
5
|
export declare const createPlugin: () => SafePlugin<SelectionExtensionPluginState | {
|
|
6
6
|
activeExtension: any;
|
|
7
|
-
selectedNode?: import("prosemirror-model").Node
|
|
8
|
-
nodePos?: number
|
|
9
|
-
startTrackChanges?: boolean
|
|
10
|
-
docChangedAfterClick?: boolean
|
|
7
|
+
selectedNode?: import("prosemirror-model").Node;
|
|
8
|
+
nodePos?: number;
|
|
9
|
+
startTrackChanges?: boolean;
|
|
10
|
+
docChangedAfterClick?: boolean;
|
|
11
11
|
} | {
|
|
12
12
|
selectedNode: any;
|
|
13
13
|
nodePos: any;
|
|
@@ -17,15 +17,15 @@ export declare const createPlugin: () => SafePlugin<SelectionExtensionPluginStat
|
|
|
17
17
|
extension: import("../types").SelectionExtension;
|
|
18
18
|
selection: import("../types").SelectionExtensionSelectionInfo;
|
|
19
19
|
coords: import("../types").SelectionExtensionCoords;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
} | {
|
|
22
22
|
startTrackChanges: any;
|
|
23
23
|
activeExtension?: {
|
|
24
24
|
extension: import("../types").SelectionExtension;
|
|
25
25
|
selection: import("../types").SelectionExtensionSelectionInfo;
|
|
26
26
|
coords: import("../types").SelectionExtensionCoords;
|
|
27
|
-
}
|
|
28
|
-
selectedNode?: import("prosemirror-model").Node
|
|
29
|
-
nodePos?: number
|
|
30
|
-
docChangedAfterClick?: boolean
|
|
27
|
+
};
|
|
28
|
+
selectedNode?: import("prosemirror-model").Node;
|
|
29
|
+
nodePos?: number;
|
|
30
|
+
docChangedAfterClick?: boolean;
|
|
31
31
|
}>;
|
|
@@ -12,7 +12,7 @@ export type ToolbarItemExtension = {
|
|
|
12
12
|
* @returns Array of ToolbarItemExtension objects
|
|
13
13
|
* @example
|
|
14
14
|
*/
|
|
15
|
-
export declare const getToolbarItemExtensions: (extensionList: ExtensionConfiguration[], toolbarType:
|
|
15
|
+
export declare const getToolbarItemExtensions: (extensionList: ExtensionConfiguration[], toolbarType: "primaryToolbar" | "inlineToolbar") => ToolbarItemExtension[];
|
|
16
16
|
/**
|
|
17
17
|
* From the full list of extensions, extract only those that have a menu item configuration
|
|
18
18
|
* for the specified source (either 'first-party' or 'external').
|
|
@@ -13,18 +13,18 @@ export type SelectionExtensionDropdownMenuProps = {
|
|
|
13
13
|
} & WrappedComponentProps;
|
|
14
14
|
export declare const SelectionExtensionDropdownMenu: React.FC<import("react-intl-next").WithIntlProps<{
|
|
15
15
|
items: MenuItemsType;
|
|
16
|
-
onItemActivated?: (
|
|
16
|
+
onItemActivated?: (attrs: {
|
|
17
17
|
item: MenuItem;
|
|
18
18
|
shouldCloseMenu?: boolean;
|
|
19
|
-
}) => void
|
|
20
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI
|
|
19
|
+
}) => void;
|
|
20
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
21
21
|
} & WrappedComponentProps>> & {
|
|
22
22
|
WrappedComponent: React.ComponentType<{
|
|
23
23
|
items: MenuItemsType;
|
|
24
|
-
onItemActivated?: (
|
|
24
|
+
onItemActivated?: (attrs: {
|
|
25
25
|
item: MenuItem;
|
|
26
26
|
shouldCloseMenu?: boolean;
|
|
27
|
-
}) => void
|
|
28
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI
|
|
27
|
+
}) => void;
|
|
28
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
29
29
|
} & WrappedComponentProps>;
|
|
30
30
|
};
|
|
@@ -3,6 +3,6 @@ import type { CommandDispatch } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { type LinkInsertionOption } from '../types';
|
|
5
5
|
export declare const insertSmartLinks: (linkInsertionOption: LinkInsertionOption[], selectedNodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => {
|
|
6
|
-
status:
|
|
6
|
+
status: "success" | "error";
|
|
7
7
|
message?: string;
|
|
8
8
|
};
|
|
@@ -4,10 +4,10 @@ import { type SelectionExtensionPluginState } from '../types';
|
|
|
4
4
|
export declare const selectionExtensionPluginKey: PluginKey<SelectionExtensionPluginState>;
|
|
5
5
|
export declare const createPlugin: () => SafePlugin<SelectionExtensionPluginState | {
|
|
6
6
|
activeExtension: any;
|
|
7
|
-
selectedNode?: import("prosemirror-model").Node
|
|
8
|
-
nodePos?: number
|
|
9
|
-
startTrackChanges?: boolean
|
|
10
|
-
docChangedAfterClick?: boolean
|
|
7
|
+
selectedNode?: import("prosemirror-model").Node;
|
|
8
|
+
nodePos?: number;
|
|
9
|
+
startTrackChanges?: boolean;
|
|
10
|
+
docChangedAfterClick?: boolean;
|
|
11
11
|
} | {
|
|
12
12
|
selectedNode: any;
|
|
13
13
|
nodePos: any;
|
|
@@ -17,15 +17,15 @@ export declare const createPlugin: () => SafePlugin<SelectionExtensionPluginStat
|
|
|
17
17
|
extension: import("../types").SelectionExtension;
|
|
18
18
|
selection: import("../types").SelectionExtensionSelectionInfo;
|
|
19
19
|
coords: import("../types").SelectionExtensionCoords;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
} | {
|
|
22
22
|
startTrackChanges: any;
|
|
23
23
|
activeExtension?: {
|
|
24
24
|
extension: import("../types").SelectionExtension;
|
|
25
25
|
selection: import("../types").SelectionExtensionSelectionInfo;
|
|
26
26
|
coords: import("../types").SelectionExtensionCoords;
|
|
27
|
-
}
|
|
28
|
-
selectedNode?: import("prosemirror-model").Node
|
|
29
|
-
nodePos?: number
|
|
30
|
-
docChangedAfterClick?: boolean
|
|
27
|
+
};
|
|
28
|
+
selectedNode?: import("prosemirror-model").Node;
|
|
29
|
+
nodePos?: number;
|
|
30
|
+
docChangedAfterClick?: boolean;
|
|
31
31
|
}>;
|
|
@@ -12,7 +12,7 @@ export type ToolbarItemExtension = {
|
|
|
12
12
|
* @returns Array of ToolbarItemExtension objects
|
|
13
13
|
* @example
|
|
14
14
|
*/
|
|
15
|
-
export declare const getToolbarItemExtensions: (extensionList: ExtensionConfiguration[], toolbarType:
|
|
15
|
+
export declare const getToolbarItemExtensions: (extensionList: ExtensionConfiguration[], toolbarType: "primaryToolbar" | "inlineToolbar") => ToolbarItemExtension[];
|
|
16
16
|
/**
|
|
17
17
|
* From the full list of extensions, extract only those that have a menu item configuration
|
|
18
18
|
* for the specified source (either 'first-party' or 'external').
|
|
@@ -13,18 +13,18 @@ export type SelectionExtensionDropdownMenuProps = {
|
|
|
13
13
|
} & WrappedComponentProps;
|
|
14
14
|
export declare const SelectionExtensionDropdownMenu: React.FC<import("react-intl-next").WithIntlProps<{
|
|
15
15
|
items: MenuItemsType;
|
|
16
|
-
onItemActivated?: (
|
|
16
|
+
onItemActivated?: (attrs: {
|
|
17
17
|
item: MenuItem;
|
|
18
18
|
shouldCloseMenu?: boolean;
|
|
19
|
-
}) => void
|
|
20
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI
|
|
19
|
+
}) => void;
|
|
20
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
21
21
|
} & WrappedComponentProps>> & {
|
|
22
22
|
WrappedComponent: React.ComponentType<{
|
|
23
23
|
items: MenuItemsType;
|
|
24
|
-
onItemActivated?: (
|
|
24
|
+
onItemActivated?: (attrs: {
|
|
25
25
|
item: MenuItem;
|
|
26
26
|
shouldCloseMenu?: boolean;
|
|
27
|
-
}) => void
|
|
28
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI
|
|
27
|
+
}) => void;
|
|
28
|
+
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
29
29
|
} & WrappedComponentProps>;
|
|
30
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-extension",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,27 +35,27 @@
|
|
|
35
35
|
".": "./src/index.ts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@atlaskit/adf-utils": "^19.
|
|
38
|
+
"@atlaskit/adf-utils": "^19.21.0",
|
|
39
39
|
"@atlaskit/editor-json-transformer": "^8.25.0",
|
|
40
40
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-primary-toolbar": "^4.1.0",
|
|
43
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^4.
|
|
43
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^4.3.0",
|
|
44
44
|
"@atlaskit/editor-plugin-user-preferences": "^1.2.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
46
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
46
|
+
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
47
47
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
48
|
-
"@atlaskit/icon": "^27.
|
|
48
|
+
"@atlaskit/icon": "^27.12.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/primitives": "^14.11.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^10.0.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"lodash": "^4.17.21",
|
|
54
54
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
55
55
|
"uuid": "^3.1.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@atlaskit/editor-common": "^107.
|
|
58
|
+
"@atlaskit/editor-common": "^107.25.0",
|
|
59
59
|
"react": "^18.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"@atlaskit/visual-regression": "workspace:^",
|
|
66
66
|
"@testing-library/react": "^13.4.0",
|
|
67
67
|
"react-dom": "^18.2.0",
|
|
68
|
-
"typescript": "~5.4.2",
|
|
69
68
|
"wait-for-expect": "^1.2.0"
|
|
70
69
|
},
|
|
71
70
|
"techstack": {
|