@atlaskit/editor-common 116.48.2 → 116.49.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/ai-messages/ai.js +5 -0
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/quick-insert/QuickInsertContext.js +8 -0
  5. package/dist/cjs/quick-insert/QuickInsertProvider.js +8 -0
  6. package/dist/cjs/quick-insert/keys.js +51 -0
  7. package/dist/cjs/quick-insert/rank.js +13 -0
  8. package/dist/cjs/quick-insert/useQuickInsertContext.js +15 -0
  9. package/dist/cjs/ui/DropList/index.js +1 -1
  10. package/dist/es2019/ai-messages/ai.js +5 -0
  11. package/dist/es2019/monitoring/error.js +1 -1
  12. package/dist/es2019/quick-insert/QuickInsertContext.js +2 -0
  13. package/dist/es2019/quick-insert/QuickInsertProvider.js +2 -0
  14. package/dist/es2019/quick-insert/keys.js +45 -0
  15. package/dist/es2019/quick-insert/rank.js +16 -0
  16. package/dist/es2019/quick-insert/useQuickInsertContext.js +9 -0
  17. package/dist/es2019/ui/DropList/index.js +1 -1
  18. package/dist/esm/ai-messages/ai.js +5 -0
  19. package/dist/esm/monitoring/error.js +1 -1
  20. package/dist/esm/quick-insert/QuickInsertContext.js +2 -0
  21. package/dist/esm/quick-insert/QuickInsertProvider.js +2 -0
  22. package/dist/esm/quick-insert/keys.js +45 -0
  23. package/dist/esm/quick-insert/rank.js +5 -0
  24. package/dist/esm/quick-insert/useQuickInsertContext.js +9 -0
  25. package/dist/esm/ui/DropList/index.js +1 -1
  26. package/dist/types/ai-messages/ai.d.ts +10 -5
  27. package/dist/types/quick-insert/QuickInsertContext.d.ts +19 -0
  28. package/dist/types/quick-insert/QuickInsertProvider.d.ts +3 -0
  29. package/dist/types/quick-insert/keys.d.ts +44 -0
  30. package/dist/types/quick-insert/rank.d.ts +14 -0
  31. package/dist/types/quick-insert/useQuickInsertContext.d.ts +2 -0
  32. package/package.json +3 -3
  33. package/quick-insert/context/package.json +10 -0
  34. package/quick-insert/keys/package.json +10 -0
  35. package/quick-insert/provider/package.json +10 -0
  36. package/quick-insert/rank/package.json +10 -0
  37. package/quick-insert/use-quick-insert-context/package.json +10 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.49.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5f47ed5d443c9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f47ed5d443c9) -
8
+ [ux] CCI-18364: Behind `platform_editor_ai_new_aifc_editor_experience` - the AI toolbar entry
9
+ point tooltip now reads "Edit with Rovo" instead of "Ask Rovo", matching the button's "Edit" label
10
+ in the new AIFC editor experience.
11
+ - [`4bc741a70d678`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4bc741a70d678) -
12
+ Add the first registry-backed Quick Insert slice with Table
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
18
+ ## 116.48.3
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 116.48.2
4
25
 
5
26
  ### Patch Changes
