@verdaccio/ui-components 2.0.0-6-next.8 → 2.0.0-6-next.10

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 (305) hide show
  1. package/.babelrc +1 -9
  2. package/CHANGELOG.md +12 -0
  3. package/build/Theme/ResetStyles.js +34 -37
  4. package/build/Theme/StyleBaseline.js +4 -6
  5. package/build/Theme/ThemeProvider.js +24 -34
  6. package/build/Theme/colors.js +1 -1
  7. package/build/Theme/index.js +9 -10
  8. package/build/Theme/theme.js +26 -28
  9. package/build/__mocks__/react-markdown.js +6 -5
  10. package/build/__mocks__/remark-plugin.js +1 -1
  11. package/build/components/ActionBar/ActionBar.js +23 -36
  12. package/build/components/ActionBar/ActionBarAction.js +45 -58
  13. package/build/components/ActionBar/index.js +3 -3
  14. package/build/components/Author/Author.js +26 -21
  15. package/build/components/Author/index.js +3 -3
  16. package/build/components/Author/styles.js +5 -5
  17. package/build/components/CopyClipboard/CopyToClipBoard.js +21 -23
  18. package/build/components/CopyClipboard/index.js +4 -4
  19. package/build/components/CopyClipboard/utils.js +14 -16
  20. package/build/components/Dependencies/Dependencies.js +68 -66
  21. package/build/components/Dependencies/index.js +3 -3
  22. package/build/components/Dependencies/styles.js +9 -11
  23. package/build/components/Deprecated/Deprecated.js +12 -15
  24. package/build/components/Deprecated/index.js +3 -3
  25. package/build/components/Developers/Developers.js +30 -45
  26. package/build/components/Developers/Title.js +22 -21
  27. package/build/components/Developers/get-unique-developer-values.js +3 -13
  28. package/build/components/Developers/index.js +5 -6
  29. package/build/components/Developers/styles.js +7 -7
  30. package/build/components/Distribution/Dist.js +28 -23
  31. package/build/components/Distribution/index.js +3 -3
  32. package/build/components/Distribution/styles.js +7 -7
  33. package/build/components/Distribution/utils.js +0 -1
  34. package/build/components/Distribution/utilts.spec.js +18 -0
  35. package/build/components/Engines/Engines.js +46 -36
  36. package/build/components/Engines/index.js +3 -3
  37. package/build/components/Engines/styles.js +4 -4
  38. package/build/components/ErrorBoundary/ErrorBoundary.js +29 -50
  39. package/build/components/ErrorBoundary/index.js +3 -3
  40. package/build/components/FundButton/FundButton.js +28 -29
  41. package/build/components/FundButton/index.js +3 -3
  42. package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +33 -44
  43. package/build/components/HeaderInfoDialog/index.js +3 -3
  44. package/build/components/Heading/Heading.js +10 -14
  45. package/build/components/Heading/index.js +3 -3
  46. package/build/components/Help/Help.js +22 -21
  47. package/build/components/Help/index.js +3 -3
  48. package/build/components/Help/styles.js +2 -2
  49. package/build/components/Icons/DevsIcons/CommonJS.js +9 -10
  50. package/build/components/Icons/DevsIcons/ES6Module.js +9 -10
  51. package/build/components/Icons/DevsIcons/Git.js +9 -10
  52. package/build/components/Icons/DevsIcons/NodeJS.js +9 -10
  53. package/build/components/Icons/DevsIcons/TypeScript.js +9 -10
  54. package/build/components/Icons/DevsIcons/index.js +5 -5
  55. package/build/components/Icons/Earth.js +11 -11
  56. package/build/components/Icons/FileBinary.js +4 -4
  57. package/build/components/Icons/Law.js +4 -4
  58. package/build/components/Icons/License.js +5 -5
  59. package/build/components/Icons/License.js.map +1 -1
  60. package/build/components/Icons/Managers/Npm.js +9 -10
  61. package/build/components/Icons/Managers/Pnpm.js +9 -10
  62. package/build/components/Icons/Managers/Yarn.js +9 -10
  63. package/build/components/Icons/Managers/index.js +3 -3
  64. package/build/components/Icons/SvgIcon.js +14 -22
  65. package/build/components/Icons/Time.js +6 -6
  66. package/build/components/Icons/Version.js +4 -4
  67. package/build/components/Icons/index.js +8 -8
  68. package/build/components/Install/Install.js +40 -26
  69. package/build/components/Install/InstallListItem.js +49 -40
  70. package/build/components/Install/index.js +3 -3
  71. package/build/components/Label/Label.js +13 -18
  72. package/build/components/Label/index.js +3 -3
  73. package/build/components/Link/Link.js +16 -15
  74. package/build/components/Link/index.js +3 -3
  75. package/build/components/Loading/Loading.js +10 -12
  76. package/build/components/Loading/Spinner/Spinner.js +27 -37
  77. package/build/components/Loading/Spinner/index.js +3 -3
  78. package/build/components/Loading/index.js +3 -3
  79. package/build/components/Loading/styles.js +11 -12
  80. package/build/components/LoginDialog/LoginDialog.js +44 -83
  81. package/build/components/LoginDialog/LoginDialogCloseButton.js +20 -19
  82. package/build/components/LoginDialog/LoginDialogForm.js +41 -40
  83. package/build/components/LoginDialog/LoginDialogFormError.js +26 -28
  84. package/build/components/LoginDialog/LoginDialogHeader.js +29 -29
  85. package/build/components/LoginDialog/index.js +3 -3
  86. package/build/components/Logo/Logo.js +35 -36
  87. package/build/components/Logo/index.js +3 -3
  88. package/build/components/MenuItem/MenuItem.js +8 -9
  89. package/build/components/MenuItem/index.js +3 -3
  90. package/build/components/NoItems/NoItems.js +10 -21
  91. package/build/components/NoItems/index.js +3 -3
  92. package/build/components/NotFound/NotFound.js +25 -26
  93. package/build/components/NotFound/index.js +3 -3
  94. package/build/components/Package/Package.js +112 -152
  95. package/build/components/Package/Tag/Tag.js +6 -7
  96. package/build/components/Package/Tag/index.js +3 -3
  97. package/build/components/Package/Tag/styles.js +2 -2
  98. package/build/components/Package/index.js +5 -6
  99. package/build/components/Package/styles.js +65 -70
  100. package/build/components/PackageList/PackageList.js +56 -52
  101. package/build/components/PackageList/index.js +3 -3
  102. package/build/components/RawViewer/RawViewer.js +23 -22
  103. package/build/components/RawViewer/index.js +3 -3
  104. package/build/components/Readme/Readme.js +21 -21
  105. package/build/components/Readme/Readme.js.map +1 -1
  106. package/build/components/Readme/Readme.spec.js +6 -6
  107. package/build/components/Readme/Readme.spec.js.map +1 -1
  108. package/build/components/Readme/index.js +3 -3
  109. package/build/components/Readme/utils.js +7 -8
  110. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +14 -14
  111. package/build/components/RegistryInfoDialog/index.js +3 -3
  112. package/build/components/RegistryInfoDialog/styles.js +17 -19
  113. package/build/components/Repository/Repository.js +37 -36
  114. package/build/components/Repository/index.js +3 -3
  115. package/build/components/Search/AutoComplete/AutoComplete.js +26 -35
  116. package/build/components/Search/AutoComplete/index.js +3 -3
  117. package/build/components/Search/AutoComplete/styles.js +15 -16
  118. package/build/components/Search/Search.js +54 -54
  119. package/build/components/Search/SearchItem.js +57 -65
  120. package/build/components/Search/index.js +3 -3
  121. package/build/components/Search/styles.js +16 -17
  122. package/build/components/SettingsMenu/SettingsMenu.js +68 -0
  123. package/build/components/SettingsMenu/index.js +14 -0
  124. package/build/components/SideBarTittle/SideBarTittle.js +33 -31
  125. package/build/components/SideBarTittle/index.js +3 -3
  126. package/build/components/SideBarTittle/utils.js +4 -4
  127. package/build/components/TextField/TextField.js +18 -23
  128. package/build/components/TextField/index.js +3 -3
  129. package/build/components/UpLinks/UpLinks.js +18 -16
  130. package/build/components/UpLinks/index.js +3 -3
  131. package/build/components/UpLinks/styles.js +20 -22
  132. package/build/components/Versions/HistoryList.js +25 -25
  133. package/build/components/Versions/TagList.js +19 -22
  134. package/build/components/Versions/Versions.js +21 -20
  135. package/build/components/Versions/index.js +3 -3
  136. package/build/components/Versions/styles.js +19 -21
  137. package/build/hooks/index.js +5 -5
  138. package/build/hooks/useLocalStorage.js +18 -27
  139. package/build/hooks/useOnClickOutside.js +5 -5
  140. package/build/index.js +104 -97
  141. package/build/layouts/Version/Version.js +8 -8
  142. package/build/layouts/Version/index.js +3 -3
  143. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +18 -31
  144. package/build/providers/AppConfigurationProvider/index.js +5 -6
  145. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +38 -0
  146. package/build/providers/PersistenceSettingProvider/index.js +21 -0
  147. package/build/providers/TranslatorProvider/TranslatorProvider.js +26 -51
  148. package/build/providers/TranslatorProvider/TranslatorProvider.spec.js +54 -0
  149. package/build/providers/TranslatorProvider/index.js +6 -7
  150. package/build/providers/VersionProvider/VersionProvider.js +32 -34
  151. package/build/providers/VersionProvider/index.js +5 -6
  152. package/build/providers/index.js +3 -3
  153. package/build/sections/Detail/ContainerContent.js +24 -35
  154. package/build/sections/Detail/Detail.js +21 -30
  155. package/build/sections/Detail/ReadmeSection.js +7 -6
  156. package/build/sections/Detail/Tabs.js +16 -14
  157. package/build/sections/Detail/index.js +3 -3
  158. package/build/sections/Footer/Footer.js +55 -57
  159. package/build/sections/Footer/index.js +3 -3
  160. package/build/sections/Footer/styles.js +41 -47
  161. package/build/sections/Header/Header.js +36 -70
  162. package/build/sections/Header/HeaderGreetings.js +10 -8
  163. package/build/sections/Header/HeaderLeft.js +11 -12
  164. package/build/sections/Header/HeaderMenu.js +18 -17
  165. package/build/sections/Header/HeaderRight.js +41 -51
  166. package/build/sections/Header/HeaderSettingsDialog.js +48 -57
  167. package/build/sections/Header/HeaderToolTip.js +10 -11
  168. package/build/sections/Header/HeaderToolTipIcon.js +19 -19
  169. package/build/sections/Header/LanguageSwitch.js +51 -56
  170. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +72 -71
  171. package/build/sections/Header/RegistryInfoContent/index.js +3 -3
  172. package/build/sections/Header/RegistryInfoContent/styles.js +13 -16
  173. package/build/sections/Header/RegistryInfoDialog/RegistryInfoDialog.js +14 -14
  174. package/build/sections/Header/RegistryInfoDialog/index.js +3 -3
  175. package/build/sections/Header/RegistryInfoDialog/styles.js +17 -19
  176. package/build/sections/Header/index.js +3 -3
  177. package/build/sections/Header/styles.js +35 -38
  178. package/build/sections/Home/Home.js +11 -14
  179. package/build/sections/Home/index.js +3 -3
  180. package/build/sections/SideBar/Sidebar.js +38 -54
  181. package/build/sections/SideBar/index.js +3 -3
  182. package/build/sections/index.js +5 -5
  183. package/build/src/components/ActionBar/ActionBar.stories.d.ts +11 -6
  184. package/build/src/components/ActionBar/ActionBarAction.d.ts +1 -34
  185. package/build/src/components/Author/styles.d.ts +1 -20
  186. package/build/src/components/Dependencies/Dependencies.stories.d.ts +8 -6
  187. package/build/src/components/Dependencies/styles.d.ts +2 -30
  188. package/build/src/components/Deprecated/Deprecated.d.ts +1 -11
  189. package/build/src/components/Developers/Developers.d.ts +1 -34
  190. package/build/src/components/Developers/styles.d.ts +1 -34
  191. package/build/src/components/Distribution/Dist.stories.d.ts +4 -1
  192. package/build/src/components/Distribution/styles.d.ts +3 -76
  193. package/build/src/components/Distribution/utils.d.ts +2 -1
  194. package/build/src/components/Engines/styles.d.ts +1 -21
  195. package/build/src/components/FundButton/FundButton.stories.d.ts +7 -5
  196. package/build/src/components/Help/styles.d.ts +1 -10
  197. package/build/src/components/Icons/Earth.d.ts +2 -2
  198. package/build/src/components/Icons/FileBinary.d.ts +2 -2
  199. package/build/src/components/Icons/Law.d.ts +2 -2
  200. package/build/src/components/Icons/License.d.ts +2 -2
  201. package/build/src/components/Icons/SvgIcon.d.ts +1 -1
  202. package/build/src/components/Icons/Time.d.ts +2 -2
  203. package/build/src/components/Icons/Version.d.ts +2 -2
  204. package/build/src/components/Install/Install.stories.d.ts +9 -5
  205. package/build/src/components/MenuItem/MenuItem.d.ts +1 -1
  206. package/build/src/components/NoItems/NoItems.d.ts +0 -1
  207. package/build/src/components/Package/styles.d.ts +3 -61
  208. package/build/src/components/RegistryInfoDialog/styles.d.ts +1 -11
  209. package/build/src/components/Repository/Repository.stories.d.ts +8 -6
  210. package/build/src/components/Search/AutoComplete/styles.d.ts +1 -1
  211. package/build/src/components/Search/Search.d.ts +1 -1
  212. package/build/src/components/Search/styles.d.ts +2 -16
  213. package/build/src/components/SettingsMenu/SettingsMenu.d.ts +6 -0
  214. package/build/src/components/SettingsMenu/index.d.ts +1 -0
  215. package/build/src/components/SideBarTittle/SideBarTittle.stories.d.ts +9 -0
  216. package/build/src/components/TextField/TextField.d.ts +1 -1
  217. package/build/src/components/Versions/types.d.ts +0 -2
  218. package/build/src/index.d.ts +1 -0
  219. package/build/src/layouts/Version/Version.stories.d.ts +7 -6
  220. package/build/src/providers/PersistenceSettingProvider/PersistenceSettingProvider.d.ts +6 -0
  221. package/build/src/providers/PersistenceSettingProvider/index.d.ts +1 -0
  222. package/build/src/providers/TranslatorProvider/TranslatorProvider.d.ts +2 -1
  223. package/build/src/providers/TranslatorProvider/TranslatorProvider.spec.d.ts +1 -0
  224. package/build/src/providers/VersionProvider/VersionProvider.d.ts +0 -2
  225. package/build/src/sections/Header/LanguageSwitch.d.ts +3 -23
  226. package/build/src/sections/Header/RegistryInfoDialog/styles.d.ts +1 -11
  227. package/build/src/sections/Header/styles.d.ts +8 -166
  228. package/build/src/types/packageMeta.d.ts +6 -6
  229. package/build/store/api.js +35 -52
  230. package/build/store/index.js +9 -9
  231. package/build/store/models/configuration.js +12 -34
  232. package/build/store/models/download.js +22 -46
  233. package/build/store/models/index.js +1 -1
  234. package/build/store/models/login.js +55 -79
  235. package/build/store/models/manifest.js +52 -78
  236. package/build/store/models/packages.js +22 -51
  237. package/build/store/models/search.js +59 -87
  238. package/build/store/storage.js +5 -5
  239. package/build/store/store.js +3 -3
  240. package/build/test/i18n-config.js +5 -5
  241. package/build/test/test-react-testing-library.js +19 -24
  242. package/build/utils/__partials__/packageMeta.js +1 -1
  243. package/build/utils/cli-utils.js +27 -20
  244. package/build/utils/index.js +10 -11
  245. package/build/utils/loadable.js +9 -12
  246. package/build/utils/routes.js +4 -4
  247. package/build/utils/url.js +9 -9
  248. package/build/utils/utils.js +18 -22
  249. package/package.json +22 -19
  250. package/src/Theme/ThemeProvider.tsx +0 -1
  251. package/src/components/ActionBar/ActionBar.stories.tsx +60 -46
  252. package/src/components/Author/Author.stories.tsx +1 -1
  253. package/src/components/CopyClipboard/CopyToClipBoard.stories.tsx +1 -1
  254. package/src/components/CopyClipboard/CopyToClipBoard.tsx +2 -2
  255. package/src/components/Dependencies/Dependencies.stories.tsx +151 -51
  256. package/src/components/Dependencies/Dependencies.tsx +61 -51
  257. package/src/components/Deprecated/Deprecated.stories.tsx +1 -1
  258. package/src/components/Deprecated/Deprecated.tsx +1 -1
  259. package/src/components/Developers/Developers.stories.tsx +1 -1
  260. package/src/components/Distribution/Dist.stories.tsx +46 -3
  261. package/src/components/Distribution/Dist.test.tsx +33 -6
  262. package/src/components/Distribution/Dist.tsx +13 -5
  263. package/src/components/Distribution/utils.ts +3 -2
  264. package/src/components/Distribution/utilts.spec.ts +17 -0
  265. package/src/components/Engines/Engines.stories.tsx +1 -1
  266. package/src/components/FundButton/FundButton.stories.tsx +48 -17
  267. package/src/components/Help/Help.stories.tsx +1 -1
  268. package/src/components/Icons/Icons.stories.tsx +1 -1
  269. package/src/components/Install/Install.stories.tsx +79 -26
  270. package/src/components/Install/Install.tsx +28 -14
  271. package/src/components/Install/InstallListItem.tsx +24 -8
  272. package/src/components/Loading/Loading.stories.tsx +1 -1
  273. package/src/components/LoginDialog/LoginDialog.stories.tsx +1 -1
  274. package/src/components/NoItems/NoItems.stories.tsx +1 -1
  275. package/src/components/NoItems/NoItems.tsx +5 -6
  276. package/src/components/Package/Package.tsx +1 -1
  277. package/src/components/Repository/Repository.stories.tsx +39 -12
  278. package/src/components/Repository/Repository.tsx +2 -4
  279. package/src/components/Search/Search.stories.tsx +1 -1
  280. package/src/components/SettingsMenu/SettingsMenu.tsx +67 -0
  281. package/src/components/SettingsMenu/index.ts +1 -0
  282. package/src/components/SideBarTittle/SideBarTittle.stories.tsx +68 -0
  283. package/src/components/UpLinks/Uplinks.stories.tsx +1 -1
  284. package/src/components/Versions/types.ts +0 -2
  285. package/src/index.ts +2 -0
  286. package/src/layouts/Version/Version.stories.tsx +35 -20
  287. package/src/providers/AppConfigurationProvider/AppConfigurationProvider.tsx +0 -1
  288. package/src/providers/PersistenceSettingProvider/PersistenceSettingProvider.tsx +57 -0
  289. package/src/providers/PersistenceSettingProvider/index.ts +1 -0
  290. package/src/providers/TranslatorProvider/TranslatorProvider.spec.tsx +52 -0
  291. package/src/providers/TranslatorProvider/TranslatorProvider.tsx +2 -1
  292. package/src/providers/VersionProvider/VersionProvider.test.tsx +1 -1
  293. package/src/providers/VersionProvider/VersionProvider.tsx +0 -2
  294. package/src/sections/Detail/Detail.stories.tsx +1 -1
  295. package/src/sections/Header/Header.stories.tsx +1 -1
  296. package/src/sections/Home/Home.stories.tsx +1 -1
  297. package/src/sections/SideBar/Sidebar.stories.tsx +1 -1
  298. package/src/sections/SideBar/Sidebar.test.tsx +0 -1
  299. package/src/test/test-react-testing-library.tsx +17 -12
  300. package/src/types/index.d.ts +2 -0
  301. package/src/types/packageMeta.ts +6 -6
  302. package/src/utils/url.test.ts +4 -0
  303. package/src/utils/url.ts +1 -1
  304. package/tsconfig.build.json +1 -0
  305. package/tsconfig.json +0 -1
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = void 0;
6
+ exports.default = void 0;
7
7
  var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
