@verdaccio/ui-components 5.0.0-next-9.23 → 5.0.0-next-9.25

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 (306) hide show
  1. package/README.md +20 -0
  2. package/build/api/use-data.d.ts +2 -2
  3. package/build/api/use-data.js +2 -2
  4. package/build/api/use-data.js.map +1 -1
  5. package/build/api/use-data.mjs +2 -2
  6. package/build/api/use-data.mjs.map +1 -1
  7. package/build/components/CopyClipboard/CopyToClipBoard.d.ts +1 -0
  8. package/build/components/CopyClipboard/CopyToClipBoard.js +36 -17
  9. package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
  10. package/build/components/CopyClipboard/CopyToClipBoard.mjs +36 -19
  11. package/build/components/CopyClipboard/CopyToClipBoard.mjs.map +1 -1
  12. package/build/components/CopyClipboard/utils.d.ts +2 -1
  13. package/build/components/CopyClipboard/utils.js +6 -4
  14. package/build/components/CopyClipboard/utils.js.map +1 -1
  15. package/build/components/CopyClipboard/utils.mjs +6 -4
  16. package/build/components/CopyClipboard/utils.mjs.map +1 -1
  17. package/build/components/DocsLink/DocsLink.d.ts +8 -0
  18. package/build/components/DocsLink/DocsLink.js +40 -0
  19. package/build/components/DocsLink/DocsLink.js.map +1 -0
  20. package/build/components/DocsLink/DocsLink.mjs +35 -0
  21. package/build/components/DocsLink/DocsLink.mjs.map +1 -0
  22. package/build/components/DocsLink/index.d.ts +1 -0
  23. package/build/components/DocsLink/index.js +3 -0
  24. package/build/components/DocsLink/index.mjs +1 -0
  25. package/build/components/Help/Help.d.ts +13 -0
  26. package/build/components/Help/Help.js +243 -36
  27. package/build/components/Help/Help.js.map +1 -1
  28. package/build/components/Help/Help.mjs +237 -39
  29. package/build/components/Help/Help.mjs.map +1 -1
  30. package/build/components/Help/styles.d.ts +29 -0
  31. package/build/components/Help/styles.js +86 -1
  32. package/build/components/Help/styles.js.map +1 -1
  33. package/build/components/Help/styles.mjs +82 -2
  34. package/build/components/Help/styles.mjs.map +1 -1
  35. package/build/components/Icons/Managers/Bun.d.ts +2 -0
  36. package/build/components/Icons/Managers/Bun2.js +18 -0
  37. package/build/components/Icons/Managers/Bun2.js.map +1 -0
  38. package/build/components/Icons/Managers/Bun2.mjs +16 -0
  39. package/build/components/Icons/Managers/Bun2.mjs.map +1 -0
  40. package/build/components/Icons/Managers/bun.js +6 -0
  41. package/build/components/Icons/Managers/bun.js.map +1 -0
  42. package/build/components/Icons/Managers/bun.mjs +6 -0
  43. package/build/components/Icons/Managers/bun.mjs.map +1 -0
  44. package/build/components/Icons/Managers/bun.svg +1 -0
  45. package/build/components/Icons/Managers/index.d.ts +1 -0
  46. package/build/components/Icons/Managers/index.js +2 -0
  47. package/build/components/Icons/Managers/index.mjs +2 -1
  48. package/build/components/Icons/index.js +3 -0
  49. package/build/components/Icons/index.mjs +3 -1
  50. package/build/components/Install/Install.d.ts +2 -0
  51. package/build/components/Install/Install.js +30 -2
  52. package/build/components/Install/Install.js.map +1 -1
  53. package/build/components/Install/Install.mjs +30 -3
  54. package/build/components/Install/Install.mjs.map +1 -1
  55. package/build/components/Install/InstallListItem.d.ts +2 -1
  56. package/build/components/Install/InstallListItem.js +17 -0
  57. package/build/components/Install/InstallListItem.js.map +1 -1
  58. package/build/components/Install/InstallListItem.mjs +17 -0
  59. package/build/components/Install/InstallListItem.mjs.map +1 -1
  60. package/build/components/Loading/PackageListSkeleton.d.ts +3 -0
  61. package/build/components/Loading/PackageListSkeleton.js +70 -0
  62. package/build/components/Loading/PackageListSkeleton.js.map +1 -0
  63. package/build/components/Loading/PackageListSkeleton.mjs +65 -0
  64. package/build/components/Loading/PackageListSkeleton.mjs.map +1 -0
  65. package/build/components/Loading/VersionSkeleton.d.ts +3 -0
  66. package/build/components/Loading/VersionSkeleton.js +119 -0
  67. package/build/components/Loading/VersionSkeleton.js.map +1 -0
  68. package/build/components/Loading/VersionSkeleton.mjs +111 -0
  69. package/build/components/Loading/VersionSkeleton.mjs.map +1 -0
  70. package/build/components/Loading/index.d.ts +2 -0
  71. package/build/components/Loading/index.js +4 -0
  72. package/build/components/Loading/index.mjs +4 -1
  73. package/build/components/Package/Package.js +5 -1
  74. package/build/components/Package/Package.js.map +1 -1
  75. package/build/components/Package/Package.mjs +6 -2
  76. package/build/components/Package/Package.mjs.map +1 -1
  77. package/build/components/Package/styles.d.ts +3 -0
  78. package/build/components/Package/styles.js +8 -0
  79. package/build/components/Package/styles.js.map +1 -1
  80. package/build/components/Package/styles.mjs +8 -1
  81. package/build/components/Package/styles.mjs.map +1 -1
  82. package/build/components/PackageList/PackageList.js +4 -4
  83. package/build/components/PackageList/PackageList.js.map +1 -1
  84. package/build/components/PackageList/PackageList.mjs +5 -5
  85. package/build/components/PackageList/PackageList.mjs.map +1 -1
  86. package/build/components/PackageList/PackageListToolbar.d.ts +15 -0
  87. package/build/components/PackageList/PackageListToolbar.js +127 -0
  88. package/build/components/PackageList/PackageListToolbar.js.map +1 -0
  89. package/build/components/PackageList/PackageListToolbar.mjs +119 -0
  90. package/build/components/PackageList/PackageListToolbar.mjs.map +1 -0
  91. package/build/components/PackageList/filterPackages.d.ts +16 -0
  92. package/build/components/PackageList/filterPackages.js +37 -0
  93. package/build/components/PackageList/filterPackages.js.map +1 -0
  94. package/build/components/PackageList/filterPackages.mjs +34 -0
  95. package/build/components/PackageList/filterPackages.mjs.map +1 -0
  96. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +18 -7
  97. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js.map +1 -1
  98. package/build/components/RegistryInfoDialog/RegistryInfoDialog.mjs +18 -7
  99. package/build/components/RegistryInfoDialog/RegistryInfoDialog.mjs.map +1 -1
  100. package/build/components/RegistryInfoDialog/types.d.ts +1 -0
  101. package/build/components/Search/AutoComplete/AutoComplete.d.ts +3 -0
  102. package/build/components/Search/AutoComplete/AutoComplete.js +3 -1
  103. package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
  104. package/build/components/Search/AutoComplete/AutoComplete.mjs +3 -1
  105. package/build/components/Search/AutoComplete/AutoComplete.mjs.map +1 -1
  106. package/build/components/Search/Search.js +28 -1
  107. package/build/components/Search/Search.js.map +1 -1
  108. package/build/components/Search/Search.mjs +31 -5
  109. package/build/components/Search/Search.mjs.map +1 -1
  110. package/build/components/Search/SearchItem.d.ts +12 -1
  111. package/build/components/Search/SearchItem.js +53 -70
  112. package/build/components/Search/SearchItem.js.map +1 -1
  113. package/build/components/Search/SearchItem.mjs +51 -67
  114. package/build/components/Search/SearchItem.mjs.map +1 -1
  115. package/build/components/Search/utils.d.ts +10 -0
  116. package/build/components/Search/utils.js +28 -1
  117. package/build/components/Search/utils.js.map +1 -1
  118. package/build/components/Search/utils.mjs +26 -2
  119. package/build/components/Search/utils.mjs.map +1 -1
  120. package/build/components/SettingsMenu/SettingsMenu.js +2 -2
  121. package/build/components/SettingsMenu/SettingsMenu.mjs +1 -1
  122. package/build/components/Versions/Versions.js +8 -2
  123. package/build/components/Versions/Versions.js.map +1 -1
  124. package/build/components/Versions/Versions.mjs +8 -2
  125. package/build/components/Versions/Versions.mjs.map +1 -1
  126. package/build/components/VisuallyHidden/index.d.ts +5 -0
  127. package/build/components/VisuallyHidden/index.js +17 -0
  128. package/build/components/VisuallyHidden/index.js.map +1 -0
  129. package/build/components/VisuallyHidden/index.mjs +15 -0
  130. package/build/components/VisuallyHidden/index.mjs.map +1 -0
  131. package/build/configuration.js +2 -1
  132. package/build/configuration.js.map +1 -1
  133. package/build/configuration.mjs +2 -1
  134. package/build/configuration.mjs.map +1 -1
  135. package/build/i18n/ABOUT_TRANSLATIONS.md +19 -0
  136. package/build/i18n/crowdin/ui.js +378 -0
  137. package/build/i18n/crowdin/ui.js.map +1 -0
  138. package/build/i18n/crowdin/ui.json +345 -0
  139. package/build/i18n/crowdin/ui.mjs +355 -0
  140. package/build/i18n/crowdin/ui.mjs.map +1 -0
  141. package/build/i18n/download_translations/cs-CZ/ui.js +376 -0
  142. package/build/i18n/download_translations/cs-CZ/ui.js.map +1 -0
  143. package/build/i18n/download_translations/cs-CZ/ui.json +345 -0
  144. package/build/i18n/download_translations/cs-CZ/ui.mjs +354 -0
  145. package/build/i18n/download_translations/cs-CZ/ui.mjs.map +1 -0
  146. package/build/i18n/download_translations/de-DE/ui.js +376 -0
  147. package/build/i18n/download_translations/de-DE/ui.js.map +1 -0
  148. package/build/i18n/download_translations/de-DE/ui.json +345 -0
  149. package/build/i18n/download_translations/de-DE/ui.mjs +354 -0
  150. package/build/i18n/download_translations/de-DE/ui.mjs.map +1 -0
  151. package/build/i18n/download_translations/es-ES/ui.js +376 -0
  152. package/build/i18n/download_translations/es-ES/ui.js.map +1 -0
  153. package/build/i18n/download_translations/es-ES/ui.json +345 -0
  154. package/build/i18n/download_translations/es-ES/ui.mjs +354 -0
  155. package/build/i18n/download_translations/es-ES/ui.mjs.map +1 -0
  156. package/build/i18n/download_translations/fr-FR/ui.js +376 -0
  157. package/build/i18n/download_translations/fr-FR/ui.js.map +1 -0
  158. package/build/i18n/download_translations/fr-FR/ui.json +345 -0
  159. package/build/i18n/download_translations/fr-FR/ui.mjs +354 -0
  160. package/build/i18n/download_translations/fr-FR/ui.mjs.map +1 -0
  161. package/build/i18n/download_translations/ga-IE/ui.js +376 -0
  162. package/build/i18n/download_translations/ga-IE/ui.js.map +1 -0
  163. package/build/i18n/download_translations/ga-IE/ui.json +345 -0
  164. package/build/i18n/download_translations/ga-IE/ui.mjs +354 -0
  165. package/build/i18n/download_translations/ga-IE/ui.mjs.map +1 -0
  166. package/build/i18n/download_translations/gl-ES/ui.js +376 -0
  167. package/build/i18n/download_translations/gl-ES/ui.js.map +1 -0
  168. package/build/i18n/download_translations/gl-ES/ui.json +345 -0
  169. package/build/i18n/download_translations/gl-ES/ui.mjs +354 -0
  170. package/build/i18n/download_translations/gl-ES/ui.mjs.map +1 -0
  171. package/build/i18n/download_translations/it-IT/ui.js +376 -0
  172. package/build/i18n/download_translations/it-IT/ui.js.map +1 -0
  173. package/build/i18n/download_translations/it-IT/ui.json +345 -0
  174. package/build/i18n/download_translations/it-IT/ui.mjs +354 -0
  175. package/build/i18n/download_translations/it-IT/ui.mjs.map +1 -0
  176. package/build/i18n/download_translations/ko-KR/ui.js +376 -0
  177. package/build/i18n/download_translations/ko-KR/ui.js.map +1 -0
  178. package/build/i18n/download_translations/ko-KR/ui.json +345 -0
  179. package/build/i18n/download_translations/ko-KR/ui.mjs +354 -0
  180. package/build/i18n/download_translations/ko-KR/ui.mjs.map +1 -0
  181. package/build/i18n/download_translations/pl-PL/ui.js +376 -0
  182. package/build/i18n/download_translations/pl-PL/ui.js.map +1 -0
  183. package/build/i18n/download_translations/pl-PL/ui.json +345 -0
  184. package/build/i18n/download_translations/pl-PL/ui.mjs +354 -0
  185. package/build/i18n/download_translations/pl-PL/ui.mjs.map +1 -0
  186. package/build/i18n/download_translations/pt-BR/ui.js +376 -0
  187. package/build/i18n/download_translations/pt-BR/ui.js.map +1 -0
  188. package/build/i18n/download_translations/pt-BR/ui.json +345 -0
  189. package/build/i18n/download_translations/pt-BR/ui.mjs +354 -0
  190. package/build/i18n/download_translations/pt-BR/ui.mjs.map +1 -0
  191. package/build/i18n/download_translations/ru-RU/ui.js +376 -0
  192. package/build/i18n/download_translations/ru-RU/ui.js.map +1 -0
  193. package/build/i18n/download_translations/ru-RU/ui.json +345 -0
  194. package/build/i18n/download_translations/ru-RU/ui.mjs +354 -0
  195. package/build/i18n/download_translations/ru-RU/ui.mjs.map +1 -0
  196. package/build/i18n/download_translations/sr-CS/ui.js +373 -0
  197. package/build/i18n/download_translations/sr-CS/ui.js.map +1 -0
  198. package/build/i18n/download_translations/sr-CS/ui.json +345 -0
  199. package/build/i18n/download_translations/sr-CS/ui.mjs +352 -0
  200. package/build/i18n/download_translations/sr-CS/ui.mjs.map +1 -0
  201. package/build/i18n/download_translations/tr-TR/ui.js +376 -0
  202. package/build/i18n/download_translations/tr-TR/ui.js.map +1 -0
  203. package/build/i18n/download_translations/tr-TR/ui.json +345 -0
  204. package/build/i18n/download_translations/tr-TR/ui.mjs +354 -0
  205. package/build/i18n/download_translations/tr-TR/ui.mjs.map +1 -0
  206. package/build/i18n/download_translations/vi-VN/ui.js +373 -0
  207. package/build/i18n/download_translations/vi-VN/ui.js.map +1 -0
  208. package/build/i18n/download_translations/vi-VN/ui.json +345 -0
  209. package/build/i18n/download_translations/vi-VN/ui.mjs +352 -0
  210. package/build/i18n/download_translations/vi-VN/ui.mjs.map +1 -0
  211. package/build/i18n/download_translations/yo-NG/ui.js +373 -0
  212. package/build/i18n/download_translations/yo-NG/ui.js.map +1 -0
  213. package/build/i18n/download_translations/yo-NG/ui.json +345 -0
  214. package/build/i18n/download_translations/yo-NG/ui.mjs +352 -0
  215. package/build/i18n/download_translations/yo-NG/ui.mjs.map +1 -0
  216. package/build/i18n/download_translations/zh-CN/ui.js +376 -0
  217. package/build/i18n/download_translations/zh-CN/ui.js.map +1 -0
  218. package/build/i18n/download_translations/zh-CN/ui.json +345 -0
  219. package/build/i18n/download_translations/zh-CN/ui.mjs +354 -0
  220. package/build/i18n/download_translations/zh-CN/ui.mjs.map +1 -0
  221. package/build/i18n/download_translations/zh-TW/ui.js +376 -0
  222. package/build/i18n/download_translations/zh-TW/ui.js.map +1 -0
  223. package/build/i18n/download_translations/zh-TW/ui.json +345 -0
  224. package/build/i18n/download_translations/zh-TW/ui.mjs +354 -0
  225. package/build/i18n/download_translations/zh-TW/ui.mjs.map +1 -0
  226. package/build/i18n/loadTranslationFile.d.ts +6 -0
  227. package/build/i18n/loadTranslationFile.js +52 -0
  228. package/build/i18n/loadTranslationFile.js.map +1 -0
  229. package/build/i18n/loadTranslationFile.mjs +51 -0
  230. package/build/i18n/loadTranslationFile.mjs.map +1 -0
  231. package/build/i18n/translationProgress.d.ts +6 -0
  232. package/build/i18n/translationProgress.js +29 -0
  233. package/build/i18n/translationProgress.js.map +1 -0
  234. package/build/i18n/translationProgress.mjs +29 -0
  235. package/build/i18n/translationProgress.mjs.map +1 -0
  236. package/build/index.d.ts +2 -0
  237. package/build/index.js +11 -0
  238. package/build/index.mjs +5 -2
  239. package/build/mockServiceWorker.js +1 -0
  240. package/build/pages/Version/Version.js +2 -2
  241. package/build/pages/Version/Version.js.map +1 -1
  242. package/build/pages/Version/Version.mjs +2 -2
  243. package/build/pages/Version/Version.mjs.map +1 -1
  244. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +3 -1
  245. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js.map +1 -1
  246. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.mjs +3 -1
  247. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.mjs.map +1 -1
  248. package/build/providers/ManifestsProvider/ManifestsProvider.d.ts +3 -0
  249. package/build/providers/ManifestsProvider/ManifestsProvider.js +9 -2
  250. package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -1
  251. package/build/providers/ManifestsProvider/ManifestsProvider.mjs +10 -4
  252. package/build/providers/ManifestsProvider/ManifestsProvider.mjs.map +1 -1
  253. package/build/sections/Detail/ContainerContent.js +8 -0
  254. package/build/sections/Detail/ContainerContent.js.map +1 -1
  255. package/build/sections/Detail/ContainerContent.mjs +8 -1
  256. package/build/sections/Detail/ContainerContent.mjs.map +1 -1
  257. package/build/sections/Detail/Detail.d.ts +3 -6
  258. package/build/sections/Detail/Detail.js +13 -14
  259. package/build/sections/Detail/Detail.js.map +1 -1
  260. package/build/sections/Detail/Detail.mjs +14 -15
  261. package/build/sections/Detail/Detail.mjs.map +1 -1
  262. package/build/sections/Detail/Tabs.d.ts +3 -2
  263. package/build/sections/Detail/Tabs.js +9 -4
  264. package/build/sections/Detail/Tabs.js.map +1 -1
  265. package/build/sections/Detail/Tabs.mjs +9 -4
  266. package/build/sections/Detail/Tabs.mjs.map +1 -1
  267. package/build/sections/Footer/Footer.js +24 -3
  268. package/build/sections/Footer/Footer.js.map +1 -1
  269. package/build/sections/Footer/Footer.mjs +24 -4
  270. package/build/sections/Footer/Footer.mjs.map +1 -1
  271. package/build/sections/Footer/styles.d.ts +6 -0
  272. package/build/sections/Footer/styles.js +21 -2
  273. package/build/sections/Footer/styles.js.map +1 -1
  274. package/build/sections/Footer/styles.mjs +21 -3
  275. package/build/sections/Footer/styles.mjs.map +1 -1
  276. package/build/sections/Header/HeaderSettingsDialog.js +30 -8
  277. package/build/sections/Header/HeaderSettingsDialog.js.map +1 -1
  278. package/build/sections/Header/HeaderSettingsDialog.mjs +30 -8
  279. package/build/sections/Header/HeaderSettingsDialog.mjs.map +1 -1
  280. package/build/sections/Header/LanguageSwitch.js +95 -70
  281. package/build/sections/Header/LanguageSwitch.js.map +1 -1
  282. package/build/sections/Header/LanguageSwitch.mjs +94 -71
  283. package/build/sections/Header/LanguageSwitch.mjs.map +1 -1
  284. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.d.ts +1 -4
  285. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +83 -13
  286. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js.map +1 -1
  287. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.mjs +85 -13
  288. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.mjs.map +1 -1
  289. package/build/sections/Home/Home.js +58 -2
  290. package/build/sections/Home/Home.js.map +1 -1
  291. package/build/sections/Home/Home.mjs +60 -4
  292. package/build/sections/Home/Home.mjs.map +1 -1
  293. package/build/utils/cli-utils.d.ts +10 -0
  294. package/build/utils/cli-utils.js +26 -0
  295. package/build/utils/cli-utils.js.map +1 -1
  296. package/build/utils/cli-utils.mjs +23 -1
  297. package/build/utils/cli-utils.mjs.map +1 -1
  298. package/build/utils/index.d.ts +1 -1
  299. package/build/utils/index.js +4 -0
  300. package/build/utils/index.mjs +2 -2
  301. package/build/utils/markdown.d.ts +6 -0
  302. package/build/utils/markdown.js +14 -0
  303. package/build/utils/markdown.js.map +1 -0
  304. package/build/utils/markdown.mjs +12 -0
  305. package/build/utils/markdown.mjs.map +1 -0
  306. package/package.json +8 -9
