@atlaskit/editor-plugin-selection-extension 11.1.21 → 11.1.23
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 +16 -0
- package/README.md +13 -1
- package/dist/cjs/pm-plugins/actions/insertAdfAtEndOfDoc.js +1 -1
- package/dist/es2019/pm-plugins/actions/insertAdfAtEndOfDoc.js +1 -1
- package/dist/esm/pm-plugins/actions/insertAdfAtEndOfDoc.js +1 -1
- package/dist/types/pm-plugins/actions/insertAdfAtEndOfDoc.d.ts +2 -2
- package/dist/types/pm-plugins/actions/replaceWithAdf.d.ts +1 -1
- package/dist/types/pm-plugins/utils/index.d.ts +2 -2
- package/dist/types/selectionExtensionPluginType.d.ts +1 -1
- package/dist/types/ui/menu/SelectionExtensionNestedDropdownMenu.d.ts +1 -1
- package/dist/types/ui/toolbar/SelectionExtensionDropdownMenu.d.ts +1 -1
- package/dist/types/ui/toolbar/SelectionExtensionItems.d.ts +1 -1
- package/dist/types/ui/toolbar-components.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/actions/insertAdfAtEndOfDoc.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/actions/replaceWithAdf.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/index.d.ts +2 -2
- package/dist/types-ts4.5/selectionExtensionPluginType.d.ts +1 -1
- package/dist/types-ts4.5/ui/menu/SelectionExtensionNestedDropdownMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/SelectionExtensionDropdownMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/SelectionExtensionItems.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar-components.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-extension
|
|
2
2
|
|
|
3
|
+
## 11.1.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fa146e17e08d6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fa146e17e08d6) -
|
|
8
|
+
Update README.md and 0-intro.tsx
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 11.1.22
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`7b7c52dff5d7d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b7c52dff5d7d) -
|
|
16
|
+
Fix eslint violations for type import syntax
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 11.1.21
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
# Editor
|
|
1
|
+
# Editor Plugin Selection Extension
|
|
2
2
|
|
|
3
3
|
Selection Extension plugin for confluence
|
|
4
4
|
|
|
5
5
|
**Note:** This component is designed for internal Atlassian development.
|
|
6
6
|
External contributors will be able to use this component but will not be able to submit issues.
|
|
7
7
|
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The Selection Extension plugin provides a framework for extending the Atlassian Editor with custom actions triggered by text and block selections. It enables the creation of custom menus, toolbars, and interactive components that respond to user selections within the editor.
|
|
11
|
+
|
|
12
|
+
## Key features
|
|
13
|
+
|
|
14
|
+
- **Custom selection extensions** - Register and manage custom extensions that respond to text and block selections
|
|
15
|
+
- **Toolbar and menu integration** - Seamlessly integrate custom actions into editor toolbars and block menus
|
|
16
|
+
- **Document manipulation** - Insert and replace content using ADF (Atlassian Document Format) at selected positions
|
|
17
|
+
- **Selection tracking** - Track and access detailed selection information including coordinates and content
|
|
18
|
+
- **Block menu support** - Extend block-level menus with custom actions and configurations
|
|
19
|
+
|
|
8
20
|
## Install
|
|
9
21
|
---
|
|
10
22
|
- **Install** - *yarn add @atlaskit/editor-plugin-selection-extension*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { CommandDispatch } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import {
|
|
4
|
+
import type { InsertAdfAtEndOfDocResult } from '../../types';
|
|
5
5
|
export declare const insertAdfAtEndOfDoc: (nodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => InsertAdfAtEndOfDocResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { SelectionExtensionPlugin } from '../../selectionExtensionPluginType';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { type EditorState, type Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { SelectionExtensionPlugin } from '../../selectionExtensionPluginType';
|
|
7
7
|
import type { SelectionExtensionSelectionInfo } from '../../types';
|
|
8
|
-
import {
|
|
8
|
+
import type { SelectionRange } from '../../types';
|
|
9
9
|
type SelectionInfo = {
|
|
10
10
|
nodePos: number;
|
|
11
11
|
selectedNode: PMNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
4
|
import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { ExtensionNestedDropdownMenuConfiguration } from '../../types';
|
|
3
3
|
export type SelectionExtensionNestedDropdownMenuProps = {
|
|
4
4
|
nestedDropdownMenu: ExtensionNestedDropdownMenuConfiguration;
|
|
5
5
|
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { type MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
5
|
-
import {
|
|
5
|
+
import type { MenuItemsType } from '../../types';
|
|
6
6
|
export type SelectionExtensionDropdownMenuProps = {
|
|
7
7
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
8
8
|
items: MenuItemsType;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import {
|
|
8
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import type { SelectionExtensionPlugin } from '../../selectionExtensionPluginType';
|
|
11
11
|
import type { SelectionExtension } from '../../types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
3
|
import type { SelectionExtensionPlugin } from '../selectionExtensionPluginType';
|
|
4
|
-
import {
|
|
4
|
+
import type { SelectionExtensionPluginOptions } from '../types';
|
|
5
5
|
type GetToolbarComponentsProps = {
|
|
6
6
|
api: ExtractInjectionAPI<SelectionExtensionPlugin> | undefined;
|
|
7
7
|
config: SelectionExtensionPluginOptions | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { CommandDispatch } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import {
|
|
4
|
+
import type { InsertAdfAtEndOfDocResult } from '../../types';
|
|
5
5
|
export declare const insertAdfAtEndOfDoc: (nodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => InsertAdfAtEndOfDocResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { SelectionExtensionPlugin } from '../../selectionExtensionPluginType';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { type EditorState, type Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { SelectionExtensionPlugin } from '../../selectionExtensionPluginType';
|
|
7
7
|
import type { SelectionExtensionSelectionInfo } from '../../types';
|
|
8
|
-
import {
|
|
8
|
+
import type { SelectionRange } from '../../types';
|
|
9
9
|
type SelectionInfo = {
|
|
10
10
|
nodePos: number;
|
|
11
11
|
selectedNode: PMNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
4
|
import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { ExtensionNestedDropdownMenuConfiguration } from '../../types';
|
|
3
3
|
export type SelectionExtensionNestedDropdownMenuProps = {
|
|
4
4
|
nestedDropdownMenu: ExtensionNestedDropdownMenuConfiguration;
|
|
5
5
|
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { type MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
5
|
-
import {
|
|
5
|
+
import type { MenuItemsType } from '../../types';
|
|
6
6
|
export type SelectionExtensionDropdownMenuProps = {
|
|
7
7
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
8
8
|
items: MenuItemsType;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import {
|
|
8
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import type { SelectionExtensionPlugin } from '../../selectionExtensionPluginType';
|
|
11
11
|
import type { SelectionExtension } from '../../types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
3
|
import type { SelectionExtensionPlugin } from '../selectionExtensionPluginType';
|
|
4
|
-
import {
|
|
4
|
+
import type { SelectionExtensionPluginOptions } from '../types';
|
|
5
5
|
type GetToolbarComponentsProps = {
|
|
6
6
|
api: ExtractInjectionAPI<SelectionExtensionPlugin> | undefined;
|
|
7
7
|
config: SelectionExtensionPluginOptions | undefined;
|
package/package.json
CHANGED