@atlaskit/editor-core 187.28.0 → 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 +8 -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/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/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/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/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-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/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/package.json +2 -2
- 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
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.28.
|
|
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/"
|
|
@@ -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",
|
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
|
-
`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { indentList, outdentList, toggleOrderedList, toggleBulletList } from '../plugins/list/commands';
|
|
2
|
-
|
|
3
|
-
// getListCommands provides commands for manipulating lists in the document.
|
|
4
|
-
export const getListCommands = () => {
|
|
5
|
-
return {
|
|
6
|
-
indentList,
|
|
7
|
-
outdentList,
|
|
8
|
-
toggleOrderedList,
|
|
9
|
-
toggleBulletList
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { findRootParentListNode } from '../plugins/list/utils/find';
|
|
2
|
-
export const doesSelectionWhichStartsOrEndsInListContainEntireList = selection => {
|
|
3
|
-
const {
|
|
4
|
-
$from,
|
|
5
|
-
$to,
|
|
6
|
-
from,
|
|
7
|
-
to
|
|
8
|
-
} = selection;
|
|
9
|
-
const selectionParentListItemNodeResolvedPos = findRootParentListNode($from) || findRootParentListNode($to);
|
|
10
|
-
const selectionParentListNode = selectionParentListItemNodeResolvedPos === null || selectionParentListItemNodeResolvedPos === void 0 ? void 0 : selectionParentListItemNodeResolvedPos.parent;
|
|
11
|
-
if (!selectionParentListItemNodeResolvedPos || !selectionParentListNode) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
const startOfEntireList = $from.pos < $to.pos ? selectionParentListItemNodeResolvedPos.pos + $from.depth - 1 : selectionParentListItemNodeResolvedPos.pos + $to.depth - 1;
|
|
15
|
-
const endOfEntireList = $from.pos < $to.pos ? selectionParentListItemNodeResolvedPos.pos + selectionParentListNode.nodeSize - $to.depth - 1 : selectionParentListItemNodeResolvedPos.pos + selectionParentListNode.nodeSize - $from.depth - 1;
|
|
16
|
-
if (!startOfEntireList || !endOfEntireList) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (from < to) {
|
|
20
|
-
return startOfEntireList >= $from.pos && endOfEntireList <= $to.pos;
|
|
21
|
-
} else if (from > to) {
|
|
22
|
-
return startOfEntireList >= $to.pos && endOfEntireList <= $from.pos;
|
|
23
|
-
} else {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
-
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import { codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
7
|
-
export var listsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), blockNodesVerticalMargin, browser.safari ? codeBlockInListSafariFix : '');
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { indentList, outdentList, toggleOrderedList, toggleBulletList } from '../plugins/list/commands';
|
|
2
|
-
|
|
3
|
-
// getListCommands provides commands for manipulating lists in the document.
|
|
4
|
-
export var getListCommands = function getListCommands() {
|
|
5
|
-
return {
|
|
6
|
-
indentList: indentList,
|
|
7
|
-
outdentList: outdentList,
|
|
8
|
-
toggleOrderedList: toggleOrderedList,
|
|
9
|
-
toggleBulletList: toggleBulletList
|
|
10
|
-
};
|
|
11
|
-
};
|
package/dist/esm/utils/lists.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { findRootParentListNode } from '../plugins/list/utils/find';
|
|
2
|
-
export var doesSelectionWhichStartsOrEndsInListContainEntireList = function doesSelectionWhichStartsOrEndsInListContainEntireList(selection) {
|
|
3
|
-
var $from = selection.$from,
|
|
4
|
-
$to = selection.$to,
|
|
5
|
-
from = selection.from,
|
|
6
|
-
to = selection.to;
|
|
7
|
-
var selectionParentListItemNodeResolvedPos = findRootParentListNode($from) || findRootParentListNode($to);
|
|
8
|
-
var selectionParentListNode = selectionParentListItemNodeResolvedPos === null || selectionParentListItemNodeResolvedPos === void 0 ? void 0 : selectionParentListItemNodeResolvedPos.parent;
|
|
9
|
-
if (!selectionParentListItemNodeResolvedPos || !selectionParentListNode) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
var startOfEntireList = $from.pos < $to.pos ? selectionParentListItemNodeResolvedPos.pos + $from.depth - 1 : selectionParentListItemNodeResolvedPos.pos + $to.depth - 1;
|
|
13
|
-
var endOfEntireList = $from.pos < $to.pos ? selectionParentListItemNodeResolvedPos.pos + selectionParentListNode.nodeSize - $to.depth - 1 : selectionParentListItemNodeResolvedPos.pos + selectionParentListNode.nodeSize - $from.depth - 1;
|
|
14
|
-
if (!startOfEntireList || !endOfEntireList) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
if (from < to) {
|
|
18
|
-
return startOfEntireList >= $from.pos && endOfEntireList <= $to.pos;
|
|
19
|
-
} else if (from > to) {
|
|
20
|
-
return startOfEntireList >= $to.pos && endOfEntireList <= $from.pos;
|
|
21
|
-
} else {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const listsStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const getListCommands: () => {
|
|
2
|
-
indentList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.KEYBOARD | import("@atlaskit/editor-common/analytics").INPUT_METHOD.TOOLBAR) => import("..").Command;
|
|
3
|
-
outdentList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (inputMethod: (import("@atlaskit/editor-common/analytics").INPUT_METHOD.KEYBOARD | import("@atlaskit/editor-common/analytics").INPUT_METHOD.TOOLBAR) | undefined, featureFlags: import("@atlaskit/editor-common/types").FeatureFlags) => import("..").Command;
|
|
4
|
-
toggleOrderedList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (view: import("prosemirror-view").EditorView, inputMethod?: import("../plugins/list/commands").InputMethod) => boolean;
|
|
5
|
-
toggleBulletList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (view: import("prosemirror-view").EditorView, inputMethod?: import("../plugins/list/commands").InputMethod) => boolean;
|
|
6
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const listsStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const getListCommands: () => {
|
|
2
|
-
indentList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.KEYBOARD | import("@atlaskit/editor-common/analytics").INPUT_METHOD.TOOLBAR) => import("..").Command;
|
|
3
|
-
outdentList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (inputMethod: (import("@atlaskit/editor-common/analytics").INPUT_METHOD.KEYBOARD | import("@atlaskit/editor-common/analytics").INPUT_METHOD.TOOLBAR) | undefined, featureFlags: import("@atlaskit/editor-common/types").FeatureFlags) => import("..").Command;
|
|
4
|
-
toggleOrderedList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (view: import("prosemirror-view").EditorView, inputMethod?: import("../plugins/list/commands").InputMethod) => boolean;
|
|
5
|
-
toggleBulletList: (editorAnalyticsAPI: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI | undefined) => (view: import("prosemirror-view").EditorView, inputMethod?: import("../plugins/list/commands").InputMethod) => boolean;
|
|
6
|
-
};
|