@redocly/theme 0.56.0-rc.2 → 0.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (870) hide show
  1. package/lib/components/Admonition/Admonition.js +21 -11
  2. package/lib/components/Badge/Badge.js +17 -7
  3. package/lib/components/Breadcrumbs/Breadcrumb.js +1 -1
  4. package/lib/components/Breadcrumbs/Breadcrumbs.js +3 -3
  5. package/lib/components/Button/Button.d.ts +1 -1
  6. package/lib/components/Button/Button.js +21 -9
  7. package/lib/components/Button/ButtonGroup.d.ts +12 -0
  8. package/lib/components/Button/ButtonGroup.js +38 -0
  9. package/lib/components/Button/variables.js +32 -5
  10. package/lib/components/Buttons/CopyButton.d.ts +2 -2
  11. package/lib/components/Buttons/CopyButton.js +22 -12
  12. package/lib/components/Buttons/EditPageButton.js +3 -3
  13. package/lib/components/Buttons/EmailButton.js +2 -2
  14. package/lib/components/Buttons/NewTabButton.js +2 -2
  15. package/lib/components/Catalog/Catalog.d.ts +2 -2
  16. package/lib/components/Catalog/Catalog.js +12 -12
  17. package/lib/components/Catalog/CatalogActionsRow.d.ts +1 -1
  18. package/lib/components/Catalog/CatalogActionsRow.js +3 -3
  19. package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +1 -1
  20. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +18 -13
  21. package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +1 -1
  22. package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +1 -1
  23. package/lib/components/Catalog/CatalogEntities.d.ts +1 -1
  24. package/lib/components/Catalog/CatalogEntities.js +24 -14
  25. package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +5 -1
  26. package/lib/components/Catalog/CatalogEntitiesEmptyState.js +25 -4
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +2 -4
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +29 -25
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +4 -2
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +15 -7
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +1 -1
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +9 -9
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +1 -1
  34. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +39 -12
  35. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.d.ts +6 -0
  36. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +47 -0
  37. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.d.ts +1 -1
  38. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +10 -3
  39. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +1 -1
  40. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +15 -9
  41. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +2 -1
  42. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +12 -5
  43. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +1 -1
  44. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +4 -4
  45. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +1 -1
  46. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +4 -4
  47. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +1 -1
  48. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +10 -5
  49. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +6 -0
  50. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +19 -0
  51. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +1 -1
  52. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +5 -5
  53. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +1 -1
  54. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +3 -3
  55. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +1 -1
  56. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +5 -4
  57. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +1 -1
  58. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +3 -3
  59. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +3 -2
  60. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +7 -13
  61. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +4 -2
  62. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +22 -16
  63. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +5 -4
  64. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +10 -10
  65. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +1 -1
  66. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +11 -11
  67. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +6 -0
  68. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +55 -0
  69. package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
  70. package/lib/components/Catalog/CatalogEntityIcon.js +26 -33
  71. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +2 -1
  72. package/lib/components/Catalog/CatalogEntityTypeIcon.js +11 -23
  73. package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +7 -0
  74. package/lib/components/Catalog/CatalogEntityTypeTag.js +40 -0
  75. package/lib/components/Catalog/CatalogPageDescription.js +5 -5
  76. package/lib/components/Catalog/CatalogSelector.d.ts +2 -2
  77. package/lib/components/Catalog/CatalogSelector.js +6 -5
  78. package/lib/components/Catalog/CatalogSortButton.d.ts +1 -1
  79. package/lib/components/Catalog/CatalogSortButton.js +28 -18
  80. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +2 -1
  81. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +1 -1
  82. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +4 -16
  83. package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.d.ts +1 -1
  84. package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.js +1 -1
  85. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +2 -1
  86. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +2 -2
  87. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +21 -15
  88. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +3 -3
  89. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +11 -38
  90. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +0 -2
  91. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +17 -42
  92. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +1 -1
  93. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +2 -1
  94. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +9 -5
  95. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +1 -1
  96. package/lib/components/Catalog/CatalogTagsWithTooltip.js +5 -5
  97. package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
  98. package/lib/components/Catalog/CatalogViewModeToggle.js +19 -9
  99. package/lib/components/Catalog/variables.js +42 -8
  100. package/lib/components/CatalogClassic/CatalogClassic.d.ts +1 -1
  101. package/lib/components/CatalogClassic/CatalogClassic.js +9 -9
  102. package/lib/components/CatalogClassic/CatalogClassicActions.d.ts +1 -1
  103. package/lib/components/CatalogClassic/CatalogClassicActions.js +22 -12
  104. package/lib/components/CatalogClassic/CatalogClassicCard.d.ts +1 -1
  105. package/lib/components/CatalogClassic/CatalogClassicCard.js +24 -14
  106. package/lib/components/CatalogClassic/CatalogClassicHighlight.js +17 -7
  107. package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +4 -4
  108. package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.d.ts +1 -1
  109. package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.js +21 -11
  110. package/lib/components/CodeBlock/CodeBlock.d.ts +17 -7
  111. package/lib/components/CodeBlock/CodeBlock.js +25 -14
  112. package/lib/components/CodeBlock/CodeBlockContainer.js +18 -8
  113. package/lib/components/CodeBlock/CodeBlockControls.d.ts +4 -3
  114. package/lib/components/CodeBlock/CodeBlockControls.js +45 -18
  115. package/lib/components/CodeBlock/CodeBlockDropdown.d.ts +3 -0
  116. package/lib/components/CodeBlock/CodeBlockDropdown.js +35 -0
  117. package/lib/components/CodeBlock/CodeBlockTabs.d.ts +2 -2
  118. package/lib/components/CodeBlock/CodeBlockTabs.js +39 -20
  119. package/lib/components/CodeBlock/variables.js +1 -1
  120. package/lib/components/ColorModeSwitcher/ColorModeIcon.js +3 -3
  121. package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +3 -3
  122. package/lib/components/Dropdown/Dropdown.js +21 -10
  123. package/lib/components/Dropdown/DropdownMenu.d.ts +1 -1
  124. package/lib/components/Dropdown/DropdownMenu.js +5 -1
  125. package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -1
  126. package/lib/components/Dropdown/DropdownMenuItem.js +18 -8
  127. package/lib/components/Dropdown/variables.js +1 -0
  128. package/lib/components/Feedback/Comment.js +20 -10
  129. package/lib/components/Feedback/Feedback.d.ts +1 -1
  130. package/lib/components/Feedback/Feedback.js +25 -15
  131. package/lib/components/Feedback/Mood.js +25 -15
  132. package/lib/components/Feedback/Rating.js +23 -13
  133. package/lib/components/Feedback/Reasons.js +18 -8
  134. package/lib/components/Feedback/ReportDialog.d.ts +1 -1
  135. package/lib/components/Feedback/ReportDialog.js +3 -3
  136. package/lib/components/Feedback/Scale.js +23 -13
  137. package/lib/components/Feedback/Sentiment.js +24 -14
  138. package/lib/components/Feedback/Stars.js +19 -9
  139. package/lib/components/Filter/Filter.d.ts +1 -1
  140. package/lib/components/Filter/Filter.js +3 -3
  141. package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
  142. package/lib/components/Filter/FilterCheckboxes.js +13 -10
  143. package/lib/components/Filter/FilterContent.d.ts +2 -2
  144. package/lib/components/Filter/FilterContent.js +22 -12
  145. package/lib/components/Filter/FilterDateRange.d.ts +1 -1
  146. package/lib/components/Filter/FilterDateRange.js +5 -5
  147. package/lib/components/Filter/FilterInput.js +19 -9
  148. package/lib/components/Filter/FilterPopover.d.ts +2 -2
  149. package/lib/components/Filter/FilterPopover.js +3 -3
  150. package/lib/components/Filter/FilterSelect.d.ts +1 -1
  151. package/lib/components/Filter/FilterSelect.js +7 -7
  152. package/lib/components/Footer/Footer.js +5 -5
  153. package/lib/components/Footer/FooterColumn.js +3 -3
  154. package/lib/components/Footer/FooterCopyright.js +2 -2
  155. package/lib/components/Footer/FooterItem.js +8 -11
  156. package/lib/components/Footer/variables.js +2 -2
  157. package/lib/components/Image/Image.js +20 -8
  158. package/lib/components/JsonViewer/JsonViewer.d.ts +1 -1
  159. package/lib/components/JsonViewer/JsonViewer.js +18 -8
  160. package/lib/components/JsonViewer/helpers.js +19 -9
  161. package/lib/components/LanguagePicker/LanguagePicker.js +7 -7
  162. package/lib/components/LastUpdated/LastUpdated.js +19 -9
  163. package/lib/components/Link/Link.js +18 -8
  164. package/lib/components/LoadMore/LoadMore.js +1 -1
  165. package/lib/components/Loaders/Loading.js +2 -2
  166. package/lib/components/Logo/Logo.d.ts +1 -1
  167. package/lib/components/Logo/Logo.js +3 -3
  168. package/lib/components/Markdown/Markdown.js +29 -19
  169. package/lib/components/Markdown/styles/headingAnchor.js +0 -1
  170. package/lib/components/Marker/Marker.d.ts +1 -1
  171. package/lib/components/Marker/Marker.js +17 -7
  172. package/lib/components/Menu/Menu.d.ts +1 -1
  173. package/lib/components/Menu/Menu.js +3 -3
  174. package/lib/components/Menu/MenuContainer.d.ts +1 -1
  175. package/lib/components/Menu/MenuContainer.js +17 -7
  176. package/lib/components/Menu/MenuItem.d.ts +1 -1
  177. package/lib/components/Menu/MenuItem.js +32 -22
  178. package/lib/components/Menu/MenuMobile.js +27 -17
  179. package/lib/components/Menu/variables.js +3 -1
  180. package/lib/components/Navbar/Navbar.js +13 -13
  181. package/lib/components/Navbar/NavbarItem.js +15 -46
  182. package/lib/components/Navbar/NavbarLogo.d.ts +1 -1
  183. package/lib/components/Navbar/NavbarLogo.js +1 -1
  184. package/lib/components/Navbar/NavbarMenu.js +2 -2
  185. package/lib/components/Navbar/variables.js +2 -2
  186. package/lib/components/PageActions/PageActions.d.ts +6 -0
  187. package/lib/components/PageActions/PageActions.js +114 -0
  188. package/lib/components/PageActions/PageActionsMenuItem.d.ts +7 -0
  189. package/lib/components/PageActions/PageActionsMenuItem.js +58 -0
  190. package/lib/components/PageActions/variables.d.ts +1 -0
  191. package/lib/components/PageActions/variables.dark.d.ts +1 -0
  192. package/lib/components/PageActions/variables.dark.js +9 -0
  193. package/lib/components/PageActions/variables.js +37 -0
  194. package/lib/components/PageNavigation/NavigationButton.js +3 -3
  195. package/lib/components/PageNavigation/NextButton.js +20 -10
  196. package/lib/components/PageNavigation/PageNavigation.js +3 -3
  197. package/lib/components/PageNavigation/PreviousButton.js +3 -3
  198. package/lib/components/Panel/Panel.d.ts +1 -1
  199. package/lib/components/Panel/Panel.js +22 -12
  200. package/lib/components/Panel/PanelBody.js +17 -7
  201. package/lib/components/Portal/Portal.js +1 -1
  202. package/lib/components/Product/Product.d.ts +1 -1
  203. package/lib/components/Product/ProductPicker.js +7 -7
  204. package/lib/components/Search/FilterFields/SearchFilterFieldSelect.d.ts +1 -1
  205. package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +20 -10
  206. package/lib/components/Search/FilterFields/SearchFilterFieldTags.d.ts +1 -1
  207. package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +1 -1
  208. package/lib/components/Search/Search.js +3 -3
  209. package/lib/components/Search/SearchAiConversationInput.js +21 -11
  210. package/lib/components/Search/SearchAiDialog.d.ts +2 -2
  211. package/lib/components/Search/SearchAiDialog.js +24 -14
  212. package/lib/components/Search/SearchAiMessage.d.ts +1 -1
  213. package/lib/components/Search/SearchAiMessage.js +7 -7
  214. package/lib/components/Search/SearchAiResponse.d.ts +1 -1
  215. package/lib/components/Search/SearchAiResponse.js +12 -12
  216. package/lib/components/Search/SearchDialog.js +40 -30
  217. package/lib/components/Search/SearchFilter.d.ts +1 -1
  218. package/lib/components/Search/SearchFilter.js +21 -11
  219. package/lib/components/Search/SearchFilterField.d.ts +1 -1
  220. package/lib/components/Search/SearchFilterField.js +5 -5
  221. package/lib/components/Search/SearchGroups.d.ts +1 -1
  222. package/lib/components/Search/SearchGroups.js +18 -8
  223. package/lib/components/Search/SearchHighlight.js +17 -7
  224. package/lib/components/Search/SearchInput.js +6 -6
  225. package/lib/components/Search/SearchItem.d.ts +1 -1
  226. package/lib/components/Search/SearchItem.js +24 -14
  227. package/lib/components/Search/SearchRecent.js +22 -12
  228. package/lib/components/Search/SearchShortcut.js +17 -7
  229. package/lib/components/Search/SearchSuggestedPages.js +20 -10
  230. package/lib/components/Search/SearchTrigger.js +21 -11
  231. package/lib/components/Segmented/Segmented.d.ts +1 -1
  232. package/lib/components/Segmented/Segmented.js +18 -8
  233. package/lib/components/Select/Select.d.ts +1 -1
  234. package/lib/components/Select/Select.js +23 -13
  235. package/lib/components/Select/SelectInput.d.ts +1 -1
  236. package/lib/components/Select/SelectInput.js +20 -10
  237. package/lib/components/Select/variables.js +2 -2
  238. package/lib/components/Sidebar/Sidebar.d.ts +1 -1
  239. package/lib/components/Sidebar/Sidebar.js +20 -10
  240. package/lib/components/SidebarActions/ChangeViewButton.d.ts +1 -1
  241. package/lib/components/SidebarActions/ChangeViewButton.js +5 -5
  242. package/lib/components/SidebarActions/SidebarActions.js +6 -6
  243. package/lib/components/SidebarActions/styled.js +18 -8
  244. package/lib/components/SkipContent/SkipContent.js +19 -9
  245. package/lib/components/Switch/Switch.js +17 -7
  246. package/lib/components/TableOfContent/TableOfContent.d.ts +1 -1
  247. package/lib/components/TableOfContent/TableOfContent.js +34 -21
  248. package/lib/components/Tag/Tag.d.ts +2 -1
  249. package/lib/components/Tag/Tag.js +5 -5
  250. package/lib/components/Tag/variables.js +14 -0
  251. package/lib/components/Tags/CounterTag.d.ts +1 -1
  252. package/lib/components/Tags/CounterTag.js +1 -1
  253. package/lib/components/Tags/HttpTag.d.ts +1 -1
  254. package/lib/components/Tags/HttpTag.js +1 -1
  255. package/lib/components/Tooltip/Tooltip.js +18 -8
  256. package/lib/components/Tooltip/TooltipWrapper.d.ts +1 -1
  257. package/lib/components/Tooltip/TooltipWrapper.js +2 -2
  258. package/lib/components/Typography/CompactTypography.d.ts +1 -1
  259. package/lib/components/Typography/CompactTypography.js +1 -1
  260. package/lib/components/Typography/H1.js +1 -1
  261. package/lib/components/Typography/H2.js +1 -1
  262. package/lib/components/Typography/H3.js +1 -1
  263. package/lib/components/Typography/H4.js +1 -1
  264. package/lib/components/UserMenu/LoginButton.js +2 -2
  265. package/lib/components/UserMenu/LogoutMenuItem.js +3 -3
  266. package/lib/components/UserMenu/UserAvatar.js +1 -1
  267. package/lib/components/UserMenu/UserInfoMenuItem.js +2 -2
  268. package/lib/components/UserMenu/UserMenu.js +9 -9
  269. package/lib/components/UserMenu/UserMenuMobile.js +4 -4
  270. package/lib/components/VersionPicker/VersionPicker.d.ts +2 -2
  271. package/lib/components/VersionPicker/VersionPicker.js +20 -10
  272. package/lib/core/constants/catalog.d.ts +1 -1
  273. package/lib/core/constants/common.d.ts +4 -0
  274. package/lib/core/constants/common.js +5 -1
  275. package/lib/core/contexts/CodeSnippetContext.d.ts +7 -0
  276. package/lib/core/contexts/CodeSnippetContext.js +23 -0
  277. package/lib/core/contexts/index.d.ts +1 -0
  278. package/lib/core/contexts/index.js +1 -0
  279. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
  280. package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
  281. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +1 -1
  282. package/lib/core/hooks/code-walkthrough/use-renderable-files.d.ts +1 -2
  283. package/lib/core/hooks/code-walkthrough/use-renderable-files.js +2 -2
  284. package/lib/core/hooks/index.d.ts +1 -0
  285. package/lib/core/hooks/index.js +1 -0
  286. package/lib/core/hooks/use-active-heading.d.ts +7 -2
  287. package/lib/core/hooks/use-active-heading.js +160 -23
  288. package/lib/core/hooks/use-active-section-id.d.ts +1 -1
  289. package/lib/core/hooks/use-active-section-id.js +2 -2
  290. package/lib/core/hooks/use-codeblock-tabs-controls.d.ts +2 -2
  291. package/lib/core/hooks/use-codeblock-tabs-controls.js +6 -6
  292. package/lib/core/hooks/use-local-state.d.ts +1 -0
  293. package/lib/core/hooks/use-local-state.js +32 -0
  294. package/lib/core/hooks/use-page-actions.d.ts +2 -0
  295. package/lib/core/hooks/use-page-actions.js +105 -0
  296. package/lib/core/hooks/use-theme-hooks.js +2 -0
  297. package/lib/core/styles/dark.js +13 -11
  298. package/lib/core/styles/global.js +40 -38
  299. package/lib/core/templates/Markdown.js +22 -12
  300. package/lib/core/types/catalog.d.ts +6 -2
  301. package/lib/core/types/hooks.d.ts +3 -2
  302. package/lib/core/types/index.d.ts +1 -0
  303. package/lib/core/types/index.js +1 -0
  304. package/lib/core/types/l10n.d.ts +1 -1
  305. package/lib/core/types/page-actions.d.ts +15 -0
  306. package/lib/core/types/page-actions.js +3 -0
  307. package/lib/core/types/search.d.ts +1 -1
  308. package/lib/core/types/sidebar.d.ts +1 -0
  309. package/lib/core/types/telemetry.d.ts +5 -20
  310. package/lib/core/utils/download-code-walkthrough.js +37 -7
  311. package/lib/core/utils/enhanced-smoothstep.d.ts +5 -0
  312. package/lib/core/utils/enhanced-smoothstep.js +15 -0
  313. package/lib/core/utils/get-file-icon.d.ts +3 -2
  314. package/lib/core/utils/get-file-icon.js +119 -29
  315. package/lib/core/utils/icon-resolver.d.ts +28 -0
  316. package/lib/core/utils/icon-resolver.js +52 -0
  317. package/lib/core/utils/index.d.ts +4 -1
  318. package/lib/core/utils/index.js +4 -1
  319. package/lib/core/utils/lang-to-name.d.ts +1 -0
  320. package/lib/core/utils/lang-to-name.js +37 -0
  321. package/lib/core/utils/{text-transform.js → string.js} +1 -1
  322. package/lib/ext/configure.d.ts +1 -1
  323. package/lib/icons/AddIcon/AddIcon.d.ts +1 -1
  324. package/lib/icons/AddIcon/AddIcon.js +1 -1
  325. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.d.ts +1 -1
  326. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +1 -1
  327. package/lib/icons/AiStarsIcon/AiStarsIcon.d.ts +1 -1
  328. package/lib/icons/AiStarsIcon/AiStarsIcon.js +1 -1
  329. package/lib/icons/ArrowDownIcon/ArrowDownIcon.d.ts +1 -1
  330. package/lib/icons/ArrowDownIcon/ArrowDownIcon.js +1 -1
  331. package/lib/icons/ArrowLeftIcon/ArrowLeftIcon.d.ts +1 -1
  332. package/lib/icons/ArrowLeftIcon/ArrowLeftIcon.js +1 -1
  333. package/lib/icons/ArrowRightIcon/ArrowRightIcon.d.ts +1 -1
  334. package/lib/icons/ArrowRightIcon/ArrowRightIcon.js +1 -1
  335. package/lib/icons/ArrowUpRightIcon/ArrowUpRightIcon.d.ts +1 -1
  336. package/lib/icons/ArrowUpRightIcon/ArrowUpRightIcon.js +1 -1
  337. package/lib/icons/AscSortIcon/AscSortIcon.d.ts +1 -1
  338. package/lib/icons/AscSortIcon/AscSortIcon.js +1 -1
  339. package/lib/icons/BareMetalServerIcon/BareMetalServerIcon.d.ts +1 -1
  340. package/lib/icons/BareMetalServerIcon/BareMetalServerIcon.js +1 -1
  341. package/lib/icons/BookmarkAddIcon/BookmarkAddIcon.d.ts +1 -1
  342. package/lib/icons/BookmarkAddIcon/BookmarkAddIcon.js +1 -1
  343. package/lib/icons/CDNIcon/CDNIcon.d.ts +14 -0
  344. package/lib/icons/CDNIcon/CDNIcon.js +48 -0
  345. package/lib/icons/CardsIcon/CardsIcon.d.ts +1 -1
  346. package/lib/icons/CardsIcon/CardsIcon.js +1 -1
  347. package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +1 -1
  348. package/lib/icons/CaretDownIcon/CaretDownIcon.js +1 -1
  349. package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +1 -1
  350. package/lib/icons/CaretUpIcon/CaretUpIcon.js +1 -1
  351. package/lib/icons/CertificateIcon/CertificateIcon.d.ts +1 -1
  352. package/lib/icons/CertificateIcon/CertificateIcon.js +1 -1
  353. package/lib/icons/CharacterIcon/CharacterIcon.d.ts +1 -1
  354. package/lib/icons/CharacterIcon/CharacterIcon.js +1 -1
  355. package/lib/icons/ChatGptIcon/ChatGptIcon.d.ts +9 -0
  356. package/lib/icons/ChatGptIcon/ChatGptIcon.js +22 -0
  357. package/lib/icons/ChatIcon/ChatIcon.d.ts +1 -1
  358. package/lib/icons/ChatIcon/ChatIcon.js +1 -1
  359. package/lib/icons/CheckboxFilledIcon/CheckboxFilledIcon.d.ts +1 -1
  360. package/lib/icons/CheckboxFilledIcon/CheckboxFilledIcon.js +1 -1
  361. package/lib/icons/CheckmarkFilledIcon/CheckmarkFilledIcon.d.ts +1 -1
  362. package/lib/icons/CheckmarkFilledIcon/CheckmarkFilledIcon.js +1 -1
  363. package/lib/icons/CheckmarkIcon/CheckmarkIcon.d.ts +1 -1
  364. package/lib/icons/CheckmarkIcon/CheckmarkIcon.js +1 -1
  365. package/lib/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.d.ts +9 -0
  366. package/lib/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.js +23 -0
  367. package/lib/icons/ChevronDownIcon/ChevronDownIcon.d.ts +1 -1
  368. package/lib/icons/ChevronDownIcon/ChevronDownIcon.js +1 -1
  369. package/lib/icons/ChevronLeftIcon/ChevronLeftIcon.d.ts +1 -1
  370. package/lib/icons/ChevronLeftIcon/ChevronLeftIcon.js +1 -1
  371. package/lib/icons/ChevronRightIcon/ChevronRightIcon.d.ts +1 -1
  372. package/lib/icons/ChevronRightIcon/ChevronRightIcon.js +1 -1
  373. package/lib/icons/ChevronSortIcon/ChevronSortIcon.js +1 -1
  374. package/lib/icons/ChevronUpIcon/ChevronUpIcon.d.ts +1 -1
  375. package/lib/icons/ChevronUpIcon/ChevronUpIcon.js +1 -1
  376. package/lib/icons/CircleDashIcon/CircleDashIcon.d.ts +1 -1
  377. package/lib/icons/CircleDashIcon/CircleDashIcon.js +1 -1
  378. package/lib/icons/ClaudeIcon/ClaudeIcon.d.ts +9 -0
  379. package/lib/icons/ClaudeIcon/ClaudeIcon.js +22 -0
  380. package/lib/icons/CleanIcon/CleanIcon.d.ts +1 -1
  381. package/lib/icons/CleanIcon/CleanIcon.js +1 -1
  382. package/lib/icons/CloseFilledIcon/CloseFilledIcon.d.ts +1 -1
  383. package/lib/icons/CloseFilledIcon/CloseFilledIcon.js +1 -1
  384. package/lib/icons/CloseIcon/CloseIcon.d.ts +1 -1
  385. package/lib/icons/CloseIcon/CloseIcon.js +1 -1
  386. package/lib/icons/CloseOutlineIcon/CloseOutlineIcon.d.ts +1 -1
  387. package/lib/icons/CloseOutlineIcon/CloseOutlineIcon.js +1 -1
  388. package/lib/icons/CloudUploadIcon/CloudUploadIcon.d.ts +1 -1
  389. package/lib/icons/CloudUploadIcon/CloudUploadIcon.js +1 -1
  390. package/lib/icons/CodeIcon/CodeIcon.d.ts +1 -1
  391. package/lib/icons/CodeIcon/CodeIcon.js +1 -1
  392. package/lib/icons/ContrastIcon/ContrastIcon.d.ts +1 -1
  393. package/lib/icons/ContrastIcon/ContrastIcon.js +1 -1
  394. package/lib/icons/CookieIcon/CookieIcon.d.ts +1 -1
  395. package/lib/icons/CookieIcon/CookieIcon.js +1 -1
  396. package/lib/icons/CopyIcon/CopyIcon.d.ts +1 -1
  397. package/lib/icons/CopyIcon/CopyIcon.js +1 -1
  398. package/lib/icons/CopyLinkIcon/CopyLinkIcon.d.ts +1 -1
  399. package/lib/icons/CopyLinkIcon/CopyLinkIcon.js +1 -1
  400. package/lib/icons/CurveAutoColonIcon/CurveAutoColonIcon.d.ts +1 -1
  401. package/lib/icons/CurveAutoColonIcon/CurveAutoColonIcon.js +1 -1
  402. package/lib/icons/DataFormatIcon/DataFormatIcon.d.ts +1 -1
  403. package/lib/icons/DataFormatIcon/DataFormatIcon.js +1 -1
  404. package/lib/icons/DataRefineryIcon/DataRefineryIcon.d.ts +1 -1
  405. package/lib/icons/DataRefineryIcon/DataRefineryIcon.js +1 -1
  406. package/lib/icons/DatabaseIcon/DatabaseIcon.d.ts +1 -1
  407. package/lib/icons/DatabaseIcon/DatabaseIcon.js +1 -1
  408. package/lib/icons/DescSortIcon/DescSortIcon.d.ts +1 -1
  409. package/lib/icons/DescSortIcon/DescSortIcon.js +1 -1
  410. package/lib/icons/DeselectIcon/DeselectIcon.d.ts +1 -1
  411. package/lib/icons/DeselectIcon/DeselectIcon.js +1 -1
  412. package/lib/icons/DocumentAddIcon/DocumentAddIcon.d.ts +1 -1
  413. package/lib/icons/DocumentAddIcon/DocumentAddIcon.js +1 -1
  414. package/lib/icons/DocumentBlankIcon/DocumentBlankIcon.d.ts +1 -1
  415. package/lib/icons/DocumentBlankIcon/DocumentBlankIcon.js +1 -1
  416. package/lib/icons/DocumentCssIcon/DocumentCssIcon.d.ts +1 -1
  417. package/lib/icons/DocumentCssIcon/DocumentCssIcon.js +1 -1
  418. package/lib/icons/DocumentCssIcon/index.d.ts +1 -1
  419. package/lib/icons/DocumentCssIcon/index.js +1 -1
  420. package/lib/icons/DocumentGraphqlIcon/DocumentGraphqlIcon.d.ts +1 -1
  421. package/lib/icons/DocumentGraphqlIcon/DocumentGraphqlIcon.js +1 -1
  422. package/lib/icons/DocumentGraphqlIcon/index.d.ts +1 -1
  423. package/lib/icons/DocumentGraphqlIcon/index.js +1 -1
  424. package/lib/icons/DocumentHtmlIcon/DocumentHtmlIcon.d.ts +1 -1
  425. package/lib/icons/DocumentHtmlIcon/DocumentHtmlIcon.js +1 -1
  426. package/lib/icons/DocumentHtmlIcon/index.d.ts +1 -1
  427. package/lib/icons/DocumentHtmlIcon/index.js +1 -1
  428. package/lib/icons/DocumentIcon/DocumentIcon.d.ts +1 -1
  429. package/lib/icons/DocumentIcon/DocumentIcon.js +1 -1
  430. package/lib/icons/DocumentIcon/index.d.ts +1 -1
  431. package/lib/icons/DocumentIcon/index.js +1 -1
  432. package/lib/icons/DocumentJavaIcon/DocumentJavaIcon.d.ts +1 -1
  433. package/lib/icons/DocumentJavaIcon/DocumentJavaIcon.js +1 -1
  434. package/lib/icons/DocumentJavaIcon/index.d.ts +1 -1
  435. package/lib/icons/DocumentJavaIcon/index.js +1 -1
  436. package/lib/icons/DocumentJsIcon/DocumentJsIcon.d.ts +1 -1
  437. package/lib/icons/DocumentJsIcon/DocumentJsIcon.js +1 -1
  438. package/lib/icons/DocumentJsIcon/index.d.ts +1 -1
  439. package/lib/icons/DocumentJsIcon/index.js +1 -1
  440. package/lib/icons/DocumentJsonIcon/DocumentJsonIcon.d.ts +1 -1
  441. package/lib/icons/DocumentJsonIcon/DocumentJsonIcon.js +1 -1
  442. package/lib/icons/DocumentJsonIcon/index.d.ts +1 -1
  443. package/lib/icons/DocumentJsonIcon/index.js +1 -1
  444. package/lib/icons/DocumentMarkdownIcon/DocumentMarkdownIcon.d.ts +1 -1
  445. package/lib/icons/DocumentMarkdownIcon/DocumentMarkdownIcon.js +1 -1
  446. package/lib/icons/DocumentMarkdownIcon/index.d.ts +1 -1
  447. package/lib/icons/DocumentMarkdownIcon/index.js +1 -1
  448. package/lib/icons/DocumentPythonIcon/DocumentPythonIcon.d.ts +1 -1
  449. package/lib/icons/DocumentPythonIcon/DocumentPythonIcon.js +1 -1
  450. package/lib/icons/DocumentPythonIcon/index.d.ts +1 -1
  451. package/lib/icons/DocumentPythonIcon/index.js +1 -1
  452. package/lib/icons/DocumentReactIcon/DocumentReactIcon.d.ts +1 -1
  453. package/lib/icons/DocumentReactIcon/DocumentReactIcon.js +1 -1
  454. package/lib/icons/DocumentReactIcon/index.d.ts +1 -1
  455. package/lib/icons/DocumentReactIcon/index.js +1 -1
  456. package/lib/icons/DocumentShellIcon/DocumentShellIcon.d.ts +1 -1
  457. package/lib/icons/DocumentShellIcon/DocumentShellIcon.js +1 -1
  458. package/lib/icons/DocumentShellIcon/index.d.ts +1 -1
  459. package/lib/icons/DocumentShellIcon/index.js +1 -1
  460. package/lib/icons/DocumentTsIcon/DocumentTsIcon.d.ts +1 -1
  461. package/lib/icons/DocumentTsIcon/DocumentTsIcon.js +1 -1
  462. package/lib/icons/DocumentTsIcon/index.d.ts +1 -1
  463. package/lib/icons/DocumentTsIcon/index.js +1 -1
  464. package/lib/icons/DocumentYamlIcon/DocumentYamlIcon.d.ts +1 -1
  465. package/lib/icons/DocumentYamlIcon/DocumentYamlIcon.js +1 -1
  466. package/lib/icons/DocumentYamlIcon/index.d.ts +1 -1
  467. package/lib/icons/DocumentYamlIcon/index.js +1 -1
  468. package/lib/icons/DownloadIcon/DownloadIcon.d.ts +1 -1
  469. package/lib/icons/DownloadIcon/DownloadIcon.js +1 -1
  470. package/lib/icons/DraggableIcon/DraggableIcon.d.ts +1 -1
  471. package/lib/icons/DraggableIcon/DraggableIcon.js +1 -1
  472. package/lib/icons/EditIcon/EditIcon.d.ts +1 -1
  473. package/lib/icons/EditIcon/EditIcon.js +1 -1
  474. package/lib/icons/EmailIcon/EmailIcon.d.ts +1 -1
  475. package/lib/icons/EmailIcon/EmailIcon.js +1 -1
  476. package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +1 -1
  477. package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +1 -1
  478. package/lib/icons/ErrorFilledIcon/ErrorFilledIcon.d.ts +1 -1
  479. package/lib/icons/ErrorFilledIcon/ErrorFilledIcon.js +1 -1
  480. package/lib/icons/ErrorIcon/ErrorIcon.d.ts +1 -1
  481. package/lib/icons/ErrorIcon/ErrorIcon.js +1 -1
  482. package/lib/icons/ExportIcon/ExportIcon.d.ts +1 -1
  483. package/lib/icons/ExportIcon/ExportIcon.js +1 -1
  484. package/lib/icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon.d.ts +1 -1
  485. package/lib/icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon.js +1 -1
  486. package/lib/icons/FaceNeutralIcon/FaceNeutralIcon.d.ts +1 -1
  487. package/lib/icons/FaceNeutralIcon/FaceNeutralIcon.js +1 -1
  488. package/lib/icons/FaceSatisfiedIcon/FaceSatisfiedIcon.d.ts +1 -1
  489. package/lib/icons/FaceSatisfiedIcon/FaceSatisfiedIcon.js +1 -1
  490. package/lib/icons/FileIcon/FileIcon.d.ts +1 -1
  491. package/lib/icons/FileIcon/FileIcon.js +1 -1
  492. package/lib/icons/FileStorageIcon/FileStorageIcon.d.ts +1 -1
  493. package/lib/icons/FileStorageIcon/FileStorageIcon.js +1 -1
  494. package/lib/icons/FilterIcon/FilterIcon.d.ts +1 -1
  495. package/lib/icons/FilterIcon/FilterIcon.js +1 -1
  496. package/lib/icons/FlowIcon/FlowIcon.d.ts +1 -1
  497. package/lib/icons/FlowIcon/FlowIcon.js +1 -1
  498. package/lib/icons/FolderAddIcon/FolderAddIcon.d.ts +1 -1
  499. package/lib/icons/FolderAddIcon/FolderAddIcon.js +1 -1
  500. package/lib/icons/FolderIcon/FolderIcon.d.ts +1 -1
  501. package/lib/icons/FolderIcon/FolderIcon.js +1 -1
  502. package/lib/icons/FolderMoveToIcon/FolderMoveToIcon.d.ts +1 -1
  503. package/lib/icons/FolderMoveToIcon/FolderMoveToIcon.js +1 -1
  504. package/lib/icons/GenericIcon/GenericIcon.d.ts +11 -0
  505. package/lib/icons/GenericIcon/GenericIcon.js +76 -0
  506. package/lib/icons/GithubIcon/GithubIcon.d.ts +1 -1
  507. package/lib/icons/GithubIcon/GithubIcon.js +1 -1
  508. package/lib/icons/GlobalOutlinedIcon/GlobalOutlinedIcon.d.ts +1 -1
  509. package/lib/icons/GlobalOutlinedIcon/GlobalOutlinedIcon.js +1 -1
  510. package/lib/icons/GraphIcon/GraphIcon.d.ts +1 -1
  511. package/lib/icons/GraphIcon/GraphIcon.js +1 -1
  512. package/lib/icons/GraphqlIcon/GraphqlIcon.d.ts +9 -0
  513. package/lib/icons/GraphqlIcon/GraphqlIcon.js +36 -0
  514. package/lib/icons/GraphqlIcon/index.d.ts +1 -0
  515. package/lib/icons/GraphqlIcon/index.js +6 -0
  516. package/lib/icons/GridIcon/GridIcon.d.ts +1 -1
  517. package/lib/icons/GridIcon/GridIcon.js +1 -1
  518. package/lib/icons/HexagonIcon/HexagonIcon.d.ts +9 -0
  519. package/lib/icons/HexagonIcon/HexagonIcon.js +22 -0
  520. package/lib/icons/HorizontalViewIcon/HorizontalViewIcon.d.ts +1 -1
  521. package/lib/icons/HorizontalViewIcon/HorizontalViewIcon.js +1 -1
  522. package/lib/icons/IBMCloudHyperProtectCryptoServicesIcon/IBMCloudHyperProtectCryptoServicesIcon.d.ts +1 -1
  523. package/lib/icons/IBMCloudHyperProtectCryptoServicesIcon/IBMCloudHyperProtectCryptoServicesIcon.js +1 -1
  524. package/lib/icons/InformationFilledIcon/InformationFilledIcon.d.ts +1 -1
  525. package/lib/icons/InformationFilledIcon/InformationFilledIcon.js +1 -1
  526. package/lib/icons/InformationIcon/InformationIcon.d.ts +1 -1
  527. package/lib/icons/InformationIcon/InformationIcon.js +1 -1
  528. package/lib/icons/JsonIcon/JsonIcon.d.ts +1 -1
  529. package/lib/icons/JsonIcon/JsonIcon.js +1 -1
  530. package/lib/icons/KafkaIcon/KafkaIcon.d.ts +1 -1
  531. package/lib/icons/KafkaIcon/KafkaIcon.js +1 -1
  532. package/lib/icons/LaunchIcon/LaunchIcon.d.ts +1 -1
  533. package/lib/icons/LaunchIcon/LaunchIcon.js +1 -1
  534. package/lib/icons/LinkIcon/LinkIcon.d.ts +1 -1
  535. package/lib/icons/LinkIcon/LinkIcon.js +1 -1
  536. package/lib/icons/LogoutIcon/LogoutIcon.d.ts +1 -1
  537. package/lib/icons/LogoutIcon/LogoutIcon.js +1 -1
  538. package/lib/icons/MarkdownFullIcon/MarkdownFullIcon.d.ts +9 -0
  539. package/lib/icons/MarkdownFullIcon/MarkdownFullIcon.js +23 -0
  540. package/lib/icons/MaximizeIcon/MaximizeIcon.d.ts +1 -1
  541. package/lib/icons/MaximizeIcon/MaximizeIcon.js +1 -1
  542. package/lib/icons/MenuIcon/MenuIcon.d.ts +1 -1
  543. package/lib/icons/MenuIcon/MenuIcon.js +1 -1
  544. package/lib/icons/MinimizeIcon/MinimizeIcon.d.ts +1 -1
  545. package/lib/icons/MinimizeIcon/MinimizeIcon.js +1 -1
  546. package/lib/icons/MobileSidebarIcon/MobileSidebarIcon.d.ts +1 -1
  547. package/lib/icons/MobileSidebarIcon/MobileSidebarIcon.js +1 -1
  548. package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +9 -0
  549. package/lib/icons/MoleculesIcon/MoleculesIcon.js +22 -0
  550. package/lib/icons/MoonIcon/MoonIcon.d.ts +1 -1
  551. package/lib/icons/MoonIcon/MoonIcon.js +1 -1
  552. package/lib/icons/NetworkIcon/NetworkIcon.d.ts +9 -0
  553. package/lib/icons/NetworkIcon/NetworkIcon.js +23 -0
  554. package/lib/icons/NoneIcon/NoneIcon.d.ts +9 -0
  555. package/lib/icons/NoneIcon/NoneIcon.js +17 -0
  556. package/lib/icons/NotesIcon/NotesIcon.d.ts +9 -0
  557. package/lib/icons/NotesIcon/NotesIcon.js +26 -0
  558. package/lib/icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon.d.ts +1 -1
  559. package/lib/icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon.js +1 -1
  560. package/lib/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon.d.ts +1 -1
  561. package/lib/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon.js +1 -1
  562. package/lib/icons/PeopleIcon/PeopleIcon.d.ts +1 -1
  563. package/lib/icons/PeopleIcon/PeopleIcon.js +1 -1
  564. package/lib/icons/PlaylistIcon/PlaylistIcon.d.ts +1 -1
  565. package/lib/icons/PlaylistIcon/PlaylistIcon.js +1 -1
  566. package/lib/icons/PlusCustomIcon/PlusCustomIcon.d.ts +1 -1
  567. package/lib/icons/PlusCustomIcon/PlusCustomIcon.js +1 -1
  568. package/lib/icons/RabbitMQIcon/RabbitMQIcon.d.ts +1 -1
  569. package/lib/icons/RabbitMQIcon/RabbitMQIcon.js +1 -1
  570. package/lib/icons/RecentlyViewedIcon/RecentlyViewedIcon.d.ts +1 -1
  571. package/lib/icons/RecentlyViewedIcon/RecentlyViewedIcon.js +1 -1
  572. package/lib/icons/RenewIcon/RenewIcon.d.ts +1 -1
  573. package/lib/icons/RenewIcon/RenewIcon.js +1 -1
  574. package/lib/icons/ResetIcon/ResetIcon.d.ts +1 -1
  575. package/lib/icons/ResetIcon/ResetIcon.js +1 -1
  576. package/lib/icons/RestartIcon/RestartIcon.d.ts +1 -1
  577. package/lib/icons/RestartIcon/RestartIcon.js +1 -1
  578. package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.d.ts +1 -1
  579. package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.js +1 -1
  580. package/lib/icons/RocketIcon/RocketIcon.d.ts +1 -1
  581. package/lib/icons/RocketIcon/RocketIcon.js +1 -1
  582. package/lib/icons/SaveIcon/SaveIcon.d.ts +1 -1
  583. package/lib/icons/SaveIcon/SaveIcon.js +1 -1
  584. package/lib/icons/SearchIcon/SearchIcon.d.ts +1 -1
  585. package/lib/icons/SearchIcon/SearchIcon.js +1 -1
  586. package/lib/icons/SecurityIcon/SecurityIcon.d.ts +1 -1
  587. package/lib/icons/SecurityIcon/SecurityIcon.js +1 -1
  588. package/lib/icons/SelectIcon/SelectIcon.d.ts +1 -1
  589. package/lib/icons/SelectIcon/SelectIcon.js +1 -1
  590. package/lib/icons/SendIcon/SendIcon.d.ts +1 -1
  591. package/lib/icons/SendIcon/SendIcon.js +1 -1
  592. package/lib/icons/SettingsCogIcon/SettingsCogIcon.d.ts +1 -1
  593. package/lib/icons/SettingsCogIcon/SettingsCogIcon.js +1 -1
  594. package/lib/icons/SettingsIcon/SettingsIcon.d.ts +1 -1
  595. package/lib/icons/SettingsIcon/SettingsIcon.js +1 -1
  596. package/lib/icons/SidePanelCloseIcon/SidePanelCloseIcon.d.ts +1 -1
  597. package/lib/icons/SidePanelCloseIcon/SidePanelCloseIcon.js +1 -1
  598. package/lib/icons/SidePanelOpenIcon/SidePanelOpenIcon.d.ts +1 -1
  599. package/lib/icons/SidePanelOpenIcon/SidePanelOpenIcon.js +1 -1
  600. package/lib/icons/SlackIcon/SlackIcon.d.ts +1 -1
  601. package/lib/icons/SlackIcon/SlackIcon.js +1 -1
  602. package/lib/icons/SortIcon/SortIcon.d.ts +1 -1
  603. package/lib/icons/SortIcon/SortIcon.js +1 -1
  604. package/lib/icons/Spinner/Spinner.d.ts +1 -1
  605. package/lib/icons/Spinner/Spinner.js +18 -8
  606. package/lib/icons/SpinnerIcon/SpinnerIcon.d.ts +1 -1
  607. package/lib/icons/SpinnerIcon/SpinnerIcon.js +1 -1
  608. package/lib/icons/StarFilledIcon/StarFilledIcon.d.ts +1 -1
  609. package/lib/icons/StarFilledIcon/StarFilledIcon.js +1 -1
  610. package/lib/icons/StarIcon/StarIcon.d.ts +1 -1
  611. package/lib/icons/StarIcon/StarIcon.js +1 -1
  612. package/lib/icons/SubtractIcon/SubtractIcon.d.ts +1 -1
  613. package/lib/icons/SubtractIcon/SubtractIcon.js +1 -1
  614. package/lib/icons/SunIcon/SunIcon.d.ts +1 -1
  615. package/lib/icons/SunIcon/SunIcon.js +1 -1
  616. package/lib/icons/TableBuiltIcon/TableBuiltIcon.d.ts +1 -1
  617. package/lib/icons/TableBuiltIcon/TableBuiltIcon.js +1 -1
  618. package/lib/icons/TableIcon/TableIcon.d.ts +1 -1
  619. package/lib/icons/TableIcon/TableIcon.js +1 -1
  620. package/lib/icons/TagsIcon/TagsIcon.d.ts +1 -1
  621. package/lib/icons/TagsIcon/TagsIcon.js +1 -1
  622. package/lib/icons/TaskViewIcon/TaskViewIcon.d.ts +1 -1
  623. package/lib/icons/TaskViewIcon/TaskViewIcon.js +1 -1
  624. package/lib/icons/TimeIcon/TimeIcon.d.ts +1 -1
  625. package/lib/icons/TimeIcon/TimeIcon.js +1 -1
  626. package/lib/icons/TrashCanIcon/TrashCanIcon.d.ts +1 -1
  627. package/lib/icons/TrashCanIcon/TrashCanIcon.js +1 -1
  628. package/lib/icons/UserIcon/UserIcon.d.ts +1 -1
  629. package/lib/icons/UserIcon/UserIcon.js +1 -1
  630. package/lib/icons/ValueVariableIcon/ValueVariableIcon.d.ts +1 -1
  631. package/lib/icons/ValueVariableIcon/ValueVariableIcon.js +1 -1
  632. package/lib/icons/VerticalViewIcon/VerticalViewIcon.d.ts +1 -1
  633. package/lib/icons/VerticalViewIcon/VerticalViewIcon.js +1 -1
  634. package/lib/icons/ViewIcon/ViewIcon.d.ts +1 -1
  635. package/lib/icons/ViewIcon/ViewIcon.js +1 -1
  636. package/lib/icons/ViewOffIcon/ViewOffIcon.d.ts +1 -1
  637. package/lib/icons/ViewOffIcon/ViewOffIcon.js +1 -1
  638. package/lib/icons/WarningAltFilled/WarningAltFilled.d.ts +1 -1
  639. package/lib/icons/WarningAltFilled/WarningAltFilled.js +1 -1
  640. package/lib/icons/WarningAltFilledIcon/WarningAltFilledIcon.d.ts +1 -1
  641. package/lib/icons/WarningAltFilledIcon/WarningAltFilledIcon.js +1 -1
  642. package/lib/icons/WarningAltIcon/WarningAltIcon.d.ts +1 -1
  643. package/lib/icons/WarningAltIcon/WarningAltIcon.js +1 -1
  644. package/lib/icons/WarningFilledIcon/WarningFilledIcon.d.ts +1 -1
  645. package/lib/icons/WarningFilledIcon/WarningFilledIcon.js +1 -1
  646. package/lib/icons/WarningSquareIcon/WarningSquareIcon.d.ts +1 -1
  647. package/lib/icons/WarningSquareIcon/WarningSquareIcon.js +1 -1
  648. package/lib/icons/WorkflowAutomationIcon/WorkflowAutomationIcon.d.ts +1 -1
  649. package/lib/icons/WorkflowAutomationIcon/WorkflowAutomationIcon.js +1 -1
  650. package/lib/icons/types.d.ts +6 -0
  651. package/lib/index.d.ts +267 -261
  652. package/lib/index.js +284 -268
  653. package/lib/layouts/CodeWalkthroughLayout.js +2 -2
  654. package/lib/layouts/DocumentationLayout.js +19 -15
  655. package/lib/layouts/Forbidden.js +2 -2
  656. package/lib/layouts/InternalServerErrorLayout.js +3 -3
  657. package/lib/layouts/NotFound.js +3 -3
  658. package/lib/layouts/OIDCForbidden.js +18 -8
  659. package/lib/layouts/PageLayout.js +2 -2
  660. package/lib/layouts/RootLayout.js +3 -3
  661. package/lib/layouts/ThreePanelLayout.js +18 -8
  662. package/lib/markdoc/components/Admonition/Admonition.d.ts +1 -1
  663. package/lib/markdoc/components/Admonition/Admonition.js +1 -1
  664. package/lib/markdoc/components/Cards/Card.js +4 -4
  665. package/lib/markdoc/components/Cards/CardIcon.js +7 -19
  666. package/lib/markdoc/components/Cards/Cards.js +17 -7
  667. package/lib/markdoc/components/CodeBlock/CodeBlock.d.ts +1 -1
  668. package/lib/markdoc/components/CodeBlock/CodeBlock.js +1 -1
  669. package/lib/markdoc/components/CodeGroup/CodeGroup.d.ts +4 -0
  670. package/lib/markdoc/components/CodeGroup/CodeGroup.js +82 -0
  671. package/lib/markdoc/components/CodeWalkthrough/CodeContainer.js +19 -9
  672. package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
  673. package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +23 -13
  674. package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +31 -18
  675. package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.js +20 -10
  676. package/lib/markdoc/components/CodeWalkthrough/CodePanelToolbar.js +19 -9
  677. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +19 -9
  678. package/lib/markdoc/components/CodeWalkthrough/CodeToggle.js +20 -10
  679. package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +21 -11
  680. package/lib/markdoc/components/CodeWalkthrough/Input.js +18 -8
  681. package/lib/markdoc/components/Heading/Heading.d.ts +2 -1
  682. package/lib/markdoc/components/Heading/Heading.js +39 -11
  683. package/lib/markdoc/components/HtmlBlock/HtmlBlock.js +17 -7
  684. package/lib/markdoc/components/Icon/Icon.d.ts +3 -0
  685. package/lib/markdoc/components/Icon/Icon.js +29 -0
  686. package/lib/markdoc/components/Image/Image.d.ts +1 -1
  687. package/lib/markdoc/components/Image/Image.js +1 -1
  688. package/lib/markdoc/components/InlineSvg/InlineSvg.js +17 -7
  689. package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +18 -8
  690. package/lib/markdoc/components/Mermaid/Mermaid.js +1 -1
  691. package/lib/markdoc/components/Tabs/Tab.d.ts +3 -2
  692. package/lib/markdoc/components/Tabs/Tab.js +6 -3
  693. package/lib/markdoc/components/Tabs/TabList.d.ts +2 -2
  694. package/lib/markdoc/components/Tabs/TabList.js +22 -12
  695. package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -1
  696. package/lib/markdoc/components/Tabs/Tabs.js +19 -9
  697. package/lib/markdoc/components/Tabs/variables.js +2 -0
  698. package/lib/markdoc/components/default.d.ts +22 -20
  699. package/lib/markdoc/components/default.js +22 -20
  700. package/lib/markdoc/default.d.ts +6 -6
  701. package/lib/markdoc/default.js +43 -29
  702. package/lib/markdoc/tags/admonition.d.ts +1 -1
  703. package/lib/markdoc/tags/card.d.ts +1 -1
  704. package/lib/markdoc/tags/card.js +2 -2
  705. package/lib/markdoc/tags/cards.d.ts +1 -1
  706. package/lib/markdoc/tags/code-group.d.ts +2 -0
  707. package/lib/markdoc/tags/code-group.js +23 -0
  708. package/lib/markdoc/tags/code-snippet.d.ts +1 -1
  709. package/lib/markdoc/tags/code-snippet.js +2 -2
  710. package/lib/markdoc/tags/code-step.d.ts +1 -1
  711. package/lib/markdoc/tags/code-toggle.d.ts +1 -1
  712. package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
  713. package/lib/markdoc/tags/code-walkthrough.js +3 -3
  714. package/lib/markdoc/tags/debug.d.ts +1 -1
  715. package/lib/markdoc/tags/html.d.ts +1 -1
  716. package/lib/markdoc/tags/icon.d.ts +2 -0
  717. package/lib/markdoc/tags/icon.js +16 -0
  718. package/lib/markdoc/tags/img.d.ts +1 -1
  719. package/lib/markdoc/tags/inline-svg.d.ts +1 -1
  720. package/lib/markdoc/tags/inline-svg.js +1 -1
  721. package/lib/markdoc/tags/input.d.ts +1 -1
  722. package/lib/markdoc/tags/markdoc-example.d.ts +1 -1
  723. package/lib/markdoc/tags/partial.d.ts +1 -1
  724. package/lib/markdoc/tags/partial.js +2 -2
  725. package/lib/markdoc/tags/tab.d.ts +1 -1
  726. package/lib/markdoc/tags/tab.js +1 -0
  727. package/lib/markdoc/tags/tabs.d.ts +1 -1
  728. package/lib/markdoc/tags/tabs.js +1 -1
  729. package/package.json +4 -4
  730. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  731. package/src/components/Button/Button.tsx +4 -2
  732. package/src/components/Button/ButtonGroup.tsx +53 -0
  733. package/src/components/Button/variables.ts +32 -5
  734. package/src/components/Catalog/Catalog.tsx +1 -1
  735. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +12 -6
  736. package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -4
  737. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +25 -17
  738. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +25 -9
  739. package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +12 -15
  740. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +39 -2
  741. package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +61 -0
  742. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +12 -1
  743. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +7 -1
  744. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +15 -4
  745. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +5 -1
  746. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +2 -3
  747. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +11 -3
  748. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +37 -0
  749. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +1 -1
  750. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +2 -0
  751. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +7 -23
  752. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +5 -6
  753. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +21 -13
  754. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +9 -2
  755. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +52 -0
  756. package/src/components/Catalog/CatalogEntityIcon.tsx +33 -33
  757. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +23 -28
  758. package/src/components/Catalog/CatalogEntityTypeTag.tsx +49 -0
  759. package/src/components/Catalog/CatalogPageDescription.tsx +5 -4
  760. package/src/components/Catalog/CatalogSelector.tsx +3 -1
  761. package/src/components/Catalog/CatalogSortButton.tsx +19 -20
  762. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +1 -0
  763. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +3 -17
  764. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +1 -0
  765. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +5 -8
  766. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +6 -36
  767. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +18 -46
  768. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +1 -0
  769. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +9 -4
  770. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +9 -5
  771. package/src/components/Catalog/CatalogViewModeToggle.tsx +1 -1
  772. package/src/components/Catalog/variables.ts +42 -8
  773. package/src/components/CodeBlock/CodeBlock.tsx +15 -5
  774. package/src/components/CodeBlock/CodeBlockControls.tsx +67 -26
  775. package/src/components/CodeBlock/CodeBlockDropdown.tsx +53 -0
  776. package/src/components/CodeBlock/CodeBlockTabs.tsx +29 -20
  777. package/src/components/CodeBlock/variables.ts +1 -1
  778. package/src/components/Dropdown/Dropdown.tsx +1 -0
  779. package/src/components/Dropdown/DropdownMenu.tsx +4 -0
  780. package/src/components/Dropdown/variables.ts +1 -0
  781. package/src/components/Feedback/Feedback.tsx +1 -1
  782. package/src/components/Filter/FilterCheckboxes.tsx +9 -2
  783. package/src/components/Footer/FooterItem.tsx +5 -12
  784. package/src/components/Footer/variables.ts +2 -2
  785. package/src/components/Image/Image.tsx +2 -0
  786. package/src/components/Markdown/Markdown.tsx +3 -3
  787. package/src/components/Markdown/styles/headingAnchor.ts +0 -1
  788. package/src/components/Menu/MenuItem.tsx +5 -5
  789. package/src/components/Menu/variables.ts +3 -1
  790. package/src/components/Navbar/NavbarItem.tsx +8 -17
  791. package/src/components/Navbar/variables.ts +2 -2
  792. package/src/components/PageActions/PageActions.tsx +110 -0
  793. package/src/components/PageActions/PageActionsMenuItem.tsx +73 -0
  794. package/src/components/PageActions/variables.dark.ts +6 -0
  795. package/src/components/PageActions/variables.ts +34 -0
  796. package/src/components/Search/SearchDialog.tsx +2 -2
  797. package/src/components/Select/variables.ts +2 -2
  798. package/src/components/TableOfContent/TableOfContent.tsx +33 -36
  799. package/src/components/Tag/Tag.tsx +11 -2
  800. package/src/components/Tag/variables.ts +14 -0
  801. package/src/core/constants/catalog.ts +1 -1
  802. package/src/core/constants/common.ts +4 -0
  803. package/src/core/contexts/CodeSnippetContext.tsx +31 -0
  804. package/src/core/contexts/index.ts +1 -0
  805. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  806. package/src/core/hooks/code-walkthrough/use-renderable-files.ts +3 -4
  807. package/src/core/hooks/index.ts +1 -0
  808. package/src/core/hooks/use-active-heading.ts +199 -28
  809. package/src/core/hooks/use-active-section-id.ts +2 -1
  810. package/src/core/hooks/use-codeblock-tabs-controls.ts +8 -8
  811. package/src/core/hooks/use-local-state.ts +30 -0
  812. package/src/core/hooks/use-page-actions.ts +119 -0
  813. package/src/core/hooks/use-theme-hooks.ts +2 -0
  814. package/src/core/styles/dark.ts +2 -1
  815. package/src/core/styles/global.ts +2 -0
  816. package/src/core/types/catalog.ts +5 -1
  817. package/src/core/types/hooks.ts +2 -0
  818. package/src/core/types/index.ts +1 -0
  819. package/src/core/types/l10n.ts +21 -0
  820. package/src/core/types/page-actions.ts +18 -0
  821. package/src/core/types/sidebar.ts +1 -0
  822. package/src/core/types/telemetry.ts +5 -13
  823. package/src/core/utils/download-code-walkthrough.ts +5 -4
  824. package/src/core/utils/enhanced-smoothstep.ts +14 -0
  825. package/src/core/utils/get-file-icon.tsx +94 -0
  826. package/src/core/utils/icon-resolver.ts +57 -0
  827. package/src/core/utils/index.ts +4 -1
  828. package/src/core/utils/lang-to-name.ts +35 -0
  829. package/src/ext/configure.ts +1 -1
  830. package/src/icons/CDNIcon/CDNIcon.tsx +47 -0
  831. package/src/icons/ChatGptIcon/ChatGptIcon.tsx +23 -0
  832. package/src/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.tsx +24 -0
  833. package/src/icons/ClaudeIcon/ClaudeIcon.tsx +23 -0
  834. package/src/icons/GenericIcon/GenericIcon.tsx +78 -0
  835. package/src/icons/GraphqlIcon/GraphqlIcon.tsx +81 -0
  836. package/src/icons/GraphqlIcon/index.ts +1 -0
  837. package/src/icons/HexagonIcon/HexagonIcon.tsx +23 -0
  838. package/src/icons/MarkdownFullIcon/MarkdownFullIcon.tsx +24 -0
  839. package/src/icons/MoleculesIcon/MoleculesIcon.tsx +23 -0
  840. package/src/icons/NetworkIcon/NetworkIcon.tsx +31 -0
  841. package/src/icons/NoneIcon/NoneIcon.tsx +17 -0
  842. package/src/icons/NotesIcon/NotesIcon.tsx +43 -0
  843. package/src/icons/types.ts +7 -0
  844. package/src/index.ts +7 -1
  845. package/src/layouts/CodeWalkthroughLayout.tsx +1 -1
  846. package/src/layouts/DocumentationLayout.tsx +23 -13
  847. package/src/markdoc/components/Cards/CardIcon.tsx +6 -21
  848. package/src/markdoc/components/CodeGroup/CodeGroup.tsx +78 -0
  849. package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +7 -4
  850. package/src/markdoc/components/Heading/Heading.tsx +22 -3
  851. package/src/markdoc/components/Icon/Icon.tsx +16 -0
  852. package/src/markdoc/components/Tabs/Tab.tsx +6 -1
  853. package/src/markdoc/components/Tabs/Tabs.tsx +1 -1
  854. package/src/markdoc/components/Tabs/variables.ts +2 -0
  855. package/src/markdoc/components/default.ts +2 -0
  856. package/src/markdoc/default.ts +4 -0
  857. package/src/markdoc/tags/card.ts +1 -1
  858. package/src/markdoc/tags/code-group.ts +21 -0
  859. package/src/markdoc/tags/code-snippet.ts +1 -1
  860. package/src/markdoc/tags/icon.ts +14 -0
  861. package/src/markdoc/tags/tab.ts +1 -0
  862. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
  863. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
  864. package/lib/ext/process-scorecard.d.ts +0 -5
  865. package/lib/ext/process-scorecard.js +0 -11
  866. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
  867. package/src/core/utils/get-file-icon.ts +0 -42
  868. package/src/ext/process-scorecard.ts +0 -13
  869. /package/lib/core/utils/{text-transform.d.ts → string.d.ts} +0 -0
  870. /package/src/core/utils/{text-transform.ts → string.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { AsyncApiRealm } from '@redocly/realm-asyncapi-sdk';
2
2
 
3
3
  type ExtractEventType<T> = T extends {
4
- span?: { attributes?: { 'cloudevents.event_type': infer EventType } };
4
+ type: infer EventType;
5
5
  }
6
6
  ? EventType
7
7
  : never;
@@ -10,25 +10,17 @@ export type EventType = ExtractEventType<AsyncApiRealm.Messages>;
10
10
 
11
11
  type GetMessageForEventType<TEventType extends EventType> = Extract<
12
12
  AsyncApiRealm.Messages,
13
- { span?: { attributes?: { 'cloudevents.event_type': TEventType } } }
13
+ { type: TEventType }
14
14
  >;
15
15
 
16
16
  type ExtractEventDataForType<TEventType extends EventType> =
17
17
  GetMessageForEventType<TEventType> extends {
18
- span?: { attributes?: infer Attrs };
18
+ data: infer Data;
19
19
  }
20
- ? {
21
- [K in keyof Attrs as K extends `cloudevents.event_data.${string}` ? K : never]: Attrs[K];
22
- }
20
+ ? Data
23
21
  : never;
24
22
 
25
- export type ConvertEventDataToPayload<T> = {
26
- [K in keyof T as K extends `cloudevents.event_data.${infer FieldName}` ? FieldName : never]: T[K];
27
- };
28
-
29
- export type EventPayload<TEventType extends EventType> = ConvertEventDataToPayload<
30
- ExtractEventDataForType<TEventType>
31
- >;
23
+ export type EventPayload<TEventType extends EventType> = ExtractEventDataForType<TEventType>;
32
24
 
33
25
  export interface SendEventParams<TEventType extends EventType> {
34
26
  type: TEventType;
@@ -1,5 +1,4 @@
1
1
  import { saveAs } from 'file-saver';
2
- import JSZip from 'jszip';
3
2
 
4
3
  import type { CodeWalkthroughFile } from '@redocly/config';
5
4
 
@@ -7,14 +6,16 @@ import { removeLeadingSlash } from './urls';
7
6
  import { findClosestCommonDirectory } from './find-closest-common-directory';
8
7
  import { getCodeWalkthroughFileText } from './get-code-walkthrough-file-text';
9
8
 
10
- // https://github.com/Stuk/jszip/issues/196#issuecomment-69503828
11
- JSZip.support.nodebuffer = false;
12
-
13
9
  export async function downloadCodeWalkthrough(
14
10
  files: CodeWalkthroughFile[],
15
11
  state: Record<string, { value: string | boolean }>,
16
12
  inputsState: Record<string, { value: string }>,
17
13
  ) {
14
+ const JSZip = (await import('jszip')).default;
15
+
16
+ // https://github.com/Stuk/jszip/issues/196#issuecomment-69503828
17
+ JSZip.support.nodebuffer = false;
18
+
18
19
  const zip = new JSZip();
19
20
 
20
21
  const filePaths = files.map(({ path }) => path);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Enhanced smoothstep function for smooth interpolation with configurable threshold.
3
+ * Used in active heading detection to create virtual positions for better scroll behavior.
4
+ */
5
+ export function enhancedSmoothstep(input: number, threshold: number = 0.4): number {
6
+ if (input <= threshold) {
7
+ return 0;
8
+ }
9
+
10
+ const normalizedValue = Math.min(Math.max((input - threshold) / (1 - threshold), 0), 1);
11
+ return (
12
+ 3 * normalizedValue * normalizedValue - 2 * normalizedValue * normalizedValue * normalizedValue
13
+ );
14
+ }
@@ -0,0 +1,94 @@
1
+ import * as React from 'react';
2
+
3
+ import { CDNIcon } from '@redocly/theme/icons/CDNIcon/CDNIcon';
4
+
5
+ // extension to icon name
6
+ const fileIconMap: Record<string, string> = {
7
+ yaml: 'yaml',
8
+ yml: 'yaml',
9
+ json: 'json',
10
+ js: 'javascript',
11
+ ts: 'typescript',
12
+ css: 'css',
13
+ html: 'html',
14
+ jsx: 'react',
15
+ tsx: 'react',
16
+ md: 'markdown',
17
+ graphql: 'graphql',
18
+ gql: 'graphql',
19
+ py: 'python',
20
+ sh: 'console',
21
+ xsh: 'console',
22
+ nu: 'console',
23
+ java: 'java',
24
+ ps: 'powershell',
25
+ php: 'php_elephant',
26
+ go: 'go',
27
+ ruby: 'ruby',
28
+ swift: 'swift',
29
+ kotlin: 'kotlin',
30
+ rust: 'rust',
31
+ scala: 'scala',
32
+ elixir: 'elixir',
33
+ dart: 'dart',
34
+ http: 'http',
35
+ rest: 'http',
36
+ c: 'c',
37
+ h: 'c',
38
+ hpp: 'c',
39
+ cc: 'c',
40
+ cpp: 'c',
41
+ cxx: 'c',
42
+ 'c++': 'c',
43
+ sql: 'database',
44
+ hbs: 'handlebars',
45
+ cs: 'csharp',
46
+ csx: 'csharp',
47
+ csharp: 'csharp',
48
+ markdoc: 'markdoc',
49
+ mdoc: 'markdoc',
50
+ mdx: 'mdx',
51
+ };
52
+
53
+ // code block language to icon name, only for those when code extension is not available
54
+ const languageIconMap: Record<string, string> = {
55
+ bash: 'console',
56
+ python: 'python',
57
+ java: 'java',
58
+ graphql: 'graphql',
59
+ javascript: 'javascript',
60
+ typescript: 'typescript',
61
+ react: 'react',
62
+ markdown: 'markdown',
63
+ php: 'php_elephant',
64
+ ruby: 'ruby',
65
+ swift: 'swift',
66
+ kotlin: 'kotlin',
67
+ rust: 'rust',
68
+ scala: 'scala',
69
+ elixir: 'elixir',
70
+ dart: 'dart',
71
+ csharp: 'csharp',
72
+ objectivec: 'c',
73
+ perl: 'perl',
74
+ sql: 'database',
75
+ xml: 'xml',
76
+ vim: 'vim',
77
+ lua: 'lua',
78
+ zsh: 'console',
79
+ fish: 'console',
80
+ powershell: 'console',
81
+ handlebars: 'handlebars',
82
+ markdoc: 'markdoc',
83
+ mdx: 'mdx',
84
+ };
85
+
86
+ export function getFileIconByExt(ext: string) {
87
+ const iconName = fileIconMap[ext] || 'document';
88
+ return <CDNIcon name={iconName} pack="code" mode="background" />;
89
+ }
90
+
91
+ export function getFileIconByLanguage(language: string) {
92
+ const iconName = fileIconMap[language] || languageIconMap[language] || 'document';
93
+ return <CDNIcon name={iconName} pack="code" mode="background" />;
94
+ }
@@ -0,0 +1,57 @@
1
+ export type ResolvedIcon =
2
+ | { type: 'link'; value: string }
3
+ | { type: 'font-awesome'; name: string; style: string }
4
+ | { type: 'invalid'; reason: string };
5
+
6
+ const FA_ICON_STYLES = ['solid', 'regular', 'duotone', 'brands'] as string[];
7
+ const FA_ICON_NAME_PATTERN = /^[a-z0-9-]+$/i;
8
+
9
+ /**
10
+ * Resolves an icon value from configuration into a structured object.
11
+ *
12
+ * Supports:
13
+ * - URLs (absolute or relative paths to image files)
14
+ * - Font Awesome icons in formats:
15
+ * - "solid camera" (style + name)
16
+ * - "camera" (name only, default style: 'regular')
17
+ *
18
+ * @param icon - The icon string from config.
19
+ * @returns A structured object describing the icon:
20
+ * - type: 'url' | 'font-awesome' | 'invalid'
21
+ * - value: for URLs
22
+ * - name and style: for Font Awesome icons
23
+ * - reason: for invalid entries
24
+ */
25
+ export function resolveIcon(icon?: string): ResolvedIcon {
26
+ if (!icon || typeof icon !== 'string') {
27
+ return { type: 'invalid', reason: 'Icon must be a non-empty string' };
28
+ }
29
+
30
+ const trimmed = icon.trim();
31
+ const isLink =
32
+ trimmed.match(/\.(svg|png|jpg|jpeg|gif|ico|webp)$/) || /^https?:\/\//.test(trimmed);
33
+
34
+ if (isLink) {
35
+ return { type: 'link', value: trimmed };
36
+ }
37
+
38
+ const [first, second] = trimmed.split(/\s+/);
39
+
40
+ if (first) {
41
+ if (second) {
42
+ // Format: "style name" (e.g., "solid camera")
43
+ if (FA_ICON_STYLES.includes(first) && FA_ICON_NAME_PATTERN.test(second)) {
44
+ return { type: 'font-awesome', style: first, name: second };
45
+ } else {
46
+ return { type: 'invalid', reason: 'Unrecognized icon format' };
47
+ }
48
+ } else if (!FA_ICON_STYLES.includes(first) && FA_ICON_NAME_PATTERN.test(first)) {
49
+ return {
50
+ type: 'font-awesome',
51
+ name: first,
52
+ style: 'regular',
53
+ };
54
+ }
55
+ }
56
+ return { type: 'invalid', reason: 'Unrecognized icon format' };
57
+ }
@@ -9,7 +9,7 @@ export * from './color';
9
9
  export * from './urls';
10
10
  export * from './js-utils';
11
11
  export * from './tags-parser';
12
- export * from './text-transform';
12
+ export * from './string';
13
13
  export * from './dom';
14
14
  export * from './markdoc';
15
15
  export * from './attribute-parser';
@@ -33,3 +33,6 @@ export * from './replace-inputs-with-value';
33
33
  export * from './find-closest-common-directory';
34
34
  export * from './get-user-agent';
35
35
  export * from './parse-style-string';
36
+ export * from './lang-to-name';
37
+ export * from './enhanced-smoothstep';
38
+ export * from './icon-resolver';
@@ -0,0 +1,35 @@
1
+ import { capitalize } from './string';
2
+
3
+ const languages = {
4
+ js: 'JavaScript',
5
+ ts: 'TypeScript',
6
+ jsx: 'React',
7
+ tsx: 'React',
8
+ html: 'HTML',
9
+ css: 'CSS',
10
+ sh: 'Shell',
11
+ java: 'Java',
12
+ py: 'Python',
13
+ graphql: 'GraphQL',
14
+ gql: 'GraphQL',
15
+ yaml: 'YAML',
16
+ yml: 'YAML',
17
+ json: 'JSON',
18
+ md: 'Markdown',
19
+ markdown: 'Markdown',
20
+ mermaid: 'Mermaid',
21
+ php: 'PHP',
22
+ javascript: 'JavaScript',
23
+ typescript: 'TypeScript',
24
+ react: 'React',
25
+ mdoc: 'Markdoc',
26
+ 'objective-c': 'Objective-C',
27
+ objectivec: 'Objective-C',
28
+ sql: 'SQL',
29
+ xml: 'XML',
30
+ csharp: 'C#',
31
+ };
32
+
33
+ export function langToName(lang: string) {
34
+ return languages[lang as keyof typeof languages] || capitalize(lang);
35
+ }
@@ -1,4 +1,4 @@
1
- import { UserClaims, OpenAPIServer } from '@redocly/theme';
1
+ import { UserClaims, OpenAPIServer } from '@redocly/theme/core/types';
2
2
 
3
3
  export type SecurityDetails = {
4
4
  password?: string;
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { CDNIconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+ import { ICONS_CDN_URL } from '@redocly/theme/core/constants';
8
+
9
+ const Icon = (props: CDNIconProps) => {
10
+ const { name, type, pack, mode, color, ...rest } = props;
11
+ const cdnUrl = ICONS_CDN_URL[pack || 'font-awesome'];
12
+ const typeSegment = pack === 'code' ? '' : type ? type + '/' : 'regular/';
13
+
14
+ const styleProps =
15
+ mode === 'background'
16
+ ? {
17
+ backgroundImage: `url(${cdnUrl}/${typeSegment}${name}.svg)`,
18
+ backgroundRepeat: 'no-repeat',
19
+ backgroundPosition: 'center',
20
+ backgroundSize: 'contain',
21
+ }
22
+ : {
23
+ backgroundColor: color ? getCssColorVariable(color) : 'currentColor',
24
+ maskImage: `url(${cdnUrl}/${typeSegment}${name}.svg)`,
25
+ maskRepeat: 'no-repeat',
26
+ maskPosition: 'center',
27
+ maskSize: 'contain',
28
+ };
29
+
30
+ return (
31
+ <svg
32
+ {...rest}
33
+ style={{
34
+ ...styleProps,
35
+ display: 'inline-block',
36
+ verticalAlign: 'middle',
37
+ }}
38
+ />
39
+ );
40
+ };
41
+
42
+ export const CDNIcon = styled(Icon).attrs(() => ({
43
+ 'data-component-name': 'icons/CDNIcon/CDNIcon',
44
+ }))<CDNIconProps>`
45
+ height: ${({ size }) => size || 'var(--icon-height, 1em)'};
46
+ width: ${({ size }) => size || 'var(--icon-width, 1em)'};
47
+ `;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
10
+ <path d="M6.74887 6.55188V5.54033C6.74887 5.45514 6.78085 5.39123 6.85535 5.34869L8.88914 4.17742C9.16598 4.01771 9.49608 3.94322 9.83676 3.94322C11.1145 3.94322 11.9238 4.93348 11.9238 5.98758C11.9238 6.06209 11.9238 6.14729 11.9131 6.23248L9.80481 4.99731C9.67705 4.92281 9.54923 4.92281 9.42147 4.99731L6.74887 6.55188ZM11.4978 10.4916V8.0745C11.4978 7.9254 11.4339 7.81892 11.3061 7.7444L8.63354 6.18983L9.50666 5.68935C9.58118 5.64681 9.64509 5.64681 9.71961 5.68935L11.7534 6.86061C12.3391 7.20138 12.733 7.9254 12.733 8.62811C12.733 9.43732 12.2539 10.1827 11.4978 10.4915V10.4916ZM6.12066 8.36206L5.24754 7.85099C5.17304 7.80845 5.14106 7.74451 5.14106 7.65932V5.31682C5.14106 4.17753 6.01418 3.315 7.19612 3.315C7.64339 3.315 8.05856 3.4641 8.41003 3.73029L6.31241 4.94418C6.18468 5.01868 6.12077 5.12515 6.12077 5.27428V8.36214L6.12066 8.36206ZM8.00002 9.4481L6.74887 8.74537V7.25473L8.00002 6.55199L9.25109 7.25473V8.74537L8.00002 9.4481ZM8.80393 12.6851C8.35668 12.6851 7.9415 12.536 7.59004 12.2698L9.68764 11.0559C9.81539 10.9814 9.8793 10.8749 9.8793 10.7258V7.63795L10.7631 8.14902C10.8376 8.19156 10.8696 8.25547 10.8696 8.34069V10.6832C10.8696 11.8225 9.98578 12.685 8.80393 12.685V12.6851ZM6.28037 10.3106L4.24657 9.1394C3.66089 8.7986 3.26698 8.07461 3.26698 7.37188C3.26698 6.55199 3.75678 5.8173 4.51273 5.50849V7.93618C4.51273 8.08528 4.57667 8.19176 4.7044 8.26628L7.36642 9.81016L6.49329 10.3106C6.4188 10.3532 6.35486 10.3532 6.28037 10.3106ZM6.16331 12.0569C4.96009 12.0569 4.0763 11.1518 4.0763 10.0338C4.0763 9.94859 4.08697 9.86339 4.09756 9.7782L6.19518 10.9921C6.32291 11.0666 6.45075 11.0666 6.57849 10.9921L9.25109 9.44821V10.4598C9.25109 10.545 9.21913 10.6089 9.14461 10.6514L7.11084 11.8227C6.83398 11.9824 6.50388 12.0569 6.1632 12.0569H6.16331ZM8.80393 13.3239C10.0923 13.3239 11.1677 12.4082 11.4127 11.1943C12.6052 10.8855 13.3719 9.7675 13.3719 8.62822C13.3719 7.88283 13.0525 7.15884 12.4775 6.63707C12.5307 6.41345 12.5627 6.18983 12.5627 5.96632C12.5627 4.4437 11.3275 3.3043 9.90067 3.3043C9.61325 3.3043 9.33639 3.34684 9.05953 3.44273C8.58031 2.97421 7.92013 2.67609 7.19612 2.67609C5.90773 2.67609 4.83236 3.59175 4.58736 4.80564C3.39482 5.11446 2.62817 6.23248 2.62817 7.37176C2.62817 8.11715 2.94757 8.84115 3.52258 9.36291C3.46934 9.58653 3.43738 9.81016 3.43738 10.0337C3.43738 11.5563 4.67256 12.6957 6.09937 12.6957C6.38682 12.6957 6.66368 12.6531 6.94054 12.5573C7.41965 13.0258 8.07982 13.3239 8.80393 13.3239Z" />
11
+ </svg>
12
+ );
13
+
14
+ export const ChatGptIcon = styled(Icon).attrs(() => ({
15
+ 'data-component-name': 'icons/ChatGptIcon/ChatGptIcon',
16
+ }))<IconProps>`
17
+ path {
18
+ fill: ${({ color }) => getCssColorVariable(color)};
19
+ }
20
+
21
+ height: ${({ size }) => size || '16px'};
22
+ width: ${({ size }) => size || '16px'};
23
+ `;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
10
+ <path d="M7 10.707L4.5 8.2065L5.2065 7.5L7 9.293L10.7925 5.5L11.5 6.2075L7 10.707Z" />
11
+ <path d="M8 1C6.61553 1 5.26216 1.41054 4.11101 2.17971C2.95987 2.94888 2.06266 4.04213 1.53285 5.32122C1.00303 6.6003 0.86441 8.00776 1.13451 9.36563C1.4046 10.7235 2.07129 11.9708 3.05026 12.9497C4.02922 13.9287 5.2765 14.5954 6.63437 14.8655C7.99224 15.1356 9.3997 14.997 10.6788 14.4672C11.9579 13.9373 13.0511 13.0401 13.8203 11.889C14.5895 10.7378 15 9.38447 15 8C15 6.14348 14.2625 4.36301 12.9497 3.05025C11.637 1.7375 9.85652 1 8 1ZM8 14C6.81332 14 5.65328 13.6481 4.66658 12.9888C3.67989 12.3295 2.91085 11.3925 2.45673 10.2961C2.0026 9.19974 1.88378 7.99334 2.11529 6.82946C2.3468 5.66557 2.91825 4.59647 3.75736 3.75736C4.59648 2.91824 5.66558 2.3468 6.82946 2.11529C7.99335 1.88378 9.19975 2.0026 10.2961 2.45672C11.3925 2.91085 12.3295 3.67988 12.9888 4.66658C13.6481 5.65327 14 6.81331 14 8C14 9.5913 13.3679 11.1174 12.2426 12.2426C11.1174 13.3679 9.5913 14 8 14Z" />
12
+ </svg>
13
+ );
14
+
15
+ export const CheckmarkOutlineIcon = styled(Icon).attrs(() => ({
16
+ 'data-component-name': 'icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon',
17
+ }))<IconProps>`
18
+ path {
19
+ fill: ${({ color }) => getCssColorVariable(color)};
20
+ }
21
+
22
+ height: ${({ size }) => size || '16px'};
23
+ width: ${({ size }) => size || '16px'};
24
+ `;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
10
+ <path d="M4.03188 9.88255L6.60172 8.62367L6.64494 8.51434L6.60172 8.45352H6.47649L6.04701 8.43042L4.57865 8.39577L3.3052 8.34957L2.07142 8.29182L1.761 8.23408L1.46997 7.89915L1.49996 7.73207L1.761 7.57884L2.13492 7.60733L2.96126 7.65661L4.2012 7.7313L5.10074 7.77749L6.43328 7.89838H6.64494L6.67492 7.82369L6.60261 7.77749L6.54616 7.7313L5.26301 6.97212L3.87402 6.16983L3.14646 5.70785L2.75313 5.47379L2.5547 5.25435L2.46916 4.77544L2.82633 4.43204L3.30608 4.46052L3.42866 4.48901L3.91459 4.81548L4.95258 5.5169L6.30805 6.38849L6.50648 6.53248L6.58585 6.4832L6.59555 6.44855L6.50648 6.31843L5.76921 5.15503L4.98256 3.9716L4.63245 3.48114L4.53985 3.18702C4.50722 3.06614 4.48341 2.9645 4.48341 2.84054L4.88996 2.35855L5.11485 2.29541L5.65721 2.35855L5.88562 2.53179L6.22251 3.20473L6.7684 4.26419L7.61502 5.70477L7.86284 6.1321L7.99512 6.52786L8.04451 6.64874H8.13005V6.57944L8.19972 5.76791L8.32848 4.77159L8.45371 3.48961L8.49692 3.1285L8.70152 2.69579L9.10807 2.46172L9.42556 2.59415L9.6866 2.92061L9.65044 3.13158L9.49523 4.01241L9.19097 5.39217L8.99254 6.31612H9.10807L9.24036 6.20062L9.77567 5.58004L10.6752 4.59835L11.0721 4.20875L11.5351 3.77834L11.8323 3.57354H12.394L12.8076 4.1102L12.6224 4.66456L12.0439 5.30517L11.5642 5.84799L10.8763 6.65644L10.4468 7.3032L10.4865 7.35479L10.5888 7.34632L12.1427 7.05759L12.9822 6.92515L13.9841 6.77501L14.4374 6.9598L14.4868 7.14767L14.3086 7.53188L13.2371 7.76287L11.9804 7.9823L10.109 8.36882L10.0861 8.38345L10.1126 8.41194L10.9556 8.48123L11.3163 8.49817H12.1991L13.843 8.6052L14.2725 8.85312L14.53 9.15649L14.4868 9.38747L13.8253 9.68159L12.9329 9.4968L10.8498 9.06409L10.1355 8.90856H10.0367V8.96014L10.632 9.46832L11.7229 10.3284L13.089 11.4371L13.1586 11.7112L12.9831 11.9276L12.7979 11.9045L11.5977 11.116L11.1347 10.7611L10.0861 9.99035H10.0164V10.0712L10.2581 10.3799L11.5342 12.0546L11.6003 12.5682L11.5077 12.7352L11.177 12.8361L10.8137 12.7784L10.0667 11.8629L9.29592 10.8319L8.67418 9.90796L8.59834 9.94569L8.23147 13.3959L8.0595 13.5722L7.66264 13.7046L7.33193 13.4852L7.15644 13.1302L7.33193 12.4288L7.54359 11.5133L7.71556 10.7857L7.87077 9.88178L7.96337 9.5815L7.9572 9.56148L7.88136 9.56995L7.10088 10.5054L5.91385 11.906L4.97463 12.7837L4.74974 12.8615L4.35994 12.6852L4.3961 12.3703L4.61393 12.09L5.91385 10.6463L6.69785 9.75166L7.20406 9.23502L7.20053 9.16033H7.17055L3.71792 11.1176L3.10324 11.1869L2.83867 10.9705L2.8713 10.6155L2.99653 10.5001L4.03452 9.87639L4.031 9.87947L4.03188 9.88255Z" />
11
+ </svg>
12
+ );
13
+
14
+ export const ClaudeIcon = styled(Icon).attrs(() => ({
15
+ 'data-component-name': 'icons/ClaudeIcon/ClaudeIcon',
16
+ }))<IconProps>`
17
+ path {
18
+ fill: ${({ color }) => getCssColorVariable(color)};
19
+ }
20
+
21
+ height: ${({ size }) => size || '16px'};
22
+ width: ${({ size }) => size || '16px'};
23
+ `;
@@ -0,0 +1,78 @@
1
+ import * as React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import { CDNIcon } from '@redocly/theme/icons/CDNIcon/CDNIcon';
5
+ import { resolveIcon } from '@redocly/theme/core/utils';
6
+ import { InlineSvg } from '@redocly/theme/markdoc/components/InlineSvg/InlineSvg';
7
+ import { Image } from '@redocly/theme/components/Image/Image';
8
+
9
+ export type GenericIconProps = {
10
+ icon: string | React.ReactNode;
11
+ srcSet?: string;
12
+ rawContent?: string;
13
+ size?: string;
14
+ color?: string;
15
+ alt?: string;
16
+ className?: string;
17
+ };
18
+
19
+ const INVALID_ICON_NAME = 'image-slash';
20
+
21
+ export function GenericIcon({
22
+ icon,
23
+ srcSet,
24
+ rawContent,
25
+ size,
26
+ color,
27
+ alt,
28
+ className,
29
+ }: GenericIconProps) {
30
+ if (srcSet) {
31
+ return <IconSrcSetImg srcSet={srcSet} alt={alt} className={className} />;
32
+ }
33
+
34
+ const resolvedIcon = icon && typeof icon === 'string' ? resolveIcon(icon) : null;
35
+ const iconComponent = rawContent ? (
36
+ <IconSvg fileRawContent={rawContent} className={className} />
37
+ ) : resolvedIcon?.type === 'link' ? (
38
+ <IconImg src={resolvedIcon.value} alt={alt} className={className} />
39
+ ) : resolvedIcon?.type === 'font-awesome' ? (
40
+ <CDNIcon
41
+ name={resolvedIcon.name}
42
+ type={resolvedIcon.style}
43
+ size={size}
44
+ color={color}
45
+ className={className}
46
+ />
47
+ ) : resolvedIcon?.type === 'invalid' ? (
48
+ <CDNIcon name={INVALID_ICON_NAME} size={size} color={color} className={className} />
49
+ ) : (
50
+ icon
51
+ );
52
+
53
+ return iconComponent;
54
+ }
55
+
56
+ const IconImg = styled.img`
57
+ width: var(--icon-width, 16px);
58
+ height: var(--icon-height, 16px);
59
+ display: inline-block;
60
+ vertical-align: middle;
61
+ `;
62
+
63
+ const IconSrcSetImg = styled(Image)`
64
+ width: var(--icon-width, 16px);
65
+ height: var(--icon-height, 16px);
66
+ `;
67
+
68
+ const IconSvg = styled(InlineSvg)`
69
+ width: var(--icon-width, 16px);
70
+ height: var(--icon-height, 16px);
71
+ display: inline-block;
72
+
73
+ svg {
74
+ width: 100%;
75
+ height: 100%;
76
+ fill: var(--icon-color, currentColor);
77
+ }
78
+ `;
@@ -0,0 +1,81 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg
10
+ width="14"
11
+ height="16"
12
+ viewBox="0 0 14 16"
13
+ fill="none"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ {...props}
16
+ color="#E535AB"
17
+ >
18
+ <path
19
+ d="M0.723804 11.7744L1.29883 12.1064L7.70483 1.01125L7.1298 0.679253L0.723804 11.7744Z"
20
+ fill="#22242B"
21
+ />
22
+ <path d="M13.4043 10.8882H0.592285V11.5522H13.4043V10.8882Z" fill="#E535AB" />
23
+ <path
24
+ d="M0.845506 11.2609L7.25391 14.9609L7.58591 14.3859L1.17751 10.6859L0.845506 11.2609Z"
25
+ fill="#E535AB"
26
+ />
27
+ <path
28
+ d="M6.4124 1.61787L12.8208 5.31787L13.1528 4.74285L6.7444 1.04285L6.4124 1.61787Z"
29
+ fill="#E535AB"
30
+ />
31
+ <path
32
+ d="M0.847688 4.74041L1.17969 5.31543L7.58809 1.61543L7.25609 1.04041L0.847688 4.74041Z"
33
+ fill="#E535AB"
34
+ />
35
+ <path
36
+ d="M6.29664 1.01125L12.7026 12.1064L13.2777 11.7744L6.87166 0.679253L6.29664 1.01125Z"
37
+ fill="#E535AB"
38
+ />
39
+ <path d="M1.7641 4.2998H1.1001V11.6998H1.7641V4.2998Z" fill="#E535AB" />
40
+ <path d="M12.9003 4.2998H12.2363V11.6998H12.9003V4.2998Z" fill="#E535AB" />
41
+ <path
42
+ d="M6.85111 14.1774L7.14111 14.6797L12.7147 11.4617L12.4247 10.9594L6.85111 14.1774Z"
43
+ fill="#E535AB"
44
+ />
45
+ <path
46
+ d="M13.7802 11.9162C13.3962 12.5842 12.5402 12.8122 11.8722 12.4282C11.2042 12.0442 10.9762 11.1882 11.3602 10.5202C11.7442 9.85218 12.6002 9.62418 13.2682 10.0082C13.9402 10.3962 14.1682 11.2482 13.7802 11.9162Z"
47
+ fill="#E535AB"
48
+ />
49
+ <path
50
+ d="M2.63619 5.48014C2.25219 6.14814 1.39619 6.37614 0.728188 5.99215C0.0601878 5.60814 -0.167812 4.75214 0.216188 4.08414C0.600188 3.41614 1.45619 3.18814 2.12419 3.57214C2.79219 3.96014 3.02019 4.81214 2.63619 5.48014Z"
51
+ fill="#E535AB"
52
+ />
53
+ <path
54
+ d="M0.220094 11.9162C-0.163906 11.2482 0.064094 10.3962 0.732094 10.0082C1.40009 9.62418 2.25209 9.85218 2.64009 10.5202C3.02409 11.1882 2.79609 12.0402 2.12809 12.4282C1.45609 12.8122 0.604094 12.5842 0.220094 11.9162Z"
55
+ fill="#E535AB"
56
+ />
57
+ <path
58
+ d="M11.3641 5.48014C10.9801 4.81214 11.2081 3.96014 11.8761 3.57214C12.5441 3.18814 13.3961 3.41614 13.7841 4.08414C14.1681 4.75214 13.9401 5.60415 13.2721 5.99215C12.6041 6.37614 11.7481 6.14814 11.3641 5.48014Z"
59
+ fill="#E535AB"
60
+ />
61
+ <path
62
+ d="M7 15.832C6.228 15.832 5.604 15.208 5.604 14.436C5.604 13.664 6.228 13.04 7 13.04C7.772 13.04 8.396 13.664 8.396 14.436C8.396 15.204 7.772 15.832 7 15.832Z"
63
+ fill="#E535AB"
64
+ />
65
+ <path
66
+ d="M7 2.95997C6.228 2.95997 5.604 2.33597 5.604 1.56397C5.604 0.791969 6.228 0.167969 7 0.167969C7.772 0.167969 8.396 0.791969 8.396 1.56397C8.396 2.33597 7.772 2.95997 7 2.95997Z"
67
+ fill="#E535AB"
68
+ />
69
+ </svg>
70
+ );
71
+
72
+ export const GraphqlIcon = styled(Icon).attrs(() => ({
73
+ 'data-component-name': 'icons/GraphqlIcon/GraphqlIcon',
74
+ }))<IconProps>`
75
+ path {
76
+ fill: ${({ color }) => getCssColorVariable(color)};
77
+ }
78
+
79
+ height: ${({ size }) => size || '16px'};
80
+ width: ${({ size }) => size || '16px'};
81
+ `;
@@ -0,0 +1 @@
1
+ export { GraphqlIcon } from '@redocly/theme/icons/GraphqlIcon/GraphqlIcon';
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 26" {...props}>
10
+ <path d="M21.6594 6.61069L11.9094 0.923193C11.7852 0.850699 11.6439 0.8125 11.5 0.8125C11.3561 0.8125 11.2148 0.850699 11.0906 0.923193L1.34058 6.61069C1.21792 6.68225 1.11616 6.78471 1.04543 6.90785C0.974708 7.03099 0.937495 7.17052 0.9375 7.31253V18.6875C0.937495 18.8295 0.974708 18.9691 1.04543 19.0922C1.11616 19.2154 1.21792 19.3178 1.34058 19.3894L11.0906 25.0769C11.2148 25.1494 11.3561 25.1876 11.5 25.1876C11.6439 25.1876 11.7852 25.1494 11.9094 25.0769L21.6594 19.3894C21.7821 19.3178 21.8838 19.2154 21.9546 19.0922C22.0253 18.9691 22.0625 18.8295 22.0625 18.6875V7.31253C22.0625 7.17052 22.0253 7.03099 21.9546 6.90785C21.8838 6.78471 21.7821 6.68225 21.6594 6.61069ZM11.5 2.56566L19.6377 7.31253L11.5 12.0594L3.36232 7.31253L11.5 2.56566ZM2.5625 8.72726L10.6875 13.4666V22.9603L2.5625 18.221V8.72726ZM12.3125 22.9603V13.4666L20.4375 8.72726V18.221L12.3125 22.9603Z" />
11
+ </svg>
12
+ );
13
+
14
+ export const HexagonIcon = styled(Icon).attrs(() => ({
15
+ 'data-component-name': 'icons/HexagonIcon/HexagonIcon',
16
+ }))<IconProps>`
17
+ path {
18
+ fill: ${({ color }) => getCssColorVariable(color)};
19
+ }
20
+
21
+ height: ${({ size }) => size || '16px'};
22
+ width: ${({ size }) => size || '16px'};
23
+ `;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
10
+ <path d="M15.2308 4.17188C15.2308 3.95614 15.0586 3.78125 14.8462 3.78125H1.15385C0.941429 3.78125 0.769231 3.95614 0.769231 4.17188V11.8281C0.769231 12.0439 0.941429 12.2188 1.15385 12.2188H14.8462C15.0586 12.2188 15.2308 12.0439 15.2308 11.8281V4.17188ZM16 11.8281C16 12.4753 15.4834 13 14.8462 13H1.15385C0.516595 13 0 12.4753 0 11.8281V4.17188C0 3.52467 0.516595 3 1.15385 3H14.8462C15.4834 3 16 3.52467 16 4.17188V11.8281Z" />
11
+ <path d="M2.30769 10.6562V5.34375H3.84615L5.38462 7.29688L6.92308 5.34375H8.46154V10.6562H6.92308V7.60938L5.38462 9.5625L3.84615 7.60938V10.6562H2.30769ZM11.9231 10.6562L9.61539 8.07812H11.1538V5.34375H12.6923V8.07812H14.2308L11.9231 10.6562Z" />
12
+ </svg>
13
+ );
14
+
15
+ export const MarkdownFullIcon = styled(Icon).attrs(() => ({
16
+ 'data-component-name': 'icons/MarkdownFullIcon/MarkdownFullIcon',
17
+ }))<IconProps>`
18
+ path {
19
+ fill: ${({ color }) => getCssColorVariable(color)};
20
+ }
21
+
22
+ height: ${({ size }) => size || '16px'};
23
+ width: ${({ size }) => size || '16px'};
24
+ `;