@@ -1,66 +1,273 @@
1
1
  const require_runtime = require("../../_virtual/_rolldown/runtime.js");
2
2
  const require_CopyToClipBoard = require("../CopyClipboard/CopyToClipBoard.js");
3
+ const require_cli_utils = require("../../utils/cli-utils.js");
3
4
  const require_AppConfigurationProvider = require("../../providers/AppConfigurationProvider/AppConfigurationProvider.js");
4
5
  const require_Heading = require("../Heading/Heading.js");
6
+ const require_DocsLink = require("../DocsLink/DocsLink.js");
7
+ require("../DocsLink/index.js");
8
+ const require_markdown = require("../../utils/markdown.js");
5
9
  const require_styles = require("./styles.js");
6
10
  require("../../index.js");
7
11
  let react = require("react");
8
12
  react = require_runtime.__toESM(react);
9
13
  let react_i18next = require("react-i18next");
10
14
  let react_jsx_runtime = require("react/jsx-runtime");
15
+ let _mui_material_Box = require("@mui/material/Box");
16
+ _mui_material_Box = require_runtime.__toESM(_mui_material_Box);
17
+ let _mui_material_Alert = require("@mui/material/Alert");
18
+ _mui_material_Alert = require_runtime.__toESM(_mui_material_Alert);
19
+ let _mui_material_Link = require("@mui/material/Link");
20
+ _mui_material_Link = require_runtime.__toESM(_mui_material_Link);
11
21
  let _mui_material_Typography = require("@mui/material/Typography");