8
8
  var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
9
9
  var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
@@ -12,45 +12,46 @@ var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
  var _reactI18next = require("react-i18next");
14
14
  var _reactJsonView = _interopRequireDefault(require("react-json-view"));
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
- var ViewerTitle = function ViewerTitle(props) {
17
- var children = props.children,
18
- onClose = props.onClose;
19
- return /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ const ViewerTitle = props => {
17
+ const {
18
+ children,
19
+ onClose
20
+ } = props;
21
+ return /*#__PURE__*/_react.default.createElement(_DialogTitle.default, {
20
22
  sx: {
21
23
  m: 0,
22
24
  p: 2
23
25
  }
24
- }, children, onClose ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
26
+ }, children, onClose ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
25
27
  "aria-label": "close",
26
28
  onClick: onClose,
27
29
  sx: {
28
30
  position: 'absolute',
29
31
  right: 8,
30
32
  top: 8,
31
- color: function color(theme) {
32
- return theme.palette.grey[500];
33
- }
33
+ color: theme => theme.palette.grey[500]
34
34
  }
35
- }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null)) : null);
35
+ }, /*#__PURE__*/_react.default.createElement(_Close.default, null)) : null);
36
36
  };
37
37
  /* eslint-disable verdaccio/jsx-spread */
38
- var RawViewer = function RawViewer(_ref) {
39
- var _ref$isOpen = _ref.isOpen,
40
- isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
41
- onClose = _ref.onClose,
42
- packageMeta = _ref.packageMeta;
43
- var _useTranslation = (0, _reactI18next.useTranslation)(),
44
- t = _useTranslation.t;
45
- return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
38
+ const RawViewer = ({
39
+ isOpen = false,
40
+ onClose,
41
+ packageMeta
42
+ }) => {
43
+ const {
44
+ t
45
+ } = (0, _reactI18next.useTranslation)();
46
+ return /*#__PURE__*/_react.default.createElement(_Dialog.default, {
46
47
  "data-testid": 'rawViewer--dialog',
47
48
  fullScreen: true,
48
49
  id: "raw-viewer--dialog-container",
49
50
  open: isOpen
50
- }, /*#__PURE__*/_react["default"].createElement(ViewerTitle, {
51
+ }, /*#__PURE__*/_react.default.createElement(ViewerTitle, {
51
52
  id: "viewer-title",
52
53
  onClose: onClose
53
- }, t('action-bar-action.raw')), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_reactJsonView["default"], {
54
+ }, t('action-bar-action.raw')), /*#__PURE__*/_react.default.createElement(_DialogContent.default, null, /*#__PURE__*/_react.default.createElement(_reactJsonView.default, {
54
55
  collapseStringsAfterLength: 40,
55
56
  collapsed: true,
56
57
  enableClipboard: false,
@@ -59,5 +60,5 @@ var RawViewer = function RawViewer(_ref) {
59
60
  })));
60
61
  };
61
62
  var _default = RawViewer;
62
- exports["default"] = _default;
63
+ exports.default = _default;
63
64
  //# sourceMappingURL=RawViewer.js.map
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
- get: function get() {
9
- return _RawViewer["default"];
8
+ get: function () {
9
+ return _RawViewer.default;
10
10
  }
11
11
  });
12
12
  var _RawViewer = _interopRequireDefault(require("./RawViewer"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  //# sourceMappingURL=index.js.map
@@ -3,16 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = void 0;
6
+ exports.default = void 0;
7
7
  var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
8
  require("github-markdown-css");
9
9
  require("highlight.js/styles/default.css");
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _utils = require("./utils");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- var Readme = function Readme(_ref) {
14
- var description = _ref.description;
15
- return /*#__PURE__*/_react["default"].createElement(Wrapper, {
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ const Readme = ({
14
+ description
15
+ }) => {
16
+ return /*#__PURE__*/_react.default.createElement(Wrapper, {
16
17
  className: "markdown-body",
17
18
  dangerouslySetInnerHTML: {
18
19
  __html: (0, _utils.parseReadme)(description)
@@ -20,24 +21,23 @@ var Readme = function Readme(_ref) {
20
21
  });
21
22
  };
22
23
  var _default = Readme;
23
- exports["default"] = _default;
24
- var Wrapper = /*#__PURE__*/(0, _base["default"])('div', process.env.NODE_ENV === "production" ? {
24
+ exports.default = _default;
25
+ const Wrapper = /*#__PURE__*/(0, _base.default)('div', process.env.NODE_ENV === "production" ? {
25
26
  target: "e1gao54u0"
26
27
  } : {
27
28
  target: "e1gao54u0",
28
29
  label: "Wrapper"
29
- })(function (_ref2) {
30
- var theme = _ref2.theme;
31
- return {
32
- background: theme === null || theme === void 0 ? void 0 : theme.palette.white,
33
- color: theme === null || theme === void 0 ? void 0 : theme.palette.black,
34
- padding: theme === null || theme === void 0 ? void 0 : theme.spacing(2, 3),
35
- ul: {
36
- listStyle: 'disc'
37
- },
38
- img: {
39
- maxWidth: '100%'
40
- }
41
- };
42
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlYWRtZS9SZWFkbWUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CZ0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvUmVhZG1lL1JlYWRtZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgJ2dpdGh1Yi1tYXJrZG93bi1jc3MnO1xuaW1wb3J0ICdoaWdobGlnaHQuanMvc3R5bGVzL2RlZmF1bHQuY3NzJztcbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vVGhlbWUnO1xuaW1wb3J0IHsgUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcbmltcG9ydCB7IHBhcnNlUmVhZG1lIH0gZnJvbSAnLi91dGlscyc7XG5cbmNvbnN0IFJlYWRtZTogUmVhY3QuRkM8UHJvcHM+ID0gKHsgZGVzY3JpcHRpb24gfSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxXcmFwcGVyXG4gICAgICBjbGFzc05hbWU9XCJtYXJrZG93bi1ib2R5XCJcbiAgICAgIGRhbmdlcm91c2x5U2V0SW5uZXJIVE1MPXt7IF9faHRtbDogcGFyc2VSZWFkbWUoZGVzY3JpcHRpb24pIGFzIHN0cmluZyB9fVxuICAgIC8+XG4gICk7XG59O1xuZXhwb3J0IGRlZmF1bHQgUmVhZG1lO1xuXG5jb25zdCBXcmFwcGVyID0gc3R5bGVkKCdkaXYnKTx7IHRoZW1lPzogVGhlbWUgfT4oKHsgdGhlbWUgfSkgPT4gKHtcbiAgYmFja2dyb3VuZDogdGhlbWU/LnBhbGV0dGUud2hpdGUsXG4gIGNvbG9yOiB0aGVtZT8ucGFsZXR0ZS5ibGFjayxcbiAgcGFkZGluZzogdGhlbWU/LnNwYWNpbmcoMiwgMyksXG4gIHVsOiB7XG4gICAgbGlzdFN0eWxlOiAnZGlzYycsXG4gIH0sXG4gIGltZzoge1xuICAgIG1heFdpZHRoOiAnMTAwJScsXG4gIH0sXG59KSk7XG4iXX0= */");
30
+ })(({
31
+ theme
32
+ }) => ({
33
+ background: theme === null || theme === void 0 ? void 0 : theme.palette.white,
34
+ color: theme === null || theme === void 0 ? void 0 : theme.palette.black,
35
+ padding: theme === null || theme === void 0 ? void 0 : theme.spacing(2, 3),
36
+ ul: {
37
+ listStyle: 'disc'
38
+ },
39
+ img: {
40
+ maxWidth: '100%'
41
+ }
42
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlYWRtZS9SZWFkbWUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CZ0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvUmVhZG1lL1JlYWRtZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgJ2dpdGh1Yi1tYXJrZG93bi1jc3MnO1xuaW1wb3J0ICdoaWdobGlnaHQuanMvc3R5bGVzL2RlZmF1bHQuY3NzJztcbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vVGhlbWUnO1xuaW1wb3J0IHsgUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcbmltcG9ydCB7IHBhcnNlUmVhZG1lIH0gZnJvbSAnLi91dGlscyc7XG5cbmNvbnN0IFJlYWRtZTogUmVhY3QuRkM8UHJvcHM+ID0gKHsgZGVzY3JpcHRpb24gfSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxXcmFwcGVyXG4gICAgICBjbGFzc05hbWU9XCJtYXJrZG93bi1ib2R5XCJcbiAgICAgIGRhbmdlcm91c2x5U2V0SW5uZXJIVE1MPXt7IF9faHRtbDogcGFyc2VSZWFkbWUoZGVzY3JpcHRpb24pIGFzIHN0cmluZyB9fVxuICAgIC8+XG4gICk7XG59O1xuZXhwb3J0IGRlZmF1bHQgUmVhZG1lO1xuXG5jb25zdCBXcmFwcGVyID0gc3R5bGVkKCdkaXYnKTx7IHRoZW1lPzogVGhlbWUgfT4oKHsgdGhlbWUgfSkgPT4gKHtcbiAgYmFja2dyb3VuZDogdGhlbWU/LnBhbGV0dGUud2hpdGUsXG4gIGNvbG9yOiB0aGVtZT8ucGFsZXR0ZS5ibGFjayxcbiAgcGFkZGluZzogdGhlbWU/LnNwYWNpbmcoMiwgMyksXG4gIHVsOiB7XG4gICAgbGlzdFN0eWxlOiAnZGlzYycsXG4gIH0sXG4gIGltZzoge1xuICAgIG1heFdpZHRoOiAnMTAwJScsXG4gIH0sXG59KSk7XG4iXX0= */");
43
43
  //# sourceMappingURL=Readme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Readme.js","names":["Readme","description","__html","parseReadme","Wrapper","theme","background","palette","white","color","black","padding","spacing","ul","listStyle","img","maxWidth"],"sources":["../../../src/components/Readme/Readme.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport 'github-markdown-css';\nimport 'highlight.js/styles/default.css';\nimport React from 'react';\n\nimport { Theme } from '../../Theme';\nimport { Props } from './types';\nimport { parseReadme } from './utils';\n\nconst Readme: React.FC<Props> = ({ description }) => {\n return (\n <Wrapper\n className=\"markdown-body\"\n dangerouslySetInnerHTML={{ __html: parseReadme(description) as string }}\n />\n );\n};\nexport default Readme;\n\nconst Wrapper = styled('div')<{ theme?: Theme }>(({ theme }) => ({\n background: theme?.palette.white,\n color: theme?.palette.black,\n padding: theme?.spacing(2, 3),\n ul: {\n listStyle: 'disc',\n },\n img: {\n maxWidth: '100%',\n },\n}));\n"],"mappings":";;;;;;;AACA;AACA;AACA;AAIA;AAAsC;AAEtC,IAAMA,MAAuB,GAAG,SAA1BA,MAAuB,OAAwB;EAAA,IAAlBC,WAAW,QAAXA,WAAW;EAC5C,oBACE,gCAAC,OAAO;IACN,SAAS,EAAC,eAAe;IACzB,uBAAuB,EAAE;MAAEC,MAAM,EAAE,IAAAC,kBAAW,EAACF,WAAW;IAAY;EAAE,EACxE;AAEN,CAAC;AAAC,eACaD,MAAM;AAAA;AAErB,IAAMI,OAAO,gBAAG,sBAAO,KAAK;EAAA;AAAA;EAAA;EAAA;AAAA,EAAC,CAAoB;EAAA,IAAGC,KAAK,SAALA,KAAK;EAAA,OAAQ;IAC/DC,UAAU,EAAED,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,OAAO,CAACC,KAAK;IAChCC,KAAK,EAAEJ,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,OAAO,CAACG,KAAK;IAC3BC,OAAO,EAAEN,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEO,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7BC,EAAE,EAAE;MACFC,SAAS,EAAE;IACb,CAAC;IACDC,GAAG,EAAE;MACHC,QAAQ,EAAE;IACZ;EACF,CAAC;AAAA,CAAC,y0CAAC"}
1
+ {"version":3,"file":"Readme.js","names":["require","_react","_interopRequireDefault","_utils","obj","__esModule","default","Readme","description","createElement","Wrapper","className","dangerouslySetInnerHTML","__html","parseReadme","_default","exports","_base","process","env","NODE_ENV","target","label","theme","background","palette","white","color","black","padding","spacing","ul","listStyle","img","maxWidth"],"sources":["../../../src/components/Readme/Readme.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport 'github-markdown-css';\nimport 'highlight.js/styles/default.css';\nimport React from 'react';\n\nimport { Theme } from '../../Theme';\nimport { Props } from './types';\nimport { parseReadme } from './utils';\n\nconst Readme: React.FC<Props> = ({ description }) => {\n return (\n <Wrapper\n className=\"markdown-body\"\n dangerouslySetInnerHTML={{ __html: parseReadme(description) as string }}\n />\n );\n};\nexport default Readme;\n\nconst Wrapper = styled('div')<{ theme?: Theme }>(({ theme }) => ({\n background: theme?.palette.white,\n color: theme?.palette.black,\n padding: theme?.spacing(2, 3),\n ul: {\n listStyle: 'disc',\n },\n img: {\n maxWidth: '100%',\n },\n}));\n"],"mappings":";;;;;;;AACAA,OAAA;AACAA,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAIA,IAAAG,MAAA,GAAAH,OAAA;AAAsC,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEtC,MAAMG,MAAuB,GAAGA,CAAC;EAAEC;AAAY,CAAC,KAAK;EACnD,oBACEP,MAAA,CAAAK,OAAA,CAAAG,aAAA,CAACC,OAAO;IACNC,SAAS,EAAC,eAAe;IACzBC,uBAAuB,EAAE;MAAEC,MAAM,EAAE,IAAAC,kBAAW,EAACN,WAAW;IAAY;EAAE,CACzE,CAAC;AAEN,CAAC;AAAC,IAAAO,QAAA,GACaR,MAAM;AAAAS,OAAA,CAAAV,OAAA,GAAAS,QAAA;AAErB,MAAML,OAAO,gBAAG,IAAAO,KAAA,CAAAX,OAAA,EAAO,KAAK,EAAAY,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAoB,CAAC;EAAEC;AAAM,CAAC,MAAM;EAC/DC,UAAU,EAAED,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,OAAO,CAACC,KAAK;EAChCC,KAAK,EAAEJ,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,OAAO,CAACG,KAAK;EAC3BC,OAAO,EAAEN,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEO,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;EAC7BC,EAAE,EAAE;IACFC,SAAS,EAAE;EACb,CAAC;EACDC,GAAG,EAAE;IACHC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC,EAAAhB,OAAA,CAAAC,GAAA,CAAAC,QAAA,mzCAAC"}
@@ -3,17 +3,17 @@
3
3
  var _react = _interopRequireDefault(require("react"));
4
4
  var _testReactTestingLibrary = require("../../test/test-react-testing-library");
5
5
  var _Readme = _interopRequireDefault(require("./Readme"));
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
7
- describe('<Readme /> component', function () {
6
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7
+ describe('<Readme /> component', () => {
8
8
  beforeEach(_testReactTestingLibrary.cleanup);
9
- test('should load the component in default state', function () {
10
- var wrapper = (0, _testReactTestingLibrary.render)( /*#__PURE__*/_react["default"].createElement(_Readme["default"], {
9
+ test('should load the component in default state', () => {
10
+ const wrapper = (0, _testReactTestingLibrary.render)( /*#__PURE__*/_react.default.createElement(_Readme.default, {
11
11
  description: "test"
12
12
  }));
13
13
  expect(wrapper).toMatchSnapshot();
14
14
  });
15
- test('should dangerously set html', function () {
16
- var wrapper = (0, _testReactTestingLibrary.render)( /*#__PURE__*/_react["default"].createElement(_Readme["default"], {
15
+ test('should dangerously set html', () => {
16
+ const wrapper = (0, _testReactTestingLibrary.render)( /*#__PURE__*/_react.default.createElement(_Readme.default, {
17
17
  description: "<h1>This is a test string</h1>"
18
18
  }));
19
19
  expect(wrapper.getByText('This is a test string')).toBeInTheDocument();
@@ -1 +1 @@
1
- {"version":3,"file":"Readme.spec.js","names":["describe","beforeEach","cleanup","test","wrapper","render","expect","toMatchSnapshot","getByText","toBeInTheDocument"],"sources":["../../../src/components/Readme/Readme.spec.tsx"],"sourcesContent":["import React from 'react';\n\nimport { cleanup, render } from '../../test/test-react-testing-library';\nimport Readme from './Readme';\n\ndescribe('<Readme /> component', () => {\n beforeEach(cleanup);\n\n test('should load the component in default state', () => {\n const wrapper = render(<Readme description=\"test\" />);\n expect(wrapper).toMatchSnapshot();\n });\n\n test('should dangerously set html', () => {\n const wrapper = render(<Readme description=\"<h1>This is a test string</h1>\" />);\n expect(wrapper.getByText('This is a test string')).toBeInTheDocument();\n });\n});\n"],"mappings":";;AAAA;AAEA;AACA;AAA8B;AAE9BA,QAAQ,CAAC,sBAAsB,EAAE,YAAM;EACrCC,UAAU,CAACC,gCAAO,CAAC;EAEnBC,IAAI,CAAC,4CAA4C,EAAE,YAAM;IACvD,IAAMC,OAAO,GAAG,IAAAC,+BAAM,gBAAC,gCAAC,kBAAM;MAAC,WAAW,EAAC;IAAM,EAAG,CAAC;IACrDC,MAAM,CAACF,OAAO,CAAC,CAACG,eAAe,EAAE;EACnC,CAAC,CAAC;EAEFJ,IAAI,CAAC,6BAA6B,EAAE,YAAM;IACxC,IAAMC,OAAO,GAAG,IAAAC,+BAAM,gBAAC,gCAAC,kBAAM;MAAC,WAAW,EAAC;IAAgC,EAAG,CAAC;IAC/EC,MAAM,CAACF,OAAO,CAACI,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAACC,iBAAiB,EAAE;EACxE,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"Readme.spec.js","names":["_react","_interopRequireDefault","require","_testReactTestingLibrary","_Readme","obj","__esModule","default","describe","beforeEach","cleanup","test","wrapper","render","createElement","description","expect","toMatchSnapshot","getByText","toBeInTheDocument"],"sources":["../../../src/components/Readme/Readme.spec.tsx"],"sourcesContent":["import React from 'react';\n\nimport { cleanup, render } from '../../test/test-react-testing-library';\nimport Readme from './Readme';\n\ndescribe('<Readme /> component', () => {\n beforeEach(cleanup);\n\n test('should load the component in default state', () => {\n const wrapper = render(<Readme description=\"test\" />);\n expect(wrapper).toMatchSnapshot();\n });\n\n test('should dangerously set html', () => {\n const wrapper = render(<Readme description=\"<h1>This is a test string</h1>\" />);\n expect(wrapper.getByText('This is a test string')).toBeInTheDocument();\n });\n});\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA8B,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9BG,QAAQ,CAAC,sBAAsB,EAAE,MAAM;EACrCC,UAAU,CAACC,gCAAO,CAAC;EAEnBC,IAAI,CAAC,4CAA4C,EAAE,MAAM;IACvD,MAAMC,OAAO,GAAG,IAAAC,+BAAM,gBAACb,MAAA,CAAAO,OAAA,CAAAO,aAAA,CAACV,OAAA,CAAAG,OAAM;MAACQ,WAAW,EAAC;IAAM,CAAE,CAAC,CAAC;IACrDC,MAAM,CAACJ,OAAO,CAAC,CAACK,eAAe,CAAC,CAAC;EACnC,CAAC,CAAC;EAEFN,IAAI,CAAC,6BAA6B,EAAE,MAAM;IACxC,MAAMC,OAAO,GAAG,IAAAC,+BAAM,gBAACb,MAAA,CAAAO,OAAA,CAAAO,aAAA,CAACV,OAAA,CAAAG,OAAM;MAACQ,WAAW,EAAC;IAAgC,CAAE,CAAC,CAAC;IAC/EC,MAAM,CAACJ,OAAO,CAACM,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC;EACxE,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
- get: function get() {
9
- return _Readme["default"];
8
+ get: function () {
9
+ return _Readme.default;
10
10
  }
11
11
  });
12
12
  var _Readme = _interopRequireDefault(require("./Readme"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  //# sourceMappingURL=index.js.map
@@ -1,21 +1,20 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.parseReadme = parseReadme;
8
7
  var DOMPurify = _interopRequireWildcard(require("dompurify"));
9
8
  var marked = _interopRequireWildcard(require("marked"));
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
11
  marked.setOptions({
13
12
  renderer: new marked.Renderer(),
14
- highlight: function highlight(code, lang) {
15
- var hljs = require('highlight.js');
16
- var language = hljs.getLanguage(lang) ? lang : 'plaintext';
13
+ highlight: function (code, lang) {
14
+ const hljs = require('highlight.js');
15
+ const language = hljs.getLanguage(lang) ? lang : 'plaintext';
17
16
  return hljs.highlight(code, {
18
- language: language
17
+ language
19
18
  }).value;
20
19
  },
21
20
  langPrefix: 'hljs language-',
@@ -28,7 +27,7 @@ marked.setOptions({
28
27
  });
29
28
  function parseReadme(readme) {
30
29
  if (typeof readme === 'string') {
31
- var html = marked.parse(readme);
30
+ const html = marked.parse(readme);
32
31
  return DOMPurify.sanitize(html);
33
32
  }
34
33
  return '';
@@ -3,35 +3,35 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = void 0;
6
+ exports.default = void 0;
7
7
  var _Button = _interopRequireDefault(require("@mui/material/Button"));
8
8
  var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
9
9
  var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _reactI18next = require("react-i18next");
12
12
  var _styles = require("./styles");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
- var RegistryInfoDialog = function RegistryInfoDialog(_ref) {
15
- var _ref$open = _ref.open,
16
- open = _ref$open === void 0 ? false : _ref$open,
17
- children = _ref.children,
18
- onClose = _ref.onClose,
19
- _ref$title = _ref.title,
20
- title = _ref$title === void 0 ? '' : _ref$title;
21
- var _useTranslation = (0, _reactI18next.useTranslation)(),
22
- t = _useTranslation.t;
23
- return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ const RegistryInfoDialog = ({
15
+ open = false,
16
+ children,
17
+ onClose,
18
+ title = ''
19
+ }) => {
20
+ const {
21
+ t
22
+ } = (0, _reactI18next.useTranslation)();
23
+ return /*#__PURE__*/_react.default.createElement(_Dialog.default, {
24
24
  "data-testid": 'registryInfo--dialog',
25
25
  id: "registryInfo--dialog-container",
26
26
  maxWidth: "sm",
27
27
  onClose: onClose,
28
28
  open: open
29
- }, /*#__PURE__*/_react["default"].createElement(_styles.Title, null, title), /*#__PURE__*/_react["default"].createElement(_styles.Content, null, children), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
29
+ }, /*#__PURE__*/_react.default.createElement(_styles.Title, null, title), /*#__PURE__*/_react.default.createElement(_styles.Content, null, children), /*#__PURE__*/_react.default.createElement(_DialogActions.default, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
30
30
  color: "inherit",
31
31
  id: "registryInfo--dialog-close",
32
32
  onClick: onClose
33
33
  }, t('button.close'))));
34
34
  };
35
35
  var _default = RegistryInfoDialog;
36
- exports["default"] = _default;
36
+ exports.default = _default;
37
37
  //# sourceMappingURL=RegistryInfoDialog.js.map
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
- get: function get() {
9
- return _RegistryInfoDialog["default"];
8
+ get: function () {
9
+ return _RegistryInfoDialog.default;
10
10
  }
11
11
  });
12
12
  var _RegistryInfoDialog = _interopRequireDefault(require("./RegistryInfoDialog"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  //# sourceMappingURL=index.js.map
@@ -7,13 +7,13 @@ exports.Title = exports.TextContent = exports.Content = void 0;
7
7
  var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
8
  var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
9
9
  var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- var Title = /*#__PURE__*/(0, _base["default"])(_DialogTitle["default"], process.env.NODE_ENV === "production" ? {
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ const Title = /*#__PURE__*/(0, _base.default)(_DialogTitle.default, process.env.NODE_ENV === "production" ? {
12
12
  target: "e1y7bplp2"
13
13
  } : {
14
14
  target: "e1y7bplp2",
15
15
  label: "Title"
16
- })(function (props) {
16
+ })(props => {
17
17
  var _props$theme, _props$theme2, _props$theme3;
18
18
  return {
19
19
  backgroundColor: (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.palette.primary.main,
@@ -22,30 +22,28 @@ var Title = /*#__PURE__*/(0, _base["default"])(_DialogTitle["default"], process.
22
22
  };
23
23
  }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTXFCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgRGlhbG9nQ29udGVudCBmcm9tICdAbXVpL21hdGVyaWFsL0RpYWxvZ0NvbnRlbnQnO1xuaW1wb3J0IERpYWxvZ1RpdGxlIGZyb20gJ0BtdWkvbWF0ZXJpYWwvRGlhbG9nVGl0bGUnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uLyc7XG5cbmV4cG9ydCBjb25zdCBUaXRsZSA9IHN0eWxlZChEaWFsb2dUaXRsZSk8eyB0aGVtZT86IFRoZW1lIH0+KChwcm9wcykgPT4gKHtcbiAgYmFja2dyb3VuZENvbG9yOiBwcm9wcy50aGVtZT8ucGFsZXR0ZS5wcmltYXJ5Lm1haW4sXG4gIGNvbG9yOiBwcm9wcy50aGVtZT8ucGFsZXR0ZS53aGl0ZSxcbiAgZm9udFNpemU6IHByb3BzLnRoZW1lPy5mb250U2l6ZS5sZyxcbn0pKTtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBzdHlsZWQoRGlhbG9nQ29udGVudCk8eyB0aGVtZT86IFRoZW1lIH0+KCh7IHRoZW1lIH0pID0+ICh7XG4gIHBhZGRpbmc6ICcwIDI0cHgnLFxuICBiYWNrZ3JvdW5kQ29sb3I6IHRoZW1lPy5wYWxldHRlLmJhY2tncm91bmQuZGVmYXVsdCxcbn0pKTtcblxuZXhwb3J0IGNvbnN0IFRleHRDb250ZW50ID0gc3R5bGVkKCdkaXYnKTx7IHRoZW1lPzogVGhlbWUgfT4oKHsgdGhlbWUgfSkgPT4gKHtcbiAgcGFkZGluZzogJzEwcHggMjRweCcsXG4gIGJhY2tncm91bmRDb2xvcjogdGhlbWU/LnBhbGV0dGUuYmFja2dyb3VuZC5kZWZhdWx0LFxufSkpO1xuIl19 */");
24
24
  exports.Title = Title;
25
- var Content = /*#__PURE__*/(0, _base["default"])(_DialogContent["default"], process.env.NODE_ENV === "production" ? {
25
+ const Content = /*#__PURE__*/(0, _base.default)(_DialogContent.default, process.env.NODE_ENV === "production" ? {
26
26
  target: "e1y7bplp1"
27
27
  } : {
28
28
  target: "e1y7bplp1",
29
29
  label: "Content"
30
- })(function (_ref) {
31
- var theme = _ref.theme;
32
- return {
33
- padding: '0 24px',
34
- backgroundColor: theme === null || theme === void 0 ? void 0 : theme.palette.background["default"]
35
- };
36
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWXVCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgRGlhbG9nQ29udGVudCBmcm9tICdAbXVpL21hdGVyaWFsL0RpYWxvZ0NvbnRlbnQnO1xuaW1wb3J0IERpYWxvZ1RpdGxlIGZyb20gJ0BtdWkvbWF0ZXJpYWwvRGlhbG9nVGl0bGUnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uLyc7XG5cbmV4cG9ydCBjb25zdCBUaXRsZSA9IHN0eWxlZChEaWFsb2dUaXRsZSk8eyB0aGVtZT86IFRoZW1lIH0+KChwcm9wcykgPT4gKHtcbiAgYmFja2dyb3VuZENvbG9yOiBwcm9wcy50aGVtZT8ucGFsZXR0ZS5wcmltYXJ5Lm1haW4sXG4gIGNvbG9yOiBwcm9wcy50aGVtZT8ucGFsZXR0ZS53aGl0ZSxcbiAgZm9udFNpemU6IHByb3BzLnRoZW1lPy5mb250U2l6ZS5sZyxcbn0pKTtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBzdHlsZWQoRGlhbG9nQ29udGVudCk8eyB0aGVtZT86IFRoZW1lIH0+KCh7IHRoZW1lIH0pID0+ICh7XG4gIHBhZGRpbmc6ICcwIDI0cHgnLFxuICBiYWNrZ3JvdW5kQ29sb3I6IHRoZW1lPy5wYWxldHRlLmJhY2tncm91bmQuZGVmYXVsdCxcbn0pKTtcblxuZXhwb3J0IGNvbnN0IFRleHRDb250ZW50ID0gc3R5bGVkKCdkaXYnKTx7IHRoZW1lPzogVGhlbWUgfT4oKHsgdGhlbWUgfSkgPT4gKHtcbiAgcGFkZGluZzogJzEwcHggMjRweCcsXG4gIGJhY2tncm91bmRDb2xvcjogdGhlbWU/LnBhbGV0dGUuYmFja2dyb3VuZC5kZWZhdWx0LFxufSkpO1xuIl19 */");
30
+ })(({
31
+ theme
32
+ }) => ({
33
+ padding: '0 24px',
34
+ backgroundColor: theme === null || theme === void 0 ? void 0 : theme.palette.background.default
35
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWXVCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgRGlhbG9nQ29udGVudCBmcm9tICdAbXVpL21hdGVyaWFsL0RpYWxvZ0NvbnRlbnQnO1xuaW1wb3J0IERpYWxvZ1RpdGxlIGZyb20gJ0BtdWkvbWF0ZXJpYWwvRGlhbG9nVGl0bGUnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uLyc7XG5cbmV4cG9ydCBjb25zdCBUaXRsZSA9IHN0eWxlZChEaWFsb2dUaXRsZSk8eyB0aGVtZT86IFRoZW1lIH0+KChwcm9wcykgPT4gKHtcbiAgYmFja2dyb3VuZENvbG9yOiBwcm9wcy50aGVtZT8ucGFsZXR0ZS5wcmltYXJ5Lm1haW4sXG4gIGNvbG9yOiBwcm9wcy50aGVtZT8ucGFsZXR0ZS53aGl0ZSxcbiAgZm9udFNpemU6IHByb3BzLnRoZW1lPy5mb250U2l6ZS5sZyxcbn0pKTtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBzdHlsZWQoRGlhbG9nQ29udGVudCk8eyB0aGVtZT86IFRoZW1lIH0+KCh7IHRoZW1lIH0pID0+ICh7XG4gIHBhZGRpbmc6ICcwIDI0cHgnLFxuICBiYWNrZ3JvdW5kQ29sb3I6IHRoZW1lPy5wYWxldHRlLmJhY2tncm91bmQuZGVmYXVsdCxcbn0pKTtcblxuZXhwb3J0IGNvbnN0IFRleHRDb250ZW50ID0gc3R5bGVkKCdkaXYnKTx7IHRoZW1lPzogVGhlbWUgfT4oKHsgdGhlbWUgfSkgPT4gKHtcbiAgcGFkZGluZzogJzEwcHggMjRweCcsXG4gIGJhY2tncm91bmRDb2xvcjogdGhlbWU/LnBhbGV0dGUuYmFja2dyb3VuZC5kZWZhdWx0LFxufSkpO1xuIl19 */");
37
36
  exports.Content = Content;
38
- var TextContent = /*#__PURE__*/(0, _base["default"])('div', process.env.NODE_ENV === "production" ? {
37
+ const TextContent = /*#__PURE__*/(0, _base.default)('div', process.env.NODE_ENV === "production" ? {
39
38
  target: "e1y7bplp0"
40
39
  } : {
41
40
  target: "e1y7bplp0",
42
41
  label: "TextContent"
43
- })(function (_ref2) {
44
- var theme = _ref2.theme;
45
- return {
46
- padding: '10px 24px',
47
- backgroundColor: theme === null || theme === void 0 ? void 0 : theme.palette.background["default"]
48
- };
49
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUIyQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9SZWdpc3RyeUluZm9EaWFsb2cvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IERpYWxvZ0NvbnRlbnQgZnJvbSAnQG11aS9tYXRlcmlhbC9EaWFsb2dDb250ZW50JztcbmltcG9ydCBEaWFsb2dUaXRsZSBmcm9tICdAbXVpL21hdGVyaWFsL0RpYWxvZ1RpdGxlJztcblxuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICcuLi8uLi8nO1xuXG5leHBvcnQgY29uc3QgVGl0bGUgPSBzdHlsZWQoRGlhbG9nVGl0bGUpPHsgdGhlbWU/OiBUaGVtZSB9PigocHJvcHMpID0+ICh7XG4gIGJhY2tncm91bmRDb2xvcjogcHJvcHMudGhlbWU/LnBhbGV0dGUucHJpbWFyeS5tYWluLFxuICBjb2xvcjogcHJvcHMudGhlbWU/LnBhbGV0dGUud2hpdGUsXG4gIGZvbnRTaXplOiBwcm9wcy50aGVtZT8uZm9udFNpemUubGcsXG59KSk7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gc3R5bGVkKERpYWxvZ0NvbnRlbnQpPHsgdGhlbWU/OiBUaGVtZSB9PigoeyB0aGVtZSB9KSA9PiAoe1xuICBwYWRkaW5nOiAnMCAyNHB4JyxcbiAgYmFja2dyb3VuZENvbG9yOiB0aGVtZT8ucGFsZXR0ZS5iYWNrZ3JvdW5kLmRlZmF1bHQsXG59KSk7XG5cbmV4cG9ydCBjb25zdCBUZXh0Q29udGVudCA9IHN0eWxlZCgnZGl2Jyk8eyB0aGVtZT86IFRoZW1lIH0+KCh7IHRoZW1lIH0pID0+ICh7XG4gIHBhZGRpbmc6ICcxMHB4IDI0cHgnLFxuICBiYWNrZ3JvdW5kQ29sb3I6IHRoZW1lPy5wYWxldHRlLmJhY2tncm91bmQuZGVmYXVsdCxcbn0pKTtcbiJdfQ== */");
42
+ })(({
43
+ theme
44
+ }) => ({
45
+ padding: '10px 24px',
46
+ backgroundColor: theme === null || theme === void 0 ? void 0 : theme.palette.background.default
47
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1JlZ2lzdHJ5SW5mb0RpYWxvZy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUIyQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9SZWdpc3RyeUluZm9EaWFsb2cvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IERpYWxvZ0NvbnRlbnQgZnJvbSAnQG11aS9tYXRlcmlhbC9EaWFsb2dDb250ZW50JztcbmltcG9ydCBEaWFsb2dUaXRsZSBmcm9tICdAbXVpL21hdGVyaWFsL0RpYWxvZ1RpdGxlJztcblxuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICcuLi8uLi8nO1xuXG5leHBvcnQgY29uc3QgVGl0bGUgPSBzdHlsZWQoRGlhbG9nVGl0bGUpPHsgdGhlbWU/OiBUaGVtZSB9PigocHJvcHMpID0+ICh7XG4gIGJhY2tncm91bmRDb2xvcjogcHJvcHMudGhlbWU/LnBhbGV0dGUucHJpbWFyeS5tYWluLFxuICBjb2xvcjogcHJvcHMudGhlbWU/LnBhbGV0dGUud2hpdGUsXG4gIGZvbnRTaXplOiBwcm9wcy50aGVtZT8uZm9udFNpemUubGcsXG59KSk7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gc3R5bGVkKERpYWxvZ0NvbnRlbnQpPHsgdGhlbWU/OiBUaGVtZSB9PigoeyB0aGVtZSB9KSA9PiAoe1xuICBwYWRkaW5nOiAnMCAyNHB4JyxcbiAgYmFja2dyb3VuZENvbG9yOiB0aGVtZT8ucGFsZXR0ZS5iYWNrZ3JvdW5kLmRlZmF1bHQsXG59KSk7XG5cbmV4cG9ydCBjb25zdCBUZXh0Q29udGVudCA9IHN0eWxlZCgnZGl2Jyk8eyB0aGVtZT86IFRoZW1lIH0+KCh7IHRoZW1lIH0pID0+ICh7XG4gIHBhZGRpbmc6ICcxMHB4IDI0cHgnLFxuICBiYWNrZ3JvdW5kQ29sb3I6IHRoZW1lPy5wYWxldHRlLmJhY2tncm91bmQuZGVmYXVsdCxcbn0pKTtcbiJdfQ== */");
50
48
  exports.TextContent = TextContent;
51
49
  //# sourceMappingURL=styles.js.map