@atlaskit/editor-plugin-loom 2.6.0 → 2.6.2

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.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#127640](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/127640)
14
+ [`ccefb817c754a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ccefb817c754a) -
15
+ [ux] Migrate typography with new ADS token and primitive
16
+
3
17
  ## 2.6.0
4
18
 
5
19
  ### Minor Changes
@@ -12,6 +12,7 @@ var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
13
13
  var _logo = require("@atlaskit/logo");
14
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
+ var _primitives = require("@atlaskit/primitives");
15
16
  var _commands = require("../commands");
16
17
  /**
17
18
  * @jsxRuntime classic
@@ -34,6 +35,7 @@ var LoomToolbarButton = function LoomToolbarButton(_ref) {
34
35
  return null;
35
36
  }
36
37
  var label = formatMessage(appearance === 'comment' ? _messages.toolbarInsertBlockMessages.addLoomVideoComment : _messages.toolbarInsertBlockMessages.addLoomVideo);
38
+ var shouldShowRecordText = (0, _platformFeatureFlags.fg)('platform.editor.plugin.loom.responsive-menu_4at4a') && ((widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0) > LOOM_BUTTON_WIDTH_BREAKPOINT;
37
39
  return (0, _react.jsx)(_uiMenu.ToolbarButton, {
38
40
  buttonId: _uiMenu.TOOLBAR_BUTTON.RECORD_VIDEO,
39
41
  onClick: function onClick() {
@@ -51,6 +53,6 @@ var LoomToolbarButton = function LoomToolbarButton(_ref) {
51
53
  label: label,
52
54
  size: "small"
53
55
  })
54
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.plugin.loom.responsive-menu_4at4a') && ((widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0) > LOOM_BUTTON_WIDTH_BREAKPOINT && (0, _react.jsx)("span", null, formatMessage(_messages.toolbarInsertBlockMessages.recordLoomShortTitle)));
56
+ }, shouldShowRecordText && (0, _react.jsx)(_primitives.Text, null, formatMessage(_messages.toolbarInsertBlockMessages.recordLoomShortTitle)));
55
57
  };
56
58
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(LoomToolbarButton);
@@ -10,7 +10,8 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
10
10
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
11
11
  import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
12
12
  import { LoomIcon } from '@atlaskit/logo';
13
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { Text } from '@atlaskit/primitives';
14
15
  import { recordVideo } from '../commands';
15
16
  // This const is derived from the breakpoint where the toolbar hides its icons. It is used to hide the text in the AI button.
16
17
  // Derived from values from platform/packages/editor/editor-core/src/ui/Appearance/FullPage/MainToolbar.tsx
@@ -31,6 +32,7 @@ const LoomToolbarButton = ({
31
32
  return null;
32
33
  }
33
34
  const label = formatMessage(appearance === 'comment' ? toolbarInsertBlockMessages.addLoomVideoComment : toolbarInsertBlockMessages.addLoomVideo);
35
+ const shouldShowRecordText = fg('platform.editor.plugin.loom.responsive-menu_4at4a') && ((widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0) > LOOM_BUTTON_WIDTH_BREAKPOINT;
34
36
  return jsx(ToolbarButton, {
35
37
  buttonId: TOOLBAR_BUTTON.RECORD_VIDEO,
36
38
  onClick: () => {
@@ -48,6 +50,6 @@ const LoomToolbarButton = ({
48
50
  label: label,
49
51
  size: "small"
50
52
  })
51
- }, getBooleanFF('platform.editor.plugin.loom.responsive-menu_4at4a') && ((widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0) > LOOM_BUTTON_WIDTH_BREAKPOINT && jsx("span", null, formatMessage(toolbarInsertBlockMessages.recordLoomShortTitle)));
53
+ }, shouldShowRecordText && jsx(Text, null, formatMessage(toolbarInsertBlockMessages.recordLoomShortTitle)));
52
54
  };
53
55
  export default injectIntl(LoomToolbarButton);
@@ -10,7 +10,8 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
10
10
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
11
11
  import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
12
12
  import { LoomIcon } from '@atlaskit/logo';
13
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { Text } from '@atlaskit/primitives';
14
15
  import { recordVideo } from '../commands';
15
16
  // This const is derived from the breakpoint where the toolbar hides its icons. It is used to hide the text in the AI button.
16
17
  // Derived from values from platform/packages/editor/editor-core/src/ui/Appearance/FullPage/MainToolbar.tsx
@@ -27,6 +28,7 @@ var LoomToolbarButton = function LoomToolbarButton(_ref) {
27
28
  return null;
28
29
  }
29
30
  var label = formatMessage(appearance === 'comment' ? toolbarInsertBlockMessages.addLoomVideoComment : toolbarInsertBlockMessages.addLoomVideo);
31
+ var shouldShowRecordText = fg('platform.editor.plugin.loom.responsive-menu_4at4a') && ((widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0) > LOOM_BUTTON_WIDTH_BREAKPOINT;
30
32
  return jsx(ToolbarButton, {
31
33
  buttonId: TOOLBAR_BUTTON.RECORD_VIDEO,
32
34
  onClick: function onClick() {
@@ -44,6 +46,6 @@ var LoomToolbarButton = function LoomToolbarButton(_ref) {
44
46
  label: label,
45
47
  size: "small"
46
48
  })
47
- }, getBooleanFF('platform.editor.plugin.loom.responsive-menu_4at4a') && ((widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0) > LOOM_BUTTON_WIDTH_BREAKPOINT && jsx("span", null, formatMessage(toolbarInsertBlockMessages.recordLoomShortTitle)));
49
+ }, shouldShowRecordText && jsx(Text, null, formatMessage(toolbarInsertBlockMessages.recordLoomShortTitle)));
48
50
  };
49
51
  export default injectIntl(LoomToolbarButton);
@@ -193,10 +193,19 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
193
193
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
194
194
  }, import("@atlaskit/editor-common/types").FeatureFlags>>];
195
195
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
196
- }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
196
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
197
+ dependencies: [];
198
+ actions: {
199
+ ariaNotify: (message: string, ariaLiveElementAttributes?: import("@atlaskit/editor-plugin-accessibility-utils").AriaLiveElementAttributes | undefined) => void;
200
+ };
201
+ sharedState: import("@atlaskit/editor-plugin-accessibility-utils").AccessibilityUtilsPluginState;
202
+ }, undefined>>];
197
203
  sharedState: import("@atlaskit/editor-plugin-block-controls").BlockControlsSharedState;
198
204
  commands: {
199
- moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
205
+ moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined, formatMessage?: {
206
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>> | undefined, opts?: import("intl-messageformat").Options | undefined): string;
207
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, string | number | boolean | {} | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNodeArray | import("react").ReactPortal | Date | import("intl-messageformat").FormatXMLElementFn<import("react").ReactNode, import("react").ReactNode> | null | undefined> | undefined, opts?: import("intl-messageformat").Options | undefined): import("react").ReactNode;
208
+ } | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
200
209
  showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugin-block-controls").HandleOptions) => import("@atlaskit/editor-common/types").EditorCommand;
201
210
  setNodeDragged: (posNumber: number, anchorName: string, nodeType: string) => import("@atlaskit/editor-common/types").EditorCommand;
202
211
  };
@@ -449,10 +458,19 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
449
458
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
450
459
  }, import("@atlaskit/editor-common/types").FeatureFlags>>];
451
460
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
452
- }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
461
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
462
+ dependencies: [];
463
+ actions: {
464
+ ariaNotify: (message: string, ariaLiveElementAttributes?: import("@atlaskit/editor-plugin-accessibility-utils").AriaLiveElementAttributes | undefined) => void;
465
+ };
466
+ sharedState: import("@atlaskit/editor-plugin-accessibility-utils").AccessibilityUtilsPluginState;
467
+ }, undefined>>];
453
468
  sharedState: import("@atlaskit/editor-plugin-block-controls").BlockControlsSharedState;
454
469
  commands: {
455
- moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
470
+ moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined, formatMessage?: {
471
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>> | undefined, opts?: import("intl-messageformat").Options | undefined): string;
472
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, string | number | boolean | {} | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNodeArray | import("react").ReactPortal | Date | import("intl-messageformat").FormatXMLElementFn<import("react").ReactNode, import("react").ReactNode> | null | undefined> | undefined, opts?: import("intl-messageformat").Options | undefined): import("react").ReactNode;
473
+ } | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
456
474
  showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugin-block-controls").HandleOptions) => import("@atlaskit/editor-common/types").EditorCommand;
457
475
  setNodeDragged: (posNumber: number, anchorName: string, nodeType: string) => import("@atlaskit/editor-common/types").EditorCommand;
458
476
  };
@@ -241,11 +241,22 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
241
241
  }, import("@atlaskit/editor-common/types").FeatureFlags>>
242
242
  ];
243
243
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
244
- }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
244
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>,
245
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
246
+ dependencies: [
247
+ ];
248
+ actions: {
249
+ ariaNotify: (message: string, ariaLiveElementAttributes?: import("@atlaskit/editor-plugin-accessibility-utils").AriaLiveElementAttributes | undefined) => void;
250
+ };
251
+ sharedState: import("@atlaskit/editor-plugin-accessibility-utils").AccessibilityUtilsPluginState;
252
+ }, undefined>>
245
253
  ];
246
254
  sharedState: import("@atlaskit/editor-plugin-block-controls").BlockControlsSharedState;
247
255
  commands: {
248
- moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
256
+ moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined, formatMessage?: {
257
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>> | undefined, opts?: import("intl-messageformat").Options | undefined): string;
258
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, string | number | boolean | {} | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNodeArray | import("react").ReactPortal | Date | import("intl-messageformat").FormatXMLElementFn<import("react").ReactNode, import("react").ReactNode> | null | undefined> | undefined, opts?: import("intl-messageformat").Options | undefined): import("react").ReactNode;
259
+ } | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
249
260
  showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugin-block-controls").HandleOptions) => import("@atlaskit/editor-common/types").EditorCommand;
250
261
  setNodeDragged: (posNumber: number, anchorName: string, nodeType: string) => import("@atlaskit/editor-common/types").EditorCommand;
251
262
  };
@@ -555,11 +566,22 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
555
566
  }, import("@atlaskit/editor-common/types").FeatureFlags>>
556
567
  ];
557
568
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
558
- }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
569
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>,
570
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
571
+ dependencies: [
572
+ ];
573
+ actions: {
574
+ ariaNotify: (message: string, ariaLiveElementAttributes?: import("@atlaskit/editor-plugin-accessibility-utils").AriaLiveElementAttributes | undefined) => void;
575
+ };
576
+ sharedState: import("@atlaskit/editor-plugin-accessibility-utils").AccessibilityUtilsPluginState;
577
+ }, undefined>>
559
578
  ];
560
579
  sharedState: import("@atlaskit/editor-plugin-block-controls").BlockControlsSharedState;
561
580
  commands: {
562
- moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
581
+ moveNode: (start: number, to: number, inputMethod?: import("@atlaskit/editor-plugin-block-controls").MoveNodeMethod | undefined, formatMessage?: {
582
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>> | undefined, opts?: import("intl-messageformat").Options | undefined): string;
583
+ (descriptor: import("react-intl-next").MessageDescriptor, values?: Record<string, string | number | boolean | {} | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNodeArray | import("react").ReactPortal | Date | import("intl-messageformat").FormatXMLElementFn<import("react").ReactNode, import("react").ReactNode> | null | undefined> | undefined, opts?: import("intl-messageformat").Options | undefined): import("react").ReactNode;
584
+ } | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
563
585
  showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugin-block-controls").HandleOptions) => import("@atlaskit/editor-common/types").EditorCommand;
564
586
  setNodeDragged: (posNumber: number, anchorName: string, nodeType: string) => import("@atlaskit/editor-common/types").EditorCommand;
565
587
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-loom",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Loom plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,14 +36,15 @@
36
36
  ".": "./src/index.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@atlaskit/editor-common": "^87.3.0",
40
- "@atlaskit/editor-plugin-analytics": "^1.6.0",
41
- "@atlaskit/editor-plugin-hyperlink": "^2.7.0",
39
+ "@atlaskit/editor-common": "^87.6.0",
40
+ "@atlaskit/editor-plugin-analytics": "^1.7.0",
41
+ "@atlaskit/editor-plugin-hyperlink": "^2.8.0",
42
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",
46
46
  "@atlaskit/platform-feature-flags": "0.3.0",
47
+ "@atlaskit/primitives": "^12.0.0",
47
48
  "@babel/runtime": "^7.0.0",
48
49
  "@emotion/react": "^11.7.1",
49
50
  "@loomhq/record-sdk": "^2.36.18"
@@ -58,13 +59,13 @@
58
59
  }
59
60
  },
60
61
  "devDependencies": {
61
- "@atlaskit/editor-plugin-base": "^1.9.0",
62
- "@atlaskit/editor-plugin-card": "^2.9.0",
62
+ "@atlaskit/editor-plugin-base": "^1.10.0",
63
+ "@atlaskit/editor-plugin-card": "^2.10.0",
63
64
  "@atlaskit/editor-plugin-copy-button": "^1.2.0",
64
65
  "@atlaskit/editor-plugin-decorations": "^1.2.0",
65
66
  "@atlaskit/editor-plugin-editor-disabled": "^1.2.0",
66
67
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
67
- "@atlaskit/editor-plugin-floating-toolbar": "^1.9.0",
68
+ "@atlaskit/editor-plugin-floating-toolbar": "^1.10.0",
68
69
  "@atlaskit/editor-plugin-grid": "^1.2.0",
69
70
  "@testing-library/react": "^12.1.5",
70
71
  "@testing-library/user-event": "^14.4.3",