12
22
  _mui_material_Typography = require_runtime.__toESM(_mui_material_Typography);
13
23
  let _mui_material_CardContent = require("@mui/material/CardContent");
14
24
  _mui_material_CardContent = require_runtime.__toESM(_mui_material_CardContent);
15
- let _mui_material_Button = require("@mui/material/Button");
16
- _mui_material_Button = require_runtime.__toESM(_mui_material_Button);
25
+ let _mui_icons_material_Inventory2Outlined = require("@mui/icons-material/Inventory2Outlined");
26
+ _mui_icons_material_Inventory2Outlined = require_runtime.__toESM(_mui_icons_material_Inventory2Outlined);
27
+ let _mui_material_Tab = require("@mui/material/Tab");
28
+ _mui_material_Tab = require_runtime.__toESM(_mui_material_Tab);
29
+ let _mui_material_Tabs = require("@mui/material/Tabs");
30
+ _mui_material_Tabs = require_runtime.__toESM(_mui_material_Tabs);
17
31
  let _mui_material_CardActions = require("@mui/material/CardActions");
18
32
  _mui_material_CardActions = require_runtime.__toESM(_mui_material_CardActions);
33
+ let react_markdown = require("react-markdown");
34
+ react_markdown = require_runtime.__toESM(react_markdown);
19
35
  //#region src/components/Help/Help.tsx
