@atlaskit/editor-plugin-user-preferences 9.0.14 → 10.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-user-preferences
2
2
 
3
+ ## 10.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
+ ## 9.0.15
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 9.0.14
4
36
 
5
37
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-user-preferences",
3
- "version": "9.0.14",
3
+ "version": "10.0.0",
4
4
  "description": "UserPreferences plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -17,25 +17,17 @@
17
17
  "module": "dist/esm/index.js",
18
18
  "module:es2019": "dist/es2019/index.js",
19
19
  "types": "dist/types/index.d.ts",
20
- "typesVersions": {
21
- ">=4.5 <4.9": {
22
- "*": [
23
- "dist/types-ts4.5/*",
24
- "dist/types-ts4.5/index.d.ts"
25
- ]
26
- }
27
- },
28
20
  "sideEffects": false,
29
21
  "atlaskit:src": "src/index.ts",
30
22
  "dependencies": {
31
- "@atlaskit/editor-plugin-analytics": "^11.0.0",
32
- "@atlaskit/editor-prosemirror": "^7.3.0",
33
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
23
+ "@atlaskit/editor-plugin-analytics": "^12.0.0",
24
+ "@atlaskit/editor-prosemirror": "^8.0.0",
25
+ "@atlaskit/tmp-editor-statsig": "^104.0.0",
34
26
  "@babel/runtime": "^7.0.0",
35
27
  "bind-event-listener": "^3.0.0"
36
28
  },
37
29
  "peerDependencies": {
38
- "@atlaskit/editor-common": "^115.15.0",
30
+ "@atlaskit/editor-common": "^116.0.0",
39
31
  "react": "^18.2.0"
40
32
  },
41
33
  "techstack": {
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/entry-points/user-preferences-plugin.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/user-preferences-plugin.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/user-preferences-plugin.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/entry-points/user-preferences-plugin.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/entry-points/user-preferences-plugin.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/entry-points/user-preferences-plugin-type.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/user-preferences-plugin-type.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/user-preferences-plugin-type.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/entry-points/user-preferences-plugin-type.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/entry-points/user-preferences-plugin-type.d.ts"
15
8
  }
