@atlaskit/editor-plugin-user-preferences 1.2.2 → 1.2.3

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,12 @@
1
1
  # @atlaskit/editor-plugin-user-preferences
2
2
 
3
+ ## 1.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4bc05c9f87780`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4bc05c9f87780) -
8
+ [ux] Fix toolbar blink CLS regression
9
+
3
10
  ## 1.2.2
4
11
 
5
12
  ### Patch Changes
@@ -33,6 +33,12 @@ var userPreferencesPlugin = exports.userPreferencesPlugin = function userPrefere
33
33
  userPreferencesProvider: userPreferencesProvider,
34
34
  editorAnalyticsApi: api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
35
35
  });
36
+ },
37
+ getUserPreferences: function getUserPreferences() {
38
+ if (!userPreferencesProvider) {
39
+ return undefined;
40
+ }
41
+ return userPreferencesProvider.getPreferences();
36
42
  }
37
43
  },
38
44
  getSharedState: function getSharedState(editorState) {
@@ -28,6 +28,12 @@ export const userPreferencesPlugin = ({
28
28
  userPreferencesProvider,
29
29
  editorAnalyticsApi: api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
30
30
  });
31
+ },
32
+ getUserPreferences: () => {
33
+ if (!userPreferencesProvider) {
34
+ return undefined;
35
+ }
36
+ return userPreferencesProvider.getPreferences();
31
37
  }
32
38
  },
33
39
  getSharedState(editorState) {
@@ -27,6 +27,12 @@ export var userPreferencesPlugin = function userPreferencesPlugin(_ref) {
27
27
  userPreferencesProvider: userPreferencesProvider,
28
28
  editorAnalyticsApi: api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
29
29
  });
30
+ },
31
+ getUserPreferences: function getUserPreferences() {
32
+ if (!userPreferencesProvider) {
33
+ return undefined;
34
+ }
35
+ return userPreferencesProvider.getPreferences();
30
36
  }
31
37
  },
32
38
  getSharedState: function getSharedState(editorState) {
@@ -22,6 +22,7 @@ export type UserPreferencesPlugin = NextEditorPlugin<'userPreferences', {
22
22
  pluginConfiguration: UserPreferencesPluginOptions;
23
23
  actions: {
24
24
  updateUserPreference: (key: PrefKey, value: ResolvedUserPreferences[PrefKey]) => EditorCommand;
25
+ getUserPreferences: () => ResolvedUserPreferences | undefined;
25
26
  };
26
27
  sharedState: UserPreferencesSharedState;
27
28
  dependencies: [OptionalPlugin<AnalyticsPlugin>];
@@ -22,6 +22,7 @@ export type UserPreferencesPlugin = NextEditorPlugin<'userPreferences', {
22
22
  pluginConfiguration: UserPreferencesPluginOptions;
23
23
  actions: {
24
24
  updateUserPreference: (key: PrefKey, value: ResolvedUserPreferences[PrefKey]) => EditorCommand;
25
+ getUserPreferences: () => ResolvedUserPreferences | undefined;
25
26
  };
26
27
  sharedState: UserPreferencesSharedState;
27
28
  dependencies: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-user-preferences",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "UserPreferences plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,12 +34,12 @@
34
34
  "@atlaskit/editor-plugin-analytics": "^3.0.0",
35
35
  "@atlaskit/editor-prosemirror": "7.0.0",
36
36
  "@atlaskit/platform-feature-flags": "^1.1.0",
37
- "@atlaskit/tmp-editor-statsig": "^11.0.0",
37
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
38
38
  "@babel/runtime": "^7.0.0",
39
39
  "bind-event-listener": "^3.0.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@atlaskit/editor-common": "^107.25.0",
42
+ "@atlaskit/editor-common": "^107.28.0",
43
43
  "react": "^18.2.0"
44
44
  },
45
45
  "techstack": {