@atlaskit/editor-core 188.7.5 → 188.7.6

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.
@@ -1,14 +1,9 @@
1
1
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { DatePlugin, DateType } from './types';
3
- import type { TOOLBAR_MENU_TYPE, Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
4
  export declare const createDate: (isQuickInsertAction?: boolean) => (insert: (node: Node | Object | string, opts?: any) => Transaction, state: EditorState) => Transaction;
6
- /** Delete the date and close the datepicker */
7
- export declare const deleteDate: () => Command;
8
5
  /** Focus input */
9
6
  export declare const focusDateInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
10
- type InsertDate = (date?: DateType, inputMethod?: TOOLBAR_MENU_TYPE, commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD, enterPressed?: boolean, pluginInjectionApi?: ExtractInjectionAPI<DatePlugin>) => Command;
11
- export declare const insertDate: InsertDate;
12
7
  export declare const setDatePickerAt: (showDatePickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
13
8
  export declare const closeDatePicker: () => Command;
14
9
  export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
@@ -30,9 +25,9 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
30
25
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
31
26
  }, undefined>];
32
27
  sharedState: import("./types").DatePluginSharedState;
33
- actions: {
34
- insertDate: InsertDate;
35
- deleteDate: () => Command;
28
+ commands: {
29
+ insertDate: import("./commands").InsertDate;
30
+ deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
36
31
  };
37
32
  }, import("./types").DatePluginConfig | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
38
33
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
@@ -50,4 +45,3 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
50
45
  }, undefined>]> | undefined;
51
46
  }) => Command;
52
47
  export declare const openDatePicker: () => Command;
53
- export {};
@@ -0,0 +1,20 @@
1
+ import type { TOOLBAR_MENU_TYPE, PluginInjectionAPIWithDependencies, EditorCommand, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { DatePlugin, DateType } from './types';
4
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ export type DeleteDate = EditorCommand;
6
+ type DeleteDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[DatePlugin]> | undefined) => DeleteDate;
7
+ /** Delete the date and close the datepicker */
8
+ export declare const deleteDateCommand: DeleteDateCommand;
9
+ export type InsertDate = (props: {
10
+ date?: DateType;
11
+ inputMethod?: TOOLBAR_MENU_TYPE;
12
+ commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD;
13
+ enterPressed?: boolean;
14
+ }) => EditorCommand;
15
+ type InsertDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[
16
+ OptionalPlugin<AnalyticsPlugin>,
17
+ DatePlugin
18
+ ]> | undefined) => InsertDate;
19
+ export declare const insertDateCommand: InsertDateCommand;
20
+ export {};
@@ -2,7 +2,7 @@ import type { WeekDay } from '@atlaskit/calendar/types';
2
2
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { insertDate, deleteDate } from './actions';
5
+ import type { InsertDate, DeleteDate } from './commands';
6
6
  export type DateType = {
7
7
  year: number;
8
8
  month: number;
@@ -21,8 +21,8 @@ export type DatePlugin = NextEditorPlugin<'date', {
21
21
  pluginConfiguration: DatePluginConfig | undefined;
22
22
  dependencies: [typeof analyticsPlugin, EditorDisabledPlugin];
23
23
  sharedState: DatePluginSharedState;
24
- actions: {
25
- insertDate: typeof insertDate;
26
- deleteDate: typeof deleteDate;
24
+ commands: {
25
+ insertDate: InsertDate;
26
+ deleteDate: DeleteDate;
27
27
  };
28
28
  }>;
@@ -1,14 +1,9 @@
1
1
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { DatePlugin, DateType } from './types';
3
- import type { TOOLBAR_MENU_TYPE, Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
4
  export declare const createDate: (isQuickInsertAction?: boolean) => (insert: (node: Node | Object | string, opts?: any) => Transaction, state: EditorState) => Transaction;
6
- /** Delete the date and close the datepicker */
7
- export declare const deleteDate: () => Command;
8
5
  /** Focus input */
9
6
  export declare const focusDateInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
10
- type InsertDate = (date?: DateType, inputMethod?: TOOLBAR_MENU_TYPE, commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD, enterPressed?: boolean, pluginInjectionApi?: ExtractInjectionAPI<DatePlugin>) => Command;
11
- export declare const insertDate: InsertDate;
12
7
  export declare const setDatePickerAt: (showDatePickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
13
8
  export declare const closeDatePicker: () => Command;
14
9
  export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
@@ -36,9 +31,9 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
36
31
  }, undefined>
37
32
  ];
38
33
  sharedState: import("./types").DatePluginSharedState;
39
- actions: {
40
- insertDate: InsertDate;
41
- deleteDate: () => Command;
34
+ commands: {
35
+ insertDate: import("./commands").InsertDate;
36
+ deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
42
37
  };
43
38
  }, import("./types").DatePluginConfig | undefined>,
44
39
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -61,4 +56,3 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
61
56
  ]> | undefined;
62
57
  }) => Command;
63
58
  export declare const openDatePicker: () => Command;
64
- export {};
@@ -0,0 +1,22 @@
1
+ import type { TOOLBAR_MENU_TYPE, PluginInjectionAPIWithDependencies, EditorCommand, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { DatePlugin, DateType } from './types';
4
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ export type DeleteDate = EditorCommand;
6
+ type DeleteDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[
7
+ DatePlugin
8
+ ]> | undefined) => DeleteDate;
9
+ /** Delete the date and close the datepicker */
10
+ export declare const deleteDateCommand: DeleteDateCommand;
11
+ export type InsertDate = (props: {
12
+ date?: DateType;
13
+ inputMethod?: TOOLBAR_MENU_TYPE;
14
+ commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD;
15
+ enterPressed?: boolean;
16
+ }) => EditorCommand;
17
+ type InsertDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[
18
+ OptionalPlugin<AnalyticsPlugin>,
19
+ DatePlugin
20
+ ]> | undefined) => InsertDate;
21
+ export declare const insertDateCommand: InsertDateCommand;
22
+ export {};
@@ -2,7 +2,7 @@ import type { WeekDay } from '@atlaskit/calendar/types';
2
2
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { insertDate, deleteDate } from './actions';
5
+ import type { InsertDate, DeleteDate } from './commands';
6
6
  export type DateType = {
7
7
  year: number;
8
8
  month: number;
@@ -24,8 +24,8 @@ export type DatePlugin = NextEditorPlugin<'date', {
24
24
  EditorDisabledPlugin
25
25
  ];
26
26
  sharedState: DatePluginSharedState;
27
- actions: {
28
- insertDate: typeof insertDate;
29
- deleteDate: typeof deleteDate;
27
+ commands: {
28
+ insertDate: InsertDate;
29
+ deleteDate: DeleteDate;
30
30
  };
31
31
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "188.7.5",
3
+ "version": "188.7.6",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"