@epam/ai-dial-catalog 1.1.0-dev.30 → 1.1.0-dev.307

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 (203) hide show
  1. package/components/AppIdentity/AppIdentity.d.ts +9 -14
  2. package/components/AppIdentity/AppIdentity.d.ts.map +1 -1
  3. package/components/CardGrid/Card.d.ts.map +1 -1
  4. package/components/CardGrid/CardGrid.d.ts.map +1 -1
  5. package/components/CardGrid/CardRowRenderer.d.ts.map +1 -1
  6. package/components/CardTag/CardTag.d.ts +24 -0
  7. package/components/CardTag/CardTag.d.ts.map +1 -0
  8. package/components/Catalog/Catalog.d.ts +1 -5
  9. package/components/Catalog/Catalog.d.ts.map +1 -1
  10. package/components/Catalog/CreateButton.d.ts +2 -2
  11. package/components/Catalog/CreateButton.d.ts.map +1 -1
  12. package/components/CredentialsBadge/CredentialsBadge.d.ts +12 -5
  13. package/components/CredentialsBadge/CredentialsBadge.d.ts.map +1 -1
  14. package/components/Details/ApiDetails.d.ts +6 -2
  15. package/components/Details/ApiDetails.d.ts.map +1 -1
  16. package/components/Details/ConfirmationView/ConfirmationFooter.d.ts +29 -0
  17. package/components/Details/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
  18. package/components/Details/ConfirmationView/ConfirmationView.d.ts +28 -0
  19. package/components/Details/ConfirmationView/ConfirmationView.d.ts.map +1 -0
  20. package/components/Details/Credentials/CredentialsBanner/CredentialsBanner.d.ts +16 -0
  21. package/components/Details/Credentials/CredentialsBanner/CredentialsBanner.d.ts.map +1 -0
  22. package/components/Details/Credentials/CredentialsIdentityIcon/CredentialsIdentityIcon.d.ts +29 -0
  23. package/components/Details/Credentials/CredentialsIdentityIcon/CredentialsIdentityIcon.d.ts.map +1 -0
  24. package/components/Details/Credentials/CredentialsInfoCard/CredentialsInfoCard.d.ts +20 -0
  25. package/components/Details/Credentials/CredentialsInfoCard/CredentialsInfoCard.d.ts.map +1 -0
  26. package/components/Details/Credentials/CredentialsManagementPanel/CredentialsManagementPanel.d.ts +31 -0
  27. package/components/Details/Credentials/CredentialsManagementPanel/CredentialsManagementPanel.d.ts.map +1 -0
  28. package/components/Details/DetailsPanel.d.ts.map +1 -1
  29. package/components/Details/Header/CredentialsApiKeyOverlay/CredentialsApiKeyOverlay.d.ts +34 -0
  30. package/components/Details/Header/CredentialsApiKeyOverlay/CredentialsApiKeyOverlay.d.ts.map +1 -0
  31. package/components/Details/Header/Header.d.ts +92 -19
  32. package/components/Details/Header/Header.d.ts.map +1 -1
  33. package/components/Details/Header/ShareButton/ShareButton.d.ts +6 -0
  34. package/components/Details/Header/ShareButton/ShareButton.d.ts.map +1 -1
  35. package/components/Details/TabsContent/About.d.ts +3 -2
  36. package/components/Details/TabsContent/About.d.ts.map +1 -1
  37. package/components/Details/TabsContent/Content.d.ts +53 -0
  38. package/components/Details/TabsContent/Content.d.ts.map +1 -0
  39. package/components/Details/TabsContent/ContentFileTree/ContentFileTree.d.ts +28 -0
  40. package/components/Details/TabsContent/ContentFileTree/ContentFileTree.d.ts.map +1 -0
  41. package/components/Details/TabsContent/DataGrid/DataGrid.d.ts +1 -1
  42. package/components/Details/TabsContent/DataGrid/DataGrid.d.ts.map +1 -1
  43. package/components/Details/TabsContent/Limits/LimitGroupSection.d.ts +11 -0
  44. package/components/Details/TabsContent/Limits/LimitGroupSection.d.ts.map +1 -0
  45. package/components/Details/TabsContent/Limits/LimitRow.d.ts +10 -0
  46. package/components/Details/TabsContent/Limits/LimitRow.d.ts.map +1 -0
  47. package/components/Details/TabsContent/Limits/Limits.d.ts +5 -0
  48. package/components/Details/TabsContent/Limits/Limits.d.ts.map +1 -0
  49. package/components/Favorites/FavoriteCard.d.ts +9 -4
  50. package/components/Favorites/FavoriteCard.d.ts.map +1 -1
  51. package/components/Favorites/Favorites.d.ts.map +1 -1
  52. package/components/Filter/Filter.d.ts +42 -6
  53. package/components/Filter/Filter.d.ts.map +1 -1
  54. package/components/InfoCard/InfoCard.d.ts +15 -0
  55. package/components/InfoCard/InfoCard.d.ts.map +1 -0
  56. package/components/ListView/ListView.d.ts +1 -5
  57. package/components/ListView/ListView.d.ts.map +1 -1
  58. package/components/ListView/Renders/EntityTypeCellRenderer.d.ts +1 -0
  59. package/components/ListView/Renders/EntityTypeCellRenderer.d.ts.map +1 -1
  60. package/components/ListView/Renders/FolderCellRenderer.d.ts +1 -0
  61. package/components/ListView/Renders/FolderCellRenderer.d.ts.map +1 -1
  62. package/components/ListView/Renders/NameCellRenderer.d.ts +1 -0
  63. package/components/ListView/Renders/NameCellRenderer.d.ts.map +1 -1
  64. package/components/ListView/Renders/StarCellRenderer.d.ts +1 -0
  65. package/components/ListView/Renders/StarCellRenderer.d.ts.map +1 -1
  66. package/components/ListView/Renders/TagsCellRenderer.d.ts +1 -0
  67. package/components/ListView/Renders/TagsCellRenderer.d.ts.map +1 -1
  68. package/components/ListView/columns.d.ts +2 -1
  69. package/components/ListView/columns.d.ts.map +1 -1
  70. package/components/StarToggleButton/StarToggleButton.d.ts +2 -0
  71. package/components/StarToggleButton/StarToggleButton.d.ts.map +1 -1
  72. package/components/TableView/TableView.d.ts +19 -0
  73. package/components/TableView/TableView.d.ts.map +1 -1
  74. package/components/Toolbar/Rows/TitleRow.d.ts +4 -3
  75. package/components/Toolbar/Rows/TitleRow.d.ts.map +1 -1
  76. package/components/Toolbar/Toolbar.d.ts.map +1 -1
  77. package/components/TopicTag/TopicTag.d.ts +12 -7
  78. package/components/TopicTag/TopicTag.d.ts.map +1 -1
  79. package/index.css +1 -1
  80. package/index.d.ts +21 -34
  81. package/index.d.ts.map +1 -1
  82. package/index.js +47934 -10596
  83. package/models/app-identity-styles.d.ts +28 -0
  84. package/models/app-identity-styles.d.ts.map +1 -0
  85. package/models/card-props.d.ts +22 -14
  86. package/models/card-props.d.ts.map +1 -1
  87. package/models/card-row-data.d.ts +5 -1
  88. package/models/card-row-data.d.ts.map +1 -1
  89. package/models/catalog-item-credentials.d.ts +4 -0
  90. package/models/catalog-item-credentials.d.ts.map +1 -1
  91. package/models/catalog-item.d.ts +3 -6
  92. package/models/catalog-item.d.ts.map +1 -1
  93. package/models/catalog-props.d.ts +158 -33
  94. package/models/catalog-props.d.ts.map +1 -1
  95. package/models/catalog-styles.d.ts +4 -41
  96. package/models/catalog-styles.d.ts.map +1 -1
  97. package/models/favorites.d.ts +24 -8
  98. package/models/favorites.d.ts.map +1 -1
  99. package/models/grid-context.d.ts +6 -1
  100. package/models/grid-context.d.ts.map +1 -1
  101. package/models/grid-props.d.ts +13 -1
  102. package/models/grid-props.d.ts.map +1 -1
  103. package/models/item-details-data.d.ts +94 -4
  104. package/models/item-details-data.d.ts.map +1 -1
  105. package/models/item-details-props.d.ts +457 -57
  106. package/models/item-details-props.d.ts.map +1 -1
  107. package/models/item-overview.d.ts +1 -7
  108. package/models/item-overview.d.ts.map +1 -1
  109. package/models/limits-props.d.ts +61 -0
  110. package/models/limits-props.d.ts.map +1 -0
  111. package/models/list-props.d.ts +27 -4
  112. package/models/list-props.d.ts.map +1 -1
  113. package/models/toolbar-props.d.ts +7 -21
  114. package/models/toolbar-props.d.ts.map +1 -1
  115. package/package.json +5 -6
  116. package/types/catalog-content-type.d.ts +13 -0
  117. package/types/catalog-content-type.d.ts.map +1 -0
  118. package/types/deployment-icon-size.d.ts +5 -0
  119. package/types/deployment-icon-size.d.ts.map +1 -0
  120. package/types/detail-tab.d.ts +4 -1
  121. package/types/detail-tab.d.ts.map +1 -1
  122. package/types/details-confirmation.d.ts +28 -0
  123. package/types/details-confirmation.d.ts.map +1 -0
  124. package/types/recipients-count.d.ts +12 -0
  125. package/types/recipients-count.d.ts.map +1 -0
  126. package/types/toolset-auth.d.ts +9 -0
  127. package/types/toolset-auth.d.ts.map +1 -1
  128. package/utils/catalog-content-tree.d.ts +8 -0
  129. package/utils/catalog-content-tree.d.ts.map +1 -0
  130. package/utils/catalog-filter.d.ts +1 -0
  131. package/utils/catalog-filter.d.ts.map +1 -1
  132. package/utils/catalog-sort.d.ts +1 -8
  133. package/utils/catalog-sort.d.ts.map +1 -1
  134. package/utils/catalog-tabs.d.ts +2 -2
  135. package/utils/catalog-tabs.d.ts.map +1 -1
  136. package/utils/styles.d.ts +1 -3
  137. package/utils/styles.d.ts.map +1 -1
  138. package/utils/toolset-credentials.d.ts +6 -19
  139. package/utils/toolset-credentials.d.ts.map +1 -1
  140. package/utils/usage-limits.d.ts +15 -0
  141. package/utils/usage-limits.d.ts.map +1 -0
  142. package/utils/use-fav-columns.d.ts +1 -4
  143. package/utils/use-fav-columns.d.ts.map +1 -1
  144. package/utils/use-scroll-virtualizer.d.ts +1 -9
  145. package/utils/use-scroll-virtualizer.d.ts.map +1 -1
  146. package/components/Details/Credentials/CredentialsSection.d.ts +0 -21
  147. package/components/Details/Credentials/CredentialsSection.d.ts.map +0 -1
  148. package/components/Details/Header/ConnectButton/ConnectButton.d.ts +0 -25
  149. package/components/Details/Header/ConnectButton/ConnectButton.d.ts.map +0 -1
  150. package/components/Details/Header/DeleteButton/DeleteButton.d.ts +0 -25
  151. package/components/Details/Header/DeleteButton/DeleteButton.d.ts.map +0 -1
  152. package/components/Details/Summary/Limits.d.ts +0 -18
  153. package/components/Details/Summary/Limits.d.ts.map +0 -1
  154. package/components/Details/Summary/Summary.d.ts +0 -12
  155. package/components/Details/Summary/Summary.d.ts.map +0 -1
  156. package/components/Details/TabsContent/Limits.d.ts +0 -14
  157. package/components/Details/TabsContent/Limits.d.ts.map +0 -1
  158. package/components/EntityHeader/EntityHeader.d.ts +0 -32
  159. package/components/EntityHeader/EntityHeader.d.ts.map +0 -1
  160. package/components/EntityTypeLabel/EntityTypeLabel.d.ts +0 -16
  161. package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +0 -1
  162. package/components/FeaturedChip/FeaturedChip.d.ts +0 -11
  163. package/components/FeaturedChip/FeaturedChip.d.ts.map +0 -1
  164. package/components/FolderPath/FolderPath.d.ts +0 -25
  165. package/components/FolderPath/FolderPath.d.ts.map +0 -1
  166. package/components/ItemHeader/ItemHeader.d.ts +0 -14
  167. package/components/ItemHeader/ItemHeader.d.ts.map +0 -1
  168. package/components/PublishFoldersTree/PublishFoldersTree.d.ts +0 -72
  169. package/components/PublishFoldersTree/PublishFoldersTree.d.ts.map +0 -1
  170. package/components/PublishHistoryList/PublishHistoryList.d.ts +0 -44
  171. package/components/PublishHistoryList/PublishHistoryList.d.ts.map +0 -1
  172. package/components/PublishPanel/PublishFooter.d.ts +0 -37
  173. package/components/PublishPanel/PublishFooter.d.ts.map +0 -1
  174. package/components/PublishPanel/PublishPanel.d.ts +0 -109
  175. package/components/PublishPanel/PublishPanel.d.ts.map +0 -1
  176. package/components/PublishPanel/StandalonePublishPanel.d.ts +0 -90
  177. package/components/PublishPanel/StandalonePublishPanel.d.ts.map +0 -1
  178. package/components/SearchBar/SearchBar.d.ts +0 -29
  179. package/components/SearchBar/SearchBar.d.ts.map +0 -1
  180. package/constants/catalog-defaults.d.ts +0 -4
  181. package/constants/catalog-defaults.d.ts.map +0 -1
  182. package/constants/entity-colors.d.ts +0 -6
  183. package/constants/entity-colors.d.ts.map +0 -1
  184. package/models/entity-summary.d.ts +0 -23
  185. package/models/entity-summary.d.ts.map +0 -1
  186. package/models/publish.d.ts +0 -89
  187. package/models/publish.d.ts.map +0 -1
  188. package/models/sort.d.ts +0 -8
  189. package/models/sort.d.ts.map +0 -1
  190. package/types/entity-tag.d.ts +0 -9
  191. package/types/entity-tag.d.ts.map +0 -1
  192. package/types/entity-type.d.ts +0 -11
  193. package/types/entity-type.d.ts.map +0 -1
  194. package/utils/format-published-date.d.ts +0 -8
  195. package/utils/format-published-date.d.ts.map +0 -1
  196. package/utils/parse-about-content.d.ts +0 -32
  197. package/utils/parse-about-content.d.ts.map +0 -1
  198. package/utils/publish-folder-tree.d.ts +0 -45
  199. package/utils/publish-folder-tree.d.ts.map +0 -1
  200. package/utils/publish-state.d.ts +0 -9
  201. package/utils/publish-state.d.ts.map +0 -1
  202. package/utils/use-publish-flow.d.ts +0 -77
  203. package/utils/use-publish-flow.d.ts.map +0 -1
