@epam/ai-dial-catalog 1.1.0-dev.29 → 1.1.0-dev.293

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 (192) 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/CardTag/CardTag.d.ts +24 -0
  6. package/components/CardTag/CardTag.d.ts.map +1 -0
  7. package/components/Catalog/Catalog.d.ts +1 -5
  8. package/components/Catalog/Catalog.d.ts.map +1 -1
  9. package/components/Catalog/CreateButton.d.ts +2 -2
  10. package/components/Catalog/CreateButton.d.ts.map +1 -1
  11. package/components/CredentialsBadge/CredentialsBadge.d.ts +12 -5
  12. package/components/CredentialsBadge/CredentialsBadge.d.ts.map +1 -1
  13. package/components/Details/ApiDetails.d.ts +6 -2
  14. package/components/Details/ApiDetails.d.ts.map +1 -1
  15. package/components/Details/ConfirmationView/ConfirmationFooter.d.ts +29 -0
  16. package/components/Details/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
  17. package/components/Details/ConfirmationView/ConfirmationView.d.ts +28 -0
  18. package/components/Details/ConfirmationView/ConfirmationView.d.ts.map +1 -0
  19. package/components/Details/Credentials/CredentialsBanner/CredentialsBanner.d.ts +16 -0
  20. package/components/Details/Credentials/CredentialsBanner/CredentialsBanner.d.ts.map +1 -0
  21. package/components/Details/Credentials/CredentialsIdentityIcon/CredentialsIdentityIcon.d.ts +29 -0
  22. package/components/Details/Credentials/CredentialsIdentityIcon/CredentialsIdentityIcon.d.ts.map +1 -0
  23. package/components/Details/Credentials/CredentialsInfoCard/CredentialsInfoCard.d.ts +20 -0
  24. package/components/Details/Credentials/CredentialsInfoCard/CredentialsInfoCard.d.ts.map +1 -0
  25. package/components/Details/Credentials/CredentialsManagementPanel/CredentialsManagementPanel.d.ts +31 -0
  26. package/components/Details/Credentials/CredentialsManagementPanel/CredentialsManagementPanel.d.ts.map +1 -0
  27. package/components/Details/DetailsPanel.d.ts.map +1 -1
  28. package/components/Details/Header/CredentialsApiKeyOverlay/CredentialsApiKeyOverlay.d.ts +34 -0
  29. package/components/Details/Header/CredentialsApiKeyOverlay/CredentialsApiKeyOverlay.d.ts.map +1 -0
  30. package/components/Details/Header/Header.d.ts +93 -19
  31. package/components/Details/Header/Header.d.ts.map +1 -1
  32. package/components/Details/Header/ShareButton/ShareButton.d.ts +6 -0
  33. package/components/Details/Header/ShareButton/ShareButton.d.ts.map +1 -1
  34. package/components/Details/TabsContent/About.d.ts +3 -2
  35. package/components/Details/TabsContent/About.d.ts.map +1 -1
  36. package/components/Details/TabsContent/Content.d.ts +53 -0
  37. package/components/Details/TabsContent/Content.d.ts.map +1 -0
  38. package/components/Details/TabsContent/ContentFileTree/ContentFileTree.d.ts +28 -0
  39. package/components/Details/TabsContent/ContentFileTree/ContentFileTree.d.ts.map +1 -0
  40. package/components/Details/TabsContent/DataGrid/DataGrid.d.ts +1 -1
  41. package/components/Details/TabsContent/DataGrid/DataGrid.d.ts.map +1 -1
  42. package/components/Details/TabsContent/Limits.d.ts +34 -3
  43. package/components/Details/TabsContent/Limits.d.ts.map +1 -1
  44. package/components/Favorites/FavoriteCard.d.ts +9 -4
  45. package/components/Favorites/FavoriteCard.d.ts.map +1 -1
  46. package/components/Favorites/Favorites.d.ts.map +1 -1
  47. package/components/Filter/Filter.d.ts +42 -6
  48. package/components/Filter/Filter.d.ts.map +1 -1
  49. package/components/InfoCard/InfoCard.d.ts +15 -0
  50. package/components/InfoCard/InfoCard.d.ts.map +1 -0
  51. package/components/ListView/ListView.d.ts +1 -5
  52. package/components/ListView/ListView.d.ts.map +1 -1
  53. package/components/ListView/Renders/EntityTypeCellRenderer.d.ts +1 -0
  54. package/components/ListView/Renders/EntityTypeCellRenderer.d.ts.map +1 -1
  55. package/components/ListView/Renders/FolderCellRenderer.d.ts +1 -0
  56. package/components/ListView/Renders/FolderCellRenderer.d.ts.map +1 -1
  57. package/components/ListView/Renders/NameCellRenderer.d.ts +1 -0
  58. package/components/ListView/Renders/NameCellRenderer.d.ts.map +1 -1
  59. package/components/ListView/Renders/StarCellRenderer.d.ts +1 -0
  60. package/components/ListView/Renders/StarCellRenderer.d.ts.map +1 -1
  61. package/components/ListView/Renders/TagsCellRenderer.d.ts +1 -0
  62. package/components/ListView/Renders/TagsCellRenderer.d.ts.map +1 -1
  63. package/components/ListView/columns.d.ts +2 -1
  64. package/components/ListView/columns.d.ts.map +1 -1
  65. package/components/StarToggleButton/StarToggleButton.d.ts +2 -0
  66. package/components/StarToggleButton/StarToggleButton.d.ts.map +1 -1
  67. package/components/TableView/TableView.d.ts +19 -0
  68. package/components/TableView/TableView.d.ts.map +1 -1
  69. package/components/Toolbar/Rows/TitleRow.d.ts +4 -3
  70. package/components/Toolbar/Rows/TitleRow.d.ts.map +1 -1
  71. package/components/Toolbar/Toolbar.d.ts.map +1 -1
  72. package/components/TopicTag/TopicTag.d.ts +12 -7
  73. package/components/TopicTag/TopicTag.d.ts.map +1 -1
  74. package/index.css +1 -1
  75. package/index.d.ts +22 -34
  76. package/index.d.ts.map +1 -1
  77. package/index.js +59493 -22777
  78. package/models/app-identity-styles.d.ts +28 -0
  79. package/models/app-identity-styles.d.ts.map +1 -0
  80. package/models/card-props.d.ts +16 -14
  81. package/models/card-props.d.ts.map +1 -1
  82. package/models/card-row-data.d.ts +3 -1
  83. package/models/card-row-data.d.ts.map +1 -1
  84. package/models/catalog-item-credentials.d.ts +4 -0
  85. package/models/catalog-item-credentials.d.ts.map +1 -1
  86. package/models/catalog-item.d.ts +3 -6
  87. package/models/catalog-item.d.ts.map +1 -1
  88. package/models/catalog-props.d.ts +142 -33
  89. package/models/catalog-props.d.ts.map +1 -1
  90. package/models/catalog-styles.d.ts +4 -41
  91. package/models/catalog-styles.d.ts.map +1 -1
  92. package/models/favorites.d.ts +24 -8
  93. package/models/favorites.d.ts.map +1 -1
  94. package/models/grid-context.d.ts +4 -1
  95. package/models/grid-context.d.ts.map +1 -1
  96. package/models/grid-props.d.ts +11 -1
  97. package/models/grid-props.d.ts.map +1 -1
  98. package/models/item-details-data.d.ts +72 -2
  99. package/models/item-details-data.d.ts.map +1 -1
  100. package/models/item-details-props.d.ts +443 -57
  101. package/models/item-details-props.d.ts.map +1 -1
  102. package/models/item-overview.d.ts +1 -7
  103. package/models/item-overview.d.ts.map +1 -1
  104. package/models/list-props.d.ts +25 -4
  105. package/models/list-props.d.ts.map +1 -1
  106. package/models/toolbar-props.d.ts +7 -21
  107. package/models/toolbar-props.d.ts.map +1 -1
  108. package/package.json +5 -6
  109. package/types/catalog-content-type.d.ts +13 -0
  110. package/types/catalog-content-type.d.ts.map +1 -0
  111. package/types/deployment-icon-size.d.ts +5 -0
  112. package/types/deployment-icon-size.d.ts.map +1 -0
  113. package/types/detail-tab.d.ts +4 -1
  114. package/types/detail-tab.d.ts.map +1 -1
  115. package/types/details-confirmation.d.ts +28 -0
  116. package/types/details-confirmation.d.ts.map +1 -0
  117. package/types/recipients-count.d.ts +12 -0
  118. package/types/recipients-count.d.ts.map +1 -0
  119. package/types/toolset-auth.d.ts +9 -0
  120. package/types/toolset-auth.d.ts.map +1 -1
  121. package/utils/catalog-content-tree.d.ts +8 -0
  122. package/utils/catalog-content-tree.d.ts.map +1 -0
  123. package/utils/catalog-filter.d.ts +1 -0
  124. package/utils/catalog-filter.d.ts.map +1 -1
  125. package/utils/catalog-sort.d.ts +1 -8
  126. package/utils/catalog-sort.d.ts.map +1 -1
  127. package/utils/catalog-tabs.d.ts +2 -2
  128. package/utils/catalog-tabs.d.ts.map +1 -1
  129. package/utils/styles.d.ts +1 -3
  130. package/utils/styles.d.ts.map +1 -1
  131. package/utils/toolset-credentials.d.ts +6 -19
  132. package/utils/toolset-credentials.d.ts.map +1 -1
  133. package/utils/use-fav-columns.d.ts +1 -4
  134. package/utils/use-fav-columns.d.ts.map +1 -1
  135. package/utils/use-scroll-virtualizer.d.ts +1 -9
  136. package/utils/use-scroll-virtualizer.d.ts.map +1 -1
  137. package/components/Details/Credentials/CredentialsSection.d.ts +0 -21
  138. package/components/Details/Credentials/CredentialsSection.d.ts.map +0 -1
  139. package/components/Details/Header/ConnectButton/ConnectButton.d.ts +0 -25
  140. package/components/Details/Header/ConnectButton/ConnectButton.d.ts.map +0 -1
  141. package/components/Details/Header/DeleteButton/DeleteButton.d.ts +0 -25
  142. package/components/Details/Header/DeleteButton/DeleteButton.d.ts.map +0 -1
  143. package/components/Details/Summary/Limits.d.ts +0 -18
  144. package/components/Details/Summary/Limits.d.ts.map +0 -1
  145. package/components/Details/Summary/Summary.d.ts +0 -12
  146. package/components/Details/Summary/Summary.d.ts.map +0 -1
  147. package/components/EntityHeader/EntityHeader.d.ts +0 -32
  148. package/components/EntityHeader/EntityHeader.d.ts.map +0 -1
  149. package/components/EntityTypeLabel/EntityTypeLabel.d.ts +0 -16
  150. package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +0 -1
  151. package/components/FeaturedChip/FeaturedChip.d.ts +0 -11
  152. package/components/FeaturedChip/FeaturedChip.d.ts.map +0 -1
  153. package/components/FolderPath/FolderPath.d.ts +0 -25
  154. package/components/FolderPath/FolderPath.d.ts.map +0 -1
  155. package/components/ItemHeader/ItemHeader.d.ts +0 -14
  156. package/components/ItemHeader/ItemHeader.d.ts.map +0 -1
  157. package/components/PublishFoldersTree/PublishFoldersTree.d.ts +0 -72
  158. package/components/PublishFoldersTree/PublishFoldersTree.d.ts.map +0 -1
  159. package/components/PublishHistoryList/PublishHistoryList.d.ts +0 -44
  160. package/components/PublishHistoryList/PublishHistoryList.d.ts.map +0 -1
  161. package/components/PublishPanel/PublishFooter.d.ts +0 -37
  162. package/components/PublishPanel/PublishFooter.d.ts.map +0 -1
  163. package/components/PublishPanel/PublishPanel.d.ts +0 -109
  164. package/components/PublishPanel/PublishPanel.d.ts.map +0 -1
  165. package/components/PublishPanel/StandalonePublishPanel.d.ts +0 -90
  166. package/components/PublishPanel/StandalonePublishPanel.d.ts.map +0 -1
  167. package/components/SearchBar/SearchBar.d.ts +0 -29
  168. package/components/SearchBar/SearchBar.d.ts.map +0 -1
  169. package/constants/catalog-defaults.d.ts +0 -4
  170. package/constants/catalog-defaults.d.ts.map +0 -1
  171. package/constants/entity-colors.d.ts +0 -6
  172. package/constants/entity-colors.d.ts.map +0 -1
  173. package/models/entity-summary.d.ts +0 -23
  174. package/models/entity-summary.d.ts.map +0 -1
  175. package/models/publish.d.ts +0 -89
  176. package/models/publish.d.ts.map +0 -1
  177. package/models/sort.d.ts +0 -8
  178. package/models/sort.d.ts.map +0 -1
  179. package/types/entity-tag.d.ts +0 -9
  180. package/types/entity-tag.d.ts.map +0 -1
  181. package/types/entity-type.d.ts +0 -11
  182. package/types/entity-type.d.ts.map +0 -1
  183. package/utils/format-published-date.d.ts +0 -8
  184. package/utils/format-published-date.d.ts.map +0 -1
  185. package/utils/parse-about-content.d.ts +0 -32
  186. package/utils/parse-about-content.d.ts.map +0 -1
  187. package/utils/publish-folder-tree.d.ts +0 -45
  188. package/utils/publish-folder-tree.d.ts.map +0 -1
  189. package/utils/publish-state.d.ts +0 -9
  190. package/utils/publish-state.d.ts.map +0 -1
  191. package/utils/use-publish-flow.d.ts +0 -77
  192. 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,6 +35,16 @@ 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;
