@atlaskit/editor-plugin-type-ahead 3.1.9 → 3.1.11

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/ui/InputQuery.js +30 -0
  3. package/dist/es2019/ui/InputQuery.js +30 -0
  4. package/dist/esm/ui/InputQuery.js +30 -0
  5. package/dist/types/pm-plugins/api.d.ts +1 -1
  6. package/dist/types/pm-plugins/commands/insert-type-ahead-item.d.ts +2 -2
  7. package/dist/types/pm-plugins/commands/insert-utils.d.ts +3 -3
  8. package/dist/types/pm-plugins/decorations.d.ts +2 -2
  9. package/dist/types/pm-plugins/main.d.ts +4 -4
  10. package/dist/types/pm-plugins/reducer.d.ts +1 -1
  11. package/dist/types/pm-plugins/stats-modifier.d.ts +1 -1
  12. package/dist/types/pm-plugins/utils.d.ts +8 -8
  13. package/dist/types/typeAheadPluginType.d.ts +13 -13
  14. package/dist/types/types/index.d.ts +19 -19
  15. package/dist/types/ui/InputQuery.d.ts +9 -9
  16. package/dist/types/ui/ListRow.d.ts +2 -2
  17. package/dist/types/ui/MoreOptions.d.ts +3 -3
  18. package/dist/types/ui/TypeAheadErrorFallback/EmptyState.d.ts +2 -2
  19. package/dist/types/ui/TypeAheadList.d.ts +14 -14
  20. package/dist/types/ui/TypeAheadListItem.d.ts +6 -6
  21. package/dist/types/ui/TypeAheadMenu.d.ts +2 -2
  22. package/dist/types/ui/TypeAheadPopup.d.ts +14 -14
  23. package/dist/types/ui/WrapperTypeAhead.d.ts +7 -7
  24. package/dist/types/ui/hooks/use-on-force-select.d.ts +3 -3
  25. package/dist/types/ui/modern/TypeAheadMenu.d.ts +2 -2
  26. package/dist/types/ui/modern/TypeAheadPopup.d.ts +13 -13
  27. package/dist/types-ts4.5/pm-plugins/api.d.ts +1 -1
  28. package/dist/types-ts4.5/pm-plugins/commands/insert-type-ahead-item.d.ts +2 -2
  29. package/dist/types-ts4.5/pm-plugins/commands/insert-utils.d.ts +3 -3
  30. package/dist/types-ts4.5/pm-plugins/decorations.d.ts +2 -2
  31. package/dist/types-ts4.5/pm-plugins/main.d.ts +4 -4
  32. package/dist/types-ts4.5/pm-plugins/reducer.d.ts +1 -1
  33. package/dist/types-ts4.5/pm-plugins/stats-modifier.d.ts +1 -1
  34. package/dist/types-ts4.5/pm-plugins/utils.d.ts +8 -8
  35. package/dist/types-ts4.5/typeAheadPluginType.d.ts +13 -13
  36. package/dist/types-ts4.5/types/index.d.ts +19 -19
  37. package/dist/types-ts4.5/ui/InputQuery.d.ts +9 -9
  38. package/dist/types-ts4.5/ui/ListRow.d.ts +2 -2
  39. package/dist/types-ts4.5/ui/MoreOptions.d.ts +3 -3
  40. package/dist/types-ts4.5/ui/TypeAheadErrorFallback/EmptyState.d.ts +2 -2
  41. package/dist/types-ts4.5/ui/TypeAheadList.d.ts +14 -14
  42. package/dist/types-ts4.5/ui/TypeAheadListItem.d.ts +6 -6
  43. package/dist/types-ts4.5/ui/TypeAheadMenu.d.ts +2 -2
  44. package/dist/types-ts4.5/ui/TypeAheadPopup.d.ts +14 -14
  45. package/dist/types-ts4.5/ui/WrapperTypeAhead.d.ts +7 -7
  46. package/dist/types-ts4.5/ui/hooks/use-on-force-select.d.ts +3 -3
  47. package/dist/types-ts4.5/ui/modern/TypeAheadMenu.d.ts +2 -2
  48. package/dist/types-ts4.5/ui/modern/TypeAheadPopup.d.ts +13 -13
  49. package/package.json +3 -4