@@ -1,27 +1,26 @@
1
+ import { PublicationRule, PublishFolderNode, PublishFooterLabels, PublishHistoryEntry, PublishPanelLabels } from '../../../publish-panel/src/index.ts';
1
2
  import { ReactNode } from 'react';
2
- import { PublishFooterTexts } from '../components/PublishPanel/PublishFooter';
3
- import { PublishPanelTexts } from '../components/PublishPanel/PublishPanel';
4
- import { CredentialsLevel } from '../types/toolset-auth';
3
+ import { CredentialsLevel, ToolsetAuthenticationType } from '../types/toolset-auth';
5
4
  import { CatalogItem } from './catalog-item';
6
- import { PublishFolderNode, PublishHistoryEntry } from './publish';
5
+ import { CatalogContentFilePreview } from './item-details-data';
7
6
  /** Text overrides for all user-visible strings in `DetailsPanel`. */
8
7
  export interface ItemDetailsTexts {
9
8
  /** "Share" action button label. Default: `'Share'`. */
10
9
  shareLabel?: string;
11
- /** "Connect" action button label, used for every entity type. Default: `'Connect'`. */
12
- connectLabel?: string;
13
- /** Caption above the intro/description text. Default: `'Intro'`. */
14
- introLabel?: string;
10
+ /** "Connect" tab label (resource ID, endpoint, and code snippets). Default: `'Connect'`. */
11
+ tabConnectLabel?: string;
12
+ /** Accessible label for the icon-only "Manage" button (opens the Edit/Publish/Delete menu). Default: `'Manage'`. */
13
+ manageActionLabel?: string;
15
14
  /** "About" tab label. Default: `'About'`. */
16
15
  tabAboutLabel?: string;
16
+ /** Content tab label, shown for items carrying a text body. Default: `'Details'`. */
17
+ tabContentLabel?: string;
17
18
  /** "Overview" tab label. Default: `'Overview'`. */
18
19
  tabOverviewLabel?: string;
19
20
  /** "Pricing" tab label. Default: `'Pricing'`. */
20
21
  tabPricingLabel?: string;
21
22
  /** "Limits" tab label. Default: `'Limits'`. */
22
23
  tabLimitsLabel?: string;
23
- /** "API" tab label. Default: `'API'`. */
24
- tabApiLabel?: string;
25
24
  /** Accessible label for the details panel `role="dialog"`. Default: `'Item details'`. */
26
25
  ariaLabel?: string;
27
26
  /** Accessible label for the close button. Default: `'Close'`. */
@@ -36,8 +35,22 @@ export interface ItemDetailsTexts {
36
35
  overviewNoLabel?: string;
37
36
  /** "Tools" tab label. Default: `'Tools'`. */
38
37
  tabToolsLabel?: string;
38
+ /** Accessible label for the Content tab's file picker. Default: `'Select file'`. */
39
+ contentFileSelectorAriaLabel?: string;
40
+ /** Returns the file-count text shown beside the picker. Default: ``(count) => `${count} files` ``. */
41
+ contentFileCountLabel?: (count: number) => string;
42
+ /** Status text announced while a picked file's content loads. Default: `'Loading file'`. */
43
+ contentFileLoadingLabel?: string;
44
+ /** Body text shown when a picked file cannot be read. Default: `'Failed to load this file.'`. */
45
+ contentFileErrorLabel?: string;
46
+ /** Body text shown when a picked file's preview type is `unsupported`. Default: `'Preview is not supported for this file'`. */
47
+ contentFileUnsupportedLabel?: string;
39
48
  /** Label on the "Featured" tag chip shown when the entity is featured. Default: `'Featured'`. */
40
49
  featuredLabel?: string;
50
+ /** Label on the header badge shown when `item.details?.limits?.status` is `CatalogLimitStatus.RunningLow`. Default: `'Running low'`. */
51
+ limitRunningLowLabel?: string;
52
+ /** Label on the header badge shown when `item.details?.limits?.status` is `CatalogLimitStatus.LimitReached`. Default: `'Limit reached'`. */
53
+ limitReachedLabel?: string;
41
54
  /** Primary action button label. Default: `'Use in chat'`. */
42
55
  primaryActionLabel?: string;
43
56
  /** "Publish" action button label. Default: `'Publish'`. */
@@ -50,24 +63,26 @@ export interface ItemDetailsTexts {
50
63
  hasPrimaryAction?: boolean;
51
64
  /** "Edit" action button label. Default: `'Edit'`. */
52
65
  editActionLabel?: string;
53
- /** Label above the daily-limit progress bar. Default: `'Daily limit'`. */
54
- dailyLimitLabel?: string;
66
+ /** "Download" action button label. Default: `'Download'`. */
67
+ downloadActionLabel?: string;
55
68
  /** "Resource" section heading in the API tab. Default: `'Resource'`. */
56
69
  apiResourceSectionLabel?: string;
57
70
  /** "Code snippet" section heading in the API tab. Default: `'Code snippet'`. */
58
71
  apiSnippetSectionLabel?: string;
59
72
  /** "Model ID" row label in the API tab. Default: `'Model ID'`. */
60
73
  apiModelIdLabel?: string;
61
- /** "Endpoint" section heading in the API tab (multi-endpoint selector). Default: `'Endpoint'`. */
62
- apiEndpointSectionLabel?: string;
63
- /** URL row label inside each endpoint option. Default: `'Endpoint'`. */
74
+ /** Title shown in the single-endpoint code block's header in the Connect tab. Default: `'Endpoint'`. */
64
75
  apiEndpointLabel?: string;
76
+ /** "Endpoint" section heading above the multi-endpoint selector in the Connect tab. Default: `'Endpoint'`. */
77
+ apiEndpointSectionLabel?: string;
65
78
  /** "Request example" row label in the API tab. Default: `'Request example'`. */
66
79
  apiRequestExampleLabel?: string;
67
80
  /** "Response schema" row label in the API tab. Default: `'Response schema'`. */
68
81
  apiResponseSchemaLabel?: string;
69
82
  /** Accessible label for the copy-to-clipboard button. Default: `'Copy'`. */
70
83
  copyCodeAriaLabel?: string;
84
+ /** Message announced through the code block's live region once a copy completes. Default: `'Copied!'`. */
85
+ copiedCodeStatusLabel?: string;
71
86
  /** "Token pricing" section heading in the Pricing tab. Default: `'Token pricing'`. */
72
87
  pricingPricesSectionLabel?: string;
73
88
  /** "Usage limits" section heading in the Pricing tab. Default: `'Usage limits'`. */
@@ -79,54 +94,211 @@ export interface ItemDetailsTexts {
79
94
  /** "Log out" action button label, shown when the item's credentials are signed in. Default: `'Log out'`. */
80
95
  logoutActionLabel?: string;
81
96
  /**
82
- * "Login with my creds" action button label, shown to a non-admin user on
83
- * a public item they are not personally signed into (organization-wide
84
- * credentials may already be active). Default: `'Login with my creds'`.
85
- */
86
- loginWithMyCredsActionLabel?: string;
87
- /**
88
- * "Manage credentials" action button label, shown to an admin on a public
89
- * item — expands both the `USER` and `GLOBAL` sections. Default: `'Manage credentials'`.
97
+ * Returns the "Manage credentials"/"Manage API keys" action button label
98
+ * for an admin managing a public item, given its authentication type.
99
+ * Default: `(type) => type === ToolsetAuthenticationType.ApiKey ? 'Manage API keys' : 'Manage credentials'`.
90
100
  */
91
- manageCredentialsActionLabel?: string;
92
- /** Heading for the personal-credentials section when both levels are shown. Default: `'My credentials'`. */
93
- myCredentialsSectionLabel?: string;
94
- /** Heading for the organization-wide-credentials section when both levels are shown. Default: `'Entire organization credentials'`. */
95
- organizationCredentialsSectionLabel?: string;
96
- /** Status label shown in the credentials section when signed in. Default: `'Signed in'`. */
101
+ manageCredentialsActionLabel?: (authenticationType: ToolsetAuthenticationType) => string;
102
+ /** Status label shown next to a signed-in row, and as the accessible name of its checkmark indicator. Default: `'Signed in'`. */
97
103
  credentialsSignedInLabel?: string;
98
- /** Status label shown in the credentials section when signed out. Default: `'Signed out'`. */
104
+ /** Status label shown next to a signed-out row. Default: `'Signed out'`. */
99
105
  credentialsSignedOutLabel?: string;
100
106
  /** Confirmation dialog message shown before logging out. Default: `'Are you sure you want to log out?'`. */
101
107
  logoutConfirmMessage?: string;
102
- /** Label for the API key input field in the credentials section. Default: `'API key'`. */
103
- apiKeyFieldLabel?: string;
104
108
  /**
105
- * Returns the API-key field hint naming the required header. Default:
106
- * `(header) => \`Enter your API key value for "${header}" header\``.
109
+ * Returns the confirmation dialog message shown before deleting an API
110
+ * key, given which level's key is being deleted. Default:
111
+ * `(level) => level === CredentialsLevel.Global ? 'Are you sure you want to delete the organization API key?' : 'Are you sure you want to delete your personal API key?'`.
107
112
  */
108
- apiKeyFieldHint?: (apiKeyHeader: string) => string;
109
- /** Credentials-status badge label shown on catalog cards when signed out. Default: `'LOGGED OUT'`. */
113
+ deleteApiKeyConfirmMessage?: (level: CredentialsLevel) => string;
114
+ /** Label for the API key input field. Default: `'API key'`. */
115
+ apiKeyFieldLabel?: string;
116
+ /** Validation error shown under the API key input when "Add" is submitted with an empty value. Default: `'API key is required.'`. */
117
+ apiKeyRequiredErrorMessage?: string;
118
+ /** Accessible label for the logged-out warning icon on catalog card avatars, and the text shown in its hover tooltip. Default: `'Authorize to use this toolset.'`. */
110
119
  credentialsBadgeLoggedOutLabel?: string;
120
+ /**
121
+ * Top action button label when the item requires an API key and the
122
+ * current user has not added their personal key yet. Default: `'API key'`.
123
+ */
124
+ apiKeyActionLabel?: string;
125
+ /**
126
+ * Top action button label when the item requires an API key and the
127
+ * current user already has a personal key on file. Default: `'Change API key'`.
128
+ */
129
+ changeApiKeyActionLabel?: string;
130
+ /** Title of the personal API-key popover opened from the top action button. Default: `'Personal API key'`. */
131
+ personalApiKeyPanelTitle?: string;
132
+ /** Confirmation line shown in the personal API-key popover once a key is on file. Default: `'Personal key has been added'`. */
133
+ personalApiKeyAddedMessage?: string;
134
+ /** Confirmation line shown in the admin credentials-management row once that level's API key is on file. Default: `'Key has been configured'`. */
135
+ apiKeyConfiguredMessage?: string;
136
+ /** "Add" action label for submitting a new API key. Default: `'Add'`. */
137
+ addApiKeyActionLabel?: string;
138
+ /** Status text announced to assistive tech while an API key is being added. Default: `'Adding'`. */
139
+ addingApiKeyStatusLabel?: string;
140
+ /**
141
+ * Returns the caption shown under an on-file API key, given an
142
+ * already-formatted relative time. Default: `(when) => \`Added ${when}\``.
143
+ */
144
+ apiKeyAddedLabel?: (when: string) => string;
145
+ /**
146
+ * Returns the banner title shown when the current user is not signed in
147
+ * personally but organization-wide credentials keep the item usable,
148
+ * given the item's authentication type. Default:
149
+ * `(type) => type === ToolsetAuthenticationType.ApiKey ? 'You are currently using organization API key to access this toolset.' : 'You are currently using organization credentials to access this toolset.'`.
150
+ */
151
+ orgFallbackBannerTitle?: (authenticationType: ToolsetAuthenticationType) => string;
152
+ /**
153
+ * Returns the banner description paired with `orgFallbackBannerTitle`,
154
+ * given the item's authentication type. Default:
155
+ * `(type) => type === ToolsetAuthenticationType.ApiKey ? 'Configure your personal API key to have access to your data.' : 'Login using personal account to have access to your data.'`.
156
+ */
157
+ orgFallbackBannerDescription?: (authenticationType: ToolsetAuthenticationType) => string;
158
+ /**
159
+ * Returns the banner title shown to an admin when organization-wide
160
+ * credentials are active, given the item's authentication type. Default:
161
+ * `(type) => type === ToolsetAuthenticationType.ApiKey ? 'Signed in with organization API key.' : 'Signed in with organization credentials.'`.
162
+ */
163
+ orgCredentialsActiveBannerTitle?: (authenticationType: ToolsetAuthenticationType) => string;
164
+ /**
165
+ * Returns the banner title shown to an admin when their own personal
166
+ * credentials are active (and take precedence over any organization-wide
167
+ * credentials), given the item's authentication type. Default:
168
+ * `(type) => type === ToolsetAuthenticationType.ApiKey ? 'Signed in with personal API key.' : 'Signed in with personal credentials.'`.
169
+ */
170
+ personalCredentialsActiveBannerTitle?: (authenticationType: ToolsetAuthenticationType) => string;
171
+ /**
172
+ * Returns the title of the admin credentials-management sub-screen, given
173
+ * the item's authentication type. Default:
174
+ * `(type) => type === ToolsetAuthenticationType.ApiKey ? 'Toolset API keys' : 'Toolset credentials'`.
175
+ */
176
+ credentialsManagementTitle?: (authenticationType: ToolsetAuthenticationType) => string;
177
+ /**
178
+ * Returns the description shown under the identity chip in the admin
179
+ * credentials-management sub-screen, given the item's authentication
180
+ * type. Default:
181
+ * `(type) => 'Select which account to use with this toolset — personal or organization. If both are configured, personal credentials will be used by default' + (type === ToolsetAuthenticationType.ApiKey ? ' for toolset access.' : '.')`.
182
+ */
183
+ credentialsManagementDescription?: (authenticationType: ToolsetAuthenticationType) => string;
184
+ /** Row label for the current user's own credentials in the admin management sub-screen. Default: `'Personal credentials'`. */
185
+ personalCredentialsLabel?: string;
186
+ /** Row description for the current user's own credentials in the admin management sub-screen. Default: `'These credentials apply only to your account.'`. */
187
+ personalCredentialsDescription?: string;
188
+ /** Row label for organization-wide credentials in the admin management sub-screen. Default: `'Organization credentials'`. */
189
+ organizationCredentialsLabel?: string;
190
+ /** Row description for organization-wide credentials in the admin management sub-screen. Default: `'Once added, these credentials will grant all users in your organization access to this toolset.'`. */
191
+ organizationCredentialsDescription?: string;
111
192
  /** "Delete" action button label. Default: `'Delete'`. */
112
193
  deleteActionLabel?: string;
113
194
  /** Status text announced to assistive tech while a delete is in progress. Default: `'Deleting'`. */
114
195
  deletingStatusLabel?: string;
196
+ /** Title of the delete confirmation step. Default: the `deleteActionLabel` value. */
197
+ deleteConfirmTitle?: string;
198
+ /**
199
+ * Returns the delete confirmation's body copy, given the item's display
200
+ * name. Default:
201
+ * `(name) => \`Are you sure you want to delete ${name}? This action is permanent and cannot be undone.\`` (with the name emphasized).
202
+ */
203
+ deleteConfirmMessage?: (name: string) => ReactNode;
204
+ /**
205
+ * Consequences listed as bullets in the delete confirmation. Default:
206
+ * `['All shared configurations will be lost', 'Users who rely on it will lose access', 'Cannot be undone']`.
207
+ * Pass `[]` to render no list.
208
+ */
209
+ deleteConfirmConsequences?: string[];
210
+ /** Recipient-side "Remove from My List" action and confirmation label. Default: `'Remove from My List'`. */
211
+ unshareLabel?: string;
212
+ /** Title of the confirmation step shown before removing a shared item. Default: `'Remove from My List'`. */
213
+ unshareConfirmTitle?: string;
214
+ /**
215
+ * Returns the removal confirmation's body copy, given the item's display
216
+ * name. Default:
217
+ * `(name) => \`Remove ${name} from your list? You'll need a new invitation to access it again.\`` (with the name emphasized).
218
+ */
219
+ unshareConfirmMessage?: (name: string) => ReactNode;
220
+ /**
221
+ * Consequences listed as bullets in the removal confirmation. Default:
222
+ * `['You will lose access to this item', 'Other people keep their access', 'You will need a new invitation to get it back']`.
223
+ * Pass `[]` to render no list.
224
+ */
225
+ unshareConfirmConsequences?: string[];
226
+ /** Status text announced to assistive tech while a removal is in progress. Default: `'Removing'`. */
227
+ unsharingStatusLabel?: string;
228
+ /** Owner-side "Revoke access" action and confirmation label. Default: `'Revoke access'`. */
229
+ revokeShareLabel?: string;
230
+ /**
231
+ * Returns the "Revoke access" menu label when the number of users holding
232
+ * access is known, so the owner can see the blast radius before opening the
233
+ * confirmation. Falls back to `revokeShareLabel` when the count is unknown.
234
+ * Default: `(count) => \`Revoke access (${count})\``.
235
+ */
236
+ revokeShareLabelWithCount?: (count: number) => string;
237
+ /** Title of the confirmation step shown before revoking everyone's shared access. Default: `'Revoke access'`. */
238
+ revokeShareConfirmTitle?: string;
239
+ /**
240
+ * Returns the revoke confirmation's body copy, given the item's display
241
+ * name. Default:
242
+ * `(name) => \`Revoke shared access to ${name}? Anyone you shared it with will lose access.\`` (with the name emphasized).
243
+ */
244
+ revokeShareConfirmMessage?: (name: string) => ReactNode;
245
+ /**
246
+ * Consequences listed as bullets in the revoke confirmation. Default:
247
+ * `['Everyone you shared it with loses access', 'Existing share links stop working', 'You keep full access — nothing is deleted']`.
248
+ * Pass `[]` to render no list.
249
+ */
250
+ revokeShareConfirmConsequences?: string[];
251
+ /** Status text announced to assistive tech while a revoke is in progress. Default: `'Revoking access'`. */
252
+ revokingShareStatusLabel?: string;
253
+ /** Owner-side "Unpublish" action and confirmation label. Default: `'Unpublish'`. */
254
+ unpublishLabel?: string;
255
+ /** Title of the confirmation step shown before requesting removal of a published copy. Default: `'Unpublish'`. */
256
+ unpublishConfirmTitle?: string;
257
+ /**
258
+ * Returns the unpublish confirmation's body copy when the item is published
259
+ * to exactly one folder, given the item's display name and that folder's
260
+ * path. Default:
261
+ * `(name, folder) => \`Unpublish ${name} from "${folder}"? The request is submitted for admin approval.\`` (with the name emphasized).
262
+ */
263
+ unpublishConfirmMessage?: (name: string, folder: string) => ReactNode;
264
+ /**
265
+ * Returns the unpublish confirmation's body copy when the item is published
266
+ * to more than one folder and the user must pick one, given the item's
267
+ * display name. Default:
268
+ * `(name) => \`Choose which folder to unpublish ${name} from. The request is submitted for admin approval.\`` (with the name emphasized).
269
+ */
270
+ unpublishSelectFolderMessage?: (name: string) => ReactNode;
271
+ /** Accessible name of the published-folder radio group shown when the item is published to more than one folder. Default: `'Published folders'`. */
272
+ unpublishFolderGroupAriaLabel?: string;
273
+ /**
274
+ * Consequences listed as bullets in the unpublish confirmation. Default:
275
+ * `['Everyone loses access to the published copy', 'Your own copy is not deleted', 'You can publish it again later']`.
276
+ * Pass `[]` to render no list.
277
+ */
278
+ unpublishConfirmConsequences?: string[];
279
+ /** Status text announced to assistive tech while an unpublish request is in flight. Default: `'Requesting unpublish'`. */
280
+ unpublishingStatusLabel?: string;
281
+ /** Status text announced to assistive tech while a logout is in progress. Default: `'Logging out'`. */
282
+ loggingOutStatusLabel?: string;
283
+ /** Generic "Cancel" label, used by every confirmation step. Default: `'Cancel'`. */
284
+ cancelLabel?: string;
285
+ /** Status text announced to assistive tech while the primary Download action is in progress. Default: `'Downloading'`. */
286
+ downloadingStatusLabel?: string;
115
287
  }
116
288
  /** Typography class overrides for `DetailsPanel` text elements. */
117
289
  export interface ItemDetailsTypography {
118
- /** Typography class for the entity name. Default: `'dial-body-semi-text text-primary'`. */
290
+ /** Typography class for the entity name. Default: `'dial-body-semi-text'`. */
119
291
  nameClassName?: string;
120
- /** Typography class for the provider label below the entity name. Default: `'dial-tiny-text text-secondary'`. */
121
- providerClassName?: string;
292
+ /** Typography class for a sub-view header title (publish, share, credentials). Default: `'dial-body-semi-text'`. */
293
+ subViewTitleClassName?: string;
122
294
  /** Typography class for the version string. Default: `'dial-tiny-text'`. */
123
295
  versionClassName?: string;
124
- /** Typography class for the intro section caption. Default: `'dial-caption-text'`. */
125
- introCaptionClassName?: string;
126
- /** Typography class for section headings inside the intro/description content. Default: `'dial-small-semi-text'`. */
296
+ /** Typography class for section headings inside the description content. Default: `'dial-small-semi-text'`. */
127
297
  contentHeadingClassName?: string;
128
- /** Typography class for the intro/description body text. Default: `'dial-small-text'`. */
298
+ /** Typography class for the description body text. Default: `'dial-small-text'`. */
129
299
  contentClassName?: string;
300
+ /** Typography class for the file-count text beside the Content tab's file picker. Default: `'dial-tiny-text'`. */
301
+ contentFileCountClassName?: string;
130
302
  /** Typography class for Overview section headings. Default: `'dial-caption-text'`. */
131
303
  overviewSectionClassName?: string;
132
304
  /** Typography class for spec row labels (left column). Default: `'dial-small-semi-text'`. */
@@ -139,13 +311,110 @@ export interface ItemDetailsTypography {
139
311
  folderLabelClassName?: string;
140
312
  /** Typography class applied to the leaf (last) folder path segment. Default: `'dial-tiny-semi-text'`. */
141
313
  folderLeafClassName?: string;
142
- /** Typography class for the credentials section's signed-in/signed-out status label. Default: `'dial-small-semi-text text-primary'`. */
143
- credentialsStatusLabelClassName?: string;
314
+ /** Typography class for a confirmation step's body copy and consequence bullets. Default: `'dial-small-text'`. */
315
+ confirmMessageClassName?: string;
316
+ /** Typography class for the credentials-management sub-screen's description. Default: `'dial-body-paragraph-text'`. */
317
+ credentialsDescriptionClassName?: string;
318
+ /** Typography class for a credentials row's title. Default: `'dial-small-semi-text'`. */
319
+ credentialsRowLabelClassName?: string;
320
+ /** Typography class for a credentials row's description. Default: `'dial-small-text'`. */
321
+ credentialsRowDescriptionClassName?: string;
322
+ /** Typography class for the empty-API-key validation message. Default: `'dial-caption-text'`. */
323
+ credentialsErrorClassName?: string;
324
+ /** Typography class for the configured-API-key card's title. Default: `'dial-tiny-semi-text'`. */
325
+ credentialsKeyCardTitleClassName?: string;
326
+ /** Typography class for the configured-API-key card's description. Default: `'dial-tiny-text'`. */
327
+ credentialsKeyCardDescriptionClassName?: string;
328
+ }
329
+ /**
330
+ * Color overrides for `DetailsPanel` and everything it renders, applied as CSS
331
+ * custom properties on the panel root so they cascade into the nested header,
332
+ * credentials, summary, spec-grid and tools sections.
333
+ */
334
+ export interface ItemDetailsColors {
335
+ /** Backdrop overlay color behind the panel. Fallback: `--bg-backdrop`. */
336
+ backdrop?: string;
337
+ /** Panel surface background. Fallback: `--bg-layer-raised`. */
338
+ background?: string;
339
+ /** Panel's leading-edge border color (desktop only). Fallback: `--stroke-secondary`. */
340
+ border?: string;
341
+ /** Horizontal divider color between panel sections. Fallback: `--stroke-tertiary`. */
342
+ divider?: string;
343
+ /** Scrollbar thumb color of the scrollable content area. Fallback: `--stroke-secondary`. */
344
+ scrollbar?: string;
345
+ /** Shimmer color of the tab-row loading skeleton. Fallback: `--bg-control-disable-primary`. */
346
+ skeleton?: string;
347
+ /** Entity name text color in the header. Fallback: `--text-primary`. */
348
+ nameText?: string;
349
+ /** Title text color of a sub-view (publish or a confirmation step). Fallback: `--text-primary`. */
350
+ publishTitleText?: string;
351
+ /** Border color of the "current version" tag. Fallback: `--stroke-tertiary`. */
352
+ versionTagBorder?: string;
353
+ /** Background color of the "current version" tag. Fallback: `--bg-control-accent-alpha`. */
354
+ versionTagBackground?: string;
355
+ /** Text color of the "current version" tag. Fallback: `--text-accent`. */
356
+ versionTagText?: string;
357
+ /** Body text color of the Content tab. Fallback: `--text-primary`. */
358
+ contentText?: string;
359
+ /** Text color of a `{{placeholder}}` token in the Content tab's body. Fallback: `--text-prompt-parameter`. */
360
+ variableText?: string;
361
+ /** File-count text color beside the Content tab's file picker. Fallback: `--text-secondary`. */
362
+ contentFileCountText?: string;
363
+ /** Heading color of the API section. Fallback: `--text-secondary`. */
364
+ apiHeadingText?: string;
365
+ /** Divider color between tool entries. Fallback: `--stroke-tertiary`. */
366
+ toolsDivider?: string;
367
+ /** Tool description text color. Fallback: `--text-secondary`. */
368
+ toolsDescriptionText?: string;
369
+ /** Spec-grid outer border color. Fallback: `--stroke-secondary`. */
370
+ gridBorder?: string;
371
+ /** Spec-grid header text color. Fallback: `--text-secondary`. */
372
+ gridHeaderText?: string;
373
+ /** Spec-grid header background. Fallback: `--bg-layer-sunken`. */
374
+ gridHeaderBackground?: string;
375
+ /** Spec-grid cell text color. Fallback: `--text-primary`. */
376
+ gridCellText?: string;
377
+ /** Spec-grid cell top-border color. Fallback: `--stroke-secondary`. */
378
+ gridCellDivider?: string;
379
+ /** Spec-grid even-row background. Fallback: `--bg-layer-base`. */
380
+ gridRowEvenBackground?: string;
381
+ /** `InfoCard` surface color in its `Info` variant. Fallback: `--bg-info`. */
382
+ infoCardBackground?: string;
383
+ /** `InfoCard` surface color in its `Danger` variant. Fallback: `--bg-error`. */
384
+ infoCardDangerBackground?: string;
385
+ /** Confirmation body-copy text color. Fallback: `--text-primary`. */
386
+ confirmMessageText?: string;
387
+ /** Confirmation consequence-bullet text color. Fallback: `--text-secondary`. */
388
+ confirmConsequenceText?: string;
389
+ /** Top border color of the confirmation action row. Fallback: `--stroke-tertiary`. */
390
+ confirmFooterBorder?: string;
391
+ /** Background of the credentials sub-screen's identity card and its rows' icon chips. Fallback: `--bg-layer-sunken`. */
392
+ credentialsSurfaceBackground?: string;
393
+ /** Color of the checkmark marking the credentials level currently in effect. Fallback: `--text-success`. */
394
+ credentialsActiveIcon?: string;
395
+ /** Background of the credentials banner's icon chip, which sits on the already-tinted status card rather than on the panel. Fallback: `--bg-layer-raised`. */
396
+ credentialsBannerIconBackground?: string;
397
+ /** Text color of the credentials sub-screen's description. Fallback: `--text-primary`. */
398
+ credentialsDescriptionText?: string;
399
+ /** Text color of a credentials row's description. Fallback: `--text-tertiary`. */
400
+ credentialsRowDescriptionText?: string;
401
+ /** Text color of the empty-API-key validation message. Fallback: `--text-error`. */
402
+ credentialsErrorText?: string;
403
+ /** Surface color of the credentials status card used by the banner, the configured-key card, and the personal API-key popover. Fallback: `--bg-layer-base`. */
404
+ credentialsCardBackground?: string;
405
+ /** Color of the credentials status card's leading icon. Fallback: `--text-secondary`. */
406
+ credentialsCardIcon?: string;
407
+ /** Title text color of the credentials status card. Fallback: `--text-primary`. */
408
+ credentialsCardTitleText?: string;
409
+ /** Description text color of the credentials status card. Fallback: `--text-secondary`. */
410
+ credentialsCardDescriptionText?: string;
144
411
  }
145
412
  /** Grouped style overrides for `DetailsPanel`. */
146
413
  export interface ItemDetailsStyles {
147
414
  /** Typography class overrides for text elements. */
148
415
  typography?: ItemDetailsTypography;
416
+ /** Color overrides applied as CSS custom properties on the panel root. */
417
+ colors?: ItemDetailsColors;
149
418
  }
150
419
  /** Props for `DetailsPanel`. */
151
420
  export interface DetailsPanelProps {
@@ -162,8 +431,29 @@ export interface DetailsPanelProps {
162
431
  isDetailsLoading?: boolean;
163
432
  /** Called when the panel should close (close button or backdrop click). */
164
433
  onClose: () => void;
434
+ /**
435
+ * Renders the panel read-only: the favorite star and every action that
436
+ * mutates the item or the caller's relationship to it — Share,
437
+ * Publish/Unpublish, Edit, Delete, "Remove from My List", "Revoke access",
438
+ * and the credentials Log in / Log out / manage button — are withheld. The
439
+ * non-mutating actions (the primary "Use in chat" and Download) still
440
+ * render. Default: false.
441
+ */
442
+ isReadonly?: boolean;
165
443
  /** Called when the star/favorite button is toggled. */
166
444
  onToggleFavorite?: (id: string, isStarred: boolean) => void;
445
+ /**
446
+ * Additional caller-supplied rule for whether the favorite star is shown in
447
+ * the panel header. Returning `false` hides the star and makes the item
448
+ * non-favoritable from the panel. Defaults to **visible** when omitted.
449
+ */
450
+ isFavoriteVisible?: (item: CatalogItem) => boolean;
451
+ /**
452
+ * Additional caller-supplied rule for whether the "Remove from My List"
453
+ * action is shown, combined (AND) with the built-in
454
+ * `sharedWithMe`/`isMyApp` rule. Defaults to `true` when absent.
455
+ */
456
+ isUnshareVisible?: (item: CatalogItem) => boolean;
167
457
  /** Called when the "Use in chat" button is clicked. */
168
458
  onUseInChat?: (item: CatalogItem) => void;
169
459
  /** Controls whether the primary action button is shown for the item. */
@@ -172,6 +462,12 @@ export interface DetailsPanelProps {
172
462
  onShare?: (item: CatalogItem) => void;
173
463
  /** Controls whether the "Publish" action is shown for the item. */
174
464
  isPublishVisible?: (item: CatalogItem) => boolean;
465
+ /**
466
+ * Resolves whether whichever of "Publish"/"Unpublish" applies renders as its
467
+ * own button in the details header rather than an entry in its "Manage"
468
+ * menu. Defaults to `false` — the menu entry.
469
+ */
470
+ isPublishPrimary?: (item: CatalogItem) => boolean;
175
471
  /** Resolves previously published versions for an item, most recent first. */
176
472
  getPublishHistory?: (item: CatalogItem) => Promise<PublishHistoryEntry[]>;
177
473
  /** Root-level destination folder nodes offered by the publish flow. */
@@ -188,32 +484,87 @@ export interface DetailsPanelProps {
188
484
  publishLoadingPaths?: Set<string>;
189
485
  /** Resolves whether the current user can publish to a given folder path. */
190
486
  hasPublishWriteAccess?: (folderPath: string[]) => boolean;
191
- /** Called with the destination folder path when the user confirms publish/update. */
192
- onPublish?: (item: CatalogItem, folderPath: string[]) => Promise<void>;
487
+ /** Called with the destination folder path and current access rules when the user confirms publish/update. */
488
+ onPublish?: (item: CatalogItem, folderPath: string[], rules: PublicationRule[]) => Promise<void>;
193
489
  /** Called after a successful publish; use this to surface a success notification. */
194
490
  onPublishSuccess?: (item: CatalogItem, folderPath: string[]) => void;
491
+ /** Called with the rejection reason when a publish request fails; use this to surface an error notification. */
492
+ onPublishError?: (item: CatalogItem, folderPath: string[], error: unknown) => void;
195
493
  /** Called when the user confirms a new folder name in the publish flow. */
196
494
  onCreatePublishFolder?: (parentPath: string[], name: string) => void;
197
495
  /** Text overrides forwarded to the publish flow. */
198
- publishTexts?: PublishPanelTexts & PublishFooterTexts;
496
+ publishLabels?: PublishPanelLabels & PublishFooterLabels;
497
+ /** Options offered in the access-rules editor's source picker. Defaults to `[]` when absent. */
498
+ ruleSourceOptions?: string[];
199
499
  /**
200
- * Renders the Share popover content anchored to the Share button. When
201
- * provided, clicking Share opens this popover instead of calling `onShare`.
500
+ * Resolves the access rules already configured for a destination folder,
501
+ * called whenever the selected folder changes. The result fully replaces
502
+ * the rules editor's contents. Omit to skip pre-filling entirely.
503
+ */
504
+ onFetchExistingRules?: (folderPath: string[]) => Promise<PublicationRule[]>;
505
+ /**
506
+ * Renders the Share popover content, anchored to whichever surface carries
507
+ * Share — the header button, or the Manage trigger when `isSharePrimary`
508
+ * has moved the entry into that menu. When provided, choosing Share opens
509
+ * this popover instead of calling `onShare`.
202
510
  */
203
511
  shareOverlay?: (item: CatalogItem, onClose: () => void) => ReactNode;
204
512
  /**
205
- * Renders the Connect popover content anchored to the Connect button. When
206
- * absent, the Connect button is never shown there is no non-overlay
207
- * fallback action.
513
+ * Additional caller-supplied rule for whether the "Share" action is shown
514
+ * for the item, combined (AND) with the built-in ownership/type rule.
515
+ * Absent means the built-in rule alone decides.
208
516
  */
209
- connectOverlay?: (item: CatalogItem, onClose: () => void) => ReactNode;
517
+ isShareVisible?: (item: CatalogItem) => boolean;
210
518
  /**
211
- * Controls whether the "Connect" action is shown for the item. When
212
- * absent, the Connect button is never shown.
519
+ * Resolves whether "Share" renders as its own button in the details header
520
+ * rather than an entry in its "Manage" menu. Defaults to `true` — the
521
+ * button. Returning `false` moves it into the menu, beside "Delete".
213
522
  */
214
- isConnectVisible?: (item: CatalogItem) => boolean;
523
+ isSharePrimary?: (item: CatalogItem) => boolean;
215
524
  /** Called when the "Edit" button is clicked. Shown only when the item's `isEditable` is `true`. */
216
525
  onEdit?: (item: CatalogItem) => void;
526
+ /**
527
+ * Called when the "Download" action is clicked, with no confirmation step.
528
+ * When "Download" renders in the Manage menu (see `isDownloadPrimary`), the
529
+ * panel does not await the result or show a pending state, so the host
530
+ * owns any progress and failure feedback. When "Download" is the primary
531
+ * action, the panel awaits this call and shows a pending/disabled state
532
+ * for its duration; the host still owns failure feedback either way.
533
+ */
534
+ onDownload?: (item: CatalogItem) => Promise<void> | void;
535
+ /**
536
+ * Narrows which items offer the "Download" action. Defaults to `true`
537
+ * (visible for every item) whenever `onDownload` is supplied.
538
+ */
539
+ isDownloadVisible?: (item: CatalogItem) => boolean;
540
+ /**
541
+ * Resolves whether an item's Download action renders as the primary action
542
+ * (in the same slot as "Use in chat") instead of a Manage-menu entry.
543
+ * Defaults to `item.type === CatalogEntityType.Skill`. An item whose
544
+ * Download is primary never also shows it in the Manage menu.
545
+ */
546
+ isDownloadPrimary?: (item: CatalogItem) => boolean;
547
+ /**
548
+ * Resolves the text of a file picked in the Content tab, given its opaque
549
+ * `id`. The panel shows a loading state while it is pending and renders the
550
+ * resolved text as the body; resolving `undefined` or rejecting leaves the
551
+ * body showing `texts.contentFileErrorLabel`. Superseded by
552
+ * `onLoadContentFilePreview` for a given pick when both are supplied.
553
+ */
554
+ onLoadContentFile?: (fileId: string) => Promise<string | undefined>;
555
+ /**
556
+ * Resolves a picked file's typed preview, given its opaque `id`. Takes
557
+ * precedence over `onLoadContentFile` when both are supplied. Resolving
558
+ * `undefined` or rejecting leaves the body showing
559
+ * `texts.contentFileErrorLabel`.
560
+ */
561
+ onLoadContentFilePreview?: (fileId: string) => Promise<CatalogContentFilePreview | undefined>;
562
+ /**
563
+ * Renders a picked file through a host-owned preview surface. Takes
564
+ * precedence over both loading callbacks. The file id is opaque to the
565
+ * panel; `fileName` is the basename resolved from the supplied tree.
566
+ */
567
+ renderContentFilePreview?: (fileId: string, fileName: string) => ReactNode;
217
568
  /**
218
569
  * Called immediately when the "Delete" button is clicked, with no
219
570
  * confirmation step. Shown only when the item's `isMyApp` is `true` and
@@ -221,6 +572,50 @@ export interface DetailsPanelProps {
221
572
  * button shows a disabled state while pending.
222
573
  */
223
574
  onDelete?: (item: CatalogItem) => Promise<void> | void;
575
+ /**
576
+ * Called when removal is confirmed via the confirmation popup, for an item
577
+ * shared with the current user (`sharedWithMe: true`). May return a
578
+ * promise; the popup shows a loading state and prevents duplicate
579
+ * submission while pending.
580
+ */
581
+ onUnshare?: (item: CatalogItem) => Promise<void> | void;
582
+ /**
583
+ * Called when revocation is confirmed for an item the current user owns
584
+ * (`isMyApp: true`), removing every recipient's shared access at once. May
585
+ * return a promise; the confirmation shows a loading state and prevents
586
+ * duplicate submission while pending. The item stays in the owner's
587
+ * catalog, so the panel returns to its details content on success.
588
+ */
589
+ onRevokeShare?: (item: CatalogItem) => Promise<void> | void;
590
+ /**
591
+ * Resolves how many users currently hold shared access to an owned item.
592
+ * Called when the owner opens the Manage menu, so "Revoke access" is gated
593
+ * and labelled on a count that is never stale. `0` hides the action;
594
+ * `undefined` (or a rejection) leaves it reachable without a count. Omit to
595
+ * offer the action for every owned item.
596
+ */
597
+ onFetchRecipientsCount?: (item: CatalogItem) => Promise<number | undefined>;
598
+ /**
599
+ * Additional caller-supplied rule for whether "Revoke access" is shown,
600
+ * combined (AND) with the built-in `isMyApp` rule and the recipient count.
601
+ * Defaults to `true` when absent.
602
+ */
603
+ isRevokeShareVisible?: (item: CatalogItem) => boolean;
604
+ /**
605
+ * Called when unpublish is confirmed, with the published folder's path
606
+ * segments — the same `string[]` shape `onPublish` receives. May return a
607
+ * promise; the confirmation shows a loading state and prevents duplicate
608
+ * submission while pending. The published copy survives until an
609
+ * administrator approves the request, so the panel stays open, the item
610
+ * stays visible, and cached publish history is left untouched on success.
611
+ */
612
+ onUnpublish?: (item: CatalogItem, folderPath: string[]) => Promise<void> | void;
613
+ /**
614
+ * Additional caller-supplied rule for whether "Unpublish" is shown,
615
+ * combined (AND) with the presence of `onUnpublish` and at least one
616
+ * resolved publish-history entry. Defaults to `true` when absent.
617
+ */
618
+ isUnpublishVisible?: (item: CatalogItem) => boolean;
224
619
  /**
225
620
  * Called when the credentials login form is submitted. `level` identifies
226
621
  * which credentials slot the call applies to (`USER` for the current
@@ -248,5 +643,10 @@ export interface DetailsPanelProps {
248
643
  texts?: ItemDetailsTexts;
249
644
  /** Grouped style overrides. */
250
645
  styles?: ItemDetailsStyles;
646
+ /**
647
+ * Footer note rendered below the Limits tab's rows, e.g. a link to a
648
+ * full usage-limits page. Omitted (the default) hides the footer entirely.
649
+ */
650
+ limitsFooterNote?: ReactNode;
251
651
  }
252
652
  //# sourceMappingURL=item-details-props.d.ts.map