@verdaccio/ui-components 5.0.0-next-9.1 → 5.0.0-next-9.3

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 (965) hide show
  1. package/build/Theme/ResetStyles.js +32 -47
  2. package/build/Theme/ResetStyles.js.map +1 -1
  3. package/build/Theme/ResetStyles.mjs +32 -0
  4. package/build/Theme/ResetStyles.mjs.map +1 -0
  5. package/build/Theme/StyleBaseline.js +12 -14
  6. package/build/Theme/StyleBaseline.js.map +1 -1
  7. package/build/Theme/StyleBaseline.mjs +11 -0
  8. package/build/Theme/StyleBaseline.mjs.map +1 -0
  9. package/build/Theme/ThemeProvider.js +39 -54
  10. package/build/Theme/ThemeProvider.js.map +1 -1
  11. package/build/Theme/ThemeProvider.mjs +40 -0
  12. package/build/Theme/ThemeProvider.mjs.map +1 -0
  13. package/build/Theme/colors.js +28 -17
  14. package/build/Theme/colors.js.map +1 -1
  15. package/build/Theme/colors.mjs +22 -0
  16. package/build/Theme/colors.mjs.map +1 -0
  17. package/build/Theme/index.js +5 -58
  18. package/build/Theme/index.mjs +5 -0
  19. package/build/Theme/modes.js +28 -38
  20. package/build/Theme/modes.js.map +1 -1
  21. package/build/Theme/modes.mjs +30 -0
  22. package/build/Theme/modes.mjs.map +1 -0
  23. package/build/Theme/theme.js +21 -31
  24. package/build/Theme/theme.js.map +1 -1
  25. package/build/Theme/theme.mjs +22 -0
  26. package/build/Theme/theme.mjs.map +1 -0
  27. package/build/Theme/tokens.js +31 -30
  28. package/build/Theme/tokens.js.map +1 -1
  29. package/build/Theme/tokens.mjs +33 -0
  30. package/build/Theme/tokens.mjs.map +1 -0
  31. package/build/_virtual/_rolldown/runtime.js +33 -0
  32. package/build/_virtual/_rolldown/runtime.mjs +13 -0
  33. package/build/api/use-data-mutation.js +44 -94
  34. package/build/api/use-data-mutation.js.map +1 -1
  35. package/build/api/use-data-mutation.mjs +45 -0
  36. package/build/api/use-data-mutation.mjs.map +1 -0
  37. package/build/api/use-data.js +20 -31
  38. package/build/api/use-data.js.map +1 -1
  39. package/build/api/use-data.mjs +23 -0
  40. package/build/api/use-data.mjs.map +1 -0
  41. package/build/components/ActionBar/ActionBar.js +54 -86
  42. package/build/components/ActionBar/ActionBar.js.map +1 -1
  43. package/build/components/ActionBar/ActionBar.mjs +52 -0
  44. package/build/components/ActionBar/ActionBar.mjs.map +1 -0
  45. package/build/components/ActionBar/ActionBarAction.js +93 -107
  46. package/build/components/ActionBar/ActionBarAction.js.map +1 -1
  47. package/build/components/ActionBar/ActionBarAction.mjs +85 -0
  48. package/build/components/ActionBar/ActionBarAction.mjs.map +1 -0
  49. package/build/components/ActionBar/index.js +1 -14
  50. package/build/components/ActionBar/index.mjs +1 -0
  51. package/build/components/AppRoute/AppRoute.js +76 -87
  52. package/build/components/AppRoute/AppRoute.js.map +1 -1
  53. package/build/components/AppRoute/AppRoute.mjs +76 -0
  54. package/build/components/AppRoute/AppRoute.mjs.map +1 -0
  55. package/build/components/Author/Author.js +34 -41
  56. package/build/components/Author/Author.js.map +1 -1
  57. package/build/components/Author/Author.mjs +33 -0
  58. package/build/components/Author/Author.mjs.map +1 -0
  59. package/build/components/Author/index.js +1 -14
  60. package/build/components/Author/index.mjs +1 -0
  61. package/build/components/Author/styles.js +26 -31
  62. package/build/components/Author/styles.js.map +1 -1
  63. package/build/components/Author/styles.mjs +26 -0
  64. package/build/components/Author/styles.mjs.map +1 -0
  65. package/build/components/CopyClipboard/CopyToClipBoard.js +58 -66
  66. package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
  67. package/build/components/CopyClipboard/CopyToClipBoard.mjs +57 -0
  68. package/build/components/CopyClipboard/CopyToClipBoard.mjs.map +1 -0
  69. package/build/components/CopyClipboard/index.js +2 -21
  70. package/build/components/CopyClipboard/index.mjs +2 -0
  71. package/build/components/CopyClipboard/utils.d.ts +1 -1
  72. package/build/components/CopyClipboard/utils.js +7 -13
  73. package/build/components/CopyClipboard/utils.js.map +1 -1
  74. package/build/components/CopyClipboard/utils.mjs +9 -0
  75. package/build/components/CopyClipboard/utils.mjs.map +1 -0
  76. package/build/components/Dependencies/Dependencies.js +48 -80
  77. package/build/components/Dependencies/Dependencies.js.map +1 -1
  78. package/build/components/Dependencies/Dependencies.mjs +45 -0
  79. package/build/components/Dependencies/Dependencies.mjs.map +1 -0
  80. package/build/components/Dependencies/DependencyBlock.d.ts +3 -3
  81. package/build/components/Dependencies/DependencyBlock.js +74 -108
  82. package/build/components/Dependencies/DependencyBlock.js.map +1 -1
  83. package/build/components/Dependencies/DependencyBlock.mjs +70 -0
  84. package/build/components/Dependencies/DependencyBlock.mjs.map +1 -0
  85. package/build/components/Dependencies/index.js +2 -14
  86. package/build/components/Dependencies/index.mjs +2 -0
  87. package/build/components/Dependencies/utits.js +5 -7
  88. package/build/components/Dependencies/utits.js.map +1 -1
  89. package/build/components/Dependencies/utits.mjs +8 -0
  90. package/build/components/Dependencies/utits.mjs.map +1 -0
  91. package/build/components/Deprecated/Deprecated.js +19 -23
  92. package/build/components/Deprecated/Deprecated.js.map +1 -1
  93. package/build/components/Deprecated/Deprecated.mjs +18 -0
  94. package/build/components/Deprecated/Deprecated.mjs.map +1 -0
  95. package/build/components/Deprecated/index.js +1 -14
  96. package/build/components/Deprecated/index.mjs +1 -0
  97. package/build/components/Developers/DeveloperType.js +8 -10
  98. package/build/components/Developers/DeveloperType.js.map +1 -1
  99. package/build/components/Developers/DeveloperType.mjs +10 -0
  100. package/build/components/Developers/DeveloperType.mjs.map +1 -0
  101. package/build/components/Developers/Developers.js +69 -97
  102. package/build/components/Developers/Developers.js.map +1 -1
  103. package/build/components/Developers/Developers.mjs +68 -0
  104. package/build/components/Developers/Developers.mjs.map +1 -0
  105. package/build/components/Developers/Title.js +34 -39
  106. package/build/components/Developers/Title.js.map +1 -1
  107. package/build/components/Developers/Title.mjs +32 -0
  108. package/build/components/Developers/Title.mjs.map +1 -0
  109. package/build/components/Developers/get-unique-developer-values.js +6 -21
  110. package/build/components/Developers/get-unique-developer-values.js.map +1 -1
  111. package/build/components/Developers/get-unique-developer-values.mjs +9 -0
  112. package/build/components/Developers/get-unique-developer-values.mjs.map +1 -0
  113. package/build/components/Developers/index.js +2 -21
  114. package/build/components/Developers/index.mjs +2 -0
  115. package/build/components/Distribution/Dist.js +43 -44
  116. package/build/components/Distribution/Dist.js.map +1 -1
  117. package/build/components/Distribution/Dist.mjs +42 -0
  118. package/build/components/Distribution/Dist.mjs.map +1 -0
  119. package/build/components/Distribution/index.js +1 -14
  120. package/build/components/Distribution/index.mjs +1 -0
  121. package/build/components/Distribution/styles.js +41 -43
  122. package/build/components/Distribution/styles.js.map +1 -1
  123. package/build/components/Distribution/styles.mjs +41 -0
  124. package/build/components/Distribution/styles.mjs.map +1 -0
  125. package/build/components/Engines/Engines.js +82 -86
  126. package/build/components/Engines/Engines.js.map +1 -1
  127. package/build/components/Engines/Engines.mjs +82 -0
  128. package/build/components/Engines/Engines.mjs.map +1 -0
  129. package/build/components/Engines/index.js +1 -14
  130. package/build/components/Engines/index.mjs +1 -0
  131. package/build/components/Engines/styles.js +30 -32
  132. package/build/components/Engines/styles.js.map +1 -1
  133. package/build/components/Engines/styles.mjs +29 -0
  134. package/build/components/Engines/styles.mjs.map +1 -0
  135. package/build/components/ErrorBoundary/ErrorBoundary.js +31 -66
  136. package/build/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  137. package/build/components/ErrorBoundary/ErrorBoundary.mjs +31 -0
  138. package/build/components/ErrorBoundary/ErrorBoundary.mjs.map +1 -0
  139. package/build/components/ErrorBoundary/index.js +1 -14
  140. package/build/components/ErrorBoundary/index.mjs +1 -0
  141. package/build/components/Forbidden/Forbidden.js +71 -70
  142. package/build/components/Forbidden/Forbidden.js.map +1 -1
  143. package/build/components/Forbidden/Forbidden.mjs +70 -0
  144. package/build/components/Forbidden/Forbidden.mjs.map +1 -0
  145. package/build/components/Forbidden/index.js +1 -14
  146. package/build/components/Forbidden/index.mjs +1 -0
  147. package/build/components/FundButton/FundButton.js +60 -72
  148. package/build/components/FundButton/FundButton.js.map +1 -1
  149. package/build/components/FundButton/FundButton.mjs +60 -0
  150. package/build/components/FundButton/FundButton.mjs.map +1 -0
  151. package/build/components/FundButton/index.js +1 -14
  152. package/build/components/FundButton/index.mjs +1 -0
  153. package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +70 -86
  154. package/build/components/HeaderInfoDialog/HeaderInfoDialog.js.map +1 -1
  155. package/build/components/HeaderInfoDialog/HeaderInfoDialog.mjs +71 -0
  156. package/build/components/HeaderInfoDialog/HeaderInfoDialog.mjs.map +1 -0
  157. package/build/components/HeaderInfoDialog/index.js +1 -14
  158. package/build/components/HeaderInfoDialog/index.mjs +1 -0
  159. package/build/components/Heading/Heading.d.ts +1 -1
  160. package/build/components/Heading/Heading.js +16 -23
  161. package/build/components/Heading/Heading.js.map +1 -1
  162. package/build/components/Heading/Heading.mjs +15 -0
  163. package/build/components/Heading/Heading.mjs.map +1 -0
  164. package/build/components/Heading/index.js +1 -14
  165. package/build/components/Heading/index.mjs +1 -0
  166. package/build/components/Help/Help.js +62 -54
  167. package/build/components/Help/Help.js.map +1 -1
  168. package/build/components/Help/Help.mjs +60 -0
  169. package/build/components/Help/Help.mjs.map +1 -0
  170. package/build/components/Help/index.js +1 -14
  171. package/build/components/Help/index.mjs +1 -0
  172. package/build/components/Help/styles.js +20 -20
  173. package/build/components/Help/styles.js.map +1 -1
  174. package/build/components/Help/styles.mjs +21 -0
  175. package/build/components/Help/styles.mjs.map +1 -0
  176. package/build/components/Icons/DevsIcons/CommonJS2.js +18 -0
  177. package/build/components/Icons/DevsIcons/CommonJS2.js.map +1 -0
  178. package/build/components/Icons/DevsIcons/CommonJS2.mjs +16 -0
  179. package/build/components/Icons/DevsIcons/CommonJS2.mjs.map +1 -0
  180. package/build/components/Icons/DevsIcons/ES6Module2.js +18 -0
  181. package/build/components/Icons/DevsIcons/ES6Module2.js.map +1 -0
  182. package/build/components/Icons/DevsIcons/ES6Module2.mjs +16 -0
  183. package/build/components/Icons/DevsIcons/ES6Module2.mjs.map +1 -0
  184. package/build/components/Icons/DevsIcons/Git2.js +18 -0
  185. package/build/components/Icons/DevsIcons/Git2.js.map +1 -0
  186. package/build/components/Icons/DevsIcons/Git2.mjs +16 -0
  187. package/build/components/Icons/DevsIcons/Git2.mjs.map +1 -0
  188. package/build/components/Icons/DevsIcons/NodeJS2.js +18 -0
  189. package/build/components/Icons/DevsIcons/NodeJS2.js.map +1 -0
  190. package/build/components/Icons/DevsIcons/NodeJS2.mjs +16 -0
  191. package/build/components/Icons/DevsIcons/NodeJS2.mjs.map +1 -0
  192. package/build/components/Icons/DevsIcons/TypeScript2.js +18 -0
  193. package/build/components/Icons/DevsIcons/TypeScript2.js.map +1 -0
  194. package/build/components/Icons/DevsIcons/TypeScript2.mjs +16 -0
  195. package/build/components/Icons/DevsIcons/TypeScript2.mjs.map +1 -0
  196. package/build/components/Icons/DevsIcons/commonjs.js +6 -0
  197. package/build/components/Icons/DevsIcons/commonjs.js.map +1 -0
  198. package/build/components/Icons/DevsIcons/commonjs.mjs +6 -0
  199. package/build/components/Icons/DevsIcons/commonjs.mjs.map +1 -0
  200. package/build/components/Icons/DevsIcons/es6module.js +6 -0
  201. package/build/components/Icons/DevsIcons/es6module.js.map +1 -0
  202. package/build/components/Icons/DevsIcons/es6module.mjs +6 -0
  203. package/build/components/Icons/DevsIcons/es6module.mjs.map +1 -0
  204. package/build/components/Icons/DevsIcons/git.js +6 -0
  205. package/build/components/Icons/DevsIcons/git.js.map +1 -0
  206. package/build/components/Icons/DevsIcons/git.mjs +6 -0
  207. package/build/components/Icons/DevsIcons/git.mjs.map +1 -0
  208. package/build/components/Icons/DevsIcons/index.js +5 -41
  209. package/build/components/Icons/DevsIcons/index.mjs +5 -0
  210. package/build/components/Icons/DevsIcons/nodejs.js +6 -0
  211. package/build/components/Icons/DevsIcons/nodejs.js.map +1 -0
  212. package/build/components/Icons/DevsIcons/nodejs.mjs +6 -0
  213. package/build/components/Icons/DevsIcons/nodejs.mjs.map +1 -0
  214. package/build/components/Icons/DevsIcons/typescript.js +6 -0
  215. package/build/components/Icons/DevsIcons/typescript.js.map +1 -0
  216. package/build/components/Icons/DevsIcons/typescript.mjs +6 -0
  217. package/build/components/Icons/DevsIcons/typescript.mjs.map +1 -0
  218. package/build/components/Icons/Earth.js +41 -42
  219. package/build/components/Icons/Earth.js.map +1 -1
  220. package/build/components/Icons/Earth.mjs +41 -0
  221. package/build/components/Icons/Earth.mjs.map +1 -0
  222. package/build/components/Icons/FileBinary.js +17 -24
  223. package/build/components/Icons/FileBinary.js.map +1 -1
  224. package/build/components/Icons/FileBinary.mjs +17 -0
  225. package/build/components/Icons/FileBinary.mjs.map +1 -0
  226. package/build/components/Icons/Law.js +20 -25
  227. package/build/components/Icons/Law.js.map +1 -1
  228. package/build/components/Icons/Law.mjs +20 -0
  229. package/build/components/Icons/Law.mjs.map +1 -0
  230. package/build/components/Icons/License.js +17 -26
  231. package/build/components/Icons/License.js.map +1 -1
  232. package/build/components/Icons/License.mjs +17 -0
  233. package/build/components/Icons/License.mjs.map +1 -0
  234. package/build/components/Icons/Managers/Npm2.js +18 -0
  235. package/build/components/Icons/Managers/Npm2.js.map +1 -0
  236. package/build/components/Icons/Managers/Npm2.mjs +16 -0
  237. package/build/components/Icons/Managers/Npm2.mjs.map +1 -0
  238. package/build/components/Icons/Managers/Pnpm2.js +18 -0
  239. package/build/components/Icons/Managers/Pnpm2.js.map +1 -0
  240. package/build/components/Icons/Managers/Pnpm2.mjs +16 -0
  241. package/build/components/Icons/Managers/Pnpm2.mjs.map +1 -0
  242. package/build/components/Icons/Managers/Yarn2.js +18 -0
  243. package/build/components/Icons/Managers/Yarn2.js.map +1 -0
  244. package/build/components/Icons/Managers/Yarn2.mjs +16 -0
  245. package/build/components/Icons/Managers/Yarn2.mjs.map +1 -0
  246. package/build/components/Icons/Managers/index.js +3 -27
  247. package/build/components/Icons/Managers/index.mjs +3 -0
  248. package/build/components/Icons/Managers/npm.js +6 -0
  249. package/build/components/Icons/Managers/npm.js.map +1 -0
  250. package/build/components/Icons/Managers/npm.mjs +6 -0
  251. package/build/components/Icons/Managers/npm.mjs.map +1 -0
  252. package/build/components/Icons/Managers/pnpm.js +6 -0
  253. package/build/components/Icons/Managers/pnpm.js.map +1 -0
  254. package/build/components/Icons/Managers/pnpm.mjs +6 -0
  255. package/build/components/Icons/Managers/pnpm.mjs.map +1 -0
  256. package/build/components/Icons/Managers/yarn.js +6 -0
  257. package/build/components/Icons/Managers/yarn.js.map +1 -0
  258. package/build/components/Icons/Managers/yarn.mjs +6 -0
  259. package/build/components/Icons/Managers/yarn.mjs.map +1 -0
  260. package/build/components/Icons/SvgIcon.d.ts +2 -6
  261. package/build/components/Icons/SvgIcon.js +32 -52
  262. package/build/components/Icons/SvgIcon.js.map +1 -1
  263. package/build/components/Icons/SvgIcon.mjs +31 -0
  264. package/build/components/Icons/SvgIcon.mjs.map +1 -0
  265. package/build/components/Icons/Time.js +24 -29
  266. package/build/components/Icons/Time.js.map +1 -1
  267. package/build/components/Icons/Time.mjs +24 -0
  268. package/build/components/Icons/Time.mjs.map +1 -0
  269. package/build/components/Icons/Version.js +22 -27
  270. package/build/components/Icons/Version.js.map +1 -1
  271. package/build/components/Icons/Version.mjs +22 -0
  272. package/build/components/Icons/Version.mjs.map +1 -0
  273. package/build/components/Icons/index.js +41 -78
  274. package/build/components/Icons/index.js.map +1 -1
  275. package/build/components/Icons/index.mjs +38 -0
  276. package/build/components/Icons/index.mjs.map +1 -0
  277. package/build/components/Install/Install.js +65 -73
  278. package/build/components/Install/Install.js.map +1 -1
  279. package/build/components/Install/Install.mjs +66 -0
  280. package/build/components/Install/Install.mjs.map +1 -0
  281. package/build/components/Install/InstallListItem.js +103 -117
  282. package/build/components/Install/InstallListItem.js.map +1 -1
  283. package/build/components/Install/InstallListItem.mjs +109 -0
  284. package/build/components/Install/InstallListItem.mjs.map +1 -0
  285. package/build/components/Install/index.js +1 -14
  286. package/build/components/Install/index.mjs +1 -0
  287. package/build/components/Keywords/KeywordListItems.js +30 -34
  288. package/build/components/Keywords/KeywordListItems.js.map +1 -1
  289. package/build/components/Keywords/KeywordListItems.mjs +28 -0
  290. package/build/components/Keywords/KeywordListItems.mjs.map +1 -0
  291. package/build/components/Keywords/Keywords.js +31 -35
  292. package/build/components/Keywords/Keywords.js.map +1 -1
  293. package/build/components/Keywords/Keywords.mjs +29 -0
  294. package/build/components/Keywords/Keywords.mjs.map +1 -0
  295. package/build/components/Keywords/index.js +1 -14
  296. package/build/components/Keywords/index.mjs +1 -0
  297. package/build/components/Label/Label.js +24 -37
  298. package/build/components/Label/Label.js.map +1 -1
  299. package/build/components/Label/Label.mjs +23 -0
  300. package/build/components/Label/Label.mjs.map +1 -0
  301. package/build/components/Label/index.js +1 -14
  302. package/build/components/Label/index.mjs +1 -0
  303. package/build/components/Link/Link.d.ts +3 -1
  304. package/build/components/Link/Link.js +36 -39
  305. package/build/components/Link/Link.js.map +1 -1
  306. package/build/components/Link/Link.mjs +37 -0
  307. package/build/components/Link/Link.mjs.map +1 -0
  308. package/build/components/Link/index.js +1 -14
  309. package/build/components/Link/index.mjs +1 -0
  310. package/build/components/LinkExternal/LinkExternal.d.ts +3 -1
  311. package/build/components/LinkExternal/LinkExternal.js +22 -30
  312. package/build/components/LinkExternal/LinkExternal.js.map +1 -1
  313. package/build/components/LinkExternal/LinkExternal.mjs +21 -0
  314. package/build/components/LinkExternal/LinkExternal.mjs.map +1 -0
  315. package/build/components/LinkExternal/index.js +1 -14
  316. package/build/components/LinkExternal/index.mjs +1 -0
  317. package/build/components/Loading/Loading.js +16 -20
  318. package/build/components/Loading/Loading.js.map +1 -1
  319. package/build/components/Loading/Loading.mjs +16 -0
  320. package/build/components/Loading/Loading.mjs.map +1 -0
  321. package/build/components/Loading/Spinner/Spinner.js +34 -57
  322. package/build/components/Loading/Spinner/Spinner.js.map +1 -1
  323. package/build/components/Loading/Spinner/Spinner.mjs +32 -0
  324. package/build/components/Loading/Spinner/Spinner.mjs.map +1 -0
  325. package/build/components/Loading/Spinner/index.js +1 -14
  326. package/build/components/Loading/Spinner/index.mjs +1 -0
  327. package/build/components/Loading/index.js +1 -14
  328. package/build/components/Loading/index.mjs +1 -0
  329. package/build/components/Loading/styles.d.ts +5 -5
  330. package/build/components/Loading/styles.js +29 -34
  331. package/build/components/Loading/styles.js.map +1 -1
  332. package/build/components/Loading/styles.mjs +30 -0
  333. package/build/components/Loading/styles.mjs.map +1 -0
  334. package/build/components/LoginDialog/LoginDialog.js +33 -39
  335. package/build/components/LoginDialog/LoginDialog.js.map +1 -1
  336. package/build/components/LoginDialog/LoginDialog.mjs +31 -0
  337. package/build/components/LoginDialog/LoginDialog.mjs.map +1 -0
  338. package/build/components/LoginDialog/LoginDialogCloseButton.js +34 -39
  339. package/build/components/LoginDialog/LoginDialogCloseButton.js.map +1 -1
  340. package/build/components/LoginDialog/LoginDialogCloseButton.mjs +30 -0
  341. package/build/components/LoginDialog/LoginDialogCloseButton.mjs.map +1 -0
  342. package/build/components/LoginDialog/LoginDialogForm.js +19 -26
  343. package/build/components/LoginDialog/LoginDialogForm.js.map +1 -1
  344. package/build/components/LoginDialog/LoginDialogForm.mjs +19 -0
  345. package/build/components/LoginDialog/LoginDialogForm.mjs.map +1 -0
  346. package/build/components/LoginDialog/LoginDialogFormError.js +40 -51
  347. package/build/components/LoginDialog/LoginDialogFormError.js.map +1 -1
  348. package/build/components/LoginDialog/LoginDialogFormError.mjs +36 -0
  349. package/build/components/LoginDialog/LoginDialogFormError.mjs.map +1 -0
  350. package/build/components/LoginDialog/index.js +1 -14
  351. package/build/components/LoginDialog/index.mjs +1 -0
  352. package/build/components/LoginForm/Login.js +73 -85
  353. package/build/components/LoginForm/Login.js.map +1 -1
  354. package/build/components/LoginForm/Login.mjs +69 -0
  355. package/build/components/LoginForm/Login.mjs.map +1 -0
  356. package/build/components/LoginForm/PasswordField.js +36 -49
  357. package/build/components/LoginForm/PasswordField.js.map +1 -1
  358. package/build/components/LoginForm/PasswordField.mjs +34 -0
  359. package/build/components/LoginForm/PasswordField.mjs.map +1 -0
  360. package/build/components/LoginForm/UsernameField.js +34 -47
  361. package/build/components/LoginForm/UsernameField.js.map +1 -1
  362. package/build/components/LoginForm/UsernameField.mjs +32 -0
  363. package/build/components/LoginForm/UsernameField.mjs.map +1 -0
  364. package/build/components/LoginForm/styles.js +58 -58
  365. package/build/components/LoginForm/styles.js.map +1 -1
  366. package/build/components/LoginForm/styles.mjs +52 -0
  367. package/build/components/LoginForm/styles.mjs.map +1 -0
  368. package/build/components/LoginForm/useLoginForm.js +37 -64
  369. package/build/components/LoginForm/useLoginForm.js.map +1 -1
  370. package/build/components/LoginForm/useLoginForm.mjs +38 -0
  371. package/build/components/LoginForm/useLoginForm.mjs.map +1 -0
  372. package/build/components/Logo/Logo.js +68 -81
  373. package/build/components/Logo/Logo.js.map +1 -1
  374. package/build/components/Logo/Logo.mjs +74 -0
  375. package/build/components/Logo/Logo.mjs.map +1 -0
  376. package/build/components/Logo/img/logo-black-and-white.js +6 -0
  377. package/build/components/Logo/img/logo-black-and-white.js.map +1 -0
  378. package/build/components/Logo/img/logo-black-and-white.mjs +6 -0
  379. package/build/components/Logo/img/logo-black-and-white.mjs.map +1 -0
  380. package/build/components/Logo/img/logo.js +6 -0
  381. package/build/components/Logo/img/logo.js.map +1 -0
  382. package/build/components/Logo/img/logo.mjs +6 -0
  383. package/build/components/Logo/img/logo.mjs.map +1 -0
  384. package/build/components/Logo/index.js +1 -14
  385. package/build/components/Logo/index.mjs +1 -0
  386. package/build/components/MenuItem/MenuItem.d.ts +1 -1
  387. package/build/components/MenuItem/MenuItem.js +29 -38
  388. package/build/components/MenuItem/MenuItem.js.map +1 -1
  389. package/build/components/MenuItem/MenuItem.mjs +30 -0
  390. package/build/components/MenuItem/MenuItem.mjs.map +1 -0
  391. package/build/components/MenuItem/index.js +1 -14
  392. package/build/components/MenuItem/index.mjs +1 -0
  393. package/build/components/NoItems/NoItems.js +18 -24
  394. package/build/components/NoItems/NoItems.js.map +1 -1
  395. package/build/components/NoItems/NoItems.mjs +16 -0
  396. package/build/components/NoItems/NoItems.mjs.map +1 -0
  397. package/build/components/NoItems/index.js +1 -14
  398. package/build/components/NoItems/index.mjs +1 -0
  399. package/build/components/NotFound/NotFound.js +71 -70
  400. package/build/components/NotFound/NotFound.js.map +1 -1
  401. package/build/components/NotFound/NotFound.mjs +70 -0
  402. package/build/components/NotFound/NotFound.mjs.map +1 -0
  403. package/build/components/NotFound/index.js +1 -14
  404. package/build/components/NotFound/index.mjs +1 -0
  405. package/build/components/Package/Package.js +197 -230
  406. package/build/components/Package/Package.js.map +1 -1
  407. package/build/components/Package/Package.mjs +188 -0
  408. package/build/components/Package/Package.mjs.map +1 -0
  409. package/build/components/Package/index.js +1 -14
  410. package/build/components/Package/index.mjs +1 -0
  411. package/build/components/Package/styles.d.ts +18 -18
  412. package/build/components/Package/styles.js +135 -169
  413. package/build/components/Package/styles.js.map +1 -1
  414. package/build/components/Package/styles.mjs +142 -0
  415. package/build/components/Package/styles.mjs.map +1 -0
  416. package/build/components/PackageList/PackageList.js +71 -91
  417. package/build/components/PackageList/PackageList.js.map +1 -1
  418. package/build/components/PackageList/PackageList.mjs +71 -0
  419. package/build/components/PackageList/PackageList.mjs.map +1 -0
  420. package/build/components/PackageList/index.js +1 -14
  421. package/build/components/PackageList/index.mjs +1 -0
  422. package/build/components/Person/Person.js +41 -46
  423. package/build/components/Person/Person.js.map +1 -1
  424. package/build/components/Person/Person.mjs +39 -0
  425. package/build/components/Person/Person.mjs.map +1 -0
  426. package/build/components/Person/PersonTooltip.js +27 -21
  427. package/build/components/Person/PersonTooltip.js.map +1 -1
  428. package/build/components/Person/PersonTooltip.mjs +26 -0
  429. package/build/components/Person/PersonTooltip.mjs.map +1 -0
  430. package/build/components/Person/index.js +1 -14
  431. package/build/components/Person/index.mjs +1 -0
  432. package/build/components/Person/utils.js +12 -12
  433. package/build/components/Person/utils.js.map +1 -1
  434. package/build/components/Person/utils.mjs +14 -0
  435. package/build/components/Person/utils.mjs.map +1 -0
  436. package/build/components/RawViewer/RawViewer.js +62 -63
  437. package/build/components/RawViewer/RawViewer.js.map +1 -1
  438. package/build/components/RawViewer/RawViewer.mjs +57 -0
  439. package/build/components/RawViewer/RawViewer.mjs.map +1 -0
  440. package/build/components/RawViewer/index.js +1 -14
  441. package/build/components/RawViewer/index.mjs +1 -0
  442. package/build/components/Readme/Readme.d.ts +2 -0
  443. package/build/components/Readme/Readme.js +46 -55
  444. package/build/components/Readme/Readme.js.map +1 -1
  445. package/build/components/Readme/Readme.mjs +45 -0
  446. package/build/components/Readme/Readme.mjs.map +1 -0
  447. package/build/components/Readme/index.js +1 -14
  448. package/build/components/Readme/index.mjs +1 -0
  449. package/build/components/Readme/utils.js +24 -26
  450. package/build/components/Readme/utils.js.map +1 -1
  451. package/build/components/Readme/utils.mjs +26 -0
  452. package/build/components/Readme/utils.mjs.map +1 -0
  453. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +35 -34
  454. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js.map +1 -1
  455. package/build/components/RegistryInfoDialog/RegistryInfoDialog.mjs +32 -0
  456. package/build/components/RegistryInfoDialog/RegistryInfoDialog.mjs.map +1 -0
  457. package/build/components/RegistryInfoDialog/index.js +1 -14
  458. package/build/components/RegistryInfoDialog/index.mjs +1 -0
  459. package/build/components/RegistryInfoDialog/styles.d.ts +5 -5
  460. package/build/components/RegistryInfoDialog/styles.js +28 -47
  461. package/build/components/RegistryInfoDialog/styles.js.map +1 -1
  462. package/build/components/RegistryInfoDialog/styles.mjs +25 -0
  463. package/build/components/RegistryInfoDialog/styles.mjs.map +1 -0
  464. package/build/components/Repository/Repository.js +93 -98
  465. package/build/components/Repository/Repository.js.map +1 -1
  466. package/build/components/Repository/Repository.mjs +96 -0
  467. package/build/components/Repository/Repository.mjs.map +1 -0
  468. package/build/components/Repository/index.js +1 -14
  469. package/build/components/Repository/index.mjs +1 -0
  470. package/build/components/Search/AutoComplete/AutoComplete.js +48 -76
  471. package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
  472. package/build/components/Search/AutoComplete/AutoComplete.mjs +47 -0
  473. package/build/components/Search/AutoComplete/AutoComplete.mjs.map +1 -0
  474. package/build/components/Search/AutoComplete/index.js +1 -14
  475. package/build/components/Search/AutoComplete/index.mjs +1 -0
  476. package/build/components/Search/AutoComplete/styles.d.ts +2 -2
  477. package/build/components/Search/AutoComplete/styles.js +18 -19
  478. package/build/components/Search/AutoComplete/styles.js.map +1 -1
  479. package/build/components/Search/AutoComplete/styles.mjs +20 -0
  480. package/build/components/Search/AutoComplete/styles.mjs.map +1 -0
  481. package/build/components/Search/Search.js +133 -175
  482. package/build/components/Search/Search.js.map +1 -1
  483. package/build/components/Search/Search.mjs +133 -0
  484. package/build/components/Search/Search.mjs.map +1 -0
  485. package/build/components/Search/SearchItem.d.ts +3 -3
  486. package/build/components/Search/SearchItem.js +115 -142
  487. package/build/components/Search/SearchItem.js.map +1 -1
  488. package/build/components/Search/SearchItem.mjs +115 -0
  489. package/build/components/Search/SearchItem.mjs.map +1 -0
  490. package/build/components/Search/index.js +1 -14
  491. package/build/components/Search/index.mjs +1 -0
  492. package/build/components/Search/styles.d.ts +2 -2
  493. package/build/components/Search/styles.js +34 -56
  494. package/build/components/Search/styles.js.map +1 -1
  495. package/build/components/Search/styles.mjs +32 -0
  496. package/build/components/Search/styles.mjs.map +1 -0
  497. package/build/components/Search/utils.js +14 -18
  498. package/build/components/Search/utils.js.map +1 -1
  499. package/build/components/Search/utils.mjs +19 -0
  500. package/build/components/Search/utils.mjs.map +1 -0
  501. package/build/components/SettingsMenu/SettingsMenu.js +117 -108
  502. package/build/components/SettingsMenu/SettingsMenu.js.map +1 -1
  503. package/build/components/SettingsMenu/SettingsMenu.mjs +111 -0
  504. package/build/components/SettingsMenu/SettingsMenu.mjs.map +1 -0
  505. package/build/components/SettingsMenu/index.js +1 -14
  506. package/build/components/SettingsMenu/index.mjs +1 -0
  507. package/build/components/SideBarTitle/SideBarTitle.js +74 -95
  508. package/build/components/SideBarTitle/SideBarTitle.js.map +1 -1
  509. package/build/components/SideBarTitle/SideBarTitle.mjs +79 -0
  510. package/build/components/SideBarTitle/SideBarTitle.mjs.map +1 -0
  511. package/build/components/SideBarTitle/index.js +1 -14
  512. package/build/components/SideBarTitle/index.mjs +1 -0
  513. package/build/components/SideBarTitle/utils.js +11 -14
  514. package/build/components/SideBarTitle/utils.js.map +1 -1
  515. package/build/components/SideBarTitle/utils.mjs +13 -0
  516. package/build/components/SideBarTitle/utils.mjs.map +1 -0
  517. package/build/components/UpLinks/UpLinks.js +65 -68
  518. package/build/components/UpLinks/UpLinks.js.map +1 -1
  519. package/build/components/UpLinks/UpLinks.mjs +60 -0
  520. package/build/components/UpLinks/UpLinks.mjs.map +1 -0
  521. package/build/components/UpLinks/UplinkLink.js +19 -19
  522. package/build/components/UpLinks/UplinkLink.js.map +1 -1
  523. package/build/components/UpLinks/UplinkLink.mjs +19 -0
  524. package/build/components/UpLinks/UplinkLink.mjs.map +1 -0
  525. package/build/components/UpLinks/index.js +2 -14
  526. package/build/components/UpLinks/index.mjs +2 -0
  527. package/build/components/UpLinks/styles.d.ts +5 -5
  528. package/build/components/UpLinks/styles.js +35 -48
  529. package/build/components/UpLinks/styles.js.map +1 -1
  530. package/build/components/UpLinks/styles.mjs +31 -0
  531. package/build/components/UpLinks/styles.mjs.map +1 -0
  532. package/build/components/Versions/HistoryList.js +68 -74
  533. package/build/components/Versions/HistoryList.js.map +1 -1
  534. package/build/components/Versions/HistoryList.mjs +67 -0
  535. package/build/components/Versions/HistoryList.mjs.map +1 -0
  536. package/build/components/Versions/TagList.js +35 -35
  537. package/build/components/Versions/TagList.js.map +1 -1
  538. package/build/components/Versions/TagList.mjs +33 -0
  539. package/build/components/Versions/TagList.mjs.map +1 -0
  540. package/build/components/Versions/Versions.js +101 -121
  541. package/build/components/Versions/Versions.js.map +1 -1
  542. package/build/components/Versions/Versions.mjs +92 -0
  543. package/build/components/Versions/Versions.mjs.map +1 -0
  544. package/build/components/Versions/index.js +2 -14
  545. package/build/components/Versions/index.mjs +2 -0
  546. package/build/components/Versions/styles.d.ts +5 -5
  547. package/build/components/Versions/styles.js +28 -37
  548. package/build/components/Versions/styles.js.map +1 -1
  549. package/build/components/Versions/styles.mjs +26 -0
  550. package/build/components/Versions/styles.mjs.map +1 -0
  551. package/build/configuration.js +18 -18
  552. package/build/configuration.js.map +1 -1
  553. package/build/configuration.mjs +23 -0
  554. package/build/configuration.mjs.map +1 -0
  555. package/build/dark-logo.png +0 -0
  556. package/build/favicon.ico +0 -0
  557. package/build/hooks/index.js +2 -21
  558. package/build/hooks/index.mjs +2 -0
  559. package/build/hooks/useLocalStorage.js +32 -55
  560. package/build/hooks/useLocalStorage.js.map +1 -1
  561. package/build/hooks/useLocalStorage.mjs +37 -0
  562. package/build/hooks/useLocalStorage.mjs.map +1 -0
  563. package/build/hooks/useOnClickOutside.js +21 -26
  564. package/build/hooks/useOnClickOutside.js.map +1 -1
  565. package/build/hooks/useOnClickOutside.mjs +26 -0
  566. package/build/hooks/useOnClickOutside.mjs.map +1 -0
  567. package/build/index.js +224 -482
  568. package/build/index.mjs +118 -0
  569. package/build/layouts/Security/Dialog.js +21 -23
  570. package/build/layouts/Security/Dialog.js.map +1 -1
  571. package/build/layouts/Security/Dialog.mjs +23 -0
  572. package/build/layouts/Security/Dialog.mjs.map +1 -0
  573. package/build/layouts/Version/Version.js +33 -28
  574. package/build/layouts/Version/Version.js.map +1 -1
  575. package/build/layouts/Version/Version.mjs +32 -0
  576. package/build/layouts/Version/Version.mjs.map +1 -0
  577. package/build/layouts/Version/index.js +1 -14
  578. package/build/layouts/Version/index.mjs +1 -0
  579. package/build/mockServiceWorker.js +335 -0
  580. package/build/pages/Front/Home.js +6 -7
  581. package/build/pages/Front/Home.js.map +1 -1
  582. package/build/pages/Front/Home.mjs +8 -0
  583. package/build/pages/Front/Home.mjs.map +1 -0
  584. package/build/pages/Front/index.js +2 -14
  585. package/build/pages/Front/index.mjs +2 -0
  586. package/build/pages/Security/AddUser.js +6 -7
  587. package/build/pages/Security/AddUser.js.map +1 -1
  588. package/build/pages/Security/AddUser.mjs +8 -0
  589. package/build/pages/Security/AddUser.mjs.map +1 -0
  590. package/build/pages/Security/ChangePassword.js +6 -7
  591. package/build/pages/Security/ChangePassword.js.map +1 -1
  592. package/build/pages/Security/ChangePassword.mjs +8 -0
  593. package/build/pages/Security/ChangePassword.mjs.map +1 -0
  594. package/build/pages/Security/Login.js +6 -7
  595. package/build/pages/Security/Login.js.map +1 -1
  596. package/build/pages/Security/Login.mjs +8 -0
  597. package/build/pages/Security/Login.mjs.map +1 -0
  598. package/build/pages/Security/Success.js +6 -7
  599. package/build/pages/Security/Success.js.map +1 -1
  600. package/build/pages/Security/Success.mjs +8 -0
  601. package/build/pages/Security/Success.mjs.map +1 -0
  602. package/build/pages/Security/index.js +4 -35
  603. package/build/pages/Security/index.mjs +4 -0
  604. package/build/pages/Version/Version.js +22 -30
  605. package/build/pages/Version/Version.js.map +1 -1
  606. package/build/pages/Version/Version.mjs +22 -0
  607. package/build/pages/Version/Version.mjs.map +1 -0
  608. package/build/pages/Version/index.js +2 -14
  609. package/build/pages/Version/index.mjs +2 -0
  610. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +58 -69
  611. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js.map +1 -1
  612. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.mjs +62 -0
  613. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.mjs.map +1 -0
  614. package/build/providers/AppConfigurationProvider/index.js +1 -19
  615. package/build/providers/AppConfigurationProvider/index.mjs +1 -0
  616. package/build/providers/AuthProvider/AuthProvider.js +52 -99
  617. package/build/providers/AuthProvider/AuthProvider.js.map +1 -1
  618. package/build/providers/AuthProvider/AuthProvider.mjs +51 -0
  619. package/build/providers/AuthProvider/AuthProvider.mjs.map +1 -0
  620. package/build/providers/AuthProvider/index.js +1 -17
  621. package/build/providers/AuthProvider/index.mjs +1 -0
  622. package/build/providers/AuthProvider/utils.js +18 -22
  623. package/build/providers/AuthProvider/utils.js.map +1 -1
  624. package/build/providers/AuthProvider/utils.mjs +22 -0
  625. package/build/providers/AuthProvider/utils.mjs.map +1 -0
  626. package/build/providers/DownloadProvider/DownloadProvider.js +34 -70
  627. package/build/providers/DownloadProvider/DownloadProvider.js.map +1 -1
  628. package/build/providers/DownloadProvider/DownloadProvider.mjs +34 -0
  629. package/build/providers/DownloadProvider/DownloadProvider.mjs.map +1 -0
  630. package/build/providers/DownloadProvider/index.js +1 -19
  631. package/build/providers/DownloadProvider/index.mjs +1 -0
  632. package/build/providers/ManifestsProvider/ManifestsProvider.js +26 -31
  633. package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -1
  634. package/build/providers/ManifestsProvider/ManifestsProvider.mjs +25 -0
  635. package/build/providers/ManifestsProvider/ManifestsProvider.mjs.map +1 -0
  636. package/build/providers/ManifestsProvider/index.js +1 -21
  637. package/build/providers/ManifestsProvider/index.mjs +1 -0
  638. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +30 -49
  639. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js.map +1 -1
  640. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.mjs +30 -0
  641. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.mjs.map +1 -0
  642. package/build/providers/PersistenceSettingProvider/index.js +1 -19
  643. package/build/providers/PersistenceSettingProvider/index.mjs +1 -0
  644. package/build/providers/SearchProvider/SearchProvider.js +54 -93
  645. package/build/providers/SearchProvider/SearchProvider.js.map +1 -1
  646. package/build/providers/SearchProvider/SearchProvider.mjs +53 -0
  647. package/build/providers/SearchProvider/SearchProvider.mjs.map +1 -0
  648. package/build/providers/SearchProvider/index.js +1 -25
  649. package/build/providers/SearchProvider/index.mjs +1 -0
  650. package/build/providers/TranslatorProvider/TranslatorProvider.js +44 -69
  651. package/build/providers/TranslatorProvider/TranslatorProvider.js.map +1 -1
  652. package/build/providers/TranslatorProvider/TranslatorProvider.mjs +45 -0
  653. package/build/providers/TranslatorProvider/TranslatorProvider.mjs.map +1 -0
  654. package/build/providers/TranslatorProvider/index.js +1 -21
  655. package/build/providers/TranslatorProvider/index.mjs +1 -0
  656. package/build/providers/VersionProvider/VersionProvider.js +53 -55
  657. package/build/providers/VersionProvider/VersionProvider.js.map +1 -1
  658. package/build/providers/VersionProvider/VersionProvider.mjs +55 -0
  659. package/build/providers/VersionProvider/VersionProvider.mjs.map +1 -0
  660. package/build/providers/VersionProvider/index.js +1 -21
  661. package/build/providers/VersionProvider/index.mjs +1 -0
  662. package/build/providers/index.js +16 -94
  663. package/build/providers/index.mjs +16 -0
  664. package/build/sections/Detail/ContainerContent.js +33 -62
  665. package/build/sections/Detail/ContainerContent.js.map +1 -1
  666. package/build/sections/Detail/ContainerContent.mjs +34 -0
  667. package/build/sections/Detail/ContainerContent.mjs.map +1 -0
  668. package/build/sections/Detail/Detail.js +50 -61
  669. package/build/sections/Detail/Detail.js.map +1 -1
  670. package/build/sections/Detail/Detail.mjs +50 -0
  671. package/build/sections/Detail/Detail.mjs.map +1 -0
  672. package/build/sections/Detail/ReadmeSection.js +13 -18
  673. package/build/sections/Detail/ReadmeSection.js.map +1 -1
  674. package/build/sections/Detail/ReadmeSection.mjs +13 -0
  675. package/build/sections/Detail/ReadmeSection.mjs.map +1 -0
  676. package/build/sections/Detail/Tabs.js +60 -53
  677. package/build/sections/Detail/Tabs.js.map +1 -1
  678. package/build/sections/Detail/Tabs.mjs +59 -0
  679. package/build/sections/Detail/Tabs.mjs.map +1 -0
  680. package/build/sections/Detail/index.js +1 -14
  681. package/build/sections/Detail/index.mjs +1 -0
  682. package/build/sections/Footer/Footer.js +101 -134
  683. package/build/sections/Footer/Footer.js.map +1 -1
  684. package/build/sections/Footer/Footer.mjs +105 -0
  685. package/build/sections/Footer/Footer.mjs.map +1 -0
  686. package/build/sections/Footer/index.js +1 -14
  687. package/build/sections/Footer/index.mjs +1 -0
  688. package/build/sections/Footer/styles.d.ts +16 -16
  689. package/build/sections/Footer/styles.js +67 -88
  690. package/build/sections/Footer/styles.js.map +1 -1
  691. package/build/sections/Footer/styles.mjs +65 -0
  692. package/build/sections/Footer/styles.mjs.map +1 -0
  693. package/build/sections/Header/Header.js +102 -144
  694. package/build/sections/Header/Header.js.map +1 -1
  695. package/build/sections/Header/Header.mjs +101 -0
  696. package/build/sections/Header/Header.mjs.map +1 -0
  697. package/build/sections/Header/HeaderGreetings.js +19 -21
  698. package/build/sections/Header/HeaderGreetings.js.map +1 -1
  699. package/build/sections/Header/HeaderGreetings.mjs +19 -0
  700. package/build/sections/Header/HeaderGreetings.mjs.map +1 -0
  701. package/build/sections/Header/HeaderLeft.js +34 -32
  702. package/build/sections/Header/HeaderLeft.js.map +1 -1
  703. package/build/sections/Header/HeaderLeft.mjs +33 -0
  704. package/build/sections/Header/HeaderLeft.mjs.map +1 -0
  705. package/build/sections/Header/HeaderMenu.js +48 -50
  706. package/build/sections/Header/HeaderMenu.js.map +1 -1
  707. package/build/sections/Header/HeaderMenu.mjs +45 -0
  708. package/build/sections/Header/HeaderMenu.mjs.map +1 -0
  709. package/build/sections/Header/HeaderRight.js +97 -119
  710. package/build/sections/Header/HeaderRight.js.map +1 -1
  711. package/build/sections/Header/HeaderRight.mjs +95 -0
  712. package/build/sections/Header/HeaderRight.mjs.map +1 -0
  713. package/build/sections/Header/HeaderSettingsDialog.js +100 -105
  714. package/build/sections/Header/HeaderSettingsDialog.js.map +1 -1
  715. package/build/sections/Header/HeaderSettingsDialog.mjs +99 -0
  716. package/build/sections/Header/HeaderSettingsDialog.mjs.map +1 -0
  717. package/build/sections/Header/HeaderToolTip.js +12 -17
  718. package/build/sections/Header/HeaderToolTip.js.map +1 -1
  719. package/build/sections/Header/HeaderToolTip.mjs +12 -0
  720. package/build/sections/Header/HeaderToolTip.mjs.map +1 -0
  721. package/build/sections/Header/HeaderToolTipIcon.d.ts +1 -1
  722. package/build/sections/Header/HeaderToolTipIcon.js +63 -63
  723. package/build/sections/Header/HeaderToolTipIcon.js.map +1 -1
  724. package/build/sections/Header/HeaderToolTipIcon.mjs +58 -0
  725. package/build/sections/Header/HeaderToolTipIcon.mjs.map +1 -0
  726. package/build/sections/Header/LanguageSwitch.js +105 -128
  727. package/build/sections/Header/LanguageSwitch.js.map +1 -1
  728. package/build/sections/Header/LanguageSwitch.mjs +99 -0
  729. package/build/sections/Header/LanguageSwitch.mjs.map +1 -0
  730. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.d.ts +6 -6
  731. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +194 -158
  732. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js.map +1 -1
  733. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.mjs +199 -0
  734. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.mjs.map +1 -0
  735. package/build/sections/Header/RegistryInfoContent/index.js +1 -14
  736. package/build/sections/Header/RegistryInfoContent/index.mjs +1 -0
  737. package/build/sections/Header/RegistryInfoContent/styles.d.ts +6 -6
  738. package/build/sections/Header/RegistryInfoContent/styles.js +21 -30
  739. package/build/sections/Header/RegistryInfoContent/styles.js.map +1 -1
  740. package/build/sections/Header/RegistryInfoContent/styles.mjs +20 -0
  741. package/build/sections/Header/RegistryInfoContent/styles.mjs.map +1 -0
  742. package/build/sections/Header/index.js +1 -14
  743. package/build/sections/Header/index.mjs +1 -0
  744. package/build/sections/Header/styles.d.ts +10 -10
  745. package/build/sections/Header/styles.js +118 -132
  746. package/build/sections/Header/styles.js.map +1 -1
  747. package/build/sections/Header/styles.mjs +126 -0
  748. package/build/sections/Header/styles.mjs.map +1 -0
  749. package/build/sections/Home/Home.js +20 -21
  750. package/build/sections/Home/Home.js.map +1 -1
  751. package/build/sections/Home/Home.mjs +20 -0
  752. package/build/sections/Home/Home.mjs.map +1 -0
  753. package/build/sections/Home/index.js +1 -14
  754. package/build/sections/Home/index.mjs +1 -0
  755. package/build/sections/Security/AddUser.js +132 -179
  756. package/build/sections/Security/AddUser.js.map +1 -1
  757. package/build/sections/Security/AddUser.mjs +132 -0
  758. package/build/sections/Security/AddUser.mjs.map +1 -0
  759. package/build/sections/Security/ChangePassword.js +123 -169
  760. package/build/sections/Security/ChangePassword.js.map +1 -1
  761. package/build/sections/Security/ChangePassword.mjs +123 -0
  762. package/build/sections/Security/ChangePassword.mjs.map +1 -0
  763. package/build/sections/Security/Login.js +94 -142
  764. package/build/sections/Security/Login.js.map +1 -1
  765. package/build/sections/Security/Login.mjs +94 -0
  766. package/build/sections/Security/Login.mjs.map +1 -0
  767. package/build/sections/Security/Success.js +52 -49
  768. package/build/sections/Security/Success.js.map +1 -1
  769. package/build/sections/Security/Success.mjs +51 -0
  770. package/build/sections/Security/Success.mjs.map +1 -0
  771. package/build/sections/Security/index.js +4 -35
  772. package/build/sections/Security/index.mjs +4 -0
  773. package/build/sections/Security/styles.js +30 -38
  774. package/build/sections/Security/styles.js.map +1 -1
  775. package/build/sections/Security/styles.mjs +29 -0
  776. package/build/sections/Security/styles.mjs.map +1 -0
  777. package/build/sections/Security/utils.js +16 -56
  778. package/build/sections/Security/utils.js.map +1 -1
  779. package/build/sections/Security/utils.mjs +19 -0
  780. package/build/sections/Security/utils.mjs.map +1 -0
  781. package/build/sections/SideBar/Sidebar.js +93 -89
  782. package/build/sections/SideBar/Sidebar.js.map +1 -1
  783. package/build/sections/SideBar/Sidebar.mjs +93 -0
  784. package/build/sections/SideBar/Sidebar.mjs.map +1 -0
  785. package/build/sections/SideBar/index.js +1 -14
  786. package/build/sections/SideBar/index.mjs +1 -0
  787. package/build/sections/index.js +4 -21
  788. package/build/sections/index.mjs +4 -0
  789. package/build/store/api.js +72 -115
  790. package/build/store/api.js.map +1 -1
  791. package/build/store/api.mjs +76 -0
  792. package/build/store/api.mjs.map +1 -0
  793. package/build/store/index.js +1 -14
  794. package/build/store/index.mjs +1 -0
  795. package/build/store/routes.js +15 -19
  796. package/build/store/routes.js.map +1 -1
  797. package/build/store/routes.mjs +18 -0
  798. package/build/store/routes.mjs.map +1 -0
  799. package/build/store/storage.js +24 -26
  800. package/build/store/storage.js.map +1 -1
  801. package/build/store/storage.mjs +29 -0
  802. package/build/store/storage.mjs.map +1 -0
  803. package/build/store/utils.js +7 -11
  804. package/build/store/utils.js.map +1 -1
  805. package/build/store/utils.mjs +9 -0
  806. package/build/store/utils.mjs.map +1 -0
  807. package/build/{components/Readme/github-markdown.css → ui-components.css} +1 -0
  808. package/build/utils/cli-utils.d.ts +1 -1
  809. package/build/utils/cli-utils.js +20 -32
  810. package/build/utils/cli-utils.js.map +1 -1
  811. package/build/utils/cli-utils.mjs +26 -0
  812. package/build/utils/cli-utils.mjs.map +1 -0
  813. package/build/utils/index.js +6 -75
  814. package/build/utils/index.mjs +6 -0
  815. package/build/utils/loadable.js +22 -24
  816. package/build/utils/loadable.js.map +1 -1
  817. package/build/utils/loadable.mjs +23 -0
  818. package/build/utils/loadable.mjs.map +1 -0
  819. package/build/utils/routes.js +29 -31
  820. package/build/utils/routes.js.map +1 -1
  821. package/build/utils/routes.mjs +30 -0
  822. package/build/utils/routes.mjs.map +1 -0
  823. package/build/utils/schemas.js +22 -26
  824. package/build/utils/schemas.js.map +1 -1
  825. package/build/utils/schemas.mjs +22 -0
  826. package/build/utils/schemas.mjs.map +1 -0
  827. package/build/utils/token.js +23 -39
  828. package/build/utils/token.js.map +1 -1
  829. package/build/utils/token.mjs +23 -0
  830. package/build/utils/token.mjs.map +1 -0
  831. package/build/utils/url.js +60 -68
  832. package/build/utils/url.js.map +1 -1
  833. package/build/utils/url.mjs +61 -0
  834. package/build/utils/url.mjs.map +1 -0
  835. package/build/utils/utils.js +87 -99
  836. package/build/utils/utils.js.map +1 -1
  837. package/build/utils/utils.mjs +93 -0
  838. package/build/utils/utils.mjs.map +1 -0
  839. package/package.json +27 -14
  840. package/build/AppTest/AppRoute.js +0 -14
  841. package/build/AppTest/AppRoute.js.map +0 -1
  842. package/build/Theme/index.js.map +0 -1
  843. package/build/components/ActionBar/index.js.map +0 -1
  844. package/build/components/Author/index.js.map +0 -1
  845. package/build/components/CopyClipboard/index.js.map +0 -1
  846. package/build/components/Dependencies/index.js.map +0 -1
  847. package/build/components/Dependencies/types.js +0 -6
  848. package/build/components/Dependencies/types.js.map +0 -1
  849. package/build/components/Deprecated/index.js.map +0 -1
  850. package/build/components/Developers/index.js.map +0 -1
  851. package/build/components/Distribution/index.js.map +0 -1
  852. package/build/components/Engines/index.js.map +0 -1
  853. package/build/components/ErrorBoundary/index.js.map +0 -1
  854. package/build/components/Forbidden/index.js.map +0 -1
  855. package/build/components/FundButton/index.js.map +0 -1
  856. package/build/components/HeaderInfoDialog/index.js.map +0 -1
  857. package/build/components/Heading/index.js.map +0 -1
  858. package/build/components/Help/index.js.map +0 -1
  859. package/build/components/Icons/DevsIcons/CommonJS.js +0 -18
  860. package/build/components/Icons/DevsIcons/CommonJS.js.map +0 -1
  861. package/build/components/Icons/DevsIcons/ES6Module.js +0 -18
  862. package/build/components/Icons/DevsIcons/ES6Module.js.map +0 -1
  863. package/build/components/Icons/DevsIcons/Git.js +0 -18
  864. package/build/components/Icons/DevsIcons/Git.js.map +0 -1
  865. package/build/components/Icons/DevsIcons/NodeJS.js +0 -18
  866. package/build/components/Icons/DevsIcons/NodeJS.js.map +0 -1
  867. package/build/components/Icons/DevsIcons/TypeScript.js +0 -18
  868. package/build/components/Icons/DevsIcons/TypeScript.js.map +0 -1
  869. package/build/components/Icons/DevsIcons/commonjs.svg +0 -4
  870. package/build/components/Icons/DevsIcons/es6module.svg +0 -4
  871. package/build/components/Icons/DevsIcons/git.svg +0 -4
  872. package/build/components/Icons/DevsIcons/index.js.map +0 -1
  873. package/build/components/Icons/DevsIcons/nodejs.svg +0 -6
  874. package/build/components/Icons/DevsIcons/typescript.svg +0 -4
  875. package/build/components/Icons/Managers/Npm.js +0 -18
  876. package/build/components/Icons/Managers/Npm.js.map +0 -1
  877. package/build/components/Icons/Managers/Pnpm.js +0 -18
  878. package/build/components/Icons/Managers/Pnpm.js.map +0 -1
  879. package/build/components/Icons/Managers/Yarn.js +0 -18
  880. package/build/components/Icons/Managers/Yarn.js.map +0 -1
  881. package/build/components/Icons/Managers/index.js.map +0 -1
  882. package/build/components/Icons/Managers/npm.svg +0 -15
  883. package/build/components/Icons/Managers/pnpm.svg +0 -1
  884. package/build/components/Icons/Managers/yarn.svg +0 -1
  885. package/build/components/Install/index.js.map +0 -1
  886. package/build/components/Keywords/index.js.map +0 -1
  887. package/build/components/Label/index.js.map +0 -1
  888. package/build/components/Link/index.js.map +0 -1
  889. package/build/components/LinkExternal/index.js.map +0 -1
  890. package/build/components/Loading/Spinner/index.js.map +0 -1
  891. package/build/components/Loading/index.js.map +0 -1
  892. package/build/components/LoginDialog/index.js.map +0 -1
  893. package/build/components/Logo/img/logo-black-and-white.svg +0 -1
  894. package/build/components/Logo/img/logo.svg +0 -1
  895. package/build/components/Logo/index.js.map +0 -1
  896. package/build/components/MenuItem/index.js.map +0 -1
  897. package/build/components/NoItems/index.js.map +0 -1
  898. package/build/components/NotFound/img/package.svg +0 -1
  899. package/build/components/NotFound/index.js.map +0 -1
  900. package/build/components/Package/index.js.map +0 -1
  901. package/build/components/PackageList/index.js.map +0 -1
  902. package/build/components/Person/index.js.map +0 -1
  903. package/build/components/RawViewer/index.js.map +0 -1
  904. package/build/components/Readme/index.js.map +0 -1
  905. package/build/components/Readme/types.js +0 -6
  906. package/build/components/Readme/types.js.map +0 -1
  907. package/build/components/RegistryInfoDialog/index.js.map +0 -1
  908. package/build/components/RegistryInfoDialog/types.js +0 -6
  909. package/build/components/RegistryInfoDialog/types.js.map +0 -1
  910. package/build/components/Repository/index.js.map +0 -1
  911. package/build/components/Search/AutoComplete/index.js.map +0 -1
  912. package/build/components/Search/index.js.map +0 -1
  913. package/build/components/SettingsMenu/index.js.map +0 -1
  914. package/build/components/SideBarTitle/index.js.map +0 -1
  915. package/build/components/UnAuthorized/UnAuthorized.js +0 -75
  916. package/build/components/UnAuthorized/UnAuthorized.js.map +0 -1
  917. package/build/components/UnAuthorized/index.js +0 -14
  918. package/build/components/UnAuthorized/index.js.map +0 -1
  919. package/build/components/UpLinks/index.js.map +0 -1
  920. package/build/components/Versions/index.js.map +0 -1
  921. package/build/components/Versions/types.js +0 -6
  922. package/build/components/Versions/types.js.map +0 -1
  923. package/build/hooks/index.js.map +0 -1
  924. package/build/index.js.map +0 -1
  925. package/build/layouts/Version/index.js.map +0 -1
  926. package/build/pages/Front/index.js.map +0 -1
  927. package/build/pages/Security/index.js.map +0 -1
  928. package/build/pages/Version/index.js.map +0 -1
  929. package/build/providers/AppConfigurationProvider/index.js.map +0 -1
  930. package/build/providers/AuthProvider/index.js.map +0 -1
  931. package/build/providers/AuthProvider/types.js +0 -6
  932. package/build/providers/AuthProvider/types.js.map +0 -1
  933. package/build/providers/DownloadProvider/index.js.map +0 -1
  934. package/build/providers/ManifestsProvider/README.md +0 -22
  935. package/build/providers/ManifestsProvider/index.js.map +0 -1
  936. package/build/providers/PersistenceSettingProvider/index.js.map +0 -1
  937. package/build/providers/SearchProvider/index.js.map +0 -1
  938. package/build/providers/TranslatorProvider/index.js.map +0 -1
  939. package/build/providers/VersionProvider/README.md +0 -22
  940. package/build/providers/VersionProvider/index.js.map +0 -1
  941. package/build/providers/index.js.map +0 -1
  942. package/build/routes/SecurityRoutes.js +0 -36
  943. package/build/routes/SecurityRoutes.js.map +0 -1
  944. package/build/sections/Detail/index.js.map +0 -1
  945. package/build/sections/Footer/index.js.map +0 -1
  946. package/build/sections/Header/RegistryInfoContent/index.js.map +0 -1
  947. package/build/sections/Header/index.js.map +0 -1
  948. package/build/sections/Home/index.js.map +0 -1
  949. package/build/sections/Security/index.js.map +0 -1
  950. package/build/sections/SideBar/index.js.map +0 -1
  951. package/build/sections/index.js.map +0 -1
  952. package/build/store/index.js.map +0 -1
  953. package/build/test/i18n-config.js +0 -26
  954. package/build/test/i18n-config.js.map +0 -1
  955. package/build/test/test-react-testing-library.js +0 -147
  956. package/build/test/test-react-testing-library.js.map +0 -1
  957. package/build/types/external-modules.d.js +0 -2
  958. package/build/types/external-modules.d.js.map +0 -1
  959. package/build/types/index.js +0 -6
  960. package/build/types/index.js.map +0 -1
  961. package/build/types/packageMeta.js +0 -6
  962. package/build/types/packageMeta.js.map +0 -1
  963. package/build/utils/index.js.map +0 -1
  964. package/build/utils/token-generate.js +0 -44
  965. package/build/utils/token-generate.js.map +0 -1
