@atlaskit/editor-core 187.10.8 → 187.11.0
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 +10 -0
- package/dist/cjs/index.js +2 -94
- package/dist/cjs/plugins/help-dialog/ui/index.js +42 -42
- package/dist/cjs/plugins/paste/handlers.js +4 -6
- package/dist/cjs/plugins/text-formatting/actions.js +188 -0
- package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +1 -180
- package/dist/cjs/plugins/text-formatting/index.js +17 -0
- package/dist/cjs/plugins/text-formatting/pm-plugins/keymap.js +8 -8
- package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +8 -8
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +16 -16
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +8 -8
- package/dist/cjs/plugins/text-formatting/utils.js +8 -36
- package/dist/cjs/ui/ContentStyles/index.js +8 -9
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +0 -2
- package/dist/es2019/plugins/help-dialog/ui/index.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +5 -7
- package/dist/es2019/plugins/text-formatting/actions.js +161 -0
- package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +1 -159
- package/dist/es2019/plugins/text-formatting/index.js +17 -0
- package/dist/es2019/plugins/text-formatting/pm-plugins/keymap.js +8 -8
- package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +1 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -9
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +1 -1
- package/dist/es2019/plugins/text-formatting/utils.js +1 -29
- package/dist/es2019/ui/ContentStyles/index.js +2 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/plugins/help-dialog/ui/index.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +5 -7
- package/dist/esm/plugins/text-formatting/actions.js +168 -0
- package/dist/esm/plugins/text-formatting/commands/text-formatting.js +1 -166
- package/dist/esm/plugins/text-formatting/index.js +17 -0
- package/dist/esm/plugins/text-formatting/pm-plugins/keymap.js +8 -8
- package/dist/esm/plugins/text-formatting/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +1 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -9
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +1 -1
- package/dist/esm/plugins/text-formatting/utils.js +6 -33
- package/dist/esm/ui/ContentStyles/index.js +2 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +6 -4
- package/dist/types/labs/next/presets/default.d.ts +78 -15
- package/dist/types/plugins/media/ui/ResizableMediaSingle/guidelines.d.ts +1 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -2
- package/dist/types/plugins/text-formatting/actions.d.ts +20 -0
- package/dist/types/plugins/text-formatting/commands/text-formatting.d.ts +0 -31
- package/dist/types/plugins/text-formatting/index.d.ts +18 -2
- package/dist/types/plugins/text-formatting/pm-plugins/main.d.ts +1 -2
- package/dist/types/plugins/text-formatting/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +1 -5
- package/dist/types/types/editor-props.d.ts +1 -2
- package/dist/types/ui/ContentStyles/index.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +6 -4
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +78 -15
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/guidelines.d.ts +1 -1
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +1 -2
- package/dist/types-ts4.5/plugins/text-formatting/actions.d.ts +20 -0
- package/dist/types-ts4.5/plugins/text-formatting/commands/text-formatting.d.ts +0 -31
- package/dist/types-ts4.5/plugins/text-formatting/index.d.ts +18 -2
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/main.d.ts +1 -2
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types-ts4.5/plugins/text-formatting/utils.d.ts +1 -5
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +1 -1
- package/package.json +2 -2
- package/report.api.md +31 -145
- package/tmp/api-report-tmp.d.ts +30 -118
- package/dist/cjs/plugins/text-formatting/styles.js +0 -15
- package/dist/cjs/plugins/text-formatting/types.js +0 -5
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +0 -95
- package/dist/es2019/plugins/text-formatting/styles.js +0 -5
- package/dist/es2019/plugins/text-formatting/types.js +0 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +0 -88
- package/dist/esm/plugins/text-formatting/styles.js +0 -7
- package/dist/esm/plugins/text-formatting/types.js +0 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +0 -88
- package/dist/types/plugins/text-formatting/styles.d.ts +0 -2
- package/dist/types/plugins/text-formatting/types.d.ts +0 -30
- package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +0 -87
- package/dist/types-ts4.5/plugins/text-formatting/styles.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-formatting/types.d.ts +0 -30
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +0 -87
package/dist/types/index.d.ts
CHANGED
|
@@ -21,8 +21,6 @@ export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommen
|
|
|
21
21
|
export type { QuickInsertProvider, QuickInsertItem, QuickInsertItemId, QuickInsertActionInsert, } from '@atlaskit/editor-common/provider-factory';
|
|
22
22
|
export { stateKey as mediaPluginKey } from './plugins/media/pm-plugins/main';
|
|
23
23
|
export { mentionPluginKey } from './plugins/mentions';
|
|
24
|
-
export { pluginKey as textFormattingStateKey } from './plugins/text-formatting/pm-plugins/main';
|
|
25
|
-
export type { TextFormattingState } from './plugins/text-formatting/pm-plugins/main';
|
|
26
24
|
export { textColorPluginKey } from './plugins/text-color';
|
|
27
25
|
export type { TextColorPluginState } from './plugins/text-color';
|
|
28
26
|
export { changeColor } from './plugins/text-color/commands/change-color';
|
|
@@ -32,10 +30,9 @@ export type { BlockTypeState } from './plugins';
|
|
|
32
30
|
export { pluginKey as listStateKey } from './plugins/list/pm-plugins/main';
|
|
33
31
|
export type { ListState } from './plugins/list/types';
|
|
34
32
|
export type { InputMethod as ListInputMethod } from './plugins/list/commands';
|
|
35
|
-
export { toggleSuperscript, toggleSuperscriptWithAnalytics, toggleSubscript, toggleSubscriptWithAnalytics, toggleStrike, toggleStrikeWithAnalytics, toggleCode, toggleCodeWithAnalytics, toggleUnderline, toggleUnderlineWithAnalytics, toggleEm, toggleEmWithAnalytics, toggleStrong, toggleStrongWithAnalytics, } from './plugins/text-formatting/commands/text-formatting';
|
|
36
33
|
export { subscribeToToolbarAndPickerUpdates } from './plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates';
|
|
37
34
|
export { subscribeTypeAheadUpdates } from './plugins/view-update-subscription/subscribe/type-ahead-updates';
|
|
38
|
-
export type { InputMethodToolbar as TextFormattingInputMethodToolbar, InputMethodBasic as TextFormattingInputMethodBasic, } from '
|
|
35
|
+
export type { InputMethodToolbar as TextFormattingInputMethodToolbar, InputMethodBasic as TextFormattingInputMethodBasic, } from '@atlaskit/editor-common/types';
|
|
39
36
|
export { insertBlockType, insertBlockTypesWithAnalytics, setBlockType, setBlockTypeWithAnalytics, } from './plugins/block-type/commands';
|
|
40
37
|
export type { InputMethod as BlockTypeInputMethod } from './plugins/block-type/commands';
|
|
41
38
|
export { createTable } from '@atlaskit/editor-plugin-table/commands';
|
|
@@ -85,3 +82,8 @@ export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
|
|
|
85
82
|
export { default as messages, statusMessages, dateMessages } from './messages';
|
|
86
83
|
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
87
84
|
export { createQuickInsertTools } from './plugins/quick-insert/api';
|
|
85
|
+
export type {
|
|
86
|
+
/**
|
|
87
|
+
* Temporary, until we extract the plugin to its own package
|
|
88
|
+
* @deprecated Don't use this
|
|
89
|
+
*/ textFormattingPlugin, } from './plugins';
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
2
|
/// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
3
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { PastePluginOptions } from '../../../plugins/paste';
|
|
5
|
-
import { BasePluginOptions } from '../../../plugins/base';
|
|
6
|
-
import { EditorProps } from '../../../types/editor-props';
|
|
7
|
-
import { EditorPresetProps } from './types';
|
|
8
|
-
import { BlockTypePluginOptions } from '../../../plugins/block-type/types';
|
|
9
|
-
import { PlaceholderPluginOptions } from '../../../plugins/placeholder';
|
|
10
|
-
import { AnnotationProviders } from '../../../plugins/annotation';
|
|
11
|
-
import { TextFormattingOptions } from '
|
|
12
|
-
import { QuickInsertPluginOptions } from '../../../plugins/quick-insert';
|
|
13
|
-
import { CodeBlockOptions } from '../../../plugins/code-block/types';
|
|
14
|
-
import { SelectionPluginOptions } from '../../../plugins/selection/types';
|
|
15
|
-
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
16
|
-
import { TypeAheadPluginOptions } from '../../../plugins/type-ahead';
|
|
17
|
-
import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { PastePluginOptions } from '../../../plugins/paste';
|
|
5
|
+
import type { BasePluginOptions } from '../../../plugins/base';
|
|
6
|
+
import type { EditorProps } from '../../../types/editor-props';
|
|
7
|
+
import type { EditorPresetProps } from './types';
|
|
8
|
+
import type { BlockTypePluginOptions } from '../../../plugins/block-type/types';
|
|
9
|
+
import type { PlaceholderPluginOptions } from '../../../plugins/placeholder';
|
|
10
|
+
import type { AnnotationProviders } from '../../../plugins/annotation';
|
|
11
|
+
import type { TextFormattingOptions, HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
12
|
+
import type { QuickInsertPluginOptions } from '../../../plugins/quick-insert';
|
|
13
|
+
import type { CodeBlockOptions } from '../../../plugins/code-block/types';
|
|
14
|
+
import type { SelectionPluginOptions } from '../../../plugins/selection/types';
|
|
15
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
16
|
+
import type { TypeAheadPluginOptions } from '../../../plugins/type-ahead';
|
|
18
17
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
19
18
|
export type DefaultPresetPluginOptions = {
|
|
20
19
|
paste: PastePluginOptions;
|
|
@@ -257,6 +256,22 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
257
256
|
}>];
|
|
258
257
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
259
258
|
}>>];
|
|
259
|
+
actions: {
|
|
260
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
261
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
262
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
263
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
264
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
265
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
266
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
267
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
268
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
269
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
270
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
271
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
272
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
273
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
274
|
+
};
|
|
260
275
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
261
276
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
262
277
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
|
|
@@ -288,6 +303,22 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
288
303
|
}>];
|
|
289
304
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
290
305
|
}>>];
|
|
306
|
+
actions: {
|
|
307
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
308
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
309
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
310
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
311
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
312
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
313
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
314
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
315
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
316
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
317
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
318
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
319
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
320
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
321
|
+
};
|
|
291
322
|
}>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
292
323
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
293
324
|
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
@@ -598,6 +629,22 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
598
629
|
}>];
|
|
599
630
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
600
631
|
}>>];
|
|
632
|
+
actions: {
|
|
633
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
634
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
635
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
636
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
637
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
638
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
639
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
640
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
641
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
642
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
643
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
644
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
645
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
646
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
647
|
+
};
|
|
601
648
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
602
649
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
603
650
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
|
|
@@ -629,6 +676,22 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
629
676
|
}>];
|
|
630
677
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
631
678
|
}>>];
|
|
679
|
+
actions: {
|
|
680
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
681
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
682
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
683
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
684
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
685
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
686
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
687
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
688
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
689
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
690
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
691
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
692
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
693
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
694
|
+
};
|
|
632
695
|
}>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
633
696
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
634
697
|
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
|
-
import type { EditorView } from 'prosemirror
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export declare const generateDefaultGuidelines: (editorWidth: number, containerWidth: number, isFullWidthMode?: boolean | undefined) => GuidelineConfig[];
|
|
4
4
|
export declare const generateDynamicGuidelines: (view: EditorView) => GuidelineConfig[];
|
|
@@ -4,8 +4,7 @@ import type { EditorState } 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
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
8
|
-
import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
|
|
7
|
+
import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
|
|
9
8
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
10
9
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
11
10
|
export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { Command, InputMethodBasic } from '@atlaskit/editor-common/types';
|
|
3
|
+
export type ToggleMarkCommand = () => Command;
|
|
4
|
+
export type ToggleMarkWithAnalyticsCommand = (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (analyticsMetadata: {
|
|
5
|
+
inputMethod: InputMethodBasic;
|
|
6
|
+
}) => Command;
|
|
7
|
+
export declare const toggleEm: ToggleMarkCommand;
|
|
8
|
+
export declare const toggleEmWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
9
|
+
export declare const toggleStrike: ToggleMarkCommand;
|
|
10
|
+
export declare const toggleStrikeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
11
|
+
export declare const toggleStrong: ToggleMarkCommand;
|
|
12
|
+
export declare const toggleStrongWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
13
|
+
export declare const toggleUnderline: ToggleMarkCommand;
|
|
14
|
+
export declare const toggleUnderlineWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
15
|
+
export declare const toggleSuperscript: ToggleMarkCommand;
|
|
16
|
+
export declare const toggleSuperscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
17
|
+
export declare const toggleSubscript: ToggleMarkCommand;
|
|
18
|
+
export declare const toggleSubscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
19
|
+
export declare const toggleCode: ToggleMarkCommand;
|
|
20
|
+
export declare const toggleCodeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
@@ -1,36 +1,5 @@
|
|
|
1
1
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
export declare const moveRight: () => Command;
|
|
5
4
|
export declare const moveLeft: () => Command;
|
|
6
|
-
export type InputMethodToolbar = INPUT_METHOD.TOOLBAR;
|
|
7
|
-
export type InputMethodBasic = InputMethodToolbar | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING;
|
|
8
|
-
export declare const toggleEm: () => Command;
|
|
9
|
-
export declare const toggleEmWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
10
|
-
inputMethod: InputMethodBasic;
|
|
11
|
-
}) => Command;
|
|
12
|
-
export declare const toggleStrike: () => Command;
|
|
13
|
-
export declare const toggleStrikeWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
14
|
-
inputMethod: InputMethodBasic;
|
|
15
|
-
}) => Command;
|
|
16
|
-
export declare const toggleStrong: () => Command;
|
|
17
|
-
export declare const toggleStrongWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
18
|
-
inputMethod: InputMethodBasic;
|
|
19
|
-
}) => Command;
|
|
20
|
-
export declare const toggleUnderline: () => Command;
|
|
21
|
-
export declare const toggleUnderlineWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
22
|
-
inputMethod: InputMethodBasic;
|
|
23
|
-
}) => Command;
|
|
24
|
-
export declare const toggleSuperscript: () => Command;
|
|
25
|
-
export declare const toggleSuperscriptWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
26
|
-
inputMethod: InputMethodBasic;
|
|
27
|
-
}) => Command;
|
|
28
|
-
export declare const toggleSubscript: () => Command;
|
|
29
|
-
export declare const toggleSubscriptWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
30
|
-
inputMethod: InputMethodBasic;
|
|
31
|
-
}) => Command;
|
|
32
|
-
export declare const toggleCode: () => Command;
|
|
33
|
-
export declare const toggleCodeWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
34
|
-
inputMethod: InputMethodBasic;
|
|
35
|
-
}) => Command;
|
|
36
5
|
export declare const createInlineCodeFromTextInputWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (from: number, to: number, text: string) => Command;
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { TextFormattingOptions } from './types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions } from '@atlaskit/editor-common/types';
|
|
3
2
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { ToggleMarkCommand, ToggleMarkWithAnalyticsCommand } from './actions';
|
|
4
4
|
declare const textFormatting: NextEditorPlugin<'textFormatting', {
|
|
5
5
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
6
6
|
dependencies: [OptionalPlugin<typeof analyticsPlugin>];
|
|
7
|
+
actions: {
|
|
8
|
+
toggleSuperscript: ToggleMarkCommand;
|
|
9
|
+
toggleSuperscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
10
|
+
toggleSubscript: ToggleMarkCommand;
|
|
11
|
+
toggleSubscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
12
|
+
toggleStrike: ToggleMarkCommand;
|
|
13
|
+
toggleStrikeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
14
|
+
toggleCode: ToggleMarkCommand;
|
|
15
|
+
toggleCodeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
16
|
+
toggleUnderline: ToggleMarkCommand;
|
|
17
|
+
toggleUnderlineWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
18
|
+
toggleEm: ToggleMarkCommand;
|
|
19
|
+
toggleEmWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
20
|
+
toggleStrong: ToggleMarkCommand;
|
|
21
|
+
toggleStrongWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
22
|
+
};
|
|
7
23
|
}>;
|
|
8
24
|
export default textFormatting;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import type { TextFormattingState } from '
|
|
3
|
+
import type { TextFormattingState } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { pluginKey } from './plugin-key';
|
|
5
5
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
export { pluginKey };
|
|
7
|
-
export type { TextFormattingState };
|
|
8
7
|
export declare const plugin: (dispatch: Dispatch, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<TextFormattingState>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Mark as PMMark } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { MenuIconItem } from './ui/Toolbar/types';
|
|
4
4
|
export declare const hasCode: (state: EditorState, pos: number) => boolean;
|
|
@@ -6,10 +6,6 @@ export declare const hasCode: (state: EditorState, pos: number) => boolean;
|
|
|
6
6
|
* Determine if a mark (with specific attribute values) exists anywhere in the selection.
|
|
7
7
|
*/
|
|
8
8
|
export declare const markActive: (state: EditorState, mark: PMMark) => boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Determine if a mark of a specific type exists anywhere in the selection.
|
|
11
|
-
*/
|
|
12
|
-
export declare const anyMarkActive: (state: EditorState, markType: Mark | MarkType) => boolean;
|
|
13
9
|
export declare const checkFormattingIsPresent: (state: EditorState) => boolean;
|
|
14
10
|
export declare const compareItemsArrays: (items: MenuIconItem[], prevItems: MenuIconItem[]) => MenuIconItem[];
|
|
15
11
|
export declare const isArrayContainsContent: (items: MenuIconItem[], content: string) => boolean;
|
|
@@ -6,7 +6,7 @@ import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
|
6
6
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
-
import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions, TextFormattingOptions } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
|
|
12
12
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
@@ -25,7 +25,6 @@ import type { PanelPluginConfig } from '../plugins/panel/types';
|
|
|
25
25
|
import type { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
|
|
26
26
|
import type { QuickInsertOptions } from '../plugins/quick-insert/types';
|
|
27
27
|
import type { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
|
|
28
|
-
import type { TextFormattingOptions } from '../plugins/text-formatting/types';
|
|
29
28
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
30
29
|
import type { EditorAppearance } from './editor-appearance';
|
|
31
30
|
import type { EditorOnChangeHandler } from './editor-onchange';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { SerializedStyles } from '@emotion/react';
|
|
3
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
4
4
|
import type { FeatureFlags } from '../../types/feature-flags';
|
|
5
5
|
export declare const linkStyles: SerializedStyles;
|
|
6
6
|
type ContentStylesProps = {
|
|
@@ -21,8 +21,6 @@ export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommen
|
|
|
21
21
|
export type { QuickInsertProvider, QuickInsertItem, QuickInsertItemId, QuickInsertActionInsert, } from '@atlaskit/editor-common/provider-factory';
|
|
22
22
|
export { stateKey as mediaPluginKey } from './plugins/media/pm-plugins/main';
|
|
23
23
|
export { mentionPluginKey } from './plugins/mentions';
|
|
24
|
-
export { pluginKey as textFormattingStateKey } from './plugins/text-formatting/pm-plugins/main';
|
|
25
|
-
export type { TextFormattingState } from './plugins/text-formatting/pm-plugins/main';
|
|
26
24
|
export { textColorPluginKey } from './plugins/text-color';
|
|
27
25
|
export type { TextColorPluginState } from './plugins/text-color';
|
|
28
26
|
export { changeColor } from './plugins/text-color/commands/change-color';
|
|
@@ -32,10 +30,9 @@ export type { BlockTypeState } from './plugins';
|
|
|
32
30
|
export { pluginKey as listStateKey } from './plugins/list/pm-plugins/main';
|
|
33
31
|
export type { ListState } from './plugins/list/types';
|
|
34
32
|
export type { InputMethod as ListInputMethod } from './plugins/list/commands';
|
|
35
|
-
export { toggleSuperscript, toggleSuperscriptWithAnalytics, toggleSubscript, toggleSubscriptWithAnalytics, toggleStrike, toggleStrikeWithAnalytics, toggleCode, toggleCodeWithAnalytics, toggleUnderline, toggleUnderlineWithAnalytics, toggleEm, toggleEmWithAnalytics, toggleStrong, toggleStrongWithAnalytics, } from './plugins/text-formatting/commands/text-formatting';
|
|
36
33
|
export { subscribeToToolbarAndPickerUpdates } from './plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates';
|
|
37
34
|
export { subscribeTypeAheadUpdates } from './plugins/view-update-subscription/subscribe/type-ahead-updates';
|
|
38
|
-
export type { InputMethodToolbar as TextFormattingInputMethodToolbar, InputMethodBasic as TextFormattingInputMethodBasic, } from '
|
|
35
|
+
export type { InputMethodToolbar as TextFormattingInputMethodToolbar, InputMethodBasic as TextFormattingInputMethodBasic, } from '@atlaskit/editor-common/types';
|
|
39
36
|
export { insertBlockType, insertBlockTypesWithAnalytics, setBlockType, setBlockTypeWithAnalytics, } from './plugins/block-type/commands';
|
|
40
37
|
export type { InputMethod as BlockTypeInputMethod } from './plugins/block-type/commands';
|
|
41
38
|
export { createTable } from '@atlaskit/editor-plugin-table/commands';
|
|
@@ -85,3 +82,8 @@ export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
|
|
|
85
82
|
export { default as messages, statusMessages, dateMessages } from './messages';
|
|
86
83
|
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
87
84
|
export { createQuickInsertTools } from './plugins/quick-insert/api';
|
|
85
|
+
export type {
|
|
86
|
+
/**
|
|
87
|
+
* Temporary, until we extract the plugin to its own package
|
|
88
|
+
* @deprecated Don't use this
|
|
89
|
+
*/ textFormattingPlugin, } from './plugins';
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
2
|
/// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
3
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { PastePluginOptions } from '../../../plugins/paste';
|
|
5
|
-
import { BasePluginOptions } from '../../../plugins/base';
|
|
6
|
-
import { EditorProps } from '../../../types/editor-props';
|
|
7
|
-
import { EditorPresetProps } from './types';
|
|
8
|
-
import { BlockTypePluginOptions } from '../../../plugins/block-type/types';
|
|
9
|
-
import { PlaceholderPluginOptions } from '../../../plugins/placeholder';
|
|
10
|
-
import { AnnotationProviders } from '../../../plugins/annotation';
|
|
11
|
-
import { TextFormattingOptions } from '
|
|
12
|
-
import { QuickInsertPluginOptions } from '../../../plugins/quick-insert';
|
|
13
|
-
import { CodeBlockOptions } from '../../../plugins/code-block/types';
|
|
14
|
-
import { SelectionPluginOptions } from '../../../plugins/selection/types';
|
|
15
|
-
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
16
|
-
import { TypeAheadPluginOptions } from '../../../plugins/type-ahead';
|
|
17
|
-
import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { PastePluginOptions } from '../../../plugins/paste';
|
|
5
|
+
import type { BasePluginOptions } from '../../../plugins/base';
|
|
6
|
+
import type { EditorProps } from '../../../types/editor-props';
|
|
7
|
+
import type { EditorPresetProps } from './types';
|
|
8
|
+
import type { BlockTypePluginOptions } from '../../../plugins/block-type/types';
|
|
9
|
+
import type { PlaceholderPluginOptions } from '../../../plugins/placeholder';
|
|
10
|
+
import type { AnnotationProviders } from '../../../plugins/annotation';
|
|
11
|
+
import type { TextFormattingOptions, HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
12
|
+
import type { QuickInsertPluginOptions } from '../../../plugins/quick-insert';
|
|
13
|
+
import type { CodeBlockOptions } from '../../../plugins/code-block/types';
|
|
14
|
+
import type { SelectionPluginOptions } from '../../../plugins/selection/types';
|
|
15
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
16
|
+
import type { TypeAheadPluginOptions } from '../../../plugins/type-ahead';
|
|
18
17
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
19
18
|
export type DefaultPresetPluginOptions = {
|
|
20
19
|
paste: PastePluginOptions;
|
|
@@ -312,6 +311,22 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
312
311
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
313
312
|
}>>
|
|
314
313
|
];
|
|
314
|
+
actions: {
|
|
315
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
316
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
317
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
318
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
319
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
320
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
321
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
322
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
323
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
324
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
325
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
326
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
327
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
328
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
329
|
+
};
|
|
315
330
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
316
331
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
317
332
|
dependencies: [
|
|
@@ -349,6 +364,22 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
349
364
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
350
365
|
}>>
|
|
351
366
|
];
|
|
367
|
+
actions: {
|
|
368
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
369
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
370
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
371
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
372
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
373
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
374
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
375
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
376
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
377
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
378
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
379
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
380
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
381
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
382
|
+
};
|
|
352
383
|
}>,
|
|
353
384
|
(config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
354
385
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
@@ -731,6 +762,22 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
731
762
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
732
763
|
}>>
|
|
733
764
|
];
|
|
765
|
+
actions: {
|
|
766
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
767
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
768
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
769
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
770
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
771
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
772
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
773
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
774
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
775
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
776
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
777
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
778
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
779
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
780
|
+
};
|
|
734
781
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
735
782
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
736
783
|
dependencies: [
|
|
@@ -768,6 +815,22 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
768
815
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
769
816
|
}>>
|
|
770
817
|
];
|
|
818
|
+
actions: {
|
|
819
|
+
toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
820
|
+
toggleSuperscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
821
|
+
toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
822
|
+
toggleSubscriptWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
823
|
+
toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
824
|
+
toggleStrikeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
825
|
+
toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
826
|
+
toggleCodeWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
827
|
+
toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
828
|
+
toggleUnderlineWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
829
|
+
toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
830
|
+
toggleEmWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
831
|
+
toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkCommand;
|
|
832
|
+
toggleStrongWithAnalytics: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
|
|
833
|
+
};
|
|
771
834
|
}>,
|
|
772
835
|
(config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
773
836
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
|
-
import type { EditorView } from 'prosemirror
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export declare const generateDefaultGuidelines: (editorWidth: number, containerWidth: number, isFullWidthMode?: boolean | undefined) => GuidelineConfig[];
|
|
4
4
|
export declare const generateDynamicGuidelines: (view: EditorView) => GuidelineConfig[];
|
|
@@ -4,8 +4,7 @@ import type { EditorState } 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
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
8
|
-
import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
|
|
7
|
+
import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
|
|
9
8
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
10
9
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
11
10
|
export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { Command, InputMethodBasic } from '@atlaskit/editor-common/types';
|
|
3
|
+
export type ToggleMarkCommand = () => Command;
|
|
4
|
+
export type ToggleMarkWithAnalyticsCommand = (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (analyticsMetadata: {
|
|
5
|
+
inputMethod: InputMethodBasic;
|
|
6
|
+
}) => Command;
|
|
7
|
+
export declare const toggleEm: ToggleMarkCommand;
|
|
8
|
+
export declare const toggleEmWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
9
|
+
export declare const toggleStrike: ToggleMarkCommand;
|
|
10
|
+
export declare const toggleStrikeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
11
|
+
export declare const toggleStrong: ToggleMarkCommand;
|
|
12
|
+
export declare const toggleStrongWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
13
|
+
export declare const toggleUnderline: ToggleMarkCommand;
|
|
14
|
+
export declare const toggleUnderlineWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
15
|
+
export declare const toggleSuperscript: ToggleMarkCommand;
|
|
16
|
+
export declare const toggleSuperscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
17
|
+
export declare const toggleSubscript: ToggleMarkCommand;
|
|
18
|
+
export declare const toggleSubscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
19
|
+
export declare const toggleCode: ToggleMarkCommand;
|
|
20
|
+
export declare const toggleCodeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
@@ -1,36 +1,5 @@
|
|
|
1
1
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
export declare const moveRight: () => Command;
|
|
5
4
|
export declare const moveLeft: () => Command;
|
|
6
|
-
export type InputMethodToolbar = INPUT_METHOD.TOOLBAR;
|
|
7
|
-
export type InputMethodBasic = InputMethodToolbar | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING;
|
|
8
|
-
export declare const toggleEm: () => Command;
|
|
9
|
-
export declare const toggleEmWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
10
|
-
inputMethod: InputMethodBasic;
|
|
11
|
-
}) => Command;
|
|
12
|
-
export declare const toggleStrike: () => Command;
|
|
13
|
-
export declare const toggleStrikeWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
14
|
-
inputMethod: InputMethodBasic;
|
|
15
|
-
}) => Command;
|
|
16
|
-
export declare const toggleStrong: () => Command;
|
|
17
|
-
export declare const toggleStrongWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
18
|
-
inputMethod: InputMethodBasic;
|
|
19
|
-
}) => Command;
|
|
20
|
-
export declare const toggleUnderline: () => Command;
|
|
21
|
-
export declare const toggleUnderlineWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
22
|
-
inputMethod: InputMethodBasic;
|
|
23
|
-
}) => Command;
|
|
24
|
-
export declare const toggleSuperscript: () => Command;
|
|
25
|
-
export declare const toggleSuperscriptWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
26
|
-
inputMethod: InputMethodBasic;
|
|
27
|
-
}) => Command;
|
|
28
|
-
export declare const toggleSubscript: () => Command;
|
|
29
|
-
export declare const toggleSubscriptWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
30
|
-
inputMethod: InputMethodBasic;
|
|
31
|
-
}) => Command;
|
|
32
|
-
export declare const toggleCode: () => Command;
|
|
33
|
-
export declare const toggleCodeWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ inputMethod }: {
|
|
34
|
-
inputMethod: InputMethodBasic;
|
|
35
|
-
}) => Command;
|
|
36
5
|
export declare const createInlineCodeFromTextInputWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (from: number, to: number, text: string) => Command;
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { TextFormattingOptions } from './types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions } from '@atlaskit/editor-common/types';
|
|
3
2
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { ToggleMarkCommand, ToggleMarkWithAnalyticsCommand } from './actions';
|
|
4
4
|
declare const textFormatting: NextEditorPlugin<'textFormatting', {
|
|
5
5
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
6
6
|
dependencies: [
|
|
7
7
|
OptionalPlugin<typeof analyticsPlugin>
|
|
8
8
|
];
|
|
9
|
+
actions: {
|
|
10
|
+
toggleSuperscript: ToggleMarkCommand;
|
|
11
|
+
toggleSuperscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
12
|
+
toggleSubscript: ToggleMarkCommand;
|
|
13
|
+
toggleSubscriptWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
14
|
+
toggleStrike: ToggleMarkCommand;
|
|
15
|
+
toggleStrikeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
16
|
+
toggleCode: ToggleMarkCommand;
|
|
17
|
+
toggleCodeWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
18
|
+
toggleUnderline: ToggleMarkCommand;
|
|
19
|
+
toggleUnderlineWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
20
|
+
toggleEm: ToggleMarkCommand;
|
|
21
|
+
toggleEmWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
22
|
+
toggleStrong: ToggleMarkCommand;
|
|
23
|
+
toggleStrongWithAnalytics: ToggleMarkWithAnalyticsCommand;
|
|
24
|
+
};
|
|
9
25
|
}>;
|
|
10
26
|
export default textFormatting;
|