@atlaskit/editor-plugin-quick-insert 11.1.9 → 12.0.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 CHANGED
@@ -1,5 +1,37 @@
1
1
  # @atlaskit/editor-plugin-quick-insert
2
2
 
3
+ ## 12.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 11.1.10
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 11.1.9
4
36
 
5
37
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "11.1.9",
3
+ "version": "12.0.0",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -16,35 +16,27 @@
16
16
  "module": "dist/esm/index.js",
17
17
  "module:es2019": "dist/es2019/index.js",
18
18
  "types": "dist/types/index.d.ts",
19
- "typesVersions": {
20
- ">=4.5 <4.9": {
21
- "*": [
22
- "dist/types-ts4.5/*",
23
- "dist/types-ts4.5/index.d.ts"
24
- ]
25
- }
26
- },
27
19
  "sideEffects": [
28
20
  "*.compiled.css"
29
21
  ],
30
22
  "atlaskit:src": "src/index.ts",
31
23
  "dependencies": {
32
- "@atlaskit/button": "^23.11.0",
33
- "@atlaskit/editor-plugin-analytics": "^11.0.0",
34
- "@atlaskit/editor-plugin-connectivity": "^11.0.0",
35
- "@atlaskit/editor-plugin-metrics": "^12.0.0",
36
- "@atlaskit/editor-plugin-type-ahead": "^11.3.0",
37
- "@atlaskit/editor-prosemirror": "^7.3.0",
38
- "@atlaskit/icon": "^35.4.0",
39
- "@atlaskit/modal-dialog": "^15.3.0",
40
- "@atlaskit/platform-feature-flags": "^1.1.0",
41
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
42
- "@atlaskit/tokens": "^13.4.0",
24
+ "@atlaskit/button": "^24.0.0",
25
+ "@atlaskit/editor-plugin-analytics": "^12.0.0",
26
+ "@atlaskit/editor-plugin-connectivity": "^12.0.0",
27
+ "@atlaskit/editor-plugin-metrics": "^13.0.0",
28
+ "@atlaskit/editor-plugin-type-ahead": "^12.0.0",
29
+ "@atlaskit/editor-prosemirror": "^8.0.0",
30
+ "@atlaskit/icon": "^36.0.0",
31
+ "@atlaskit/modal-dialog": "^16.0.0",
32
+ "@atlaskit/platform-feature-flags": "^2.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^104.0.0",
34
+ "@atlaskit/tokens": "^14.0.0",
43
35
  "@babel/runtime": "^7.0.0",
44
36
  "@emotion/react": "^11.7.1"
45
37
  },
46
38
  "peerDependencies": {
47
- "@atlaskit/editor-common": "^115.15.0",
39
+ "@atlaskit/editor-common": "^116.0.0",
48
40
  "react": "^18.2.0",
49
41
  "react-dom": "^18.2.0",
50
42
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/quick-insert-plugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/quick-insert-plugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/quick-insert-plugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/quick-insert-plugin-type.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/quick-insert-plugin-type.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/quick-insert-plugin-type.d.ts"
17
10
  }