@@ -0,0 +1 @@
1
+ import "./AuthProvider.mjs";
@@ -1,27 +1,23 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getDefaultUserState = getDefaultUserState;
7
- exports.normalizeAuthError = normalizeAuthError;
8
- var _storage = require("../../store/storage");
9
- var _utils = require("../../utils");
1
+ const require_token = require("../../utils/token.js");
2
+ require("../../utils/index.js");
3
+ const require_storage = require("../../store/storage.js");
4
+ //#region src/providers/AuthProvider/utils.ts
10
5
  function getDefaultUserState() {
11
- var _getAuth = (0, _storage.getAuth)(),
12
- token = _getAuth.token,
13
- username = _getAuth.username;
14
- return (0, _utils.isTokenExpire)(token) ? {
15
- token: null,
16
- username: null
17
- } : {
18
- token: token,
19
- username: username
20
- };
6
+ const { token, username } = require_storage.getAuth();
7
+ return require_token.isTokenExpire(token) ? {
8
+ token: null,
9
+ username: null
10
+ } : {
11
+ token,
12
+ username
13
+ };
21
14
  }
22
15
  function normalizeAuthError(err) {
23
- var _err$info, _err$response;
24
- var message = (err === null || err === void 0 || (_err$info = err.info) === null || _err$info === void 0 ? void 0 : _err$info.message) || (err === null || err === void 0 || (_err$response = err.response) === null || _err$response === void 0 || (_err$response = _err$response.data) === null || _err$response === void 0 ? void 0 : _err$response.message) || (err === null || err === void 0 ? void 0 : err.message) || 'Authentication failed';
25
- return new Error(message);
16
+ const message = err?.info?.message || err?.response?.data?.message || err?.message || "Authentication failed";
17
+ return new Error(message);
26
18
  }
