@redocly/theme 0.56.0-rc.2 → 0.56.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 (343) hide show
  1. package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -1
  2. package/lib/components/Button/Button.d.ts +1 -1
  3. package/lib/components/Button/Button.js +3 -1
  4. package/lib/components/Button/ButtonGroup.d.ts +12 -0
  5. package/lib/components/Button/ButtonGroup.js +38 -0
  6. package/lib/components/Button/variables.js +32 -5
  7. package/lib/components/Catalog/Catalog.d.ts +1 -1
  8. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +11 -6
  9. package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +5 -1
  10. package/lib/components/Catalog/CatalogEntitiesEmptyState.js +25 -4
  11. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -3
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +17 -13
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +4 -2
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +15 -7
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +6 -6
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +18 -1
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.d.ts +6 -0
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +47 -0
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +8 -1
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +7 -1
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +2 -1
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +12 -5
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +1 -1
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +3 -3
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +7 -2
  26. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +6 -0
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +19 -0
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +1 -1
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -1
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +2 -1
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +4 -10
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +3 -1
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +2 -6
  34. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -2
  35. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +5 -5
  36. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +3 -3
  37. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +6 -0
  38. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +55 -0
  39. package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
  40. package/lib/components/Catalog/CatalogEntityIcon.js +22 -29
  41. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +2 -1
  42. package/lib/components/Catalog/CatalogEntityTypeIcon.js +11 -23
  43. package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +7 -0
  44. package/lib/components/Catalog/CatalogEntityTypeTag.js +40 -0
  45. package/lib/components/Catalog/CatalogPageDescription.js +3 -3
  46. package/lib/components/Catalog/CatalogSelector.d.ts +1 -1
  47. package/lib/components/Catalog/CatalogSelector.js +4 -3
  48. package/lib/components/Catalog/CatalogSortButton.js +6 -6
  49. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +1 -0
  50. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +3 -15
  51. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +1 -0
  52. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
  53. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +1 -5
  54. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +3 -3
  55. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +5 -32
  56. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +0 -2
  57. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +12 -37
  58. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +1 -0
  59. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +8 -4
  60. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +1 -1
  61. package/lib/components/Catalog/CatalogTagsWithTooltip.js +4 -4
  62. package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
  63. package/lib/components/Catalog/variables.js +42 -8
  64. package/lib/components/CodeBlock/CodeBlock.d.ts +16 -6
  65. package/lib/components/CodeBlock/CodeBlock.js +3 -2
  66. package/lib/components/CodeBlock/CodeBlockControls.d.ts +4 -3
  67. package/lib/components/CodeBlock/CodeBlockControls.js +35 -8
  68. package/lib/components/CodeBlock/CodeBlockDropdown.d.ts +3 -0
  69. package/lib/components/CodeBlock/CodeBlockDropdown.js +35 -0
  70. package/lib/components/CodeBlock/CodeBlockTabs.d.ts +2 -2
  71. package/lib/components/CodeBlock/CodeBlockTabs.js +18 -9
  72. package/lib/components/CodeBlock/variables.js +1 -1
  73. package/lib/components/Dropdown/Dropdown.js +1 -0
  74. package/lib/components/Dropdown/DropdownMenu.js +4 -0
  75. package/lib/components/Dropdown/variables.js +1 -0
  76. package/lib/components/Feedback/Feedback.js +1 -1
  77. package/lib/components/Filter/FilterCheckboxes.js +5 -2
  78. package/lib/components/Footer/FooterItem.js +4 -7
  79. package/lib/components/Footer/variables.js +2 -2
  80. package/lib/components/Image/Image.js +2 -0
  81. package/lib/components/Markdown/Markdown.js +9 -9
  82. package/lib/components/Markdown/styles/headingAnchor.js +0 -1
  83. package/lib/components/Menu/MenuItem.js +5 -5
  84. package/lib/components/Menu/variables.js +3 -1
  85. package/lib/components/Navbar/NavbarItem.js +8 -39
  86. package/lib/components/Navbar/variables.js +2 -2
  87. package/lib/components/PageActions/PageActions.d.ts +6 -0
  88. package/lib/components/PageActions/PageActions.js +104 -0
  89. package/lib/components/PageActions/PageActionsMenuItem.d.ts +7 -0
  90. package/lib/components/PageActions/PageActionsMenuItem.js +58 -0
  91. package/lib/components/PageActions/variables.d.ts +1 -0
  92. package/lib/components/PageActions/variables.dark.d.ts +1 -0
  93. package/lib/components/PageActions/variables.dark.js +9 -0
  94. package/lib/components/PageActions/variables.js +37 -0
  95. package/lib/components/Search/SearchDialog.js +2 -2
  96. package/lib/components/Select/variables.js +2 -2
  97. package/lib/components/TableOfContent/TableOfContent.js +15 -12
  98. package/lib/components/Tag/Tag.d.ts +2 -1
  99. package/lib/components/Tag/Tag.js +3 -3
  100. package/lib/components/Tag/variables.js +14 -0
  101. package/lib/core/constants/catalog.d.ts +1 -1
  102. package/lib/core/constants/common.d.ts +4 -0
  103. package/lib/core/constants/common.js +5 -1
  104. package/lib/core/contexts/CodeSnippetContext.d.ts +7 -0
  105. package/lib/core/contexts/CodeSnippetContext.js +23 -0
  106. package/lib/core/contexts/index.d.ts +1 -0
  107. package/lib/core/contexts/index.js +1 -0
  108. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
  109. package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
  110. package/lib/core/hooks/code-walkthrough/use-renderable-files.d.ts +1 -2
  111. package/lib/core/hooks/code-walkthrough/use-renderable-files.js +2 -2
  112. package/lib/core/hooks/index.d.ts +1 -0
  113. package/lib/core/hooks/index.js +1 -0
  114. package/lib/core/hooks/use-active-heading.d.ts +7 -2
  115. package/lib/core/hooks/use-active-heading.js +160 -23
  116. package/lib/core/hooks/use-active-section-id.d.ts +1 -1
  117. package/lib/core/hooks/use-active-section-id.js +2 -2
  118. package/lib/core/hooks/use-codeblock-tabs-controls.d.ts +2 -2
  119. package/lib/core/hooks/use-codeblock-tabs-controls.js +6 -6
  120. package/lib/core/hooks/use-local-state.d.ts +1 -0
  121. package/lib/core/hooks/use-local-state.js +32 -0
  122. package/lib/core/hooks/use-page-actions.d.ts +2 -0
  123. package/lib/core/hooks/use-page-actions.js +101 -0
  124. package/lib/core/hooks/use-theme-hooks.js +2 -0
  125. package/lib/core/styles/dark.js +2 -0
  126. package/lib/core/styles/global.js +2 -0
  127. package/lib/core/types/catalog.d.ts +5 -1
  128. package/lib/core/types/hooks.d.ts +2 -1
  129. package/lib/core/types/index.d.ts +1 -0
  130. package/lib/core/types/index.js +1 -0
  131. package/lib/core/types/l10n.d.ts +1 -1
  132. package/lib/core/types/page-actions.d.ts +15 -0
  133. package/lib/core/types/page-actions.js +3 -0
  134. package/lib/core/types/sidebar.d.ts +1 -0
  135. package/lib/core/types/telemetry.d.ts +5 -20
  136. package/lib/core/utils/download-code-walkthrough.js +27 -7
  137. package/lib/core/utils/enhanced-smoothstep.d.ts +5 -0
  138. package/lib/core/utils/enhanced-smoothstep.js +15 -0
  139. package/lib/core/utils/get-file-icon.d.ts +3 -2
  140. package/lib/core/utils/get-file-icon.js +109 -29
  141. package/lib/core/utils/icon-resolver.d.ts +28 -0
  142. package/lib/core/utils/icon-resolver.js +52 -0
  143. package/lib/core/utils/index.d.ts +4 -1
  144. package/lib/core/utils/index.js +4 -1
  145. package/lib/core/utils/lang-to-name.d.ts +1 -0
  146. package/lib/core/utils/lang-to-name.js +37 -0
  147. package/lib/core/utils/{text-transform.js → string.js} +1 -1
  148. package/lib/ext/configure.d.ts +1 -1
  149. package/lib/icons/CDNIcon/CDNIcon.d.ts +14 -0
  150. package/lib/icons/CDNIcon/CDNIcon.js +48 -0
  151. package/lib/icons/ChatGptIcon/ChatGptIcon.d.ts +9 -0
  152. package/lib/icons/ChatGptIcon/ChatGptIcon.js +22 -0
  153. package/lib/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.d.ts +9 -0
  154. package/lib/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.js +23 -0
  155. package/lib/icons/ClaudeIcon/ClaudeIcon.d.ts +9 -0
  156. package/lib/icons/ClaudeIcon/ClaudeIcon.js +22 -0
  157. package/lib/icons/GenericIcon/GenericIcon.d.ts +11 -0
  158. package/lib/icons/GenericIcon/GenericIcon.js +61 -0
  159. package/lib/icons/GraphqlIcon/GraphqlIcon.d.ts +9 -0
  160. package/lib/icons/GraphqlIcon/GraphqlIcon.js +36 -0
  161. package/lib/icons/GraphqlIcon/index.d.ts +1 -0
  162. package/lib/icons/GraphqlIcon/index.js +6 -0
  163. package/lib/icons/HexagonIcon/HexagonIcon.d.ts +9 -0
  164. package/lib/icons/HexagonIcon/HexagonIcon.js +22 -0
  165. package/lib/icons/MarkdownFullIcon/MarkdownFullIcon.d.ts +9 -0
  166. package/lib/icons/MarkdownFullIcon/MarkdownFullIcon.js +23 -0
  167. package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +9 -0
  168. package/lib/icons/MoleculesIcon/MoleculesIcon.js +22 -0
  169. package/lib/icons/NetworkIcon/NetworkIcon.d.ts +9 -0
  170. package/lib/icons/NetworkIcon/NetworkIcon.js +23 -0
  171. package/lib/icons/NoneIcon/NoneIcon.d.ts +9 -0
  172. package/lib/icons/NoneIcon/NoneIcon.js +17 -0
  173. package/lib/icons/NotesIcon/NotesIcon.d.ts +9 -0
  174. package/lib/icons/NotesIcon/NotesIcon.js +26 -0
  175. package/lib/icons/types.d.ts +6 -0
  176. package/lib/index.d.ts +7 -1
  177. package/lib/index.js +7 -1
  178. package/lib/layouts/CodeWalkthroughLayout.js +2 -2
  179. package/lib/layouts/DocumentationLayout.js +14 -10
  180. package/lib/markdoc/components/Cards/CardIcon.js +7 -19
  181. package/lib/markdoc/components/CodeGroup/CodeGroup.d.ts +4 -0
  182. package/lib/markdoc/components/CodeGroup/CodeGroup.js +72 -0
  183. package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +7 -4
  184. package/lib/markdoc/components/Heading/Heading.d.ts +2 -1
  185. package/lib/markdoc/components/Heading/Heading.js +21 -3
  186. package/lib/markdoc/components/Icon/Icon.d.ts +3 -0
  187. package/lib/markdoc/components/Icon/Icon.js +29 -0
  188. package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
  189. package/lib/markdoc/components/Tabs/Tab.js +5 -2
  190. package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -1
  191. package/lib/markdoc/components/Tabs/variables.js +2 -0
  192. package/lib/markdoc/components/default.d.ts +2 -0
  193. package/lib/markdoc/components/default.js +2 -0
  194. package/lib/markdoc/default.js +4 -0
  195. package/lib/markdoc/tags/card.js +1 -1
  196. package/lib/markdoc/tags/code-group.d.ts +2 -0
  197. package/lib/markdoc/tags/code-group.js +23 -0
  198. package/lib/markdoc/tags/code-snippet.js +1 -1
  199. package/lib/markdoc/tags/icon.d.ts +2 -0
  200. package/lib/markdoc/tags/icon.js +16 -0
  201. package/lib/markdoc/tags/tab.js +1 -0
  202. package/package.json +4 -4
  203. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  204. package/src/components/Button/Button.tsx +4 -2
  205. package/src/components/Button/ButtonGroup.tsx +53 -0
  206. package/src/components/Button/variables.ts +32 -5
  207. package/src/components/Catalog/Catalog.tsx +1 -1
  208. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +12 -6
  209. package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -4
  210. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +25 -17
  211. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +25 -9
  212. package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +12 -15
  213. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +39 -2
  214. package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +61 -0
  215. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +12 -1
  216. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +7 -1
  217. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +15 -4
  218. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +5 -1
  219. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +2 -3
  220. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +11 -3
  221. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +37 -0
  222. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +1 -1
  223. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +2 -0
  224. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +7 -23
  225. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +5 -6
  226. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +21 -13
  227. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +9 -2
  228. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +52 -0
  229. package/src/components/Catalog/CatalogEntityIcon.tsx +33 -33
  230. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +23 -28
  231. package/src/components/Catalog/CatalogEntityTypeTag.tsx +49 -0
  232. package/src/components/Catalog/CatalogPageDescription.tsx +5 -4
  233. package/src/components/Catalog/CatalogSelector.tsx +3 -1
  234. package/src/components/Catalog/CatalogSortButton.tsx +19 -20
  235. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +1 -0
  236. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +3 -17
  237. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +1 -0
  238. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +5 -8
  239. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +6 -36
  240. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +18 -46
  241. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +1 -0
  242. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +9 -4
  243. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +9 -5
  244. package/src/components/Catalog/CatalogViewModeToggle.tsx +1 -1
  245. package/src/components/Catalog/variables.ts +42 -8
  246. package/src/components/CodeBlock/CodeBlock.tsx +15 -5
  247. package/src/components/CodeBlock/CodeBlockControls.tsx +67 -26
  248. package/src/components/CodeBlock/CodeBlockDropdown.tsx +53 -0
  249. package/src/components/CodeBlock/CodeBlockTabs.tsx +29 -20
  250. package/src/components/CodeBlock/variables.ts +1 -1
  251. package/src/components/Dropdown/Dropdown.tsx +1 -0
  252. package/src/components/Dropdown/DropdownMenu.tsx +4 -0
  253. package/src/components/Dropdown/variables.ts +1 -0
  254. package/src/components/Feedback/Feedback.tsx +1 -1
  255. package/src/components/Filter/FilterCheckboxes.tsx +9 -2
  256. package/src/components/Footer/FooterItem.tsx +5 -12
  257. package/src/components/Footer/variables.ts +2 -2
  258. package/src/components/Image/Image.tsx +2 -0
  259. package/src/components/Markdown/Markdown.tsx +3 -3
  260. package/src/components/Markdown/styles/headingAnchor.ts +0 -1
  261. package/src/components/Menu/MenuItem.tsx +5 -5
  262. package/src/components/Menu/variables.ts +3 -1
  263. package/src/components/Navbar/NavbarItem.tsx +8 -17
  264. package/src/components/Navbar/variables.ts +2 -2
  265. package/src/components/PageActions/PageActions.tsx +110 -0
  266. package/src/components/PageActions/PageActionsMenuItem.tsx +73 -0
  267. package/src/components/PageActions/variables.dark.ts +6 -0
  268. package/src/components/PageActions/variables.ts +34 -0
  269. package/src/components/Search/SearchDialog.tsx +2 -2
  270. package/src/components/Select/variables.ts +2 -2
  271. package/src/components/TableOfContent/TableOfContent.tsx +33 -36
  272. package/src/components/Tag/Tag.tsx +11 -2
  273. package/src/components/Tag/variables.ts +14 -0
  274. package/src/core/constants/catalog.ts +1 -1
  275. package/src/core/constants/common.ts +4 -0
  276. package/src/core/contexts/CodeSnippetContext.tsx +31 -0
  277. package/src/core/contexts/index.ts +1 -0
  278. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  279. package/src/core/hooks/code-walkthrough/use-renderable-files.ts +3 -4
  280. package/src/core/hooks/index.ts +1 -0
  281. package/src/core/hooks/use-active-heading.ts +199 -28
  282. package/src/core/hooks/use-active-section-id.ts +2 -1
  283. package/src/core/hooks/use-codeblock-tabs-controls.ts +8 -8
  284. package/src/core/hooks/use-local-state.ts +30 -0
  285. package/src/core/hooks/use-page-actions.ts +115 -0
  286. package/src/core/hooks/use-theme-hooks.ts +2 -0
  287. package/src/core/styles/dark.ts +2 -1
  288. package/src/core/styles/global.ts +2 -0
  289. package/src/core/types/catalog.ts +5 -1
  290. package/src/core/types/hooks.ts +2 -0
  291. package/src/core/types/index.ts +1 -0
  292. package/src/core/types/l10n.ts +21 -0
  293. package/src/core/types/page-actions.ts +18 -0
  294. package/src/core/types/sidebar.ts +1 -0
  295. package/src/core/types/telemetry.ts +5 -13
  296. package/src/core/utils/download-code-walkthrough.ts +5 -4
  297. package/src/core/utils/enhanced-smoothstep.ts +14 -0
  298. package/src/core/utils/get-file-icon.tsx +94 -0
  299. package/src/core/utils/icon-resolver.ts +57 -0
  300. package/src/core/utils/index.ts +4 -1
  301. package/src/core/utils/lang-to-name.ts +35 -0
  302. package/src/ext/configure.ts +1 -1
  303. package/src/icons/CDNIcon/CDNIcon.tsx +47 -0
  304. package/src/icons/ChatGptIcon/ChatGptIcon.tsx +23 -0
  305. package/src/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.tsx +24 -0
  306. package/src/icons/ClaudeIcon/ClaudeIcon.tsx +23 -0
  307. package/src/icons/GenericIcon/GenericIcon.tsx +69 -0
  308. package/src/icons/GraphqlIcon/GraphqlIcon.tsx +81 -0
  309. package/src/icons/GraphqlIcon/index.ts +1 -0
  310. package/src/icons/HexagonIcon/HexagonIcon.tsx +23 -0
  311. package/src/icons/MarkdownFullIcon/MarkdownFullIcon.tsx +24 -0
  312. package/src/icons/MoleculesIcon/MoleculesIcon.tsx +23 -0
  313. package/src/icons/NetworkIcon/NetworkIcon.tsx +31 -0
  314. package/src/icons/NoneIcon/NoneIcon.tsx +17 -0
  315. package/src/icons/NotesIcon/NotesIcon.tsx +43 -0
  316. package/src/icons/types.ts +7 -0
  317. package/src/index.ts +7 -1
  318. package/src/layouts/CodeWalkthroughLayout.tsx +1 -1
  319. package/src/layouts/DocumentationLayout.tsx +23 -13
  320. package/src/markdoc/components/Cards/CardIcon.tsx +6 -21
  321. package/src/markdoc/components/CodeGroup/CodeGroup.tsx +78 -0
  322. package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +7 -4
  323. package/src/markdoc/components/Heading/Heading.tsx +22 -3
  324. package/src/markdoc/components/Icon/Icon.tsx +16 -0
  325. package/src/markdoc/components/Tabs/Tab.tsx +6 -1
  326. package/src/markdoc/components/Tabs/Tabs.tsx +1 -1
  327. package/src/markdoc/components/Tabs/variables.ts +2 -0
  328. package/src/markdoc/components/default.ts +2 -0
  329. package/src/markdoc/default.ts +4 -0
  330. package/src/markdoc/tags/card.ts +1 -1
  331. package/src/markdoc/tags/code-group.ts +21 -0
  332. package/src/markdoc/tags/code-snippet.ts +1 -1
  333. package/src/markdoc/tags/icon.ts +14 -0
  334. package/src/markdoc/tags/tab.ts +1 -0
  335. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
  336. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
  337. package/lib/ext/process-scorecard.d.ts +0 -5
  338. package/lib/ext/process-scorecard.js +0 -11
  339. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
  340. package/src/core/utils/get-file-icon.ts +0 -42
  341. package/src/ext/process-scorecard.ts +0 -13
  342. /package/lib/core/utils/{text-transform.d.ts → string.d.ts} +0 -0
  343. /package/src/core/utils/{text-transform.ts → string.ts} +0 -0