@@ -78,6 +78,11 @@ var aiMessages = exports.aiMessages = (0, _reactIntl.defineMessages)({
78
78
  defaultMessage: "Ask Rovo {key}+'",
79
79
  description: 'Tooltip text for an option to use Rovo AI with quick command'
80
80
  },
81
+ askRovoToolbarIconTooltipQuickCommandNewAifc: {
82
+ id: 'fabric.editor.ai.toolbar.askRovo.tooltip.quickCommand.newAifc',
83
+ defaultMessage: "Edit with Rovo {key}+'",
84
+ description: 'Tooltip text for the Rovo AI entry-point button in the new AIFC editor experience, where the button is labelled "Edit", with quick command'
85
+ },
81
86
  askRovoToolbarRemixAppTooltipQuickCommand: {
82
87
  id: 'fabric.editor.ai.toolbar.askRovo.remixApp.tooltip.quickCommand',
83
88
  defaultMessage: "Edit {key}+'",
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "116.48.1";
31
+ var packageVersion = "116.48.3";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // Ignored via go/ees007
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.QuickInsertContext = void 0;
7
+ var _react = require("react");
8
+ var QuickInsertContext = exports.QuickInsertContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.QuickInsertProvider = void 0;
7
+ var _QuickInsertContext = require("./QuickInsertContext");
8
+ var QuickInsertProvider = exports.QuickInsertProvider = _QuickInsertContext.QuickInsertContext.Provider;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TEXT_FORMATTING_SECTION = exports.TABLE_MENU_ITEM = exports.STRUCTURE_SECTION = exports.ROVO_SECTION = exports.RECOMMENDED_SECTION = exports.OTHER_SECTION = exports.MENU = exports.MEDIA_SECTION = exports.EMBED_SECTION = exports.DATA_AND_CHARTS_SECTION = exports.BLOCK_TEMPLATES_SECTION = void 0;
7
+ /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
8
+ var MENU = exports.MENU = {
9
+ key: 'quick-insert-menu',
10
+ type: 'menu'
11
+ };
12
+ var RECOMMENDED_SECTION = exports.RECOMMENDED_SECTION = {
13
+ key: 'quick-insert-recommended-section',
14
+ type: 'menu-section'
15
+ };
16
+ var STRUCTURE_SECTION = exports.STRUCTURE_SECTION = {
17
+ key: 'quick-insert-structure-section',
18
+ type: 'menu-section'
19
+ };
20
+ var MEDIA_SECTION = exports.MEDIA_SECTION = {
21
+ key: 'quick-insert-media-section',
22
+ type: 'menu-section'
23
+ };
24
+ var EMBED_SECTION = exports.EMBED_SECTION = {
25
+ key: 'quick-insert-embed-section',
26
+ type: 'menu-section'
27
+ };
28
+ var TEXT_FORMATTING_SECTION = exports.TEXT_FORMATTING_SECTION = {
29
+ key: 'quick-insert-text-formatting-section',
30
+ type: 'menu-section'
31
+ };
32
+ var ROVO_SECTION = exports.ROVO_SECTION = {
33
+ key: 'quick-insert-rovo-section',
34
+ type: 'menu-section'
35
+ };
36
+ var DATA_AND_CHARTS_SECTION = exports.DATA_AND_CHARTS_SECTION = {
37
+ key: 'quick-insert-data-and-charts-section',
38
+ type: 'menu-section'
39
+ };
40
+ var BLOCK_TEMPLATES_SECTION = exports.BLOCK_TEMPLATES_SECTION = {
41
+ key: 'quick-insert-block-templates-section',
42
+ type: 'menu-section'
43
+ };
44
+ var OTHER_SECTION = exports.OTHER_SECTION = {
45
+ key: 'quick-insert-other-section',
46
+ type: 'menu-section'
47
+ };
48
+ var TABLE_MENU_ITEM = exports.TABLE_MENU_ITEM = {
49
+ key: 'quick-insert-table-menu-item',
50
+ type: 'menu-item'
51
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.QUICK_INSERT_STRUCTURE_SECTION_RANK = exports.QUICK_INSERT_MENU_RANK = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _keys = require("./keys");
10
+ /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
11
+
12
+ var QUICK_INSERT_MENU_RANK = exports.QUICK_INSERT_MENU_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.RECOMMENDED_SECTION.key, 0), _keys.STRUCTURE_SECTION.key, 1), _keys.MEDIA_SECTION.key, 2), _keys.EMBED_SECTION.key, 3), _keys.TEXT_FORMATTING_SECTION.key, 4), _keys.ROVO_SECTION.key, 5), _keys.DATA_AND_CHARTS_SECTION.key, 6), _keys.BLOCK_TEMPLATES_SECTION.key, 7), _keys.OTHER_SECTION.key, 8);
13
+ var QUICK_INSERT_STRUCTURE_SECTION_RANK = exports.QUICK_INSERT_STRUCTURE_SECTION_RANK = (0, _defineProperty2.default)({}, _keys.TABLE_MENU_ITEM.key, 600);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useQuickInsertContext = void 0;
7
+ var _react = require("react");
8
+ var _QuickInsertContext = require("./QuickInsertContext");
9
+ var useQuickInsertContext = exports.useQuickInsertContext = function useQuickInsertContext() {
10
+ var value = (0, _react.useContext)(_QuickInsertContext.QuickInsertContext);
11
+ if (!value) {
12
+ throw new Error('useQuickInsertContext must be used within QuickInsertProvider');
13
+ }
14
+ return value;
15
+ };
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "116.48.1";
27
+ var packageVersion = "116.48.3";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -72,6 +72,11 @@ export const aiMessages = defineMessages({
72
72
  defaultMessage: "Ask Rovo {key}+'",
73
73
  description: 'Tooltip text for an option to use Rovo AI with quick command'
74
74
  },
75
+ askRovoToolbarIconTooltipQuickCommandNewAifc: {
76
+ id: 'fabric.editor.ai.toolbar.askRovo.tooltip.quickCommand.newAifc',
77
+ defaultMessage: "Edit with Rovo {key}+'",
78
+ description: 'Tooltip text for the Rovo AI entry-point button in the new AIFC editor experience, where the button is labelled "Edit", with quick command'
79
+ },
75
80
  askRovoToolbarRemixAppTooltipQuickCommand: {
76
81
  id: 'fabric.editor.ai.toolbar.askRovo.remixApp.tooltip.quickCommand',
77
82
  defaultMessage: "Edit {key}+'",
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "116.48.1";
17
+ const packageVersion = "116.48.3";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export const QuickInsertContext = /*#__PURE__*/createContext(null);
@@ -0,0 +1,2 @@
1
+ import { QuickInsertContext } from './QuickInsertContext';
2
+ export const QuickInsertProvider = QuickInsertContext.Provider;
@@ -0,0 +1,45 @@
1
+ /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
2
+ export const MENU = {
3
+ key: 'quick-insert-menu',
4
+ type: 'menu'
5
+ };
6
+ export const RECOMMENDED_SECTION = {
7
+ key: 'quick-insert-recommended-section',
8
+ type: 'menu-section'
9
+ };
10
+ export const STRUCTURE_SECTION = {
11
+ key: 'quick-insert-structure-section',
12
+ type: 'menu-section'
13
+ };
14
+ export const MEDIA_SECTION = {
15
+ key: 'quick-insert-media-section',
16
+ type: 'menu-section'
17
+ };
18
+ export const EMBED_SECTION = {
19
+ key: 'quick-insert-embed-section',
20
+ type: 'menu-section'
21
+ };
22
+ export const TEXT_FORMATTING_SECTION = {
23
+ key: 'quick-insert-text-formatting-section',
24
+ type: 'menu-section'
25
+ };
26
+ export const ROVO_SECTION = {
27
+ key: 'quick-insert-rovo-section',
28
+ type: 'menu-section'
29
+ };
30
+ export const DATA_AND_CHARTS_SECTION = {
31
+ key: 'quick-insert-data-and-charts-section',
32
+ type: 'menu-section'
33
+ };
34
+ export const BLOCK_TEMPLATES_SECTION = {
35
+ key: 'quick-insert-block-templates-section',
36
+ type: 'menu-section'
37
+ };
38
+ export const OTHER_SECTION = {
39
+ key: 'quick-insert-other-section',
40
+ type: 'menu-section'
41
+ };
42
+ export const TABLE_MENU_ITEM = {
43
+ key: 'quick-insert-table-menu-item',
44
+ type: 'menu-item'
45
+ };
@@ -0,0 +1,16 @@
1
+ /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
2
+ import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TABLE_MENU_ITEM, TEXT_FORMATTING_SECTION } from './keys';
3
+ export const QUICK_INSERT_MENU_RANK = {
4
+ [RECOMMENDED_SECTION.key]: 0,
5
+ [STRUCTURE_SECTION.key]: 1,
6
+ [MEDIA_SECTION.key]: 2,
7
+ [EMBED_SECTION.key]: 3,
8
+ [TEXT_FORMATTING_SECTION.key]: 4,
9
+ [ROVO_SECTION.key]: 5,
10
+ [DATA_AND_CHARTS_SECTION.key]: 6,
11
+ [BLOCK_TEMPLATES_SECTION.key]: 7,
12
+ [OTHER_SECTION.key]: 8
13
+ };
14
+ export const QUICK_INSERT_STRUCTURE_SECTION_RANK = {
15
+ [TABLE_MENU_ITEM.key]: 600
16
+ };
@@ -0,0 +1,9 @@
1
+ import { useContext } from 'react';
2
+ import { QuickInsertContext } from './QuickInsertContext';
3
+ export const useQuickInsertContext = () => {
4
+ const value = useContext(QuickInsertContext);
5
+ if (!value) {
6
+ throw new Error('useQuickInsertContext must be used within QuickInsertProvider');
7
+ }
8
+ return value;
9
+ };
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "116.48.1";
17
+ const packageVersion = "116.48.3";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -72,6 +72,11 @@ export var aiMessages = defineMessages({
72
72
  defaultMessage: "Ask Rovo {key}+'",
73
73
  description: 'Tooltip text for an option to use Rovo AI with quick command'
74
74
  },
75
+ askRovoToolbarIconTooltipQuickCommandNewAifc: {
76
+ id: 'fabric.editor.ai.toolbar.askRovo.tooltip.quickCommand.newAifc',
77
+ defaultMessage: "Edit with Rovo {key}+'",
78
+ description: 'Tooltip text for the Rovo AI entry-point button in the new AIFC editor experience, where the button is labelled "Edit", with quick command'
79
+ },
75
80
  askRovoToolbarRemixAppTooltipQuickCommand: {
76
81
  id: 'fabric.editor.ai.toolbar.askRovo.remixApp.tooltip.quickCommand',
77
82
  defaultMessage: "Edit {key}+'",
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "116.48.1";
23
+ var packageVersion = "116.48.3";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // Ignored via go/ees007
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export var QuickInsertContext = /*#__PURE__*/createContext(null);
@@ -0,0 +1,2 @@
1
+ import { QuickInsertContext } from './QuickInsertContext';
2
+ export var QuickInsertProvider = QuickInsertContext.Provider;
@@ -0,0 +1,45 @@
1
+ /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
2
+ export var MENU = {
3
+ key: 'quick-insert-menu',
4
+ type: 'menu'
5
+ };
6
+ export var RECOMMENDED_SECTION = {
7
+ key: 'quick-insert-recommended-section',
8
+ type: 'menu-section'
9
+ };
10
+ export var STRUCTURE_SECTION = {
11
+ key: 'quick-insert-structure-section',
12
+ type: 'menu-section'
13
+ };
14
+ export var MEDIA_SECTION = {
15
+ key: 'quick-insert-media-section',
16
+ type: 'menu-section'
17
+ };
18
+ export var EMBED_SECTION = {
19
+ key: 'quick-insert-embed-section',
20
+ type: 'menu-section'
21
+ };
22
+ export var TEXT_FORMATTING_SECTION = {
23
+ key: 'quick-insert-text-formatting-section',
24
+ type: 'menu-section'
25
+ };
26
+ export var ROVO_SECTION = {
27
+ key: 'quick-insert-rovo-section',
28
+ type: 'menu-section'
29
+ };
30
+ export var DATA_AND_CHARTS_SECTION = {
31
+ key: 'quick-insert-data-and-charts-section',
32
+ type: 'menu-section'
33
+ };
34
+ export var BLOCK_TEMPLATES_SECTION = {
35
+ key: 'quick-insert-block-templates-section',
36
+ type: 'menu-section'
37
+ };
38
+ export var OTHER_SECTION = {
39
+ key: 'quick-insert-other-section',
40
+ type: 'menu-section'
41
+ };
42
+ export var TABLE_MENU_ITEM = {
43
+ key: 'quick-insert-table-menu-item',
44
+ type: 'menu-item'
45
+ };
@@ -0,0 +1,5 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
3
+ import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TABLE_MENU_ITEM, TEXT_FORMATTING_SECTION } from './keys';
4
+ export var QUICK_INSERT_MENU_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, RECOMMENDED_SECTION.key, 0), STRUCTURE_SECTION.key, 1), MEDIA_SECTION.key, 2), EMBED_SECTION.key, 3), TEXT_FORMATTING_SECTION.key, 4), ROVO_SECTION.key, 5), DATA_AND_CHARTS_SECTION.key, 6), BLOCK_TEMPLATES_SECTION.key, 7), OTHER_SECTION.key, 8);
5
+ export var QUICK_INSERT_STRUCTURE_SECTION_RANK = _defineProperty({}, TABLE_MENU_ITEM.key, 600);
@@ -0,0 +1,9 @@
1
+ import { useContext } from 'react';
2
+ import { QuickInsertContext } from './QuickInsertContext';
3
+ export var useQuickInsertContext = function useQuickInsertContext() {
4
+ var value = useContext(QuickInsertContext);
5
+ if (!value) {
6
+ throw new Error('useQuickInsertContext must be used within QuickInsertProvider');
7
+ }
8
+ return value;
9
+ };
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "116.48.1";
24
+ var packageVersion = "116.48.3";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -69,6 +69,11 @@ export declare const aiMessages: {
69
69
  description: string;
70
70
  id: string;
71
71
  };