19
+ //#endregion
20
+ exports.getDefaultUserState = getDefaultUserState;
21
+ exports.normalizeAuthError = normalizeAuthError;
22
+
27
23
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_storage","require","_utils","getDefaultUserState","_getAuth","getAuth","token","username","isTokenExpire","normalizeAuthError","err","_err$info","_err$response","message","info","response","data","Error"],"sources":["../../../src/providers/AuthProvider/utils.ts"],"sourcesContent":["import { getAuth } from '../../store/storage';\nimport { isTokenExpire } from '../../utils';\nimport type { LoginBody } from './types';\n\nexport function getDefaultUserState(): LoginBody {\n const { token, username } = getAuth();\n return isTokenExpire(token) ? { token: null, username: null } : { token, username };\n}\n\nexport function normalizeAuthError(err: any): Error {\n const message =\n err?.info?.message || err?.response?.data?.message || err?.message || 'Authentication failed';\n\n return new Error(message);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGO,SAASE,mBAAmBA,CAAA,EAAc;EAC/C,IAAAC,QAAA,GAA4B,IAAAC,gBAAO,EAAC,CAAC;IAA7BC,KAAK,GAAAF,QAAA,CAALE,KAAK;IAAEC,QAAQ,GAAAH,QAAA,CAARG,QAAQ;EACvB,OAAO,IAAAC,oBAAa,EAACF,KAAK,CAAC,GAAG;IAAEA,KAAK,EAAE,IAAI;IAAEC,QAAQ,EAAE;EAAK,CAAC,GAAG;IAAED,KAAK,EAALA,KAAK;IAAEC,QAAQ,EAARA;EAAS,CAAC;AACrF;AAEO,SAASE,kBAAkBA,CAACC,GAAQ,EAAS;EAAA,IAAAC,SAAA,EAAAC,aAAA;EAClD,IAAMC,OAAO,GACX,CAAAH,GAAG,aAAHA,GAAG,gBAAAC,SAAA,GAAHD,GAAG,CAAEI,IAAI,cAAAH,SAAA,uBAATA,SAAA,CAAWE,OAAO,MAAIH,GAAG,aAAHA,GAAG,gBAAAE,aAAA,GAAHF,GAAG,CAAEK,QAAQ,cAAAH,aAAA,gBAAAA,aAAA,GAAbA,aAAA,CAAeI,IAAI,cAAAJ,aAAA,uBAAnBA,aAAA,CAAqBC,OAAO,MAAIH,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEG,OAAO,KAAI,uBAAuB;EAE/F,OAAO,IAAII,KAAK,CAACJ,OAAO,CAAC;AAC3B","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["getAuth","isTokenExpire","LoginBody","getDefaultUserState","token","username","normalizeAuthError","err","Error","message","info","response","data"],"sources":["../../../src/providers/AuthProvider/utils.ts"],"sourcesContent":["import { getAuth } from '../../store/storage';\nimport { isTokenExpire } from '../../utils';\nimport type { LoginBody } from './types';\n\nexport function getDefaultUserState(): LoginBody {\n const { token, username } = getAuth();\n return isTokenExpire(token) ? { token: null, username: null } : { token, username };\n}\n\nexport function normalizeAuthError(err: any): Error {\n const message =\n err?.info?.message || err?.response?.data?.message || err?.message || 'Authentication failed';\n\n return new Error(message);\n}\n"],"mappings":";;;;AAIA,SAAgBG,sBAAiC;CAC/C,MAAM,EAAEC,OAAOC,aAAaL,gBAAAA,SAAS;AACrC,QAAOC,cAAAA,cAAcG,MAAM,GAAG;EAAEA,OAAO;EAAMC,UAAU;EAAM,GAAG;EAAED;EAAOC;EAAU;;AAGrF,SAAgBC,mBAAmBC,KAAiB;CAClD,MAAME,UACJF,KAAKG,MAAMD,WAAWF,KAAKI,UAAUC,MAAMH,WAAWF,KAAKE,WAAW;AAExE,QAAO,IAAID,MAAMC,QAAQ"}
@@ -0,0 +1,22 @@
1
+ import { isTokenExpire } from "../../utils/token.mjs";
2
+ import "../../utils/index.mjs";
3
+ import { getAuth } from "../../store/storage.mjs";
4
+ //#region src/providers/AuthProvider/utils.ts
5
+ function getDefaultUserState() {
6
+ const { token, username } = getAuth();
7
+ return isTokenExpire(token) ? {
8
+ token: null,
9
+ username: null
10
+ } : {
11
+ token,
12
+ username
13
+ };
14
+ }
15
+ function normalizeAuthError(err) {
16
+ const message = err?.info?.message || err?.response?.data?.message || err?.message || "Authentication failed";
17
+ return new Error(message);
18
+ }
19
+ //#endregion
20
+ export { getDefaultUserState, normalizeAuthError };
21
+
22
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","names":["getAuth","isTokenExpire","LoginBody","getDefaultUserState","token","username","normalizeAuthError","err","Error","message","info","response","data"],"sources":["../../../src/providers/AuthProvider/utils.ts"],"sourcesContent":["import { getAuth } from '../../store/storage';\nimport { isTokenExpire } from '../../utils';\nimport type { LoginBody } from './types';\n\nexport function getDefaultUserState(): LoginBody {\n const { token, username } = getAuth();\n return isTokenExpire(token) ? { token: null, username: null } : { token, username };\n}\n\nexport function normalizeAuthError(err: any): Error {\n const message =\n err?.info?.message || err?.response?.data?.message || err?.message || 'Authentication failed';\n\n return new Error(message);\n}\n"],"mappings":";;;;AAIA,SAAgBG,sBAAiC;CAC/C,MAAM,EAAEC,OAAOC,aAAaL,SAAS;AACrC,QAAOC,cAAcG,MAAM,GAAG;EAAEA,OAAO;EAAMC,UAAU;EAAM,GAAG;EAAED;EAAOC;EAAU;;AAGrF,SAAgBC,mBAAmBC,KAAiB;CAClD,MAAME,UACJF,KAAKG,MAAMD,WAAWF,KAAKI,UAAUC,MAAMH,WAAWF,KAAKE,WAAW;AAExE,QAAO,IAAID,MAAMC,QAAQ"}
@@ -1,73 +1,37 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.useDownload = exports.DownloadProvider = exports.DownloadContext = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _useDataMutation = require("../../api/use-data-mutation");
10
- var _url = require("../../utils/url");
11
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
12
- function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
13
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
14
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
15
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
16
- var DownloadContext = exports.DownloadContext = /*#__PURE__*/(0, _react.createContext)(undefined);
17
- var DownloadProvider = exports.DownloadProvider = function DownloadProvider(_ref) {
18
- var children = _ref.children;
19
- var _useTarballDownload = (0, _useDataMutation.useTarballDownload)(),
20
- download = _useTarballDownload.download,
21
- isDownloading = _useTarballDownload.isDownloading;
22
- var downloadTarball = (0, _react.useCallback)(/*#__PURE__*/function () {
23
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref2) {
24
- var link, fileStream, fileName, _t;
25
- return _regenerator().w(function (_context) {
26
- while (1) switch (_context.p = _context.n) {
27
- case 0:
28
- link = _ref2.link;
29
- _context.p = 1;
30
- _context.n = 2;
31
- return download({
32
- link: link
33
- });
34
- case 2:
35
- fileStream = _context.v;
36
- if (fileStream) {
37
- _context.n = 3;
38
- break;
39
- }
40
- return _context.a(2);
41
- case 3:
42
- fileName = (0, _url.extractFileName)(link);
43
- (0, _url.downloadFile)(fileStream, fileName);
44
- _context.n = 5;
45
- break;
46
- case 4:
47
- _context.p = 4;
48
- _t = _context.v;
49
- console.error('Error during tarball download:', _t);
50
- case 5:
51
- return _context.a(2);
52
- }
53
- }, _callee, null, [[1, 4]]);
54
- }));
55
- return function (_x) {
56
- return _ref3.apply(this, arguments);
57
- };
58
- }(), [download]);
59
- return /*#__PURE__*/_react["default"].createElement(DownloadContext.Provider, {
60
- value: {
61
- downloadTarball: downloadTarball,
62
- isDownloading: isDownloading
63
- }
64
- }, children);
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
2
+ const require_url = require("../../utils/url.js");
3
+ const require_use_data_mutation = require("../../api/use-data-mutation.js");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ let react = require("react");
6
+ react = require_runtime.__toESM(react);
7
+ //#region src/providers/DownloadProvider/DownloadProvider.tsx
8
+ var DownloadContext = (0, react.createContext)(void 0);
9
+ var DownloadProvider = ({ children }) => {
10
+ const { download, isDownloading } = require_use_data_mutation.useTarballDownload();
11
+ const downloadTarball = (0, react.useCallback)(async ({ link }) => {
12
+ try {
13
+ const fileStream = await download({ link });
14
+ if (!fileStream) return;
15
+ require_url.downloadFile(fileStream, require_url.extractFileName(link));
16
+ } catch (error) {
17
+ console.error("Error during tarball download:", error);
18
+ }
19
+ }, [download]);
20
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DownloadContext.Provider, {
21
+ value: {
22
+ downloadTarball,
23
+ isDownloading
24
+ },
25
+ children
26
+ });
65
27
  };