@@ -1,37 +1,117 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.getFileIconByExt = getFileIconByExt;
4
- const DocumentBlankIcon_1 = require("../../icons/DocumentBlankIcon/DocumentBlankIcon");
5
- const DocumentYamlIcon_1 = require("../../icons/DocumentYamlIcon/DocumentYamlIcon");
6
- const DocumentJsonIcon_1 = require("../../icons/DocumentJsonIcon/DocumentJsonIcon");
7
- const DocumentJsIcon_1 = require("../../icons/DocumentJsIcon/DocumentJsIcon");
8
- const DocumentTsIcon_1 = require("../../icons/DocumentTsIcon/DocumentTsIcon");
9
- const DocumentCssIcon_1 = require("../../icons/DocumentCssIcon/DocumentCssIcon");
10
- const DocumentHtmlIcon_1 = require("../../icons/DocumentHtmlIcon/DocumentHtmlIcon");
11
- const DocumentReactIcon_1 = require("../../icons/DocumentReactIcon/DocumentReactIcon");
12
- const DocumentMarkdownIcon_1 = require("../../icons/DocumentMarkdownIcon/DocumentMarkdownIcon");
13
- const DocumentGraphqlIcon_1 = require("../../icons/DocumentGraphqlIcon/DocumentGraphqlIcon");
14
- const DocumentPythonIcon_1 = require("../../icons/DocumentPythonIcon/DocumentPythonIcon");
15
- const DocumentShellIcon_1 = require("../../icons/DocumentShellIcon/DocumentShellIcon");
16
- const DocumentJavaIcon_1 = require("../../icons/DocumentJavaIcon/DocumentJavaIcon");
27
+ exports.getFileIconByLanguage = getFileIconByLanguage;
28
+ const React = __importStar(require("react"));
29
+ const CDNIcon_1 = require("../../icons/CDNIcon/CDNIcon");
30
+ // extension to icon name
17
31
  const fileIconMap = {
18
- yaml: DocumentYamlIcon_1.DocumentYamlIcon,
19
- yml: DocumentYamlIcon_1.DocumentYamlIcon,
20
- json: DocumentJsonIcon_1.DocumentJsonIcon,
21
- js: DocumentJsIcon_1.DocumentJsIcon,
22
- ts: DocumentTsIcon_1.DocumentTsIcon,
23
- css: DocumentCssIcon_1.DocumentCssIcon,
24
- html: DocumentHtmlIcon_1.DocumentHtmlIcon,
25
- jsx: DocumentReactIcon_1.DocumentReactIcon,
26
- tsx: DocumentReactIcon_1.DocumentReactIcon,
27
- md: DocumentMarkdownIcon_1.DocumentMarkdownIcon,
28
- graphql: DocumentGraphqlIcon_1.DocumentGraphqlIcon,
29
- gql: DocumentGraphqlIcon_1.DocumentGraphqlIcon,
30
- py: DocumentPythonIcon_1.DocumentPythonIcon,
31
- sh: DocumentShellIcon_1.DocumentShellIcon,
32
- java: DocumentJavaIcon_1.DocumentJavaIcon,
32
+ yaml: 'yaml',
33
+ yml: 'yaml',
34
+ json: 'json',
35
+ js: 'javascript',
36
+ ts: 'typescript',
37
+ css: 'css',
38
+ html: 'html',
39
+ jsx: 'react',
40
+ tsx: 'react',
41
+ md: 'markdown',
42
+ graphql: 'graphql',
43
+ gql: 'graphql',
44
+ py: 'python',
45
+ sh: 'console',
46
+ xsh: 'console',
47
+ nu: 'console',
48
+ java: 'java',
49
+ ps: 'powershell',
50
+ php: 'php_elephant',
51
+ go: 'go',
52
+ ruby: 'ruby',
53
+ swift: 'swift',
54
+ kotlin: 'kotlin',
55
+ rust: 'rust',
56
+ scala: 'scala',
57
+ elixir: 'elixir',
58
+ dart: 'dart',
59
+ http: 'http',
60
+ rest: 'http',
61
+ c: 'c',
62
+ h: 'c',
63
+ hpp: 'c',
64
+ cc: 'c',
65
+ cpp: 'c',
66
+ cxx: 'c',
67
+ 'c++': 'c',
68
+ sql: 'database',
69
+ hbs: 'handlebars',
70
+ cs: 'csharp',
71
+ csx: 'csharp',
72
+ csharp: 'csharp',
73
+ markdoc: 'markdoc',
74
+ mdoc: 'markdoc',
75
+ mdx: 'mdx',
76
+ };
77
+ // code block language to icon name, only for those when code extension is not available
78
+ const languageIconMap = {
79
+ bash: 'console',
80
+ python: 'python',
81
+ java: 'java',
82
+ graphql: 'graphql',
83
+ javascript: 'javascript',
84
+ typescript: 'typescript',
85
+ react: 'react',
86
+ markdown: 'markdown',
87
+ php: 'php_elephant',
88
+ ruby: 'ruby',
89
+ swift: 'swift',
90
+ kotlin: 'kotlin',
91
+ rust: 'rust',
92
+ scala: 'scala',
93
+ elixir: 'elixir',
94
+ dart: 'dart',
95
+ csharp: 'csharp',
96
+ objectivec: 'c',
97
+ perl: 'perl',
98
+ sql: 'database',
99
+ xml: 'xml',
100
+ vim: 'vim',
101
+ lua: 'lua',
102
+ zsh: 'console',
103
+ fish: 'console',
104
+ powershell: 'console',
105
+ handlebars: 'handlebars',
106
+ markdoc: 'markdoc',
107
+ mdx: 'mdx',
33
108
  };
