@redocly/theme 0.55.0-rc.1 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/lib/components/Admonition/Admonition.js +4 -0
  2. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
  3. package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -1
  4. package/lib/components/Button/Button.d.ts +1 -0
  5. package/lib/components/Catalog/Catalog.d.ts +11 -0
  6. package/lib/components/Catalog/Catalog.js +138 -0
  7. package/lib/components/Catalog/CatalogActionsRow.d.ts +15 -0
  8. package/lib/components/Catalog/CatalogActionsRow.js +34 -0
  9. package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +8 -0
  10. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +179 -0
  11. package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +8 -0
  12. package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +20 -0
  13. package/lib/components/Catalog/CatalogEntities.d.ts +18 -0
  14. package/lib/components/Catalog/CatalogEntities.js +63 -0
  15. package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +2 -0
  16. package/lib/components/Catalog/CatalogEntitiesEmptyState.js +38 -0
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +12 -0
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +133 -0
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +7 -0
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +49 -0
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +6 -0
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +48 -0
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +6 -0
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +111 -0
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.d.ts +6 -0
  26. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +25 -0
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +6 -0
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +69 -0
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +7 -0
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +48 -0
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +6 -0
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +19 -0
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +6 -0
  34. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +20 -0
  35. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +6 -0
  36. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +20 -0
  37. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +6 -0
  38. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +23 -0
  39. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +6 -0
  40. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +21 -0
  41. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +6 -0
  42. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +24 -0
  43. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +6 -0
  44. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +21 -0
  45. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +21 -0
  46. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +37 -0
  47. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +10 -0
  48. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -0
  49. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +25 -0
  50. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +27 -0
  51. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +22 -0
  52. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +60 -0
  53. package/lib/components/Catalog/CatalogEntityIcon.d.ts +5 -0
  54. package/lib/components/Catalog/CatalogEntityIcon.js +38 -0
  55. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +5 -0
  56. package/lib/components/Catalog/CatalogEntityTypeIcon.js +42 -0
  57. package/lib/components/Catalog/CatalogHighlight.d.ts +4 -0
  58. package/lib/components/Catalog/CatalogHighlight.js +48 -0
  59. package/lib/components/Catalog/CatalogPageDescription.d.ts +9 -0
  60. package/lib/components/Catalog/CatalogPageDescription.js +52 -0
  61. package/lib/components/Catalog/CatalogSelector.d.ts +12 -0
  62. package/lib/components/Catalog/CatalogSelector.js +48 -0
  63. package/lib/components/Catalog/CatalogSortButton.d.ts +10 -0
  64. package/lib/components/Catalog/CatalogSortButton.js +71 -0
  65. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.d.ts +5 -0
  66. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +19 -0
  67. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -0
  68. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +63 -0
  69. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.d.ts +5 -0
  70. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +19 -0
  71. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +11 -0
  72. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +101 -0
  73. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +31 -0
  74. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +106 -0
  75. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +27 -0
  76. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +127 -0
  77. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +6 -0
  78. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +20 -0
  79. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.d.ts +7 -0
  80. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +66 -0
  81. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +9 -0
  82. package/lib/components/Catalog/CatalogTagsWithTooltip.js +46 -0
  83. package/lib/components/Catalog/CatalogViewModeToggle.d.ts +7 -0
  84. package/lib/components/Catalog/CatalogViewModeToggle.js +67 -0
  85. package/lib/components/Catalog/variables.d.ts +1 -0
  86. package/lib/components/Catalog/variables.dark.d.ts +1 -0
  87. package/lib/components/Catalog/variables.dark.js +8 -0
  88. package/lib/components/Catalog/variables.js +354 -0
  89. package/lib/components/CatalogClassic/CatalogClassicHighlight.js +1 -1
  90. package/lib/components/Dropdown/variables.js +1 -1
  91. package/lib/components/Filter/Filter.d.ts +1 -1
  92. package/lib/components/Filter/Filter.js +2 -2
  93. package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
  94. package/lib/components/Filter/FilterCheckboxes.js +4 -4
  95. package/lib/components/Filter/FilterContent.d.ts +3 -1
  96. package/lib/components/Filter/FilterContent.js +34 -4
  97. package/lib/components/Filter/FilterInput.js +35 -3
  98. package/lib/components/Filter/FilterSelect.d.ts +1 -1
  99. package/lib/components/Filter/FilterSelect.js +4 -4
  100. package/lib/components/Image/Image.js +2 -2
  101. package/lib/components/LoadMore/LoadMore.d.ts +8 -0
  102. package/lib/components/LoadMore/LoadMore.js +18 -0
  103. package/lib/components/Markdown/Markdown.js +1 -1
  104. package/lib/components/Marker/Marker.d.ts +10 -0
  105. package/lib/components/Marker/Marker.js +62 -0
  106. package/lib/components/Menu/MenuItem.d.ts +1 -1
  107. package/lib/components/Menu/MenuItem.js +7 -3
  108. package/lib/components/PageNavigation/NavigationButton.d.ts +13 -0
  109. package/lib/components/PageNavigation/NavigationButton.js +32 -0
  110. package/lib/components/PageNavigation/NextButton.js +10 -29
  111. package/lib/components/PageNavigation/PageNavigation.js +1 -1
  112. package/lib/components/PageNavigation/PreviousButton.js +11 -27
  113. package/lib/components/Search/SearchAiConversationInput.js +2 -1
  114. package/lib/components/Select/Select.js +22 -6
  115. package/lib/components/Select/SelectInput.d.ts +1 -0
  116. package/lib/components/Select/SelectInput.js +7 -3
  117. package/lib/components/Select/variables.js +2 -2
  118. package/lib/components/Sidebar/Sidebar.d.ts +3 -0
  119. package/lib/components/Sidebar/Sidebar.js +3 -2
  120. package/lib/components/SkipContent/SkipContent.d.ts +2 -0
  121. package/lib/components/SkipContent/SkipContent.js +68 -0
  122. package/lib/components/SkipContent/variables.d.ts +1 -0
  123. package/lib/components/SkipContent/variables.js +23 -0
  124. package/lib/components/Tag/Tag.d.ts +3 -1
  125. package/lib/components/Tag/Tag.js +54 -2
  126. package/lib/components/Tag/variables.js +21 -0
  127. package/lib/components/Tooltip/Tooltip.d.ts +2 -1
  128. package/lib/components/Tooltip/Tooltip.js +26 -19
  129. package/lib/components/Tooltip/variables.js +17 -0
  130. package/lib/components/VersionPicker/VersionPicker.js +22 -3
  131. package/lib/components/VersionPicker/variables.js +1 -0
  132. package/lib/core/constants/catalog.d.ts +1 -0
  133. package/lib/core/constants/catalog.js +5 -0
  134. package/lib/core/constants/common.d.ts +1 -0
  135. package/lib/core/constants/common.js +2 -1
  136. package/lib/core/constants/index.d.ts +1 -0
  137. package/lib/core/constants/index.js +1 -0
  138. package/lib/core/constants/search.d.ts +1 -0
  139. package/lib/core/constants/search.js +2 -1
  140. package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.d.ts +1 -1
  141. package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.js +5 -2
  142. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
  143. package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
  144. package/lib/core/hooks/catalog/useCatalogEntities.d.ts +4 -0
  145. package/lib/core/hooks/catalog/useCatalogEntities.js +17 -0
  146. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +15 -0
  147. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.js +23 -0
  148. package/lib/core/hooks/catalog/useCatalogTableViewRow.d.ts +11 -0
  149. package/lib/core/hooks/catalog/useCatalogTableViewRow.js +26 -0
  150. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +17 -9
  151. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +242 -47
  152. package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +9 -2
  153. package/lib/core/hooks/code-walkthrough/use-code-walkthrough.js +2 -2
  154. package/lib/core/hooks/index.d.ts +3 -1
  155. package/lib/core/hooks/index.js +3 -1
  156. package/lib/core/hooks/use-active-page-version.d.ts +1 -0
  157. package/lib/core/hooks/{use-page-active-version.js → use-active-page-version.js} +3 -3
  158. package/lib/core/hooks/use-user-teams.d.ts +1 -0
  159. package/lib/core/hooks/use-user-teams.js +10 -0
  160. package/lib/core/styles/dark.js +2 -0
  161. package/lib/core/styles/global.js +65 -60
  162. package/lib/core/types/catalog.d.ts +118 -5
  163. package/lib/core/types/code-walkthrough.d.ts +13 -0
  164. package/lib/core/types/code-walkthrough.js +3 -0
  165. package/lib/core/types/filter.d.ts +1 -0
  166. package/lib/core/types/hooks.d.ts +11 -4
  167. package/lib/core/types/index.d.ts +3 -0
  168. package/lib/core/types/index.js +3 -0
  169. package/lib/core/types/l10n.d.ts +1 -1
  170. package/lib/core/types/marker.d.ts +4 -0
  171. package/lib/core/types/marker.js +3 -0
  172. package/lib/core/types/telemetry.d.ts +32 -0
  173. package/lib/core/types/telemetry.js +3 -0
  174. package/lib/core/utils/index.d.ts +1 -0
  175. package/lib/core/utils/index.js +1 -0
  176. package/lib/core/utils/js-utils.d.ts +18 -0
  177. package/lib/core/utils/js-utils.js +31 -0
  178. package/lib/core/utils/parse-style-string.d.ts +1 -0
  179. package/lib/core/utils/parse-style-string.js +23 -0
  180. package/lib/icons/AscSortIcon/AscSortIcon.d.ts +9 -0
  181. package/lib/icons/AscSortIcon/AscSortIcon.js +25 -0
  182. package/lib/icons/CardsIcon/CardsIcon.d.ts +9 -0
  183. package/lib/icons/CardsIcon/CardsIcon.js +25 -0
  184. package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +9 -0
  185. package/lib/icons/CaretDownIcon/CaretDownIcon.js +22 -0
  186. package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +9 -0
  187. package/lib/icons/CaretUpIcon/CaretUpIcon.js +22 -0
  188. package/lib/icons/DescSortIcon/DescSortIcon.d.ts +9 -0
  189. package/lib/icons/DescSortIcon/DescSortIcon.js +25 -0
  190. package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +9 -0
  191. package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +26 -0
  192. package/lib/icons/GithubIcon/GithubIcon.d.ts +9 -0
  193. package/lib/icons/GithubIcon/GithubIcon.js +22 -0
  194. package/lib/icons/GraphIcon/GraphIcon.d.ts +9 -0
  195. package/lib/icons/GraphIcon/GraphIcon.js +22 -0
  196. package/lib/icons/PeopleIcon/PeopleIcon.d.ts +9 -0
  197. package/lib/icons/PeopleIcon/PeopleIcon.js +27 -0
  198. package/lib/icons/SlackIcon/SlackIcon.d.ts +9 -0
  199. package/lib/icons/SlackIcon/SlackIcon.js +29 -0
  200. package/lib/icons/SortIcon/SortIcon.d.ts +9 -0
  201. package/lib/icons/SortIcon/SortIcon.js +25 -0
  202. package/lib/icons/TableIcon/TableIcon.d.ts +9 -0
  203. package/lib/icons/TableIcon/TableIcon.js +22 -0
  204. package/lib/icons/TagsIcon/TagsIcon.d.ts +9 -0
  205. package/lib/icons/TagsIcon/TagsIcon.js +24 -0
  206. package/lib/index.d.ts +19 -1
  207. package/lib/index.js +20 -1
  208. package/lib/layouts/PageLayout.js +2 -1
  209. package/lib/layouts/RootLayout.js +2 -0
  210. package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +1 -2
  211. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +26 -20
  212. package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +32 -3
  213. package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
  214. package/lib/markdoc/components/Tabs/Tab.js +10 -2
  215. package/lib/markdoc/components/Tabs/TabList.d.ts +1 -4
  216. package/lib/markdoc/components/Tabs/TabList.js +18 -38
  217. package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
  218. package/lib/markdoc/components/Tabs/Tabs.js +5 -9
  219. package/lib/markdoc/tags/code-step.js +0 -3
  220. package/lib/markdoc/tags/code-walkthrough.js +0 -1
  221. package/package.json +4 -3
  222. package/src/components/Admonition/Admonition.tsx +4 -0
  223. package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
  224. package/src/components/Button/Button.tsx +1 -1
  225. package/src/components/Catalog/Catalog.tsx +235 -0
  226. package/src/components/Catalog/CatalogActionsRow.tsx +58 -0
  227. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +227 -0
  228. package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +29 -0
  229. package/src/components/Catalog/CatalogEntities.tsx +107 -0
  230. package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -0
  231. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +207 -0
  232. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +60 -0
  233. package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +67 -0
  234. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +93 -0
  235. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +35 -0
  236. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +83 -0
  237. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +62 -0
  238. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +36 -0
  239. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +38 -0
  240. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +33 -0
  241. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +41 -0
  242. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +42 -0
  243. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +39 -0
  244. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +31 -0
  245. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +97 -0
  246. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +80 -0
  247. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +92 -0
  248. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +127 -0
  249. package/src/components/Catalog/CatalogEntityIcon.tsx +41 -0
  250. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +48 -0
  251. package/src/components/Catalog/CatalogHighlight.tsx +56 -0
  252. package/src/components/Catalog/CatalogPageDescription.tsx +72 -0
  253. package/src/components/Catalog/CatalogSelector.tsx +67 -0
  254. package/src/components/Catalog/CatalogSortButton.tsx +78 -0
  255. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +26 -0
  256. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +77 -0
  257. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +26 -0
  258. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +120 -0
  259. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +176 -0
  260. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +180 -0
  261. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +28 -0
  262. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +77 -0
  263. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +83 -0
  264. package/src/components/Catalog/CatalogViewModeToggle.tsx +65 -0
  265. package/src/components/Catalog/variables.dark.ts +5 -0
  266. package/src/components/Catalog/variables.ts +351 -0
  267. package/src/components/CatalogClassic/CatalogClassicHighlight.tsx +1 -1
  268. package/src/components/Dropdown/variables.ts +1 -1
  269. package/src/components/Filter/Filter.tsx +10 -2
  270. package/src/components/Filter/FilterCheckboxes.tsx +8 -4
  271. package/src/components/Filter/FilterContent.tsx +21 -5
  272. package/src/components/Filter/FilterInput.tsx +16 -4
  273. package/src/components/Filter/FilterSelect.tsx +8 -4
  274. package/src/components/Image/Image.tsx +5 -9
  275. package/src/components/LoadMore/LoadMore.tsx +38 -0
  276. package/src/components/Markdown/Markdown.tsx +1 -1
  277. package/src/components/Marker/Marker.tsx +53 -0
  278. package/src/components/Menu/MenuItem.tsx +11 -2
  279. package/src/components/PageNavigation/NavigationButton.tsx +68 -0
  280. package/src/components/PageNavigation/NextButton.tsx +20 -43
  281. package/src/components/PageNavigation/PageNavigation.tsx +1 -1
  282. package/src/components/PageNavigation/PreviousButton.tsx +20 -43
  283. package/src/components/Search/SearchAiConversationInput.tsx +3 -0
  284. package/src/components/Select/Select.tsx +29 -4
  285. package/src/components/Select/SelectInput.tsx +20 -1
  286. package/src/components/Select/variables.ts +2 -2
  287. package/src/components/Sidebar/Sidebar.tsx +1 -1
  288. package/src/components/SkipContent/SkipContent.tsx +47 -0
  289. package/src/components/SkipContent/variables.ts +20 -0
  290. package/src/components/Tag/Tag.tsx +67 -1
  291. package/src/components/Tag/variables.ts +21 -0
  292. package/src/components/Tooltip/Tooltip.tsx +31 -22
  293. package/src/components/Tooltip/variables.ts +17 -0
  294. package/src/components/VersionPicker/VersionPicker.tsx +32 -2
  295. package/src/components/VersionPicker/variables.ts +1 -0
  296. package/src/core/constants/catalog.ts +1 -0
  297. package/src/core/constants/common.ts +1 -0
  298. package/src/core/constants/index.ts +1 -0
  299. package/src/core/constants/search.ts +2 -0
  300. package/src/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.tsx +6 -3
  301. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  302. package/src/core/hooks/catalog/useCatalogEntities.ts +16 -0
  303. package/src/core/hooks/catalog/useCatalogTableHeaderCellActions.ts +38 -0
  304. package/src/core/hooks/catalog/useCatalogTableViewRow.ts +40 -0
  305. package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +326 -65
  306. package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +9 -6
  307. package/src/core/hooks/index.ts +3 -1
  308. package/src/core/hooks/{use-page-active-version.ts → use-active-page-version.ts} +1 -1
  309. package/src/core/hooks/use-user-teams.ts +8 -0
  310. package/src/core/styles/dark.ts +2 -0
  311. package/src/core/styles/global.ts +5 -0
  312. package/src/core/types/catalog.ts +143 -5
  313. package/src/core/types/code-walkthrough.ts +15 -0
  314. package/src/core/types/filter.ts +1 -0
  315. package/src/core/types/hooks.ts +32 -5
  316. package/src/core/types/index.ts +3 -0
  317. package/src/core/types/l10n.ts +22 -1
  318. package/src/core/types/marker.ts +4 -0
  319. package/src/core/types/telemetry.ts +36 -0
  320. package/src/core/utils/index.ts +1 -0
  321. package/src/core/utils/js-utils.ts +31 -0
  322. package/src/core/utils/load-and-navigate.ts +5 -4
  323. package/src/core/utils/parse-style-string.ts +21 -0
  324. package/src/icons/AscSortIcon/AscSortIcon.tsx +29 -0
  325. package/src/icons/CardsIcon/CardsIcon.tsx +38 -0
  326. package/src/icons/CaretDownIcon/CaretDownIcon.tsx +26 -0
  327. package/src/icons/CaretUpIcon/CaretUpIcon.tsx +26 -0
  328. package/src/icons/DescSortIcon/DescSortIcon.tsx +29 -0
  329. package/src/icons/EntityTypeIcon/EntityTypeIcon.tsx +49 -0
  330. package/src/icons/GithubIcon/GithubIcon.tsx +35 -0
  331. package/src/icons/GraphIcon/GraphIcon.tsx +26 -0
  332. package/src/icons/PeopleIcon/PeopleIcon.tsx +46 -0
  333. package/src/icons/SlackIcon/SlackIcon.tsx +61 -0
  334. package/src/icons/SortIcon/SortIcon.tsx +29 -0
  335. package/src/icons/TableIcon/TableIcon.tsx +26 -0
  336. package/src/icons/TagsIcon/TagsIcon.tsx +41 -0
  337. package/src/index.ts +21 -1
  338. package/src/layouts/PageLayout.tsx +4 -1
  339. package/src/layouts/RootLayout.tsx +2 -0
  340. package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +76 -36
  341. package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +8 -3
  342. package/src/markdoc/components/Tabs/Tab.tsx +12 -1
  343. package/src/markdoc/components/Tabs/TabList.tsx +40 -70
  344. package/src/markdoc/components/Tabs/Tabs.tsx +11 -10
  345. package/src/markdoc/tags/code-step.ts +0 -3
  346. package/src/markdoc/tags/code-walkthrough.ts +0 -1
  347. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
  348. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
  349. package/lib/core/hooks/use-page-active-version.d.ts +0 -1
  350. package/lib/ext/process-scorecard.d.ts +0 -5
  351. package/lib/ext/process-scorecard.js +0 -11
  352. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
  353. package/src/ext/process-scorecard.ts +0 -13
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useCodeWalkthroughSteps = useCodeWalkthroughSteps;
4
+ exports.getGroupMarkers = getGroupMarkers;
4
5
  const react_1 = require("react");
