@atlaskit/editor-core 187.27.1 → 187.28.1
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 +19 -0
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +3 -3
- package/dist/cjs/create-editor/create-plugins-list.js +2 -2
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/plugins/base/index.js +7 -126
- package/dist/cjs/plugins/base/plugin.js +140 -0
- package/dist/cjs/plugins/base/pm-plugins/scroll-gutter.js +3 -9
- package/dist/cjs/plugins/index.js +2 -2
- package/dist/cjs/plugins/insert-block/types.js +5 -0
- package/dist/cjs/plugins/list/index.js +17 -0
- package/dist/cjs/plugins/list/utils/find.js +4 -3
- package/dist/cjs/plugins/paste/handlers.js +27 -3
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/cjs/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +58 -36
- package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +6 -6
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +3 -3
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +8 -9
- package/dist/cjs/test-utils.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +19 -18
- package/dist/cjs/ui/ToolbarFeedback/index.js +22 -16
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +3 -3
- package/dist/es2019/create-editor/create-plugins-list.js +1 -1
- package/dist/es2019/index.js +0 -1
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/plugins/base/index.js +2 -104
- package/dist/es2019/plugins/base/plugin.js +109 -0
- package/dist/es2019/plugins/base/pm-plugins/scroll-gutter.js +1 -4
- package/dist/es2019/plugins/index.js +1 -1
- package/dist/es2019/plugins/insert-block/types.js +1 -0
- package/dist/es2019/plugins/list/index.js +19 -0
- package/dist/es2019/plugins/list/utils/find.js +2 -2
- package/dist/es2019/plugins/paste/handlers.js +27 -3
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +62 -38
- package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +6 -6
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +3 -3
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +5 -6
- package/dist/es2019/test-utils.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +25 -3
- package/dist/es2019/ui/ToolbarFeedback/index.js +14 -9
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +3 -3
- package/dist/esm/create-editor/create-plugins-list.js +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/plugins/base/index.js +2 -123
- package/dist/esm/plugins/base/plugin.js +128 -0
- package/dist/esm/plugins/base/pm-plugins/scroll-gutter.js +1 -4
- package/dist/esm/plugins/index.js +1 -1
- package/dist/esm/plugins/insert-block/types.js +1 -0
- package/dist/esm/plugins/list/index.js +19 -0
- package/dist/esm/plugins/list/utils/find.js +2 -2
- package/dist/esm/plugins/paste/handlers.js +25 -3
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +60 -37
- package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +6 -6
- package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +3 -3
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +5 -6
- package/dist/esm/test-utils.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +6 -5
- package/dist/esm/ui/ToolbarFeedback/index.js +20 -14
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/plugins/base/index.d.ts +4 -16
- package/dist/types/plugins/base/plugin.d.ts +23 -0
- package/dist/types/plugins/base/pm-plugins/scroll-gutter.d.ts +0 -3
- package/dist/types/plugins/index.d.ts +1 -1
- package/dist/types/plugins/insert-block/index.d.ts +3 -19
- package/dist/types/plugins/insert-block/types.d.ts +19 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +3 -3
- package/dist/types/plugins/list/types.d.ts +1 -8
- package/dist/types/plugins/list/utils/find.d.ts +1 -1
- package/dist/types/plugins/paste/handlers.d.ts +4 -2
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +2 -1
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +5 -2
- package/dist/types/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +4 -1
- package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +3 -3
- package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +3 -2
- package/dist/types/ui/ToolbarFeedback/index.d.ts +1 -19
- package/dist/types/use-preset.d.ts +2 -8
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/base/index.d.ts +4 -18
- package/dist/types-ts4.5/plugins/base/plugin.d.ts +25 -0
- package/dist/types-ts4.5/plugins/base/pm-plugins/scroll-gutter.d.ts +0 -3
- package/dist/types-ts4.5/plugins/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/index.d.ts +3 -19
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +19 -0
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +3 -3
- package/dist/types-ts4.5/plugins/list/types.d.ts +1 -8
- package/dist/types-ts4.5/plugins/list/utils/find.d.ts +1 -1
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +4 -2
- package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +2 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/index.d.ts +5 -2
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +4 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/index.d.ts +3 -3
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +3 -2
- package/dist/types-ts4.5/ui/ToolbarFeedback/index.d.ts +1 -19
- package/dist/types-ts4.5/use-preset.d.ts +2 -8
- package/package.json +4 -4
- package/report.api.md +4 -58
- package/tmp/api-report-tmp.d.ts +4 -47
- package/dist/cjs/plugins/list/styles.js +0 -15
- package/dist/cjs/utils/list-commands.js +0 -17
- package/dist/cjs/utils/lists.js +0 -31
- package/dist/es2019/plugins/list/styles.js +0 -26
- package/dist/es2019/utils/list-commands.js +0 -11
- package/dist/es2019/utils/lists.js +0 -26
- package/dist/esm/plugins/list/styles.js +0 -7
- package/dist/esm/utils/list-commands.js +0 -11
- package/dist/esm/utils/lists.js +0 -24
- package/dist/types/plugins/list/styles.d.ts +0 -1
- package/dist/types/utils/list-commands.d.ts +0 -6
- package/dist/types/utils/lists.d.ts +0 -2
- package/dist/types-ts4.5/plugins/list/styles.d.ts +0 -1
- package/dist/types-ts4.5/utils/list-commands.d.ts +0 -6
- package/dist/types-ts4.5/utils/lists.d.ts +0 -2
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const GUTTER_SIZE_IN_PX = 120;
|
|
4
|
-
export declare const GUTTER_SIZE_MOBILE_IN_PX = 36;
|
|
5
|
-
export declare const GUTTER_SELECTOR = "#editor-scroll-gutter";
|
|
6
3
|
export type ScrollGutterPluginOptions = {
|
|
7
4
|
/** Element the page uses for scrolling */
|
|
8
5
|
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type { NextEditorPlugin
|
|
2
|
-
import type {
|
|
3
|
-
import type { EmojiPlugin } from '../emoji';
|
|
4
|
-
import type datePlugin from '../date';
|
|
5
|
-
import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
6
|
-
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
|
-
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
-
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
|
-
import type mentionsPlugin from '../mentions';
|
|
1
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { InsertBlockPluginDependencies } from './types';
|
|
10
3
|
export interface InsertBlockOptions {
|
|
11
4
|
allowTables?: boolean;
|
|
12
5
|
allowExpand?: boolean;
|
|
@@ -18,15 +11,6 @@ export interface InsertBlockOptions {
|
|
|
18
11
|
}
|
|
19
12
|
declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
|
|
20
13
|
pluginConfiguration: InsertBlockOptions | undefined;
|
|
21
|
-
dependencies:
|
|
22
|
-
typeof featureFlagsPlugin,
|
|
23
|
-
OptionalPlugin<typeof tablesPlugin>,
|
|
24
|
-
OptionalPlugin<typeof hyperlinkPlugin>,
|
|
25
|
-
OptionalPlugin<typeof datePlugin>,
|
|
26
|
-
OptionalPlugin<typeof analyticsPlugin>,
|
|
27
|
-
OptionalPlugin<ImageUploadPlugin>,
|
|
28
|
-
OptionalPlugin<typeof mentionsPlugin>,
|
|
29
|
-
OptionalPlugin<EmojiPlugin>
|
|
30
|
-
];
|
|
14
|
+
dependencies: InsertBlockPluginDependencies;
|
|
31
15
|
}>;
|
|
32
16
|
export default insertBlockPlugin;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
|
|
3
|
+
import type { EmojiPlugin } from '../emoji';
|
|
4
|
+
import type datePlugin from '../date';
|
|
5
|
+
import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
6
|
+
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
|
+
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
|
+
import type mentionsPlugin from '../mentions';
|
|
10
|
+
export type InsertBlockPluginDependencies = [
|
|
11
|
+
typeof featureFlagsPlugin,
|
|
12
|
+
OptionalPlugin<typeof tablesPlugin>,
|
|
13
|
+
OptionalPlugin<typeof hyperlinkPlugin>,
|
|
14
|
+
OptionalPlugin<typeof datePlugin>,
|
|
15
|
+
OptionalPlugin<typeof analyticsPlugin>,
|
|
16
|
+
OptionalPlugin<ImageUploadPlugin>,
|
|
17
|
+
OptionalPlugin<typeof mentionsPlugin>,
|
|
18
|
+
OptionalPlugin<EmojiPlugin>
|
|
19
|
+
];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { INPUT_METHOD, DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { EditorActionsOptions as EditorActions, FeatureFlags,
|
|
3
|
+
import type { EditorActionsOptions as EditorActions, FeatureFlags, ImageUploadPluginReferenceEvent, Command, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EmojiProvider } from '@atlaskit/emoji';
|
|
5
5
|
import type { BlockType } from '../../../block-type/types';
|
|
6
6
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
8
8
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { BlockMenuItem } from './create-items';
|
|
10
|
-
import type
|
|
10
|
+
import type { InsertBlockPluginDependencies } from '../../types';
|
|
11
11
|
export interface Props {
|
|
12
12
|
buttons: number;
|
|
13
13
|
isReducedSpacing: boolean;
|
|
@@ -48,7 +48,7 @@ export interface Props {
|
|
|
48
48
|
onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
|
|
49
49
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
50
50
|
featureFlags: FeatureFlags;
|
|
51
|
-
pluginInjectionApi?:
|
|
51
|
+
pluginInjectionApi?: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies>;
|
|
52
52
|
mentionsDisabled?: boolean;
|
|
53
53
|
}
|
|
54
54
|
export interface State {
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
2
1
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
+
export type { ListState } from '@atlaskit/editor-plugin-list';
|
|
3
3
|
export declare const MAX_NESTED_LIST_INDENTATION = 6;
|
|
4
|
-
export interface ListState {
|
|
5
|
-
bulletListActive: boolean;
|
|
6
|
-
bulletListDisabled: boolean;
|
|
7
|
-
orderedListActive: boolean;
|
|
8
|
-
orderedListDisabled: boolean;
|
|
9
|
-
decorationSet: DecorationSet;
|
|
10
|
-
}
|
|
11
4
|
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
@@ -7,4 +7,4 @@ export declare function findFirstParentListItemNode($pos: ResolvedPos): {
|
|
|
7
7
|
pos: number;
|
|
8
8
|
node: PMNode;
|
|
9
9
|
} | null;
|
|
10
|
-
export declare
|
|
10
|
+
export declare const findRootParentListNode: ($pos: ResolvedPos) => ResolvedPos | null;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { Command } from '../../types';
|
|
6
6
|
import type { InputMethodInsertMedia } from '../analytics';
|
|
7
7
|
import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
|
|
8
8
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
9
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
9
10
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
10
11
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
11
12
|
export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
|
|
12
|
-
export declare
|
|
13
|
+
export declare const doesSelectionWhichStartsOrEndsInListContainEntireList: (selection: Selection, findRootParentListNode: FindRootParentListNode | undefined) => boolean;
|
|
14
|
+
export declare function handlePastePanelOrDecisionContentIntoList(slice: Slice, findRootParentListNode: FindRootParentListNode | undefined): Command;
|
|
13
15
|
export declare function handlePasteLinkOnSelectedText(slice: Slice): Command;
|
|
14
16
|
export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEvent): Command;
|
|
15
17
|
export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
@@ -4,6 +4,7 @@ import type { Slice, Fragment, Schema } from '@atlaskit/editor-prosemirror/model
|
|
|
4
4
|
import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type pastePlugin from '../';
|
|
6
6
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
7
8
|
type PasteContext = {
|
|
8
9
|
type: PasteType;
|
|
9
10
|
asPlain?: boolean;
|
|
@@ -29,7 +30,7 @@ export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: C
|
|
|
29
30
|
export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
30
31
|
export declare const handleMarkdownWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
31
32
|
export declare const handleRichTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
32
|
-
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
33
|
+
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, findRootParentListNode: FindRootParentListNode | undefined) => Command;
|
|
33
34
|
export declare const handlePasteNonNestableBlockNodesIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
34
35
|
export declare const handleExpandWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
35
36
|
export declare const handleSelectedTableWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
5
|
+
import type { IndentationButtons } from './pm-plugins/indentation-buttons';
|
|
5
6
|
type Config = {
|
|
6
7
|
showIndentationButtons: boolean;
|
|
7
8
|
allowHeadingAndParagraphIndentation: boolean;
|
|
@@ -10,7 +11,9 @@ declare const toolbarListsIndentationPlugin: NextEditorPlugin<'toolbarListsInden
|
|
|
10
11
|
pluginConfiguration: Config;
|
|
11
12
|
dependencies: [
|
|
12
13
|
typeof featureFlagsPlugin,
|
|
14
|
+
ListPlugin,
|
|
13
15
|
OptionalPlugin<typeof analyticsPlugin>
|
|
14
16
|
];
|
|
17
|
+
sharedState: IndentationButtons | undefined;
|
|
15
18
|
}>;
|
|
16
19
|
export default toolbarListsIndentationPlugin;
|
package/dist/types-ts4.5/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { Dispatch } from '../../../event-dispatcher';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type toolbarListsIndentationPlugin from '../index';
|
|
4
6
|
export interface IndentationButtons {
|
|
5
7
|
indentDisabled: boolean;
|
|
6
8
|
outdentDisabled: boolean;
|
|
7
9
|
node: null | 'paragraph_heading' | 'list' | 'taskList';
|
|
8
10
|
}
|
|
9
11
|
export declare const pluginKey: PluginKey<IndentationButtons>;
|
|
10
|
-
export declare const createPlugin: ({ dispatch, showIndentationButtons, allowHeadingAndParagraphIndentation, }: {
|
|
12
|
+
export declare const createPlugin: ({ dispatch, showIndentationButtons, allowHeadingAndParagraphIndentation, api, }: {
|
|
11
13
|
dispatch: Dispatch;
|
|
12
14
|
showIndentationButtons: boolean;
|
|
13
15
|
allowHeadingAndParagraphIndentation: boolean;
|
|
16
|
+
api: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
14
17
|
}) => SafePlugin<IndentationButtons>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type
|
|
4
|
+
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type toolbarListsIndentationPlugin from '../index';
|
|
6
6
|
export interface Props {
|
|
7
7
|
editorView: EditorView;
|
|
8
8
|
featureFlags: FeatureFlags;
|
|
@@ -19,6 +19,6 @@ export interface Props {
|
|
|
19
19
|
showIndentationButtons?: boolean;
|
|
20
20
|
indentDisabled?: boolean;
|
|
21
21
|
outdentDisabled?: boolean;
|
|
22
|
-
|
|
22
|
+
pluginInjectionApi?: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
23
23
|
}
|
|
24
24
|
export default function ToolbarListsIndentation(props: Props): jsx.JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { ButtonName } from '../types';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type toolbarListsIndentationPlugin from '../index';
|
|
6
|
+
export declare const onItemActivated: (pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined) => ({ buttonName, editorView, featureFlags, }: {
|
|
6
7
|
featureFlags: FeatureFlags;
|
|
7
8
|
buttonName: ButtonName;
|
|
8
9
|
editorView: EditorView;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { PureComponent } from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
export type EditorProduct = 'bitbucket' | 'jira' | 'confluence' | 'stride' | undefined;
|
|
6
4
|
export interface Props {
|
|
7
5
|
/** @deprecated To pass package version use feedbackInfo property – <Editor feedbackInfo={{ packageVersion }} /> */
|
|
@@ -26,20 +24,4 @@ declare global {
|
|
|
26
24
|
ATL_JQ_PAGE_PROPS: any;
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
|
-
export default
|
|
30
|
-
static contextTypes: {
|
|
31
|
-
editorActions: PropTypes.Validator<object>;
|
|
32
|
-
};
|
|
33
|
-
state: State;
|
|
34
|
-
constructor(props: Props);
|
|
35
|
-
private handleRef;
|
|
36
|
-
showJiraCollectorDialogCallback?: () => void;
|
|
37
|
-
private getFeedbackInfo;
|
|
38
|
-
render(): jsx.JSX.Element | null;
|
|
39
|
-
private collectFeedback;
|
|
40
|
-
private toggleShowOptOutOption;
|
|
41
|
-
private openJiraIssueCollector;
|
|
42
|
-
private openFeedbackPopup;
|
|
43
|
-
private openLearnMorePage;
|
|
44
|
-
private hasJquery;
|
|
45
|
-
}
|
|
27
|
+
export default function ToolbarFeedback(props: Props): jsx.JSX.Element;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import type { DependencyList } from 'react';
|
|
2
2
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
3
|
-
import type { AllEditorPresetPluginTypes,
|
|
4
|
-
type ExtractNextEditorPlugins<Plugins extends AllEditorPresetPluginTypes[]> = {
|
|
5
|
-
[PluginNumber in keyof Plugins]: Plugins[PluginNumber] extends NextEditorPlugin<infer Name, infer Metadata> ? NextEditorPlugin<Name, Metadata> : Plugins[PluginNumber] extends [
|
|
6
|
-
NextEditorPlugin<infer Name, infer Metadata>,
|
|
7
|
-
any
|
|
8
|
-
] ? NextEditorPlugin<Name, Metadata> : never;
|
|
9
|
-
};
|
|
3
|
+
import type { AllEditorPresetPluginTypes, ExtractPublicEditorAPI } from '@atlaskit/editor-common/types';
|
|
10
4
|
interface PresetAPI<PluginNames extends string[] = [
|
|
11
5
|
], StackPlugins extends AllEditorPresetPluginTypes[] = [
|
|
12
6
|
]> {
|
|
13
|
-
editorApi:
|
|
7
|
+
editorApi: ExtractPublicEditorAPI<EditorPresetBuilder<PluginNames, StackPlugins>> | undefined;
|
|
14
8
|
preset: EditorPresetBuilder<PluginNames, StackPlugins>;
|
|
15
9
|
}
|
|
16
10
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.
|
|
3
|
+
"version": "187.28.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/code": "^14.6.0",
|
|
56
56
|
"@atlaskit/date": "^0.10.0",
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
58
|
-
"@atlaskit/editor-common": "^74.
|
|
58
|
+
"@atlaskit/editor-common": "^74.49.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
60
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/editor-plugin-guideline": "^0.3.4",
|
|
74
74
|
"@atlaskit/editor-plugin-hyperlink": "^0.3.0",
|
|
75
75
|
"@atlaskit/editor-plugin-image-upload": "^0.1.0",
|
|
76
|
-
"@atlaskit/editor-plugin-list": "^0.
|
|
76
|
+
"@atlaskit/editor-plugin-list": "^0.2.0",
|
|
77
77
|
"@atlaskit/editor-plugin-table": "^2.10.0",
|
|
78
78
|
"@atlaskit/editor-plugin-text-formatting": "^0.2.0",
|
|
79
79
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@atlaskit/textfield": "^5.6.0",
|
|
113
113
|
"@atlaskit/theme": "^12.5.0",
|
|
114
114
|
"@atlaskit/toggle": "^12.6.0",
|
|
115
|
-
"@atlaskit/tokens": "^1.
|
|
115
|
+
"@atlaskit/tokens": "^1.15.0",
|
|
116
116
|
"@atlaskit/tooltip": "^17.8.0",
|
|
117
117
|
"@atlaskit/width-detector": "^4.1.0",
|
|
118
118
|
"@babel/runtime": "^7.0.0",
|
package/report.api.md
CHANGED
|
@@ -51,7 +51,7 @@ import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
|
51
51
|
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
52
52
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
53
53
|
import type { EditorActionsOptions } from '@atlaskit/editor-common/types';
|
|
54
|
-
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
54
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
55
55
|
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
56
56
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
57
57
|
import { FeatureFlags as EditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
@@ -61,7 +61,6 @@ import { EditorReactContext } from '@atlaskit/editor-common/types';
|
|
|
61
61
|
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
62
62
|
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
63
63
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
64
|
-
import { EditorView as EditorView_2 } from 'prosemirror-view';
|
|
65
64
|
import { EmojiResource } from '@atlaskit/emoji/resource';
|
|
66
65
|
import { EmptyStateHandler } from '@atlaskit/editor-common/types';
|
|
67
66
|
import type { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
@@ -94,6 +93,7 @@ import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
|
|
|
94
93
|
import { jsx } from '@emotion/react';
|
|
95
94
|
import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
96
95
|
import type { LinkingOptions } from '@atlaskit/editor-common/types';
|
|
96
|
+
import { ListState } from '@atlaskit/editor-plugin-list';
|
|
97
97
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
98
98
|
import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
|
|
99
99
|
import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -131,7 +131,6 @@ import PropTypes from 'prop-types';
|
|
|
131
131
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
132
132
|
import type { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
133
133
|
import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
134
|
-
import { PureComponent } from 'react';
|
|
135
134
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
136
135
|
import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
|
|
137
136
|
import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
@@ -1053,25 +1052,6 @@ export function getDefaultPresetOptionsFromEditorProps(
|
|
|
1053
1052
|
createAnalyticsEvent?: CreateUIAnalyticsEvent,
|
|
1054
1053
|
): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
1055
1054
|
|
|
1056
|
-
// @public (undocumented)
|
|
1057
|
-
export const getListCommands: () => {
|
|
1058
|
-
indentList: (
|
|
1059
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
|
|
1060
|
-
) => (inputMethod?: INPUT_METHOD | INPUT_METHOD) => Command;
|
|
1061
|
-
outdentList: (
|
|
1062
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
|
|
1063
|
-
) => (
|
|
1064
|
-
inputMethod: (INPUT_METHOD | INPUT_METHOD) | undefined,
|
|
1065
|
-
featureFlags: EditorFeatureFlags,
|
|
1066
|
-
) => Command;
|
|
1067
|
-
toggleOrderedList: (
|
|
1068
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
|
|
1069
|
-
) => (view: EditorView_2, inputMethod?: ListInputMethod) => boolean;
|
|
1070
|
-
toggleBulletList: (
|
|
1071
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
|
|
1072
|
-
) => (view: EditorView_2, inputMethod?: ListInputMethod) => boolean;
|
|
1073
|
-
};
|
|
1074
|
-
|
|
1075
1055
|
// @public (undocumented)
|
|
1076
1056
|
export function getNodesCount(node: Node_2): Record<string, number>;
|
|
1077
1057
|
|
|
@@ -1208,19 +1188,7 @@ type Listener = (data: any) => void;
|
|
|
1208
1188
|
// @public (undocumented)
|
|
1209
1189
|
export type ListInputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
1210
1190
|
|
|
1211
|
-
|
|
1212
|
-
export interface ListState {
|
|
1213
|
-
// (undocumented)
|
|
1214
|
-
bulletListActive: boolean;
|
|
1215
|
-
// (undocumented)
|
|
1216
|
-
bulletListDisabled: boolean;
|
|
1217
|
-
// (undocumented)
|
|
1218
|
-
decorationSet: DecorationSet;
|
|
1219
|
-
// (undocumented)
|
|
1220
|
-
orderedListActive: boolean;
|
|
1221
|
-
// (undocumented)
|
|
1222
|
-
orderedListDisabled: boolean;
|
|
1223
|
-
}
|
|
1191
|
+
export { ListState };
|
|
1224
1192
|
|
|
1225
1193
|
// @public (undocumented)
|
|
1226
1194
|
export const listStateKey: PluginKey<ListState>;
|
|
@@ -1959,16 +1927,6 @@ interface SimpleEntry {
|
|
|
1959
1927
|
// @public (undocumented)
|
|
1960
1928
|
interface State {}
|
|
1961
1929
|
|
|
1962
|
-
// @public (undocumented)
|
|
1963
|
-
interface State_2 {
|
|
1964
|
-
// (undocumented)
|
|
1965
|
-
jiraIssueCollectorScriptLoading: boolean;
|
|
1966
|
-
// (undocumented)
|
|
1967
|
-
showOptOutOption?: boolean;
|
|
1968
|
-
// (undocumented)
|
|
1969
|
-
target?: HTMLElement;
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
1930
|
// @public (undocumented)
|
|
1973
1931
|
export const statusMessages: {
|
|
1974
1932
|
placeholder: {
|
|
@@ -2080,19 +2038,7 @@ interface TextSelectionData {
|
|
|
2080
2038
|
}
|
|
2081
2039
|
|
|
2082
2040
|
// @public (undocumented)
|
|
2083
|
-
export
|
|
2084
|
-
constructor(props: Props_3);
|
|
2085
|
-
// (undocumented)
|
|
2086
|
-
static contextTypes: {
|
|
2087
|
-
editorActions: PropTypes.Validator<object>;
|
|
2088
|
-
};
|
|
2089
|
-
// (undocumented)
|
|
2090
|
-
render(): jsx.JSX.Element | null;
|
|
2091
|
-
// (undocumented)
|
|
2092
|
-
showJiraCollectorDialogCallback?: () => void;
|
|
2093
|
-
// (undocumented)
|
|
2094
|
-
state: State_2;
|
|
2095
|
-
}
|
|
2041
|
+
export function ToolbarFeedback(props: Props_3): jsx.JSX.Element;
|
|
2096
2042
|
|
|
2097
2043
|
// @public (undocumented)
|
|
2098
2044
|
export const ToolbarHelp: React_2.FC<
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
|
40
40
|
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
41
41
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
42
42
|
import type { EditorActionsOptions } from '@atlaskit/editor-common/types';
|
|
43
|
-
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
43
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
44
44
|
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
45
45
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
46
46
|
import { FeatureFlags as EditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
@@ -50,7 +50,6 @@ import { EditorReactContext } from '@atlaskit/editor-common/types';
|
|
|
50
50
|
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
51
51
|
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
52
52
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
53
|
-
import { EditorView as EditorView_2 } from 'prosemirror-view';
|
|
54
53
|
import { EmojiResource } from '@atlaskit/emoji/resource';
|
|
55
54
|
import { EmptyStateHandler } from '@atlaskit/editor-common/types';
|
|
56
55
|
import type { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
@@ -83,6 +82,7 @@ import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
|
|
|
83
82
|
import { jsx } from '@emotion/react';
|
|
84
83
|
import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
85
84
|
import type { LinkingOptions } from '@atlaskit/editor-common/types';
|
|
85
|
+
import { ListState } from '@atlaskit/editor-plugin-list';
|
|
86
86
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
87
87
|
import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
|
|
88
88
|
import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -120,7 +120,6 @@ import PropTypes from 'prop-types';
|
|
|
120
120
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
121
121
|
import type { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
122
122
|
import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
123
|
-
import { PureComponent } from 'react';
|
|
124
123
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
125
124
|
import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
|
|
126
125
|
import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
@@ -970,14 +969,6 @@ interface GapSelectionData {
|
|
|
970
969
|
// @public (undocumented)
|
|
971
970
|
export function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
972
971
|
|
|
973
|
-
// @public (undocumented)
|
|
974
|
-
export const getListCommands: () => {
|
|
975
|
-
indentList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: INPUT_METHOD | INPUT_METHOD) => Command;
|
|
976
|
-
outdentList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: (INPUT_METHOD | INPUT_METHOD) | undefined, featureFlags: EditorFeatureFlags) => Command;
|
|
977
|
-
toggleOrderedList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView_2, inputMethod?: ListInputMethod) => boolean;
|
|
978
|
-
toggleBulletList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView_2, inputMethod?: ListInputMethod) => boolean;
|
|
979
|
-
};
|
|
980
|
-
|
|
981
972
|
// @public (undocumented)
|
|
982
973
|
export function getNodesCount(node: Node_2): Record<string, number>;
|
|
983
974
|
|
|
@@ -1074,19 +1065,7 @@ type Listener = (data: any) => void;
|
|
|
1074
1065
|
// @public (undocumented)
|
|
1075
1066
|
export type ListInputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
1076
1067
|
|
|
1077
|
-
|
|
1078
|
-
export interface ListState {
|
|
1079
|
-
// (undocumented)
|
|
1080
|
-
bulletListActive: boolean;
|
|
1081
|
-
// (undocumented)
|
|
1082
|
-
bulletListDisabled: boolean;
|
|
1083
|
-
// (undocumented)
|
|
1084
|
-
decorationSet: DecorationSet;
|
|
1085
|
-
// (undocumented)
|
|
1086
|
-
orderedListActive: boolean;
|
|
1087
|
-
// (undocumented)
|
|
1088
|
-
orderedListDisabled: boolean;
|
|
1089
|
-
}
|
|
1068
|
+
export { ListState }
|
|
1090
1069
|
|
|
1091
1070
|
// @public (undocumented)
|
|
1092
1071
|
export const listStateKey: PluginKey<ListState>;
|
|
@@ -1740,16 +1719,6 @@ interface SimpleEntry {
|
|
|
1740
1719
|
interface State {
|
|
1741
1720
|
}
|
|
1742
1721
|
|
|
1743
|
-
// @public (undocumented)
|
|
1744
|
-
interface State_2 {
|
|
1745
|
-
// (undocumented)
|
|
1746
|
-
jiraIssueCollectorScriptLoading: boolean;
|
|
1747
|
-
// (undocumented)
|
|
1748
|
-
showOptOutOption?: boolean;
|
|
1749
|
-
// (undocumented)
|
|
1750
|
-
target?: HTMLElement;
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
1722
|
// @public (undocumented)
|
|
1754
1723
|
export const statusMessages: {
|
|
1755
1724
|
placeholder: {
|
|
@@ -1850,19 +1819,7 @@ interface TextSelectionData {
|
|
|
1850
1819
|
}
|
|
1851
1820
|
|
|
1852
1821
|
// @public (undocumented)
|
|
1853
|
-
export
|
|
1854
|
-
constructor(props: Props_3);
|
|
1855
|
-
// (undocumented)
|
|
1856
|
-
static contextTypes: {
|
|
1857
|
-
editorActions: PropTypes.Validator<object>;
|
|
1858
|
-
};
|
|
1859
|
-
// (undocumented)
|
|
1860
|
-
render(): jsx.JSX.Element | null;
|
|
1861
|
-
// (undocumented)
|
|
1862
|
-
showJiraCollectorDialogCallback?: () => void;
|
|
1863
|
-
// (undocumented)
|
|
1864
|
-
state: State_2;
|
|
1865
|
-
}
|
|
1822
|
+
export function ToolbarFeedback(props: Props_3): jsx.JSX.Element;
|
|
1866
1823
|
|
|
1867
1824
|
// @public (undocumented)
|
|
1868
1825
|
export const ToolbarHelp: React_2.FC<WithIntlProps<Props_2 & WrappedComponentProps<"intl">>> & {
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.listsStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
|
-
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
|
-
var _templateObject;
|
|
14
|
-
var listsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: 4px 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n }\n"])), _editorSharedStyles.blockNodesVerticalMargin, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
15
|
-
exports.listsStyles = listsStyles;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getListCommands = void 0;
|
|
7
|
-
var _commands = require("../plugins/list/commands");
|
|
8
|
-
// getListCommands provides commands for manipulating lists in the document.
|
|
9
|
-
var getListCommands = function getListCommands() {
|
|
10
|
-
return {
|
|
11
|
-
indentList: _commands.indentList,
|
|
12
|
-
outdentList: _commands.outdentList,
|
|
13
|
-
toggleOrderedList: _commands.toggleOrderedList,
|
|
14
|
-
toggleBulletList: _commands.toggleBulletList
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
exports.getListCommands = getListCommands;
|
package/dist/cjs/utils/lists.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.doesSelectionWhichStartsOrEndsInListContainEntireList = void 0;
|
|
7
|
-
var _find = require("../plugins/list/utils/find");
|
|
8
|
-
var doesSelectionWhichStartsOrEndsInListContainEntireList = function doesSelectionWhichStartsOrEndsInListContainEntireList(selection) {
|
|
9
|
-
var $from = selection.$from,
|
|
10
|
-
$to = selection.$to,
|
|
11
|
-
from = selection.from,
|
|
12
|
-
to = selection.to;
|
|
13
|
-
var selectionParentListItemNodeResolvedPos = (0, _find.findRootParentListNode)($from) || (0, _find.findRootParentListNode)($to);
|
|
14
|
-
var selectionParentListNode = selectionParentListItemNodeResolvedPos === null || selectionParentListItemNodeResolvedPos === void 0 ? void 0 : selectionParentListItemNodeResolvedPos.parent;
|
|
15
|
-
if (!selectionParentListItemNodeResolvedPos || !selectionParentListNode) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
var startOfEntireList = $from.pos < $to.pos ? selectionParentListItemNodeResolvedPos.pos + $from.depth - 1 : selectionParentListItemNodeResolvedPos.pos + $to.depth - 1;
|
|
19
|
-
var endOfEntireList = $from.pos < $to.pos ? selectionParentListItemNodeResolvedPos.pos + selectionParentListNode.nodeSize - $to.depth - 1 : selectionParentListItemNodeResolvedPos.pos + selectionParentListNode.nodeSize - $from.depth - 1;
|
|
20
|
-
if (!startOfEntireList || !endOfEntireList) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
if (from < to) {
|
|
24
|
-
return startOfEntireList >= $from.pos && endOfEntireList <= $to.pos;
|
|
25
|
-
} else if (from > to) {
|
|
26
|
-
return startOfEntireList >= $to.pos && endOfEntireList <= $from.pos;
|
|
27
|
-
} else {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.doesSelectionWhichStartsOrEndsInListContainEntireList = doesSelectionWhichStartsOrEndsInListContainEntireList;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
3
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
4
|
-
import { codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
5
|
-
export const listsStyles = css`
|
|
6
|
-
.ProseMirror {
|
|
7
|
-
li {
|
|
8
|
-
position: relative;
|
|
9
|
-
|
|
10
|
-
> p:not(:first-child) {
|
|
11
|
-
margin: 4px 0 0 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// In SSR the above rule will apply to all p tags because first-child would be a style tag.
|
|
15
|
-
// The following rule resets the first p tag back to its original margin
|
|
16
|
-
// defined in packages/editor/editor-common/src/styles/shared/paragraph.ts
|
|
17
|
-
> style:first-child + p {
|
|
18
|
-
margin-top: ${blockNodesVerticalMargin};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
& :not([data-node-type='decisionList']) > li {
|
|
23
|
-
${browser.safari ? codeBlockInListSafariFix : ''}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
`;
|