34
109
  function getFileIconByExt(ext) {
35
- return fileIconMap[ext] || DocumentBlankIcon_1.DocumentBlankIcon;
110
+ const iconName = fileIconMap[ext] || 'document';
111
+ return React.createElement(CDNIcon_1.CDNIcon, { name: iconName, pack: "code", mode: "background" });
112
+ }
113
+ function getFileIconByLanguage(language) {
114
+ const iconName = fileIconMap[language] || languageIconMap[language] || 'document';
115
+ return React.createElement(CDNIcon_1.CDNIcon, { name: iconName, pack: "code", mode: "background" });
36
116
  }
37
117
  //# sourceMappingURL=get-file-icon.js.map
@@ -0,0 +1,28 @@
1
+ export type ResolvedIcon = {
2
+ type: 'link';
3
+ value: string;
4
+ } | {
5
+ type: 'font-awesome';
6
+ name: string;
7
+ style: string;
8
+ } | {
9
+ type: 'invalid';
10
+ reason: string;
11
+ };
12
+ /**
13
+ * Resolves an icon value from configuration into a structured object.
14
+ *
15
+ * Supports:
16
+ * - URLs (absolute or relative paths to image files)
17
+ * - Font Awesome icons in formats:
18
+ * - "solid camera" (style + name)
19
+ * - "camera" (name only, default style: 'regular')
20
+ *
21
+ * @param icon - The icon string from config.
22
+ * @returns A structured object describing the icon:
23
+ * - type: 'url' | 'font-awesome' | 'invalid'
24
+ * - value: for URLs
25
+ * - name and style: for Font Awesome icons
26
+ * - reason: for invalid entries
27
+ */
28
+ export declare function resolveIcon(icon?: string): ResolvedIcon;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveIcon = resolveIcon;
4
+ const FA_ICON_STYLES = ['solid', 'regular', 'duotone', 'brands'];
5
+ const FA_ICON_NAME_PATTERN = /^[a-z0-9-]+$/i;
6
+ /**
7
+ * Resolves an icon value from configuration into a structured object.
8
+ *
9
+ * Supports:
10
+ * - URLs (absolute or relative paths to image files)
11
+ * - Font Awesome icons in formats:
12
+ * - "solid camera" (style + name)
13
+ * - "camera" (name only, default style: 'regular')
14
+ *
15
+ * @param icon - The icon string from config.
16
+ * @returns A structured object describing the icon:
17
+ * - type: 'url' | 'font-awesome' | 'invalid'
18
+ * - value: for URLs
19
+ * - name and style: for Font Awesome icons
20
+ * - reason: for invalid entries
21
+ */
22
+ function resolveIcon(icon) {
23
+ if (!icon || typeof icon !== 'string') {
24
+ return { type: 'invalid', reason: 'Icon must be a non-empty string' };
25
+ }
26
+ const trimmed = icon.trim();
27
+ const isLink = trimmed.match(/\.(svg|png|jpg|jpeg|gif|ico|webp)$/) || /^https?:\/\//.test(trimmed);
28
+ if (isLink) {
29
+ return { type: 'link', value: trimmed };
30
+ }
31
+ const [first, second] = trimmed.split(/\s+/);
32
+ if (first) {
33
+ if (second) {
34
+ // Format: "style name" (e.g., "solid camera")
35
+ if (FA_ICON_STYLES.includes(first) && FA_ICON_NAME_PATTERN.test(second)) {
36
+ return { type: 'font-awesome', style: first, name: second };
37
+ }
38
+ else {
39
+ return { type: 'invalid', reason: 'Unrecognized icon format' };
40
+ }
41
+ }
42
+ else if (!FA_ICON_STYLES.includes(first) && FA_ICON_NAME_PATTERN.test(first)) {
43
+ return {
44
+ type: 'font-awesome',
45
+ name: first,
46
+ style: 'regular',
47
+ };
48
+ }
49
+ }
50
+ return { type: 'invalid', reason: 'Unrecognized icon format' };
51
+ }
52
+ //# sourceMappingURL=icon-resolver.js.map
@@ -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';
@@ -25,7 +25,7 @@ __exportStar(require("./color"), exports);
25
25
  __exportStar(require("./urls"), exports);