@@ -1 +0,0 @@
1
- export type { QuickInsertPlugin, QuickInsertSharedState, QuickInsertPluginOptions, } from '../quickInsertPluginType';
@@ -1 +0,0 @@
1
- export { quickInsertPlugin } from '../quickInsertPlugin';
@@ -1,2 +0,0 @@
1
- export { quickInsertPlugin } from './quickInsertPlugin';
2
- export type { QuickInsertPlugin, QuickInsertSharedState, QuickInsertPluginOptions, } from './quickInsertPluginType';
@@ -1,6 +0,0 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
- import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
4
- export declare const openElementBrowserModal: EditorCommand;
5
- export declare const closeElementBrowserModal: () => Command;
6
- export declare const createInsertItem: (onInsert?: (item: QuickInsertItem) => void) => ((item: QuickInsertItem, source?: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.ELEMENT_BROWSER) => Command);
@@ -1,19 +0,0 @@
1
- import { type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- type QuickInsertOpenExperienceOptions = {
4
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
5
- refs: {
6
- popupsMountPoint?: HTMLElement;
7
- wrapperElement?: HTMLElement;
8
- };
9
- };
10
- /**
11
- * This experience tracks when the quick insert is opened.
12
- *
13
- * Start: When user types `/` to open quick insert or clicks the quick insert button
14
- * Success: When the quick insert menu is added to the DOM within 500ms of start
15
- * Failure: When 500ms passes without the quick insert menu being added to the DOM
16
- * Abort: When user presses escape or backspace
17
- */
18
- export declare const getQuickInsertOpenExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: QuickInsertOpenExperienceOptions) => SafePlugin;
19
- export {};
@@ -1,3 +0,0 @@
1
- import type { QuickInsertPluginState } from '@atlaskit/editor-common/types';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- export declare const pluginKey: PluginKey<QuickInsertPluginState>;
@@ -1,2 +0,0 @@
1
- import type { QuickInsertPlugin } from './quickInsertPluginType';
2
- export declare const quickInsertPlugin: QuickInsertPlugin;
@@ -1,32 +0,0 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
- import type { Command, QuickInsertPluginOptions as CommonQuickInsertPluginOptions, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, OptionalPlugin, QuickInsertHandler, QuickInsertSearchOptions, TypeAheadHandler } from '@atlaskit/editor-common/types';
4
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
6
- import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
7
- import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
8
- export type QuickInsertSharedState = CommonQuickInsertSharedState & {
9
- typeAheadHandler: TypeAheadHandler;
10
- };
11
- export type QuickInsertPluginOptions = CommonQuickInsertPluginOptions;
12
- export type QuickInsertPlugin = NextEditorPlugin<'quickInsert', {
13
- actions: {
14
- getSuggestions: (searchOptions: QuickInsertSearchOptions) => QuickInsertItem[];
15
- insertItem: (item: QuickInsertItem, source?: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.ELEMENT_BROWSER) => Command;
16
- openTypeAhead: (inputMethod: TypeAheadInputMethod, removePrefixTriggerOnCancel?: boolean) => boolean;
17
- };
18
- commands: {
19
- addQuickInsertItem: (item: QuickInsertHandler) => EditorCommand;
20
- openElementBrowserModal: EditorCommand;
21
- removeQuickInsertItem: (key: string) => EditorCommand;
22
- updateQuickInsertItem: (key: string, item: QuickInsertHandler) => EditorCommand;
23
- };
24
- dependencies: [
25
- TypeAheadPlugin,
26
- OptionalPlugin<ConnectivityPlugin>,
27
- OptionalPlugin<MetricsPlugin>,
28
- OptionalPlugin<AnalyticsPlugin>
29
- ];
30
- pluginConfiguration: QuickInsertPluginOptions | undefined;
31
- sharedState: QuickInsertSharedState | null;
32
- }>;
@@ -1,23 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ComponentType, type FC } from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
- import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
8
- import type { EmptyStateHandler } from '@atlaskit/editor-common/types';
9
- export declare const MODAL_WRAPPER_PADDING = 16;
10
- export interface Props {
11
- emptyStateHandler?: EmptyStateHandler;
12
- getItems: (query?: string, category?: string) => QuickInsertItem[];
13
- helpUrl?: string | undefined;
14
- isOpen?: boolean;
15
- onClose: () => void;
16
- onCloseComplete: () => void;
17
- onInsertItem: (item: QuickInsertItem) => void;
18
- shouldReturnFocus?: boolean;
19
- }
20
- declare const _default_1: FC<WithIntlProps<Props & WrappedComponentProps>> & {
21
- WrappedComponent: ComponentType<Props & WrappedComponentProps>;
22
- };
23
- export default _default_1;
@@ -1,5 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- export declare function getCategories(intl: IntlShape): {
3
- title: string;
4
- name: string;
5
- }[];
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { QuickInsertPlugin } from '../../quickInsertPluginType';
5
- type Props = {
6
- editorView: EditorView;
7
- helpUrl: string | undefined;
8
- pluginInjectionAPI: ExtractInjectionAPI<QuickInsertPlugin> | undefined;
9
- };
10
- declare const _default: ({ editorView, helpUrl, pluginInjectionAPI }: Props) => React.JSX.Element;
11
- export default _default;
@@ -1,6 +0,0 @@
1
- import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
2
- import type { QuickInsertSearchOptions } from '@atlaskit/editor-common/types';
3
- type GetQuickInsertSuggestions = (searchOptions: QuickInsertSearchOptions, lazyDefaultItems?: () => QuickInsertItem[], providedItems?: QuickInsertItem[]) => QuickInsertItem[];
4
- export declare const withLayoutQuickInsertPrioritySorting: (prioritySortingFn?: QuickInsertSearchOptions["prioritySortingFn"]) => QuickInsertSearchOptions["prioritySortingFn"];
5
- export declare const getQuickInsertSuggestions: GetQuickInsertSuggestions;
6
- export {};