5
6
  const react_router_dom_1 = require("react-router-dom");
6
7
  const utils_1 = require("../../../core/utils");
7
8
  const constants_1 = require("../../../core/constants");
8
- function useCodeWalkthroughSteps(steps, enableDeepLink) {
9
+ function useCodeWalkthroughSteps({ steps, enableDeepLink, root, }) {
9
10
  const location = (0, react_router_dom_1.useLocation)();
10
11
  const navigate = (0, react_router_dom_1.useNavigate)();
11
12
  const searchParams = (0, react_1.useMemo)(() => new URLSearchParams(location.search), [location.search]);
@@ -15,56 +16,122 @@ function useCodeWalkthroughSteps(steps, enableDeepLink) {
15
16
  // Track observed elements in case new observer needs to be created
16
17
  const observedElementsRef = (0, react_1.useRef)(new Set());
17
18
  const [activeStep, setActiveStep] = (0, react_1.useState)(enableDeepLink ? searchParams.get(constants_1.ACTIVE_STEP_QUERY_PARAM) : null);
18
- // eslint-disable-next-line react-hooks/exhaustive-deps
19
- const _steps = (0, react_1.useMemo)(() => steps, [JSON.stringify(steps)]);
20
- const register = (0, react_1.useCallback)((element) => {
21
- // for some reason, the observer is not ready immediately
22
- setTimeout(() => {
23
- if (observerRef.current) {
24
- const stepKey = Number(element.dataset.stepKey);
25
- if (Number.isInteger(stepKey) && stepKey >= 0 && _steps[stepKey]) {
26
- _steps[stepKey].compRef = element;
27
- }
28
- observerRef.current.observe(element);
29
- observedElementsRef.current.add(element);
19
+ const stepsMap = (0, react_1.useMemo)(() => {
20
+ const map = new Map();
21
+ steps.forEach((step, index) => {
22
+ map.set(step.id, Object.assign(Object.assign({}, step), { index }));
23
+ });
24
+ return map;
25
+ // eslint-disable-next-line react-hooks/exhaustive-deps
26
+ }, [JSON.stringify(steps)]);
27
+ const options = (0, react_1.useMemo)(() => {
28
+ var _a, _b;
29
+ if (!(0, utils_1.isBrowser)()) {
30
+ return null;
31
+ }
32
+ const filtersElementHeight = ((_a = filtersElementRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
33
+ const navbarHeight = ((_b = document.querySelector('nav')) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().height) || 0;
34
+ return {
35
+ filtersElementHeight,
36
+ navbarHeight,
37
+ };
38
+ }, []);
39
+ const [visibleSteps, setVisibleSteps] = (0, react_1.useState)([]);
40
+ const [markers, setMarkers] = (0, react_1.useState)({});
41
+ (0, react_1.useEffect)(() => {
42
+ var _a, _b, _c, _d, _e;
43
+ if (!root.current || !visibleSteps.length || !options) {
44
+ return;
45
+ }
46
+ const markersMinTopOffset = options.filtersElementHeight + options.navbarHeight;
47
+ const rootHeight = (_b = (_a = root.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0;
48
+ const lastStepOffset = (_e = (_d = (_c = visibleSteps[visibleSteps.length - 1]) === null || _c === void 0 ? void 0 : _c.compRef) === null || _d === void 0 ? void 0 : _d.offsetTop) !== null && _e !== void 0 ? _e : 0;
49
+ const deficit = Math.max(lastStepOffset - (rootHeight - window.innerHeight), 0);
50
+ const groups = getGroups(visibleSteps);
51
+ let markers = groups.flatMap((group) => getGroupMarkers(group));
52
+ if (deficit) {
53
+ const startOffset = markersMinTopOffset;
54
+ const endOffset = Math.max(rootHeight - window.innerHeight, 0);
55
+ markers = distributeMarkers({
56
+ endOffset,
57
+ markers,
58
+ startOffset: markersMinTopOffset < endOffset ? startOffset : 0,
59
+ });
60
+ }
61
+ setMarkers(markers.reduce((acc, marker, index) => {
62
+ var _a;
63
+ const step = visibleSteps[index];
64
+ acc[step.id] = {
65
+ offset: marker,
66
+ height: markers[index + 1] || !step.compRef
67
+ ? ((_a = markers[index + 1]) !== null && _a !== void 0 ? _a : rootHeight) - marker
68
+ : step.compRef.clientHeight,
69
+ };
70
+ return acc;
71
+ }, {}));
72
+ // eslint-disable-next-line react-hooks/exhaustive-deps
73
+ }, [visibleSteps, root.current, options]);
74
+ const registerMarker = (0, react_1.useCallback)((stepId, element) => {
75
+ if (observerRef.current) {
76
+ const step = stepsMap.get(stepId);
77
+ if (step) {
78
+ step.markerRef = element;
30
79
  }
31
- }, 10);
32
- }, [_steps]);
33
- const unregister = (0, react_1.useCallback)((element) => {
80
+ observerRef.current.observe(element);
81
+ observedElementsRef.current.add(element);
82
+ }
83
+ }, [stepsMap]);
84
+ const removeMarker = (0, react_1.useCallback)((stepId, element) => {
34
85
  if (observerRef.current) {
35
- const stepKey = Number(element.dataset.stepKey);
36
- if (Number.isInteger(stepKey) && stepKey >= 0 && _steps[stepKey]) {
37
- _steps[stepKey].compRef = undefined;
86
+ const step = stepsMap.get(stepId);
87
+ if (step) {
88
+ step.markerRef = undefined;
38
89
  }
39
90
  observerRef.current.unobserve(element);
40
91
  observedElementsRef.current.delete(element);
41
92
  }
42
- }, [_steps]);
93
+ }, [stepsMap]);
94
+ const registerStep = (0, react_1.useCallback)((stepId, element) => {
95
+ const step = stepsMap.get(stepId);
96
+ if (!step) {
97
+ return;
98
+ }
99
+ step.compRef = element;
100
+ setVisibleSteps((prevSteps) => (0, utils_1.insertAt)(prevSteps, step.index, step));
101
+ }, [stepsMap]);
102
+ const removeStep = (0, react_1.useCallback)((stepId) => {
103
+ const step = stepsMap.get(stepId);
104
+ if (!step) {
105
+ return;
106
+ }
107
+ step.compRef = undefined;
108
+ setVisibleSteps((prevSteps) => (0, utils_1.removeElement)(prevSteps, step));
109
+ setActiveStep((prevStep) => (prevStep === stepId ? null : prevStep));
110
+ }, [stepsMap]);
43
111
  const observerCallback = (0, react_1.useCallback)((entries) => {
44
112
  var _a, _b, _c;
45
- if (lockObserver.current) {
113
+ if (lockObserver.current || !visibleSteps.length) {
46
114
  return;
47
115
  }
48
- const renderedSteps = _steps.filter((step) => Boolean(step.compRef));
49
- if (renderedSteps.length < 2) {
50
- setActiveStep(((_a = renderedSteps[0]) === null || _a === void 0 ? void 0 : _a.id) || null);
116
+ if (visibleSteps.length < 2) {
117
+ setActiveStep(((_a = visibleSteps[0]) === null || _a === void 0 ? void 0 : _a.id) || null);
51
118
  return;
52
119
  }
53
120
  for (const entry of entries) {
54
- const stepKey = Number((_c = (_b = entry.target) === null || _b === void 0 ? void 0 : _b.dataset) === null || _c === void 0 ? void 0 : _c.stepKey);
55
- if (!Number.isInteger(stepKey) || stepKey < 0) {
121
+ const stepId = (_c = (_b = entry.target) === null || _b === void 0 ? void 0 : _b.dataset) === null || _c === void 0 ? void 0 : _c.stepId;
122
+ if (!stepId) {
56
123
  continue;
57
124
  }
58
125
  const { intersectionRatio, boundingClientRect, rootBounds, isIntersecting } = entry;
59
- const step = _steps[stepKey];
60
- const stepIndex = renderedSteps.findIndex((renderedStep) => renderedStep.stepKey === step.stepKey);
61
- const { next } = (0, utils_1.getAdjacentValues)(renderedSteps, stepIndex);
126
+ const step = stepsMap.get(stepId);
127
+ if (!step) {
128
+ continue;
129
+ }
130
+ const stepIndex = visibleSteps.findIndex((renderedStep) => renderedStep.id === stepId);
131
+ const { next } = (0, utils_1.getAdjacentValues)(visibleSteps, stepIndex);
62
132
  const intersectionAtTop = (rootBounds === null || rootBounds === void 0 ? void 0 : rootBounds.bottom) !== undefined && boundingClientRect.top < rootBounds.top;
63
133
  const stepGoesIn = isIntersecting;
64
- if (intersectionRatio > 0.8 &&
65
- intersectionRatio < 1 &&
66
- intersectionAtTop &&
67
- activeStep === null) {
134
+ if (intersectionRatio > 0.8 && intersectionRatio < 1 && intersectionAtTop) {
68
135
  setActiveStep(step.id);
69
136
  break;
70
137
  }
@@ -76,28 +143,37 @@ function useCodeWalkthroughSteps(steps, enableDeepLink) {
76
143
  else if (next) {
77
144
  newStep = next.id;
78
145
  }
79
- if (newStep !== activeStep) {
80
- setActiveStep(newStep);
81
- }
146
+ setActiveStep((prevStep) => newStep || prevStep);
82
147
  break;
83
148
  }
84
149
  }
85
- }, [_steps, activeStep]);
150
+ }, [stepsMap, visibleSteps]);
86
151
  (0, react_1.useEffect)(() => {
87
- var _a, _b, _c;
88
- const filtersElementHeight = ((_a = filtersElementRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
89
- const navbarHeight = ((_b = document.querySelector('nav')) === null || _b === void 0 ? void 0 : _b.clientHeight) || 0;
152
+ var _a;
153
+ if (!options) {
154
+ return;
155
+ }
90
156
  const newObserver = new IntersectionObserver(observerCallback, {
91
- threshold: [0.8, 0.85, 0.9, 0.95],
92
- rootMargin: `-${filtersElementHeight + navbarHeight}px 0px 0px 0px`,
157
+ threshold: [0.3, 0.8, 0.9, 0.95],
158
+ rootMargin: `-${options.filtersElementHeight + options.navbarHeight}px 0px 0px 0px`,
93
159
  });
94
- for (const observedElement of observedElementsRef.current) {
160
+ for (const observedElement of observedElementsRef.current.values()) {
95
161
  newObserver.observe(observedElement);
96
162
  }
97
- // Unobserve all from the old observer
98
- (_c = observerRef.current) === null || _c === void 0 ? void 0 : _c.disconnect();
163
+ (_a = observerRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
99
164
  observerRef.current = newObserver;
100
- }, [observerCallback]);
165
+ }, [observerCallback, markers, options]);
166
+ (0, react_1.useEffect)(() => {
167
+ var _a, _b, _c;
168
+ if (!options) {
169
+ return;
170
+ }
171
+ const rootTopOffset = (_b = (_a = root.current) === null || _a === void 0 ? void 0 : _a.offsetTop) !== null && _b !== void 0 ? _b : 0;
172
+ if (!activeStep && rootTopOffset <= options.navbarHeight) {
173
+ setActiveStep(((_c = visibleSteps[0]) === null || _c === void 0 ? void 0 : _c.id) || null);
174
+ }
175
+ // eslint-disable-next-line react-hooks/exhaustive-deps
176
+ }, [activeStep, root.current, options, visibleSteps]);
101
177
  /**
102
178
  * Update the URL search params with the current state of the filters and inputs
103
179
  */
@@ -118,6 +194,125 @@ function useCodeWalkthroughSteps(steps, enableDeepLink) {
118
194
  navigate({ search: newSearch }, { replace: true });
119
195
  // eslint-disable-next-line react-hooks/exhaustive-deps
120
196
  }, [activeStep]);
121
- return { register, unregister, lockObserver, filtersElementRef, activeStep, setActiveStep };
197
+ return {
198
+ registerStep,
199
+ removeStep,
200
+ markers,
201
+ registerMarker,
202
+ removeMarker,
203
+ lockObserver,
204
+ filtersElementRef,
205
+ activeStep,
206
+ setActiveStep,
207
+ };
208
+ }
209
+ /**
210
+ * This function analyzes the offset and height of each step to determine
211
+ * when a new group should be created. A new group is started when there is a free space
212
+ * between the two steps, treating it as the content of the next group header.
213
+ *
214
+ * @param steps - An array of `CodeWalkthroughStep` objects
215
+ *
216
+ * @returns An array of `StepsGroup` objects, each containing the offset from the top of the relative
217
+ * block, the free space at the top of the group, the total space used by the steps within the group
218
+ * and the steps themselves with relative offset and height.
219
+ */
220
+ function getGroups(steps) {
221
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
222
+ if (!steps.length) {
223
+ return [];
224
+ }
225
+ const firstStepOffset = (_c = (_b = (_a = steps[0]) === null || _a === void 0 ? void 0 : _a.compRef) === null || _b === void 0 ? void 0 : _b.offsetTop) !== null && _c !== void 0 ? _c : 0;
226
+ const firstStepHeight = (_f = (_e = (_d = steps[0]) === null || _d === void 0 ? void 0 : _d.compRef) === null || _e === void 0 ? void 0 : _e.clientHeight) !== null && _f !== void 0 ? _f : 0;
227
+ const secondStepOffset = (_j = (_h = (_g = steps[1]) === null || _g === void 0 ? void 0 : _g.compRef) === null || _h === void 0 ? void 0 : _h.offsetTop) !== null && _j !== void 0 ? _j : 0;
228
+ const margin = Math.max(secondStepOffset - firstStepOffset - firstStepHeight, 0);
229
+ let groupIndex = 0;
230
+ const groups = [
231
+ {
232
+ offset: 0,
233
+ freeSpace: firstStepOffset,
234
+ usedSpace: 0,
235
+ steps: [],
236
+ },
237
+ ];
238
+ for (let i = 0; i < steps.length; i++) {
239
+ let currentGroup = groups[groupIndex];
240
+ const step = steps[i];
241
+ const stepHeight = (_l = (_k = step.compRef) === null || _k === void 0 ? void 0 : _k.clientHeight) !== null && _l !== void 0 ? _l : 0;
242
+ const stepOffset = (_o = (_m = step.compRef) === null || _m === void 0 ? void 0 : _m.offsetTop) !== null && _o !== void 0 ? _o : 0;
243
+ const prevStepOffset = currentGroup.freeSpace + currentGroup.usedSpace;
244
+ if (prevStepOffset !== Math.max(stepOffset - currentGroup.offset, 0)) {
245
+ const offset = currentGroup.offset + currentGroup.freeSpace + currentGroup.usedSpace;
246
+ groupIndex++;
247
+ groups[groupIndex] = {
248
+ offset,
249
+ freeSpace: Math.max(stepOffset - offset, 0),
250
+ usedSpace: 0,
251
+ steps: [],
252
+ };
253
+ currentGroup = groups[groupIndex];
254
+ }
255
+ currentGroup.steps.push({
256
+ offset: stepOffset - currentGroup.offset,
257
+ height: stepHeight,
258
+ ref: step.compRef,
259
+ });
260
+ currentGroup.usedSpace += stepHeight + margin;
261
+ }
262
+ return groups;
263
+ }
264
+ function getGroupMarkers(group) {
265
+ if (!group.steps.length) {
266
+ return [];
267
+ }
268
+ if (group.steps.length === 1) {
269
+ return [group.offset + group.steps[0].offset - group.freeSpace];
270
+ }
271
+ const availableFreeSpace = group.freeSpace > 0.3 * window.innerHeight ? 0.3 * window.innerHeight : group.freeSpace;
272
+ const unusedFreeSpace = group.freeSpace - availableFreeSpace;
273
+ const lastStepOffset = group.steps[group.steps.length - 1].offset;
274
+ // distribute group free space between steps
275
+ return distributeMarkers({
276
+ startOffset: 0,
277
+ endOffset: lastStepOffset - unusedFreeSpace,
278
+ markers: group.steps.map((step) => step.offset),
279
+ additionalSteps: [(marker) => group.offset + unusedFreeSpace + marker],
280
+ });
281
+ }
282
+ /**
283
+ * Distribute markers preserving the relationship throughout the available space
284
+ * @param startOffset - the starting point of the available space
285
+ * @param endOffset - the end point of the available space
286
+ * @param markers - the markers to distribute
287
+ * @param additionalSteps - additional steps to apply to the markers
288
+ *
289
+ * @returns array of markers positions
290
+ */
291
+ function distributeMarkers({ endOffset, markers, startOffset, additionalSteps = [], }) {
292
+ return markers.map((marker) => {
293
+ const normalizedOffset = getNormalizedNumber({
294
+ min: markers[0],
295
+ max: markers[markers.length - 1],
296
+ value: marker,
297
+ });
298
+ const availableSpace = endOffset - startOffset;
299
+ let result = startOffset + normalizedOffset * availableSpace;
300
+ for (const additionalStep of additionalSteps) {
301
+ result = additionalStep(result);
302
+ }
303
+ return result;
304
+ });
305
+ }
306
+ /**
307
+ * Normalize a number between a min and max value
308
+ * @param min - the minimum value of the distribution
309
+ * @param max - the maximum value of the distribution
310
+ * @param value - the value to normalize
311
+ *
312
+ * @returns normalized number between 0 and 1
313
+ */
314
+ function getNormalizedNumber(options) {
315
+ const { min, max, value } = options;
316
+ return (value - min) / (max - min);
122
317
  }
123
318
  //# sourceMappingURL=use-code-walkthrough-steps.js.map
@@ -1,9 +1,16 @@
1
1
  import type { CodeWalkthroughFile, CodeWalkthroughStepAttr, CodeWalkthroughAttr } from '@redocly/config';
2
- import { type WalkthroughControlsState, type WalkthroughStepsState } from '../../../core/hooks';
2
+ import type { WalkthroughStepsState } from '../../../core/types';
3
+ import { type WalkthroughControlsState } from '../../../core/hooks';
3
4
  export type WalkthroughState = {
4
5
  stepsState: WalkthroughStepsState;
5
6
  controlsState: WalkthroughControlsState;
6
7
  downloadAssociatedFiles: CodeWalkthroughFile[];
7
8
  files: CodeWalkthroughFile[];
8
9
  };
9
- export declare function useCodeWalkthrough(steps: CodeWalkthroughStepAttr[], attributes: Omit<CodeWalkthroughAttr, 'steps' | 'preview'>): WalkthroughState;
10
+ type Params = {
11
+ steps: CodeWalkthroughStepAttr[];
12
+ attributes: Omit<CodeWalkthroughAttr, 'steps' | 'preview'>;
13
+ root: React.RefObject<HTMLDivElement | null>;
14
+ };
15
+ export declare function useCodeWalkthrough({ steps, attributes, root }: Params): WalkthroughState;
16
+ export {};
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useCodeWalkthrough = useCodeWalkthrough;
4
4
  const hooks_1 = require("../../../core/hooks");
5
- function useCodeWalkthrough(steps, attributes) {
5
+ function useCodeWalkthrough({ steps, attributes, root }) {
6
6
  const { filters, filesets, inputs, toggles, __idx } = attributes;
7
7
  /*
8
8
  We only enable deep linking for the first CodeWalkthrough,
@@ -11,7 +11,7 @@ function useCodeWalkthrough(steps, attributes) {
11
11
  collisions/conflicts in the URL.
12
12
  */
13
13
  const enableDeepLink = __idx === 1;
14
- const stepsState = (0, hooks_1.useCodeWalkthroughSteps)(steps, enableDeepLink);
14
+ const stepsState = (0, hooks_1.useCodeWalkthroughSteps)({ steps, enableDeepLink, root });
15
15
  const controlsState = (0, hooks_1.useCodeWalkthroughControls)(filters, inputs, toggles, enableDeepLink);
16
16
  const files = filesets
17
17
  .filter((fileset) => controlsState.areConditionsMet(fileset))
@@ -36,5 +36,7 @@ export * from '../../core/hooks/code-walkthrough/use-renderable-files';
36
36
  export * from '../../core/hooks/use-element-size';
37
37
  export * from '../../core/hooks/use-time-ago';
38
38
  export * from '../../core/hooks/use-input-key-commands';
39
- export * from '../../core/hooks/use-page-active-version';
39
+ export * from '../../core/hooks/catalog/useCatalogEntities';
40
+ export * from '../../core/hooks/use-active-page-version';
40
41
  export * from '../../core/hooks/use-page-versions';
42
+ export * from '../../core/hooks/use-user-teams';
@@ -52,6 +52,8 @@ __exportStar(require("../../core/hooks/code-walkthrough/use-renderable-files"),
52
52
  __exportStar(require("../../core/hooks/use-element-size"), exports);
53
53
  __exportStar(require("../../core/hooks/use-time-ago"), exports);
54
54
  __exportStar(require("../../core/hooks/use-input-key-commands"), exports);
55
- __exportStar(require("../../core/hooks/use-page-active-version"), exports);
55
+ __exportStar(require("../../core/hooks/catalog/useCatalogEntities"), exports);
56
+ __exportStar(require("../../core/hooks/use-active-page-version"), exports);
56
57
  __exportStar(require("../../core/hooks/use-page-versions"), exports);
58
+ __exportStar(require("../../core/hooks/use-user-teams"), exports);
57
59
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ export declare function useActivePageVersion(): string | undefined;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usePageActiveVersion = usePageActiveVersion;
3
+ exports.useActivePageVersion = useActivePageVersion;
4
4
  const hooks_1 = require("../../core/hooks");
5
- function usePageActiveVersion() {
5
+ function useActivePageVersion() {
6
6
  const { usePageVersions } = (0, hooks_1.useThemeHooks)();
7
7
  const { versions } = usePageVersions();
8
8
  const activeVersion = versions.find((version) => version.active);
9
9
  return activeVersion === null || activeVersion === void 0 ? void 0 : activeVersion.version;
10
10
  }
11
- //# sourceMappingURL=use-page-active-version.js.map
11
+ //# sourceMappingURL=use-active-page-version.js.map
@@ -0,0 +1 @@
1
+ export declare function useUserTeams(): string[];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useUserTeams = useUserTeams;
4
+ const hooks_1 = require("../../core/hooks");
5
+ function useUserTeams() {
6
+ const { useUserTeams } = (0, hooks_1.useThemeHooks)();
7
+ const userTeams = useUserTeams();
8
+ return userTeams;
9
+ }
10
+ //# sourceMappingURL=use-user-teams.js.map
@@ -12,6 +12,7 @@ const variables_dark_7 = require("../../components/Tag/variables.dark");
12
12
  const variables_dark_8 = require("../../components/StatusCode/variables.dark");
13
13
  const variables_dark_9 = require("../../components/Switch/variables.dark");
14
14
  const variables_dark_10 = require("../../markdoc/components/Cards/variables.dark");
15
+ const variables_dark_11 = require("../../components/Catalog/variables.dark");
15
16
  const replayDarkMode = (0, styled_components_1.css) `
16
17
  /**
17
18
  * @tokens Replay Colors
@@ -314,6 +315,7 @@ exports.darkMode = (0, styled_components_1.css) `
314
315
  ${replayDarkMode}
315
316
  ${variables_dark_9.switcherDarkMode}
316
317
  ${variables_dark_10.cardsDarkMode}
318
+ ${variables_dark_11.catalogDarkMode}
317
319
 
318
320
  /**
319
321
  * @tokens Dark Theme Scrollbar Config
@@ -10,35 +10,37 @@ const variables_4 = require("../../components/Sidebar/variables");
10
10
  const variables_5 = require("../../components/Breadcrumbs/variables");
11
11
  const variables_6 = require("../../components/Tag/variables");
12
12
  const variables_7 = require("../../components/TableOfContent/variables");
13
- const variables_8 = require("../../components/Filter/variables");
14
- const variables_9 = require("../../components/CatalogClassic/variables");
15
- const variables_10 = require("../../components/Panel/variables");
16
- const variables_11 = require("../../components/Select/variables");
17
- const variables_12 = require("../../components/Dropdown/variables");
18
- const variables_13 = require("../../components/Tooltip/variables");
19
- const variables_14 = require("../../icons/CheckboxIcon/variables");
20
- const variables_15 = require("../../components/Admonition/variables");
21
- const variables_16 = require("../../components/Footer/variables");
22
- const variables_17 = require("../../components/Button/variables");
23
- const variables_18 = require("../../components/Navbar/variables");
24
- const variables_19 = require("../../components/Search/variables");
25
- const variables_20 = require("../../components/Menu/variables");
26
- const variables_21 = require("../../components/CodeBlock/variables");
27
- const variables_22 = require("../../components/Product/variables");
28
- const variables_23 = require("../../components/Markdown/variables");
29
- const variables_24 = require("../../markdoc/components/Tabs/variables");
30
- const variables_25 = require("../../markdoc/components/Mermaid/variables");
31
- const variables_26 = require("../../components/LastUpdated/variables");
32
- const variables_27 = require("../../components/Logo/variables");
33
- const variables_28 = require("../../components/StatusCode/variables");
34
- const variables_29 = require("../../components/Segmented/variables");
35
- const variables_30 = require("../../components/UserMenu/variables");
36
- const variables_31 = require("../../components/Tags/variables");
37
- const variables_32 = require("../../components/VersionPicker/variables");
38
- const variables_33 = require("../../components/DatePicker/variables");
39
- const variables_34 = require("../../components/Switch/variables");
40
- const variables_35 = require("../../markdoc/components/Cards/variables");
41
- const variables_36 = require("../../markdoc/components/CodeWalkthrough/variables");
13
+ const variables_8 = require("../../components/Catalog/variables");
14
+ const variables_9 = require("../../components/Filter/variables");
15
+ const variables_10 = require("../../components/CatalogClassic/variables");
16
+ const variables_11 = require("../../components/Panel/variables");
17
+ const variables_12 = require("../../components/Select/variables");
18
+ const variables_13 = require("../../components/Dropdown/variables");
19
+ const variables_14 = require("../../components/Tooltip/variables");
20
+ const variables_15 = require("../../icons/CheckboxIcon/variables");
21
+ const variables_16 = require("../../components/Admonition/variables");
22
+ const variables_17 = require("../../components/Footer/variables");
23
+ const variables_18 = require("../../components/Button/variables");
24
+ const variables_19 = require("../../components/Navbar/variables");
25
+ const variables_20 = require("../../components/Search/variables");
26
+ const variables_21 = require("../../components/Menu/variables");
27
+ const variables_22 = require("../../components/CodeBlock/variables");
28
+ const variables_23 = require("../../components/Product/variables");
29
+ const variables_24 = require("../../components/Markdown/variables");
30
+ const variables_25 = require("../../markdoc/components/Tabs/variables");
31
+ const variables_26 = require("../../markdoc/components/Mermaid/variables");
32
+ const variables_27 = require("../../components/LastUpdated/variables");
33
+ const variables_28 = require("../../components/Logo/variables");
34
+ const variables_29 = require("../../components/StatusCode/variables");
35
+ const variables_30 = require("../../components/Segmented/variables");
36
+ const variables_31 = require("../../components/UserMenu/variables");
37
+ const variables_32 = require("../../components/Tags/variables");
38
+ const variables_33 = require("../../components/VersionPicker/variables");
39
+ const variables_34 = require("../../components/DatePicker/variables");
40
+ const variables_35 = require("../../components/Switch/variables");
41
+ const variables_36 = require("../../markdoc/components/Cards/variables");
42
+ const variables_37 = require("../../markdoc/components/CodeWalkthrough/variables");
43
+ const variables_38 = require("../../components/SkipContent/variables");
42
44
  const themeColors = (0, styled_components_1.css) `
43
45
  /* === Palette === */
44
46
  /**
@@ -367,6 +369,7 @@ const typography = (0, styled_components_1.css) `
367
369
  --font-size-base: 14px; // Base font size of the entire system.
368
370
  --font-size-sm: 12px;
369
371
  --font-size-lg: 16px;
372
+ --font-size-md: 18px;
370
373
  --font-size-xl: 20px;
371
374
 
372
375
  /**
@@ -1181,65 +1184,67 @@ const replay = (0, styled_components_1.css) `
1181
1184
  `;
1182
1185
  exports.styles = (0, styled_components_1.css) `
1183
1186
  :root {
1184
- ${variables_15.admonition}
1187
+ ${variables_16.admonition}
1185
1188
  ${apiReferenceDocs}
1186
- ${variables_10.apiReferencePanels}
1189
+ ${variables_11.apiReferencePanels}
1187
1190
  ${badges}
1188
1191
  ${borders}
1189
1192
  ${variables_5.breadcrumbs}
1190
- ${variables_17.button}
1191
- ${variables_35.cards}
1192
- ${variables_9.catalogClassic}
1193
- ${variables_21.code}
1194
- ${variables_36.codeWalkthrough}
1193
+ ${variables_18.button}
1194
+ ${variables_36.cards}
1195
+ ${variables_8.catalog}
1196
+ ${variables_10.catalogClassic}
1197
+ ${variables_22.code}
1198
+ ${variables_37.codeWalkthrough}
1195
1199
  ${docsDropdown}
1196
- ${variables_12.dropdown}
1200
+ ${variables_13.dropdown}
1197
1201
  ${error}
1198
- ${variables_8.filter}
1199
- ${variables_16.footer}
1202
+ ${variables_9.filter}
1203
+ ${variables_17.footer}
1200
1204
  ${headingsTypography}
1201
- ${variables_31.httpTag}
1205
+ ${variables_32.httpTag}
1202
1206
  ${inputs}
1203
1207
  ${variables_1.languagePicker}
1204
- ${variables_26.lastUpdated}
1208
+ ${variables_27.lastUpdated}
1205
1209
  ${links}
1206
1210
  ${loadProgressBar}
1207
- ${variables_27.logo}
1208
- ${variables_23.markdown}
1209
- ${variables_24.markdownTabs}
1210
- ${variables_25.mermaid}
1211
- ${variables_20.menu}
1212
- ${variables_20.mobileMenu}
1211
+ ${variables_28.logo}
1212
+ ${variables_24.markdown}
1213
+ ${variables_25.markdownTabs}
1214
+ ${variables_26.mermaid}
1215
+ ${variables_21.menu}
1216
+ ${variables_21.mobileMenu}
1213
1217
  ${modal}
1214
- ${variables_18.navbar}
1218
+ ${variables_19.navbar}
1215
1219
  ${pages}
1216
- ${variables_22.productPicker}
1217
- ${variables_10.responsePanelColors}
1218
- ${variables_19.search}
1219
- ${variables_11.select}
1220
+ ${variables_23.productPicker}
1221
+ ${variables_11.responsePanelColors}
1222
+ ${variables_20.search}
1223
+ ${variables_12.select}
1220
1224
  ${variables_4.sidebar}
1221
1225
  ${sizeAndSpace}
1222
1226
  ${variables_6.tag}
1223
1227
  ${themeColors}
1224
1228
  ${tile}
1225
1229
  ${variables_7.toc}
1226
- ${variables_13.tooltip}
1230
+ ${variables_14.tooltip}
1227
1231
  ${typography}
1228
- ${variables_30.userMenu}
1229
- ${variables_32.versionPicker}
1232
+ ${variables_31.userMenu}
1233
+ ${variables_33.versionPicker}
1230
1234
  ${zIndexDepth}
1231
1235
  ${scorecardColors}
1232
- ${variables_28.statusCode}
1236
+ ${variables_29.statusCode}
1233
1237
  ${tab}
1234
1238
  ${icon}
1235
1239
  ${tree}
1236
- ${variables_29.segmented}
1237
- ${variables_34.switcher}
1238
- ${variables_14.checkbox}
1240
+ ${variables_30.segmented}
1241
+ ${variables_35.switcher}
1242
+ ${variables_15.checkbox}
1239
1243
  ${variables_3.feedback}
1240
1244
  ${variables_2.scorecard}
1241
- ${variables_33.datePicker}
1245
+ ${variables_34.datePicker}
1242
1246
  ${replay}
1247
+ ${variables_38.skipContent}
1243
1248
 
1244
1249
  background-color: var(--bg-color);
1245
1250
  color: var(--text-color-primary);