26
26
  __exportStar(require("./js-utils"), exports);
27
27
  __exportStar(require("./tags-parser"), exports);
28
- __exportStar(require("./text-transform"), exports);
28
+ __exportStar(require("./string"), exports);
29
29
  __exportStar(require("./dom"), exports);
30
30
  __exportStar(require("./markdoc"), exports);
31
31
  __exportStar(require("./attribute-parser"), exports);
@@ -49,4 +49,7 @@ __exportStar(require("./replace-inputs-with-value"), exports);
49
49
  __exportStar(require("./find-closest-common-directory"), exports);
50
50
  __exportStar(require("./get-user-agent"), exports);
51
51
  __exportStar(require("./parse-style-string"), exports);
52
+ __exportStar(require("./lang-to-name"), exports);
53
+ __exportStar(require("./enhanced-smoothstep"), exports);
54
+ __exportStar(require("./icon-resolver"), exports);
52
55
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ export declare function langToName(lang: string): string;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.langToName = langToName;
4
+ const string_1 = require("./string");
5
+ const languages = {
6
+ js: 'JavaScript',
7
+ ts: 'TypeScript',
8
+ jsx: 'React',
9
+ tsx: 'React',
10
+ html: 'HTML',
11
+ css: 'CSS',
12
+ sh: 'Shell',
13
+ java: 'Java',
14
+ py: 'Python',
15
+ graphql: 'GraphQL',
16
+ gql: 'GraphQL',
17
+ yaml: 'YAML',
18
+ yml: 'YAML',
19
+ json: 'JSON',
20
+ md: 'Markdown',
21
+ markdown: 'Markdown',
22
+ mermaid: 'Mermaid',
23
+ php: 'PHP',
24
+ javascript: 'JavaScript',
25
+ typescript: 'TypeScript',
26
+ react: 'React',
27
+ mdoc: 'Markdoc',
28
+ 'objective-c': 'Objective-C',
29
+ objectivec: 'Objective-C',
30
+ sql: 'SQL',
31
+ xml: 'XML',
32
+ csharp: 'C#',
33
+ };
34
+ function langToName(lang) {
35
+ return languages[lang] || (0, string_1.capitalize)(lang);
36
+ }
37
+ //# sourceMappingURL=lang-to-name.js.map
@@ -4,4 +4,4 @@ exports.capitalize = capitalize;
4
4
  function capitalize(input) {
5
5
  return input.charAt(0).toUpperCase() + input.slice(1);
6
6
  }