66
- var useDownload = exports.useDownload = function useDownload() {
67
- var context = (0, _react.useContext)(DownloadContext);
68
- if (!context) {
69
- throw new Error('useDownload must be used within a DownloadProvider');
70
- }
71
- return context;
28
+ var useDownload = () => {
29
+ const context = (0, react.useContext)(DownloadContext);
30
+ if (!context) throw new Error("useDownload must be used within a DownloadProvider");
31
+ return context;
72
32
  };
33
+ //#endregion
34
+ exports.DownloadProvider = DownloadProvider;
35
+ exports.useDownload = useDownload;
36
+
73
37
  //# sourceMappingURL=DownloadProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadProvider.js","names":["_react","_interopRequireWildcard","require","_useDataMutation","_url","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_regenerator","Symbol","iterator","toStringTag","c","prototype","Generator","u","create","_regeneratorDefine2","p","y","G","v","a","d","bind","length","l","TypeError","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","displayName","w","m","_regeneratorDefine","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","DownloadContext","exports","createContext","undefined","DownloadProvider","_ref","children","_useTarballDownload","useTarballDownload","download","isDownloading","downloadTarball","useCallback","_ref3","_callee","_ref2","link","fileStream","fileName","_t","_context","extractFileName","downloadFile","console","error","_x","createElement","Provider","useDownload","context","useContext","Error"],"sources":["../../../src/providers/DownloadProvider/DownloadProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport React, { createContext, useCallback, useContext } from 'react';\n\nimport { useTarballDownload } from '../../api/use-data-mutation';\nimport { downloadFile, extractFileName } from '../../utils/url';\n\nexport interface DownloadContextProps {\n downloadTarball: (args: { link: string }) => Promise<void>;\n isDownloading: boolean;\n}\n\nexport const DownloadContext = createContext<DownloadContextProps | undefined>(undefined);\n\nexport const DownloadProvider: React.FC<{ children: ReactNode }> = ({ children }) => {\n const { download, isDownloading } = useTarballDownload();\n\n const downloadTarball = useCallback(\n async ({ link }: { link: string }) => {\n try {\n const fileStream = await download({ link });\n if (!fileStream) return;\n\n const fileName = extractFileName(link);\n downloadFile(fileStream, fileName);\n } catch (error) {\n console.error('Error during tarball download:', error);\n }\n },\n [download]\n );\n\n return (\n <DownloadContext.Provider value={{ downloadTarball, isDownloading }}>\n {children}\n </DownloadContext.Provider>\n );\n};\n\nexport const useDownload = () => {\n const context = useContext(DownloadContext);\n if (!context) {\n throw new Error('useDownload must be used within a DownloadProvider');\n }\n return context;\n};\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AAAgE,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EA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AAK,CAAC,CAAC;UAAA;YAArCC,UAAU,GAAAG,QAAA,CAAAlD,CAAA;YAAA,IACX+C,UAAU;cAAAG,QAAA,CAAA/E,CAAA;cAAA;YAAA;YAAA,OAAA+E,QAAA,CAAAjD,CAAA;UAAA;YAET+C,QAAQ,GAAG,IAAAG,oBAAe,EAACL,IAAI,CAAC;YACtC,IAAAM,iBAAY,EAACL,UAAU,EAAEC,QAAQ,CAAC;YAACE,QAAA,CAAA/E,CAAA;YAAA;UAAA;YAAA+E,QAAA,CAAArD,CAAA;YAAAoD,EAAA,GAAAC,QAAA,CAAAlD,CAAA;YAEnCqD,OAAO,CAACC,KAAK,CAAC,gCAAgC,EAAAL,EAAO,CAAC;UAAC;YAAA,OAAAC,QAAA,CAAAjD,CAAA;QAAA;MAAA,GAAA2C,OAAA;IAAA,CAE1D;IAAA,iBAAAW,EAAA;MAAA,OAAAZ,KAAA,CAAAhB,KAAA,OAAAD,SAAA;IAAA;EAAA,KACD,CAACa,QAAQ,CACX,CAAC;EAED,oBACE7E,MAAA,YAAA8F,aAAA,CAAC1B,eAAe,CAAC2B,QAAQ;IAACjD,KAAK,EAAE;MAAEiC,eAAe,EAAfA,eAAe;MAAED,aAAa,EAAbA;IAAc;EAAE,GACjEJ,QACuB,CAAC;AAE/B,CAAC;AAEM,IAAMsB,WAAW,GAAA3B,OAAA,CAAA2B,WAAA,GAAG,SAAdA,WAAWA,CAAA,EAAS;EAC/B,IAAMC,OAAO,GAAG,IAAAC,iBAAU,EAAC9B,eAAe,CAAC;EAC3C,IAAI,CAAC6B,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CAAC,oDAAoD,CAAC;EACvE;EACA,OAAOF,OAAO;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"DownloadProvider.js","names":["ReactNode","React","createContext","useCallback","useContext","useTarballDownload","downloadFile","extractFileName","DownloadContextProps","downloadTarball","args","link","Promise","isDownloading","DownloadContext","undefined","DownloadProvider","FC","children","download","fileStream","fileName","error","console","useDownload","context","Error"],"sources":["../../../src/providers/DownloadProvider/DownloadProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport React, { createContext, useCallback, useContext } from 'react';\n\nimport { useTarballDownload } from '../../api/use-data-mutation';\nimport { downloadFile, extractFileName } from '../../utils/url';\n\nexport interface DownloadContextProps {\n downloadTarball: (args: { link: string }) => Promise<void>;\n isDownloading: boolean;\n}\n\nexport const DownloadContext = createContext<DownloadContextProps | undefined>(undefined);\n\nexport const DownloadProvider: React.FC<{ children: ReactNode }> = ({ children }) => {\n const { download, isDownloading } = useTarballDownload();\n\n const downloadTarball = useCallback(\n async ({ link }: { link: string }) => {\n try {\n const fileStream = await download({ link });\n if (!fileStream) return;\n\n const fileName = extractFileName(link);\n downloadFile(fileStream, fileName);\n } catch (error) {\n console.error('Error during tarball download:', error);\n }\n },\n [download]\n );\n\n return (\n <DownloadContext.Provider value={{ downloadTarball, isDownloading }}>\n {children}\n </DownloadContext.Provider>\n );\n};\n\nexport const useDownload = () => {\n const context = useContext(DownloadContext);\n if (!context) {\n throw new Error('useDownload must be used within a DownloadProvider');\n }\n return context;\n};\n"],"mappings":";;;;;;;AAWA,IAAac,mBAAAA,GAAAA,MAAAA,eAAkEC,KAAAA,EAAU;AAEzF,IAAaC,oBAAuD,EAAEE,eAAe;CACnF,MAAM,EAAEC,UAAUN,kBAAkBR,0BAAAA,oBAAoB;CAExD,MAAMI,mBAAAA,GAAAA,MAAAA,aACJ,OAAO,EAAEE,WAA6B;AACpC,MAAI;GACF,MAAMS,aAAa,MAAMD,SAAS,EAAER,MAAM,CAAC;AAC3C,OAAI,CAACS,WAAY;AAGjBd,eAAAA,aAAac,YADIb,YAAAA,gBAAgBI,KAAK,CACJ;WAC3BW,OAAO;AACdC,WAAQD,MAAM,kCAAkCA,MAAM;;IAG1D,CAACH,SACH,CAAC;AAED,QACE,iBAAA,GAAA,kBAAA,KAAC,gBAAgB,UAAjB;EAA0B,OAAO;GAAEV;GAAiBI;GAAe;EAChEK;EACwB,CAAA;;AAI/B,IAAaM,oBAAoB;CAC/B,MAAMC,WAAAA,GAAAA,MAAAA,YAAqBX,gBAAgB;AAC3C,KAAI,CAACW,QACH,OAAM,IAAIC,MAAM,qDAAqD;AAEvE,QAAOD"}
@@ -0,0 +1,34 @@
1
+ import { downloadFile, extractFileName } from "../../utils/url.mjs";
2
+ import { useTarballDownload } from "../../api/use-data-mutation.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { createContext, useCallback, useContext } from "react";
5
+ //#region src/providers/DownloadProvider/DownloadProvider.tsx
6
+ var DownloadContext = createContext(void 0);
7
+ var DownloadProvider = ({ children }) => {
8
+ const { download, isDownloading } = useTarballDownload();
9
+ const downloadTarball = useCallback(async ({ link }) => {
10
+ try {
11
+ const fileStream = await download({ link });
12
+ if (!fileStream) return;
13
+ downloadFile(fileStream, extractFileName(link));
14
+ } catch (error) {
15
+ console.error("Error during tarball download:", error);
16
+ }
17
+ }, [download]);
18
+ return /* @__PURE__ */ jsx(DownloadContext.Provider, {
19
+ value: {
20
+ downloadTarball,
21
+ isDownloading
22
+ },
23
+ children
24
+ });
25
+ };
26
+ var useDownload = () => {
27
+ const context = useContext(DownloadContext);
28
+ if (!context) throw new Error("useDownload must be used within a DownloadProvider");
29
+ return context;
30
+ };
31
+ //#endregion
32
+ export { DownloadProvider, useDownload };
33
+
34
+ //# sourceMappingURL=DownloadProvider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DownloadProvider.mjs","names":["ReactNode","React","createContext","useCallback","useContext","useTarballDownload","downloadFile","extractFileName","DownloadContextProps","downloadTarball","args","link","Promise","isDownloading","DownloadContext","undefined","DownloadProvider","FC","children","download","fileStream","fileName","error","console","useDownload","context","Error"],"sources":["../../../src/providers/DownloadProvider/DownloadProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport React, { createContext, useCallback, useContext } from 'react';\n\nimport { useTarballDownload } from '../../api/use-data-mutation';\nimport { downloadFile, extractFileName } from '../../utils/url';\n\nexport interface DownloadContextProps {\n downloadTarball: (args: { link: string }) => Promise<void>;\n isDownloading: boolean;\n}\n\nexport const DownloadContext = createContext<DownloadContextProps | undefined>(undefined);\n\nexport const DownloadProvider: React.FC<{ children: ReactNode }> = ({ children }) => {\n const { download, isDownloading } = useTarballDownload();\n\n const downloadTarball = useCallback(\n async ({ link }: { link: string }) => {\n try {\n const fileStream = await download({ link });\n if (!fileStream) return;\n\n const fileName = extractFileName(link);\n downloadFile(fileStream, fileName);\n } catch (error) {\n console.error('Error during tarball download:', error);\n }\n },\n [download]\n );\n\n return (\n <DownloadContext.Provider value={{ downloadTarball, isDownloading }}>\n {children}\n </DownloadContext.Provider>\n );\n};\n\nexport const useDownload = () => {\n const context = useContext(DownloadContext);\n if (!context) {\n throw new Error('useDownload must be used within a DownloadProvider');\n }\n return context;\n};\n"],"mappings":";;;;;AAWA,IAAac,kBAAkBZ,cAAgDa,KAAAA,EAAU;AAEzF,IAAaC,oBAAuD,EAAEE,eAAe;CACnF,MAAM,EAAEC,UAAUN,kBAAkBR,oBAAoB;CAExD,MAAMI,kBAAkBN,YACtB,OAAO,EAAEQ,WAA6B;AACpC,MAAI;GACF,MAAMS,aAAa,MAAMD,SAAS,EAAER,MAAM,CAAC;AAC3C,OAAI,CAACS,WAAY;AAGjBd,gBAAac,YADIb,gBAAgBI,KAAK,CACJ;WAC3BW,OAAO;AACdC,WAAQD,MAAM,kCAAkCA,MAAM;;IAG1D,CAACH,SACH,CAAC;AAED,QACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;GAAEV;GAAiBI;GAAe;EAChEK;EACwB,CAAA;;AAI/B,IAAaM,oBAAoB;CAC/B,MAAMC,UAAUrB,WAAWU,gBAAgB;AAC3C,KAAI,CAACW,QACH,OAAM,IAAIC,MAAM,qDAAqD;AAEvE,QAAOD"}
@@ -1,19 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DownloadProvider", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DownloadProvider.DownloadProvider;
10
- }
11
- });
12
- Object.defineProperty(exports, "useDownload", {
13
- enumerable: true,
14
- get: function get() {
15
- return _DownloadProvider.useDownload;
16
- }
17
- });
18
- var _DownloadProvider = require("./DownloadProvider");
19
- //# sourceMappingURL=index.js.map
1
+ require("./DownloadProvider.js");
@@ -0,0 +1 @@
1
+ import "./DownloadProvider.mjs";
@@ -1,33 +1,28 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.useManifests = exports["default"] = exports.ManifestsContext = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _useData = require("../../api/use-data");
10
- var _configuration = require("../../configuration");
11
- var _routes = require("../../store/routes");
12
- var _utils = require("../../store/utils");
13
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
- var ManifestsContext = exports.ManifestsContext = /*#__PURE__*/(0, _react.createContext)({});
15
- var configuration = (0, _configuration.getConfiguration)();
16
- var ManifestsProvider = function ManifestsProvider(_ref) {
17
- var _ref2, _data$error;
18
- var children = _ref.children;
19
- var basePath = (0, _utils.stripTrailingSlash)(configuration.base);
20
- var data = (0, _useData.useData)(basePath, _routes.APIRoute.PACKAGES);
21
- return /*#__PURE__*/_react["default"].createElement(ManifestsContext.Provider, {
22
- value: {
23
- manifests: (_ref2 = data.data) !== null && _ref2 !== void 0 ? _ref2 : [],
24
- isLoading: data.isLoading,
25
- isError: typeof ((_data$error = data.error) === null || _data$error === void 0 ? void 0 : _data$error.code) !== 'undefined'
26
- }
27
- }, children);
28
- };
29
- var _default = exports["default"] = ManifestsProvider;
30
- var useManifests = exports.useManifests = function useManifests() {
31
- return (0, _react.useContext)(ManifestsContext);
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
2
+ const require_use_data = require("../../api/use-data.js");
3
+ const require_configuration = require("../../configuration.js");
4
+ const require_routes = require("../../store/routes.js");
5
+ const require_utils = require("../../store/utils.js");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let react = require("react");
8
+ react = require_runtime.__toESM(react);
9
+ //#region src/providers/ManifestsProvider/ManifestsProvider.tsx
10
+ var ManifestsContext = (0, react.createContext)({});
11
+ var configuration = require_configuration.getConfiguration();
12
+ var ManifestsProvider = ({ children }) => {
13
+ const data = require_use_data.useData(require_utils.stripTrailingSlash(configuration.base), require_routes.APIRoute.PACKAGES);
14
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ManifestsContext.Provider, {
15
+ value: {
16
+ manifests: data.data ?? [],
17
+ isLoading: data.isLoading,
18
+ isError: typeof data.error?.code !== "undefined"
19
+ },
20
+ children
21
+ });
32
22
  };