20
- function renderHeadingClipboardSegments(title, text) {
21
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
22
- variant: "body1",
23
- children: title
24
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CopyToClipBoard.default, {
25
- dataTestId: "segments",
26
- text
27
- })] });
36
+ var NPMRC = ".npmrc";
37
+ var SETUP_TABS = [
38
+ "npm",
39
+ "pnpm",
40
+ "yarn",
41
+ "bun",
42
+ NPMRC
43
+ ];
44
+ var DOCS_UPLINKS_URL = "https://verdaccio.org/docs/uplinks";
45
+ /** The one-time command that makes a client use this registry, honouring `web.scope`. */
46
+ function getSetupCommand(tab, scope, registryUrl) {
47
+ switch (tab) {
48
+ case "npm": return require_cli_utils.getCLISetConfigRegistry("npm config set", scope, registryUrl);
49
+ case "pnpm": return require_cli_utils.getCLISetConfigRegistry("pnpm config set", scope, registryUrl);
50
+ case "yarn": return require_cli_utils.getCLISBerryYamlRegistry(scope, registryUrl).trim();
51
+ case "bun": return require_cli_utils.getBunfigRegistry(scope, registryUrl);
52
+ default: return require_cli_utils.getNpmrcRegistry(scope, registryUrl);
53
+ }
28
54
  }
29
- var Help = () => {
55
+ var Command = ({ dataTestId, text }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_styles.CommandBox, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CopyToClipBoard.default, {
56
+ dataTestId,
57
+ text,
58
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: text })
59
+ }) });
60
+ var HelpStep = ({ index, title, description, children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_styles.Step, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_styles.StepNumber, {
61
+ "aria-hidden": true,
62
+ children: index
63
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
64
+ sx: {
65
+ minWidth: 0,
66
+ flex: 1
67
+ },
68
+ children: [
69
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
70
+ component: "h3",
71
+ sx: { fontWeight: 600 },
72
+ variant: "subtitle1",
73
+ children: title
74
+ }),
75
+ description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
76
+ color: "text.secondary",
77
+ variant: "body2",
78
+ children: description
79
+ }),
80
+ children
81
+ ]
82
+ })] });
83
+ /** The markdown that `web.help` sets, with `{{registryUrl}}` filled in. */
84
+ var CustomHelp = ({ markdown }) => {
85
+ const { configOptions } = require_AppConfigurationProvider.useConfig();
86
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_styles.CustomHelpContent, {
87
+ "data-testid": "help-custom",
88
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_markdown.default, {
89
+ components: require_markdown.externalLinkComponents,
90
+ children: markdown.replaceAll("{{registryUrl}}", configOptions.base)
91
+ })
92
+ });
93
+ };
94
+ /** The steps to point a client at the registry, log in and publish; shared by the welcome card and the settings. */
95
+ var HelpGuide = ({ withWaitStep = false, labelledBy }) => {
30
96
  const { configOptions } = require_AppConfigurationProvider.useConfig();
97
+ const { t } = (0, react_i18next.useTranslation)();
31
98
  const registryUrl = configOptions.base;
99
+ const scope = configOptions.scope || void 0;
100
+ const setupTabs = SETUP_TABS.filter((tab) => tab === NPMRC || configOptions.pkgManagers?.includes(tab));
101
+ const hasBun = configOptions.pkgManagers?.includes("bun");
102
+ const [setupTab, setSetupTab] = (0, react.useState)(setupTabs[0]);
103
+ const steps = [{
104
+ key: "configure",
105
+ title: t("help.steps.configure.title"),
106
+ description: t("help.steps.configure.description"),
107
+ body: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tabs.default, {
108
+ allowScrollButtonsMobile: true,
109
+ "aria-label": t("help.steps.configure.title"),
110
+ onChange: (_event, value) => setSetupTab(value),
111
+ sx: {
112
+ minHeight: 36,
113
+ mt: 1
114
+ },
115
+ scrollButtons: "auto",
116
+ value: setupTab,
117
+ variant: "scrollable",
118
+ children: setupTabs.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tab.default, {
119
+ "data-testid": `help-setup-${tab}`,
120
+ label: tab,
121
+ sx: {
122
+ minHeight: 36,
123
+ minWidth: 0,
124
+ px: 1.5,
125
+ py: 0,
126
+ textTransform: "none"
127
+ },
128
+ value: tab
129
+ }, tab))
130
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Command, {
131
+ dataTestId: "help-setup-command",
132
+ text: getSetupCommand(setupTab, scope, registryUrl)
133
+ })] })
134
+ }];
135
+ if (configOptions.login) steps.push({
136
+ key: "login",
137
+ title: t("help.steps.login.title"),
138
+ description: t("help.steps.login.description"),
139
+ body: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Command, {
140
+ dataTestId: "help-login-command",
141
+ text: t("help.first-step-command-line", { registryUrl })
142
+ }), hasBun && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
143
+ color: "text.secondary",
144
+ sx: { mt: 1 },
145
+ variant: "body2",
146
+ children: t("help.steps.login.bun-note")
147
+ })] })
148
+ });
149
+ steps.push({
150
+ key: "publish",
151
+ title: t("help.steps.publish.title"),
152
+ description: t("help.steps.publish.description"),
153
+ body: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Command, {
154
+ dataTestId: "help-publish-command",
155
+ text: t("help.second-step-command-line", { registryUrl })
156
+ }), hasBun && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Command, {
157
+ dataTestId: "help-publish-command-bun",
158
+ text: require_cli_utils.getCLISetRegistry("bun publish", registryUrl)
159
+ })] })
160
+ });
161
+ if (withWaitStep) steps.push({
162
+ key: "wait",
163
+ title: t("help.steps.wait.title"),
164
+ description: t("help.steps.wait.description")
165
+ });
166
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_styles.StepList, {
167
+ "aria-labelledby": labelledBy,
168
+ "data-testid": "help-guide",
169
+ children: steps.map((step, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HelpStep, {
170
+ description: step.description,
171
+ index: index + 1,
172
+ title: step.title,
173
+ children: step.body
174
+ }, step.key))
175
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Alert.default, {
176
+ "data-testid": "help-uplinks-note",
177
+ severity: "info",
178
+ sx: { mt: 3 },
179
+ children: [
180
+ t("help.uplinks-note"),
181
+ " ",
182
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Link.default, {
183
+ href: DOCS_UPLINKS_URL,
184
+ rel: "noopener noreferrer",
185
+ target: "_blank",
186
+ children: t("help.uplinks-link")
187
+ })
188
+ ]
189
+ })] });
190
+ };
191
+ var Help = () => {
192
+ const { configOptions } = require_AppConfigurationProvider.useConfig();
32
193
  const { t } = (0, react_i18next.useTranslation)();
194
+ const customHelp = configOptions.help?.trim();
195
+ if (customHelp) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_styles.CardStyled, {
196
+ "data-testid": "help-card",
197
+ id: "help-card",
198
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_CardContent.default, {
199
+ sx: { p: {
200
+ xs: 2,
201
+ sm: 4
202
+ } },
203
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CustomHelp, { markdown: customHelp })
204
+ })
205
+ });
33
206
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_styles.CardStyled, {
34
207
  "data-testid": "help-card",
35
208
  id: "help-card",
36
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_CardContent.default, { children: [
37
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Heading.default, {
38
- gutterBottom: true,
39
- id: "help-card__title",
40
- variant: "h5",
41
- children: t("help.title")
42
- }),
43
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Heading.default, {
44
- color: "textSecondary",
45
- gutterBottom: true,
46
- sx: { marginBottom: 1 },
47
- children: t("help.sub-title")
48
- }),
49
- renderHeadingClipboardSegments(t("help.first-step"), t("help.first-step-command-line", { registryUrl })),
50
- renderHeadingClipboardSegments(t("help.second-step"), t("help.second-step-command-line", { registryUrl })),
51
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
52
- variant: "body1",
53
- children: t("help.third-step")
54
- })
55
- ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_CardActions.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
56
- color: "primary",
57
- href: "https://verdaccio.org/docs/cli-registry",
58
- size: "small",
59
- children: t("button.learn-more")
60
- }) })]
209
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_CardContent.default, {
210
+ sx: { p: {
211
+ xs: 2,
212
+ sm: 4
213
+ } },
214
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
215
+ sx: {
216
+ display: "flex",
217
+ alignItems: {
218
+ xs: "flex-start",
219
+ sm: "center"
220
+ },
221
+ gap: 2,
222
+ mb: 3
223
+ },
224
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_icons_material_Inventory2Outlined.default, {
225
+ color: "primary",
226
+ sx: {
227
+ fontSize: {
228
+ xs: 32,
229
+ sm: 48
230
+ },
231
+ flexShrink: 0
232
+ }
233
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_Box.default, {
234
+ sx: { minWidth: 0 },
235
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Heading.default, {
236
+ id: "help-card__title",
237
+ sx: {
238
+ fontSize: {
239
+ xs: "1.25rem",
240
+ sm: "1.5rem"
241
+ },
242
+ lineHeight: 1.3
243
+ },
244
+ variant: "h5",
245
+ children: t("help.title")
246
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
247
+ color: "text.secondary",
248
+ children: t("help.welcome", { title: configOptions.title })
249
+ })]
250
+ })]
251
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HelpGuide, {
252
+ labelledBy: "help-card__title",
253
+ withWaitStep: true
254
+ })]
255
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_CardActions.default, {
256
+ sx: {
257
+ px: {
258
+ xs: 2,
259
+ sm: 4
260
+ },
261
+ pb: 3
262
+ },
263
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DocsLink.default, { dataTestId: "help-docs-link" })
264
+ })]
61
265
  });
