@replicated/portal-components 0.0.27 → 0.0.29

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 (154) hide show
  1. package/components/metadata/registry.json +2 -2
  2. package/components/metadata/registry.md +2 -2
  3. package/dist/actions/branding-actions.d.mts +1 -1
  4. package/dist/actions/branding-actions.d.ts +1 -1
  5. package/dist/actions/branding-actions.js +15 -5
  6. package/dist/actions/branding-actions.js.map +1 -1
  7. package/dist/actions/change-team.js +13 -3
  8. package/dist/actions/change-team.js.map +1 -1
  9. package/dist/actions/index.d.mts +1 -1
  10. package/dist/actions/index.d.ts +1 -1
  11. package/dist/actions/index.js +16 -15
  12. package/dist/actions/index.js.map +1 -1
  13. package/dist/actions/install-actions.d.mts +1 -1
  14. package/dist/actions/install-actions.d.ts +1 -1
  15. package/dist/actions/install-actions.js +13 -3
  16. package/dist/actions/install-actions.js.map +1 -1
  17. package/dist/actions/invite-actions.js +13 -3
  18. package/dist/actions/invite-actions.js.map +1 -1
  19. package/dist/actions/magic-link-actions.d.mts +1 -1
  20. package/dist/actions/magic-link-actions.d.ts +1 -1
  21. package/dist/actions/magic-link-actions.js +15 -5
  22. package/dist/actions/magic-link-actions.js.map +1 -1
  23. package/dist/actions/service-account.d.mts +1 -1
  24. package/dist/actions/service-account.d.ts +1 -1
  25. package/dist/actions/service-account.js +13 -3
  26. package/dist/actions/service-account.js.map +1 -1
  27. package/dist/actions/support-bundles.d.mts +1 -1
  28. package/dist/actions/support-bundles.d.ts +1 -1
  29. package/dist/actions/support-bundles.js +13 -3
  30. package/dist/actions/support-bundles.js.map +1 -1
  31. package/dist/actions/team-settings.d.mts +1 -1
  32. package/dist/actions/team-settings.d.ts +1 -1
  33. package/dist/actions/team-settings.js +13 -3
  34. package/dist/actions/team-settings.js.map +1 -1
  35. package/dist/actions/trial-signup-actions.js +13 -3
  36. package/dist/actions/trial-signup-actions.js.map +1 -1
  37. package/dist/actions/trial-signup.js +13 -3
  38. package/dist/actions/trial-signup.js.map +1 -1
  39. package/dist/actions/user-settings.d.mts +1 -1
  40. package/dist/actions/user-settings.d.ts +1 -1
  41. package/dist/actions/user-settings.js +13 -3
  42. package/dist/actions/user-settings.js.map +1 -1
  43. package/dist/airgap-instances.d.mts +1 -1
  44. package/dist/airgap-instances.d.ts +1 -1
  45. package/dist/api/saml.js +13 -3
  46. package/dist/api/saml.js.map +1 -1
  47. package/dist/api/support-bundles.js +13 -3
  48. package/dist/api/support-bundles.js.map +1 -1
  49. package/dist/{branding-DmsrDTNE.d.mts → branding-C5H0L6Vi.d.mts} +13 -1
  50. package/dist/{branding-DmsrDTNE.d.ts → branding-C5H0L6Vi.d.ts} +13 -1
  51. package/dist/esm/actions/branding-actions.js +15 -5
  52. package/dist/esm/actions/branding-actions.js.map +1 -1
  53. package/dist/esm/actions/change-team.js +13 -3
  54. package/dist/esm/actions/change-team.js.map +1 -1
  55. package/dist/esm/actions/index.js +16 -15
  56. package/dist/esm/actions/index.js.map +1 -1
  57. package/dist/esm/actions/install-actions.js +13 -3
  58. package/dist/esm/actions/install-actions.js.map +1 -1
  59. package/dist/esm/actions/invite-actions.js +13 -3
  60. package/dist/esm/actions/invite-actions.js.map +1 -1
  61. package/dist/esm/actions/magic-link-actions.js +15 -5
  62. package/dist/esm/actions/magic-link-actions.js.map +1 -1
  63. package/dist/esm/actions/service-account.js +13 -3
  64. package/dist/esm/actions/service-account.js.map +1 -1
  65. package/dist/esm/actions/support-bundles.js +13 -3
  66. package/dist/esm/actions/support-bundles.js.map +1 -1
  67. package/dist/esm/actions/team-settings.js +13 -3
  68. package/dist/esm/actions/team-settings.js.map +1 -1
  69. package/dist/esm/actions/trial-signup-actions.js +13 -3
  70. package/dist/esm/actions/trial-signup-actions.js.map +1 -1
  71. package/dist/esm/actions/trial-signup.js +13 -3
  72. package/dist/esm/actions/trial-signup.js.map +1 -1
  73. package/dist/esm/actions/user-settings.js +13 -3
  74. package/dist/esm/actions/user-settings.js.map +1 -1
  75. package/dist/esm/api/saml.js +13 -3
  76. package/dist/esm/api/saml.js.map +1 -1
  77. package/dist/esm/api/support-bundles.js +13 -3
  78. package/dist/esm/api/support-bundles.js.map +1 -1
  79. package/dist/esm/helm-install-wizard.js +13 -3
  80. package/dist/esm/helm-install-wizard.js.map +1 -1
  81. package/dist/esm/index.js +51 -9
  82. package/dist/esm/index.js.map +1 -1
  83. package/dist/esm/install-actions.js +13 -3
  84. package/dist/esm/install-actions.js.map +1 -1
  85. package/dist/esm/license-details.js +13 -3
  86. package/dist/esm/license-details.js.map +1 -1
  87. package/dist/esm/linux-install-wizard.js +13 -3
  88. package/dist/esm/linux-install-wizard.js.map +1 -1
  89. package/dist/esm/support-card.js +13 -3
  90. package/dist/esm/support-card.js.map +1 -1
  91. package/dist/esm/top-nav.js +34 -7
  92. package/dist/esm/top-nav.js.map +1 -1
  93. package/dist/esm/update-layout.js +34 -7
  94. package/dist/esm/update-layout.js.map +1 -1
  95. package/dist/esm/use-verify-magic-link.js +4 -3
  96. package/dist/esm/use-verify-magic-link.js.map +1 -1
  97. package/dist/esm/user-menu-dropdown.js +6 -3
  98. package/dist/esm/user-menu-dropdown.js.map +1 -1
  99. package/dist/esm/utils/index.js +44 -5
  100. package/dist/esm/utils/index.js.map +1 -1
  101. package/dist/helm-install-wizard.d.mts +2 -2
  102. package/dist/helm-install-wizard.d.ts +2 -2
  103. package/dist/helm-install-wizard.js +13 -3
  104. package/dist/helm-install-wizard.js.map +1 -1
  105. package/dist/{index-Bcp17Mf3.d.ts → index-7ibNULXY.d.ts} +3 -1
  106. package/dist/{index-DaH1bSuO.d.mts → index-CITwEYtK.d.mts} +3 -1
  107. package/dist/index.d.mts +3 -3
  108. package/dist/index.d.ts +3 -3
  109. package/dist/index.js +51 -8
  110. package/dist/index.js.map +1 -1
  111. package/dist/install-actions.d.mts +2 -2
  112. package/dist/install-actions.d.ts +2 -2
  113. package/dist/install-actions.js +13 -3
  114. package/dist/install-actions.js.map +1 -1
  115. package/dist/instance-card.d.mts +1 -1
  116. package/dist/instance-card.d.ts +1 -1
  117. package/dist/license-details.js +13 -3
  118. package/dist/license-details.js.map +1 -1
  119. package/dist/linux-install-wizard.d.mts +2 -2
  120. package/dist/linux-install-wizard.d.ts +2 -2
  121. package/dist/linux-install-wizard.js +13 -3
  122. package/dist/linux-install-wizard.js.map +1 -1
  123. package/dist/online-instance-list.d.mts +1 -1
  124. package/dist/online-instance-list.d.ts +1 -1
  125. package/dist/pending-installations.d.mts +1 -1
  126. package/dist/pending-installations.d.ts +1 -1
  127. package/dist/security-card.d.mts +1 -1
  128. package/dist/security-card.d.ts +1 -1
  129. package/dist/styles.css +16 -0
  130. package/dist/support-bundles-card.d.mts +1 -1
  131. package/dist/support-bundles-card.d.ts +1 -1
  132. package/dist/support-card.js +13 -3
  133. package/dist/support-card.js.map +1 -1
  134. package/dist/{top-nav-8f2U69MF.d.ts → top-nav-B2FVC4rl.d.ts} +1 -1
  135. package/dist/{top-nav-B2yA3PC7.d.mts → top-nav-Cf8zMq1A.d.mts} +1 -1
  136. package/dist/top-nav.d.mts +2 -2
  137. package/dist/top-nav.d.ts +2 -2
  138. package/dist/top-nav.js +34 -7
  139. package/dist/top-nav.js.map +1 -1
  140. package/dist/update-layout.js +34 -7
  141. package/dist/update-layout.js.map +1 -1
  142. package/dist/use-verify-magic-link.d.mts +3 -2
  143. package/dist/use-verify-magic-link.d.ts +3 -2
  144. package/dist/use-verify-magic-link.js +4 -3
  145. package/dist/use-verify-magic-link.js.map +1 -1
  146. package/dist/user-menu-dropdown.d.mts +2 -1
  147. package/dist/user-menu-dropdown.d.ts +2 -1
  148. package/dist/user-menu-dropdown.js +6 -3
  149. package/dist/user-menu-dropdown.js.map +1 -1
  150. package/dist/utils/index.d.mts +2 -2
  151. package/dist/utils/index.d.ts +2 -2
  152. package/dist/utils/index.js +44 -4
  153. package/dist/utils/index.js.map +1 -1
  154. package/package.json +1 -1