23
+ var useManifests = () => (0, react.useContext)(ManifestsContext);
24
+ //#endregion
25
+ exports.default = ManifestsProvider;
26
+ exports.useManifests = useManifests;
27
+
33
28
  //# sourceMappingURL=ManifestsProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ManifestsProvider.js","names":["_react","_interopRequireWildcard","require","_useData","_configuration","_routes","_utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ManifestsContext","exports","createContext","configuration","getConfiguration","ManifestsProvider","_ref","_ref2","_data$error","children","basePath","stripTrailingSlash","base","data","useData","APIRoute","PACKAGES","createElement","Provider","value","manifests","isLoading","isError","error","code","_default","useManifests","useContext"],"sources":["../../../src/providers/ManifestsProvider/ManifestsProvider.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React, { createContext, useContext } from 'react';\n\nimport type { Manifest } from '@verdaccio/types';\n\nimport { useData } from '../../api/use-data';\nimport { getConfiguration } from '../../configuration';\nimport { APIRoute } from '../../store/routes';\nimport { stripTrailingSlash } from '../../store/utils';\n\nexport interface ManifestsContextProps {\n isError: boolean;\n isLoading: boolean;\n manifests: ManifestWeb[];\n}\n\nexport interface Author {\n name?: string;\n email?: string;\n url?: string;\n avatar?: string;\n}\n\nexport interface ManifestWeb extends Omit<Manifest, 'time' | 'author'> {\n time: string;\n author: Author;\n version: string;\n dist: any;\n}\n\nexport const ManifestsContext = createContext<Partial<ManifestsContextProps>>({});\n\nconst configuration = getConfiguration();\n\nconst ManifestsProvider: React.FC<{ children: ReactElement }> = ({ children }) => {\n const basePath = stripTrailingSlash(configuration.base);\n\n const data = useData<ManifestWeb[]>(basePath, APIRoute.PACKAGES);\n\n return (\n <ManifestsContext.Provider\n value={{\n manifests: (data.data as ManifestWeb[]) ?? [],\n isLoading: data.isLoading,\n isError: typeof data.error?.code !== 'undefined',\n }}\n >\n {children}\n </ManifestsContext.Provider>\n );\n};\n\nexport default ManifestsProvider;\n\nexport const useManifests = () => useContext(ManifestsContext);\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAuD,SAAAD,wBAAAM,CAAA,EAAAC,CAA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,GAAG,IAAAC,yBAAkB,EAACR,aAAa,CAACS,IAAI,CAAC;EAEvD,IAAMC,IAAI,GAAG,IAAAC,gBAAO,EAAgBJ,QAAQ,EAAEK,gBAAQ,CAACC,QAAQ,CAAC;EAEhE,oBACE3C,MAAA,YAAA4C,aAAA,CAACjB,gBAAgB,CAACkB,QAAQ;IACxBC,KAAK,EAAE;MACLC,SAAS,GAAAb,KAAA,GAAGM,IAAI,CAACA,IAAI,cAAAN,KAAA,cAAAA,KAAA,GAAsB,EAAE;MAC7Cc,SAAS,EAAER,IAAI,CAACQ,SAAS;MACzBC,OAAO,EAAE,SAAAd,WAAA,GAAOK,IAAI,CAACU,KAAK,cAAAf,WAAA,uBAAVA,WAAA,CAAYgB,IAAI,MAAK;IACvC;EAAE,GAEDf,QACwB,CAAC;AAEhC,CAAC;AAAC,IAAAgB,QAAA,GAAAxB,OAAA,cAEaI,iBAAiB;AAEzB,IAAMqB,YAAY,GAAAzB,OAAA,CAAAyB,YAAA,GAAG,SAAfA,YAAYA,CAAA;EAAA,OAAS,IAAAC,iBAAU,EAAC3B,gBAAgB,CAAC;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ManifestsProvider.js","names":["ReactElement","React","createContext","useContext","Manifest","useData","getConfiguration","APIRoute","stripTrailingSlash","ManifestsContextProps","isError","isLoading","manifests","ManifestWeb","Author","name","email","url","avatar","Omit","time","author","version","dist","ManifestsContext","Partial","configuration","ManifestsProvider","FC","children","basePath","base","data","PACKAGES","error","code","useManifests"],"sources":["../../../src/providers/ManifestsProvider/ManifestsProvider.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React, { createContext, useContext } from 'react';\n\nimport type { Manifest } from '@verdaccio/types';\n\nimport { useData } from '../../api/use-data';\nimport { getConfiguration } from '../../configuration';\nimport { APIRoute } from '../../store/routes';\nimport { stripTrailingSlash } from '../../store/utils';\n\nexport interface ManifestsContextProps {\n isError: boolean;\n isLoading: boolean;\n manifests: ManifestWeb[];\n}\n\nexport interface Author {\n name?: string;\n email?: string;\n url?: string;\n avatar?: string;\n}\n\nexport interface ManifestWeb extends Omit<Manifest, 'time' | 'author'> {\n time: string;\n author: Author;\n version: string;\n dist: any;\n}\n\nexport const ManifestsContext = createContext<Partial<ManifestsContextProps>>({});\n\nconst configuration = getConfiguration();\n\nconst ManifestsProvider: React.FC<{ children: ReactElement }> = ({ children }) => {\n const basePath = stripTrailingSlash(configuration.base);\n\n const data = useData<ManifestWeb[]>(basePath, APIRoute.PACKAGES);\n\n return (\n <ManifestsContext.Provider\n value={{\n manifests: (data.data as ManifestWeb[]) ?? [],\n isLoading: data.isLoading,\n isError: typeof data.error?.code !== 'undefined',\n }}\n >\n {children}\n </ManifestsContext.Provider>\n );\n};\n\nexport default ManifestsProvider;\n\nexport const useManifests = () => useContext(ManifestsContext);\n"],"mappings":";;;;;;;;;AA8BA,IAAawB,oBAAAA,GAAAA,MAAAA,eAAiE,EAAE,CAAC;AAEjF,IAAME,gBAAgBpB,sBAAAA,kBAAkB;AAExC,IAAMqB,qBAA2D,EAAEE,eAAe;CAGhF,MAAMG,OAAO3B,iBAAAA,QAFIG,cAAAA,mBAAmBkB,cAAcK,KAAK,EAETxB,eAAAA,SAAS0B,SAAS;AAEhE,QACE,iBAAA,GAAA,kBAAA,KAAC,iBAAiB,UAAlB;EACE,OAAO;GACLrB,WAAYoB,KAAKA,QAA0B,EAAE;GAC7CrB,WAAWqB,KAAKrB;GAChBD,SAAS,OAAOsB,KAAKE,OAAOC,SAAS;GACtC;EAEAN;EACyB,CAAA;;AAMhC,IAAaO,sBAAAA,GAAAA,MAAAA,YAAgCZ,iBAAiB"}