62
266
  };
63
267
  //#endregion
268
+ exports.CustomHelp = CustomHelp;
269
+ exports.HelpGuide = HelpGuide;
64
270
  exports.default = Help;
271
+ exports.getSetupCommand = getSetupCommand;
65
272
 
66
273
  //# sourceMappingURL=Help.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Help.js","names":["Fragment","Typography","CopyClipboard","useConfig","useTranslation","Card","CardContent","Heading","CardActions","Button"],"sources":["../../../src/components/Help/Help.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport CardActions from '@mui/material/CardActions';\nimport CardContent from '@mui/material/CardContent';\nimport Typography from '@mui/material/Typography';\nimport React, { Fragment } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { CopyClipboard, Heading, useConfig } from '../../';\nimport { CardStyled as Card } from './styles';\n\nfunction renderHeadingClipboardSegments(title: string, text: string): React.ReactNode {\n return (\n <Fragment>\n <Typography variant={'body1'}>{title}</Typography>\n <CopyClipboard dataTestId=\"segments\" text={text} />\n </Fragment>\n );\n}\n\nconst Help: React.FC = () => {\n const { configOptions } = useConfig();\n const registryUrl = configOptions.base;\n const { t } = useTranslation();\n\n return (\n <Card data-testid=\"help-card\" id=\"help-card\">\n <CardContent>\n <Heading gutterBottom={true} id=\"help-card__title\" variant=\"h5\">\n {t('help.title')}\n </Heading>\n <Heading color=\"textSecondary\" gutterBottom={true} sx={{ marginBottom: 1 }}>\n {t('help.sub-title')}\n </Heading>\n {renderHeadingClipboardSegments(\n t('help.first-step'),\n t('help.first-step-command-line', { registryUrl })\n )}\n {renderHeadingClipboardSegments(\n t('help.second-step'),\n t('help.second-step-command-line', { registryUrl })\n )}\n <Typography variant=\"body1\">{t('help.third-step')}</Typography>\n </CardContent>\n <CardActions>\n <Button color=\"primary\" href=\"https://verdaccio.org/docs/cli-registry\" size=\"small\">\n {t('button.learn-more')}\n </Button>\n </CardActions>\n </Card>\n );\n};\n\nexport default Help;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,SAAS,+BAA+B,OAAe,MAA+B;CACpF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACA,MAAAA,UAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,SAAD;EAAY,SAAS;EAAU,UAAA;CAAkB,CAAA,GACjD,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,SAAD;EAAe,YAAW;EAAiB;CAAO,CAAA,CAC1C,EAAA,CAAA;AAEd;AAEA,IAAM,aAAuB;CAC3B,MAAM,EAAE,kBAAkBC,iCAAAA,UAAU;CACpC,MAAM,cAAc,cAAc;CAClC,MAAM,EAAE,OAAA,GAAMC,cAAAA,eAAAA,CAAe;CAE7B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,eAAAA,YAAD;EAAM,eAAY;EAAY,IAAG;EAAjC,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,0BAAAA,SAAD,EAAA,UAAA;GACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,SAAD;IAAS,cAAc;IAAM,IAAG;IAAmB,SAAQ;IACxD,UAAA,EAAE,YAAY;GACR,CAAA;GACT,iBAAA,GAAA,kBAAA,IAAA,CAACA,gBAAAA,SAAD;IAAS,OAAM;IAAgB,cAAc;IAAM,IAAI,EAAE,cAAc,EAAE;IACtE,UAAA,EAAE,gBAAgB;GACZ,CAAA;GACR,+BACC,EAAE,iBAAiB,GACnB,EAAE,gCAAgC,EAAE,YAAY,CAAC,CACnD;GACC,+BACC,EAAE,kBAAkB,GACpB,EAAE,iCAAiC,EAAE,YAAY,CAAC,CACpD;GACA,iBAAA,GAAA,kBAAA,IAAA,CAACN,yBAAAA,SAAD;IAAY,SAAQ;IAAS,UAAA,EAAE,iBAAiB;GAAc,CAAA;EACnD,EAAA,CAAA,GACb,iBAAA,GAAA,kBAAA,IAAA,CAACO,0BAAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;GAAQ,OAAM;GAAU,MAAK;GAA0C,MAAK;GACzE,UAAA,EAAE,mBAAmB;EAChB,CAAA,EACG,CAAA,CACT;;AAEV"}