41
50
  /** Primary action button label. Default: `'Use in chat'`. */
@@ -50,28 +59,34 @@ export interface ItemDetailsTexts {
50
59
  hasPrimaryAction?: boolean;
51
60
  /** "Edit" action button label. Default: `'Edit'`. */
52
61
  editActionLabel?: string;
53
- /** Label above the daily-limit progress bar. Default: `'Daily limit'`. */
54
- dailyLimitLabel?: string;
62
+ /** "Download" action button label. Default: `'Download'`. */
63
+ downloadActionLabel?: string;
55
64
  /** "Resource" section heading in the API tab. Default: `'Resource'`. */
56
65
  apiResourceSectionLabel?: string;
57
66
  /** "Code snippet" section heading in the API tab. Default: `'Code snippet'`. */
58
67
  apiSnippetSectionLabel?: string;
59
68
  /** "Model ID" row label in the API tab. Default: `'Model ID'`. */
60
69
  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'`. */
70
+ /** Title shown in the single-endpoint code block's header in the Connect tab. Default: `'Endpoint'`. */
64
71
  apiEndpointLabel?: string;
72
+ /** "Endpoint" section heading above the multi-endpoint selector in the Connect tab. Default: `'Endpoint'`. */
73
+ apiEndpointSectionLabel?: string;
65
74
  /** "Request example" row label in the API tab. Default: `'Request example'`. */
66
75
  apiRequestExampleLabel?: string;
67
76
  /** "Response schema" row label in the API tab. Default: `'Response schema'`. */
68
77
  apiResponseSchemaLabel?: string;
69
78
  /** Accessible label for the copy-to-clipboard button. Default: `'Copy'`. */
70
79
  copyCodeAriaLabel?: string;
80
+ /** Message announced through the code block's live region once a copy completes. Default: `'Copied!'`. */
81
+ copiedCodeStatusLabel?: string;
71
82
  /** "Token pricing" section heading in the Pricing tab. Default: `'Token pricing'`. */
72
83
  pricingPricesSectionLabel?: string;
73
84
  /** "Usage limits" section heading in the Pricing tab. Default: `'Usage limits'`. */
74
85
  pricingLimitsSectionLabel?: string;
86
+ /** "Cost caps" section heading in the Limits tab. Default: `'Cost caps'`. */
87
+ limitsCostCapsSectionLabel?: string;
88
+ /** "Unlimited" section heading in the Limits tab. Default: `'Unlimited'`. */
89
+ limitsUnlimitedSectionLabel?: string;
75
90
  /** Accessible label for the loading placeholder shown next to the tab row while structured details are being fetched. Default: `'Loading details'`. */
76
91
  detailsLoadingAriaLabel?: string;
77
92
  /** "Log in" action button label, shown when the item's credentials are not signed in. Default: `'Log in'`. */
@@ -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'`.
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'`.
85
100
  */
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'`.
90
- */
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 {
@@ -164,6 +433,18 @@ export interface DetailsPanelProps {
164
433
  onClose: () => void;
165
434
  /** Called when the star/favorite button is toggled. */
166
435
  onToggleFavorite?: (id: string, isStarred: boolean) => void;
436
+ /**
437
+ * Additional caller-supplied rule for whether the favorite star is shown in
438
+ * the panel header. Returning `false` hides the star and makes the item
439
+ * non-favoritable from the panel. Defaults to **visible** when omitted.
440
+ */
441
+ isFavoriteVisible?: (item: CatalogItem) => boolean;
442
+ /**
443
+ * Additional caller-supplied rule for whether the "Remove from My List"
444
+ * action is shown, combined (AND) with the built-in
445
+ * `sharedWithMe`/`isMyApp` rule. Defaults to `true` when absent.
446
+ */
447
+ isUnshareVisible?: (item: CatalogItem) => boolean;
167
448
  /** Called when the "Use in chat" button is clicked. */
168
449
  onUseInChat?: (item: CatalogItem) => void;
169
450
  /** Controls whether the primary action button is shown for the item. */
@@ -172,6 +453,12 @@ export interface DetailsPanelProps {
172
453
  onShare?: (item: CatalogItem) => void;
173
454
  /** Controls whether the "Publish" action is shown for the item. */
174
455
  isPublishVisible?: (item: CatalogItem) => boolean;
456
+ /**
457
+ * Resolves whether whichever of "Publish"/"Unpublish" applies renders as its
458
+ * own button in the details header rather than an entry in its "Manage"
459
+ * menu. Defaults to `false` — the menu entry.
460
+ */
461
+ isPublishPrimary?: (item: CatalogItem) => boolean;
175
462
  /** Resolves previously published versions for an item, most recent first. */
176
463
  getPublishHistory?: (item: CatalogItem) => Promise<PublishHistoryEntry[]>;
177
464
  /** Root-level destination folder nodes offered by the publish flow. */
@@ -188,32 +475,87 @@ export interface DetailsPanelProps {
188
475
  publishLoadingPaths?: Set<string>;
189
476
  /** Resolves whether the current user can publish to a given folder path. */
190
477
  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>;
478
+ /** Called with the destination folder path and current access rules when the user confirms publish/update. */
479
+ onPublish?: (item: CatalogItem, folderPath: string[], rules: PublicationRule[]) => Promise<void>;
193
480
  /** Called after a successful publish; use this to surface a success notification. */
194
481
  onPublishSuccess?: (item: CatalogItem, folderPath: string[]) => void;
482
+ /** Called with the rejection reason when a publish request fails; use this to surface an error notification. */
483
+ onPublishError?: (item: CatalogItem, folderPath: string[], error: unknown) => void;
195
484
  /** Called when the user confirms a new folder name in the publish flow. */
196
485
  onCreatePublishFolder?: (parentPath: string[], name: string) => void;
197
486
  /** Text overrides forwarded to the publish flow. */
198
- publishTexts?: PublishPanelTexts & PublishFooterTexts;
487
+ publishLabels?: PublishPanelLabels & PublishFooterLabels;
488
+ /** Options offered in the access-rules editor's source picker. Defaults to `[]` when absent. */
489
+ ruleSourceOptions?: string[];
199
490
  /**
200
- * Renders the Share popover content anchored to the Share button. When
201
- * provided, clicking Share opens this popover instead of calling `onShare`.
491
+ * Resolves the access rules already configured for a destination folder,
492
+ * called whenever the selected folder changes. The result fully replaces
493
+ * the rules editor's contents. Omit to skip pre-filling entirely.
494
+ */
495
+ onFetchExistingRules?: (folderPath: string[]) => Promise<PublicationRule[]>;
496
+ /**
497
+ * Renders the Share popover content, anchored to whichever surface carries
498
+ * Share — the header button, or the Manage trigger when `isSharePrimary`
499
+ * has moved the entry into that menu. When provided, choosing Share opens
500
+ * this popover instead of calling `onShare`.
202
501
  */
203
502
  shareOverlay?: (item: CatalogItem, onClose: () => void) => ReactNode;
204
503
  /**
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.
504
+ * Additional caller-supplied rule for whether the "Share" action is shown
505
+ * for the item, combined (AND) with the built-in ownership/type rule.
506
+ * Absent means the built-in rule alone decides.
208
507
  */
209
- connectOverlay?: (item: CatalogItem, onClose: () => void) => ReactNode;
508
+ isShareVisible?: (item: CatalogItem) => boolean;
210
509
  /**
211
- * Controls whether the "Connect" action is shown for the item. When
212
- * absent, the Connect button is never shown.
510
+ * Resolves whether "Share" renders as its own button in the details header
511
+ * rather than an entry in its "Manage" menu. Defaults to `true` — the
512
+ * button. Returning `false` moves it into the menu, beside "Delete".
213
513
  */
214
- isConnectVisible?: (item: CatalogItem) => boolean;
514
+ isSharePrimary?: (item: CatalogItem) => boolean;
215
515
  /** Called when the "Edit" button is clicked. Shown only when the item's `isEditable` is `true`. */
216
516
  onEdit?: (item: CatalogItem) => void;
517
+ /**
518
+ * Called when the "Download" action is clicked, with no confirmation step.
519
+ * When "Download" renders in the Manage menu (see `isDownloadPrimary`), the
520
+ * panel does not await the result or show a pending state, so the host
521
+ * owns any progress and failure feedback. When "Download" is the primary
522
+ * action, the panel awaits this call and shows a pending/disabled state
523
+ * for its duration; the host still owns failure feedback either way.
524
+ */
525
+ onDownload?: (item: CatalogItem) => Promise<void> | void;
526
+ /**
527
+ * Narrows which items offer the "Download" action. Defaults to `true`
528
+ * (visible for every item) whenever `onDownload` is supplied.
529
+ */
530
+ isDownloadVisible?: (item: CatalogItem) => boolean;
531
+ /**
532
+ * Resolves whether an item's Download action renders as the primary action
533
+ * (in the same slot as "Use in chat") instead of a Manage-menu entry.
534
+ * Defaults to `item.type === CatalogEntityType.Skill`. An item whose
535
+ * Download is primary never also shows it in the Manage menu.
536
+ */
537
+ isDownloadPrimary?: (item: CatalogItem) => boolean;
538
+ /**
539
+ * Resolves the text of a file picked in the Content tab, given its opaque
540
+ * `id`. The panel shows a loading state while it is pending and renders the
541
+ * resolved text as the body; resolving `undefined` or rejecting leaves the
542
+ * body showing `texts.contentFileErrorLabel`. Superseded by
543
+ * `onLoadContentFilePreview` for a given pick when both are supplied.
544
+ */
545
+ onLoadContentFile?: (fileId: string) => Promise<string | undefined>;
546
+ /**
547
+ * Resolves a picked file's typed preview, given its opaque `id`. Takes
548
+ * precedence over `onLoadContentFile` when both are supplied. Resolving
549
+ * `undefined` or rejecting leaves the body showing
550
+ * `texts.contentFileErrorLabel`.
551
+ */
552
+ onLoadContentFilePreview?: (fileId: string) => Promise<CatalogContentFilePreview | undefined>;
553
+ /**
554
+ * Renders a picked file through a host-owned preview surface. Takes
555
+ * precedence over both loading callbacks. The file id is opaque to the
556
+ * panel; `fileName` is the basename resolved from the supplied tree.
557
+ */
558
+ renderContentFilePreview?: (fileId: string, fileName: string) => ReactNode;
217
559
  /**
218
560
  * Called immediately when the "Delete" button is clicked, with no
219
561
  * confirmation step. Shown only when the item's `isMyApp` is `true` and
@@ -221,6 +563,50 @@ export interface DetailsPanelProps {
221
563
  * button shows a disabled state while pending.
222
564
  */
223
565
  onDelete?: (item: CatalogItem) => Promise<void> | void;
566
+ /**
567
+ * Called when removal is confirmed via the confirmation popup, for an item
568
+ * shared with the current user (`sharedWithMe: true`). May return a
569
+ * promise; the popup shows a loading state and prevents duplicate
570
+ * submission while pending.
571
+ */
572
+ onUnshare?: (item: CatalogItem) => Promise<void> | void;
573
+ /**
574
+ * Called when revocation is confirmed for an item the current user owns
575
+ * (`isMyApp: true`), removing every recipient's shared access at once. May
576
+ * return a promise; the confirmation shows a loading state and prevents
577
+ * duplicate submission while pending. The item stays in the owner's
578
+ * catalog, so the panel returns to its details content on success.
579
+ */
580
+ onRevokeShare?: (item: CatalogItem) => Promise<void> | void;
581
+ /**
582
+ * Resolves how many users currently hold shared access to an owned item.
583
+ * Called when the owner opens the Manage menu, so "Revoke access" is gated
584
+ * and labelled on a count that is never stale. `0` hides the action;
585
+ * `undefined` (or a rejection) leaves it reachable without a count. Omit to
586
+ * offer the action for every owned item.
587
+ */
588
+ onFetchRecipientsCount?: (item: CatalogItem) => Promise<number | undefined>;
589
+ /**
590
+ * Additional caller-supplied rule for whether "Revoke access" is shown,
591
+ * combined (AND) with the built-in `isMyApp` rule and the recipient count.
592
+ * Defaults to `true` when absent.
593
+ */
594
+ isRevokeShareVisible?: (item: CatalogItem) => boolean;
595
+ /**
596
+ * Called when unpublish is confirmed, with the published folder's path
597
+ * segments — the same `string[]` shape `onPublish` receives. May return a
598
+ * promise; the confirmation shows a loading state and prevents duplicate
599
+ * submission while pending. The published copy survives until an
600
+ * administrator approves the request, so the panel stays open, the item
601
+ * stays visible, and cached publish history is left untouched on success.
602
+ */
603
+ onUnpublish?: (item: CatalogItem, folderPath: string[]) => Promise<void> | void;
604
+ /**
605
+ * Additional caller-supplied rule for whether "Unpublish" is shown,
606
+ * combined (AND) with the presence of `onUnpublish` and at least one
607
+ * resolved publish-history entry. Defaults to `true` when absent.
608
+ */
609
+ isUnpublishVisible?: (item: CatalogItem) => boolean;
224
610
  /**
225
611
  * Called when the credentials login form is submitted. `level` identifies
226
612
  * which credentials slot the call applies to (`USER` for the current