@atlaskit/native-embeds-common 0.2.3 → 1.0.1

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,38 @@
1
1
  # @atlaskit/native-embeds-common
2
2
 
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [`4b920b03625a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b920b03625a1) -
14
+ Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
15
+
16
+ What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
17
+ removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
18
+ to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
19
+
20
+ How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
21
+ `^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
22
+ can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
28
+ ## 0.2.4
29
+
30
+ ### Patch Changes
31
+
32
+ - [`89e32bffb1383`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/89e32bffb1383) -
33
+ [ux] Add support to consume the editor AI plugin summarise functionality in other editor plugins.
34
+ - Updated dependencies
35
+
3
36
  ## 0.2.3
4
37
 
5
38
  ### Patch Changes
@@ -10,13 +10,13 @@ exports.NativeEmbedFallbackUI = void 0;
10
10
  require("./index.compiled.css");
11
11
  var _runtime = require("@compiled/react/runtime");
12
12
  var _react = _interopRequireWildcard(require("react"));
13
- var _reactIntlNext = require("react-intl-next");
13
+ var _reactIntl = require("react-intl");
14
14
  var _new = _interopRequireDefault(require("@atlaskit/button/new"));
15
15
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
16
16
  var _refresh = _interopRequireDefault(require("@atlaskit/icon/core/refresh"));
17
17
  var _compiled = require("@atlaskit/primitives/compiled");
18
18
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
- var messages = (0, _reactIntlNext.defineMessages)({
19
+ var messages = (0, _reactIntl.defineMessages)({
20
20
  title: {
21
21
  id: 'native-embeds-fallback-editor-extension.title',
22
22
  defaultMessage: 'Embed failed to load.',
@@ -40,7 +40,7 @@ var NativeEmbedFallbackUI = exports.NativeEmbedFallbackUI = function NativeEmbed
40
40
  var api = _ref.api,
41
41
  localId = _ref.localId,
42
42
  url = _ref.url;
43
- var _useIntl = (0, _reactIntlNext.useIntl)(),
43
+ var _useIntl = (0, _reactIntl.useIntl)(),
44
44
  formatMessage = _useIntl.formatMessage;
45
45
  var onConvert = (0, _react.useCallback)(function () {
46
46
  var _api$core2, _api$localId2;
@@ -19,12 +19,13 @@ var NATIVE_EMBED_PARAMETER_DEFAULTS = exports.NATIVE_EMBED_PARAMETER_DEFAULTS =
19
19
  /**
20
20
  * Built-in keys that can be referenced in the `items` and `moreItems` arrays.
21
21
  *
22
- * Toolbar keys: ASK_ROVO, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
22
+ * Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
23
23
  * More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
24
24
  * Shared: SEPARATOR (usable in both)
25
25
  */
26
26
  var BUILTIN_TOOLBAR_KEYS = exports.BUILTIN_TOOLBAR_KEYS = {
27
27
  ASK_ROVO: 'askRovo',
28
+ SUMMARISE: 'summarise',
28
29
  REFRESH: 'refresh',
29
30
  EDIT: 'edit',
30
31
  EMBED: 'embed',
@@ -46,4 +47,4 @@ var BUILTIN_TOOLBAR_KEYS = exports.BUILTIN_TOOLBAR_KEYS = {
46
47
  DELETE: 'delete',
47
48
  SEPARATOR: 'separator'
48
49
  };
49
- var EDITOR_TOOLBAR_HANDLER_KEYS = exports.EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
50
+ var EDITOR_TOOLBAR_HANDLER_KEYS = exports.EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
@@ -2,7 +2,7 @@
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
- import { defineMessages, useIntl } from 'react-intl-next';
5
+ import { defineMessages, useIntl } from 'react-intl';
6
6
  import Button from '@atlaskit/button/new';
7
7
  import Heading from '@atlaskit/heading';
8
8
  import RefreshIcon from '@atlaskit/icon/core/refresh';
@@ -13,12 +13,13 @@ export const NATIVE_EMBED_PARAMETER_DEFAULTS = {
13
13
  /**
14
14
  * Built-in keys that can be referenced in the `items` and `moreItems` arrays.
15
15
  *
16
- * Toolbar keys: ASK_ROVO, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
16
+ * Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
17
17
  * More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
18
18
  * Shared: SEPARATOR (usable in both)
19
19
  */
20
20
  export const BUILTIN_TOOLBAR_KEYS = {
21
21
  ASK_ROVO: 'askRovo',
22
+ SUMMARISE: 'summarise',
22
23
  REFRESH: 'refresh',
23
24
  EDIT: 'edit',
24
25
  EMBED: 'embed',
@@ -40,4 +41,4 @@ export const BUILTIN_TOOLBAR_KEYS = {
40
41
  DELETE: 'delete',
41
42
  SEPARATOR: 'separator'
42
43
  };
43
- export const EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
44
+ export const EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
@@ -2,7 +2,7 @@
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
- import { defineMessages, useIntl } from 'react-intl-next';
5
+ import { defineMessages, useIntl } from 'react-intl';
6
6
  import Button from '@atlaskit/button/new';
7
7
  import Heading from '@atlaskit/heading';
8
8
  import RefreshIcon from '@atlaskit/icon/core/refresh';
@@ -13,12 +13,13 @@ export var NATIVE_EMBED_PARAMETER_DEFAULTS = {
13
13
  /**
14
14
  * Built-in keys that can be referenced in the `items` and `moreItems` arrays.
15
15
  *
16
- * Toolbar keys: ASK_ROVO, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
16
+ * Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
17
17
  * More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
18
18
  * Shared: SEPARATOR (usable in both)
19
19
  */
20
20
  export var BUILTIN_TOOLBAR_KEYS = {
21
21
  ASK_ROVO: 'askRovo',
22
+ SUMMARISE: 'summarise',
22
23
  REFRESH: 'refresh',
23
24
  EDIT: 'edit',
24
25
  EMBED: 'embed',
@@ -40,4 +41,4 @@ export var BUILTIN_TOOLBAR_KEYS = {
40
41
  DELETE: 'delete',
41
42
  SEPARATOR: 'separator'
42
43
  };
43
- export var EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
44
+ export var EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
@@ -5,12 +5,13 @@ export declare const NATIVE_EMBED_PARAMETER_DEFAULTS: NativeEmbedParameterValues
5
5
  /**
6
6
  * Built-in keys that can be referenced in the `items` and `moreItems` arrays.
7
7
  *
8
- * Toolbar keys: ASK_ROVO, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
8
+ * Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
9
9
  * More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
10
10
  * Shared: SEPARATOR (usable in both)
11
11
  */
12
12
  export declare const BUILTIN_TOOLBAR_KEYS: {
13
13
  readonly ASK_ROVO: "askRovo";
14
+ readonly SUMMARISE: "summarise";
14
15
  readonly REFRESH: "refresh";
15
16
  readonly EDIT: "edit";
16
17
  readonly EMBED: "embed";
@@ -32,4 +33,4 @@ export declare const BUILTIN_TOOLBAR_KEYS: {
32
33
  readonly DELETE: "delete";
33
34
  readonly SEPARATOR: "separator";
34
35
  };
35
- export declare const EDITOR_TOOLBAR_HANDLER_KEYS: readonly ["onAlignmentClick", "onAppearanceClick", "onAskRovoClick", "onChangeBorderClick", "onCopyClick", "onCopyLinkClick", "onDeleteClick", "onEditClick", "onEditUrlClick", "onOpenInNewWindowClick", "onRefreshClick", "onSetEmbedTypeClick", "onShowTitleClick"];
36
+ export declare const EDITOR_TOOLBAR_HANDLER_KEYS: readonly ["onAlignmentClick", "onAppearanceClick", "onAskRovoClick", "onSummariseClick", "onChangeBorderClick", "onCopyClick", "onCopyLinkClick", "onDeleteClick", "onEditClick", "onEditUrlClick", "onOpenInNewWindowClick", "onRefreshClick", "onSetEmbedTypeClick", "onShowTitleClick"];
@@ -97,6 +97,7 @@ export type EditorToolbarHandlers = Partial<{
97
97
  onRefreshClick: EditorToolbarHandler;
98
98
  onSetEmbedTypeClick: EditorToolbarHandler;
99
99
  onShowTitleClick: EditorToolbarHandler;
100
+ onSummariseClick: (parameters: NativeEmbedParameterValues, context?: EditorToolbarHandlerContext) => void;
100
101
  }>;
101
102
  /** Base handler signature for contexts that don't have action-specific context. */
102
103
  export type EditorToolbarHandler = (parameters: NativeEmbedParameterValues, context?: EditorToolbarHandlerContext) => void;
@@ -11,12 +11,13 @@ export declare const NATIVE_EMBED_PARAMETER_DEFAULTS: NativeEmbedParameterValues
11
11
  /**
12
12
  * Built-in keys that can be referenced in the `items` and `moreItems` arrays.
13
13
  *
14
- * Toolbar keys: ASK_ROVO, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
14
+ * Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
15
15
  * More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
16
16
  * Shared: SEPARATOR (usable in both)
17
17
  */
18
18
  export declare const BUILTIN_TOOLBAR_KEYS: {
19
19
  readonly ASK_ROVO: "askRovo";
20
+ readonly SUMMARISE: "summarise";
20
21
  readonly REFRESH: "refresh";
21
22
  readonly EDIT: "edit";
22
23
  readonly EMBED: "embed";
@@ -42,6 +43,7 @@ export declare const EDITOR_TOOLBAR_HANDLER_KEYS: readonly [
42
43
  "onAlignmentClick",
43
44
  "onAppearanceClick",
44
45
  "onAskRovoClick",
46
+ "onSummariseClick",
45
47
  "onChangeBorderClick",
46
48
  "onCopyClick",
47
49
  "onCopyLinkClick",
@@ -98,6 +98,7 @@ export type EditorToolbarHandlers = Partial<{
98
98
  onRefreshClick: EditorToolbarHandler;
99
99
  onSetEmbedTypeClick: EditorToolbarHandler;
100
100
  onShowTitleClick: EditorToolbarHandler;
101
+ onSummariseClick: (parameters: NativeEmbedParameterValues, context?: EditorToolbarHandlerContext) => void;
101
102
  }>;
102
103
  /** Base handler signature for contexts that don't have action-specific context. */
103
104
  export type EditorToolbarHandler = (parameters: NativeEmbedParameterValues, context?: EditorToolbarHandlerContext) => void;
package/package.json CHANGED
@@ -25,26 +25,27 @@
25
25
  "atlaskit:src": "src/index.ts",
26
26
  "dependencies": {
27
27
  "@atlaskit/button": "^23.11.0",
28
- "@atlaskit/editor-common": "^112.20.0",
29
- "@atlaskit/editor-plugin-local-id": "^6.1.0",
28
+ "@atlaskit/editor-common": "^113.0.0",
29
+ "@atlaskit/editor-plugin-local-id": "^7.0.0",
30
30
  "@atlaskit/editor-prosemirror": "^7.3.0",
31
31
  "@atlaskit/heading": "^5.4.0",
32
- "@atlaskit/icon": "^34.0.0",
32
+ "@atlaskit/icon": "^34.2.0",
33
33
  "@atlaskit/primitives": "^19.0.0",
34
34
  "@atlaskit/tokens": "^13.0.0",
35
35
  "@babel/runtime": "^7.0.0",
36
- "@compiled/react": "^0.20.0",
37
- "react-intl-next": "npm:react-intl@^5.18.1"
36
+ "@compiled/react": "^0.20.0"
38
37
  },
39
38
  "peerDependencies": {
40
- "react": "^18.2.0"
39
+ "react": "^18.2.0",
40
+ "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@af/integration-testing": "workspace:^",
44
44
  "@af/visual-regression": "workspace:^",
45
45
  "@atlaskit/ssr": "workspace:^",
46
46
  "@testing-library/react": "^16.3.0",
47
- "react-dom": "^18.2.0"
47
+ "react-dom": "^18.2.0",
48
+ "react-intl": "^6.6.2"
48
49
  },
49
50
  "techstack": {
50
51
  "@atlassian/frontend": {
@@ -85,7 +86,7 @@
85
86
  }
86
87
  },
87
88
  "name": "@atlaskit/native-embeds-common",
88
- "version": "0.2.3",
89
+ "version": "1.0.1",
89
90
  "description": "A shared package for native embeds to be used across experiences and plugin",
90
91
  "author": "Atlassian Pty Ltd",
91
92
  "license": "Apache-2.0",