1
+ {"version":3,"file":"Help.js","names":["getCLISetConfigRegistry","getCLISBerryYamlRegistry","getBunfigRegistry","getNpmrcRegistry","CommandBox","CopyClipboard","Step","StepNumber","Box","Typography","useConfig","CustomHelpContent","ReactMarkdown","externalLinkComponents","useTranslation","useState","_Fragment","Tabs","Tab","getCLISetRegistry","StepList","Alert","Link","Card","CardContent","Inventory2Outlined","Heading","CardActions","DocsLink"],"sources":["../../../src/components/Help/Help.tsx"],"sourcesContent":["import Inventory2Outlined from '@mui/icons-material/Inventory2Outlined';\nimport Alert from '@mui/material/Alert';\nimport Box from '@mui/material/Box';\nimport CardActions from '@mui/material/CardActions';\nimport CardContent from '@mui/material/CardContent';\nimport Link from '@mui/material/Link';\nimport Tab from '@mui/material/Tab';\nimport Tabs from '@mui/material/Tabs';\nimport Typography from '@mui/material/Typography';\nimport React, { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport ReactMarkdown from 'react-markdown';\n\nimport { CopyClipboard, Heading, useConfig } from '../../';\nimport DocsLink from '../DocsLink';\nimport {\n getBunfigRegistry,\n getCLISBerryYamlRegistry,\n getCLISetConfigRegistry,\n getCLISetRegistry,\n getNpmrcRegistry,\n} from '../../utils/cli-utils';\nimport { externalLinkComponents } from '../../utils/markdown';\nimport {\n CardStyled as Card,\n CommandBox,\n CustomHelpContent,\n Step,\n StepList,\n StepNumber,\n} from './styles';\n\nconst NPMRC = '.npmrc';\nconst SETUP_TABS = ['npm', 'pnpm', 'yarn', 'bun', NPMRC] as const;\ntype SetupTab = (typeof SETUP_TABS)[number];\n\nconst DOCS_UPLINKS_URL = 'https://verdaccio.org/docs/uplinks';\n\n/** The one-time command that makes a client use this registry, honouring `web.scope`. */\nexport function getSetupCommand(tab: SetupTab, scope: string | undefined, registryUrl: string) {\n switch (tab) {\n case 'npm':\n return getCLISetConfigRegistry('npm config set', scope, registryUrl);\n case 'pnpm':\n return getCLISetConfigRegistry('pnpm config set', scope, registryUrl);\n case 'yarn':\n return getCLISBerryYamlRegistry(scope, registryUrl).trim();\n case 'bun':\n return getBunfigRegistry(scope, registryUrl);\n default:\n return getNpmrcRegistry(scope, registryUrl);\n }\n}\n\nconst Command: React.FC<{ dataTestId: string; text: string }> = ({ dataTestId, text }) => (\n <CommandBox>\n <CopyClipboard dataTestId={dataTestId} text={text}>\n <code>{text}</code>\n </CopyClipboard>\n </CommandBox>\n);\n\nconst HelpStep: React.FC<{\n index: number;\n title: string;\n description?: string;\n children?: React.ReactNode;\n}> = ({ index, title, description, children }) => (\n <Step>\n <StepNumber aria-hidden={true}>{index}</StepNumber>\n <Box sx={{ minWidth: 0, flex: 1 }}>\n <Typography component=\"h3\" sx={{ fontWeight: 600 }} variant=\"subtitle1\">\n {title}\n </Typography>\n {description && (\n <Typography color=\"text.secondary\" variant=\"body2\">\n {description}\n </Typography>\n )}\n {children}\n </Box>\n </Step>\n);\n\n/** The markdown that `web.help` sets, with `{{registryUrl}}` filled in. */\nexport const CustomHelp: React.FC<{ markdown: string }> = ({ markdown }) => {\n const { configOptions } = useConfig();\n return (\n <CustomHelpContent data-testid=\"help-custom\">\n <ReactMarkdown components={externalLinkComponents}>\n {markdown.replaceAll('{{registryUrl}}', configOptions.base)}\n </ReactMarkdown>\n </CustomHelpContent>\n );\n};\n\n/** The steps to point a client at the registry, log in and publish; shared by the welcome card and the settings. */\nexport const HelpGuide: React.FC<{ withWaitStep?: boolean; labelledBy?: string }> = ({\n withWaitStep = false,\n labelledBy,\n}) => {\n const { configOptions } = useConfig();\n const { t } = useTranslation();\n const registryUrl = configOptions.base;\n const scope = configOptions.scope || undefined;\n const setupTabs = SETUP_TABS.filter(\n (tab) => tab === NPMRC || configOptions.pkgManagers?.includes(tab)\n );\n const hasBun = configOptions.pkgManagers?.includes('bun');\n const [setupTab, setSetupTab] = useState<SetupTab>(setupTabs[0]);\n const steps: { key: string; title: string; description?: string; body?: React.ReactNode }[] = [\n {\n key: 'configure',\n title: t('help.steps.configure.title'),\n description: t('help.steps.configure.description'),\n body: (\n <>\n <Tabs\n allowScrollButtonsMobile={true}\n aria-label={t('help.steps.configure.title')}\n onChange={(_event, value: SetupTab) => setSetupTab(value)}\n sx={{ minHeight: 36, mt: 1 }}\n scrollButtons=\"auto\"\n value={setupTab}\n variant=\"scrollable\"\n >\n {setupTabs.map((tab) => (\n <Tab\n data-testid={`help-setup-${tab}`}\n key={tab}\n label={tab}\n sx={{ minHeight: 36, minWidth: 0, px: 1.5, py: 0, textTransform: 'none' }}\n value={tab}\n />\n ))}\n </Tabs>\n <Command\n dataTestId=\"help-setup-command\"\n text={getSetupCommand(setupTab, scope, registryUrl)}\n />\n </>\n ),\n },\n ];\n if (configOptions.login) {\n steps.push({\n key: 'login',\n title: t('help.steps.login.title'),\n description: t('help.steps.login.description'),\n body: (\n <>\n <Command\n dataTestId=\"help-login-command\"\n text={t('help.first-step-command-line', { registryUrl })}\n />\n {hasBun && (\n <Typography color=\"text.secondary\" sx={{ mt: 1 }} variant=\"body2\">\n {t('help.steps.login.bun-note')}\n </Typography>\n )}\n </>\n ),\n });\n }\n steps.push({\n key: 'publish',\n title: t('help.steps.publish.title'),\n description: t('help.steps.publish.description'),\n body: (\n <>\n <Command\n dataTestId=\"help-publish-command\"\n text={t('help.second-step-command-line', { registryUrl })}\n />\n {hasBun && (\n <Command\n dataTestId=\"help-publish-command-bun\"\n text={getCLISetRegistry('bun publish', registryUrl)}\n />\n )}\n </>\n ),\n });\n if (withWaitStep) {\n steps.push({\n key: 'wait',\n title: t('help.steps.wait.title'),\n description: t('help.steps.wait.description'),\n });\n }\n\n return (\n <>\n <StepList aria-labelledby={labelledBy} data-testid=\"help-guide\">\n {steps.map((step, index) => (\n <HelpStep\n description={step.description}\n index={index + 1}\n key={step.key}\n title={step.title}\n >\n {step.body}\n </HelpStep>\n ))}\n </StepList>\n {/* @ts-ignore - Alert does accept children despite the type error */}\n <Alert data-testid=\"help-uplinks-note\" severity=\"info\" sx={{ mt: 3 }}>\n {t('help.uplinks-note')}{' '}\n <Link href={DOCS_UPLINKS_URL} rel=\"noopener noreferrer\" target=\"_blank\">\n {t('help.uplinks-link')}\n </Link>\n </Alert>\n </>\n );\n};\n\nconst Help: React.FC = () => {\n const { configOptions } = useConfig();\n const { t } = useTranslation();\n const customHelp = configOptions.help?.trim();\n if (customHelp) {\n return (\n <Card data-testid=\"help-card\" id=\"help-card\">\n <CardContent sx={{ p: { xs: 2, sm: 4 } }}>\n <CustomHelp markdown={customHelp} />\n </CardContent>\n </Card>\n );\n }\n return (\n <Card data-testid=\"help-card\" id=\"help-card\">\n <CardContent sx={{ p: { xs: 2, sm: 4 } }}>\n <Box\n sx={{ display: 'flex', alignItems: { xs: 'flex-start', sm: 'center' }, gap: 2, mb: 3 }}\n >\n <Inventory2Outlined\n color=\"primary\"\n sx={{ fontSize: { xs: 32, sm: 48 }, flexShrink: 0 }}\n />\n <Box sx={{ minWidth: 0 }}>\n <Heading\n id=\"help-card__title\"\n sx={{ fontSize: { xs: '1.25rem', sm: '1.5rem' }, lineHeight: 1.3 }}\n variant=\"h5\"\n >\n {t('help.title')}\n </Heading>\n <Typography color=\"text.secondary\">\n {t('help.welcome', { title: configOptions.title })}\n </Typography>\n </Box>\n </Box>\n <HelpGuide labelledBy=\"help-card__title\" withWaitStep={true} />\n </CardContent>\n <CardActions sx={{ px: { xs: 2, sm: 4 }, pb: 3 }}>\n <DocsLink dataTestId=\"help-docs-link\" />\n </CardActions>\n </Card>\n );\n};\n\nexport default Help;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAM,QAAQ;AACd,IAAM,aAAa;CAAC;CAAO;CAAQ;CAAQ;CAAO;AAAK;AAGvD,IAAM,mBAAmB;;AAGzB,SAAgB,gBAAgB,KAAe,OAA2B,aAAqB;CAC7F,QAAQ,KAAR;EACE,KAAK,OACH,OAAOA,kBAAAA,wBAAwB,kBAAkB,OAAO,WAAW;EACrE,KAAK,QACH,OAAOA,kBAAAA,wBAAwB,mBAAmB,OAAO,WAAW;EACtE,KAAK,QACH,OAAOC,kBAAAA,yBAAyB,OAAO,WAAW,CAAC,CAAC,KAAK;EAC3D,KAAK,OACH,OAAOC,kBAAAA,kBAAkB,OAAO,WAAW;EAC7C,SACE,OAAOC,kBAAAA,iBAAiB,OAAO,WAAW;CAC9C;AACF;AAEA,IAAM,WAA2D,EAAE,YAAY,WAC7E,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,YAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,SAAD;CAA2B;CAAkB;CAC3C,UAAA,iBAAA,GAAA,kBAAA,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P,UAAA,EAAE,YAAY;KACR,CAAA,GACT,iBAAA,GAAA,kBAAA,IAAA,CAACjB,yBAAAA,SAAD;MAAY,OAAM;MACf,UAAA,EAAE,gBAAgB,EAAE,OAAO,cAAc,MAAM,CAAC;KACvC,CAAA,CACT;IACF,CAAA,CAAA;GACL,CAAA,GAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;IAAW,YAAW;IAAmB,cAAc;GAAO,CAAA,CACnD;EACb,CAAA,GAAA,iBAAA,GAAA,kBAAA,IAAA,CAACkB,0BAAAA,SAAD;GAAa,IAAI;IAAE,IAAI;KAAE,IAAI;KAAG,IAAI;IAAE;IAAG,IAAI;GAAE;GAC7C,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,SAAD,EAAU,YAAW,iBAAkB,CAAA;EAC5B,CAAA,CACT;;AAEV"}
@@ -1,60 +1,258 @@
1
1
  import CopyToClipBoard from "../CopyClipboard/CopyToClipBoard.mjs";
2
+ import { getBunfigRegistry, getCLISBerryYamlRegistry, getCLISetConfigRegistry, getCLISetRegistry, getNpmrcRegistry } from "../../utils/cli-utils.mjs";
2
3
  import { useConfig } from "../../providers/AppConfigurationProvider/AppConfigurationProvider.mjs";
3
4
  import Heading from "../Heading/Heading.mjs";
4
- import { CardStyled } from "./styles.mjs";
5
+ import DocsLink from "../DocsLink/DocsLink.mjs";
6
+ import "../DocsLink/index.mjs";
7
+ import { externalLinkComponents } from "../../utils/markdown.mjs";
8
+ import { CardStyled, CommandBox, CustomHelpContent, Step, StepList, StepNumber } from "./styles.mjs";
5
9
  import "../../index.mjs";
6
- import { Fragment } from "react";
10
+ import { useState } from "react";
7
11
  import { useTranslation } from "react-i18next";
8
- import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ import Box from "@mui/material/Box";
14
+ import Alert from "@mui/material/Alert";
15
+ import Link from "@mui/material/Link";
9
16
  import Typography from "@mui/material/Typography";
10
17
  import CardContent from "@mui/material/CardContent";
11
- import Button from "@mui/material/Button";
18
+ import Inventory2Outlined from "@mui/icons-material/Inventory2Outlined";
19
+ import Tab from "@mui/material/Tab";
20
+ import Tabs from "@mui/material/Tabs";
12
21
  import CardActions from "@mui/material/CardActions";
22
+ import ReactMarkdown from "react-markdown";
13
23
  //#region src/components/Help/Help.tsx
14
- function renderHeadingClipboardSegments(title, text) {
15
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Typography, {
16
- variant: "body1",
17
- children: title
18
- }), /* @__PURE__ */ jsx(CopyToClipBoard, {
19
- dataTestId: "segments",
20
- text
21
- })] });
24
+ var NPMRC = ".npmrc";
25
+ var SETUP_TABS = [
26
+ "npm",
27
+ "pnpm",
28
+ "yarn",
29
+ "bun",
30
+ NPMRC
31
+ ];
32
+ var DOCS_UPLINKS_URL = "https://verdaccio.org/docs/uplinks";
33
+ /** The one-time command that makes a client use this registry, honouring `web.scope`. */
34
+ function getSetupCommand(tab, scope, registryUrl) {
35
+ switch (tab) {
36
+ case "npm": return getCLISetConfigRegistry("npm config set", scope, registryUrl);
37
+ case "pnpm": return getCLISetConfigRegistry("pnpm config set", scope, registryUrl);
38
+ case "yarn": return getCLISBerryYamlRegistry(scope, registryUrl).trim();
39
+ case "bun": return getBunfigRegistry(scope, registryUrl);
40
+ default: return getNpmrcRegistry(scope, registryUrl);
41
+ }
22
42
  }
