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