@atlaskit/editor-core 188.8.0 → 188.9.2
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 +20 -0
- package/dist/cjs/composable-editor/editor-internal.js +2 -2
- package/dist/cjs/create-editor/ReactEditorView.js +796 -8
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/labs/next/presets/universal.js +7 -4
- package/dist/cjs/plugins/index.js +0 -28
- package/dist/cjs/plugins/insert-block/index.js +4 -6
- package/dist/cjs/plugins/tasks-and-decisions/index.js +4 -3
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -13
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +15 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +753 -2
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +4 -1
- package/dist/es2019/plugins/index.js +0 -4
- package/dist/es2019/plugins/insert-block/index.js +4 -6
- package/dist/es2019/plugins/tasks-and-decisions/index.js +4 -3
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +43 -10
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +13 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +797 -8
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +4 -1
- package/dist/esm/plugins/index.js +0 -4
- package/dist/esm/plugins/insert-block/index.js +4 -6
- package/dist/esm/plugins/tasks-and-decisions/index.js +4 -3
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -12
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +14 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +119 -5
- package/dist/types/labs/next/presets/default.d.ts +43 -43
- package/dist/types/plugins/index.d.ts +0 -4
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -5
- package/dist/types/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
- package/dist/types/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/tasks-and-decisions/types.d.ts +6 -1
- package/dist/types/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +119 -5
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +43 -43
- package/dist/types-ts4.5/plugins/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/tasks-and-decisions/index.d.ts +2 -5
- package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
- package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
- package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
- package/dist/types-ts4.5/plugins/tasks-and-decisions/types.d.ts +8 -1
- package/dist/types-ts4.5/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
- package/package.json +7 -7
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +0 -812
- package/dist/cjs/create-editor/ReactEditorViewNext.js +0 -15
- package/dist/cjs/plugins/save-on-enter/index.js +0 -70
- package/dist/cjs/plugins/scroll-into-view/index.js +0 -55
- package/dist/cjs/plugins/status/actions.js +0 -158
- package/dist/cjs/plugins/status/analytics.js +0 -31
- package/dist/cjs/plugins/status/index.js +0 -143
- package/dist/cjs/plugins/status/keymap.js +0 -22
- package/dist/cjs/plugins/status/nodeviews/status.js +0 -58
- package/dist/cjs/plugins/status/plugin-key.js +0 -9
- package/dist/cjs/plugins/status/plugin.js +0 -133
- package/dist/cjs/plugins/status/types.js +0 -5
- package/dist/cjs/plugins/status/ui/statusPicker.js +0 -314
- package/dist/cjs/plugins/status/utils.js +0 -22
- package/dist/cjs/plugins/type-ahead/api.js +0 -215
- package/dist/cjs/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -205
- package/dist/cjs/plugins/type-ahead/commands/update-list-items.js +0 -23
- package/dist/cjs/plugins/type-ahead/commands/update-query.js +0 -27
- package/dist/cjs/plugins/type-ahead/commands/update-selected-index.js +0 -27
- package/dist/cjs/plugins/type-ahead/constants.js +0 -15
- package/dist/cjs/plugins/type-ahead/index.js +0 -14
- package/dist/cjs/plugins/type-ahead/insert-utils.js +0 -107
- package/dist/cjs/plugins/type-ahead/messages.js +0 -79
- package/dist/cjs/plugins/type-ahead/plugin.js +0 -382
- package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +0 -16
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +0 -148
- package/dist/cjs/plugins/type-ahead/pm-plugins/input-rules.js +0 -36
- package/dist/cjs/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -22
- package/dist/cjs/plugins/type-ahead/pm-plugins/key.js +0 -8
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +0 -110
- package/dist/cjs/plugins/type-ahead/pm-plugins/reducer.js +0 -158
- package/dist/cjs/plugins/type-ahead/pm-plugins/utils.js +0 -18
- package/dist/cjs/plugins/type-ahead/stats-modifier.js +0 -42
- package/dist/cjs/plugins/type-ahead/transforms/close-type-ahead.js +0 -13
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -75
- package/dist/cjs/plugins/type-ahead/transforms/set-selection-before-query.js +0 -18
- package/dist/cjs/plugins/type-ahead/types.js +0 -5
- package/dist/cjs/plugins/type-ahead/ui/AssistiveText.js +0 -120
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +0 -400
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +0 -285
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +0 -179
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +0 -230
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -127
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -109
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-load-items.js +0 -50
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -41
- package/dist/cjs/plugins/type-ahead/utils.js +0 -130
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +0 -753
- package/dist/es2019/create-editor/ReactEditorViewNext.js +0 -7
- package/dist/es2019/plugins/save-on-enter/index.js +0 -63
- package/dist/es2019/plugins/scroll-into-view/index.js +0 -44
- package/dist/es2019/plugins/status/actions.js +0 -144
- package/dist/es2019/plugins/status/analytics.js +0 -18
- package/dist/es2019/plugins/status/index.js +0 -135
- package/dist/es2019/plugins/status/keymap.js +0 -13
- package/dist/es2019/plugins/status/nodeviews/status.js +0 -60
- package/dist/es2019/plugins/status/plugin-key.js +0 -3
- package/dist/es2019/plugins/status/plugin.js +0 -113
- package/dist/es2019/plugins/status/types.js +0 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +0 -293
- package/dist/es2019/plugins/status/utils.js +0 -12
- package/dist/es2019/plugins/type-ahead/api.js +0 -205
- package/dist/es2019/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -204
- package/dist/es2019/plugins/type-ahead/commands/update-list-items.js +0 -17
- package/dist/es2019/plugins/type-ahead/commands/update-query.js +0 -21
- package/dist/es2019/plugins/type-ahead/commands/update-selected-index.js +0 -21
- package/dist/es2019/plugins/type-ahead/constants.js +0 -9
- package/dist/es2019/plugins/type-ahead/index.js +0 -3
- package/dist/es2019/plugins/type-ahead/insert-utils.js +0 -106
- package/dist/es2019/plugins/type-ahead/messages.js +0 -73
- package/dist/es2019/plugins/type-ahead/plugin.js +0 -381
- package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +0 -10
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -148
- package/dist/es2019/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
- package/dist/es2019/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
- package/dist/es2019/plugins/type-ahead/pm-plugins/key.js +0 -2
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +0 -106
- package/dist/es2019/plugins/type-ahead/pm-plugins/reducer.js +0 -160
- package/dist/es2019/plugins/type-ahead/pm-plugins/utils.js +0 -12
- package/dist/es2019/plugins/type-ahead/stats-modifier.js +0 -33
- package/dist/es2019/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -71
- package/dist/es2019/plugins/type-ahead/transforms/set-selection-before-query.js +0 -10
- package/dist/es2019/plugins/type-ahead/types.js +0 -1
- package/dist/es2019/plugins/type-ahead/ui/AssistiveText.js +0 -88
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +0 -393
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +0 -273
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +0 -214
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +0 -233
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -109
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -112
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-load-items.js +0 -41
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -38
- package/dist/es2019/plugins/type-ahead/utils.js +0 -126
- package/dist/esm/create-editor/ReactEditorViewInternal.js +0 -806
- package/dist/esm/create-editor/ReactEditorViewNext.js +0 -7
- package/dist/esm/plugins/save-on-enter/index.js +0 -63
- package/dist/esm/plugins/scroll-into-view/index.js +0 -50
- package/dist/esm/plugins/status/actions.js +0 -151
- package/dist/esm/plugins/status/analytics.js +0 -24
- package/dist/esm/plugins/status/index.js +0 -136
- package/dist/esm/plugins/status/keymap.js +0 -15
- package/dist/esm/plugins/status/nodeviews/status.js +0 -51
- package/dist/esm/plugins/status/plugin-key.js +0 -3
- package/dist/esm/plugins/status/plugin.js +0 -115
- package/dist/esm/plugins/status/types.js +0 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +0 -308
- package/dist/esm/plugins/status/utils.js +0 -16
- package/dist/esm/plugins/type-ahead/api.js +0 -209
- package/dist/esm/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -198
- package/dist/esm/plugins/type-ahead/commands/update-list-items.js +0 -17
- package/dist/esm/plugins/type-ahead/commands/update-query.js +0 -21
- package/dist/esm/plugins/type-ahead/commands/update-selected-index.js +0 -21
- package/dist/esm/plugins/type-ahead/constants.js +0 -9
- package/dist/esm/plugins/type-ahead/index.js +0 -3
- package/dist/esm/plugins/type-ahead/insert-utils.js +0 -101
- package/dist/esm/plugins/type-ahead/messages.js +0 -73
- package/dist/esm/plugins/type-ahead/plugin.js +0 -374
- package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +0 -10
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -141
- package/dist/esm/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
- package/dist/esm/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
- package/dist/esm/plugins/type-ahead/pm-plugins/key.js +0 -2
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +0 -104
- package/dist/esm/plugins/type-ahead/pm-plugins/reducer.js +0 -151
- package/dist/esm/plugins/type-ahead/pm-plugins/utils.js +0 -12
- package/dist/esm/plugins/type-ahead/stats-modifier.js +0 -35
- package/dist/esm/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -69
- package/dist/esm/plugins/type-ahead/transforms/set-selection-before-query.js +0 -12
- package/dist/esm/plugins/type-ahead/types.js +0 -1
- package/dist/esm/plugins/type-ahead/ui/AssistiveText.js +0 -115
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +0 -390
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +0 -276
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +0 -169
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +0 -220
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -117
- package/dist/esm/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -103
- package/dist/esm/plugins/type-ahead/ui/hooks/use-load-items.js +0 -43
- package/dist/esm/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -35
- package/dist/esm/plugins/type-ahead/utils.js +0 -124
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -119
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +0 -8
- package/dist/types/plugins/save-on-enter/index.d.ts +0 -10
- package/dist/types/plugins/scroll-into-view/index.d.ts +0 -14
- package/dist/types/plugins/status/actions.d.ts +0 -16
- package/dist/types/plugins/status/analytics.d.ts +0 -4
- package/dist/types/plugins/status/index.d.ts +0 -15
- package/dist/types/plugins/status/keymap.d.ts +0 -3
- package/dist/types/plugins/status/nodeviews/status.d.ts +0 -25
- package/dist/types/plugins/status/plugin-key.d.ts +0 -4
- package/dist/types/plugins/status/plugin.d.ts +0 -7
- package/dist/types/plugins/status/types.d.ts +0 -18
- package/dist/types/plugins/status/ui/statusPicker.d.ts +0 -63
- package/dist/types/plugins/status/utils.d.ts +0 -5
- package/dist/types/plugins/type-ahead/api.d.ts +0 -61
- package/dist/types/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
- package/dist/types/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
- package/dist/types/plugins/type-ahead/commands/update-query.d.ts +0 -2
- package/dist/types/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -8
- package/dist/types/plugins/type-ahead/index.d.ts +0 -4
- package/dist/types/plugins/type-ahead/insert-utils.d.ts +0 -18
- package/dist/types/plugins/type-ahead/messages.d.ts +0 -72
- package/dist/types/plugins/type-ahead/plugin.d.ts +0 -10
- package/dist/types/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
- package/dist/types/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
- package/dist/types/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
- package/dist/types/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
- package/dist/types/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
- package/dist/types/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
- package/dist/types/plugins/type-ahead/stats-modifier.d.ts +0 -20
- package/dist/types/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
- package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
- package/dist/types/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
- package/dist/types/plugins/type-ahead/types.d.ts +0 -109
- package/dist/types/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
- package/dist/types/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -3
- package/dist/types/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
- package/dist/types/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
- package/dist/types/plugins/type-ahead/utils.d.ts +0 -27
- package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -119
- package/dist/types-ts4.5/create-editor/ReactEditorViewNext.d.ts +0 -8
- package/dist/types-ts4.5/plugins/save-on-enter/index.d.ts +0 -10
- package/dist/types-ts4.5/plugins/scroll-into-view/index.d.ts +0 -14
- package/dist/types-ts4.5/plugins/status/actions.d.ts +0 -16
- package/dist/types-ts4.5/plugins/status/analytics.d.ts +0 -4
- package/dist/types-ts4.5/plugins/status/index.d.ts +0 -17
- package/dist/types-ts4.5/plugins/status/keymap.d.ts +0 -3
- package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +0 -25
- package/dist/types-ts4.5/plugins/status/plugin-key.d.ts +0 -4
- package/dist/types-ts4.5/plugins/status/plugin.d.ts +0 -7
- package/dist/types-ts4.5/plugins/status/types.d.ts +0 -18
- package/dist/types-ts4.5/plugins/status/ui/statusPicker.d.ts +0 -63
- package/dist/types-ts4.5/plugins/status/utils.d.ts +0 -5
- package/dist/types-ts4.5/plugins/type-ahead/api.d.ts +0 -61
- package/dist/types-ts4.5/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
- package/dist/types-ts4.5/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
- package/dist/types-ts4.5/plugins/type-ahead/commands/update-query.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/constants.d.ts +0 -8
- package/dist/types-ts4.5/plugins/type-ahead/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/type-ahead/insert-utils.d.ts +0 -18
- package/dist/types-ts4.5/plugins/type-ahead/messages.d.ts +0 -72
- package/dist/types-ts4.5/plugins/type-ahead/plugin.d.ts +0 -10
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
- package/dist/types-ts4.5/plugins/type-ahead/stats-modifier.d.ts +0 -20
- package/dist/types-ts4.5/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
- package/dist/types-ts4.5/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/types.d.ts +0 -111
- package/dist/types-ts4.5/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
- package/dist/types-ts4.5/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
- package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
- package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
- package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
- package/dist/types-ts4.5/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
- package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -7
- package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
- package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
- package/dist/types-ts4.5/plugins/type-ahead/utils.d.ts +0 -27
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { UpdateStatus } from './actions';
|
|
3
|
-
import { commitStatusPicker } from './actions';
|
|
4
|
-
import type { StatusPluginOptions } from './types';
|
|
5
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
-
export type StatusPlugin = NextEditorPlugin<'status', {
|
|
7
|
-
dependencies: [
|
|
8
|
-
OptionalPlugin<AnalyticsPlugin>
|
|
9
|
-
];
|
|
10
|
-
pluginConfiguration: StatusPluginOptions | undefined;
|
|
11
|
-
actions: {
|
|
12
|
-
commitStatusPicker: typeof commitStatusPicker;
|
|
13
|
-
updateStatus: UpdateStatus;
|
|
14
|
-
};
|
|
15
|
-
}>;
|
|
16
|
-
declare const statusPlugin: StatusPlugin;
|
|
17
|
-
export default statusPlugin;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { IntlShape } from 'react-intl-next';
|
|
6
|
-
import type { Color, StatusStyle } from '@atlaskit/status/element';
|
|
7
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
-
import type { InlineNodeViewComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
9
|
-
import type { StatusPluginOptions } from '../types';
|
|
10
|
-
export interface ContainerProps {
|
|
11
|
-
view: EditorView;
|
|
12
|
-
intl: IntlShape;
|
|
13
|
-
text?: string;
|
|
14
|
-
color: Color;
|
|
15
|
-
style?: StatusStyle;
|
|
16
|
-
localId?: string;
|
|
17
|
-
eventDispatcher?: EventDispatcher;
|
|
18
|
-
}
|
|
19
|
-
export declare const IntlStatusContainerView: React.FC<import("react-intl-next").WithIntlProps<ContainerProps>> & {
|
|
20
|
-
WrappedComponent: React.ComponentType<ContainerProps>;
|
|
21
|
-
};
|
|
22
|
-
export type Props = InlineNodeViewComponentProps & {
|
|
23
|
-
options: StatusPluginOptions | undefined;
|
|
24
|
-
};
|
|
25
|
-
export declare const StatusNodeView: (props: Props) => jsx.JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { StatusPluginOptions } from './types';
|
|
4
|
-
export { pluginKey, pluginKeyName } from './plugin-key';
|
|
5
|
-
export type { StatusState, StatusType, ClosingPayload } from './types';
|
|
6
|
-
declare const createPlugin: (pmPluginFactoryParams: PMPluginFactoryParams, options?: StatusPluginOptions) => SafePlugin<any>;
|
|
7
|
-
export default createPlugin;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Color as ColorType } from '@atlaskit/status/element';
|
|
2
|
-
import type { closingMethods } from './ui/statusPicker';
|
|
3
|
-
export type StatusType = {
|
|
4
|
-
color: ColorType;
|
|
5
|
-
text: string;
|
|
6
|
-
localId?: string;
|
|
7
|
-
};
|
|
8
|
-
export type StatusState = {
|
|
9
|
-
isNew: boolean;
|
|
10
|
-
showStatusPickerAt: number | null;
|
|
11
|
-
};
|
|
12
|
-
export interface StatusPluginOptions {
|
|
13
|
-
menuDisabled: boolean;
|
|
14
|
-
allowZeroWidthSpaceAfter?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export type ClosingPayload = {
|
|
17
|
-
closingMethod: closingMethods;
|
|
18
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import type { ColorType as Color } from '@atlaskit/status/picker';
|
|
5
|
-
import type { StatusType, ClosingPayload } from '../plugin';
|
|
6
|
-
export declare enum InputMethod {
|
|
7
|
-
blur = "blur",
|
|
8
|
-
escKey = "escKey",
|
|
9
|
-
enterKey = "enterKey"
|
|
10
|
-
}
|
|
11
|
-
export declare enum closingMethods {
|
|
12
|
-
ArrowLeft = "arrowLeft",
|
|
13
|
-
ArrowRight = "arrowRight"
|
|
14
|
-
}
|
|
15
|
-
export interface Props {
|
|
16
|
-
target: HTMLElement | null;
|
|
17
|
-
closeStatusPicker: (closingPayload?: ClosingPayload) => void;
|
|
18
|
-
onSelect: (status: StatusType) => void;
|
|
19
|
-
onTextChanged: (status: StatusType, isNew: boolean) => void;
|
|
20
|
-
onEnter: (status: StatusType) => void;
|
|
21
|
-
isNew?: boolean;
|
|
22
|
-
defaultText?: string;
|
|
23
|
-
defaultColor?: Color;
|
|
24
|
-
defaultLocalId?: string;
|
|
25
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
26
|
-
mountTo?: HTMLElement;
|
|
27
|
-
boundariesElement?: HTMLElement;
|
|
28
|
-
scrollableElement?: HTMLElement;
|
|
29
|
-
}
|
|
30
|
-
export interface State {
|
|
31
|
-
color: Color;
|
|
32
|
-
text: string;
|
|
33
|
-
localId?: string;
|
|
34
|
-
isNew?: boolean;
|
|
35
|
-
}
|
|
36
|
-
export declare class StatusPickerWithoutAnalytcs extends React.Component<Props, State> {
|
|
37
|
-
private startTime;
|
|
38
|
-
private inputMethod?;
|
|
39
|
-
private createStatusAnalyticsAndFireFunc;
|
|
40
|
-
private popupBodyWrapper;
|
|
41
|
-
private focusTimeout;
|
|
42
|
-
constructor(props: Props);
|
|
43
|
-
private fireStatusPopupOpenedAnalytics;
|
|
44
|
-
private fireStatusPopupClosedAnalytics;
|
|
45
|
-
private reset;
|
|
46
|
-
componentDidMount(): void;
|
|
47
|
-
componentWillUnmount(): void;
|
|
48
|
-
componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<State>, _snapshot?: any): void;
|
|
49
|
-
private extractStateFromProps;
|
|
50
|
-
handleClickOutside: (event: Event) => void;
|
|
51
|
-
private handleEscapeKeydown;
|
|
52
|
-
private handleTabPress;
|
|
53
|
-
private handleArrow;
|
|
54
|
-
private onKeyDown;
|
|
55
|
-
render(): jsx.JSX.Element | null;
|
|
56
|
-
private onColorHover;
|
|
57
|
-
private onColorClick;
|
|
58
|
-
private onTextChanged;
|
|
59
|
-
private onEnter;
|
|
60
|
-
private handlePopupClick;
|
|
61
|
-
}
|
|
62
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
63
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { StatusType } from './types';
|
|
3
|
-
export declare const mayGetStatusAtSelection: (selection: Selection) => StatusType | null;
|
|
4
|
-
export declare const isEmptyStatus: (node: StatusType) => boolean;
|
|
5
|
-
export declare const setNodeSelectionNearPos: (tr: Transaction, pos: number) => Transaction;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
-
import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
|
|
5
|
-
import type { TypeAheadHandler } from './types';
|
|
6
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
7
|
-
type CloseOptions = {
|
|
8
|
-
insertCurrentQueryAsRawText: boolean;
|
|
9
|
-
attachCommand?: Command;
|
|
10
|
-
};
|
|
11
|
-
type InsertItemProps = {
|
|
12
|
-
contentItem: TypeAheadItem;
|
|
13
|
-
query: string;
|
|
14
|
-
sourceListItem: TypeAheadItem[];
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Please do not use it. Ping #help-editor and talk to the Lego team before use it.
|
|
18
|
-
*
|
|
19
|
-
* @private
|
|
20
|
-
* @deprecated
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
export declare const createTypeAheadTools: (editorView: EditorView) => {
|
|
24
|
-
isOpen: () => TypeAheadHandler | false;
|
|
25
|
-
currentQuery: () => string | undefined;
|
|
26
|
-
close: (options?: CloseOptions) => boolean;
|
|
27
|
-
openMention: (inputMethod: TypeAheadInputMethod) => boolean;
|
|
28
|
-
searchMention: (query?: string) => {
|
|
29
|
-
type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
|
|
30
|
-
result: () => Promise<TypeAheadItem[] | undefined>;
|
|
31
|
-
close: (options?: CloseOptions) => boolean;
|
|
32
|
-
insert: ({ index, mode }: {
|
|
33
|
-
index: number;
|
|
34
|
-
mode?: SelectItemMode | undefined;
|
|
35
|
-
}) => Promise<void>;
|
|
36
|
-
};
|
|
37
|
-
openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
|
|
38
|
-
searchQuickInsert: (query?: string) => {
|
|
39
|
-
type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
|
|
40
|
-
result: () => Promise<TypeAheadItem[] | undefined>;
|
|
41
|
-
close: (options?: CloseOptions) => boolean;
|
|
42
|
-
insert: ({ index, mode }: {
|
|
43
|
-
index: number;
|
|
44
|
-
mode?: SelectItemMode | undefined;
|
|
45
|
-
}) => Promise<void>;
|
|
46
|
-
};
|
|
47
|
-
openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
|
|
48
|
-
searchEmoji: (query?: string) => {
|
|
49
|
-
type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
|
|
50
|
-
result: () => Promise<TypeAheadItem[] | undefined>;
|
|
51
|
-
close: (options?: CloseOptions) => boolean;
|
|
52
|
-
insert: ({ index, mode }: {
|
|
53
|
-
index: number;
|
|
54
|
-
mode?: SelectItemMode | undefined;
|
|
55
|
-
}) => Promise<void>;
|
|
56
|
-
};
|
|
57
|
-
insertItemMention: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
|
|
58
|
-
insertItemEmoji: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
|
|
59
|
-
insertItemQuickInsert: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
|
|
60
|
-
};
|
|
61
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
|
-
import type { TypeAheadHandler, TypeAheadItem } from '../types';
|
|
4
|
-
type Props = {
|
|
5
|
-
item: TypeAheadItem;
|
|
6
|
-
handler: TypeAheadHandler;
|
|
7
|
-
mode: SelectItemMode;
|
|
8
|
-
sourceListItem: Array<TypeAheadItem>;
|
|
9
|
-
query: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const insertTypeAheadItem: (view: EditorView) => ({ item, handler, mode, query, sourceListItem }: Props) => void;
|
|
12
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const TYPE_AHEAD_DECORATION_KEY = "typeahead_decoration_key";
|
|
2
|
-
export declare const TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = "typeaheadDecoration";
|
|
3
|
-
export declare const TYPE_AHEAD_POPUP_CONTENT_CLASS = "fabric-editor-typeahead";
|
|
4
|
-
export declare const TYPE_AHEAD_DECORATION_ELEMENT_ID = "typeahaed_decoration_element_id";
|
|
5
|
-
export declare enum CloseSelectionOptions {
|
|
6
|
-
BEFORE_TEXT_INSERTED = "BEFORE_TEXT_INSERTED",
|
|
7
|
-
AFTER_TEXT_INSERTED = "AFTER_TEXT_INSERTED"
|
|
8
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { Node as PMNode, Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
type Position = {
|
|
4
|
-
start: number;
|
|
5
|
-
end: number;
|
|
6
|
-
};
|
|
7
|
-
export declare const insertBlockNode: ({ node, tr, position, }: {
|
|
8
|
-
node: PMNode;
|
|
9
|
-
tr: Transaction;
|
|
10
|
-
position: Position;
|
|
11
|
-
}) => Transaction;
|
|
12
|
-
export declare const insertInlineNodeOrFragment: ({ maybeFragment, tr, position, selectInlineNode, }: {
|
|
13
|
-
maybeFragment: Fragment | PMNode;
|
|
14
|
-
tr: Transaction;
|
|
15
|
-
position: Position;
|
|
16
|
-
selectInlineNode: boolean;
|
|
17
|
-
}) => Transaction;
|
|
18
|
-
export {};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export declare const typeAheadListMessages: {
|
|
2
|
-
typeAheadPopupLabel: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
quickInsertPopupLabel: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
quickInsertInputLabel: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
emojiPopupLabel: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
emojiInputLabel: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
mentionPopupLabel: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
mentionInputLabel: {
|
|
33
|
-
id: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
metionListItemLabel: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
emojiListItemLabel: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
inputQueryAssistiveLabel: {
|
|
48
|
-
id: string;
|
|
49
|
-
defaultMessage: string;
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
searchResultsLabel: {
|
|
53
|
-
id: string;
|
|
54
|
-
defaultMessage: string;
|
|
55
|
-
description: string;
|
|
56
|
-
};
|
|
57
|
-
noSearchResultsLabel: {
|
|
58
|
-
id: string;
|
|
59
|
-
defaultMessage: string;
|
|
60
|
-
description: string;
|
|
61
|
-
};
|
|
62
|
-
descriptionLabel: {
|
|
63
|
-
id: string;
|
|
64
|
-
defaultMessage: string;
|
|
65
|
-
description: string;
|
|
66
|
-
};
|
|
67
|
-
shortcutLabel: {
|
|
68
|
-
id: string;
|
|
69
|
-
defaultMessage: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TypeAheadPlugin } from './types';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* Revamped typeahead using decorations instead of the `typeAheadQuery` mark
|
|
5
|
-
*
|
|
6
|
-
* https://product-fabric.atlassian.net/wiki/spaces/E/pages/2992177582/Technical+TypeAhead+Data+Flow
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare const typeAheadPlugin: TypeAheadPlugin;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare enum ACTIONS {
|
|
2
|
-
OPEN_TYPEAHEAD_AT_CURSOR = "OPEN_TYPEAHEAD_AT_CURSOR",
|
|
3
|
-
CLOSE_TYPE_AHEAD = "CLOSE_TYPE_AHEAD",
|
|
4
|
-
CHANGE_QUERY = "CHANGE_QUERY",
|
|
5
|
-
INSERT_ITEM = "INSERT_ITEM",
|
|
6
|
-
INSERT_RAW_QUERY = "INSERT_RAW_QUERY",
|
|
7
|
-
UPDATE_LIST_ITEMS = "UPDATE_LIST_ITEMS",
|
|
8
|
-
UPDATE_SELECTED_INDEX = "UPDATE_SELECTED_INDEX"
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { IntlShape } from 'react-intl-next';
|
|
3
|
-
import type { CreateTypeAheadDecorations, RemoveTypeAheadDecorations, PopupMountPointReference } from '../types';
|
|
4
|
-
type FactoryProps = {
|
|
5
|
-
intl: IntlShape;
|
|
6
|
-
popupMountRef: PopupMountPointReference;
|
|
7
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
8
|
-
};
|
|
9
|
-
type FactoryReturn = {
|
|
10
|
-
createDecorations: CreateTypeAheadDecorations;
|
|
11
|
-
removeDecorations: RemoveTypeAheadDecorations;
|
|
12
|
-
};
|
|
13
|
-
export declare const factoryDecorations: ({ intl, popupMountRef, createAnalyticsEvent, }: FactoryProps) => FactoryReturn;
|
|
14
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { TypeAheadHandler } from '../types';
|
|
4
|
-
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
5
|
-
export declare function inputRulePlugin(schema: Schema, typeAheads: TypeAheadHandler[], featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
6
|
-
export default inputRulePlugin;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { IntlShape } from 'react-intl-next';
|
|
3
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
|
-
import type { PopupMountPointReference, TypeAheadHandler } from '../types';
|
|
6
|
-
type Props = {
|
|
7
|
-
reactDispatch: Dispatch;
|
|
8
|
-
popupMountRef: PopupMountPointReference;
|
|
9
|
-
typeAheadHandlers: Array<TypeAheadHandler>;
|
|
10
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
11
|
-
getIntl: () => IntlShape;
|
|
12
|
-
};
|
|
13
|
-
export declare function createPlugin({ reactDispatch, popupMountRef, createAnalyticsEvent, typeAheadHandlers, getIntl, }: Props): SafePlugin;
|
|
14
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps';
|
|
3
|
-
import type { CreateTypeAheadDecorations, PopupMountPointReference, RemoveTypeAheadDecorations, TypeAheadHandler, TypeAheadPluginState } from '../types';
|
|
4
|
-
export type ReducerOptions = {
|
|
5
|
-
popupMountRef: PopupMountPointReference;
|
|
6
|
-
createDecorations: CreateTypeAheadDecorations;
|
|
7
|
-
removeDecorations: RemoveTypeAheadDecorations;
|
|
8
|
-
typeAheadHandlers: Array<TypeAheadHandler>;
|
|
9
|
-
};
|
|
10
|
-
export declare const createReducer: ({ typeAheadHandlers, removeDecorations, createDecorations, }: ReducerOptions) => (tr: ReadonlyTransaction, currentPluginState: TypeAheadPluginState, typeAheadStepOverride: InsertTypeAheadStep | null) => TypeAheadPluginState;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { InsertionTransactionMeta } from '../types';
|
|
3
|
-
import type { ACTIONS } from './actions';
|
|
4
|
-
export declare const isInsertionTransaction: (transactions: readonly Transaction[], action: ACTIONS) => InsertionTransactionMeta | null;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { TypeAheadStatsModifier } from './types';
|
|
2
|
-
export declare class StatsModifier implements TypeAheadStatsModifier {
|
|
3
|
-
startedAt: number;
|
|
4
|
-
endedAt: number;
|
|
5
|
-
keyCount: {
|
|
6
|
-
arrowUp: number;
|
|
7
|
-
arrowDown: number;
|
|
8
|
-
};
|
|
9
|
-
constructor();
|
|
10
|
-
increaseArrowUp: () => void;
|
|
11
|
-
increaseArrowDown: () => void;
|
|
12
|
-
serialize: () => {
|
|
13
|
-
startedAt: number;
|
|
14
|
-
endedAt: number;
|
|
15
|
-
keyCount: {
|
|
16
|
-
arrowUp: number;
|
|
17
|
-
arrowDown: number;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { TypeAheadHandler, TypeAheadInputMethod } from '../types';
|
|
4
|
-
type Props = {
|
|
5
|
-
triggerHandler: TypeAheadHandler;
|
|
6
|
-
inputMethod: TypeAheadInputMethod;
|
|
7
|
-
query?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const openTypeAhead: (props: Props) => (tr: Transaction) => void;
|
|
10
|
-
export declare const openTypeAheadAtCursor: ({ triggerHandler, inputMethod, query }: Props) => EditorCommand;
|
|
11
|
-
export {};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
-
import type { Command, NextEditorPlugin, OptionalPlugin, TypeAheadForceSelect, TypeAheadHandler, TypeAheadInsert, TypeAheadItem, TypeAheadItemRenderProps, TypeAheadSelectItem, TypeAheadStats, UiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
-
import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { CloseSelectionOptions } from './constants';
|
|
9
|
-
export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, };
|
|
10
|
-
export type OnSelectItem = (props: {
|
|
11
|
-
index: number;
|
|
12
|
-
item: TypeAheadItem;
|
|
13
|
-
}) => void;
|
|
14
|
-
export interface TypeAheadStatsSerializable extends TypeAheadStats {
|
|
15
|
-
serialize: () => TypeAheadStats;
|
|
16
|
-
}
|
|
17
|
-
export interface TypeAheadStatsModifier extends TypeAheadStatsSerializable {
|
|
18
|
-
increaseArrowUp: () => void;
|
|
19
|
-
increaseArrowDown: () => void;
|
|
20
|
-
}
|
|
21
|
-
export interface TypeAheadStatsMobileModifier extends TypeAheadStatsSerializable {
|
|
22
|
-
resetTime: () => void;
|
|
23
|
-
closeTime: () => void;
|
|
24
|
-
}
|
|
25
|
-
export type TypeAheadPluginState = {
|
|
26
|
-
decorationSet: DecorationSet;
|
|
27
|
-
decorationElement: HTMLElement | null;
|
|
28
|
-
typeAheadHandlers: Array<TypeAheadHandler>;
|
|
29
|
-
query: string;
|
|
30
|
-
items: Array<TypeAheadItem>;
|
|
31
|
-
triggerHandler?: TypeAheadHandler;
|
|
32
|
-
selectedIndex: number;
|
|
33
|
-
stats: TypeAheadStatsSerializable | null;
|
|
34
|
-
inputMethod: TypeAheadInputMethod | null;
|
|
35
|
-
};
|
|
36
|
-
export type OnInsertSelectedItemProps = {
|
|
37
|
-
mode: SelectItemMode;
|
|
38
|
-
index: number;
|
|
39
|
-
query: string;
|
|
40
|
-
};
|
|
41
|
-
export type OnItemMatchProps = {
|
|
42
|
-
mode: SelectItemMode;
|
|
43
|
-
query: string;
|
|
44
|
-
};
|
|
45
|
-
export type OnInsertSelectedItem = (props: OnInsertSelectedItemProps) => void;
|
|
46
|
-
export type OnItemMatch = (props: OnItemMatchProps) => boolean;
|
|
47
|
-
export type OnTextInsertProps = {
|
|
48
|
-
forceFocusOnEditor: boolean;
|
|
49
|
-
setSelectionAt: CloseSelectionOptions;
|
|
50
|
-
text: string;
|
|
51
|
-
};
|
|
52
|
-
export type OnTextInsert = (props: OnTextInsertProps) => void;
|
|
53
|
-
export type InsertionTransactionMeta = (editorState: EditorState) => Transaction | false;
|
|
54
|
-
type PopupMountPoints = Pick<UiComponentFactoryParams, 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement'>;
|
|
55
|
-
export type PopupMountPointReference = Record<'current', PopupMountPoints | null>;
|
|
56
|
-
export type CreateTypeAheadDecorations = (tr: ReadonlyTransaction, options: {
|
|
57
|
-
triggerHandler: TypeAheadHandler;
|
|
58
|
-
inputMethod: TypeAheadInputMethod;
|
|
59
|
-
reopenQuery?: string;
|
|
60
|
-
}) => {
|
|
61
|
-
decorationSet: DecorationSet;
|
|
62
|
-
decorationElement: HTMLElement | null;
|
|
63
|
-
stats: TypeAheadStatsSerializable | null;
|
|
64
|
-
};
|
|
65
|
-
export type RemoveTypeAheadDecorations = (decorationSet?: DecorationSet) => boolean;
|
|
66
|
-
export type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
|
|
67
|
-
export type TypeAheadPluginOptions = {
|
|
68
|
-
isMobile?: boolean;
|
|
69
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
70
|
-
};
|
|
71
|
-
type OpenTypeAheadProps = {
|
|
72
|
-
triggerHandler: TypeAheadHandler;
|
|
73
|
-
inputMethod: TypeAheadInputMethod;
|
|
74
|
-
query?: string;
|
|
75
|
-
};
|
|
76
|
-
type InsertTypeAheadItemProps = {
|
|
77
|
-
triggerHandler: TypeAheadHandler;
|
|
78
|
-
contentItem: TypeAheadItem;
|
|
79
|
-
query: string;
|
|
80
|
-
sourceListItem: TypeAheadItem[];
|
|
81
|
-
mode?: SelectItemMode;
|
|
82
|
-
};
|
|
83
|
-
type CloseTypeAheadProps = {
|
|
84
|
-
insertCurrentQueryAsRawText: boolean;
|
|
85
|
-
attachCommand?: Command;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Type ahead plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
89
|
-
* from `@atlaskit/editor-core`.
|
|
90
|
-
*/
|
|
91
|
-
export type TypeAheadPlugin = NextEditorPlugin<'typeAhead', {
|
|
92
|
-
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
93
|
-
dependencies: [
|
|
94
|
-
OptionalPlugin<AnalyticsPlugin>
|
|
95
|
-
];
|
|
96
|
-
sharedState: {
|
|
97
|
-
query: string;
|
|
98
|
-
isOpen: boolean;
|
|
99
|
-
isAllowed: boolean;
|
|
100
|
-
currentHandler?: TypeAheadHandler;
|
|
101
|
-
};
|
|
102
|
-
actions: {
|
|
103
|
-
isOpen: (editorState: EditorState) => boolean;
|
|
104
|
-
isAllowed: (editorState: EditorState) => boolean;
|
|
105
|
-
insert: (props: InsertTypeAheadItemProps) => boolean;
|
|
106
|
-
findHandlerByTrigger: (trigger: string) => TypeAheadHandler | null;
|
|
107
|
-
open: (props: OpenTypeAheadProps) => boolean;
|
|
108
|
-
close: (props: CloseTypeAheadProps) => boolean;
|
|
109
|
-
openAtTransaction: (props: OpenTypeAheadProps) => (tr: Transaction) => boolean;
|
|
110
|
-
};
|
|
111
|
-
}>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import debounce from 'lodash/debounce';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
type Cancelable = ReturnType<typeof debounce>;
|
|
7
|
-
type AssistiveTextProps = {
|
|
8
|
-
assistiveText: string;
|
|
9
|
-
isInFocus: boolean;
|
|
10
|
-
id: string;
|
|
11
|
-
statusDebounceMillis?: number;
|
|
12
|
-
debounce?: boolean;
|
|
13
|
-
};
|
|
14
|
-
type AssistiveTextState = {
|
|
15
|
-
bump: boolean;
|
|
16
|
-
debounced: boolean;
|
|
17
|
-
silenced: boolean;
|
|
18
|
-
};
|
|
19
|
-
declare class AssistveTextComponent extends React.Component<AssistiveTextProps, AssistiveTextState> {
|
|
20
|
-
static defaultProps: AssistiveTextProps;
|
|
21
|
-
debounceStatusUpdate: (() => void) & Cancelable;
|
|
22
|
-
state: {
|
|
23
|
-
bump: boolean;
|
|
24
|
-
debounced: boolean;
|
|
25
|
-
silenced: boolean;
|
|
26
|
-
};
|
|
27
|
-
componentWillMount(): void;
|
|
28
|
-
componentWillUnmount(): void;
|
|
29
|
-
componentWillReceiveProps(): void;
|
|
30
|
-
render(): jsx.JSX.Element;
|
|
31
|
-
}
|
|
32
|
-
export declare const AssistiveText: typeof AssistveTextComponent;
|
|
33
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import { CloseSelectionOptions } from '../constants';
|
|
5
|
-
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
6
|
-
type InputQueryProps = {
|
|
7
|
-
triggerQueryPrefix: string;
|
|
8
|
-
onQueryChange: (query: string) => void;
|
|
9
|
-
onItemSelect: (mode: SelectItemMode) => void;
|
|
10
|
-
selectNextItem: () => void;
|
|
11
|
-
selectPreviousItem: () => void;
|
|
12
|
-
cancel: (props: {
|
|
13
|
-
forceFocusOnEditor: boolean;
|
|
14
|
-
setSelectionAt: CloseSelectionOptions;
|
|
15
|
-
addPrefixTrigger: boolean;
|
|
16
|
-
text: string;
|
|
17
|
-
}) => void;
|
|
18
|
-
onQueryFocus: () => void;
|
|
19
|
-
forceFocus: boolean;
|
|
20
|
-
onUndoRedo?: (inputType: 'historyUndo' | 'historyRedo') => boolean;
|
|
21
|
-
reopenQuery?: string;
|
|
22
|
-
editorView: EditorView;
|
|
23
|
-
items: any[];
|
|
24
|
-
};
|
|
25
|
-
export declare const InputQuery: React.FC<InputQueryProps>;
|
|
26
|
-
export {};
|