72
+ askRovoToolbarIconTooltipQuickCommandNewAifc: {
73
+ defaultMessage: string;
74
+ description: string;
75
+ id: string;
76
+ };
72
77
  askRovoToolbarImageTitle: {
73
78
  defaultMessage: string;
74
79
  description: string;
@@ -209,6 +214,11 @@ export declare const aiMessages: {
209
214
  description: string;
210
215
  id: string;
211
216
  };
217
+ rovoToolbarDropdownChevronLabel: {
218
+ defaultMessage: string;
219
+ description: string;
220
+ id: string;
221
+ };
212
222
  simplifiedAIToolbarIconTitle: {
213
223
  defaultMessage: string;
214
224
  description: string;
@@ -274,11 +284,6 @@ export declare const aiMessages: {
274
284
  description: string;
275
285
  id: string;
276
286
  };
277
- rovoToolbarDropdownChevronLabel: {
278
- defaultMessage: string;
279
- description: string;
280
- id: string;
281
- };
282
287
  summarizeToolbarDropdownIconTitle: {
283
288
  defaultMessage: string;
284
289
  description: string;
@@ -0,0 +1,19 @@
1
+ import type { Context } from 'react';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
+ import type { INPUT_METHOD } from '../analytics';
5
+ import type { TypeAheadInsert } from '../types';
6
+ export type QuickInsertSelectionHandler = (context: {
7
+ insert: TypeAheadInsert;
8
+ source: INPUT_METHOD.ELEMENT_BROWSER | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
9
+ }) => Transaction | false | void;
10
+ export type QuickInsertContextValue = {
11
+ editorView: EditorView;
12
+ item?: {
13
+ id: string;
14
+ isSelected: boolean;
15
+ onMouseMove: () => void;
16
+ };
17
+ select: (selectionHandler: QuickInsertSelectionHandler) => void;
18
+ };
19
+ export declare const QuickInsertContext: Context<QuickInsertContextValue | null>;
@@ -0,0 +1,3 @@
1
+ import type { Provider } from 'react';
2
+ import type { QuickInsertContextValue } from './QuickInsertContext';
3
+ export declare const QuickInsertProvider: Provider<QuickInsertContextValue | null>;
@@ -0,0 +1,44 @@
1
+ export declare const MENU: {
2
+ readonly key: 'quick-insert-menu';
3
+ readonly type: 'menu';
4
+ };
5
+ export declare const RECOMMENDED_SECTION: {
6
+ readonly key: 'quick-insert-recommended-section';
7
+ readonly type: 'menu-section';
8
+ };
9
+ export declare const STRUCTURE_SECTION: {
10
+ readonly key: 'quick-insert-structure-section';
11
+ readonly type: 'menu-section';
12
+ };
13
+ export declare const MEDIA_SECTION: {
14
+ readonly key: 'quick-insert-media-section';
15
+ readonly type: 'menu-section';
16
+ };
17
+ export declare const EMBED_SECTION: {
18
+ readonly key: 'quick-insert-embed-section';
19
+ readonly type: 'menu-section';
20
+ };
21
+ export declare const TEXT_FORMATTING_SECTION: {
22
+ readonly key: 'quick-insert-text-formatting-section';
23
+ readonly type: 'menu-section';
24
+ };
25
+ export declare const ROVO_SECTION: {
26
+ readonly key: 'quick-insert-rovo-section';
27
+ readonly type: 'menu-section';
28
+ };
29
+ export declare const DATA_AND_CHARTS_SECTION: {
30
+ readonly key: 'quick-insert-data-and-charts-section';
31
+ readonly type: 'menu-section';
32
+ };
33
+ export declare const BLOCK_TEMPLATES_SECTION: {
34
+ readonly key: 'quick-insert-block-templates-section';
35
+ readonly type: 'menu-section';
36
+ };
37
+ export declare const OTHER_SECTION: {
38
+ readonly key: 'quick-insert-other-section';
39
+ readonly type: 'menu-section';
40
+ };
41
+ export declare const TABLE_MENU_ITEM: {
42
+ readonly key: 'quick-insert-table-menu-item';
43
+ readonly type: 'menu-item';
44
+ };
@@ -0,0 +1,14 @@
1
+ export declare const QUICK_INSERT_MENU_RANK: {
2
+ readonly 'quick-insert-block-templates-section': 7;
3
+ readonly 'quick-insert-data-and-charts-section': 6;
4
+ readonly 'quick-insert-embed-section': 3;
5
+ readonly 'quick-insert-media-section': 2;
6
+ readonly 'quick-insert-other-section': 8;
7
+ readonly 'quick-insert-recommended-section': 0;
8
+ readonly 'quick-insert-rovo-section': 5;
9
+ readonly 'quick-insert-structure-section': 1;
10
+ readonly 'quick-insert-text-formatting-section': 4;
11
+ };
12
+ export declare const QUICK_INSERT_STRUCTURE_SECTION_RANK: {
13
+ readonly 'quick-insert-table-menu-item': 600;
14
+ };
@@ -0,0 +1,2 @@
1
+ import type { QuickInsertContextValue } from './QuickInsertContext';
2
+ export declare const useQuickInsertContext: () => QuickInsertContextValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.48.2",
3
+ "version": "116.49.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/task-decision": "^21.8.0",
82
82
  "@atlaskit/teams-app-config": "^2.1.0",
83
83
  "@atlaskit/textfield": "^9.1.0",
84
- "@atlaskit/tmp-editor-statsig": "^135.11.0",
84
+ "@atlaskit/tmp-editor-statsig": "^136.1.0",
85
85
  "@atlaskit/tokens": "^16.3.0",
86
86
  "@atlaskit/tooltip": "^24.0.0",
87
87
  "@atlaskit/width-detector": "^6.2.0",
@@ -123,7 +123,7 @@
123
123
  "devDependencies": {
124
124
  "@atlaskit/media-core": "^38.0.0",
125
125
  "@atlaskit/platform-feature-experiments": "^0.3.0",
126
- "@atlassian/a11y-jest-testing": "^0.13.0",
126
+ "@atlassian/a11y-jest-testing": "^0.14.0",
127
127
  "@atlassian/experiment-test-utils": "^0.2.0",
128
128
  "@atlassian/feature-flags-test-utils": "^1.2.0",
129
129
  "@atlassian/testing-library": "^0.11.0",
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/context",
3
+ "main": "../../dist/cjs/quick-insert/QuickInsertContext.js",
4
+ "module": "../../dist/esm/quick-insert/QuickInsertContext.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/QuickInsertContext.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/QuickInsertContext.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/keys",
3
+ "main": "../../dist/cjs/quick-insert/keys.js",
4
+ "module": "../../dist/esm/quick-insert/keys.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/keys.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/keys.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/provider",
3
+ "main": "../../dist/cjs/quick-insert/QuickInsertProvider.js",
4
+ "module": "../../dist/esm/quick-insert/QuickInsertProvider.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/QuickInsertProvider.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/QuickInsertProvider.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/rank",
3
+ "main": "../../dist/cjs/quick-insert/rank.js",
4
+ "module": "../../dist/esm/quick-insert/rank.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/rank.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/rank.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/use-quick-insert-context",
3
+ "main": "../../dist/cjs/quick-insert/useQuickInsertContext.js",
4
+ "module": "../../dist/esm/quick-insert/useQuickInsertContext.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/useQuickInsertContext.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/useQuickInsertContext.d.ts"
10
+ }