7
- //# sourceMappingURL=text-transform.js.map
7
+ //# sourceMappingURL=string.js.map
@@ -1,4 +1,4 @@
1
- import { UserClaims, OpenAPIServer } from '../index.js';
1
+ import { UserClaims, OpenAPIServer } from '../core/types';
2
2
  export type SecurityDetails = {
3
3
  password?: string;
4
4
  username?: string;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { CDNIconProps } from '../../icons/types';
3
+ export declare const CDNIcon: import("styled-components").StyledComponent<(props: CDNIconProps) => React.JSX.Element, any, {
4
+ 'data-component-name': string;
5
+ } & {
6
+ color?: string;
7
+ size?: string;
8
+ className?: string;
9
+ } & React.SVGProps<SVGSVGElement> & {
10
+ name: string;
11
+ type?: string;
12
+ pack?: "font-awesome" | "code";
13
+ mode?: "mask" | "background";
14
+ }, "data-component-name">;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.CDNIcon = void 0;
18
+ const react_1 = __importDefault(require("react"));
19
+ const styled_components_1 = __importDefault(require("styled-components"));
20
+ const utils_1 = require("../../core/utils");
21
+ const constants_1 = require("../../core/constants");
22
+ const Icon = (props) => {
23
+ const { name, type, pack, mode, color } = props, rest = __rest(props, ["name", "type", "pack", "mode", "color"]);
24
+ const cdnUrl = constants_1.ICONS_CDN_URL[pack || 'font-awesome'];
25
+ const typeSegment = pack === 'code' ? '' : type ? type + '/' : 'regular/';
26
+ const styleProps = mode === 'background'
27
+ ? {
28
+ backgroundImage: `url(${cdnUrl}/${typeSegment}${name}.svg)`,
29
+ backgroundRepeat: 'no-repeat',
30
+ backgroundPosition: 'center',
31
+ backgroundSize: 'contain',
32
+ }
33
+ : {
34
+ backgroundColor: color ? (0, utils_1.getCssColorVariable)(color) : 'currentColor',
35
+ maskImage: `url(${cdnUrl}/${typeSegment}${name}.svg)`,
36
+ maskRepeat: 'no-repeat',
37
+ maskPosition: 'center',
38
+ maskSize: 'contain',
39
+ };
40
+ return (react_1.default.createElement("svg", Object.assign({}, rest, { style: Object.assign(Object.assign({}, styleProps), { display: 'inline-block', verticalAlign: 'middle' }) })));
41
+ };
42
+ exports.CDNIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
43
+ 'data-component-name': 'icons/CDNIcon/CDNIcon',
44
+ })) `
45
+ height: ${({ size }) => size || 'var(--icon-height, 1em)'};
46
+ width: ${({ size }) => size || 'var(--icon-width, 1em)'};
47
+ `;
48
+ //# sourceMappingURL=CDNIcon.js.map
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { IconProps } from '../../icons/types';
3
+ export declare const ChatGptIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
4
+ 'data-component-name': string;
5
+ } & {
6
+ color?: string;
7
+ size?: string;
8
+ className?: string;
9
+ } & React.SVGProps<SVGSVGElement>, "data-component-name">;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ChatGptIcon = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const utils_1 = require("../../core/utils");
10
+ const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
11
+ react_1.default.createElement("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" })));
12
+ exports.ChatGptIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
13
+ 'data-component-name': 'icons/ChatGptIcon/ChatGptIcon',
14
+ })) `
15
+ path {
16
+ fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
17
+ }
18
+
19
+ height: ${({ size }) => size || '16px'};
20
+ width: ${({ size }) => size || '16px'};
21
+ `;
22
+ //# sourceMappingURL=ChatGptIcon.js.map
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { IconProps } from '../../icons/types';
3
+ export declare const CheckmarkOutlineIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
4
+ 'data-component-name': string;
5
+ } & {
6
+ color?: string;
7
+ size?: string;
8
+ className?: string;
9
+ } & React.SVGProps<SVGSVGElement>, "data-component-name">;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CheckmarkOutlineIcon = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const utils_1 = require("../../core/utils");
10
+ const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
11
+ react_1.default.createElement("path", { d: "M7 10.707L4.5 8.2065L5.2065 7.5L7 9.293L10.7925 5.5L11.5 6.2075L7 10.707Z" }),
12
+ react_1.default.createElement("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" })));
13
+ exports.CheckmarkOutlineIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
14
+ 'data-component-name': 'icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon',
15
+ })) `
16
+ path {
17
+ fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
18
+ }
19
+
20
+ height: ${({ size }) => size || '16px'};
21
+ width: ${({ size }) => size || '16px'};
22
+ `;
23
+ //# sourceMappingURL=CheckmarkOutlineIcon.js.map
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { IconProps } from '../../icons/types';
3
+ export declare const ClaudeIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
4
+ 'data-component-name': string;
5
+ } & {
6
+ color?: string;
7
+ size?: string;
8
+ className?: string;
9
+ } & React.SVGProps<SVGSVGElement>, "data-component-name">;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ClaudeIcon = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const utils_1 = require("../../core/utils");
10
+ const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
11
+ react_1.default.createElement("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" })));
12
+ exports.ClaudeIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
13
+ 'data-component-name': 'icons/ClaudeIcon/ClaudeIcon',
14
+ })) `
15
+ path {
16
+ fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
17
+ }
18
+
19
+ height: ${({ size }) => size || '16px'};
20
+ width: ${({ size }) => size || '16px'};
21
+ `;
22
+ //# sourceMappingURL=ClaudeIcon.js.map
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ export interface GenericIconProps {
3
+ icon: string | React.ReactNode;
4
+ srcSet?: string;
5
+ rawContent?: string;
6
+ size?: string;
7
+ color?: string;
8
+ alt?: string;
9
+ className?: string;
10
+ }
11
+ export declare function GenericIcon({ icon, srcSet, rawContent, size, color, alt, className, }: GenericIconProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.GenericIcon = GenericIcon;
30
+ const React = __importStar(require("react"));
31
+ const styled_components_1 = __importDefault(require("styled-components"));
32
+ const CDNIcon_1 = require("../../icons/CDNIcon/CDNIcon");
33
+ const utils_1 = require("../../core/utils");
34
+ const InlineSvg_1 = require("../../markdoc/components/InlineSvg/InlineSvg");
35
+ const Image_1 = require("../../components/Image/Image");
36
+ function GenericIcon({ icon, srcSet, rawContent, size, color, alt, className, }) {
37
+ if (srcSet) {
38
+ return React.createElement(Image_1.Image, { srcSet: srcSet, alt: alt, className: className });
39
+ }
40
+ const resolvedIcon = icon && typeof icon === 'string' ? (0, utils_1.resolveIcon)(icon) : null;
41
+ const iconComponent = rawContent ? (React.createElement(IconSvg, { fileRawContent: rawContent, className: className })) : (resolvedIcon === null || resolvedIcon === void 0 ? void 0 : resolvedIcon.type) === 'link' ? (React.createElement(IconImg, { src: resolvedIcon.value, alt: alt, className: className })) : (resolvedIcon === null || resolvedIcon === void 0 ? void 0 : resolvedIcon.type) === 'font-awesome' ? (React.createElement(CDNIcon_1.CDNIcon, { name: resolvedIcon.name, type: resolvedIcon.style, size: size, color: color, className: className })) : (icon);
42
+ return iconComponent;
43
+ }
44
+ const IconImg = styled_components_1.default.img `
45
+ width: var(--icon-width, 16px);
46
+ height: var(--icon-height, 16px);
47
+ display: inline-block;
48
+ object-fit: cover;
49
+ `;
50
+ const IconSvg = (0, styled_components_1.default)(InlineSvg_1.InlineSvg) `
51
+ width: var(--icon-width, 16px);
52
+ height: var(--icon-height, 16px);
53
+ display: inline-block;
54
+
55
+ svg {
56
+ width: 100%;
57
+ height: 100%;
58
+ fill: var(--icon-color, currentColor);
59
+ }
60
+ `;
61
+ //# sourceMappingURL=GenericIcon.js.map
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { IconProps } from '../../icons/types';
3
+ export declare const GraphqlIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
4
+ 'data-component-name': string;
5
+ } & {
6
+ color?: string;
7
+ size?: string;
8
+ className?: string;
9
+ } & React.SVGProps<SVGSVGElement>, "data-component-name">;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GraphqlIcon = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const utils_1 = require("../../core/utils");
10
+ const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ width: "14", height: "16", viewBox: "0 0 14 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { color: "#E535AB" }),
11
+ react_1.default.createElement("path", { d: "M0.723804 11.7744L1.29883 12.1064L7.70483 1.01125L7.1298 0.679253L0.723804 11.7744Z", fill: "#22242B" }),
12
+ react_1.default.createElement("path", { d: "M13.4043 10.8882H0.592285V11.5522H13.4043V10.8882Z", fill: "#E535AB" }),
13
+ react_1.default.createElement("path", { d: "M0.845506 11.2609L7.25391 14.9609L7.58591 14.3859L1.17751 10.6859L0.845506 11.2609Z", fill: "#E535AB" }),
14
+ react_1.default.createElement("path", { d: "M6.4124 1.61787L12.8208 5.31787L13.1528 4.74285L6.7444 1.04285L6.4124 1.61787Z", fill: "#E535AB" }),
15
+ react_1.default.createElement("path", { d: "M0.847688 4.74041L1.17969 5.31543L7.58809 1.61543L7.25609 1.04041L0.847688 4.74041Z", fill: "#E535AB" }),
16
+ react_1.default.createElement("path", { d: "M6.29664 1.01125L12.7026 12.1064L13.2777 11.7744L6.87166 0.679253L6.29664 1.01125Z", fill: "#E535AB" }),
17
+ react_1.default.createElement("path", { d: "M1.7641 4.2998H1.1001V11.6998H1.7641V4.2998Z", fill: "#E535AB" }),
18
+ react_1.default.createElement("path", { d: "M12.9003 4.2998H12.2363V11.6998H12.9003V4.2998Z", fill: "#E535AB" }),
19
+ react_1.default.createElement("path", { d: "M6.85111 14.1774L7.14111 14.6797L12.7147 11.4617L12.4247 10.9594L6.85111 14.1774Z", fill: "#E535AB" }),
20
+ react_1.default.createElement("path", { 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", fill: "#E535AB" }),
21
+ react_1.default.createElement("path", { 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", fill: "#E535AB" }),
22
+ react_1.default.createElement("path", { 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", fill: "#E535AB" }),
23
+ react_1.default.createElement("path", { 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", fill: "#E535AB" }),
24
+ react_1.default.createElement("path", { 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", fill: "#E535AB" }),
25
+ react_1.default.createElement("path", { 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", fill: "#E535AB" })));
26
+ exports.GraphqlIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
27
+ 'data-component-name': 'icons/GraphqlIcon/GraphqlIcon',
28
+ })) `
29
+ path {
30
+ fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
31
+ }
32
+
33
+ height: ${({ size }) => size || '16px'};
34
+ width: ${({ size }) => size || '16px'};
35
+ `;
36
+ //# sourceMappingURL=GraphqlIcon.js.map
@@ -0,0 +1 @@
1
+ export { GraphqlIcon } from '../../icons/GraphqlIcon/GraphqlIcon';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GraphqlIcon = void 0;
4
+ var GraphqlIcon_1 = require("../../icons/GraphqlIcon/GraphqlIcon");
5
+ Object.defineProperty(exports, "GraphqlIcon", { enumerable: true, get: function () { return GraphqlIcon_1.GraphqlIcon; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { IconProps } from '../../icons/types';
3
+ export declare const HexagonIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
4
+ 'data-component-name': string;
5
+ } & {
6
+ color?: string;
7
+ size?: string;
8
+ className?: string;
9
+ } & React.SVGProps<SVGSVGElement>, "data-component-name">;