@atlaskit/editor-plugin-loom 2.5.1 → 2.6.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,19 @@
1
1
  # @atlaskit/editor-plugin-loom
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#126478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126478)
8
+ [`ca1665ebbfe4d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca1665ebbfe4d) -
9
+ [ED-23435] Store primary toolbar component registry in a plugin variable instead of in plugin
10
+ state to avoid having to add effects to all plugins and enable SSR for the toolbar. [Breaking
11
+ change] Converted registerComponent from the primary toolbar plugin into an action.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 2.5.1
4
18
 
5
19
  ### Patch Changes
@@ -15,7 +15,7 @@ var _commands = require("./commands");
15
15
  var _pmPlugin = require("./pm-plugin");
16
16
  var _ToolbarButton = _interopRequireDefault(require("./ui/ToolbarButton"));
17
17
  var loomPlugin = exports.loomPlugin = function loomPlugin(_ref) {
18
- var _api$analytics;
18
+ var _api$analytics, _api$primaryToolbar;
19
19
  var config = _ref.config,
20
20
  api = _ref.api;
21
21
  var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
@@ -38,6 +38,10 @@ var loomPlugin = exports.loomPlugin = function loomPlugin(_ref) {
38
38
  appearance: appearance
39
39
  });
40
40
  };
41
+ api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
42
+ name: 'loom',
43
+ component: primaryToolbarComponent
44
+ });
41
45
  return {
42
46
  name: 'loom',
43
47
  actions: {
@@ -123,13 +127,6 @@ var loomPlugin = exports.loomPlugin = function loomPlugin(_ref) {
123
127
  }
124
128
  },
125
129
  // Enable inserting Loom recordings through main toolbar
126
- usePluginHook: function usePluginHook() {
127
- var _api$core, _api$primaryToolbar;
128
- api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
129
- name: 'loom',
130
- component: primaryToolbarComponent
131
- }));
132
- },
133
130
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
134
131
  };
135
132
  };
@@ -11,7 +11,7 @@ export const loomPlugin = ({
11
11
  config,
12
12
  api
13
13
  }) => {
14
- var _api$analytics;
14
+ var _api$analytics, _api$primaryToolbar;
15
15
  const editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
16
16
 
17
17
  // Workaround since we want to insert a loom via the `hyperlink` plugin for now.
@@ -33,6 +33,10 @@ export const loomPlugin = ({
33
33
  appearance: appearance
34
34
  });
35
35
  };
36
+ api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
37
+ name: 'loom',
38
+ component: primaryToolbarComponent
39
+ });
36
40
  return {
37
41
  name: 'loom',
38
42
  actions: {
@@ -109,13 +113,6 @@ export const loomPlugin = ({
109
113
  }]
110
114
  },
111
115
  // Enable inserting Loom recordings through main toolbar
112
- usePluginHook: () => {
113
- var _api$core, _api$primaryToolbar;
114
- api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
115
- name: 'loom',
116
- component: primaryToolbarComponent
117
- }));
118
- },
119
116
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
120
117
  };
121
118
  };
@@ -8,7 +8,7 @@ import { insertLoom as _insertLoom, recordVideo, recordVideoFailed } from './com
8
8
  import { createPlugin, loomPluginKey } from './pm-plugin';
9
9
  import LoomToolbarButton from './ui/ToolbarButton';
10
10
  export var loomPlugin = function loomPlugin(_ref) {
11
- var _api$analytics;
11
+ var _api$analytics, _api$primaryToolbar;
12
12
  var config = _ref.config,
13
13
  api = _ref.api;
14
14
  var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
@@ -31,6 +31,10 @@ export var loomPlugin = function loomPlugin(_ref) {
31
31
  appearance: appearance
32
32
  });
33
33
  };
34
+ api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
35
+ name: 'loom',
36
+ component: primaryToolbarComponent
37
+ });
34
38
  return {
35
39
  name: 'loom',
36
40
  actions: {
@@ -116,13 +120,6 @@ export var loomPlugin = function loomPlugin(_ref) {
116
120
  }
117
121
  },
118
122
  // Enable inserting Loom recordings through main toolbar
119
- usePluginHook: function usePluginHook() {
120
- var _api$core, _api$primaryToolbar;
121
- api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
122
- name: 'loom',
123
- component: primaryToolbarComponent
124
- }));
125
- },
126
123
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
127
124
  };
128
125
  };
@@ -241,11 +241,11 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
241
241
  sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
242
242
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
243
243
  sharedState: import("@atlaskit/editor-plugin-primary-toolbar").PrimaryToolbarPluginState | undefined;
244
- commands: {
244
+ actions: {
245
245
  registerComponent: ({ name, component, }: {
246
246
  name: import("@atlaskit/editor-plugin-primary-toolbar").ToolbarElementNames;
247
247
  component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
248
- }) => import("@atlaskit/editor-common/types").EditorCommand;
248
+ }) => void;
249
249
  };
250
250
  }, undefined>>];
251
251
  sharedState: import("..").LoomPluginState | undefined;
@@ -497,11 +497,11 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
497
497
  sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
498
498
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
499
499
  sharedState: import("@atlaskit/editor-plugin-primary-toolbar").PrimaryToolbarPluginState | undefined;
500
- commands: {
500
+ actions: {
501
501
  registerComponent: ({ name, component, }: {
502
502
  name: import("@atlaskit/editor-plugin-primary-toolbar").ToolbarElementNames;
503
503
  component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
504
- }) => import("@atlaskit/editor-common/types").EditorCommand;
504
+ }) => void;
505
505
  };
506
506
  }, undefined>>];
507
507
  sharedState: import("..").LoomPluginState | undefined;
@@ -298,11 +298,11 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
298
298
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
299
299
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
300
300
  sharedState: import("@atlaskit/editor-plugin-primary-toolbar").PrimaryToolbarPluginState | undefined;
301
- commands: {
301
+ actions: {
302
302
  registerComponent: ({ name, component, }: {
303
303
  name: import("@atlaskit/editor-plugin-primary-toolbar").ToolbarElementNames;
304
304
  component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
305
- }) => import("@atlaskit/editor-common/types").EditorCommand;
305
+ }) => void;
306
306
  };
307
307
  }, undefined>>
308
308
  ];
@@ -612,11 +612,11 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
612
612
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
613
613
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
614
614
  sharedState: import("@atlaskit/editor-plugin-primary-toolbar").PrimaryToolbarPluginState | undefined;
615
- commands: {
615
+ actions: {
616
616
  registerComponent: ({ name, component, }: {
617
617
  name: import("@atlaskit/editor-plugin-primary-toolbar").ToolbarElementNames;
618
618
  component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
619
- }) => import("@atlaskit/editor-common/types").EditorCommand;
619
+ }) => void;
620
620
  };
621
621
  }, undefined>>
622
622
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-loom",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "Loom plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,10 +36,10 @@
36
36
  ".": "./src/index.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@atlaskit/editor-common": "^87.0.0",
39
+ "@atlaskit/editor-common": "^87.3.0",
40
40
  "@atlaskit/editor-plugin-analytics": "^1.6.0",
41
- "@atlaskit/editor-plugin-hyperlink": "^2.6.0",
42
- "@atlaskit/editor-plugin-primary-toolbar": "^1.3.0",
41
+ "@atlaskit/editor-plugin-hyperlink": "^2.7.0",
42
+ "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
43
43
  "@atlaskit/editor-plugin-width": "^1.2.0",
44
44
  "@atlaskit/editor-prosemirror": "5.0.1",
45
45
  "@atlaskit/logo": "^14.1.0",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@atlaskit/editor-plugin-base": "^1.9.0",
62
- "@atlaskit/editor-plugin-card": "^2.8.0",
62
+ "@atlaskit/editor-plugin-card": "^2.9.0",
63
63
  "@atlaskit/editor-plugin-copy-button": "^1.2.0",
64
64
  "@atlaskit/editor-plugin-decorations": "^1.2.0",
65
65
  "@atlaskit/editor-plugin-editor-disabled": "^1.2.0",