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

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 (310) hide show
  1. package/build/Theme/ResetStyles.js.map +1 -1
  2. package/build/Theme/ResetStyles.mjs.map +1 -1
  3. package/build/Theme/StyleBaseline.js.map +1 -1
  4. package/build/Theme/StyleBaseline.mjs.map +1 -1
  5. package/build/Theme/ThemeProvider.js.map +1 -1
  6. package/build/Theme/ThemeProvider.mjs.map +1 -1
  7. package/build/Theme/colors.js.map +1 -1
  8. package/build/Theme/modes.js.map +1 -1
  9. package/build/Theme/theme.js.map +1 -1
  10. package/build/api/use-data-mutation.d.ts +1 -1
  11. package/build/api/use-data-mutation.js.map +1 -1
  12. package/build/api/use-data-mutation.mjs.map +1 -1
  13. package/build/api/use-data.d.ts +1 -1
  14. package/build/api/use-data.js.map +1 -1
  15. package/build/api/use-data.mjs.map +1 -1
  16. package/build/components/ActionBar/ActionBar.js.map +1 -1
  17. package/build/components/ActionBar/ActionBar.mjs.map +1 -1
  18. package/build/components/ActionBar/ActionBarAction.js.map +1 -1
  19. package/build/components/ActionBar/index.mjs +1 -2
  20. package/build/components/AppRoute/AppRoute.js.map +1 -1
  21. package/build/components/AppRoute/AppRoute.mjs.map +1 -1
  22. package/build/components/Author/Author.js.map +1 -1
  23. package/build/components/Author/index.mjs +1 -2
  24. package/build/components/Author/styles.js.map +1 -1
  25. package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
  26. package/build/components/Dependencies/Dependencies.js.map +1 -1
  27. package/build/components/Dependencies/DependencyBlock.js.map +1 -1
  28. package/build/components/Dependencies/DependencyBlock.mjs.map +1 -1
  29. package/build/components/Dependencies/index.mjs +1 -2
  30. package/build/components/Deprecated/Deprecated.js.map +1 -1
  31. package/build/components/Deprecated/index.mjs +1 -2
  32. package/build/components/Developers/Developers.js.map +1 -1
  33. package/build/components/Developers/Developers.mjs.map +1 -1
  34. package/build/components/Developers/Title.js.map +1 -1
  35. package/build/components/Distribution/Dist.js.map +1 -1
  36. package/build/components/Distribution/Dist.mjs.map +1 -1
  37. package/build/components/Distribution/index.mjs +1 -2
  38. package/build/components/Distribution/styles.js.map +1 -1
  39. package/build/components/Engines/Engines.js.map +1 -1
  40. package/build/components/Engines/index.mjs +1 -2
  41. package/build/components/Engines/styles.js.map +1 -1
  42. package/build/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  43. package/build/components/ErrorBoundary/index.mjs +1 -2
  44. package/build/components/Forbidden/Forbidden.js.map +1 -1
  45. package/build/components/Forbidden/index.mjs +1 -2
  46. package/build/components/FundButton/FundButton.js.map +1 -1
  47. package/build/components/FundButton/FundButton.mjs.map +1 -1
  48. package/build/components/FundButton/index.mjs +1 -2
  49. package/build/components/GenericError/GenericError.js.map +1 -1
  50. package/build/components/GenericError/index.mjs +1 -2
  51. package/build/components/HeaderInfoDialog/HeaderInfoDialog.js.map +1 -1
  52. package/build/components/HeaderInfoDialog/index.mjs +1 -2
  53. package/build/components/Heading/Heading.js.map +1 -1
  54. package/build/components/Heading/Heading.mjs.map +1 -1
  55. package/build/components/Heading/index.mjs +1 -2
  56. package/build/components/Help/Help.js.map +1 -1
  57. package/build/components/Help/Help.mjs.map +1 -1
  58. package/build/components/Help/index.mjs +1 -2
  59. package/build/components/Help/styles.js.map +1 -1
  60. package/build/components/Icons/DevsIcons/CommonJS2.js.map +1 -1
  61. package/build/components/Icons/DevsIcons/CommonJS2.mjs.map +1 -1
  62. package/build/components/Icons/DevsIcons/ES6Module2.js.map +1 -1
  63. package/build/components/Icons/DevsIcons/ES6Module2.mjs.map +1 -1
  64. package/build/components/Icons/DevsIcons/Git2.js.map +1 -1
  65. package/build/components/Icons/DevsIcons/Git2.mjs.map +1 -1
  66. package/build/components/Icons/DevsIcons/NodeJS2.js.map +1 -1
  67. package/build/components/Icons/DevsIcons/NodeJS2.mjs.map +1 -1
  68. package/build/components/Icons/DevsIcons/TypeScript2.js.map +1 -1
  69. package/build/components/Icons/DevsIcons/TypeScript2.mjs.map +1 -1
  70. package/build/components/Icons/Earth.js.map +1 -1
  71. package/build/components/Icons/FileBinary.js.map +1 -1
  72. package/build/components/Icons/Law.js.map +1 -1
  73. package/build/components/Icons/License.d.ts +2 -4
  74. package/build/components/Icons/License.js.map +1 -1
  75. package/build/components/Icons/License.mjs.map +1 -1
  76. package/build/components/Icons/Managers/Npm2.js.map +1 -1
  77. package/build/components/Icons/Managers/Npm2.mjs.map +1 -1
  78. package/build/components/Icons/Managers/Pnpm2.js.map +1 -1
  79. package/build/components/Icons/Managers/Pnpm2.mjs.map +1 -1
  80. package/build/components/Icons/Managers/Yarn2.js.map +1 -1
  81. package/build/components/Icons/Managers/Yarn2.mjs.map +1 -1
  82. package/build/components/Icons/SvgIcon.js.map +1 -1
  83. package/build/components/Icons/Time.js.map +1 -1
  84. package/build/components/Icons/Version.js.map +1 -1
  85. package/build/components/Install/Install.js.map +1 -1
  86. package/build/components/Install/Install.mjs.map +1 -1
  87. package/build/components/Install/InstallListItem.js.map +1 -1
  88. package/build/components/Install/index.mjs +1 -2
  89. package/build/components/Keywords/KeywordListItems.js.map +1 -1
  90. package/build/components/Keywords/Keywords.js.map +1 -1
  91. package/build/components/Keywords/index.mjs +1 -2
  92. package/build/components/Label/Label.js.map +1 -1
  93. package/build/components/Label/index.mjs +1 -2
  94. package/build/components/Link/Link.js.map +1 -1
  95. package/build/components/Link/Link.mjs.map +1 -1
  96. package/build/components/Link/index.mjs +1 -2
  97. package/build/components/LinkExternal/LinkExternal.js.map +1 -1
  98. package/build/components/LinkExternal/index.mjs +1 -2
  99. package/build/components/Loading/Loading.js.map +1 -1
  100. package/build/components/Loading/Spinner/Spinner.js.map +1 -1
  101. package/build/components/Loading/Spinner/index.mjs +1 -2
  102. package/build/components/Loading/index.mjs +1 -2
  103. package/build/components/Loading/styles.js.map +1 -1
  104. package/build/components/LoginDialog/LoginDialog.d.ts +1 -0
  105. package/build/components/LoginDialog/LoginDialog.js +11 -2
  106. package/build/components/LoginDialog/LoginDialog.js.map +1 -1
  107. package/build/components/LoginDialog/LoginDialog.mjs +10 -2
  108. package/build/components/LoginDialog/LoginDialog.mjs.map +1 -1
  109. package/build/components/LoginDialog/LoginDialogCloseButton.js.map +1 -1
  110. package/build/components/LoginDialog/LoginDialogForm.js.map +1 -1
  111. package/build/components/LoginDialog/LoginDialogFormError.js.map +1 -1
  112. package/build/components/LoginDialog/index.mjs +1 -2
  113. package/build/components/LoginForm/Login.js +0 -23
  114. package/build/components/LoginForm/Login.js.map +1 -1
  115. package/build/components/LoginForm/Login.mjs +0 -21
  116. package/build/components/LoginForm/Login.mjs.map +1 -1
  117. package/build/components/LoginForm/PasswordField.js.map +1 -1
  118. package/build/components/LoginForm/UsernameField.js.map +1 -1
  119. package/build/components/LoginForm/styles.js.map +1 -1
  120. package/build/components/LoginForm/useLoginForm.js.map +1 -1
  121. package/build/components/Logo/Logo.js.map +1 -1
  122. package/build/components/Logo/Logo.mjs.map +1 -1
  123. package/build/components/Logo/index.mjs +1 -2
  124. package/build/components/MenuItem/MenuItem.js.map +1 -1
  125. package/build/components/MenuItem/MenuItem.mjs.map +1 -1
  126. package/build/components/MenuItem/index.mjs +1 -2
  127. package/build/components/NoItems/NoItems.js.map +1 -1
  128. package/build/components/NoItems/index.mjs +1 -2
  129. package/build/components/NotFound/NotFound.js.map +1 -1
  130. package/build/components/NotFound/index.mjs +1 -2
  131. package/build/components/Package/Package.js.map +1 -1
  132. package/build/components/Package/Package.mjs.map +1 -1
  133. package/build/components/Package/index.mjs +1 -2
  134. package/build/components/Package/styles.js.map +1 -1
  135. package/build/components/Package/styles.mjs.map +1 -1
  136. package/build/components/PackageList/PackageList.js.map +1 -1
  137. package/build/components/PackageList/PackageList.mjs.map +1 -1
  138. package/build/components/PackageList/index.mjs +1 -2
  139. package/build/components/Person/Person.js.map +1 -1
  140. package/build/components/Person/Person.mjs.map +1 -1
  141. package/build/components/Person/PersonTooltip.js.map +1 -1
  142. package/build/components/Person/PersonTooltip.mjs.map +1 -1
  143. package/build/components/Person/index.mjs +1 -2
  144. package/build/components/Person/utils.mjs.map +1 -1
  145. package/build/components/RawViewer/RawViewer.js.map +1 -1
  146. package/build/components/RawViewer/index.mjs +1 -2
  147. package/build/components/Readme/Readme.js.map +1 -1
  148. package/build/components/Readme/index.mjs +1 -2
  149. package/build/components/Readme/utils.js.map +1 -1
  150. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js.map +1 -1
  151. package/build/components/RegistryInfoDialog/index.mjs +1 -2
  152. package/build/components/RegistryInfoDialog/styles.js.map +1 -1
  153. package/build/components/Repository/Repository.js.map +1 -1
  154. package/build/components/Repository/Repository.mjs.map +1 -1
  155. package/build/components/Repository/index.mjs +1 -2
  156. package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
  157. package/build/components/Search/AutoComplete/index.mjs +1 -2
  158. package/build/components/Search/AutoComplete/styles.js.map +1 -1
  159. package/build/components/Search/Search.js.map +1 -1
  160. package/build/components/Search/Search.mjs.map +1 -1
  161. package/build/components/Search/SearchItem.js.map +1 -1
  162. package/build/components/Search/index.mjs +1 -2
  163. package/build/components/Search/styles.js.map +1 -1
  164. package/build/components/SettingsMenu/SettingsMenu.js.map +1 -1
  165. package/build/components/SettingsMenu/SettingsMenu.mjs.map +1 -1
  166. package/build/components/SettingsMenu/index.mjs +1 -2
  167. package/build/components/SideBarTitle/SideBarTitle.js.map +1 -1
  168. package/build/components/SideBarTitle/SideBarTitle.mjs.map +1 -1
  169. package/build/components/SideBarTitle/index.mjs +1 -2
  170. package/build/components/UpLinks/UpLinks.js.map +1 -1
  171. package/build/components/UpLinks/UpLinks.mjs.map +1 -1
  172. package/build/components/UpLinks/UplinkLink.js.map +1 -1
  173. package/build/components/UpLinks/UplinkLink.mjs.map +1 -1
  174. package/build/components/UpLinks/index.mjs +1 -2
  175. package/build/components/UpLinks/styles.js.map +1 -1
  176. package/build/components/UpLinks/styles.mjs.map +1 -1
  177. package/build/components/Versions/HistoryList.js.map +1 -1
  178. package/build/components/Versions/HistoryList.mjs.map +1 -1
  179. package/build/components/Versions/TagList.js.map +1 -1
  180. package/build/components/Versions/Versions.js.map +1 -1
  181. package/build/components/Versions/Versions.mjs.map +1 -1
  182. package/build/components/Versions/index.mjs +1 -2
  183. package/build/components/Versions/styles.js.map +1 -1
  184. package/build/components/Versions/styles.mjs.map +1 -1
  185. package/build/hooks/useLocalStorage.js.map +1 -1
  186. package/build/layouts/Security/Dialog.js.map +1 -1
  187. package/build/layouts/Version/Version.js.map +1 -1
  188. package/build/layouts/Version/Version.mjs.map +1 -1
  189. package/build/layouts/Version/index.mjs +1 -2
  190. package/build/pages/Front/Home.js.map +1 -1
  191. package/build/pages/Front/index.mjs +1 -2
  192. package/build/pages/Security/AddUser.js.map +1 -1
  193. package/build/pages/Security/ChangePassword.js.map +1 -1
  194. package/build/pages/Security/Login.js.map +1 -1
  195. package/build/pages/Security/Success.js.map +1 -1
  196. package/build/pages/Stage/StageDetail.js.map +1 -1
  197. package/build/pages/Stage/StageList.js.map +1 -1
  198. package/build/pages/Version/Version.js.map +1 -1
  199. package/build/pages/Version/index.mjs +1 -2
  200. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js.map +1 -1
  201. package/build/providers/AppConfigurationProvider/index.mjs +1 -2
  202. package/build/providers/AuthProvider/AuthProvider.js +1 -1
  203. package/build/providers/AuthProvider/AuthProvider.js.map +1 -1
  204. package/build/providers/AuthProvider/AuthProvider.mjs +1 -1
  205. package/build/providers/AuthProvider/AuthProvider.mjs.map +1 -1
  206. package/build/providers/AuthProvider/index.mjs +1 -2
  207. package/build/providers/AuthProvider/utils.js.map +1 -1
  208. package/build/providers/DownloadProvider/DownloadProvider.js.map +1 -1
  209. package/build/providers/DownloadProvider/index.mjs +1 -2
  210. package/build/providers/ManifestsProvider/ManifestsProvider.js +1 -1
  211. package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -1
  212. package/build/providers/ManifestsProvider/ManifestsProvider.mjs +1 -1
  213. package/build/providers/ManifestsProvider/ManifestsProvider.mjs.map +1 -1
  214. package/build/providers/ManifestsProvider/index.mjs +1 -2
  215. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js.map +1 -1
  216. package/build/providers/PersistenceSettingProvider/index.mjs +1 -2
  217. package/build/providers/SearchProvider/SearchProvider.js +1 -1
  218. package/build/providers/SearchProvider/SearchProvider.js.map +1 -1
  219. package/build/providers/SearchProvider/SearchProvider.mjs +1 -1
  220. package/build/providers/SearchProvider/SearchProvider.mjs.map +1 -1
  221. package/build/providers/SearchProvider/index.mjs +1 -2
  222. package/build/providers/TranslatorProvider/TranslatorProvider.js.map +1 -1
  223. package/build/providers/TranslatorProvider/index.mjs +1 -2
  224. package/build/providers/VersionProvider/VersionProvider.js +1 -1
  225. package/build/providers/VersionProvider/VersionProvider.js.map +1 -1
  226. package/build/providers/VersionProvider/VersionProvider.mjs +1 -1
  227. package/build/providers/VersionProvider/VersionProvider.mjs.map +1 -1
  228. package/build/providers/VersionProvider/index.mjs +1 -2
  229. package/build/sections/Detail/ContainerContent.js.map +1 -1
  230. package/build/sections/Detail/ContainerContent.mjs.map +1 -1
  231. package/build/sections/Detail/Detail.js.map +1 -1
  232. package/build/sections/Detail/Detail.mjs.map +1 -1
  233. package/build/sections/Detail/ReadmeSection.js.map +1 -1
  234. package/build/sections/Detail/Tabs.js.map +1 -1
  235. package/build/sections/Detail/Tabs.mjs.map +1 -1
  236. package/build/sections/Detail/index.mjs +1 -2
  237. package/build/sections/Footer/Footer.js.map +1 -1
  238. package/build/sections/Footer/Footer.mjs.map +1 -1
  239. package/build/sections/Footer/index.mjs +1 -2
  240. package/build/sections/Footer/styles.js.map +1 -1
  241. package/build/sections/Header/Header.js.map +1 -1
  242. package/build/sections/Header/Header.mjs.map +1 -1
  243. package/build/sections/Header/HeaderGreetings.js.map +1 -1
  244. package/build/sections/Header/HeaderGreetings.mjs.map +1 -1
  245. package/build/sections/Header/HeaderLeft.js.map +1 -1
  246. package/build/sections/Header/HeaderLeft.mjs.map +1 -1
  247. package/build/sections/Header/HeaderMenu.js +10 -0
  248. package/build/sections/Header/HeaderMenu.js.map +1 -1
  249. package/build/sections/Header/HeaderMenu.mjs +10 -0
  250. package/build/sections/Header/HeaderMenu.mjs.map +1 -1
  251. package/build/sections/Header/HeaderRight.js.map +1 -1
  252. package/build/sections/Header/HeaderRight.mjs.map +1 -1
  253. package/build/sections/Header/HeaderSettingsDialog.js.map +1 -1
  254. package/build/sections/Header/HeaderToolTip.js.map +1 -1
  255. package/build/sections/Header/HeaderToolTipIcon.js.map +1 -1
  256. package/build/sections/Header/HeaderToolTipIcon.mjs.map +1 -1
  257. package/build/sections/Header/LanguageSwitch.js.map +1 -1
  258. package/build/sections/Header/LanguageSwitch.mjs.map +1 -1
  259. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js.map +1 -1
  260. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.mjs.map +1 -1
  261. package/build/sections/Header/RegistryInfoContent/index.mjs +1 -2
  262. package/build/sections/Header/RegistryInfoContent/styles.js.map +1 -1
  263. package/build/sections/Header/index.mjs +1 -2
  264. package/build/sections/Header/styles.js.map +1 -1
  265. package/build/sections/Home/Home.js.map +1 -1
  266. package/build/sections/Home/index.mjs +1 -2
  267. package/build/sections/Security/AddUser.js.map +1 -1
  268. package/build/sections/Security/AddUser.mjs.map +1 -1
  269. package/build/sections/Security/ChangePassword.js +41 -16
  270. package/build/sections/Security/ChangePassword.js.map +1 -1
  271. package/build/sections/Security/ChangePassword.mjs +41 -16
  272. package/build/sections/Security/ChangePassword.mjs.map +1 -1
  273. package/build/sections/Security/Login.js.map +1 -1
  274. package/build/sections/Security/Login.mjs.map +1 -1
  275. package/build/sections/Security/Success.js.map +1 -1
  276. package/build/sections/Security/styles.js.map +1 -1
  277. package/build/sections/Security/utils.js.map +1 -1
  278. package/build/sections/SideBar/Sidebar.js.map +1 -1
  279. package/build/sections/SideBar/Sidebar.mjs.map +1 -1
  280. package/build/sections/SideBar/index.mjs +1 -2
  281. package/build/sections/Stage/StageActions.js.map +1 -1
  282. package/build/sections/Stage/StageActions.mjs.map +1 -1
  283. package/build/sections/Stage/StageDetail.js.map +1 -1
  284. package/build/sections/Stage/StageDetail.mjs.map +1 -1
  285. package/build/sections/Stage/StageList.js.map +1 -1
  286. package/build/sections/Stage/StageList.mjs.map +1 -1
  287. package/build/sections/Stage/useRequireSession.js.map +1 -1
  288. package/build/sections/Stage/useRequireSession.mjs.map +1 -1
  289. package/build/sections/Stage/useStage.js.map +1 -1
  290. package/build/sections/Stage/useStage.mjs.map +1 -1
  291. package/build/store/api.js.map +1 -1
  292. package/build/store/api.mjs.map +1 -1
  293. package/build/store/index.mjs +1 -2
  294. package/build/store/storage.js.map +1 -1
  295. package/build/utils/loadable.js.map +1 -1
  296. package/build/utils/schemas.d.ts +0 -2
  297. package/build/utils/schemas.js +0 -1
  298. package/build/utils/schemas.js.map +1 -1
  299. package/build/utils/schemas.mjs +0 -1
  300. package/build/utils/schemas.mjs.map +1 -1
  301. package/build/utils/token.js.map +1 -1
  302. package/build/utils/url.js.map +1 -1
  303. package/build/utils/url.mjs.map +1 -1
  304. package/build/utils/utils.js.map +1 -1
  305. package/package.json +21 -21
  306. package/build/store/routes.d.ts +0 -12
  307. package/build/store/routes.js +0 -18
  308. package/build/store/routes.js.map +0 -1
  309. package/build/store/routes.mjs +0 -18
  310. package/build/store/routes.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NoItems.js","names":[],"sources":["../../../src/components/NoItems/NoItems.tsx"],"sourcesContent":["import Alert from '@mui/material/Alert';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\n\ninterface Props {\n text: string;\n}\n\nconst NoItems: React.FC<Props> = ({ text, ...props }) => (\n // @ts-ignore - Alert does accept children despite the type error\n <Alert severity=\"info\">\n <Typography {...props}>{text}</Typography>\n </Alert>\n);\n\nexport default NoItems;\n"],"mappings":";;;;;;;;;AAQA,IAAM,WAA4B,EAAE,MAAM,GAAG,YAE3C,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAA,SAAD;CAAO,UAAS;CACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,yBAAA,SAAD;EAAY,GAAI;EAAQ,UAAA;CAAiB,CAAA;AACpC,CAAA"}
1
+ {"version":3,"file":"NoItems.js","names":["Alert","Typography"],"sources":["../../../src/components/NoItems/NoItems.tsx"],"sourcesContent":["import Alert from '@mui/material/Alert';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\n\ninterface Props {\n text: string;\n}\n\nconst NoItems: React.FC<Props> = ({ text, ...props }) => (\n // @ts-ignore - Alert does accept children despite the type error\n <Alert severity=\"info\">\n <Typography {...props}>{text}</Typography>\n </Alert>\n);\n\nexport default NoItems;\n"],"mappings":";;;;;;;;;AAQA,IAAM,WAA4B,EAAE,MAAM,GAAG,YAE3C,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,SAAD;CAAO,UAAS;CACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,SAAD;EAAY,GAAI;EAAQ,UAAA;CAAiB,CAAA;AACpC,CAAA"}
@@ -1,2 +1 @@
1
- import NoItems from "./NoItems.mjs";
2
- export { NoItems as default };
1
+ export { default } from "./NoItems.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"NotFound.js","names":[],"sources":["../../../src/components/NotFound/NotFound.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport FolderOffIcon from '@mui/icons-material/FolderOff';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useNavigate } from 'react-router';\n\nimport type { Theme } from '../../';\nimport Heading from '../Heading';\n\nconst NotFound: React.FC = () => {\n const navigate = useNavigate();\n const { t } = useTranslation();\n\n const handleGoHome = useCallback(() => {\n navigate('/');\n }, [navigate]);\n\n return (\n <Box\n alignItems=\"center\"\n data-testid=\"404\"\n display=\"flex\"\n flexDirection=\"column\"\n flexGrow={1}\n justifyContent=\"center\"\n p={2}\n >\n <Container>\n <FolderOffIcon color=\"primary\" style={{ fontSize: 236 }} />\n </Container>\n <StyledHeading className=\"not-found-text\" variant=\"h4\">\n {t('error.404.sorry-we-could-not-find-it')}\n </StyledHeading>\n <Button data-testid=\"not-found-go-to-home-button\" onClick={handleGoHome} variant=\"contained\">\n {t('button.go-to-the-home-page')}\n </Button>\n </Box>\n );\n};\n\nexport default NotFound;\n\nconst Container = styled('div')({\n margin: '0 auto',\n});\n\nconst StyledHeading = styled(Heading)<{ theme?: Theme }>(({ theme }) => ({\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : common.white,\n marginBottom: 16,\n}));\n"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,IAAM,iBAA2B;CAC/B,MAAM,YAAA,GAAW,aAAA,YAAA,CAAY;CAC7B,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAE7B,MAAM,gBAAA,GAAe,MAAA,YAAA,OAAkB;EACrC,SAAS,GAAG;CACd,GAAG,CAAC,QAAQ,CAAC;CAEb,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,kBAAA,SAAD;EACE,YAAW;EACX,eAAY;EACZ,SAAQ;EACR,eAAc;EACd,UAAU;EACV,gBAAe;EACf,GAAG;EAPL,UAAA;GASE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,8BAAA,SAAD;IAAe,OAAM;IAAU,OAAO,EAAE,UAAU,IAAI;GAAI,CAAA,EACjD,CAAA;GACX,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD;IAAe,WAAU;IAAiB,SAAQ;IAC/C,UAAA,EAAE,sCAAsC;GAC5B,CAAA;GACf,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;IAAQ,eAAY;IAA8B,SAAS;IAAc,SAAQ;IAC9E,UAAA,EAAE,4BAA4B;GACzB,CAAA;EACL;;AAET;AAIA,IAAM,aAAA,GAAY,gBAAA,QAAA,CAAO,KAAK,CAAC,CAAC,EAC9B,QAAQ,SACV,CAAC;AAED,IAAM,iBAAA,GAAgB,gBAAA,QAAA,CAAO,gBAAA,OAAO,CAAC,EAAqB,EAAE,aAAa;CACvE,OAAO,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,QAAQ,OAAO,qBAAA,OAAO;CAC5E,cAAc;AAChB,EAAE"}
1
+ {"version":3,"file":"NotFound.js","names":["useNavigate","useTranslation","useCallback","Box","FolderOffIcon","Button","styled","Heading","common"],"sources":["../../../src/components/NotFound/NotFound.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport FolderOffIcon from '@mui/icons-material/FolderOff';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useNavigate } from 'react-router';\n\nimport type { Theme } from '../../';\nimport Heading from '../Heading';\n\nconst NotFound: React.FC = () => {\n const navigate = useNavigate();\n const { t } = useTranslation();\n\n const handleGoHome = useCallback(() => {\n navigate('/');\n }, [navigate]);\n\n return (\n <Box\n alignItems=\"center\"\n data-testid=\"404\"\n display=\"flex\"\n flexDirection=\"column\"\n flexGrow={1}\n justifyContent=\"center\"\n p={2}\n >\n <Container>\n <FolderOffIcon color=\"primary\" style={{ fontSize: 236 }} />\n </Container>\n <StyledHeading className=\"not-found-text\" variant=\"h4\">\n {t('error.404.sorry-we-could-not-find-it')}\n </StyledHeading>\n <Button data-testid=\"not-found-go-to-home-button\" onClick={handleGoHome} variant=\"contained\">\n {t('button.go-to-the-home-page')}\n </Button>\n </Box>\n );\n};\n\nexport default NotFound;\n\nconst Container = styled('div')({\n margin: '0 auto',\n});\n\nconst StyledHeading = styled(Heading)<{ theme?: Theme }>(({ theme }) => ({\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : common.white,\n marginBottom: 16,\n}));\n"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,IAAM,iBAA2B;CAC/B,MAAM,YAAA,GAAWA,aAAAA,YAAAA,CAAY;CAC7B,MAAM,EAAE,OAAA,GAAMC,cAAAA,eAAAA,CAAe;CAE7B,MAAM,gBAAA,GAAeC,MAAAA,YAAAA,OAAkB;EACrC,SAAS,GAAG;CACd,GAAG,CAAC,QAAQ,CAAC;CAEb,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,kBAAAA,SAAD;EACE,YAAW;EACX,eAAY;EACZ,SAAQ;EACR,eAAc;EACd,UAAU;EACV,gBAAe;EACf,GAAG;EAPL,UAAA;GASE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,8BAAAA,SAAD;IAAe,OAAM;IAAU,OAAO,EAAE,UAAU,IAAI;GAAI,CAAA,EACjD,CAAA;GACX,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD;IAAe,WAAU;IAAiB,SAAQ;IAC/C,UAAA,EAAE,sCAAsC;GAC5B,CAAA;GACf,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;IAAQ,eAAY;IAA8B,SAAS;IAAc,SAAQ;IAC9E,UAAA,EAAE,4BAA4B;GACzB,CAAA;EACL;;AAET;AAIA,IAAM,aAAA,GAAYC,gBAAAA,QAAAA,CAAO,KAAK,CAAC,CAAC,EAC9B,QAAQ,SACV,CAAC;AAED,IAAM,iBAAA,GAAgBA,gBAAAA,QAAAA,CAAOC,gBAAAA,OAAO,CAAC,EAAqB,EAAE,aAAa;CACvE,OAAO,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,QAAQ,OAAOC,qBAAAA,OAAO;CAC5E,cAAc;AAChB,EAAE"}
@@ -1,2 +1 @@
1
- import NotFound from "./NotFound.mjs";
2
- export { NotFound as default };
1
+ export { default } from "./NotFound.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"Package.js","names":[],"sources":["../../../src/components/Package/Package.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport BugReport from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Grid from '@mui/material/Grid';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common, grey } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../';\nimport { LinkExternal, useDownload, useManifests } from '../../';\nimport { FileBinary, Law, Time, Version } from '../../components/Icons';\nimport { getConfiguration } from '../../configuration';\nimport type { Author as PackageAuthor } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { Route, url, utils } from '../../utils';\nimport KeywordListItems from '../Keywords/KeywordListItems';\nimport {\n Author,\n Avatar,\n Description,\n Details,\n GridRightAligned,\n IconButton,\n OverviewItem,\n PackageListItemText,\n PackageTitle,\n Published,\n Wrapper,\n WrapperLink,\n} from './styles';\n\ninterface Bugs {\n url: string;\n}\n\ninterface Dist {\n unpackedSize: number;\n tarball: string;\n}\n\nexport interface PackageInterface {\n name: string;\n version: string;\n time?: number | string;\n author: PackageAuthor;\n description?: string;\n keywords?: PackageMetaInterface['latest']['keywords'];\n license?: PackageMetaInterface['latest']['license'];\n homepage?: string;\n bugs?: Bugs | string;\n dist?: Dist;\n showDownload?: boolean;\n}\n\nconst Package: React.FC<PackageInterface> = ({\n author: { name: authorName, avatar: authorAvatar },\n bugs,\n description,\n dist,\n homepage,\n keywords,\n license,\n name: packageName,\n time,\n showDownload = true,\n version,\n}) => {\n const config = getConfiguration();\n const { t } = useTranslation();\n const { isLoading } = useManifests();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(\n async (tarballDist: string) => {\n // FIXME: check, the dist might be different thant npmjs\n const link = tarballDist.replace(`https://registry.npmjs.org/`, config.base);\n downloadTarball?.({ link });\n },\n [config, downloadTarball]\n );\n\n const renderVersionInfo = (): React.ReactNode =>\n version && (\n <OverviewItem>\n <StyledVersion />\n {t('package.version', { version })}\n </OverviewItem>\n );\n\n const renderAuthorInfo = (): React.ReactNode => {\n const name = utils.getAuthorName(authorName);\n return (\n <OverviewItem>\n <Author>\n <Avatar alt={name} src={authorAvatar} />\n <Details>{name}</Details>\n </Author>\n </OverviewItem>\n );\n };\n\n const renderFileSize = (): React.ReactNode =>\n dist?.unpackedSize ? (\n <OverviewItem>\n <StyledFileBinary />\n {utils.fileSizeSI(dist.unpackedSize)}\n </OverviewItem>\n ) : null;\n\n const renderLicenseInfo = (): React.ReactNode =>\n license && (\n <OverviewItem>\n <StyledLaw />\n {license as string}\n </OverviewItem>\n );\n\n const renderPublishedInfo = (): React.ReactNode =>\n time && (\n <OverviewItem>\n <StyledTime />\n <Published title={utils.formatDate(time)}>\n {t('package.published-on', { time: utils.formatDateDistance(time) })}\n </Published>\n </OverviewItem>\n );\n\n const renderHomePageLink = (): React.ReactNode =>\n homepage &&\n url.isURL(homepage) && (\n <LinkExternal to={homepage}>\n <Tooltip aria-label={t('package.homepage')} title={t('package.visit-home-page')}>\n <IconButton aria-label={t('package.homepage')} color=\"primary\" size=\"large\">\n <HomeIcon />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n );\n\n const renderBugsLink = (): React.ReactNode => {\n // bugs can be the object form or a plain url string, both valid in npm\n const bugsUrl = utils.getBugsUrl(bugs);\n return (\n bugsUrl &&\n url.isURL(bugsUrl) && (\n <LinkExternal to={bugsUrl}>\n <Tooltip aria-label={t('package.bugs')} title={t('package.open-an-issue')}>\n <IconButton aria-label={t('package.bugs')} color=\"primary\" size=\"large\">\n <BugReport />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n )\n );\n };\n\n const renderDownloadLink = (): React.ReactNode =>\n dist?.tarball &&\n url.isURL(dist.tarball) && (\n // a plain button: wrapping it in <Link to=\"#\"> pushed a stray `#` entry\n // into the browser history on every download\n <Tooltip\n aria-label={t('package.download', { what: t('package.the-tar-file') })}\n title={t('package.tarball')}\n >\n <IconButton\n aria-label={t('package.download')}\n color=\"primary\"\n data-testid=\"download-tarball\"\n onClick={() => {\n handleDownload(dist.tarball);\n }}\n size=\"large\"\n >\n {isLoading ? <CircularProgress size={13} /> : <DownloadIcon />}\n </IconButton>\n </Tooltip>\n );\n\n const renderPrimaryComponent = (): React.ReactNode => {\n return (\n <Grid alignItems=\"center\" container={true} size={{ xs: 12 }} wrap=\"wrap\">\n <Grid size=\"grow\">\n <WrapperLink to={`${Route.DETAIL}${packageName}`}>\n <PackageTitle className=\"package-title\" data-testid=\"package-title\">\n {packageName}\n </PackageTitle>\n </WrapperLink>\n </Grid>\n <GridRightAligned size=\"auto\">\n {renderHomePageLink()}\n {renderBugsLink()}\n {showDownload && renderDownloadLink()}\n </GridRightAligned>\n </Grid>\n );\n };\n\n const renderSecondaryComponent = (): React.ReactNode => <Description>{description}</Description>;\n\n const renderPackageListItemText = (): React.ReactNode => (\n <PackageListItemText\n primary={renderPrimaryComponent()}\n secondary={renderSecondaryComponent()}\n />\n );\n\n const renderKeywords = (): React.ReactNode => (\n <ListItem alignItems={'flex-start'} sx={{ py: 0, my: 0 }}>\n <List sx={{ p: 0, my: 0 }}>\n <KeywordListItems keywords={keywords} />\n </List>\n </ListItem>\n );\n\n return (\n <Wrapper className={'package'} data-testid=\"package-item-list\">\n <ListItem alignItems={'flex-start'} sx={{ mb: 0 }}>\n {renderPackageListItemText()}\n </ListItem>\n {keywords && keywords?.length > 0 ? renderKeywords() : null}\n <ListItem alignItems={'flex-start'} sx={{ mt: 0 }}>\n {renderAuthorInfo()}\n {renderVersionInfo()}\n {renderPublishedInfo()}\n {renderFileSize()}\n {renderLicenseInfo()}\n </ListItem>\n </Wrapper>\n );\n};\n\nexport default Package;\n\nconst iconStyle = ({ theme }: { theme: Theme }) => css`\n margin: 0 10px 0 0;\n fill: ${theme.palette.mode === 'light' ? grey[900] : common.white};\n`;\n\nconst StyledVersion = styled(Version)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledFileBinary = styled(FileBinary)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledLaw = styled(Law)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledTime = styled(Time)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAM,WAAuC,EAC3C,QAAQ,EAAE,MAAM,YAAY,QAAQ,gBACpC,MACA,aACA,MACA,UACA,UACA,SACA,MAAM,aACN,MACA,eAAe,MACf,cACI;CACJ,MAAM,SAAS,sBAAA,iBAAiB;CAChC,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAC7B,MAAM,EAAE,cAAc,0BAAA,aAAa;CACnC,MAAM,EAAE,oBAAoB,yBAAA,YAAY;CAExC,MAAM,kBAAA,GAAiB,MAAA,YAAA,CACrB,OAAO,gBAAwB;EAE7B,MAAM,OAAO,YAAY,QAAQ,+BAA+B,OAAO,IAAI;EAC3E,kBAAkB,EAAE,KAAK,CAAC;CAC5B,GACA,CAAC,QAAQ,eAAe,CAC1B;CAEA,MAAM,0BACJ,WACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,eAAA,cAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD,CAAgB,CAAA,GACf,EAAE,mBAAmB,EAAE,QAAQ,CAAC,CACrB,EAAA,CAAA;CAGlB,MAAM,yBAA0C;EAC9C,MAAM,OAAA,cAAA,cAA2B,UAAU;EAC3C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,cAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,eAAA,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I,eAAe,IAAI;GACvD,iBAAA,GAAA,kBAAA,KAAA,CAAC,uBAAA,SAAD;IAAU,YAAY;IAAc,IAAI,EAAE,IAAI,EAAE;IAAhD,UAAA;KACG,iBAAiB;KACjB,kBAAkB;KAClB,oBAAoB;KACpB,eAAe;KACf,kBAAkB;IACX;;EACH;;AAEb;AAIA,IAAM,aAAa,EAAE,YAA8B,eAAA,GAAG;;UAE5C,MAAM,QAAQ,SAAS,UAAU,qBAAA,KAAK,OAAO,qBAAA,OAAO,MAAM;;AAGpE,IAAM,gBAAgB,CAAA,GAAA,gBAAA,QAAA,CAAO,gBAAA,OAAO,CAAC;IACjC,UAAU;;AAGd,IAAM,mBAAmB,CAAA,GAAA,gBAAA,QAAA,CAAO,mBAAA,UAAU,CAAC;IACvC,UAAU;;AAGd,IAAM,YAAY,CAAA,GAAA,gBAAA,QAAA,CAAO,YAAA,GAAG,CAAC;IACzB,UAAU;;AAGd,IAAM,aAAa,CAAA,GAAA,gBAAA,QAAA,CAAO,aAAA,IAAI,CAAC;IAC3B,UAAU"}
1
+ {"version":3,"file":"Package.js","names":["getConfiguration","useTranslation","useManifests","useDownload","useCallback","OverviewItem","Author","Avatar","Details","Published","LinkExternal","Tooltip","IconButton","HomeIcon","BugReport","CircularProgress","DownloadIcon","Grid","WrapperLink","Route","PackageTitle","GridRightAligned","Description","PackageListItemText","ListItem","List","KeywordListItems","Wrapper","grey","common","Version","FileBinary","Law","Time"],"sources":["../../../src/components/Package/Package.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport BugReport from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Grid from '@mui/material/Grid';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common, grey } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../';\nimport { LinkExternal, useDownload, useManifests } from '../../';\nimport { FileBinary, Law, Time, Version } from '../../components/Icons';\nimport { getConfiguration } from '../../configuration';\nimport type { Author as PackageAuthor } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { Route, url, utils } from '../../utils';\nimport KeywordListItems from '../Keywords/KeywordListItems';\nimport {\n Author,\n Avatar,\n Description,\n Details,\n GridRightAligned,\n IconButton,\n OverviewItem,\n PackageListItemText,\n PackageTitle,\n Published,\n Wrapper,\n WrapperLink,\n} from './styles';\n\ninterface Bugs {\n url: string;\n}\n\ninterface Dist {\n unpackedSize: number;\n tarball: string;\n}\n\nexport interface PackageInterface {\n name: string;\n version: string;\n time?: number | string;\n author: PackageAuthor;\n description?: string;\n keywords?: PackageMetaInterface['latest']['keywords'];\n license?: PackageMetaInterface['latest']['license'];\n homepage?: string;\n bugs?: Bugs | string;\n dist?: Dist;\n showDownload?: boolean;\n}\n\nconst Package: React.FC<PackageInterface> = ({\n author: { name: authorName, avatar: authorAvatar },\n bugs,\n description,\n dist,\n homepage,\n keywords,\n license,\n name: packageName,\n time,\n showDownload = true,\n version,\n}) => {\n const config = getConfiguration();\n const { t } = useTranslation();\n const { isLoading } = useManifests();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(\n async (tarballDist: string) => {\n // FIXME: check, the dist might be different thant npmjs\n const link = tarballDist.replace(`https://registry.npmjs.org/`, config.base);\n downloadTarball?.({ link });\n },\n [config, downloadTarball]\n );\n\n const renderVersionInfo = (): React.ReactNode =>\n version && (\n <OverviewItem>\n <StyledVersion />\n {t('package.version', { version })}\n </OverviewItem>\n );\n\n const renderAuthorInfo = (): React.ReactNode => {\n const name = utils.getAuthorName(authorName);\n return (\n <OverviewItem>\n <Author>\n <Avatar alt={name} src={authorAvatar} />\n <Details>{name}</Details>\n </Author>\n </OverviewItem>\n );\n };\n\n const renderFileSize = (): React.ReactNode =>\n dist?.unpackedSize ? (\n <OverviewItem>\n <StyledFileBinary />\n {utils.fileSizeSI(dist.unpackedSize)}\n </OverviewItem>\n ) : null;\n\n const renderLicenseInfo = (): React.ReactNode =>\n license && (\n <OverviewItem>\n <StyledLaw />\n {license as string}\n </OverviewItem>\n );\n\n const renderPublishedInfo = (): React.ReactNode =>\n time && (\n <OverviewItem>\n <StyledTime />\n <Published title={utils.formatDate(time)}>\n {t('package.published-on', { time: utils.formatDateDistance(time) })}\n </Published>\n </OverviewItem>\n );\n\n const renderHomePageLink = (): React.ReactNode =>\n homepage &&\n url.isURL(homepage) && (\n <LinkExternal to={homepage}>\n <Tooltip aria-label={t('package.homepage')} title={t('package.visit-home-page')}>\n <IconButton aria-label={t('package.homepage')} color=\"primary\" size=\"large\">\n <HomeIcon />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n );\n\n const renderBugsLink = (): React.ReactNode => {\n // bugs can be the object form or a plain url string, both valid in npm\n const bugsUrl = utils.getBugsUrl(bugs);\n return (\n bugsUrl &&\n url.isURL(bugsUrl) && (\n <LinkExternal to={bugsUrl}>\n <Tooltip aria-label={t('package.bugs')} title={t('package.open-an-issue')}>\n <IconButton aria-label={t('package.bugs')} color=\"primary\" size=\"large\">\n <BugReport />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n )\n );\n };\n\n const renderDownloadLink = (): React.ReactNode =>\n dist?.tarball &&\n url.isURL(dist.tarball) && (\n // a plain button: wrapping it in <Link to=\"#\"> pushed a stray `#` entry\n // into the browser history on every download\n <Tooltip\n aria-label={t('package.download', { what: t('package.the-tar-file') })}\n title={t('package.tarball')}\n >\n <IconButton\n aria-label={t('package.download')}\n color=\"primary\"\n data-testid=\"download-tarball\"\n onClick={() => {\n handleDownload(dist.tarball);\n }}\n size=\"large\"\n >\n {isLoading ? <CircularProgress size={13} /> : <DownloadIcon />}\n </IconButton>\n </Tooltip>\n );\n\n const renderPrimaryComponent = (): React.ReactNode => {\n return (\n <Grid alignItems=\"center\" container={true} size={{ xs: 12 }} wrap=\"wrap\">\n <Grid size=\"grow\">\n <WrapperLink to={`${Route.DETAIL}${packageName}`}>\n <PackageTitle className=\"package-title\" data-testid=\"package-title\">\n {packageName}\n </PackageTitle>\n </WrapperLink>\n </Grid>\n <GridRightAligned size=\"auto\">\n {renderHomePageLink()}\n {renderBugsLink()}\n {showDownload && renderDownloadLink()}\n </GridRightAligned>\n </Grid>\n );\n };\n\n const renderSecondaryComponent = (): React.ReactNode => <Description>{description}</Description>;\n\n const renderPackageListItemText = (): React.ReactNode => (\n <PackageListItemText\n primary={renderPrimaryComponent()}\n secondary={renderSecondaryComponent()}\n />\n );\n\n const renderKeywords = (): React.ReactNode => (\n <ListItem alignItems={'flex-start'} sx={{ py: 0, my: 0 }}>\n <List sx={{ p: 0, my: 0 }}>\n <KeywordListItems keywords={keywords} />\n </List>\n </ListItem>\n );\n\n return (\n <Wrapper className={'package'} data-testid=\"package-item-list\">\n <ListItem alignItems={'flex-start'} sx={{ mb: 0 }}>\n {renderPackageListItemText()}\n </ListItem>\n {keywords && keywords?.length > 0 ? renderKeywords() : null}\n <ListItem alignItems={'flex-start'} sx={{ mt: 0 }}>\n {renderAuthorInfo()}\n {renderVersionInfo()}\n {renderPublishedInfo()}\n {renderFileSize()}\n {renderLicenseInfo()}\n </ListItem>\n </Wrapper>\n );\n};\n\nexport default Package;\n\nconst iconStyle = ({ theme }: { theme: Theme }) => css`\n margin: 0 10px 0 0;\n fill: ${theme.palette.mode === 'light' ? grey[900] : common.white};\n`;\n\nconst StyledVersion = styled(Version)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledFileBinary = styled(FileBinary)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledLaw = styled(Law)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledTime = styled(Time)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAGpE,IAAM,gBAAgB,CAAA,GAAA,gBAAA,QAAA,CAAOC,gBAAAA,OAAO,CAAC;IACjC,UAAU;;AAGd,IAAM,mBAAmB,CAAA,GAAA,gBAAA,QAAA,CAAOC,mBAAAA,UAAU,CAAC;IACvC,UAAU;;AAGd,IAAM,YAAY,CAAA,GAAA,gBAAA,QAAA,CAAOC,YAAAA,GAAG,CAAC;IACzB,UAAU;;AAGd,IAAM,aAAa,CAAA,GAAA,gBAAA,QAAA,CAAOC,aAAAA,IAAI,CAAC;IAC3B,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"Package.mjs","names":[],"sources":["../../../src/components/Package/Package.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport BugReport from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Grid from '@mui/material/Grid';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common, grey } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../';\nimport { LinkExternal, useDownload, useManifests } from '../../';\nimport { FileBinary, Law, Time, Version } from '../../components/Icons';\nimport { getConfiguration } from '../../configuration';\nimport type { Author as PackageAuthor } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { Route, url, utils } from '../../utils';\nimport KeywordListItems from '../Keywords/KeywordListItems';\nimport {\n Author,\n Avatar,\n Description,\n Details,\n GridRightAligned,\n IconButton,\n OverviewItem,\n PackageListItemText,\n PackageTitle,\n Published,\n Wrapper,\n WrapperLink,\n} from './styles';\n\ninterface Bugs {\n url: string;\n}\n\ninterface Dist {\n unpackedSize: number;\n tarball: string;\n}\n\nexport interface PackageInterface {\n name: string;\n version: string;\n time?: number | string;\n author: PackageAuthor;\n description?: string;\n keywords?: PackageMetaInterface['latest']['keywords'];\n license?: PackageMetaInterface['latest']['license'];\n homepage?: string;\n bugs?: Bugs | string;\n dist?: Dist;\n showDownload?: boolean;\n}\n\nconst Package: React.FC<PackageInterface> = ({\n author: { name: authorName, avatar: authorAvatar },\n bugs,\n description,\n dist,\n homepage,\n keywords,\n license,\n name: packageName,\n time,\n showDownload = true,\n version,\n}) => {\n const config = getConfiguration();\n const { t } = useTranslation();\n const { isLoading } = useManifests();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(\n async (tarballDist: string) => {\n // FIXME: check, the dist might be different thant npmjs\n const link = tarballDist.replace(`https://registry.npmjs.org/`, config.base);\n downloadTarball?.({ link });\n },\n [config, downloadTarball]\n );\n\n const renderVersionInfo = (): React.ReactNode =>\n version && (\n <OverviewItem>\n <StyledVersion />\n {t('package.version', { version })}\n </OverviewItem>\n );\n\n const renderAuthorInfo = (): React.ReactNode => {\n const name = utils.getAuthorName(authorName);\n return (\n <OverviewItem>\n <Author>\n <Avatar alt={name} src={authorAvatar} />\n <Details>{name}</Details>\n </Author>\n </OverviewItem>\n );\n };\n\n const renderFileSize = (): React.ReactNode =>\n dist?.unpackedSize ? (\n <OverviewItem>\n <StyledFileBinary />\n {utils.fileSizeSI(dist.unpackedSize)}\n </OverviewItem>\n ) : null;\n\n const renderLicenseInfo = (): React.ReactNode =>\n license && (\n <OverviewItem>\n <StyledLaw />\n {license as string}\n </OverviewItem>\n );\n\n const renderPublishedInfo = (): React.ReactNode =>\n time && (\n <OverviewItem>\n <StyledTime />\n <Published title={utils.formatDate(time)}>\n {t('package.published-on', { time: utils.formatDateDistance(time) })}\n </Published>\n </OverviewItem>\n );\n\n const renderHomePageLink = (): React.ReactNode =>\n homepage &&\n url.isURL(homepage) && (\n <LinkExternal to={homepage}>\n <Tooltip aria-label={t('package.homepage')} title={t('package.visit-home-page')}>\n <IconButton aria-label={t('package.homepage')} color=\"primary\" size=\"large\">\n <HomeIcon />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n );\n\n const renderBugsLink = (): React.ReactNode => {\n // bugs can be the object form or a plain url string, both valid in npm\n const bugsUrl = utils.getBugsUrl(bugs);\n return (\n bugsUrl &&\n url.isURL(bugsUrl) && (\n <LinkExternal to={bugsUrl}>\n <Tooltip aria-label={t('package.bugs')} title={t('package.open-an-issue')}>\n <IconButton aria-label={t('package.bugs')} color=\"primary\" size=\"large\">\n <BugReport />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n )\n );\n };\n\n const renderDownloadLink = (): React.ReactNode =>\n dist?.tarball &&\n url.isURL(dist.tarball) && (\n // a plain button: wrapping it in <Link to=\"#\"> pushed a stray `#` entry\n // into the browser history on every download\n <Tooltip\n aria-label={t('package.download', { what: t('package.the-tar-file') })}\n title={t('package.tarball')}\n >\n <IconButton\n aria-label={t('package.download')}\n color=\"primary\"\n data-testid=\"download-tarball\"\n onClick={() => {\n handleDownload(dist.tarball);\n }}\n size=\"large\"\n >\n {isLoading ? <CircularProgress size={13} /> : <DownloadIcon />}\n </IconButton>\n </Tooltip>\n );\n\n const renderPrimaryComponent = (): React.ReactNode => {\n return (\n <Grid alignItems=\"center\" container={true} size={{ xs: 12 }} wrap=\"wrap\">\n <Grid size=\"grow\">\n <WrapperLink to={`${Route.DETAIL}${packageName}`}>\n <PackageTitle className=\"package-title\" data-testid=\"package-title\">\n {packageName}\n </PackageTitle>\n </WrapperLink>\n </Grid>\n <GridRightAligned size=\"auto\">\n {renderHomePageLink()}\n {renderBugsLink()}\n {showDownload && renderDownloadLink()}\n </GridRightAligned>\n </Grid>\n );\n };\n\n const renderSecondaryComponent = (): React.ReactNode => <Description>{description}</Description>;\n\n const renderPackageListItemText = (): React.ReactNode => (\n <PackageListItemText\n primary={renderPrimaryComponent()}\n secondary={renderSecondaryComponent()}\n />\n );\n\n const renderKeywords = (): React.ReactNode => (\n <ListItem alignItems={'flex-start'} sx={{ py: 0, my: 0 }}>\n <List sx={{ p: 0, my: 0 }}>\n <KeywordListItems keywords={keywords} />\n </List>\n </ListItem>\n );\n\n return (\n <Wrapper className={'package'} data-testid=\"package-item-list\">\n <ListItem alignItems={'flex-start'} sx={{ mb: 0 }}>\n {renderPackageListItemText()}\n </ListItem>\n {keywords && keywords?.length > 0 ? renderKeywords() : null}\n <ListItem alignItems={'flex-start'} sx={{ mt: 0 }}>\n {renderAuthorInfo()}\n {renderVersionInfo()}\n {renderPublishedInfo()}\n {renderFileSize()}\n {renderLicenseInfo()}\n </ListItem>\n </Wrapper>\n );\n};\n\nexport default Package;\n\nconst iconStyle = ({ theme }: { theme: Theme }) => css`\n margin: 0 10px 0 0;\n fill: ${theme.palette.mode === 'light' ? grey[900] : common.white};\n`;\n\nconst StyledVersion = styled(Version)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledFileBinary = styled(FileBinary)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledLaw = styled(Law)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledTime = styled(Time)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAM,WAAuC,EAC3C,QAAQ,EAAE,MAAM,YAAY,QAAQ,gBACpC,MACA,aACA,MACA,UACA,UACA,SACA,MAAM,aACN,MACA,eAAe,MACf,cACI;CACJ,MAAM,SAAS,iBAAiB;CAChC,MAAM,EAAE,MAAM,eAAe;CAC7B,MAAM,EAAE,cAAc,aAAa;CACnC,MAAM,EAAE,oBAAoB,YAAY;CAExC,MAAM,iBAAiB,YACrB,OAAO,gBAAwB;EAE7B,MAAM,OAAO,YAAY,QAAQ,+BAA+B,OAAO,IAAI;EAC3E,kBAAkB,EAAE,KAAK,CAAC;CAC5B,GACA,CAAC,QAAQ,eAAe,CAC1B;CAEA,MAAM,0BACJ,WACE,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GACf,EAAE,m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AAD;GAAM,IAAI;IAAE,GAAG;IAAG,IAAI;GAAE;GACtB,UAAA,oBAAC,kBAAD,EAA4B,SAAW,CAAA;EACnC,CAAA;CACE,CAAA;CAGZ,OACE,qBAAC,SAAD;EAAS,WAAW;EAAW,eAAY;EAA3C,UAAA;GACE,oBAAC,UAAD;IAAU,YAAY;IAAc,IAAI,EAAE,IAAI,EAAE;IAC7C,UAAA,0BAA0B;GACnB,CAAA;GACT,YAAY,UAAU,SAAS,IAAI,eAAe,IAAI;GACvD,qBAAC,UAAD;IAAU,YAAY;IAAc,IAAI,EAAE,IAAI,EAAE;IAAhD,UAAA;KACG,iBAAiB;KACjB,kBAAkB;KAClB,oBAAoB;KACpB,eAAe;KACf,kBAAkB;IACX;;EACH;;AAEb;AAIA,IAAM,aAAa,EAAE,YAA8B,GAAG;;UAE5C,MAAM,QAAQ,SAAS,UAAU,KAAK,OAAO,OAAO,MAAM;;AAGpE,IAAM,gBAAgB,OAAO,OAAO,CAAC;IACjC,UAAU;;AAGd,IAAM,mBAAmB,OAAO,UAAU,CAAC;IACvC,UAAU;;AAGd,IAAM,YAAY,OAAO,GAAG,CAAC;IACzB,UAAU;;AAGd,IAAM,aAAa,OAAO,IAAI,CAAC;IAC3B,UAAU"}
1
+ {"version":3,"file":"Package.mjs","names":["utils.getAuthorName","utils.fileSizeSI","utils.formatDate","utils.formatDateDistance","url.isURL","utils.getBugsUrl","BugReport"],"sources":["../../../src/components/Package/Package.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport BugReport from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Grid from '@mui/material/Grid';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common, grey } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../';\nimport { LinkExternal, useDownload, useManifests } from '../../';\nimport { FileBinary, Law, Time, Version } from '../../components/Icons';\nimport { getConfiguration } from '../../configuration';\nimport type { Author as PackageAuthor } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { Route, url, utils } from '../../utils';\nimport KeywordListItems from '../Keywords/KeywordListItems';\nimport {\n Author,\n Avatar,\n Description,\n Details,\n GridRightAligned,\n IconButton,\n OverviewItem,\n PackageListItemText,\n PackageTitle,\n Published,\n Wrapper,\n WrapperLink,\n} from './styles';\n\ninterface Bugs {\n url: string;\n}\n\ninterface Dist {\n unpackedSize: number;\n tarball: string;\n}\n\nexport interface PackageInterface {\n name: string;\n version: string;\n time?: number | string;\n author: PackageAuthor;\n description?: string;\n keywords?: PackageMetaInterface['latest']['keywords'];\n license?: PackageMetaInterface['latest']['license'];\n homepage?: string;\n bugs?: Bugs | string;\n dist?: Dist;\n showDownload?: boolean;\n}\n\nconst Package: React.FC<PackageInterface> = ({\n author: { name: authorName, avatar: authorAvatar },\n bugs,\n description,\n dist,\n homepage,\n keywords,\n license,\n name: packageName,\n time,\n showDownload = true,\n version,\n}) => {\n const config = getConfiguration();\n const { t } = useTranslation();\n const { isLoading } = useManifests();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(\n async (tarballDist: string) => {\n // FIXME: check, the dist might be different thant npmjs\n const link = tarballDist.replace(`https://registry.npmjs.org/`, config.base);\n downloadTarball?.({ link });\n },\n [config, downloadTarball]\n );\n\n const renderVersionInfo = (): React.ReactNode =>\n version && (\n <OverviewItem>\n <StyledVersion />\n {t('package.version', { version })}\n </OverviewItem>\n );\n\n const renderAuthorInfo = (): React.ReactNode => {\n const name = utils.getAuthorName(authorName);\n return (\n <OverviewItem>\n <Author>\n <Avatar alt={name} src={authorAvatar} />\n <Details>{name}</Details>\n </Author>\n </OverviewItem>\n );\n };\n\n const renderFileSize = (): React.ReactNode =>\n dist?.unpackedSize ? (\n <OverviewItem>\n <StyledFileBinary />\n {utils.fileSizeSI(dist.unpackedSize)}\n </OverviewItem>\n ) : null;\n\n const renderLicenseInfo = (): React.ReactNode =>\n license && (\n <OverviewItem>\n <StyledLaw />\n {license as string}\n </OverviewItem>\n );\n\n const renderPublishedInfo = (): React.ReactNode =>\n time && (\n <OverviewItem>\n <StyledTime />\n <Published title={utils.formatDate(time)}>\n {t('package.published-on', { time: utils.formatDateDistance(time) })}\n </Published>\n </OverviewItem>\n );\n\n const renderHomePageLink = (): React.ReactNode =>\n homepage &&\n url.isURL(homepage) && (\n <LinkExternal to={homepage}>\n <Tooltip aria-label={t('package.homepage')} title={t('package.visit-home-page')}>\n <IconButton aria-label={t('package.homepage')} color=\"primary\" size=\"large\">\n <HomeIcon />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n );\n\n const renderBugsLink = (): React.ReactNode => {\n // bugs can be the object form or a plain url string, both valid in npm\n const bugsUrl = utils.getBugsUrl(bugs);\n return (\n bugsUrl &&\n url.isURL(bugsUrl) && (\n <LinkExternal to={bugsUrl}>\n <Tooltip aria-label={t('package.bugs')} title={t('package.open-an-issue')}>\n <IconButton aria-label={t('package.bugs')} color=\"primary\" size=\"large\">\n <BugReport />\n </IconButton>\n </Tooltip>\n </LinkExternal>\n )\n );\n };\n\n const renderDownloadLink = (): React.ReactNode =>\n dist?.tarball &&\n url.isURL(dist.tarball) && (\n // a plain button: wrapping it in <Link to=\"#\"> pushed a stray `#` entry\n // into the browser history on every download\n <Tooltip\n aria-label={t('package.download', { what: t('package.the-tar-file') })}\n title={t('package.tarball')}\n >\n <IconButton\n aria-label={t('package.download')}\n color=\"primary\"\n data-testid=\"download-tarball\"\n onClick={() => {\n handleDownload(dist.tarball);\n }}\n size=\"large\"\n >\n {isLoading ? <CircularProgress size={13} /> : <DownloadIcon />}\n </IconButton>\n </Tooltip>\n );\n\n const renderPrimaryComponent = (): React.ReactNode => {\n return (\n <Grid alignItems=\"center\" container={true} size={{ xs: 12 }} wrap=\"wrap\">\n <Grid size=\"grow\">\n <WrapperLink to={`${Route.DETAIL}${packageName}`}>\n <PackageTitle className=\"package-title\" data-testid=\"package-title\">\n {packageName}\n </PackageTitle>\n </WrapperLink>\n </Grid>\n <GridRightAligned size=\"auto\">\n {renderHomePageLink()}\n {renderBugsLink()}\n {showDownload && renderDownloadLink()}\n </GridRightAligned>\n </Grid>\n );\n };\n\n const renderSecondaryComponent = (): React.ReactNode => <Description>{description}</Description>;\n\n const renderPackageListItemText = (): React.ReactNode => (\n <PackageListItemText\n primary={renderPrimaryComponent()}\n secondary={renderSecondaryComponent()}\n />\n );\n\n const renderKeywords = (): React.ReactNode => (\n <ListItem alignItems={'flex-start'} sx={{ py: 0, my: 0 }}>\n <List sx={{ p: 0, my: 0 }}>\n <KeywordListItems keywords={keywords} />\n </List>\n </ListItem>\n );\n\n return (\n <Wrapper className={'package'} data-testid=\"package-item-list\">\n <ListItem alignItems={'flex-start'} sx={{ mb: 0 }}>\n {renderPackageListItemText()}\n </ListItem>\n {keywords && keywords?.length > 0 ? renderKeywords() : null}\n <ListItem alignItems={'flex-start'} sx={{ mt: 0 }}>\n {renderAuthorInfo()}\n {renderVersionInfo()}\n {renderPublishedInfo()}\n {renderFileSize()}\n {renderLicenseInfo()}\n </ListItem>\n </Wrapper>\n );\n};\n\nexport default Package;\n\nconst iconStyle = ({ theme }: { theme: Theme }) => css`\n margin: 0 10px 0 0;\n fill: ${theme.palette.mode === 'light' ? grey[900] : common.white};\n`;\n\nconst StyledVersion = styled(Version)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledFileBinary = styled(FileBinary)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledLaw = styled(Law)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n\nconst StyledTime = styled(Time)<{ theme?: Theme }>`\n ${iconStyle};\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAM,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IAAM,aAAa,OAAO,IAAI,CAAC;IAC3B,UAAU"}
@@ -1,2 +1 @@
1
- import Package from "./Package.mjs";
2
- export { Package as default };
1
+ export { default } from "./Package.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":[],"sources":["../../../src/components/Package/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as Photo } from '@mui/material/Avatar';\nimport Grid from '@mui/material/Grid';\nimport { default as MuiIconButton } from '@mui/material/IconButton';\nimport List from '@mui/material/List';\nimport ListItemText from '@mui/material/ListItemText';\nimport { common } from '@mui/material/colors';\nimport { Link } from 'react-router';\n\nimport type { Theme } from '../../';\nimport { greyDark } from '../../Theme/colors';\n\nexport const OverviewItem = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n margin: '0 20px 0 0',\n color: theme.palette.mode === 'light' ? theme.palette.greyDark2 : common.white,\n fontSize: 12,\n [`@media (max-width: ${theme.breakPoints.medium}px)`]: {\n ':nth-of-type(3)': {\n display: 'none',\n },\n },\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n ':nth-of-type(4)': {\n display: 'none',\n },\n },\n}));\n\nexport const Published = styled('span')({\n margin: '0 5px 0 0',\n});\n\nexport const Details = styled('span')({\n marginLeft: '5px',\n lineHeight: 1.5,\n display: 'flex',\n flexDirection: 'column',\n});\n\nexport const Author = styled('div')({\n display: 'flex',\n alignItems: 'center',\n});\n\nexport const Avatar = styled(Photo)({\n width: '20px',\n height: '20px',\n});\n\nexport const WrapperLink = styled(Link)({\n textDecoration: 'none',\n});\n\nexport const PackageTitle = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n fontSize: 20,\n display: 'block',\n color: theme.palette.primary.main,\n cursor: 'pointer',\n textDecoration: 'none',\n wordBreak: 'break-word',\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n fontSize: 16,\n },\n}));\n\nexport const GridRightAligned = styled(Grid)({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n});\n\nexport const Wrapper = styled(List)<{ theme?: Theme }>(({ theme }) => ({\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n}));\n\nexport const IconButton = styled(MuiIconButton)({\n padding: 6,\n svg: {\n fontSize: 16,\n },\n});\n\nexport const PackageListItemText = styled(ListItemText)({\n paddingRight: 0,\n});\n\nexport const Description = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n color: theme.palette.mode === 'light' ? greyDark : common.white,\n fontSize: '14px',\n paddingRight: 0,\n}));\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,IAAa,gBAAA,GAAe,gBAAA,QAAA,CAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC5E,SAAS;CACT,YAAY;CACZ,QAAQ;CACR,OAAO,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,YAAY,qBAAA,OAAO;CACzE,UAAU;EACT,sBAAsB,MAAM,YAAY,OAAO,OAAO,EACrD,mBAAmB,EACjB,SAAS,OACX,EACF;EACC,sBAAsB,MAAM,YAAY,MAAM,OAAO,EACpD,mBAAmB,EACjB,SAAS,OACX,EACF;AACF,EAAE;AAEF,IAAa,aAAA,GAAY,gBAAA,QAAA,CAAO,MAAM,CAAC,CAAC,EACtC,QAAQ,YACV,CAAC;AAED,IAAa,WAAA,GAAU,gBAAA,QAAA,CAAO,MAAM,CAAC,CAAC;CACpC,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,eAAe;AACjB,CAAC;AAED,IAAa,UAAA,GAAS,gBAAA,QAAA,CAAO,KAAK,CAAC,CAAC;CAClC,SAAS;CACT,YAAY;AACd,CAAC;AAED,IAAa,UAAA,GAAS,gBAAA,QAAA,CAAO,qBAAA,OAAK,CAAC,CAAC;CAClC,OAAO;CACP,QAAQ;AACV,CAAC;AAED,IAAa,eAAA,GAAc,gBAAA,QAAA,CAAO,aAAA,IAAI,CAAC,CAAC,EACtC,gBAAgB,OAClB,CAAC;AAED,IAAa,gBAAA,GAAe,gBAAA,QAAA,CAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC5E,YAAY,MAAM,WAAW;CAC7B,UAAU;CACV,SAAS;CACT,OAAO,MAAM,QAAQ,QAAQ;CAC7B,QAAQ;CACR,gBAAgB;CAChB,WAAW;EACV,sBAAsB,MAAM,YAAY,MAAM,OAAO,EACpD,UAAU,GACZ;AACF,EAAE;AAEF,IAAa,oBAAA,GAAmB,gBAAA,QAAA,CAAO,mBAAA,OAAI,CAAC,CAAC;CAC3C,SAAS;CACT,YAAY;CACZ,gBAAgB;AAClB,CAAC;AAED,IAAa,WAAA,GAAU,gBAAA,QAAA,CAAO,mBAAA,OAAI,CAAC,EAAqB,EAAE,aAAa,EACrE,WAAW,EACT,iBAAiB,MAAM,QAAQ,OAAO,MACxC,EACF,EAAE;AAEF,IAAa,cAAA,GAAa,gBAAA,QAAA,CAAO,yBAAA,OAAa,CAAC,CAAC;CAC9C,SAAS;CACT,KAAK,EACH,UAAU,GACZ;AACF,CAAC;AAED,IAAa,uBAAA,GAAsB,gBAAA,QAAA,CAAO,2BAAA,OAAY,CAAC,CAAC,EACtD,cAAc,EAChB,CAAC;AAED,IAAa,eAAA,GAAc,gBAAA,QAAA,CAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC3E,OAAO,MAAM,QAAQ,SAAS,UAAU,eAAA,WAAW,qBAAA,OAAO;CAC1D,UAAU;CACV,cAAc;AAChB,EAAE"}
1
+ {"version":3,"file":"styles.js","names":["styled","common","Photo","Link","Grid","List","MuiIconButton","ListItemText","greyDark"],"sources":["../../../src/components/Package/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as Photo } from '@mui/material/Avatar';\nimport Grid from '@mui/material/Grid';\nimport { default as MuiIconButton } from '@mui/material/IconButton';\nimport List from '@mui/material/List';\nimport ListItemText from '@mui/material/ListItemText';\nimport { common } from '@mui/material/colors';\nimport { Link } from 'react-router';\n\nimport type { Theme } from '../../';\nimport { greyDark } from '../../Theme/colors';\n\nexport const OverviewItem = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n margin: '0 20px 0 0',\n color: theme.palette.mode === 'light' ? theme.palette.greyDark2 : common.white,\n fontSize: 12,\n [`@media (max-width: ${theme.breakPoints.medium}px)`]: {\n ':nth-of-type(3)': {\n display: 'none',\n },\n },\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n ':nth-of-type(4)': {\n display: 'none',\n },\n },\n}));\n\nexport const Published = styled('span')({\n margin: '0 5px 0 0',\n});\n\nexport const Details = styled('span')({\n marginLeft: '5px',\n lineHeight: 1.5,\n display: 'flex',\n flexDirection: 'column',\n});\n\nexport const Author = styled('div')({\n display: 'flex',\n alignItems: 'center',\n});\n\nexport const Avatar = styled(Photo)({\n width: '20px',\n height: '20px',\n});\n\nexport const WrapperLink = styled(Link)({\n textDecoration: 'none',\n});\n\nexport const PackageTitle = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n fontSize: 20,\n display: 'block',\n color: theme.palette.primary.main,\n cursor: 'pointer',\n textDecoration: 'none',\n wordBreak: 'break-word',\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n fontSize: 16,\n },\n}));\n\nexport const GridRightAligned = styled(Grid)({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n});\n\nexport const Wrapper = styled(List)<{ theme?: Theme }>(({ theme }) => ({\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n}));\n\nexport const IconButton = styled(MuiIconButton)({\n padding: 6,\n svg: {\n fontSize: 16,\n },\n});\n\nexport const PackageListItemText = styled(ListItemText)({\n paddingRight: 0,\n});\n\nexport const Description = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n color: theme.palette.mode === 'light' ? greyDark : common.white,\n fontSize: '14px',\n paddingRight: 0,\n}));\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,IAAa,gBAAA,GAAeA,gBA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;AAED,IAAa,WAAA,GAAUJ,gBAAAA,QAAAA,CAAOK,mBAAAA,OAAI,CAAC,EAAqB,EAAE,aAAa,EACrE,WAAW,EACT,iBAAiB,MAAM,QAAQ,OAAO,MACxC,EACF,EAAE;AAEF,IAAa,cAAA,GAAaL,gBAAAA,QAAAA,CAAOM,yBAAAA,OAAa,CAAC,CAAC;CAC9C,SAAS;CACT,KAAK,EACH,UAAU,GACZ;AACF,CAAC;AAED,IAAa,uBAAA,GAAsBN,gBAAAA,QAAAA,CAAOO,2BAAAA,OAAY,CAAC,CAAC,EACtD,cAAc,EAChB,CAAC;AAED,IAAa,eAAA,GAAcP,gBAAAA,QAAAA,CAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC3E,OAAO,MAAM,QAAQ,SAAS,UAAUQ,eAAAA,WAAWP,qBAAAA,OAAO;CAC1D,UAAU;CACV,cAAc;AAChB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.mjs","names":[],"sources":["../../../src/components/Package/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as Photo } from '@mui/material/Avatar';\nimport Grid from '@mui/material/Grid';\nimport { default as MuiIconButton } from '@mui/material/IconButton';\nimport List from '@mui/material/List';\nimport ListItemText from '@mui/material/ListItemText';\nimport { common } from '@mui/material/colors';\nimport { Link } from 'react-router';\n\nimport type { Theme } from '../../';\nimport { greyDark } from '../../Theme/colors';\n\nexport const OverviewItem = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n margin: '0 20px 0 0',\n color: theme.palette.mode === 'light' ? theme.palette.greyDark2 : common.white,\n fontSize: 12,\n [`@media (max-width: ${theme.breakPoints.medium}px)`]: {\n ':nth-of-type(3)': {\n display: 'none',\n },\n },\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n ':nth-of-type(4)': {\n display: 'none',\n },\n },\n}));\n\nexport const Published = styled('span')({\n margin: '0 5px 0 0',\n});\n\nexport const Details = styled('span')({\n marginLeft: '5px',\n lineHeight: 1.5,\n display: 'flex',\n flexDirection: 'column',\n});\n\nexport const Author = styled('div')({\n display: 'flex',\n alignItems: 'center',\n});\n\nexport const Avatar = styled(Photo)({\n width: '20px',\n height: '20px',\n});\n\nexport const WrapperLink = styled(Link)({\n textDecoration: 'none',\n});\n\nexport const PackageTitle = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n fontSize: 20,\n display: 'block',\n color: theme.palette.primary.main,\n cursor: 'pointer',\n textDecoration: 'none',\n wordBreak: 'break-word',\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n fontSize: 16,\n },\n}));\n\nexport const GridRightAligned = styled(Grid)({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n});\n\nexport const Wrapper = styled(List)<{ theme?: Theme }>(({ theme }) => ({\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n}));\n\nexport const IconButton = styled(MuiIconButton)({\n padding: 6,\n svg: {\n fontSize: 16,\n },\n});\n\nexport const PackageListItemText = styled(ListItemText)({\n paddingRight: 0,\n});\n\nexport const Description = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n color: theme.palette.mode === 'light' ? greyDark : common.white,\n fontSize: '14px',\n paddingRight: 0,\n}));\n"],"mappings":";;;;;;;;;;AAYA,IAAa,eAAe,OAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC5E,SAAS;CACT,YAAY;CACZ,QAAQ;CACR,OAAO,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,YAAY,OAAO;CACzE,UAAU;EACT,sBAAsB,MAAM,YAAY,OAAO,OAAO,EACrD,mBAAmB,EACjB,SAAS,OACX,EACF;EACC,sBAAsB,MAAM,YAAY,MAAM,OAAO,EACpD,mBAAmB,EACjB,SAAS,OACX,EACF;AACF,EAAE;AAEF,IAAa,YAAY,OAAO,MAAM,CAAC,CAAC,EACtC,QAAQ,YACV,CAAC;AAED,IAAa,UAAU,OAAO,MAAM,CAAC,CAAC;CACpC,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,eAAe;AACjB,CAAC;AAED,IAAa,SAAS,OAAO,KAAK,CAAC,CAAC;CAClC,SAAS;CACT,YAAY;AACd,CAAC;AAED,IAAa,WAAS,OAAO,MAAK,CAAC,CAAC;CAClC,OAAO;CACP,QAAQ;AACV,CAAC;AAED,IAAa,cAAc,OAAO,IAAI,CAAC,CAAC,EACtC,gBAAgB,OAClB,CAAC;AAED,IAAa,eAAe,OAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC5E,YAAY,MAAM,WAAW;CAC7B,UAAU;CACV,SAAS;CACT,OAAO,MAAM,QAAQ,QAAQ;CAC7B,QAAQ;CACR,gBAAgB;CAChB,WAAW;EACV,sBAAsB,MAAM,YAAY,MAAM,OAAO,EACpD,UAAU,GACZ;AACF,EAAE;AAEF,IAAa,mBAAmB,OAAO,IAAI,CAAC,CAAC;CAC3C,SAAS;CACT,YAAY;CACZ,gBAAgB;AAClB,CAAC;AAED,IAAa,UAAU,OAAO,IAAI,CAAC,EAAqB,EAAE,aAAa,EACrE,WAAW,EACT,iBAAiB,MAAM,QAAQ,OAAO,MACxC,EACF,EAAE;AAEF,IAAa,eAAa,OAAO,UAAa,CAAC,CAAC;CAC9C,SAAS;CACT,KAAK,EACH,UAAU,GACZ;AACF,CAAC;AAED,IAAa,sBAAsB,OAAO,YAAY,CAAC,CAAC,EACtD,cAAc,EAChB,CAAC;AAED,IAAa,cAAc,OAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC3E,OAAO,MAAM,QAAQ,SAAS,UAAU,WAAW,OAAO;CAC1D,UAAU;CACV,cAAc;AAChB,EAAE"}
1
+ {"version":3,"file":"styles.mjs","names":["Avatar","Photo","IconButton","MuiIconButton"],"sources":["../../../src/components/Package/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as Photo } from '@mui/material/Avatar';\nimport Grid from '@mui/material/Grid';\nimport { default as MuiIconButton } from '@mui/material/IconButton';\nimport List from '@mui/material/List';\nimport ListItemText from '@mui/material/ListItemText';\nimport { common } from '@mui/material/colors';\nimport { Link } from 'react-router';\n\nimport type { Theme } from '../../';\nimport { greyDark } from '../../Theme/colors';\n\nexport const OverviewItem = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n margin: '0 20px 0 0',\n color: theme.palette.mode === 'light' ? theme.palette.greyDark2 : common.white,\n fontSize: 12,\n [`@media (max-width: ${theme.breakPoints.medium}px)`]: {\n ':nth-of-type(3)': {\n display: 'none',\n },\n },\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n ':nth-of-type(4)': {\n display: 'none',\n },\n },\n}));\n\nexport const Published = styled('span')({\n margin: '0 5px 0 0',\n});\n\nexport const Details = styled('span')({\n marginLeft: '5px',\n lineHeight: 1.5,\n display: 'flex',\n flexDirection: 'column',\n});\n\nexport const Author = styled('div')({\n display: 'flex',\n alignItems: 'center',\n});\n\nexport const Avatar = styled(Photo)({\n width: '20px',\n height: '20px',\n});\n\nexport const WrapperLink = styled(Link)({\n textDecoration: 'none',\n});\n\nexport const PackageTitle = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n fontSize: 20,\n display: 'block',\n color: theme.palette.primary.main,\n cursor: 'pointer',\n textDecoration: 'none',\n wordBreak: 'break-word',\n [`@media (max-width: ${theme.breakPoints.small}px)`]: {\n fontSize: 16,\n },\n}));\n\nexport const GridRightAligned = styled(Grid)({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n});\n\nexport const Wrapper = styled(List)<{ theme?: Theme }>(({ theme }) => ({\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n}));\n\nexport const IconButton = styled(MuiIconButton)({\n padding: 6,\n svg: {\n fontSize: 16,\n },\n});\n\nexport const PackageListItemText = styled(ListItemText)({\n paddingRight: 0,\n});\n\nexport const Description = styled('span')<{ theme?: Theme }>(({ theme }) => ({\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ACxC,EACF,EAAE;AAEF,IAAaC,eAAa,OAAOC,UAAa,CAAC,CAAC;CAC9C,SAAS;CACT,KAAK,EACH,UAAU,GACZ;AACF,CAAC;AAED,IAAa,sBAAsB,OAAO,YAAY,CAAC,CAAC,EACtD,cAAc,EAChB,CAAC;AAED,IAAa,cAAc,OAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAC3E,OAAO,MAAM,QAAQ,SAAS,UAAU,WAAW,OAAO;CAC1D,UAAU;CACV,cAAc;AAChB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"PackageList.js","names":[],"sources":["../../../src/components/PackageList/PackageList.tsx"],"sourcesContent":["import Divider from '@mui/material/Divider';\nimport React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';\nimport type { ListRowProps } from 'react-virtualized/dist/commonjs/List';\nimport { List } from 'react-virtualized/dist/commonjs/List';\nimport { WindowScroller } from 'react-virtualized/dist/commonjs/WindowScroller';\n\nimport { DownloadProvider, Help, Package, useConfig } from '../..';\nimport type { ManifestWeb } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport { utils } from '../../utils';\n\ninterface Props {\n packages: ManifestWeb[];\n}\n\nconst cache = new CellMeasurerCache({\n fixedWidth: true,\n defaultHeight: 100,\n});\n\nconst PackageList: React.FC<Props> = ({ packages }) => {\n const { configOptions } = useConfig();\n const renderRow = ({ index, key, parent, style }: ListRowProps) => {\n const { name, version, description, time, keywords, dist, homepage, bugs, author, license } =\n packages[index];\n // TODO: move format license to API side.\n const formattedLicense = utils.formatLicense(license);\n return (\n <CellMeasurer cache={cache} columnIndex={0} key={key} parent={parent} rowIndex={index}>\n <div style={style}>\n {index !== 0 && <Divider />}\n <Package\n author={author}\n bugs={bugs}\n description={description}\n dist={dist}\n homepage={homepage}\n keywords={keywords}\n license={formattedLicense}\n name={name}\n showDownload={configOptions.showDownloadTarball}\n time={time}\n version={version}\n />\n </div>\n </CellMeasurer>\n );\n };\n\n const hasPackages = packages?.length > 0;\n\n if (!hasPackages) {\n return <Help />;\n }\n\n return (\n <DownloadProvider>\n <WindowScroller>\n {({ height, isScrolling, scrollTop, onChildScroll }) => (\n <AutoSizer disableHeight={true}>\n {({ width }) => {\n return (\n <List\n autoHeight={true}\n deferredMeasurementCache={cache}\n height={height}\n isScrolling={isScrolling}\n onScroll={onChildScroll}\n overscanRowCount={3}\n rowCount={packages?.length}\n rowHeight={cache.rowHeight}\n rowRenderer={renderRow}\n scrollTop={scrollTop}\n width={width}\n />\n );\n }}\n </AutoSizer>\n )}\n </WindowScroller>\n </DownloadProvider>\n );\n};\n\nexport default PackageList;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,IAAM,QAAQ,IAAI,6CAAA,kBAAkB;CAClC,YAAY;CACZ,eAAe;AACjB,CAAC;AAED,IAAM,eAAgC,EAAE,eAAe;CACrD,MAAM,EAAE,kBAAkB,iCAAA,UAAU;CACpC,MAAM,aAAa,EAAE,OAAO,KAAK,QAAQ,YAA0B;EACjE,MAAM,EAAE,MAAM,SAAS,aAAa,MAAM,UAAU,MAAM,UAAU,MAAM,QAAQ,YAChF,SAAS;EAEX,MAAM,mBAAA,cAAA,cAAuC,OAAO;EACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,6CAAA,cAAD;GAAqB;GAAO,aAAa;GAAqB;GAAQ,UAAU;GAC9E,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAY;IAAZ,UAAA,CACG,UAAU,KAAK,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD,CAAU,CAAA,GAC1B,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAA,SAAD;KACU;KACF;KACO;KACP;KACI;KACA;KACV,SAAS;KACH;KACN,cAAc,cAAc;KACtB;KACG;IACV,CAAA,CACE;;EACO,GAjBmC,GAiBnC;CAElB;CAIA,IAAI,EAFgB,UAAU,SAAS,IAGrC,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,SAAD,CAAO,CAAA;CAGhB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,yBAAA,kBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,+CAAA,gBAAD,EAAA,WACI,EAAE,QAAQ,aAAa,WAAW,oBAClC,iBAAA,GAAA,kBAAA,IAAA,CAAC,0CAAA,WAAD;EAAW,eAAe;EACtB,WAAA,EAAE,YAAY;GACd,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,qCAAA,MAAD;IACE,YAAY;IACZ,0BAA0B;IAClB;IACK;IACb,UAAU;IACV,kBAAkB;IAClB,UAAU,UAAU;IACpB,WAAW,MAAM;IACjB,aAAa;IACF;IACJ;GACR,CAAA;EAEL;CACS,CAAA,EAEC,CAAA,EACA,CAAA;AAEtB"}
1
+ {"version":3,"file":"PackageList.js","names":["CellMeasurerCache","useConfig","CellMeasurer","Divider","Package","Help","DownloadProvider","WindowScroller","AutoSizer","List"],"sources":["../../../src/components/PackageList/PackageList.tsx"],"sourcesContent":["import Divider from '@mui/material/Divider';\nimport React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';\nimport type { ListRowProps } from 'react-virtualized/dist/commonjs/List';\nimport { List } from 'react-virtualized/dist/commonjs/List';\nimport { WindowScroller } from 'react-virtualized/dist/commonjs/WindowScroller';\n\nimport { DownloadProvider, Help, Package, useConfig } from '../..';\nimport type { ManifestWeb } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport { utils } from '../../utils';\n\ninterface Props {\n packages: ManifestWeb[];\n}\n\nconst cache = new CellMeasurerCache({\n fixedWidth: true,\n defaultHeight: 100,\n});\n\nconst PackageList: React.FC<Props> = ({ packages }) => {\n const { configOptions } = useConfig();\n const renderRow = ({ index, key, parent, style }: ListRowProps) => {\n const { name, version, description, time, keywords, dist, homepage, bugs, author, license } =\n packages[index];\n // TODO: move format license to API side.\n const formattedLicense = utils.formatLicense(license);\n return (\n <CellMeasurer cache={cache} columnIndex={0} key={key} parent={parent} rowIndex={index}>\n <div style={style}>\n {index !== 0 && <Divider />}\n <Package\n author={author}\n bugs={bugs}\n description={description}\n dist={dist}\n homepage={homepage}\n keywords={keywords}\n license={formattedLicense}\n name={name}\n showDownload={configOptions.showDownloadTarball}\n time={time}\n version={version}\n />\n </div>\n </CellMeasurer>\n );\n };\n\n const hasPackages = packages?.length > 0;\n\n if (!hasPackages) {\n return <Help />;\n }\n\n return (\n <DownloadProvider>\n <WindowScroller>\n {({ height, isScrolling, scrollTop, onChildScroll }) => (\n <AutoSizer disableHeight={true}>\n {({ width }) => {\n return (\n <List\n autoHeight={true}\n deferredMeasurementCache={cache}\n height={height}\n isScrolling={isScrolling}\n onScroll={onChildScroll}\n overscanRowCount={3}\n rowCount={packages?.length}\n rowHeight={cache.rowHeight}\n rowRenderer={renderRow}\n scrollTop={scrollTop}\n width={width}\n />\n );\n }}\n </AutoSizer>\n )}\n </WindowScroller>\n </DownloadProvider>\n );\n};\n\nexport default PackageList;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,IAAM,QAAQ,IAAIA,6CAAAA,kBAAkB;CAClC,YAAY;CACZ,eAAe;AACjB,CAAC;AAED,IAAM,eAAgC,EAAE,eAAe;CACrD,MAAM,EAAE,kBAAkBC,iCAAAA,UAAU;CACpC,MAAM,aAAa,EAAE,OAAO,KAAK,QAAQ,YAA0B;EACjE,MAAM,EAAE,MAAM,SAAS,aAAa,MAAM,UAAU,MAAM,UAAU,MAAM,QAAQ,YAChF,SAAS;EAEX,MAAM,mBAAA,cAAA,cAAuC,OAAO;EACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6CAAAA,cAAD;GAAqB;GAAO,aAAa;GAAqB;GAAQ,UAAU;GAC9E,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAY;IAAZ,UAAA,CACG,UAAU,KAAK,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,SAAD,CAAU,CAAA,GAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,SAAD;KACU;KACF;KACO;KACP;KACI;KACA;KACV,SAAS;KACH;KACN,cAAc,cAAc;KACtB;KACG;IACV,CAAA,CACE;;EACO,GAjBmC,GAiBnC;CAElB;CAIA,IAAI,EAFgB,UAAU,SAAS,IAGrC,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,SAAD,CAAO,CAAA;CAGhB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,+CAAAA,gBAAD,EAAA,WACI,EAAE,QAAQ,aAAa,WAAW,oBAClC,iBAAA,GAAA,kBAAA,IAAA,CAACC,0CAAAA,WAAD;EAAW,eAAe;EACtB,WAAA,EAAE,YAAY;GACd,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,qCAAAA,MAAD;IACE,YAAY;IACZ,0BAA0B;IAClB;IACK;IACb,UAAU;IACV,kBAAkB;IAClB,UAAU,UAAU;IACpB,WAAW,MAAM;IACjB,aAAa;IACF;IACJ;GACR,CAAA;EAEL;CACS,CAAA,EAEC,CAAA,EACA,CAAA;AAEtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PackageList.mjs","names":[],"sources":["../../../src/components/PackageList/PackageList.tsx"],"sourcesContent":["import Divider from '@mui/material/Divider';\nimport React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';\nimport type { ListRowProps } from 'react-virtualized/dist/commonjs/List';\nimport { List } from 'react-virtualized/dist/commonjs/List';\nimport { WindowScroller } from 'react-virtualized/dist/commonjs/WindowScroller';\n\nimport { DownloadProvider, Help, Package, useConfig } from '../..';\nimport type { ManifestWeb } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport { utils } from '../../utils';\n\ninterface Props {\n packages: ManifestWeb[];\n}\n\nconst cache = new CellMeasurerCache({\n fixedWidth: true,\n defaultHeight: 100,\n});\n\nconst PackageList: React.FC<Props> = ({ packages }) => {\n const { configOptions } = useConfig();\n const renderRow = ({ index, key, parent, style }: ListRowProps) => {\n const { name, version, description, time, keywords, dist, homepage, bugs, author, license } =\n packages[index];\n // TODO: move format license to API side.\n const formattedLicense = utils.formatLicense(license);\n return (\n <CellMeasurer cache={cache} columnIndex={0} key={key} parent={parent} rowIndex={index}>\n <div style={style}>\n {index !== 0 && <Divider />}\n <Package\n author={author}\n bugs={bugs}\n description={description}\n dist={dist}\n homepage={homepage}\n keywords={keywords}\n license={formattedLicense}\n name={name}\n showDownload={configOptions.showDownloadTarball}\n time={time}\n version={version}\n />\n </div>\n </CellMeasurer>\n );\n };\n\n const hasPackages = packages?.length > 0;\n\n if (!hasPackages) {\n return <Help />;\n }\n\n return (\n <DownloadProvider>\n <WindowScroller>\n {({ height, isScrolling, scrollTop, onChildScroll }) => (\n <AutoSizer disableHeight={true}>\n {({ width }) => {\n return (\n <List\n autoHeight={true}\n deferredMeasurementCache={cache}\n height={height}\n isScrolling={isScrolling}\n onScroll={onChildScroll}\n overscanRowCount={3}\n rowCount={packages?.length}\n rowHeight={cache.rowHeight}\n rowRenderer={renderRow}\n scrollTop={scrollTop}\n width={width}\n />\n );\n }}\n </AutoSizer>\n )}\n </WindowScroller>\n </DownloadProvider>\n );\n};\n\nexport default PackageList;\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAM,QAAQ,IAAI,kBAAkB;CAClC,YAAY;CACZ,eAAe;AACjB,CAAC;AAED,IAAM,eAAgC,EAAE,eAAe;CACrD,MAAM,EAAE,kBAAkB,UAAU;CACpC,MAAM,aAAa,EAAE,OAAO,KAAK,QAAQ,YAA0B;EACjE,MAAM,EAAE,MAAM,SAAS,aAAa,MAAM,UAAU,MAAM,UAAU,MAAM,QAAQ,YAChF,SAAS;EAEX,MAAM,mBAAmB,cAAoB,OAAO;EACpD,OACE,oBAAC,cAAD;GAAqB;GAAO,aAAa;GAAqB;GAAQ,UAAU;GAC9E,UAAA,qBAAC,OAAD;IAAY;IAAZ,UAAA,CACG,UAAU,KAAK,oBAAC,SAAD,CAAU,CAAA,GAC1B,oBAAC,SAAD;KACU;KACF;KACO;KACP;KACI;KACA;KACV,SAAS;KACH;KACN,cAAc,cAAc;KACtB;KACG;IACV,CAAA,CACE;;EACO,GAjBmC,GAiBnC;CAElB;CAIA,IAAI,EAFgB,UAAU,SAAS,IAGrC,OAAO,oBAAC,MAAD,CAAO,CAAA;CAGhB,OACE,oBAAC,kBAAD,EAAA,UACE,oBAAC,gBAAD,EAAA,WACI,EAAE,QAAQ,aAAa,WAAW,oBAClC,oBAAC,WAAD;EAAW,eAAe;EACtB,WAAA,EAAE,YAAY;GACd,OACE,oBAAC,MAAD;IACE,YAAY;IACZ,0BAA0B;IAClB;IACK;IACb,UAAU;IACV,kBAAkB;IAClB,UAAU,UAAU;IACpB,WAAW,MAAM;IACjB,aAAa;IACF;IACJ;GACR,CAAA;EAEL;CACS,CAAA,EAEC,CAAA,EACA,CAAA;AAEtB"}
1
+ {"version":3,"file":"PackageList.mjs","names":["utils.formatLicense"],"sources":["../../../src/components/PackageList/PackageList.tsx"],"sourcesContent":["import Divider from '@mui/material/Divider';\nimport React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';\nimport type { ListRowProps } from 'react-virtualized/dist/commonjs/List';\nimport { List } from 'react-virtualized/dist/commonjs/List';\nimport { WindowScroller } from 'react-virtualized/dist/commonjs/WindowScroller';\n\nimport { DownloadProvider, Help, Package, useConfig } from '../..';\nimport type { ManifestWeb } from '../../providers/ManifestsProvider/ManifestsProvider';\nimport { utils } from '../../utils';\n\ninterface Props {\n packages: ManifestWeb[];\n}\n\nconst cache = new CellMeasurerCache({\n fixedWidth: true,\n defaultHeight: 100,\n});\n\nconst PackageList: React.FC<Props> = ({ packages }) => {\n const { configOptions } = useConfig();\n const renderRow = ({ index, key, parent, style }: ListRowProps) => {\n const { name, version, description, time, keywords, dist, homepage, bugs, author, license } =\n packages[index];\n // TODO: move format license to API side.\n const formattedLicense = utils.formatLicense(license);\n return (\n <CellMeasurer cache={cache} columnIndex={0} key={key} parent={parent} rowIndex={index}>\n <div style={style}>\n {index !== 0 && <Divider />}\n <Package\n author={author}\n bugs={bugs}\n description={description}\n dist={dist}\n homepage={homepage}\n keywords={keywords}\n license={formattedLicense}\n name={name}\n showDownload={configOptions.showDownloadTarball}\n time={time}\n version={version}\n />\n </div>\n </CellMeasurer>\n );\n };\n\n const hasPackages = packages?.length > 0;\n\n if (!hasPackages) {\n return <Help />;\n }\n\n return (\n <DownloadProvider>\n <WindowScroller>\n {({ height, isScrolling, scrollTop, onChildScroll }) => (\n <AutoSizer disableHeight={true}>\n {({ width }) => {\n return (\n <List\n autoHeight={true}\n deferredMeasurementCache={cache}\n height={height}\n isScrolling={isScrolling}\n onScroll={onChildScroll}\n overscanRowCount={3}\n rowCount={packages?.length}\n rowHeight={cache.rowHeight}\n rowRenderer={renderRow}\n scrollTop={scrollTop}\n width={width}\n />\n );\n }}\n </AutoSizer>\n )}\n </WindowScroller>\n </DownloadProvider>\n );\n};\n\nexport default PackageList;\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAM,QAAQ,IAAI,kBAAkB;CAClC,YAAY;CACZ,eAAe;AACjB,CAAC;AAED,IAAM,eAAgC,EAAE,eAAe;CACrD,MAAM,EAAE,kBAAkB,UAAU;CACpC,MAAM,aAAa,EAAE,OAAO,KAAK,QAAQ,YAA0B;EACjE,MAAM,EAAE,MAAM,SAAS,aAAa,MAAM,UAAU,MAAM,UAAU,MAAM,QAAQ,YAChF,SAAS;EAEX,MAAM,mBAAmBA,cAAoB,OAAO;EACpD,OACE,oBAAC,cAAD;GAAqB;GAAO,aAAa;GAAqB;GAAQ,UAAU;GAC9E,UAAA,qBAAC,OAAD;IAAY;IAAZ,UAAA,CACG,UAAU,KAAK,oBAAC,SAAD,CAAU,CAAA,GAC1B,oBAAC,SAAD;KACU;KACF;KACO;KACP;KACI;KACA;KACV,SAAS;KACH;KACN,cAAc,cAAc;KACtB;KACG;IACV,CAAA,CACE;;EACO,GAjBmC,GAiBnC;CAElB;CAIA,IAAI,EAFgB,UAAU,SAAS,IAGrC,OAAO,oBAAC,MAAD,CAAO,CAAA;CAGhB,OACE,oBAAC,kBAAD,EAAA,UACE,oBAAC,gBAAD,EAAA,WACI,EAAE,QAAQ,aAAa,WAAW,oBAClC,oBAAC,WAAD;EAAW,eAAe;EACtB,WAAA,EAAE,YAAY;GACd,OACE,oBAAC,MAAD;IACE,YAAY;IACZ,0BAA0B;IAClB;IACK;IACb,UAAU;IACV,kBAAkB;IAClB,UAAU,UAAU;IACpB,WAAW,MAAM;IACjB,aAAa;IACF;IACJ;GACR,CAAA;EAEL;CACS,CAAA,EAEC,CAAA,EACA,CAAA;AAEtB"}
@@ -1,2 +1 @@
1
- import PackageList from "./PackageList.mjs";
2
- export { PackageList as default };
1
+ export { default } from "./PackageList.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"Person.js","names":[],"sources":["../../../src/components/Person/Person.tsx"],"sourcesContent":["import { Typography } from '@mui/material';\nimport Avatar from '@mui/material/Avatar';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport LinkExternal from '../LinkExternal';\nimport PersonTooltip from './PersonTooltip';\nimport { getLink, getName } from './utils';\n\nconst Person: React.FC<{\n person: Developer;\n packageName: string;\n version: string;\n withText?: boolean;\n}> = ({ person, packageName, version, withText = false }) => {\n const link = getLink(person, packageName, version);\n\n const avatarComponent = (\n <Avatar\n alt={person.name}\n src={person.avatar ?? person._avatar}\n sx={{ width: 40, height: 40, ml: 0, mr: 1 }}\n />\n );\n\n return (\n <>\n <Tooltip\n data-testid={person.name}\n key={person.email}\n title={<PersonTooltip person={person} />}\n >\n {link.length > 0 ? (\n <LinkExternal to={link}>{avatarComponent}</LinkExternal>\n ) : (\n avatarComponent\n )}\n </Tooltip>\n {withText && (\n <Typography sx={{ ml: 1 }} variant=\"subtitle2\">\n {getName(person.name)}\n </Typography>\n )}\n </>\n );\n};\n\nexport default Person;\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,UAKA,EAAE,QAAQ,aAAa,SAAS,WAAW,YAAY;CAC3D,MAAM,OAAO,cAAA,QAAQ,QAAQ,aAAa,OAAO;CAEjD,MAAM,kBACJ,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;EACE,KAAK,OAAO;EACZ,KAAK,OAAO,UAAU,OAAO;EAC7B,IAAI;GAAE,OAAO;GAAI,QAAQ;GAAI,IAAI;GAAG,IAAI;EAAE;CAC3C,CAAA;CAGH,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD;EACE,eAAa,OAAO;EAEpB,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD,EAAuB,OAAS,CAAA;EAEtC,UAAA,KAAK,SAAS,IACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;GAAc,IAAI;GAAO,UAAA;EAA8B,CAAA,IAEvD;CAEK,GARF,OAAO,KAQL,GACR,YACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,cAAA,YAAD;EAAY,IAAI,EAAE,IAAI,EAAE;EAAG,SAAQ;EAChC,UAAA,cAAA,QAAQ,OAAO,IAAI;CACV,CAAA,CAEd,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"Person.js","names":["getLink","Avatar","_Fragment","Tooltip","PersonTooltip","LinkExternal","Typography","getName"],"sources":["../../../src/components/Person/Person.tsx"],"sourcesContent":["import { Typography } from '@mui/material';\nimport Avatar from '@mui/material/Avatar';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport LinkExternal from '../LinkExternal';\nimport PersonTooltip from './PersonTooltip';\nimport { getLink, getName } from './utils';\n\nconst Person: React.FC<{\n person: Developer;\n packageName: string;\n version: string;\n withText?: boolean;\n}> = ({ person, packageName, version, withText = false }) => {\n const link = getLink(person, packageName, version);\n\n const avatarComponent = (\n <Avatar\n alt={person.name}\n src={person.avatar ?? person._avatar}\n sx={{ width: 40, height: 40, ml: 0, mr: 1 }}\n />\n );\n\n return (\n <>\n <Tooltip\n data-testid={person.name}\n key={person.email}\n title={<PersonTooltip person={person} />}\n >\n {link.length > 0 ? (\n <LinkExternal to={link}>{avatarComponent}</LinkExternal>\n ) : (\n avatarComponent\n )}\n </Tooltip>\n {withText && (\n <Typography sx={{ ml: 1 }} variant=\"subtitle2\">\n {getName(person.name)}\n </Typography>\n )}\n </>\n );\n};\n\nexport default Person;\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,UAKA,EAAE,QAAQ,aAAa,SAAS,WAAW,YAAY;CAC3D,MAAM,OAAOA,cAAAA,QAAQ,QAAQ,aAAa,OAAO;CAEjD,MAAM,kBACJ,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;EACE,KAAK,OAAO;EACZ,KAAK,OAAO,UAAU,OAAO;EAC7B,IAAI;GAAE,OAAO;GAAI,QAAQ;GAAI,IAAI;GAAG,IAAI;EAAE;CAC3C,CAAA;CAGH,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAAC,kBAAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,SAAD;EACE,eAAa,OAAO;EAEpB,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,SAAD,EAAuB,OAAS,CAAA;EAEtC,UAAA,KAAK,SAAS,IACb,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;GAAc,IAAI;GAAO,UAAA;EAA8B,CAAA,IAEvD;CAEK,GARF,OAAO,KAQL,GACR,YACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,YAAD;EAAY,IAAI,EAAE,IAAI,EAAE;EAAG,SAAQ;EAChC,UAAAC,cAAAA,QAAQ,OAAO,IAAI;CACV,CAAA,CAEd,EAAA,CAAA;AAEN"}
@@ -1 +1 @@
1
- {"version":3,"file":"Person.mjs","names":[],"sources":["../../../src/components/Person/Person.tsx"],"sourcesContent":["import { Typography } from '@mui/material';\nimport Avatar from '@mui/material/Avatar';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport LinkExternal from '../LinkExternal';\nimport PersonTooltip from './PersonTooltip';\nimport { getLink, getName } from './utils';\n\nconst Person: React.FC<{\n person: Developer;\n packageName: string;\n version: string;\n withText?: boolean;\n}> = ({ person, packageName, version, withText = false }) => {\n const link = getLink(person, packageName, version);\n\n const avatarComponent = (\n <Avatar\n alt={person.name}\n src={person.avatar ?? person._avatar}\n sx={{ width: 40, height: 40, ml: 0, mr: 1 }}\n />\n );\n\n return (\n <>\n <Tooltip\n data-testid={person.name}\n key={person.email}\n title={<PersonTooltip person={person} />}\n >\n {link.length > 0 ? (\n <LinkExternal to={link}>{avatarComponent}</LinkExternal>\n ) : (\n avatarComponent\n )}\n </Tooltip>\n {withText && (\n <Typography sx={{ ml: 1 }} variant=\"subtitle2\">\n {getName(person.name)}\n </Typography>\n )}\n </>\n );\n};\n\nexport default Person;\n"],"mappings":";;;;;;;;;;AAUA,IAAM,UAKA,EAAE,QAAQ,aAAa,SAAS,WAAW,YAAY;CAC3D,MAAM,OAAO,QAAQ,QAAQ,aAAa,OAAO;CAEjD,MAAM,kBACJ,oBAAC,QAAD;EACE,KAAK,OAAO;EACZ,KAAK,OAAO,UAAU,OAAO;EAC7B,IAAI;GAAE,OAAO;GAAI,QAAQ;GAAI,IAAI;GAAG,IAAI;EAAE;CAC3C,CAAA;CAGH,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,SAAD;EACE,eAAa,OAAO;EAEpB,OAAO,oBAAC,eAAD,EAAuB,OAAS,CAAA;EAEtC,UAAA,KAAK,SAAS,IACb,oBAAC,cAAD;GAAc,IAAI;GAAO,UAAA;EAA8B,CAAA,IAEvD;CAEK,GARF,OAAO,KAQL,GACR,YACC,oBAAC,YAAD;EAAY,IAAI,EAAE,IAAI,EAAE;EAAG,SAAQ;EAChC,UAAA,QAAQ,OAAO,IAAI;CACV,CAAA,CAEd,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"Person.mjs","names":["_Fragment"],"sources":["../../../src/components/Person/Person.tsx"],"sourcesContent":["import { Typography } from '@mui/material';\nimport Avatar from '@mui/material/Avatar';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport LinkExternal from '../LinkExternal';\nimport PersonTooltip from './PersonTooltip';\nimport { getLink, getName } from './utils';\n\nconst Person: React.FC<{\n person: Developer;\n packageName: string;\n version: string;\n withText?: boolean;\n}> = ({ person, packageName, version, withText = false }) => {\n const link = getLink(person, packageName, version);\n\n const avatarComponent = (\n <Avatar\n alt={person.name}\n src={person.avatar ?? person._avatar}\n sx={{ width: 40, height: 40, ml: 0, mr: 1 }}\n />\n );\n\n return (\n <>\n <Tooltip\n data-testid={person.name}\n key={person.email}\n title={<PersonTooltip person={person} />}\n >\n {link.length > 0 ? (\n <LinkExternal to={link}>{avatarComponent}</LinkExternal>\n ) : (\n avatarComponent\n )}\n </Tooltip>\n {withText && (\n <Typography sx={{ ml: 1 }} variant=\"subtitle2\">\n {getName(person.name)}\n </Typography>\n )}\n </>\n );\n};\n\nexport default Person;\n"],"mappings":";;;;;;;;;;AAUA,IAAM,UAKA,EAAE,QAAQ,aAAa,SAAS,WAAW,YAAY;CAC3D,MAAM,OAAO,QAAQ,QAAQ,aAAa,OAAO;CAEjD,MAAM,kBACJ,oBAAC,QAAD;EACE,KAAK,OAAO;EACZ,KAAK,OAAO,UAAU,OAAO;EAC7B,IAAI;GAAE,OAAO;GAAI,QAAQ;GAAI,IAAI;GAAG,IAAI;EAAE;CAC3C,CAAA;CAGH,OACE,qBAAAA,YAAA,EAAA,UAAA,CACE,oBAAC,SAAD;EACE,eAAa,OAAO;EAEpB,OAAO,oBAAC,eAAD,EAAuB,OAAS,CAAA;EAEtC,UAAA,KAAK,SAAS,IACb,oBAAC,cAAD;GAAc,IAAI;GAAO,UAAA;EAA8B,CAAA,IAEvD;CAEK,GARF,OAAO,KAQL,GACR,YACC,oBAAC,YAAD;EAAY,IAAI,EAAE,IAAI,EAAE;EAAG,SAAQ;EAChC,UAAA,QAAQ,OAAO,IAAI;CACV,CAAA,CAEd,EAAA,CAAA;AAEN"}
@@ -1 +1 @@
1
- {"version":3,"file":"PersonTooltip.js","names":[],"sources":["../../../src/components/Person/PersonTooltip.tsx"],"sourcesContent":["import Typography from '@mui/material/Typography';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport { url } from '../../utils';\nimport LinkExternal from '../LinkExternal';\n\nconst PersonTooltip: React.FC<{ person: Developer }> = ({ person }) => (\n <Typography data-testid={person.name + '-tooltip'}>\n {person.name}\n {person.email && url.isEmail(person.email) && (\n <LinkExternal to={`mailto:${person.email}`}>\n <br />\n {person.email}\n </LinkExternal>\n )}\n {person.url && url.isURL(person.url) && (\n <LinkExternal to={person.url}>\n <br />\n {person.url}\n </LinkExternal>\n )}\n </Typography>\n);\n\nexport default PersonTooltip;\n"],"mappings":";;;;;;;;;;;AAOA,IAAM,iBAAkD,EAAE,aACxD,iBAAA,GAAA,kBAAA,KAAA,CAAC,yBAAA,SAAD;CAAY,eAAa,OAAO,OAAO;CAAvC,UAAA;EACG,OAAO;EACP,OAAO,SAAA,YAAA,QAAqB,OAAO,KAAK,KACvC,iBAAA,GAAA,kBAAA,KAAA,CAAC,qBAAA,SAAD;GAAc,IAAI,UAAU,OAAO;GAAnC,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,CAAK,CAAA,GACJ,OAAO,KACI;;EAEf,OAAO,OAAA,YAAA,MAAiB,OAAO,GAAG,KACjC,iBAAA,GAAA,kBAAA,KAAA,CAAC,qBAAA,SAAD;GAAc,IAAI,OAAO;GAAzB,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,CAAK,CAAA,GACJ,OAAO,GACI;;CAEN"}
1
+ {"version":3,"file":"PersonTooltip.js","names":["Typography","LinkExternal"],"sources":["../../../src/components/Person/PersonTooltip.tsx"],"sourcesContent":["import Typography from '@mui/material/Typography';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport { url } from '../../utils';\nimport LinkExternal from '../LinkExternal';\n\nconst PersonTooltip: React.FC<{ person: Developer }> = ({ person }) => (\n <Typography data-testid={person.name + '-tooltip'}>\n {person.name}\n {person.email && url.isEmail(person.email) && (\n <LinkExternal to={`mailto:${person.email}`}>\n <br />\n {person.email}\n </LinkExternal>\n )}\n {person.url && url.isURL(person.url) && (\n <LinkExternal to={person.url}>\n <br />\n {person.url}\n </LinkExternal>\n )}\n </Typography>\n);\n\nexport default PersonTooltip;\n"],"mappings":";;;;;;;;;;;AAOA,IAAM,iBAAkD,EAAE,aACxD,iBAAA,GAAA,kBAAA,KAAA,CAACA,yBAAAA,SAAD;CAAY,eAAa,OAAO,OAAO;CAAvC,UAAA;EACG,OAAO;EACP,OAAO,SAAA,YAAA,QAAqB,OAAO,KAAK,KACvC,iBAAA,GAAA,kBAAA,KAAA,CAACC,qBAAAA,SAAD;GAAc,IAAI,UAAU,OAAO;GAAnC,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,CAAK,CAAA,GACJ,OAAO,KACI;;EAEf,OAAO,OAAA,YAAA,MAAiB,OAAO,GAAG,KACjC,iBAAA,GAAA,kBAAA,KAAA,CAACA,qBAAAA,SAAD;GAAc,IAAI,OAAO;GAAzB,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,CAAK,CAAA,GACJ,OAAO,GACI;;CAEN"}
@@ -1 +1 @@
1
- {"version":3,"file":"PersonTooltip.mjs","names":[],"sources":["../../../src/components/Person/PersonTooltip.tsx"],"sourcesContent":["import Typography from '@mui/material/Typography';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport { url } from '../../utils';\nimport LinkExternal from '../LinkExternal';\n\nconst PersonTooltip: React.FC<{ person: Developer }> = ({ person }) => (\n <Typography data-testid={person.name + '-tooltip'}>\n {person.name}\n {person.email && url.isEmail(person.email) && (\n <LinkExternal to={`mailto:${person.email}`}>\n <br />\n {person.email}\n </LinkExternal>\n )}\n {person.url && url.isURL(person.url) && (\n <LinkExternal to={person.url}>\n <br />\n {person.url}\n </LinkExternal>\n )}\n </Typography>\n);\n\nexport default PersonTooltip;\n"],"mappings":";;;;;;;;AAOA,IAAM,iBAAkD,EAAE,aACxD,qBAAC,YAAD;CAAY,eAAa,OAAO,OAAO;CAAvC,UAAA;EACG,OAAO;EACP,OAAO,SAAS,QAAY,OAAO,KAAK,KACvC,qBAAC,cAAD;GAAc,IAAI,UAAU,OAAO;GAAnC,UAAA,CACE,oBAAC,MAAD,CAAK,CAAA,GACJ,OAAO,KACI;;EAEf,OAAO,OAAO,MAAU,OAAO,GAAG,KACjC,qBAAC,cAAD;GAAc,IAAI,OAAO;GAAzB,UAAA,CACE,oBAAC,MAAD,CAAK,CAAA,GACJ,OAAO,GACI;;CAEN"}
1
+ {"version":3,"file":"PersonTooltip.mjs","names":["url.isEmail","url.isURL"],"sources":["../../../src/components/Person/PersonTooltip.tsx"],"sourcesContent":["import Typography from '@mui/material/Typography';\nimport React from 'react';\n\nimport type { Developer } from '../../types/packageMeta';\nimport { url } from '../../utils';\nimport LinkExternal from '../LinkExternal';\n\nconst PersonTooltip: React.FC<{ person: Developer }> = ({ person }) => (\n <Typography data-testid={person.name + '-tooltip'}>\n {person.name}\n {person.email && url.isEmail(person.email) && (\n <LinkExternal to={`mailto:${person.email}`}>\n <br />\n {person.email}\n </LinkExternal>\n )}\n {person.url && url.isURL(person.url) && (\n <LinkExternal to={person.url}>\n <br />\n {person.url}\n </LinkExternal>\n )}\n </Typography>\n);\n\nexport default PersonTooltip;\n"],"mappings":";;;;;;;;AAOA,IAAM,iBAAkD,EAAE,aACxD,qBAAC,YAAD;CAAY,eAAa,OAAO,OAAO;CAAvC,UAAA;EACG,OAAO;EACP,OAAO,SAASA,QAAY,OAAO,KAAK,KACvC,qBAAC,cAAD;GAAc,IAAI,UAAU,OAAO;GAAnC,UAAA,CACE,oBAAC,MAAD,CAAK,CAAA,GACJ,OAAO,KACI;;EAEf,OAAO,OAAOC,MAAU,OAAO,GAAG,KACjC,qBAAC,cAAD;GAAc,IAAI,OAAO;GAAzB,UAAA,CACE,oBAAC,MAAD,CAAK,CAAA,GACJ,OAAO,GACI;;CAEN"}
@@ -1,2 +1 @@
1
- import Person from "./Person.mjs";
2
- export { Person as default };
1
+ export { default } from "./Person.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":[],"sources":["../../../src/components/Person/utils.ts"],"sourcesContent":["import i18next from 'i18next';\n\nimport type { Developer } from '../../types/packageMeta';\nimport { url } from '../../utils';\n\nexport function getLink(person: Developer, packageName: string, version: string): string {\n return person.email && url.isEmail(person.email)\n ? `mailto:${person.email}?subject=${packageName} v${version}`\n : person.url && url.isURL(person.url)\n ? person.url\n : '';\n}\n\nexport function getName(name?: string): string {\n return !name\n ? i18next.t('author-unknown')\n : name.toLowerCase() === 'anonymous'\n ? i18next.t('author-anonymous')\n : name;\n}\n"],"mappings":";;;;AAKA,SAAgB,QAAQ,QAAmB,aAAqB,SAAyB;CACvF,OAAO,OAAO,SAAS,QAAY,OAAO,KAAK,IAC3C,UAAU,OAAO,MAAM,WAAW,YAAY,IAAI,YAClD,OAAO,OAAO,MAAU,OAAO,GAAG,IAChC,OAAO,MACP;AACR;AAEA,SAAgB,QAAQ,MAAuB;CAC7C,OAAO,CAAC,OACJ,QAAQ,EAAE,gBAAgB,IAC1B,KAAK,YAAY,MAAM,cACrB,QAAQ,EAAE,kBAAkB,IAC5B;AACR"}
1
+ {"version":3,"file":"utils.mjs","names":["url.isEmail","url.isURL"],"sources":["../../../src/components/Person/utils.ts"],"sourcesContent":["import i18next from 'i18next';\n\nimport type { Developer } from '../../types/packageMeta';\nimport { url } from '../../utils';\n\nexport function getLink(person: Developer, packageName: string, version: string): string {\n return person.email && url.isEmail(person.email)\n ? `mailto:${person.email}?subject=${packageName} v${version}`\n : person.url && url.isURL(person.url)\n ? person.url\n : '';\n}\n\nexport function getName(name?: string): string {\n return !name\n ? i18next.t('author-unknown')\n : name.toLowerCase() === 'anonymous'\n ? i18next.t('author-anonymous')\n : name;\n}\n"],"mappings":";;;;AAKA,SAAgB,QAAQ,QAAmB,aAAqB,SAAyB;CACvF,OAAO,OAAO,SAASA,QAAY,OAAO,KAAK,IAC3C,UAAU,OAAO,MAAM,WAAW,YAAY,IAAI,YAClD,OAAO,OAAOC,MAAU,OAAO,GAAG,IAChC,OAAO,MACP;AACR;AAEA,SAAgB,QAAQ,MAAuB;CAC7C,OAAO,CAAC,OACJ,QAAQ,EAAE,gBAAgB,IAC1B,KAAK,YAAY,MAAM,cACrB,QAAQ,EAAE,kBAAkB,IAC5B;AACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"RawViewer.js","names":[],"sources":["../../../src/components/RawViewer/RawViewer.tsx"],"sourcesContent":["import ReactJsonView from '@microlink/react-json-view';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport IconButton from '@mui/material/IconButton';\nimport { useTheme } from '@mui/material/styles';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\n\nexport interface ViewerTitleProps {\n id: string;\n children?: React.ReactNode;\n onClose: () => void;\n}\n\nconst ViewerTitle = (props: ViewerTitleProps) => {\n const { children, onClose } = props;\n\n return (\n <DialogTitle sx={{ m: 0, p: 2 }}>\n {children}\n {onClose ? (\n <IconButton\n aria-label=\"close\"\n data-testid=\"close-raw-viewer\"\n onClick={onClose}\n sx={{\n position: 'absolute',\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n >\n <CloseIcon />\n </IconButton>\n ) : null}\n </DialogTitle>\n );\n};\n\ntype Props = {\n isOpen: boolean;\n onClose: () => void;\n packageMeta: any;\n};\n\nconst RawViewer: React.FC<Props> = ({ isOpen = false, onClose, packageMeta }) => {\n const { t } = useTranslation();\n const theme: Theme = useTheme();\n return (\n <Dialog data-testid={'rawViewer--dialog'} fullScreen={true} open={isOpen}>\n <ViewerTitle id=\"viewer-title\" onClose={onClose}>\n {t('action-bar-action.raw-title', { package: packageMeta.latest.name })}\n </ViewerTitle>\n <DialogContent>\n <ReactJsonView\n collapseStringsAfterLength={200}\n collapsed={2}\n enableClipboard={true}\n groupArraysAfterLength={10}\n src={packageMeta as any}\n theme={theme.palette.mode == 'light' ? 'bright:inverted' : 'bright'}\n />\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default RawViewer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAM,eAAe,UAA4B;CAC/C,MAAM,EAAE,UAAU,YAAY;CAE9B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,0BAAA,SAAD;EAAa,IAAI;GAAE,GAAG;GAAG,GAAG;EAAE;EAA9B,UAAA,CACG,UACA,UACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,yBAAA,SAAD;GACE,cAAW;GACX,eAAY;GACZ,SAAS;GACT,IAAI;IACF,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ,UAAU,MAAM,QAAQ,KAAK;GACvC;GAEA,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,CAAY,CAAA;EACF,CAAA,IACV,IACO;;AAEjB;AAQA,IAAM,aAA8B,EAAE,SAAS,OAAO,SAAS,kBAAkB;CAC/E,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAC7B,MAAM,SAAA,GAAe,qBAAA,SAAA,CAAS;CAC9B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,qBAAA,SAAD;EAAQ,eAAa;EAAqB,YAAY;EAAM,MAAM;EAAlE,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;GAAa,IAAG;GAAwB;GACrC,UAAA,EAAE,+BAA+B,EAAE,SAAS,YAAY,OAAO,KAAK,CAAC;EAC3D,CAAA,GACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,4BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,2BAAA,SAAD;GACE,4BAA4B;GAC5B,WAAW;GACX,iBAAiB;GACjB,wBAAwB;GACxB,KAAK;GACL,OAAO,MAAM,QAAQ,QAAQ,UAAU,oBAAoB;EAC5D,CAAA,EACY,CAAA,CACT;;AAEZ"}
1
+ {"version":3,"file":"RawViewer.js","names":["DialogTitle","IconButton","CloseIcon","useTranslation","useTheme","Dialog","DialogContent","ReactJsonView"],"sources":["../../../src/components/RawViewer/RawViewer.tsx"],"sourcesContent":["import ReactJsonView from '@microlink/react-json-view';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport IconButton from '@mui/material/IconButton';\nimport { useTheme } from '@mui/material/styles';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\n\nexport interface ViewerTitleProps {\n id: string;\n children?: React.ReactNode;\n onClose: () => void;\n}\n\nconst ViewerTitle = (props: ViewerTitleProps) => {\n const { children, onClose } = props;\n\n return (\n <DialogTitle sx={{ m: 0, p: 2 }}>\n {children}\n {onClose ? (\n <IconButton\n aria-label=\"close\"\n data-testid=\"close-raw-viewer\"\n onClick={onClose}\n sx={{\n position: 'absolute',\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n >\n <CloseIcon />\n </IconButton>\n ) : null}\n </DialogTitle>\n );\n};\n\ntype Props = {\n isOpen: boolean;\n onClose: () => void;\n packageMeta: any;\n};\n\nconst RawViewer: React.FC<Props> = ({ isOpen = false, onClose, packageMeta }) => {\n const { t } = useTranslation();\n const theme: Theme = useTheme();\n return (\n <Dialog data-testid={'rawViewer--dialog'} fullScreen={true} open={isOpen}>\n <ViewerTitle id=\"viewer-title\" onClose={onClose}>\n {t('action-bar-action.raw-title', { package: packageMeta.latest.name })}\n </ViewerTitle>\n <DialogContent>\n <ReactJsonView\n collapseStringsAfterLength={200}\n collapsed={2}\n enableClipboard={true}\n groupArraysAfterLength={10}\n src={packageMeta as any}\n theme={theme.palette.mode == 'light' ? 'bright:inverted' : 'bright'}\n />\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default RawViewer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAM,eAAe,UAA4B;CAC/C,MAAM,EAAE,UAAU,YAAY;CAE9B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACA,0BAAAA,SAAD;EAAa,IAAI;GAAE,GAAG;GAAG,GAAG;EAAE;EAA9B,UAAA,CACG,UACA,UACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,SAAD;GACE,cAAW;GACX,eAAY;GACZ,SAAS;GACT,IAAI;IACF,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ,UAAU,MAAM,QAAQ,KAAK;GACvC;GAEA,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,SAAD,CAAY,CAAA;EACF,CAAA,IACV,IACO;;AAEjB;AAQA,IAAM,aAA8B,EAAE,SAAS,OAAO,SAAS,kBAAkB;CAC/E,MAAM,EAAE,OAAA,GAAMC,cAAAA,eAAAA,CAAe;CAC7B,MAAM,SAAA,GAAeC,qBAAAA,SAAAA,CAAS;CAC9B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,qBAAAA,SAAD;EAAQ,eAAa;EAAqB,YAAY;EAAM,MAAM;EAAlE,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;GAAa,IAAG;GAAwB;GACrC,UAAA,EAAE,+BAA+B,EAAE,SAAS,YAAY,OAAO,KAAK,CAAC;EAC3D,CAAA,GACb,iBAAA,GAAA,kBAAA,IAAA,CAACC,4BAAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,2BAAAA,SAAD;GACE,4BAA4B;GAC5B,WAAW;GACX,iBAAiB;GACjB,wBAAwB;GACxB,KAAK;GACL,OAAO,MAAM,QAAQ,QAAQ,UAAU,oBAAoB;EAC5D,CAAA,EACY,CAAA,CACT;;AAEZ"}
@@ -1,2 +1 @@
1
- import RawViewer from "./RawViewer.mjs";
2
- export { RawViewer as default };
1
+ export { default } from "./RawViewer.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"Readme.js","names":[],"sources":["../../../src/components/Readme/Readme.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport { useTheme } from '@mui/material/styles';\nimport React from 'react';\n\nimport './github-markdown.css';\nimport './hljs-github-dark.css';\nimport './hljs-github-light.css';\nimport type { Props } from './types';\nimport { parseReadme } from './utils';\n\nconst Readme: React.FC<Props> = ({ description }) => {\n const theme = useTheme();\n const dataTheme = theme.palette.mode;\n\n return (\n <Card sx={{ mb: 2 }}>\n <CardContent>\n <Box data-testid=\"readme\" sx={{ m: 2 }}>\n <Wrapper\n className=\"markdown-body hljs\"\n data-theme={dataTheme}\n dangerouslySetInnerHTML={{ __html: parseReadme(description) as string }}\n />\n </Box>\n </CardContent>\n </Card>\n );\n};\nexport default Readme;\n\nconst Wrapper = styled('div')({\n ul: {\n listStyle: 'disc',\n },\n img: {\n maxWidth: '100%',\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,IAAM,UAA2B,EAAE,kBAAkB;CAEnD,MAAM,aAAA,GADQ,qBAAA,SAAA,CACI,CAAA,CAAM,QAAQ;CAEhC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAA,SAAD;GAAK,eAAY;GAAS,IAAI,EAAE,GAAG,EAAE;GACnC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;IACE,WAAU;IACV,cAAY;IACZ,yBAAyB,EAAE,QAAQ,cAAA,YAAY,WAAW,EAAY;GACvE,CAAA;EACE,CAAA,EACM,CAAA;CACT,CAAA;AAEV;AAGA,IAAM,WAAA,GAAU,gBAAA,QAAA,CAAO,KAAK,CAAC,CAAC;CAC5B,IAAI,EACF,WAAW,OACb;CACA,KAAK,EACH,UAAU,OACZ;AACF,CAAC"}
1
+ {"version":3,"file":"Readme.js","names":["useTheme","Card","CardContent","Box","parseReadme","styled"],"sources":["../../../src/components/Readme/Readme.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport { useTheme } from '@mui/material/styles';\nimport React from 'react';\n\nimport './github-markdown.css';\nimport './hljs-github-dark.css';\nimport './hljs-github-light.css';\nimport type { Props } from './types';\nimport { parseReadme } from './utils';\n\nconst Readme: React.FC<Props> = ({ description }) => {\n const theme = useTheme();\n const dataTheme = theme.palette.mode;\n\n return (\n <Card sx={{ mb: 2 }}>\n <CardContent>\n <Box data-testid=\"readme\" sx={{ m: 2 }}>\n <Wrapper\n className=\"markdown-body hljs\"\n data-theme={dataTheme}\n dangerouslySetInnerHTML={{ __html: parseReadme(description) as string }}\n />\n </Box>\n </CardContent>\n </Card>\n );\n};\nexport default Readme;\n\nconst Wrapper = styled('div')({\n ul: {\n listStyle: 'disc',\n },\n img: {\n maxWidth: '100%',\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,IAAM,UAA2B,EAAE,kBAAkB;CAEnD,MAAM,aAAA,GADQA,qBAAAA,SAAAA,CACI,CAAA,CAAM,QAAQ;CAEhC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,SAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,SAAD;GAAK,eAAY;GAAS,IAAI,EAAE,GAAG,EAAE;GACnC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;IACE,WAAU;IACV,cAAY;IACZ,yBAAyB,EAAE,QAAQC,cAAAA,YAAY,WAAW,EAAY;GACvE,CAAA;EACE,CAAA,EACM,CAAA;CACT,CAAA;AAEV;AAGA,IAAM,WAAA,GAAUC,gBAAAA,QAAAA,CAAO,KAAK,CAAC,CAAC;CAC5B,IAAI,EACF,WAAW,OACb;CACA,KAAK,EACH,UAAU,OACZ;AACF,CAAC"}
@@ -1,2 +1 @@
1
- import Readme from "./Readme.mjs";
2
- export { Readme as default };
1
+ export { default } from "./Readme.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/Readme/utils.ts"],"sourcesContent":["import DOMPurify from 'dompurify';\nimport hljs from 'highlight.js';\nimport { Marked } from 'marked';\nimport { markedHighlight } from 'marked-highlight';\n\nconst marked = new Marked(\n markedHighlight({\n async: false,\n highlight(code, lang) {\n const language = hljs.getLanguage(lang) ? lang : 'plaintext';\n return hljs.highlight(code, { language }).value;\n },\n })\n);\n\nmarked.setOptions({\n renderer: new marked.Renderer(),\n pedantic: false,\n gfm: true,\n breaks: false,\n});\n\nexport function parseReadme(readme: string): string | void {\n const html = marked.parse(readme);\n return DOMPurify.sanitize(html as string);\n}\n"],"mappings":";;;;;;;;AAKA,IAAM,WAAS,IAAI,OAAA,QAAA,GACjB,iBAAA,gBAAA,CAAgB;CACd,OAAO;CACP,UAAU,MAAM,MAAM;EACpB,MAAM,WAAW,aAAA,QAAK,YAAY,IAAI,IAAI,OAAO;EACjD,OAAO,aAAA,QAAK,UAAU,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CAC5C;AACF,CAAC,CACH;AAEA,SAAO,WAAW;CAChB,UAAU,IAAI,SAAO,SAAS;CAC9B,UAAU;CACV,KAAK;CACL,QAAQ;AACV,CAAC;AAED,SAAgB,YAAY,QAA+B;CACzD,MAAM,OAAO,SAAO,MAAM,MAAM;CAChC,OAAO,UAAA,QAAU,SAAS,IAAc;AAC1C"}
1
+ {"version":3,"file":"utils.js","names":["marked","Marked","markedHighlight","hljs","DOMPurify"],"sources":["../../../src/components/Readme/utils.ts"],"sourcesContent":["import DOMPurify from 'dompurify';\nimport hljs from 'highlight.js';\nimport { Marked } from 'marked';\nimport { markedHighlight } from 'marked-highlight';\n\nconst marked = new Marked(\n markedHighlight({\n async: false,\n highlight(code, lang) {\n const language = hljs.getLanguage(lang) ? lang : 'plaintext';\n return hljs.highlight(code, { language }).value;\n },\n })\n);\n\nmarked.setOptions({\n renderer: new marked.Renderer(),\n pedantic: false,\n gfm: true,\n breaks: false,\n});\n\nexport function parseReadme(readme: string): string | void {\n const html = marked.parse(readme);\n return DOMPurify.sanitize(html as string);\n}\n"],"mappings":";;;;;;;;AAKA,IAAMA,WAAS,IAAIC,OAAAA,QAAAA,GACjBC,iBAAAA,gBAAAA,CAAgB;CACd,OAAO;CACP,UAAU,MAAM,MAAM;EACpB,MAAM,WAAWC,aAAAA,QAAK,YAAY,IAAI,IAAI,OAAO;EACjD,OAAOA,aAAAA,QAAK,UAAU,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CAC5C;AACF,CAAC,CACH;AAEAH,SAAO,WAAW;CAChB,UAAU,IAAIA,SAAO,SAAS;CAC9B,UAAU;CACV,KAAK;CACL,QAAQ;AACV,CAAC;AAED,SAAgB,YAAY,QAA+B;CACzD,MAAM,OAAOA,SAAO,MAAM,MAAM;CAChC,OAAOI,UAAAA,QAAU,SAAS,IAAc;AAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"RegistryInfoDialog.js","names":[],"sources":["../../../src/components/RegistryInfoDialog/RegistryInfoDialog.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { Content, Title } from './styles';\nimport type { Props } from './types';\n\nconst RegistryInfoDialog: React.FC<Props> = ({ open = false, children, onClose, title = '' }) => {\n const { t } = useTranslation();\n return (\n <Dialog\n data-testid={'registryInfo--dialog'}\n id=\"registryInfo--dialog-container\"\n maxWidth=\"sm\"\n onClose={onClose}\n open={open}\n >\n <Title>{title}</Title>\n <Content>{children}</Content>\n <DialogActions>\n <Button color=\"inherit\" id=\"registryInfo--dialog-close\" onClick={onClose}>\n {t('button.close')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default RegistryInfoDialog;\n"],"mappings":";;;;;;;;;;;;;AASA,IAAM,sBAAuC,EAAE,OAAO,OAAO,UAAU,SAAS,QAAQ,SAAS;CAC/F,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAC7B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,qBAAA,SAAD;EACE,eAAa;EACb,IAAG;EACH,UAAS;EACA;EACH;EALR,UAAA;GAOE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,OAAD,EAAA,UAAQ,MAAa,CAAA;GACrB,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,SAAD,EAAU,SAAkB,CAAA;GAC5B,iBAAA,GAAA,kBAAA,IAAA,CAAC,4BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;IAAQ,OAAM;IAAU,IAAG;IAA6B,SAAS;IAC9D,UAAA,EAAE,cAAc;GACX,CAAA,EACK,CAAA;EACT;;AAEZ"}
1
+ {"version":3,"file":"RegistryInfoDialog.js","names":["useTranslation","Dialog","Title","Content","DialogActions","Button"],"sources":["../../../src/components/RegistryInfoDialog/RegistryInfoDialog.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { Content, Title } from './styles';\nimport type { Props } from './types';\n\nconst RegistryInfoDialog: React.FC<Props> = ({ open = false, children, onClose, title = '' }) => {\n const { t } = useTranslation();\n return (\n <Dialog\n data-testid={'registryInfo--dialog'}\n id=\"registryInfo--dialog-container\"\n maxWidth=\"sm\"\n onClose={onClose}\n open={open}\n >\n <Title>{title}</Title>\n <Content>{children}</Content>\n <DialogActions>\n <Button color=\"inherit\" id=\"registryInfo--dialog-close\" onClick={onClose}>\n {t('button.close')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default RegistryInfoDialog;\n"],"mappings":";;;;;;;;;;;;;AASA,IAAM,sBAAuC,EAAE,OAAO,OAAO,UAAU,SAAS,QAAQ,SAAS;CAC/F,MAAM,EAAE,OAAA,GAAMA,cAAAA,eAAAA,CAAe;CAC7B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,qBAAAA,SAAD;EACE,eAAa;EACb,IAAG;EACH,UAAS;EACA;EACH;EALR,UAAA;GAOE,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,OAAD,EAAA,UAAQ,MAAa,CAAA;GACrB,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,SAAD,EAAU,SAAkB,CAAA;GAC5B,iBAAA,GAAA,kBAAA,IAAA,CAACC,4BAAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;IAAQ,OAAM;IAAU,IAAG;IAA6B,SAAS;IAC9D,UAAA,EAAE,cAAc;GACX,CAAA,EACK,CAAA;EACT;;AAEZ"}
@@ -1,2 +1 @@
1
- import RegistryInfoDialog from "./RegistryInfoDialog.mjs";
2
- export { RegistryInfoDialog as default };
1
+ export { default } from "./RegistryInfoDialog.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":[],"sources":["../../../src/components/RegistryInfoDialog/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport { common } from '@mui/material/colors';\n\nimport type { Theme } from '../../';\n\nexport const Title = styled(DialogTitle)<{ theme?: Theme }>(({ theme }) => ({\n backgroundColor:\n theme.palette.mode === 'light' ? theme.palette.primary.main : theme.palette.cyanBlue,\n color: common.white,\n fontSize: theme.fontSize.lg,\n}));\n\nexport const Content = styled(DialogContent)<{ theme?: Theme }>(({ theme }) => ({\n padding: '0 24px',\n backgroundColor: theme.palette.background.default,\n}));\n\nexport const TextContent = styled('div')<{ theme?: Theme }>(({ theme }) => ({\n padding: '10px 24px',\n backgroundColor: theme.palette.background.default,\n}));\n"],"mappings":";;;;;;;;;AAOA,IAAa,SAAA,GAAQ,gBAAA,QAAA,CAAO,0BAAA,OAAW,CAAC,EAAqB,EAAE,aAAa;CAC1E,iBACE,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,QAAQ,OAAO,MAAM,QAAQ;CAC9E,OAAO,qBAAA,OAAO;CACd,UAAU,MAAM,SAAS;AAC3B,EAAE;AAEF,IAAa,WAAA,GAAU,gBAAA,QAAA,CAAO,4BAAA,OAAa,CAAC,EAAqB,EAAE,aAAa;CAC9E,SAAS;CACT,iBAAiB,MAAM,QAAQ,WAAW;AAC5C,EAAE;CAEW,GAAc,gBAAA,QAAA,CAAO,KAAK,CAAC,EAAqB,EAAE,aAAa;CAC1E,SAAS;CACT,iBAAiB,MAAM,QAAQ,WAAW;AAC5C,EAAE"}
1
+ {"version":3,"file":"styles.js","names":["styled","DialogTitle","common","DialogContent"],"sources":["../../../src/components/RegistryInfoDialog/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport { common } from '@mui/material/colors';\n\nimport type { Theme } from '../../';\n\nexport const Title = styled(DialogTitle)<{ theme?: Theme }>(({ theme }) => ({\n backgroundColor:\n theme.palette.mode === 'light' ? theme.palette.primary.main : theme.palette.cyanBlue,\n color: common.white,\n fontSize: theme.fontSize.lg,\n}));\n\nexport const Content = styled(DialogContent)<{ theme?: Theme }>(({ theme }) => ({\n padding: '0 24px',\n backgroundColor: theme.palette.background.default,\n}));\n\nexport const TextContent = styled('div')<{ theme?: Theme }>(({ theme }) => ({\n padding: '10px 24px',\n backgroundColor: theme.palette.background.default,\n}));\n"],"mappings":";;;;;;;;;AAOA,IAAa,SAAA,GAAQA,gBAAAA,QAAAA,CAAOC,0BAAAA,OAAW,CAAC,EAAqB,EAAE,aAAa;CAC1E,iBACE,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,QAAQ,OAAO,MAAM,QAAQ;CAC9E,OAAOC,qBAAAA,OAAO;CACd,UAAU,MAAM,SAAS;AAC3B,EAAE;AAEF,IAAa,WAAA,GAAUF,gBAAAA,QAAAA,CAAOG,4BAAAA,OAAa,CAAC,EAAqB,EAAE,aAAa;CAC9E,SAAS;CACT,iBAAiB,MAAM,QAAQ,WAAW;AAC5C,EAAE;CAEW,GAAcH,gBAAAA,QAAAA,CAAO,KAAK,CAAC,EAAqB,EAAE,aAAa;CAC1E,SAAS;CACT,iBAAiB,MAAM,QAAQ,WAAW;AAC5C,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"Repository.js","names":[],"sources":["../../../src/components/Repository/Repository.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Avatar from '@mui/material/Avatar';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport Typography from '@mui/material/Typography';\nimport { common } from '@mui/material/colors';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { url as urlUtils, utils } from '../../utils';\nimport CopyClipboard from '../CopyClipboard';\nimport { Git } from '../Icons';\nimport LinkExternal from '../LinkExternal';\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nconst RepositoryListItem = styled(ListItem)({\n padding: 0,\n ':hover': {\n backgroundColor: 'transparent',\n },\n});\n\nconst RepositoryListItemText = styled(ListItemText)({\n padding: '0 0 0 10px',\n margin: 0,\n});\n\nconst RepositoryAvatar = styled(Avatar)({\n padding: 0,\n marginLeft: 0,\n backgroundColor: 'transparent',\n});\n\nconst Repository: React.FC<{ packageMeta: any }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n // repository can be the object form or a plain string, both valid in npm;\n // `git+ssh://git@host/...` and `git://host/...` are valid manifest urls but\n // dead links in a browser, so they are rewritten to https before validating\n const url = utils.formatRepository(packageMeta?.latest?.repository);\n const repositoryURL = url\n ? url\n .replace(/^git\\+/, '')\n .replace(/^ssh:\\/\\/(git@)?/, 'https://')\n .replace(/^git:\\/\\//, 'https://')\n : null;\n if (!repositoryURL || !urlUtils.isURL(repositoryURL)) {\n return null;\n }\n\n return (\n <List\n dense={true}\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.repository.title')}</StyledText>}\n >\n <RepositoryListItem>\n <RepositoryAvatar sx={{ bgcolor: common.white }}>\n <Git />\n </RepositoryAvatar>\n <RepositoryListItemText\n primary={\n <CopyClipboard dataTestId=\"repositoryID\" text={repositoryURL} title={repositoryURL}>\n <LinkExternal to={repositoryURL} variant=\"outline\">\n {repositoryURL}\n </LinkExternal>\n </CopyClipboard>\n }\n />\n </RepositoryListItem>\n </List>\n );\n};\n\nexport default Repository;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAM,cAAA,GAAa,gBAAA,QAAA,CAAO,yBAAA,OAAU,CAAC,EAAqB,WAAW;CACnE,YAAY,MAAM,MAAM,WAAW;CACnC,eAAe;AACjB,EAAE;AAEF,IAAM,sBAAA,GAAqB,gBAAA,QAAA,CAAO,uBAAA,OAAQ,CAAC,CAAC;CAC1C,SAAS;CACT,UAAU,EACR,iBAAiB,cACnB;AACF,CAAC;AAED,IAAM,0BAAA,GAAyB,gBAAA,QAAA,CAAO,2BAAA,OAAY,CAAC,CAAC;CAClD,SAAS;CACT,QAAQ;AACV,CAAC;AAED,IAAM,oBAAA,GAAmB,gBAAA,QAAA,CAAO,qBAAA,OAAM,CAAC,CAAC;CACtC,SAAS;CACT,YAAY;CACZ,iBAAiB;AACnB,CAAC;AAED,IAAM,cAA8C,EAAE,kBAAkB;CACtE,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAI7B,MAAM,MAAA,cAAA,iBAA6B,aAAa,QAAQ,UAAU;CAClE,MAAM,gBAAgB,MAClB,IACG,QAAQ,UAAU,EAAE,CAAC,CACrB,QAAQ,oBAAoB,UAAU,CAAC,CACvC,QAAQ,aAAa,UAAU,IAClC;CACJ,IAAI,CAAC,iBAAiB,CAAA,YAAA,MAAgB,aAAa,GACjD,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EACE,OAAO;EACP,WAAW,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAY,SAAQ;GAAa,UAAA,EAAE,0BAA0B;EAAc,CAAA;EAEtF,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,oBAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD;GAAkB,IAAI,EAAE,SAAS,qBAAA,OAAO,MAAM;GAC5C,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAA,KAAD,CAAM,CAAA;EACU,CAAA,GAClB,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAD,EACE,SACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAA,SAAD;GAAe,YAAW;GAAe,MAAM;GAAe,OAAO;GACnE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;IAAc,IAAI;IAAe,SAAQ;IACtC,UAAA;GACW,CAAA;EACD,CAAA,EAElB,CAAA,CACiB,EAAA,CAAA;CAChB,CAAA;AAEV"}
1
+ {"version":3,"file":"Repository.js","names":["styled","Typography","ListItem","ListItemText","Avatar","useTranslation","List","common","Git","CopyClipboard","LinkExternal"],"sources":["../../../src/components/Repository/Repository.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Avatar from '@mui/material/Avatar';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport Typography from '@mui/material/Typography';\nimport { common } from '@mui/material/colors';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { url as urlUtils, utils } from '../../utils';\nimport CopyClipboard from '../CopyClipboard';\nimport { Git } from '../Icons';\nimport LinkExternal from '../LinkExternal';\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nconst RepositoryListItem = styled(ListItem)({\n padding: 0,\n ':hover': {\n backgroundColor: 'transparent',\n },\n});\n\nconst RepositoryListItemText = styled(ListItemText)({\n padding: '0 0 0 10px',\n margin: 0,\n});\n\nconst RepositoryAvatar = styled(Avatar)({\n padding: 0,\n marginLeft: 0,\n backgroundColor: 'transparent',\n});\n\nconst Repository: React.FC<{ packageMeta: any }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n // repository can be the object form or a plain string, both valid in npm;\n // `git+ssh://git@host/...` and `git://host/...` are valid manifest urls but\n // dead links in a browser, so they are rewritten to https before validating\n const url = utils.formatRepository(packageMeta?.latest?.repository);\n const repositoryURL = url\n ? url\n .replace(/^git\\+/, '')\n .replace(/^ssh:\\/\\/(git@)?/, 'https://')\n .replace(/^git:\\/\\//, 'https://')\n : null;\n if (!repositoryURL || !urlUtils.isURL(repositoryURL)) {\n return null;\n }\n\n return (\n <List\n dense={true}\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.repository.title')}</StyledText>}\n >\n <RepositoryListItem>\n <RepositoryAvatar sx={{ bgcolor: common.white }}>\n <Git />\n </RepositoryAvatar>\n <RepositoryListItemText\n primary={\n <CopyClipboard dataTestId=\"repositoryID\" text={repositoryURL} title={repositoryURL}>\n <LinkExternal to={repositoryURL} variant=\"outline\">\n {repositoryURL}\n </LinkExternal>\n </CopyClipboard>\n }\n />\n </RepositoryListItem>\n </List>\n );\n};\n\nexport default Repository;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAM,cAAA,GAAaA,gBAAAA,QAAAA,CAAOC,yBAAAA,OAAU,CAAC,EAAqB,WAAW;CACnE,YAAY,MAAM,MAAM,WAAW;CACnC,eAAe;AACjB,EAAE;AAEF,IAAM,sBAAA,GAAqBD,gBAAAA,QAAAA,CAAOE,uBAAAA,OAAQ,CAAC,CAAC;CAC1C,SAAS;CACT,UAAU,EACR,iBAAiB,cACnB;AACF,CAAC;AAED,IAAM,0BAAA,GAAyBF,gBAAAA,QAAAA,CAAOG,2BAAAA,OAAY,CAAC,CAAC;CAClD,SAAS;CACT,QAAQ;AACV,CAAC;AAED,IAAM,oBAAA,GAAmBH,gBAAAA,QAAAA,CAAOI,qBAAAA,OAAM,CAAC,CAAC;CACtC,SAAS;CACT,YAAY;CACZ,iBAAiB;AACnB,CAAC;AAED,IAAM,cAA8C,EAAE,kBAAkB;CACtE,MAAM,EAAE,OAAA,GAAMC,cAAAA,eAAAA,CAAe;CAI7B,MAAM,MAAA,cAAA,iBAA6B,aAAa,QAAQ,UAAU;CAClE,MAAM,gBAAgB,MAClB,IACG,QAAQ,UAAU,EAAE,CAAC,CACrB,QAAQ,oBAAoB,UAAU,CAAC,CACvC,QAAQ,aAAa,UAAU,IAClC;CACJ,IAAI,CAAC,iBAAiB,CAAA,YAAA,MAAgB,aAAa,GACjD,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,SAAD;EACE,OAAO;EACP,WAAW,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAY,SAAQ;GAAa,UAAA,EAAE,0BAA0B;EAAc,CAAA;EAEtF,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,oBAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD;GAAkB,IAAI,EAAE,SAASC,qBAAAA,OAAO,MAAM;GAC5C,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD,CAAM,CAAA;EACU,CAAA,GAClB,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAD,EACE,SACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,SAAD;GAAe,YAAW;GAAe,MAAM;GAAe,OAAO;GACnE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;IAAc,IAAI;IAAe,SAAQ;IACtC,UAAA;GACW,CAAA;EACD,CAAA,EAElB,CAAA,CACiB,EAAA,CAAA;CAChB,CAAA;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"Repository.mjs","names":[],"sources":["../../../src/components/Repository/Repository.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Avatar from '@mui/material/Avatar';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport Typography from '@mui/material/Typography';\nimport { common } from '@mui/material/colors';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { url as urlUtils, utils } from '../../utils';\nimport CopyClipboard from '../CopyClipboard';\nimport { Git } from '../Icons';\nimport LinkExternal from '../LinkExternal';\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nconst RepositoryListItem = styled(ListItem)({\n padding: 0,\n ':hover': {\n backgroundColor: 'transparent',\n },\n});\n\nconst RepositoryListItemText = styled(ListItemText)({\n padding: '0 0 0 10px',\n margin: 0,\n});\n\nconst RepositoryAvatar = styled(Avatar)({\n padding: 0,\n marginLeft: 0,\n backgroundColor: 'transparent',\n});\n\nconst Repository: React.FC<{ packageMeta: any }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n // repository can be the object form or a plain string, both valid in npm;\n // `git+ssh://git@host/...` and `git://host/...` are valid manifest urls but\n // dead links in a browser, so they are rewritten to https before validating\n const url = utils.formatRepository(packageMeta?.latest?.repository);\n const repositoryURL = url\n ? url\n .replace(/^git\\+/, '')\n .replace(/^ssh:\\/\\/(git@)?/, 'https://')\n .replace(/^git:\\/\\//, 'https://')\n : null;\n if (!repositoryURL || !urlUtils.isURL(repositoryURL)) {\n return null;\n }\n\n return (\n <List\n dense={true}\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.repository.title')}</StyledText>}\n >\n <RepositoryListItem>\n <RepositoryAvatar sx={{ bgcolor: common.white }}>\n <Git />\n </RepositoryAvatar>\n <RepositoryListItemText\n primary={\n <CopyClipboard dataTestId=\"repositoryID\" text={repositoryURL} title={repositoryURL}>\n <LinkExternal to={repositoryURL} variant=\"outline\">\n {repositoryURL}\n </LinkExternal>\n </CopyClipboard>\n }\n />\n </RepositoryListItem>\n </List>\n );\n};\n\nexport default Repository;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBA,IAAM,aAAa,OAAO,UAAU,CAAC,EAAqB,WAAW;CACnE,YAAY,MAAM,MAAM,WAAW;CACnC,eAAe;AACjB,EAAE;AAEF,IAAM,qBAAqB,OAAO,QAAQ,CAAC,CAAC;CAC1C,SAAS;CACT,UAAU,EACR,iBAAiB,cACnB;AACF,CAAC;AAED,IAAM,yBAAyB,OAAO,YAAY,CAAC,CAAC;CAClD,SAAS;CACT,QAAQ;AACV,CAAC;AAED,IAAM,mBAAmB,OAAO,MAAM,CAAC,CAAC;CACtC,SAAS;CACT,YAAY;CACZ,iBAAiB;AACnB,CAAC;AAED,IAAM,cAA8C,EAAE,kBAAkB;CACtE,MAAM,EAAE,MAAM,eAAe;CAI7B,MAAM,MAAM,iBAAuB,aAAa,QAAQ,UAAU;CAClE,MAAM,gBAAgB,MAClB,IACG,QAAQ,UAAU,EAAE,CAAC,CACrB,QAAQ,oBAAoB,UAAU,CAAC,CACvC,QAAQ,aAAa,UAAU,IAClC;CACJ,IAAI,CAAC,iBAAiB,CAAC,MAAe,aAAa,GACjD,OAAO;CAGT,OACE,oBAAC,MAAD;EACE,OAAO;EACP,WAAW,oBAAC,YAAD;GAAY,SAAQ;GAAa,UAAA,EAAE,0BAA0B;EAAc,CAAA;EAEtF,UAAA,qBAAC,oBAAD,EAAA,UAAA,CACE,oBAAC,kBAAD;GAAkB,IAAI,EAAE,SAAS,OAAO,MAAM;GAC5C,UAAA,oBAAC,KAAD,CAAM,CAAA;EACU,CAAA,GAClB,oBAAC,wBAAD,EACE,SACE,oBAAC,iBAAD;GAAe,YAAW;GAAe,MAAM;GAAe,OAAO;GACnE,UAAA,oBAAC,cAAD;IAAc,IAAI;IAAe,SAAQ;IACtC,UAAA;GACW,CAAA;EACD,CAAA,EAElB,CAAA,CACiB,EAAA,CAAA;CAChB,CAAA;AAEV"}
1
+ {"version":3,"file":"Repository.mjs","names":["utils.formatRepository","urlUtils.isURL","CopyClipboard"],"sources":["../../../src/components/Repository/Repository.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Avatar from '@mui/material/Avatar';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport Typography from '@mui/material/Typography';\nimport { common } from '@mui/material/colors';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { url as urlUtils, utils } from '../../utils';\nimport CopyClipboard from '../CopyClipboard';\nimport { Git } from '../Icons';\nimport LinkExternal from '../LinkExternal';\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nconst RepositoryListItem = styled(ListItem)({\n padding: 0,\n ':hover': {\n backgroundColor: 'transparent',\n },\n});\n\nconst RepositoryListItemText = styled(ListItemText)({\n padding: '0 0 0 10px',\n margin: 0,\n});\n\nconst RepositoryAvatar = styled(Avatar)({\n padding: 0,\n marginLeft: 0,\n backgroundColor: 'transparent',\n});\n\nconst Repository: React.FC<{ packageMeta: any }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n // repository can be the object form or a plain string, both valid in npm;\n // `git+ssh://git@host/...` and `git://host/...` are valid manifest urls but\n // dead links in a browser, so they are rewritten to https before validating\n const url = utils.formatRepository(packageMeta?.latest?.repository);\n const repositoryURL = url\n ? url\n .replace(/^git\\+/, '')\n .replace(/^ssh:\\/\\/(git@)?/, 'https://')\n .replace(/^git:\\/\\//, 'https://')\n : null;\n if (!repositoryURL || !urlUtils.isURL(repositoryURL)) {\n return null;\n }\n\n return (\n <List\n dense={true}\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.repository.title')}</StyledText>}\n >\n <RepositoryListItem>\n <RepositoryAvatar sx={{ bgcolor: common.white }}>\n <Git />\n </RepositoryAvatar>\n <RepositoryListItemText\n primary={\n <CopyClipboard dataTestId=\"repositoryID\" text={repositoryURL} title={repositoryURL}>\n <LinkExternal to={repositoryURL} variant=\"outline\">\n {repositoryURL}\n </LinkExternal>\n </CopyClipboard>\n }\n />\n </RepositoryListItem>\n </List>\n );\n};\n\nexport default Repository;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBA,IAAM,aAAa,OAAO,UAAU,CAAC,EAAqB,WAAW;CACnE,YAAY,MAAM,MAAM,WAAW;CACnC,eAAe;AACjB,EAAE;AAEF,IAAM,qBAAqB,OAAO,QAAQ,CAAC,CAAC;CAC1C,SAAS;CACT,UAAU,EACR,iBAAiB,cACnB;AACF,CAAC;AAED,IAAM,yBAAyB,OAAO,YAAY,CAAC,CAAC;CAClD,SAAS;CACT,QAAQ;AACV,CAAC;AAED,IAAM,mBAAmB,OAAO,MAAM,CAAC,CAAC;CACtC,SAAS;CACT,YAAY;CACZ,iBAAiB;AACnB,CAAC;AAED,IAAM,cAA8C,EAAE,kBAAkB;CACtE,MAAM,EAAE,MAAM,eAAe;CAI7B,MAAM,MAAMA,iBAAuB,aAAa,QAAQ,UAAU;CAClE,MAAM,gBAAgB,MAClB,IACG,QAAQ,UAAU,EAAE,CAAC,CACrB,QAAQ,oBAAoB,UAAU,CAAC,CACvC,QAAQ,aAAa,UAAU,IAClC;CACJ,IAAI,CAAC,iBAAiB,CAACC,MAAe,aAAa,GACjD,OAAO;CAGT,OACE,oBAAC,MAAD;EACE,OAAO;EACP,WAAW,oBAAC,YAAD;GAAY,SAAQ;GAAa,UAAA,EAAE,0BAA0B;EAAc,CAAA;EAEtF,UAAA,qBAAC,oBAAD,EAAA,UAAA,CACE,oBAAC,kBAAD;GAAkB,IAAI,EAAE,SAAS,OAAO,MAAM;GAC5C,UAAA,oBAAC,KAAD,CAAM,CAAA;EACU,CAAA,GAClB,oBAAC,wBAAD,EACE,SACE,oBAACC,iBAAD;GAAe,YAAW;GAAe,MAAM;GAAe,OAAO;GACnE,UAAA,oBAAC,cAAD;IAAc,IAAI;IAAe,SAAQ;IACtC,UAAA;GACW,CAAA;EACD,CAAA,EAElB,CAAA,CACiB,EAAA,CAAA;CAChB,CAAA;AAEV"}
@@ -1,2 +1 @@
1
- import Repository from "./Repository.mjs";
2
- export { Repository as default };
1
+ export { default } from "./Repository.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"AutoComplete.js","names":[],"sources":["../../../../src/components/Search/AutoComplete/AutoComplete.tsx"],"sourcesContent":["import Autocomplete from '@mui/material/Autocomplete';\nimport type { FC } from 'react';\nimport React, { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { SearchResultWeb } from '@verdaccio/types';\n\nimport { Wrapper } from './styles';\n\nexport type OnSelecItem = (\n event: React.SyntheticEvent,\n value: SearchResultWeb,\n reason: string,\n details?: string\n) => void;\ninterface Props {\n suggestions?: SearchResultWeb[];\n suggestionsLoading?: boolean;\n hasError?: boolean;\n placeholder: string;\n renderOption?: (props: any, option: any) => React.JSX.Element;\n renderInput: (params: any) => React.JSX.Element;\n onSuggestionsFetch: any;\n getOptionLabel: (option: any) => any;\n onCleanSuggestions: (event: React.SyntheticEvent) => void;\n onSelectItem: OnSelecItem;\n}\n\nconst AutoComplete: FC<Props> = ({\n suggestions = [],\n onSuggestionsFetch,\n onCleanSuggestions,\n renderInput,\n renderOption,\n getOptionLabel,\n onSelectItem,\n suggestionsLoading = false,\n hasError = false,\n}: Props) => {\n const { t } = useTranslation();\n const [inputValue, setInputValue] = useState('');\n\n const handleOnInputChange = (event: React.SyntheticEvent, value: string, reason: string) => {\n if (reason === 'input') {\n event.preventDefault();\n onSuggestionsFetch({ value });\n setInputValue(value);\n } else if (reason === 'clear') {\n onCleanSuggestions(event);\n setInputValue('');\n }\n };\n\n const handleOnClose = (event) => {\n onCleanSuggestions(event);\n setInputValue('');\n };\n\n // @ts-ignore\n return (\n <Wrapper>\n <Autocomplete\n /* @ts-ignore */\n clearOnBlur={true}\n disablePortal={true}\n filterOptions={(options, state) => (state.inputValue.trim() ? options : [])}\n fullWidth={true}\n getOptionLabel={getOptionLabel}\n id=\"search-header-suggest\"\n inputValue={inputValue}\n loading={suggestionsLoading}\n loadingText={t('autoComplete.loading')}\n // a failed search must not read as \"no results found\"\n noOptionsText={hasError ? t('autoComplete.error') : t('autoComplete.no-results-found')}\n onChange={onSelectItem as any}\n onClose={handleOnClose}\n onInputChange={handleOnInputChange}\n options={hasError ? [] : suggestions}\n renderInput={renderInput}\n renderOption={renderOption}\n renderTags={() => null}\n />\n </Wrapper>\n );\n};\n\nexport default AutoComplete;\n"],"mappings":";;;;;;;;;AA4BA,IAAM,gBAA2B,EAC/B,cAAc,CAAC,GACf,oBACA,oBACA,aACA,cACA,gBACA,cACA,qBAAqB,OACrB,WAAW,YACA;CACX,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAC7B,MAAM,CAAC,YAAY,kBAAA,GAAiB,MAAA,SAAA,CAAS,EAAE;CAE/C,MAAM,uBAAuB,OAA6B,OAAe,WAAmB;EAC1F,IAAI,WAAW,SAAS;GACtB,MAAM,eAAe;GACrB,mBAAmB,EAAE,MAAM,CAAC;GAC5B,cAAc,KAAK;EACrB,OAAO,IAAI,WAAW,SAAS;GAC7B,mBAAmB,KAAK;GACxB,cAAc,EAAE;EAClB;CACF;CAEA,MAAM,iBAAiB,UAAU;EAC/B,mBAAmB,KAAK;EACxB,cAAc,EAAE;CAClB;CAGA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,2BAAA,SAAD;EAEE,aAAa;EACb,eAAe;EACf,gBAAgB,SAAS,UAAW,MAAM,WAAW,KAAK,IAAI,UAAU,CAAC;EACzE,WAAW;EACK;EAChB,IAAG;EACS;EACZ,SAAS;EACT,aAAa,EAAE,sBAAsB;EAErC,eAAe,WAAW,EAAE,oBAAoB,IAAI,EAAE,+BAA+B;EACrF,UAAU;EACV,SAAS;EACT,eAAe;EACf,SAAS,WAAW,CAAC,IAAI;EACZ;EACC;EACd,kBAAkB;CACnB,CAAA,EACM,CAAA;AAEb"}
1
+ {"version":3,"file":"AutoComplete.js","names":["useTranslation","useState","Wrapper","Autocomplete"],"sources":["../../../../src/components/Search/AutoComplete/AutoComplete.tsx"],"sourcesContent":["import Autocomplete from '@mui/material/Autocomplete';\nimport type { FC } from 'react';\nimport React, { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { SearchResultWeb } from '@verdaccio/types';\n\nimport { Wrapper } from './styles';\n\nexport type OnSelecItem = (\n event: React.SyntheticEvent,\n value: SearchResultWeb,\n reason: string,\n details?: string\n) => void;\ninterface Props {\n suggestions?: SearchResultWeb[];\n suggestionsLoading?: boolean;\n hasError?: boolean;\n placeholder: string;\n renderOption?: (props: any, option: any) => React.JSX.Element;\n renderInput: (params: any) => React.JSX.Element;\n onSuggestionsFetch: any;\n getOptionLabel: (option: any) => any;\n onCleanSuggestions: (event: React.SyntheticEvent) => void;\n onSelectItem: OnSelecItem;\n}\n\nconst AutoComplete: FC<Props> = ({\n suggestions = [],\n onSuggestionsFetch,\n onCleanSuggestions,\n renderInput,\n renderOption,\n getOptionLabel,\n onSelectItem,\n suggestionsLoading = false,\n hasError = false,\n}: Props) => {\n const { t } = useTranslation();\n const [inputValue, setInputValue] = useState('');\n\n const handleOnInputChange = (event: React.SyntheticEvent, value: string, reason: string) => {\n if (reason === 'input') {\n event.preventDefault();\n onSuggestionsFetch({ value });\n setInputValue(value);\n } else if (reason === 'clear') {\n onCleanSuggestions(event);\n setInputValue('');\n }\n };\n\n const handleOnClose = (event) => {\n onCleanSuggestions(event);\n setInputValue('');\n };\n\n // @ts-ignore\n return (\n <Wrapper>\n <Autocomplete\n /* @ts-ignore */\n clearOnBlur={true}\n disablePortal={true}\n filterOptions={(options, state) => (state.inputValue.trim() ? options : [])}\n fullWidth={true}\n getOptionLabel={getOptionLabel}\n id=\"search-header-suggest\"\n inputValue={inputValue}\n loading={suggestionsLoading}\n loadingText={t('autoComplete.loading')}\n // a failed search must not read as \"no results found\"\n noOptionsText={hasError ? t('autoComplete.error') : t('autoComplete.no-results-found')}\n onChange={onSelectItem as any}\n onClose={handleOnClose}\n onInputChange={handleOnInputChange}\n options={hasError ? [] : suggestions}\n renderInput={renderInput}\n renderOption={renderOption}\n renderTags={() => null}\n />\n </Wrapper>\n );\n};\n\nexport default AutoComplete;\n"],"mappings":";;;;;;;;;AA4BA,IAAM,gBAA2B,EAC/B,cAAc,CAAC,GACf,oBACA,oBACA,aACA,cACA,gBACA,cACA,qBAAqB,OACrB,WAAW,YACA;CACX,MAAM,EAAE,OAAA,GAAMA,cAAAA,eAAAA,CAAe;CAC7B,MAAM,CAAC,YAAY,kBAAA,GAAiBC,MAAAA,SAAAA,CAAS,EAAE;CAE/C,MAAM,uBAAuB,OAA6B,OAAe,WAAmB;EAC1F,IAAI,WAAW,SAAS;GACtB,MAAM,eAAe;GACrB,mBAAmB,EAAE,MAAM,CAAC;GAC5B,cAAc,KAAK;EACrB,OAAO,IAAI,WAAW,SAAS;GAC7B,mBAAmB,KAAK;GACxB,cAAc,EAAE;EAClB;CACF;CAEA,MAAM,iBAAiB,UAAU;EAC/B,mBAAmB,KAAK;EACxB,cAAc,EAAE;CAClB;CAGA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,2BAAAA,SAAD;EAEE,aAAa;EACb,eAAe;EACf,gBAAgB,SAAS,UAAW,MAAM,WAAW,KAAK,IAAI,UAAU,CAAC;EACzE,WAAW;EACK;EAChB,IAAG;EACS;EACZ,SAAS;EACT,aAAa,EAAE,sBAAsB;EAErC,eAAe,WAAW,EAAE,oBAAoB,IAAI,EAAE,+BAA+B;EACrF,UAAU;EACV,SAAS;EACT,eAAe;EACf,SAAS,WAAW,CAAC,IAAI;EACZ;EACC;EACd,kBAAkB;CACnB,CAAA,EACM,CAAA;AAEb"}
@@ -1,2 +1 @@
1
- import AutoComplete from "./AutoComplete.mjs";
2
- export { AutoComplete as default };
1
+ export { default } from "./AutoComplete.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":[],"sources":["../../../../src/components/Search/AutoComplete/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\n\nexport const Wrapper = styled('div')({\n width: '100%',\n position: 'relative',\n zIndex: 1,\n});\n"],"mappings":";;;;AAEA,IAAa,WAAA,GAAU,gBAAA,QAAA,CAAO,KAAK,CAAC,CAAC;CACnC,OAAO;CACP,UAAU;CACV,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"styles.js","names":["styled"],"sources":["../../../../src/components/Search/AutoComplete/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\n\nexport const Wrapper = styled('div')({\n width: '100%',\n position: 'relative',\n zIndex: 1,\n});\n"],"mappings":";;;;AAEA,IAAa,WAAA,GAAUA,gBAAAA,QAAAA,CAAO,KAAK,CAAC,CAAC;CACnC,OAAO;CACP,UAAU;CACV,QAAQ;AACV,CAAC"}