@@ -1 +0,0 @@
1
- export type { UserPreferencesPlugin, UserPreferencesPluginOptions, UserPreferencesSharedState, } from '../userPreferencesPluginType';
@@ -1 +0,0 @@
1
- export { userPreferencesPlugin } from '../userPreferencesPlugin';
@@ -1,2 +0,0 @@
1
- export { userPreferencesPlugin } from './userPreferencesPlugin';
2
- export type { UserPreferencesPlugin, UserPreferencesPluginOptions, UserPreferencesSharedState, } from './userPreferencesPluginType';
@@ -1,16 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand } from '@atlaskit/editor-common/types';
3
- import type { ResolvedUserPreferences, UserPreferences, UserPreferencesProvider } from '@atlaskit/editor-common/user-preferences';
4
- export declare const overrideUserPreference: ({ key, value, }: {
5
- key: keyof ResolvedUserPreferences;
6
- value: ResolvedUserPreferences[typeof key];
7
- }) => EditorCommand;
8
- export declare const clearOverrideUserPreference: ({ key }: {
9
- key: keyof ResolvedUserPreferences;
10
- }) => EditorCommand;
11
- export declare const updateUserPreference: ({ key, value, userPreferencesProvider, editorAnalyticsApi, }: {
12
- editorAnalyticsApi?: EditorAnalyticsAPI | undefined;
13
- key: keyof UserPreferences;
14
- userPreferencesProvider?: UserPreferencesProvider;
15
- value: ResolvedUserPreferences[typeof key];
16
- }) => EditorCommand;
@@ -1,22 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { ResolvedUserPreferences } from '@atlaskit/editor-common/user-preferences';
4
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
- import type { UserPreferencesPluginOptions, UserPreferencesPlugin } from '../userPreferencesPluginType';
6
- /**
7
- * Given the current overrides and an override action `{ key, value }`, returns
8
- * the new overrides object:
9
- * - If `value` is `null` or `undefined`, the key is removed from overrides.
10
- * - Otherwise, the key is set to `value` in overrides.
11
- */
12
- export declare const applyOverride: (currentOverrides: Partial<ResolvedUserPreferences>, override: {
13
- key: keyof ResolvedUserPreferences;
14
- value: ResolvedUserPreferences[keyof ResolvedUserPreferences] | null | undefined;
15
- }) => Partial<ResolvedUserPreferences>;
16
- export declare const userPreferencesPluginKey: PluginKey;
17
- type UserPreferencesPluginState = {
18
- overrides: Partial<ResolvedUserPreferences>;
19
- preferences: ResolvedUserPreferences;
20
- };
21
- export declare const createPlugin: (pluginOptions: UserPreferencesPluginOptions, _api: ExtractInjectionAPI<UserPreferencesPlugin> | undefined) => SafePlugin<UserPreferencesPluginState>;
22
- export {};
@@ -1,2 +0,0 @@
1
- import type { UserPreferencesProvider } from '@atlaskit/editor-common/user-preferences';
2
- export declare const useDocumentVisibilityWatcher: (userPreferencesProvider?: UserPreferencesProvider) => void;
@@ -1,4 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { ResolvedUserPreferences } from '@atlaskit/editor-common/user-preferences';
3
- import type { UserPreferencesPlugin } from '../userPreferencesPluginType';
4
- export declare const useUserPreferencesInitListener: (isInitialized: boolean, resolvedUserPreferences: ResolvedUserPreferences | null, api?: ExtractInjectionAPI<UserPreferencesPlugin>) => void;
@@ -1,3 +0,0 @@
1
- import type { ResolvedUserPreferences } from '@atlaskit/editor-common/user-preferences';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- export declare const useUserPreferencesUpdateListener: (editorView: EditorView, resolvedUserPreferences: ResolvedUserPreferences | null) => void;
@@ -1,2 +0,0 @@
1
- import type { UserPreferencesPlugin } from './userPreferencesPluginType';
2
- export declare const userPreferencesPlugin: UserPreferencesPlugin;
@@ -1,36 +0,0 @@
1
- import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { ResolvedUserPreferences, UserPreferencesProvider, UserPreferences } from '@atlaskit/editor-common/user-preferences';
3
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
- export type UserPreferencesPluginOptions = {
5
- /**
6
- * The initial user preferences to be used when the userPreferencesProvider is not available.
7
- * Otherwise, will default to the userPreferencesProvider's initial preferences.
8
- */
9
- initialUserPreferences?: ResolvedUserPreferences;
10
- /**
11
- * The user preferences provider to be used to get and set user preferences.
12
- * When not provided, user preferences will not be persisted.
13
- */
14
- userPreferencesProvider?: UserPreferencesProvider;
15
- };
16
- export type PrefKey = keyof UserPreferences;
17
- export type ResolvedPrefKey = keyof ResolvedUserPreferences;
18
- export type UserPreferencesSharedState = {
19
- overrides: Partial<ResolvedUserPreferences>;
20
- preferences: ResolvedUserPreferences;
21
- };
22
- export type UserPreferencesPlugin = NextEditorPlugin<'userPreferences', {
23
- actions: {
24
- getUserPreferences: () => ResolvedUserPreferences | undefined;
25
- updateUserPreference: (key: PrefKey, value: ResolvedUserPreferences[PrefKey]) => EditorCommand;
26
- };
27
- commands: {
28
- clearOverrideUserPreference: (key: ResolvedPrefKey) => EditorCommand;
29
- overrideUserPreference: (key: ResolvedPrefKey, value: ResolvedUserPreferences[ResolvedPrefKey]) => EditorCommand;
30
- };
31
- dependencies: [
32
- OptionalPlugin<AnalyticsPlugin>
33
- ];
34
- pluginConfiguration: UserPreferencesPluginOptions;
35
- sharedState: UserPreferencesSharedState;
36
- }>;