23
- var Help = () => {
43
+ var Command = ({ dataTestId, text }) => /* @__PURE__ */ jsx(CommandBox, { children: /* @__PURE__ */ jsx(CopyToClipBoard, {
44
+ dataTestId,
45
+ text,
46
+ children: /* @__PURE__ */ jsx("code", { children: text })
47
+ }) });
48
+ var HelpStep = ({ index, title, description, children }) => /* @__PURE__ */ jsxs(Step, { children: [/* @__PURE__ */ jsx(StepNumber, {
49
+ "aria-hidden": true,
50
+ children: index
51
+ }), /* @__PURE__ */ jsxs(Box, {
52
+ sx: {
53
+ minWidth: 0,
54
+ flex: 1
55
+ },
56
+ children: [
57
+ /* @__PURE__ */ jsx(Typography, {
58
+ component: "h3",
59
+ sx: { fontWeight: 600 },
60
+ variant: "subtitle1",
61
+ children: title
62
+ }),
63
+ description && /* @__PURE__ */ jsx(Typography, {
64
+ color: "text.secondary",
65
+ variant: "body2",
66
+ children: description
67
+ }),
68
+ children
69
+ ]
70
+ })] });
71
+ /** The markdown that `web.help` sets, with `{{registryUrl}}` filled in. */
72
+ var CustomHelp = ({ markdown }) => {
73
+ const { configOptions } = useConfig();
74
+ return /* @__PURE__ */ jsx(CustomHelpContent, {
75
+ "data-testid": "help-custom",
76
+ children: /* @__PURE__ */ jsx(ReactMarkdown, {
77
+ components: externalLinkComponents,
78
+ children: markdown.replaceAll("{{registryUrl}}", configOptions.base)
79
+ })
80
+ });
81
+ };
82
+ /** The steps to point a client at the registry, log in and publish; shared by the welcome card and the settings. */
83
+ var HelpGuide = ({ withWaitStep = false, labelledBy }) => {
24
84
  const { configOptions } = useConfig();
85
+ const { t } = useTranslation();
25
86
  const registryUrl = configOptions.base;
87
+ const scope = configOptions.scope || void 0;
88
+ const setupTabs = SETUP_TABS.filter((tab) => tab === NPMRC || configOptions.pkgManagers?.includes(tab));
89
+ const hasBun = configOptions.pkgManagers?.includes("bun");
90
+ const [setupTab, setSetupTab] = useState(setupTabs[0]);
91
+ const steps = [{
92
+ key: "configure",
93
+ title: t("help.steps.configure.title"),
94
+ description: t("help.steps.configure.description"),
95
+ body: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Tabs, {
96
+ allowScrollButtonsMobile: true,
97
+ "aria-label": t("help.steps.configure.title"),
98
+ onChange: (_event, value) => setSetupTab(value),
99
+ sx: {
100
+ minHeight: 36,
101
+ mt: 1
102
+ },
103
+ scrollButtons: "auto",
104
+ value: setupTab,
105
+ variant: "scrollable",
106
+ children: setupTabs.map((tab) => /* @__PURE__ */ jsx(Tab, {
107
+ "data-testid": `help-setup-${tab}`,
108
+ label: tab,
109
+ sx: {
110
+ minHeight: 36,
111
+ minWidth: 0,
112
+ px: 1.5,
113
+ py: 0,
114
+ textTransform: "none"
115
+ },
116
+ value: tab
117
+ }, tab))
118
+ }), /* @__PURE__ */ jsx(Command, {
119
+ dataTestId: "help-setup-command",
120
+ text: getSetupCommand(setupTab, scope, registryUrl)
121
+ })] })
122
+ }];
123
+ if (configOptions.login) steps.push({
124
+ key: "login",
125
+ title: t("help.steps.login.title"),
126
+ description: t("help.steps.login.description"),
127
+ body: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Command, {
128
+ dataTestId: "help-login-command",
129
+ text: t("help.first-step-command-line", { registryUrl })
130
+ }), hasBun && /* @__PURE__ */ jsx(Typography, {
131
+ color: "text.secondary",
132
+ sx: { mt: 1 },
133
+ variant: "body2",
134
+ children: t("help.steps.login.bun-note")
135
+ })] })
136
+ });
137
+ steps.push({
138
+ key: "publish",
139
+ title: t("help.steps.publish.title"),
140
+ description: t("help.steps.publish.description"),
141
+ body: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Command, {
142
+ dataTestId: "help-publish-command",
143
+ text: t("help.second-step-command-line", { registryUrl })
144
+ }), hasBun && /* @__PURE__ */ jsx(Command, {
145
+ dataTestId: "help-publish-command-bun",
146
+ text: getCLISetRegistry("bun publish", registryUrl)
147
+ })] })
148
+ });
149
+ if (withWaitStep) steps.push({
150
+ key: "wait",
151
+ title: t("help.steps.wait.title"),
152
+ description: t("help.steps.wait.description")
153
+ });
154
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StepList, {
155
+ "aria-labelledby": labelledBy,
156
+ "data-testid": "help-guide",
157
+ children: steps.map((step, index) => /* @__PURE__ */ jsx(HelpStep, {
158
+ description: step.description,
159
+ index: index + 1,
160
+ title: step.title,
161
+ children: step.body
162
+ }, step.key))
163
+ }), /* @__PURE__ */ jsxs(Alert, {
164
+ "data-testid": "help-uplinks-note",
165
+ severity: "info",
166
+ sx: { mt: 3 },
167
+ children: [
168
+ t("help.uplinks-note"),
169
+ " ",
170
+ /* @__PURE__ */ jsx(Link, {
171
+ href: DOCS_UPLINKS_URL,
172
+ rel: "noopener noreferrer",
173
+ target: "_blank",
174
+ children: t("help.uplinks-link")
175
+ })
176
+ ]
177
+ })] });
178
+ };
179
+ var Help = () => {
180
+ const { configOptions } = useConfig();
26
181
  const { t } = useTranslation();
182
+ const customHelp = configOptions.help?.trim();
183
+ if (customHelp) return /* @__PURE__ */ jsx(CardStyled, {
184
+ "data-testid": "help-card",
185
+ id: "help-card",
186
+ children: /* @__PURE__ */ jsx(CardContent, {
187
+ sx: { p: {
188
+ xs: 2,
189
+ sm: 4
190
+ } },
191
+ children: /* @__PURE__ */ jsx(CustomHelp, { markdown: customHelp })
192
+ })
193
+ });
27
194
  return /* @__PURE__ */ jsxs(CardStyled, {
28
195
  "data-testid": "help-card",
29
196
  id: "help-card",
30
- children: [/* @__PURE__ */ jsxs(CardContent, { children: [
31
- /* @__PURE__ */ jsx(Heading, {
32
- gutterBottom: true,
33
- id: "help-card__title",
34
- variant: "h5",
35
- children: t("help.title")
36
- }),
37
- /* @__PURE__ */ jsx(Heading, {
38
- color: "textSecondary",
39
- gutterBottom: true,
40
- sx: { marginBottom: 1 },
41
- children: t("help.sub-title")
42
- }),
43
- renderHeadingClipboardSegments(t("help.first-step"), t("help.first-step-command-line", { registryUrl })),
44
- renderHeadingClipboardSegments(t("help.second-step"), t("help.second-step-command-line", { registryUrl })),
45
- /* @__PURE__ */ jsx(Typography, {
46
- variant: "body1",
47
- children: t("help.third-step")
48
- })
49
- ] }), /* @__PURE__ */ jsx(CardActions, { children: /* @__PURE__ */ jsx(Button, {
50
- color: "primary",
51
- href: "https://verdaccio.org/docs/cli-registry",
52
- size: "small",
53
- children: t("button.learn-more")
54
- }) })]
197
+ children: [/* @__PURE__ */ jsxs(CardContent, {
198
+ sx: { p: {
199
+ xs: 2,
200
+ sm: 4
201
+ } },
202
+ children: [/* @__PURE__ */ jsxs(Box, {
203
+ sx: {
204
+ display: "flex",
205
+ alignItems: {
206
+ xs: "flex-start",
207
+ sm: "center"
208
+ },
209
+ gap: 2,
210
+ mb: 3
211
+ },
212
+ children: [/* @__PURE__ */ jsx(Inventory2Outlined, {
213
+ color: "primary",
214
+ sx: {
215
+ fontSize: {
216
+ xs: 32,
217
+ sm: 48
218
+ },
219
+ flexShrink: 0
220
+ }
221
+ }), /* @__PURE__ */ jsxs(Box, {
222
+ sx: { minWidth: 0 },
223
+ children: [/* @__PURE__ */ jsx(Heading, {
224
+ id: "help-card__title",
225
+ sx: {
226
+ fontSize: {
227
+ xs: "1.25rem",
228
+ sm: "1.5rem"
229
+ },
230
+ lineHeight: 1.3
231
+ },
232
+ variant: "h5",
233
+ children: t("help.title")
234
+ }), /* @__PURE__ */ jsx(Typography, {
235
+ color: "text.secondary",
236
+ children: t("help.welcome", { title: configOptions.title })
237
+ })]
238
+ })]
239
+ }), /* @__PURE__ */ jsx(HelpGuide, {
240
+ labelledBy: "help-card__title",
241
+ withWaitStep: true
242
+ })]
243
+ }), /* @__PURE__ */ jsx(CardActions, {
244
+ sx: {
245
+ px: {
246
+ xs: 2,
247
+ sm: 4
248
+ },
249
+ pb: 3
250
+ },
251
+ children: /* @__PURE__ */ jsx(DocsLink, { dataTestId: "help-docs-link" })
252
+ })]
55
253
  });
56
254
  };
57
255
  //#endregion
58
- export { Help as default };
256
+ export { CustomHelp, HelpGuide, Help as default, getSetupCommand };
59
257
 
60
258
  //# sourceMappingURL=Help.mjs.map