@@ -0,0 +1,25 @@
1
+ import { useData } from "../../api/use-data.mjs";
2
+ import { getConfiguration } from "../../configuration.mjs";
3
+ import { APIRoute } from "../../store/routes.mjs";
4
+ import { stripTrailingSlash } from "../../store/utils.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { createContext, useContext } from "react";
7
+ //#region src/providers/ManifestsProvider/ManifestsProvider.tsx
8
+ var ManifestsContext = createContext({});
9
+ var configuration = getConfiguration();
10
+ var ManifestsProvider = ({ children }) => {
11
+ const data = useData(stripTrailingSlash(configuration.base), APIRoute.PACKAGES);
12
+ return /* @__PURE__ */ jsx(ManifestsContext.Provider, {
13
+ value: {
14
+ manifests: data.data ?? [],
15
+ isLoading: data.isLoading,
16
+ isError: typeof data.error?.code !== "undefined"
17
+ },
18
+ children
19
+ });
20
+ };
21
+ var useManifests = () => useContext(ManifestsContext);
22
+ //#endregion
23
+ export { ManifestsProvider as default, useManifests };
24
+
25
+ //# sourceMappingURL=ManifestsProvider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManifestsProvider.mjs","names":["ReactElement","React","createContext","useContext","Manifest","useData","getConfiguration","APIRoute","stripTrailingSlash","ManifestsContextProps","isError","isLoading","manifests","ManifestWeb","Author","name","email","url","avatar","Omit","time","author","version","dist","ManifestsContext","Partial","configuration","ManifestsProvider","FC","children","basePath","base","data","PACKAGES","error","code","useManifests"],"sources":["../../../src/providers/ManifestsProvider/ManifestsProvider.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React, { createContext, useContext } from 'react';\n\nimport type { Manifest } from '@verdaccio/types';\n\nimport { useData } from '../../api/use-data';\nimport { getConfiguration } from '../../configuration';\nimport { APIRoute } from '../../store/routes';\nimport { stripTrailingSlash } from '../../store/utils';\n\nexport interface ManifestsContextProps {\n isError: boolean;\n isLoading: boolean;\n manifests: ManifestWeb[];\n}\n\nexport interface Author {\n name?: string;\n email?: string;\n url?: string;\n avatar?: string;\n}\n\nexport interface ManifestWeb extends Omit<Manifest, 'time' | 'author'> {\n time: string;\n author: Author;\n version: string;\n dist: any;\n}\n\nexport const ManifestsContext = createContext<Partial<ManifestsContextProps>>({});\n\nconst configuration = getConfiguration();\n\nconst ManifestsProvider: React.FC<{ children: ReactElement }> = ({ children }) => {\n const basePath = stripTrailingSlash(configuration.base);\n\n const data = useData<ManifestWeb[]>(basePath, APIRoute.PACKAGES);\n\n return (\n <ManifestsContext.Provider\n value={{\n manifests: (data.data as ManifestWeb[]) ?? [],\n isLoading: data.isLoading,\n isError: typeof data.error?.code !== 'undefined',\n }}\n >\n {children}\n </ManifestsContext.Provider>\n );\n};\n\nexport default ManifestsProvider;\n\nexport const useManifests = () => useContext(ManifestsContext);\n"],"mappings":";;;;;;;AA8BA,IAAawB,mBAAmBtB,cAA8C,EAAE,CAAC;AAEjF,IAAMwB,gBAAgBpB,kBAAkB;AAExC,IAAMqB,qBAA2D,EAAEE,eAAe;CAGhF,MAAMG,OAAO3B,QAFIG,mBAAmBkB,cAAcK,KAAK,EAETxB,SAAS0B,SAAS;AAEhE,QACE,oBAAC,iBAAiB,UAAlB;EACE,OAAO;GACLrB,WAAYoB,KAAKA,QAA0B,EAAE;GAC7CrB,WAAWqB,KAAKrB;GAChBD,SAAS,OAAOsB,KAAKE,OAAOC,SAAS;GACtC;EAEAN;EACyB,CAAA;;AAMhC,IAAaO,qBAAqBjC,WAAWqB,iBAAiB"}
@@ -1,21 +1 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "ManifestsProvider", {
8
- enumerable: true,
9
- get: function get() {
10
- return _ManifestsProvider["default"];
11
- }
12
- });
13
- Object.defineProperty(exports, "useManifests", {
14
- enumerable: true,
15
- get: function get() {
16
- return _ManifestsProvider.useManifests;
17
- }
18
- });
19
- var _ManifestsProvider = _interopRequireWildcard(require("./ManifestsProvider"));
20
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
21
- //# sourceMappingURL=index.js.map
1
+ require("./ManifestsProvider.js");
@@ -0,0 +1 @@
1
+ import "./ManifestsProvider.mjs";
@@ -1,52 +1,33 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
2
+ const require_useLocalStorage = require("../../hooks/useLocalStorage.js");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+ let react = require("react");
5
+ react = require_runtime.__toESM(react);
6
+ //#region src/providers/PersistenceSettingProvider/PersistenceSettingProvider.tsx
7
+ var PersistenceSettingContext = (0, react.createContext)({
8
+ isLatest: false,
9
+ isGlobal: false,
10
+ yarnModern: false
6
11
  });
