@atlaskit/editor-plugin-type-ahead 27.0.5 → 27.0.6

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,31 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 27.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1c4db454a74a2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c4db454a74a2) -
8
+ Registered menu hosts can override section and item ranks through getItemRank in the shared
9
+ ordering used by Quick Insert, type-ahead, and insert menus. Rovo editor presets group these
10
+ settings under quickInsertOptions. Typeahead handlers expose getRegisteredItemRank with a
11
+ RegisteredItemRankResolver that receives the registered component and its ranked parent. Skill
12
+ manifests and adapters accept visibility predicates that follow current chat state without
13
+ rebuilding registrations.
14
+
15
+ Under platform_editor_slash_command, main and inline Rovo chat show Rovo commands first and use
16
+ specialist placeholders. The chat skills layer receives selectedAgentId and respects the existing
17
+ enableSkillsInSpecialistPromptInput setting. Treatment keeps registrations and evaluates
18
+ visibility per item. Control keeps the legacy full-or-empty manifest and the same host opt-in.
19
+ Search mode and an existing prompt skill still prevent insertion.
20
+
21
+ Affected Jira, JSM, and Confluence skills require the signed-in user's product access at the site,
22
+ in addition to backend filtering of declared site entitlements. Skill Builder needs Studio and the
23
+ signed-in user's Rovo AI entitlement for that site. Eligibility requests follow site changes; user
24
+ identity remains stable during the signed-in session. Visibility reads committed React state and
25
+ supports server rendering.
26
+
27
+ - Updated dependencies
28
+
3
29
  ## 27.0.5
4
30
 
5
31
  ### Patch Changes
@@ -97,14 +97,15 @@ var RegisteredTypeAheadMenu = exports.RegisteredTypeAheadMenu = function Registe
97
97
  });
98
98
  }, [components]);
99
99
  var menuModel = (0, _react.useMemo)(function () {
100
- return query === '' ? (0, _registeredMenuModel.buildQuickInsertMenuModel)(components, surface.root, hasSectionOverflowItems && isSlashCommandEnabled ? _registeredMenuModel.selectQuickInsertCategoryItems : undefined, surfaceContext) : (0, _registeredMenuModel.getMatchingQuickInsertComponents)({
100
+ return query === '' ? (0, _registeredMenuModel.buildQuickInsertMenuModel)(components, surface.root, hasSectionOverflowItems && isSlashCommandEnabled ? _registeredMenuModel.selectQuickInsertCategoryItems : undefined, surfaceContext, triggerHandler.getRegisteredItemRank) : (0, _registeredMenuModel.getMatchingQuickInsertComponents)({
101
101
  components: components,
102
102
  rootComponent: surface.root,
103
103
  query: query,
104
104
  formatMessage: formatMessage,
105
- surfaceContext: surfaceContext
105
+ surfaceContext: surfaceContext,
106
+ getItemRank: triggerHandler.getRegisteredItemRank
106
107
  });
107
- }, [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root]);
108
+ }, [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root, triggerHandler.getRegisteredItemRank]);
108
109
  var rows = (0, _react.useMemo)(function () {
109
110
  return (0, _registeredMenuModel.getQuickInsertMenuRows)(menuModel);
110
111
  }, [menuModel]);
@@ -73,13 +73,14 @@ export const RegisteredTypeAheadMenu = ({
73
73
  const hasSectionOverflowItems = useMemo(() => components.some(({
74
74
  key
75
75
  }) => isSectionOverflowItemKey(key)), [components]);
76
- const menuModel = useMemo(() => query === '' ? buildQuickInsertMenuModel(components, surface.root, hasSectionOverflowItems && isSlashCommandEnabled ? selectQuickInsertCategoryItems : undefined, surfaceContext) : getMatchingQuickInsertComponents({
76
+ const menuModel = useMemo(() => query === '' ? buildQuickInsertMenuModel(components, surface.root, hasSectionOverflowItems && isSlashCommandEnabled ? selectQuickInsertCategoryItems : undefined, surfaceContext, triggerHandler.getRegisteredItemRank) : getMatchingQuickInsertComponents({
77
77
  components,
78
78
  rootComponent: surface.root,
79
79
  query,
80
80
  formatMessage,
81
- surfaceContext
82
- }), [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root]);
81
+ surfaceContext,
82
+ getItemRank: triggerHandler.getRegisteredItemRank
83
+ }), [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root, triggerHandler.getRegisteredItemRank]);
83
84
  const rows = useMemo(() => getQuickInsertMenuRows(menuModel), [menuModel]);
84
85
  const [previewActivation, setPreviewActivation] = useState();
85
86
  const activePreviewItemKey = (previewActivation === null || previewActivation === void 0 ? void 0 : previewActivation.menuModel) === menuModel ? previewActivation.itemKey : undefined;
@@ -88,14 +88,15 @@ export var RegisteredTypeAheadMenu = function RegisteredTypeAheadMenu(_ref) {
88
88
  });
89
89
  }, [components]);
90
90
  var menuModel = useMemo(function () {
91
- return query === '' ? buildQuickInsertMenuModel(components, surface.root, hasSectionOverflowItems && isSlashCommandEnabled ? selectQuickInsertCategoryItems : undefined, surfaceContext) : getMatchingQuickInsertComponents({
91
+ return query === '' ? buildQuickInsertMenuModel(components, surface.root, hasSectionOverflowItems && isSlashCommandEnabled ? selectQuickInsertCategoryItems : undefined, surfaceContext, triggerHandler.getRegisteredItemRank) : getMatchingQuickInsertComponents({
92
92
  components: components,
93
93
  rootComponent: surface.root,
94
94
  query: query,
95
95
  formatMessage: formatMessage,
96
- surfaceContext: surfaceContext
96
+ surfaceContext: surfaceContext,
97
+ getItemRank: triggerHandler.getRegisteredItemRank
97
98
  });
98
- }, [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root]);
99
+ }, [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root, triggerHandler.getRegisteredItemRank]);
99
100
  var rows = useMemo(function () {
100
101
  return getQuickInsertMenuRows(menuModel);
101
102
  }, [menuModel]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "27.0.5",
3
+ "version": "27.0.6",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -54,7 +54,7 @@
54
54
  "w3c-keyname": "^2.1.8"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atlaskit/editor-common": "^130.3.0",
57
+ "@atlaskit/editor-common": "^130.4.0",
58
58
  "react": "^18.2.0 || ^19.2.0",
59
59
  "react-dom": "^18.2.0 || ^19.2.0",
60
60
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"