@@ -1,11 +1,11 @@
1
1
  import type { TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  type Props = {
4
- triggerHandler: TypeAheadHandler;
4
+ closePopup: () => void;
5
+ editorView: EditorView;
5
6
  items: Array<TypeAheadItem>;
6
7
  query: string;
7
- editorView: EditorView;
8
- closePopup: () => void;
8
+ triggerHandler: TypeAheadHandler;
9
9
  };
10
10
  export declare const useOnForceSelect: ({ triggerHandler, items, query, editorView, closePopup, }: Props) => void;
11
11
  export {};
@@ -4,10 +4,10 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { TypeAheadPlugin } from '../../typeAheadPluginType';
5
5
  import type { PopupMountPointReference, TypeAheadPluginSharedState } from '../../types';
6
6
  type TypeAheadMenuType = {
7
- typeAheadState: Omit<TypeAheadPluginSharedState, 'isOpen' | 'isAllowed' | 'selectedIndex'>;
7
+ api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
8
8
  editorView: EditorView;
9
9
  popupMountRef: PopupMountPointReference;
10
- api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
10
+ typeAheadState: Omit<TypeAheadPluginSharedState, 'isOpen' | 'isAllowed' | 'selectedIndex'>;
11
11
  };
12
12
  export declare const TypeAheadMenu: React.MemoExoticComponent<({ editorView, popupMountRef, typeAheadState, api }: TypeAheadMenuType) => React.JSX.Element | null>;
13
13
  export {};
@@ -11,27 +11,27 @@ import { CloseSelectionOptions } from '../../pm-plugins/constants';
11
11
  import type { TypeAheadPlugin } from '../../typeAheadPluginType';
12
12
  import type { TypeAheadErrorInfo } from '../../types';
13
13
  type TypeAheadPopupProps = {
14
- triggerHandler: TypeAheadHandler;
15
- editorView: EditorView;
16
14
  anchorElement: HTMLElement;
17
- popupsMountPoint?: HTMLElement;
18
- popupsBoundariesElement?: HTMLElement;
19
- popupsScrollableElement?: HTMLElement;
20
- items: Array<TypeAheadItem>;
21
- errorInfo: TypeAheadErrorInfo;
22
- decorationSet: DecorationSet;
23
- isEmptyQuery: boolean;
24
- query: string;
25
- onItemInsert: (mode: SelectItemMode, index: number) => void;
15
+ api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
26
16
  cancel: (params: {
27
- setSelectionAt: CloseSelectionOptions;
28
17
  addPrefixTrigger: boolean;
29
18
  forceFocusOnEditor: boolean;
19
+ setSelectionAt: CloseSelectionOptions;
30
20
  }) => void;
31
- api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
21
+ decorationSet: DecorationSet;
22
+ editorView: EditorView;
23
+ errorInfo: TypeAheadErrorInfo;
24
+ isEmptyQuery: boolean;
25
+ items: Array<TypeAheadItem>;
26
+ onItemInsert: (mode: SelectItemMode, index: number) => void;
27
+ popupsBoundariesElement?: HTMLElement;
28
+ popupsMountPoint?: HTMLElement;
29
+ popupsScrollableElement?: HTMLElement;
30
+ query: string;
32
31
  setSelectedItem?: (props: {
33
32
  index: number;
34
33
  }) => void;
34
+ triggerHandler: TypeAheadHandler;
35
35
  };
36
36
  export declare const TypeAheadPopup: React.MemoExoticComponent<(props: TypeAheadPopupProps) => jsx.JSX.Element>;
37
37
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "3.1.9",
3
+ "version": "3.1.11",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/primitives": "^14.11.0",
48
48
  "@atlaskit/prosemirror-input-rules": "^3.4.0",
49
49
  "@atlaskit/theme": "^19.0.0",
50
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
50
+ "@atlaskit/tmp-editor-statsig": "^11.6.0",
51
51
  "@atlaskit/tokens": "^6.0.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@emotion/react": "^11.7.1",
@@ -58,7 +58,7 @@
58
58
  "w3c-keyname": "^2.1.8"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/editor-common": "^107.26.0",
61
+ "@atlaskit/editor-common": "^107.29.0",
62
62
  "react": "^18.2.0",
63
63
  "react-dom": "^18.2.0",
64
64
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -66,7 +66,6 @@
66
66
  "devDependencies": {
67
67
  "@af/visual-regression": "workspace:^",
68
68
  "@atlaskit/ssr": "workspace:^",
69
- "@atlaskit/visual-regression": "workspace:^",
70
69
  "@testing-library/react": "^13.4.0",
71
70
  "@types/react-virtualized": "^9.18.12",
72
71
  "wait-for-expect": "^1.2.0"