7
- exports.useSettings = exports.PersistenceSettingProvider = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _useLocalStorage3 = _interopRequireDefault(require("../../hooks/useLocalStorage"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
13
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
16
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
18
- var defaultValues = {
19
- isLatest: false,
20
- isGlobal: false,
21
- yarnModern: false
22
- };
23
- var PersistenceSettingContext = /*#__PURE__*/(0, _react.createContext)(defaultValues);
24
- var PersistenceSettingProvider = exports.PersistenceSettingProvider = function PersistenceSettingProvider(_ref) {
25
- var children = _ref.children;
26
- // get the initial state from the local storage
27
- var _useLocalStorage = (0, _useLocalStorage3["default"])("settings-ui-verdaccio", {}),
28
- _useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
29
- settings = _useLocalStorage2[0],
30
- setSettings = _useLocalStorage2[1];
31
- var _useState = (0, _react.useState)(settings ? settings : {}),
32
- _useState2 = _slicedToArray(_useState, 2),
33
- localSettings = _useState2[0],
34
- setLocalSettings = _useState2[1];
35
- var updateSettings = (0, _react.useCallback)(function (newSettings) {
36
- setLocalSettings(newSettings);
37
- setSettings(newSettings);
38
- }, [setSettings]);
39
- var value = (0, _react.useMemo)(function () {
40
- return {
41
- localSettings: localSettings ? localSettings : {},
42
- updateSettings: updateSettings
43
- };
44
- }, [localSettings, updateSettings]);
45
- return /*#__PURE__*/_react["default"].createElement(PersistenceSettingContext.Provider, {
46
- value: value
47
- }, children);
48
- };
49
- var useSettings = exports.useSettings = function useSettings() {
50
- return (0, _react.useContext)(PersistenceSettingContext);
12
+ var PersistenceSettingProvider = ({ children }) => {
13
+ const [settings, setSettings] = require_useLocalStorage.default(`settings-ui-verdaccio`, {});
14
+ const [localSettings, setLocalSettings] = (0, react.useState)(settings ? settings : {});
15
+ const updateSettings = (0, react.useCallback)((newSettings) => {
16
+ setLocalSettings(newSettings);
17
+ setSettings(newSettings);
18
+ }, [setSettings]);
19
+ const value = (0, react.useMemo)(() => ({
20
+ localSettings: localSettings ? localSettings : {},
21
+ updateSettings
22
+ }), [localSettings, updateSettings]);
23
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PersistenceSettingContext.Provider, {
24
+ value,
25
+ children
26
+ });
51
27
  };
28
+ var useSettings = () => (0, react.useContext)(PersistenceSettingContext);
29
+ //#endregion
30
+ exports.PersistenceSettingProvider = PersistenceSettingProvider;
31
+ exports.useSettings = useSettings;
32
+
52
33
  //# sourceMappingURL=PersistenceSettingProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PersistenceSettingProvider.js","names":["_react","_interopRequireWildcard","require","_useLocalStorage3","_interopRequireDefault","e","__esModule","t","WeakMap","r","n","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","isArray","defaultValues","isLatest","isGlobal","yarnModern","PersistenceSettingContext","createContext","PersistenceSettingProvider","exports","_ref","children","_useLocalStorage","useLocalStorage","_useLocalStorage2","settings","setSettings","_useState","useState","_useState2","localSettings","setLocalSettings","updateSettings","useCallback","newSettings","useMemo","createElement","Provider","useSettings","useContext"],"sources":["../../../src/providers/PersistenceSettingProvider/PersistenceSettingProvider.tsx"],"sourcesContent":["import type { FunctionComponent } from 'react';\nimport React, { createContext, useCallback, useContext, useMemo, useState } from 'react';\n\nimport useLocalStorage from '../../hooks/useLocalStorage';\n\ntype PersistenceSettingsProps = {\n isLatest?: boolean;\n isGlobal?: boolean;\n yarnModern: boolean;\n};\n\nconst defaultValues: PersistenceSettingsProps = {\n isLatest: false,\n isGlobal: false,\n yarnModern: false,\n};\n\nconst PersistenceSettingContext = createContext<any>(defaultValues);\n\nconst PersistenceSettingProvider: FunctionComponent<{ children: React.ReactElement<any> }> = ({\n children,\n}) => {\n // get the initial state from the local storage\n const [settings, setSettings] = useLocalStorage(`settings-ui-verdaccio`, {});\n\n const [localSettings, setLocalSettings] = useState<PersistenceSettingsProps>(\n settings ? settings : {}\n );\n\n const updateSettings = useCallback(\n (newSettings: React.SetStateAction<PersistenceSettingsProps>) => {\n setLocalSettings(newSettings);\n setSettings(newSettings);\n },\n [setSettings]\n );\n\n const value = useMemo(\n () => ({\n localSettings: localSettings ? localSettings : {},\n updateSettings,\n }),\n [localSettings, updateSettings]\n );\n\n return (\n <PersistenceSettingContext.Provider value={value}>\n {children}\n </PersistenceSettingContext.Provider>\n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,aAAa,GAAAD,UAAA;IAAEE,gBAAgB,GAAAF,UAAA;EAItC,IAAMG,cAAc,GAAG,IAAAC,kBAAW,EAChC,UAACC,WAA2D,EAAK;IAC/DH,gBAAgB,CAACG,WAAW,CAAC;IAC7BR,WAAW,CAACQ,WAAW,CAAC;EAC1B,CAAC,EACD,CAACR,WAAW,CACd,CAAC;EAED,IAAMhB,KAAK,GAAG,IAAAyB,cAAO,EACnB;IAAA,OAAO;MACLL,aAAa,EAAEA,aAAa,GAAGA,aAAa,GAAG,CAAC,CAAC;MACjDE,cAAc,EAAdA;IACF,CAAC;EAAA,CAAC,EACF,CAACF,aAAa,EAAEE,cAAc,CAChC,CAAC;EAED,oBACEtE,MAAA,YAAA0E,aAAA,CAACpB,yBAAyB,CAACqB,QAAQ;IAAC3B,KAAK,EAAEA;EAAM,GAC9CW,QACiC,CAAC;AAEzC,CAAC;AAIM,IAAMiB,WAAW,GAAAnB,OAAA,CAAAmB,WAAA,GAAG,SAAdA,WAAWA,CAAA;EAAA,OAAS,IAAAC,iBAAU,EAACvB,yBAAyB,CAAC;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"PersistenceSettingProvider.js","names":["FunctionComponent","React","createContext","useCallback","useContext","useMemo","useState","useLocalStorage","PersistenceSettingsProps","isLatest","isGlobal","yarnModern","defaultValues","PersistenceSettingContext","PersistenceSettingProvider","children","ReactElement","settings","setSettings","localSettings","setLocalSettings","updateSettings","newSettings","SetStateAction","value","useSettings"],"sources":["../../../src/providers/PersistenceSettingProvider/PersistenceSettingProvider.tsx"],"sourcesContent":["import type { FunctionComponent } from 'react';\nimport React, { createContext, useCallback, useContext, useMemo, useState } from 'react';\n\nimport useLocalStorage from '../../hooks/useLocalStorage';\n\ntype PersistenceSettingsProps = {\n isLatest?: boolean;\n isGlobal?: boolean;\n yarnModern: boolean;\n};\n\nconst defaultValues: PersistenceSettingsProps = {\n isLatest: false,\n isGlobal: false,\n yarnModern: false,\n};\n\nconst PersistenceSettingContext = createContext<any>(defaultValues);\n\nconst PersistenceSettingProvider: FunctionComponent<{ children: React.ReactElement<any> }> = ({\n children,\n}) => {\n // get the initial state from the local storage\n const [settings, setSettings] = useLocalStorage(`settings-ui-verdaccio`, {});\n\n const [localSettings, setLocalSettings] = useState<PersistenceSettingsProps>(\n settings ? settings : {}\n );\n\n const updateSettings = useCallback(\n (newSettings: React.SetStateAction<PersistenceSettingsProps>) => {\n setLocalSettings(newSettings);\n setSettings(newSettings);\n },\n [setSettings]\n );\n\n const value = useMemo(\n () => ({\n localSettings: localSettings ? localSettings : {},\n updateSettings,\n }),\n [localSettings, updateSettings]\n );\n\n return (\n <PersistenceSettingContext.Provider value={value}>\n {children}\n </PersistenceSettingContext.Provider>\n );\n};\n\nexport { PersistenceSettingProvider };\n\nexport const useSettings = () => useContext(PersistenceSettingContext);\n"],"mappings":";;;;;;AAiBA,IAAMa,6BAAAA,GAAAA,MAAAA,eAN0C;CAC9CJ,UAAU;CACVC,UAAU;CACVC,YAAY;CACb,CAEkE;AAEnE,IAAMG,8BAAwF,EAC5FC,eACI;CAEJ,MAAM,CAACE,UAAUC,eAAeX,wBAAAA,QAAgB,yBAAyB,EAAE,CAAC;CAE5E,MAAM,CAACY,eAAeC,qBAAAA,GAAAA,MAAAA,UACpBH,WAAWA,WAAW,EACxB,CAAC;CAED,MAAMI,kBAAAA,GAAAA,MAAAA,cACHC,gBAAgE;AAC/DF,mBAAiBE,YAAY;AAC7BJ,cAAYI,YAAY;IAE1B,CAACJ,YACH,CAAC;CAED,MAAMM,SAAAA,GAAAA,MAAAA,gBACG;EACLL,eAAeA,gBAAgBA,gBAAgB,EAAE;EACjDE;EACD,GACD,CAACF,eAAeE,eAClB,CAAC;AAED,QACE,iBAAA,GAAA,kBAAA,KAAC,0BAA0B,UAA3B;EAA2CG;EACxCT;EACkC,CAAA;;AAMzC,IAAaU,qBAAAA,GAAAA,MAAAA,YAA+BZ,0BAA0B"}