@@ -592,8 +592,10 @@ interface ListReleasesResult {
592
592
  * Fetches custom branding for the portal.
593
593
  * This function is cached per-request to avoid duplicate API calls when called
594
594
  * from multiple components (e.g., TopNav and page components).
595
+ *
596
+ * @param version - Optional branch/version name for version-specific branding
595
597
  */
596
- declare const fetchCustomBranding: () => Promise<CustomBrandingResponse>;
598
+ declare const fetchCustomBranding: (version?: string) => Promise<CustomBrandingResponse>;
597
599
  declare const decodeJwtPayload: (token: string) => Record<string, unknown>;
598
600
  /**
599
601
  * Extracts customer ID from JWT token. Throws if extraction fails.
@@ -592,8 +592,10 @@ interface ListReleasesResult {
592
592
  * Fetches custom branding for the portal.
593
593
  * This function is cached per-request to avoid duplicate API calls when called
594
594
  * from multiple components (e.g., TopNav and page components).
595
+ *
596
+ * @param version - Optional branch/version name for version-specific branding
595
597
  */
596
- declare const fetchCustomBranding: () => Promise<CustomBrandingResponse>;
598
+ declare const fetchCustomBranding: (version?: string) => Promise<CustomBrandingResponse>;
597
599
  declare const decodeJwtPayload: (token: string) => Record<string, unknown>;
598
600
  /**
599
601
  * Extracts customer ID from JWT token. Throws if extraction fails.
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@ export { PortalThemeOverrides, PortalThemeTokens, createPortalTheme, portalTheme
2
2
  import * as react from 'react';
3
3
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
  export { LicenseDetails, LicenseDetailsProps } from './license-details.mjs';
5
- export { C as Customer, c as TopNav, a as TopNavBranding, T as TopNavLink, b as TopNavProps, d as defaultTopNavLinks } from './top-nav-B2yA3PC7.mjs';
5
+ export { C as Customer, c as TopNav, a as TopNavBranding, T as TopNavLink, b as TopNavProps, d as defaultTopNavLinks } from './top-nav-Cf8zMq1A.mjs';
6
6
  export { a as UpdatesCard, U as UpdatesCardProps } from './updates-card-BbubBrVR.mjs';
7
7
  export { SupportCard } from './support-card.mjs';
8
8
  export { UserSettings, UserSettingsCustomer, UserSettingsNotification, UserSettingsProps, UserSettingsTeam, UserSettingsUser } from './user-settings.mjs';
@@ -10,10 +10,10 @@ export { UserSettingsCard } from './user-settings-card.mjs';
10
10
  export { a as TeamSettingsCard, T as TeamSettingsCardProps } from './team-settings-card-Dq1d9b5c.mjs';
11
11
  export { UpdateLayout } from './update-layout.mjs';
12
12
  export { ConvertToReleaseEntryOptions, DEFAULT_FAVICON, DEFAULT_PRIMARY_COLOR, DEFAULT_SECONDARY_COLOR, ReleaseNotesMode, UnauthorizedError, authenticatedFetch, convertToReleaseEntry, formatBytes, formatDate, formatDateShort, formatDateTime, formatDateTimeLocal, isHttpApiOrigin, isRedirectError, validateSession } from './utils/index.mjs';
13
- export { a as BackgroundType, B as BrandingResult, d as decodeBranding, n as normalizeColor, s as sanitizeUrlForCss } from './branding-DmsrDTNE.mjs';
13
+ export { a as BackgroundType, B as BrandingResult, d as decodeBranding, i as isDarkColor, n as normalizeColor, s as sanitizeUrlForCss } from './branding-C5H0L6Vi.mjs';
14
14
  export { U as UploadSupportBundleResult, u as uploadSupportBundleWithProgress } from './upload-with-progress-D760HthX.mjs';
15
15
  export { SetSamlSessionResult, handleSamlAcs, setSamlSessionImpl } from './api/saml.mjs';
16
- export { C as ChannelRelease, Z as CustomBrandingResponse, ad as DeleteSupportBundleInput, ae as DeleteSupportBundleResult, a1 as DownloadPortalRelease, ar as DownloadSBOMInput, ab as DownloadSupportBundleInput, ac as DownloadSupportBundleResult, F as FetchChannelReleasesResult, as as FetchCurrentUserInput, at as FetchCurrentUserResult, _ as FetchLicenseInput, $ as FetchLicenseResult, ay as FetchNotificationsInput, az as FetchNotificationsResult, an as GetSecurityInfoDiffInput, G as GetSecurityInfoDiffResult, ak as GetSecurityInfoInput, al as GetSecurityInfoResult, ap as GetSecurityInfoSBOMInput, aq as GetSecurityInfoSBOMResult, a3 as InitiateLoginInput, a4 as InitiateLoginResult, a2 as ListReleasesResult, a8 as ListSupportBundlesInput, a9 as ListSupportBundlesResult, ax as NotificationSetting, W as PortalActionContext, X as PortalActionVisibility, Y as PortalServerActionDefinition, a0 as ReleaseHelmChart, ao as SBOMMetadata, am as SecurityInfoDiff, ah as SecurityInstallType, S as SecurityReleaseImage, ai as SecurityScanSummary, aj as SecurityScanWrapper, aa as SupportBundleInsight, q as SupportBundleSummary, aA as UpdateNotificationsInput, aB as UpdateNotificationsResult, av as UpdateUserInput, aw as UpdateUserResult, af as UploadSupportBundleCompleteInput, ag as UploadSupportBundleCompleteResult, au as UserProfile, a7 as VerifyMagicLinkError, a5 as VerifyMagicLinkInput, a6 as VerifyMagicLinkResult, B as decodeJwtPayload, r as defineServerAction, y as deleteSupportBundle, O as downloadSecuritySBOM, x as downloadSupportBundle, Q as fetchCurrentUser, s as fetchCustomBranding, J as fetchDashboardComposite, T as fetchNotifications, E as getCustomerIdFromToken, K as getSecurityInfo, L as getSecurityInfoDiff, M as getSecurityInfoSBOM, A as getSupportBundleUploadUrl, v as initiateLogin, t as listReleases, w as listSupportBundles, V as updateNotifications, R as updateUser, z as uploadSupportBundle, H as verifyMagicLink } from './index-DaH1bSuO.mjs';
16
+ export { C as ChannelRelease, Z as CustomBrandingResponse, ad as DeleteSupportBundleInput, ae as DeleteSupportBundleResult, a1 as DownloadPortalRelease, ar as DownloadSBOMInput, ab as DownloadSupportBundleInput, ac as DownloadSupportBundleResult, F as FetchChannelReleasesResult, as as FetchCurrentUserInput, at as FetchCurrentUserResult, _ as FetchLicenseInput, $ as FetchLicenseResult, ay as FetchNotificationsInput, az as FetchNotificationsResult, an as GetSecurityInfoDiffInput, G as GetSecurityInfoDiffResult, ak as GetSecurityInfoInput, al as GetSecurityInfoResult, ap as GetSecurityInfoSBOMInput, aq as GetSecurityInfoSBOMResult, a3 as InitiateLoginInput, a4 as InitiateLoginResult, a2 as ListReleasesResult, a8 as ListSupportBundlesInput, a9 as ListSupportBundlesResult, ax as NotificationSetting, W as PortalActionContext, X as PortalActionVisibility, Y as PortalServerActionDefinition, a0 as ReleaseHelmChart, ao as SBOMMetadata, am as SecurityInfoDiff, ah as SecurityInstallType, S as SecurityReleaseImage, ai as SecurityScanSummary, aj as SecurityScanWrapper, aa as SupportBundleInsight, q as SupportBundleSummary, aA as UpdateNotificationsInput, aB as UpdateNotificationsResult, av as UpdateUserInput, aw as UpdateUserResult, af as UploadSupportBundleCompleteInput, ag as UploadSupportBundleCompleteResult, au as UserProfile, a7 as VerifyMagicLinkError, a5 as VerifyMagicLinkInput, a6 as VerifyMagicLinkResult, B as decodeJwtPayload, r as defineServerAction, y as deleteSupportBundle, O as downloadSecuritySBOM, x as downloadSupportBundle, Q as fetchCurrentUser, s as fetchCustomBranding, J as fetchDashboardComposite, T as fetchNotifications, E as getCustomerIdFromToken, K as getSecurityInfo, L as getSecurityInfoDiff, M as getSecurityInfoSBOM, A as getSupportBundleUploadUrl, v as initiateLogin, t as listReleases, w as listSupportBundles, V as updateNotifications, R as updateUser, z as uploadSupportBundle, H as verifyMagicLink } from './index-CITwEYtK.mjs';
17
17
  export { InitialSecurityData } from './security-card.mjs';
18
18
  export { C as CustomHostnameOverrides, E as EntitlementField, b as EntitlementValue, L as License, a as LicenseChannel, P as PortalLicenseField, f as fetchLicense } from './fetch-license-iTyF7_GY.mjs';
19
19
  import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { PortalThemeOverrides, PortalThemeTokens, createPortalTheme, portalTheme
2
2
  import * as react from 'react';
3
3
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
  export { LicenseDetails, LicenseDetailsProps } from './license-details.js';
5
- export { C as Customer, c as TopNav, a as TopNavBranding, T as TopNavLink, b as TopNavProps, d as defaultTopNavLinks } from './top-nav-8f2U69MF.js';
5
+ export { C as Customer, c as TopNav, a as TopNavBranding, T as TopNavLink, b as TopNavProps, d as defaultTopNavLinks } from './top-nav-B2FVC4rl.js';
6
6
  export { a as UpdatesCard, U as UpdatesCardProps } from './updates-card-BbubBrVR.js';
7
7
  export { SupportCard } from './support-card.js';
8
8
  export { UserSettings, UserSettingsCustomer, UserSettingsNotification, UserSettingsProps, UserSettingsTeam, UserSettingsUser } from './user-settings.js';
@@ -10,10 +10,10 @@ export { UserSettingsCard } from './user-settings-card.js';
10
10
  export { a as TeamSettingsCard, T as TeamSettingsCardProps } from './team-settings-card-Dq1d9b5c.js';
11
11
  export { UpdateLayout } from './update-layout.js';
12
12
  export { ConvertToReleaseEntryOptions, DEFAULT_FAVICON, DEFAULT_PRIMARY_COLOR, DEFAULT_SECONDARY_COLOR, ReleaseNotesMode, UnauthorizedError, authenticatedFetch, convertToReleaseEntry, formatBytes, formatDate, formatDateShort, formatDateTime, formatDateTimeLocal, isHttpApiOrigin, isRedirectError, validateSession } from './utils/index.js';
13
- export { a as BackgroundType, B as BrandingResult, d as decodeBranding, n as normalizeColor, s as sanitizeUrlForCss } from './branding-DmsrDTNE.js';
13
+ export { a as BackgroundType, B as BrandingResult, d as decodeBranding, i as isDarkColor, n as normalizeColor, s as sanitizeUrlForCss } from './branding-C5H0L6Vi.js';
14
14
  export { U as UploadSupportBundleResult, u as uploadSupportBundleWithProgress } from './upload-with-progress-D760HthX.js';
15
15
  export { SetSamlSessionResult, handleSamlAcs, setSamlSessionImpl } from './api/saml.js';
16
- export { C as ChannelRelease, Z as CustomBrandingResponse, ad as DeleteSupportBundleInput, ae as DeleteSupportBundleResult, a1 as DownloadPortalRelease, ar as DownloadSBOMInput, ab as DownloadSupportBundleInput, ac as DownloadSupportBundleResult, F as FetchChannelReleasesResult, as as FetchCurrentUserInput, at as FetchCurrentUserResult, _ as FetchLicenseInput, $ as FetchLicenseResult, ay as FetchNotificationsInput, az as FetchNotificationsResult, an as GetSecurityInfoDiffInput, G as GetSecurityInfoDiffResult, ak as GetSecurityInfoInput, al as GetSecurityInfoResult, ap as GetSecurityInfoSBOMInput, aq as GetSecurityInfoSBOMResult, a3 as InitiateLoginInput, a4 as InitiateLoginResult, a2 as ListReleasesResult, a8 as ListSupportBundlesInput, a9 as ListSupportBundlesResult, ax as NotificationSetting, W as PortalActionContext, X as PortalActionVisibility, Y as PortalServerActionDefinition, a0 as ReleaseHelmChart, ao as SBOMMetadata, am as SecurityInfoDiff, ah as SecurityInstallType, S as SecurityReleaseImage, ai as SecurityScanSummary, aj as SecurityScanWrapper, aa as SupportBundleInsight, q as SupportBundleSummary, aA as UpdateNotificationsInput, aB as UpdateNotificationsResult, av as UpdateUserInput, aw as UpdateUserResult, af as UploadSupportBundleCompleteInput, ag as UploadSupportBundleCompleteResult, au as UserProfile, a7 as VerifyMagicLinkError, a5 as VerifyMagicLinkInput, a6 as VerifyMagicLinkResult, B as decodeJwtPayload, r as defineServerAction, y as deleteSupportBundle, O as downloadSecuritySBOM, x as downloadSupportBundle, Q as fetchCurrentUser, s as fetchCustomBranding, J as fetchDashboardComposite, T as fetchNotifications, E as getCustomerIdFromToken, K as getSecurityInfo, L as getSecurityInfoDiff, M as getSecurityInfoSBOM, A as getSupportBundleUploadUrl, v as initiateLogin, t as listReleases, w as listSupportBundles, V as updateNotifications, R as updateUser, z as uploadSupportBundle, H as verifyMagicLink } from './index-Bcp17Mf3.js';
16
+ export { C as ChannelRelease, Z as CustomBrandingResponse, ad as DeleteSupportBundleInput, ae as DeleteSupportBundleResult, a1 as DownloadPortalRelease, ar as DownloadSBOMInput, ab as DownloadSupportBundleInput, ac as DownloadSupportBundleResult, F as FetchChannelReleasesResult, as as FetchCurrentUserInput, at as FetchCurrentUserResult, _ as FetchLicenseInput, $ as FetchLicenseResult, ay as FetchNotificationsInput, az as FetchNotificationsResult, an as GetSecurityInfoDiffInput, G as GetSecurityInfoDiffResult, ak as GetSecurityInfoInput, al as GetSecurityInfoResult, ap as GetSecurityInfoSBOMInput, aq as GetSecurityInfoSBOMResult, a3 as InitiateLoginInput, a4 as InitiateLoginResult, a2 as ListReleasesResult, a8 as ListSupportBundlesInput, a9 as ListSupportBundlesResult, ax as NotificationSetting, W as PortalActionContext, X as PortalActionVisibility, Y as PortalServerActionDefinition, a0 as ReleaseHelmChart, ao as SBOMMetadata, am as SecurityInfoDiff, ah as SecurityInstallType, S as SecurityReleaseImage, ai as SecurityScanSummary, aj as SecurityScanWrapper, aa as SupportBundleInsight, q as SupportBundleSummary, aA as UpdateNotificationsInput, aB as UpdateNotificationsResult, av as UpdateUserInput, aw as UpdateUserResult, af as UploadSupportBundleCompleteInput, ag as UploadSupportBundleCompleteResult, au as UserProfile, a7 as VerifyMagicLinkError, a5 as VerifyMagicLinkInput, a6 as VerifyMagicLinkResult, B as decodeJwtPayload, r as defineServerAction, y as deleteSupportBundle, O as downloadSecuritySBOM, x as downloadSupportBundle, Q as fetchCurrentUser, s as fetchCustomBranding, J as fetchDashboardComposite, T as fetchNotifications, E as getCustomerIdFromToken, K as getSecurityInfo, L as getSecurityInfoDiff, M as getSecurityInfoSBOM, A as getSupportBundleUploadUrl, v as initiateLogin, t as listReleases, w as listSupportBundles, V as updateNotifications, R as updateUser, z as uploadSupportBundle, H as verifyMagicLink } from './index-7ibNULXY.js';
17
17
  export { InitialSecurityData } from './security-card.js';
18
18
  export { C as CustomHostnameOverrides, E as EntitlementField, b as EntitlementValue, L as License, a as LicenseChannel, P as PortalLicenseField, f as fetchLicense } from './fetch-license-iTyF7_GY.js';
19
19
  import 'react/jsx-runtime';
package/dist/index.js CHANGED
@@ -127,7 +127,7 @@ var init_tracer = __esm({
127
127
 
128
128
  // package.json
129
129
  var package_default = {
130
- version: "0.0.27"};
130
+ version: "0.0.29"};
131
131
 
132
132
  // src/tokens/index.ts
133
133
  var baseTokens = {
@@ -562,14 +562,17 @@ var verifyMagicLink = defineServerAction({
562
562
  return { token, raw: payload };
563
563
  }
564
564
  });
565
- var fetchCustomBrandingImpl = async () => {
565
+ var fetchCustomBrandingImpl = async (version) => {
566
566
  const appSlug = process.env.PORTAL_APP_SLUG;
567
567
  if (!appSlug) {
568
568
  throw new Error("PORTAL_APP_SLUG is not configured");
569
569
  }
570
- const url = `${getApiOrigin()}/enterprise-portal/public/branding?app_slug=${encodeURIComponent(
570
+ let url = `${getApiOrigin()}/enterprise-portal/public/branding?app_slug=${encodeURIComponent(
571
571
  appSlug
572
572
  )}`;
573
+ if (version) {
574
+ url += `&version=${encodeURIComponent(version)}`;
575
+ }
573
576
  if (process.env.NODE_ENV !== "production") {
574
577
  console.debug(
575
578
  "[portal-components] fetching custom branding via %s (Enterprise Portal API)",
@@ -598,7 +601,14 @@ var fetchCustomBrandingImpl = async () => {
598
601
  background: payload.background,
599
602
  backgroundImage: payload.backgroundImage,
600
603
  customColor1: payload.customColor1,
601
- customColor2: payload.customColor2
604
+ customColor2: payload.customColor2,
605
+ headerColor: payload.headerColor,
606
+ headerGradientEnd: payload.headerGradientEnd,
607
+ sidebarColor: payload.sidebarColor,
608
+ sidebarGradientEnd: payload.sidebarGradientEnd,
609
+ contentBackgroundColor: payload.contentBackgroundColor,
610
+ contentBackgroundGradientEnd: payload.contentBackgroundGradientEnd,
611
+ customCSS: payload.customCSS
602
612
  };
603
613
  const brandingData = buffer.Buffer.from(JSON.stringify(brandingObject)).toString("base64");
604
614
  return {
@@ -1574,6 +1584,21 @@ var sanitizeUrlForCss = (url) => {
1574
1584
  const escaped = trimmed.replace(/\\/g, "\\\\").replace(/\)/g, "\\)").replace(/"/g, '\\"').replace(/'/g, "\\'").replace(/[\x00-\x1F\x7F]/g, "");
1575
1585
  return escaped;
1576
1586
  };
1587
+ var isDarkColor = (hex) => {
1588
+ if (!hex) return false;
1589
+ const normalized = normalizeColor(hex);
1590
+ if (!normalized) return false;
1591
+ let h = normalized.replace("#", "");
1592
+ if (h.length === 3) {
1593
+ h = h.charAt(0) + h.charAt(0) + h.charAt(1) + h.charAt(1) + h.charAt(2) + h.charAt(2);
1594
+ }
1595
+ const r = parseInt(h.substring(0, 2), 16) / 255;
1596
+ const g = parseInt(h.substring(2, 4), 16) / 255;
1597
+ const b = parseInt(h.substring(4, 6), 16) / 255;
1598
+ const toLinear = (c) => c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
1599
+ const luminance = 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);
1600
+ return luminance < 0.5;
1601
+ };
1577
1602
  var decodeBranding = ({ brandingData }) => {
1578
1603
  if (!brandingData || typeof brandingData !== "string") {
1579
1604
  return {
@@ -1599,6 +1624,13 @@ var decodeBranding = ({ brandingData }) => {
1599
1624
  const backgroundImage = sanitizeUrlForCss(parsed.backgroundImage);
1600
1625
  const backgroundGradientStart = normalizeColor(parsed.customColor1);
1601
1626
  const backgroundGradientEnd = normalizeColor(parsed.customColor2);
1627
+ const headerColor = normalizeColor(parsed.headerColor);
1628
+ const headerGradientEnd = normalizeColor(parsed.headerGradientEnd);
1629
+ const sidebarColor = normalizeColor(parsed.sidebarColor);
1630
+ const sidebarGradientEnd = normalizeColor(parsed.sidebarGradientEnd);
1631
+ const contentBackgroundColor = normalizeColor(parsed.contentBackgroundColor);
1632
+ const contentBackgroundGradientEnd = normalizeColor(parsed.contentBackgroundGradientEnd);
1633
+ const customCSS = typeof parsed.customCSS === "string" ? parsed.customCSS : void 0;
1602
1634
  return {
1603
1635
  logo,
1604
1636
  title,
@@ -1610,7 +1642,14 @@ var decodeBranding = ({ brandingData }) => {
1610
1642
  background,
1611
1643
  backgroundImage,
1612
1644
  backgroundGradientStart,
1613
- backgroundGradientEnd
1645
+ backgroundGradientEnd,
1646
+ headerColor,
1647
+ headerGradientEnd,
1648
+ sidebarColor,
1649
+ sidebarGradientEnd,
1650
+ contentBackgroundColor,
1651
+ contentBackgroundGradientEnd,
1652
+ customCSS
1614
1653
  };
1615
1654
  } catch (error) {
1616
1655
  console.debug("[portal-components] unable to parse branding JSON", error);
@@ -1623,10 +1662,13 @@ var decodeBranding = ({ brandingData }) => {
1623
1662
  function UserMenuDropdown({
1624
1663
  displayLabel,
1625
1664
  children,
1626
- className = ""
1665
+ className = "",
1666
+ dark = false
1627
1667
  }) {
1668
+ const summaryClass = dark ? "flex cursor-pointer items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium text-white/90 hover:bg-white/10 transition-colors list-none border border-transparent hover:border-white/20" : "flex cursor-pointer items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors list-none border border-transparent hover:border-gray-200";
1669
+ const chevronClass = dark ? "h-4 w-4 text-white/50 transition-transform group-open:rotate-180" : "h-4 w-4 text-gray-500 transition-transform group-open:rotate-180";
1628
1670
  return /* @__PURE__ */ jsxRuntime.jsxs("details", { className: `group relative ${className}`, children: [
1629
- /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex cursor-pointer items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors list-none border border-transparent hover:border-gray-200", children: [
1671
+ /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: summaryClass, children: [
1630
1672
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }),
1631
1673
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: displayLabel }),
1632
1674
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1641,7 +1683,7 @@ function UserMenuDropdown({
1641
1683
  strokeWidth: "2",
1642
1684
  strokeLinecap: "round",
1643
1685
  strokeLinejoin: "round",
1644
- className: "h-4 w-4 text-gray-500 transition-transform group-open:rotate-180",
1686
+ className: chevronClass,
1645
1687
  children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" })
1646
1688
  }
1647
1689
  )
@@ -2829,6 +2871,7 @@ exports.getSecurityInfoSBOM = getSecurityInfoSBOM;
2829
2871
  exports.getSupportBundleUploadUrl = getSupportBundleUploadUrl;
2830
2872
  exports.handleSamlAcs = handleSamlAcs;
2831
2873
  exports.initiateLogin = initiateLogin;
2874
+ exports.isDarkColor = isDarkColor;
2832
2875
  exports.isHttpApiOrigin = isHttpApiOrigin;
2833
2876
  exports.isRedirectError = isRedirectError;
2834
2877
  exports.listReleases = listReleases;