@bcrumbs.net/inbox 0.0.64 → 0.0.65

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 (143) hide show
  1. package/assets/ar/inbox.json +37 -6
  2. package/assets/en/inbox.json +37 -6
  3. package/e2e/checkout/checkout.flows.d.ts +6 -0
  4. package/e2e/support/auth.d.ts +7 -3
  5. package/index.cjs.js +38317 -1108
  6. package/index.esm.js +38320 -1111
  7. package/package.json +1 -1
  8. package/src/app/ai/components/Crumby/CrumbyChatError.d.ts +9 -0
  9. package/src/app/ai/components/Crumby/CrumbyChatErrorBoundary.d.ts +13 -0
  10. package/src/app/ai/components/Crumby/CrumbyHeader.d.ts +9 -0
  11. package/src/app/ai/components/Crumby/CrumbyPageContext.d.ts +22 -0
  12. package/src/app/ai/components/Crumby/CrumbyRuntimeProvider.d.ts +9 -0
  13. package/src/app/ai/components/CrumbySettings/CrumbyEditsBanner.d.ts +14 -0
  14. package/src/app/ai/components/CrumbySettings/VoiceSettingsSection.d.ts +9 -0
  15. package/src/app/ai/components/playground/Button.d.ts +1 -1
  16. package/src/app/ai/components/playground/TooltipIconButton.d.ts +1 -1
  17. package/src/app/ai/components/sources/mediaTypeForFile.d.ts +8 -0
  18. package/src/app/ai/config/promptSettings.d.ts +31 -0
  19. package/src/app/ai/hooks/usePromptCopilot.d.ts +22 -0
  20. package/src/app/ai/tools/PromptEditorTool.d.ts +2 -0
  21. package/src/app/ai/types/index.d.ts +1 -1
  22. package/src/app/ai/utils/clientToolResubmit.d.ts +8 -0
  23. package/src/app/ai/utils/crumbyChatFetch.d.ts +15 -0
  24. package/src/app/auth/components/password-page/AuthPasswordPageLayout.d.ts +3 -1
  25. package/src/app/auth/components/password-page/PasswordSuccessView.d.ts +2 -1
  26. package/src/app/auth/config/authProvider.d.ts +20 -2
  27. package/src/app/auth/config/clerkAppearance.d.ts +51 -52
  28. package/src/app/auth/pages/Login.d.ts +1 -1
  29. package/src/app/auth/pages/Register.d.ts +1 -0
  30. package/src/app/billing/pages/GatewayWelcomePage.d.ts +4 -1
  31. package/src/app/broadcast/components/BroadcastAnalysisReciepientsHeader.d.ts +2 -1
  32. package/src/app/broadcast/components/BroadcastDetailsSection.d.ts +3 -1
  33. package/src/app/dashboard/components/AgentCard.d.ts +2 -1
  34. package/src/app/dashboard/components/AgentsCard.d.ts +4 -2
  35. package/src/app/dashboard/components/BroadcastDashboard.d.ts +3 -1
  36. package/src/app/dashboard/components/ChatsByLifeCycleCard.d.ts +13 -0
  37. package/src/app/dashboard/components/DashboardFilters.d.ts +27 -0
  38. package/src/app/dashboard/components/DashboardPdfCaptureArea.d.ts +11 -0
  39. package/src/app/dashboard/components/DashboardPdfExportButton.d.ts +7 -0
  40. package/src/app/dashboard/components/DashboardPdfHeader.d.ts +11 -0
  41. package/src/app/dashboard/components/DashboardSections.d.ts +7 -2
  42. package/src/app/dashboard/components/InboxDashboard.d.ts +3 -1
  43. package/src/app/dashboard/hooks/useDashboardPdfMeta.d.ts +31 -0
  44. package/src/app/dashboard/hooks/useDashboardTabsPdfExport.d.ts +26 -0
  45. package/src/app/dashboard/utils/dashboardReportExports.d.ts +16 -1
  46. package/src/app/dashboard/utils/exportDashboardPdf.d.ts +19 -0
  47. package/src/app/dashboard/utils/lifecycleStages.d.ts +53 -0
  48. package/src/app/dashboard/utils/reportHelpers.d.ts +9 -0
  49. package/src/app/gatewayHome/components/ChecklistStep.d.ts +15 -0
  50. package/src/app/gatewayHome/components/CreditBalanceCard.d.ts +6 -0
  51. package/src/app/gatewayHome/components/MessageStats.d.ts +5 -0
  52. package/src/app/gatewayHome/components/SetupChecklist.d.ts +11 -0
  53. package/src/app/gatewayHome/components/console/QuickstartConsole.d.ts +11 -0
  54. package/src/app/gatewayHome/components/console/RunRequestBar.d.ts +15 -0
  55. package/src/app/gatewayHome/components/console/consoleStyles.d.ts +77 -0
  56. package/src/app/gatewayHome/components/steps/ApiKeyStepBody.d.ts +8 -0
  57. package/src/app/gatewayHome/components/steps/ChannelStepBody.d.ts +3 -0
  58. package/src/app/gatewayHome/components/steps/MetaStepBody.d.ts +6 -0
  59. package/src/app/gatewayHome/components/steps/WebhookStepBody.d.ts +7 -0
  60. package/src/app/gatewayHome/components/styles.d.ts +29 -0
  61. package/src/app/gatewayHome/config/constants.d.ts +22 -0
  62. package/src/app/gatewayHome/hooks/useGatewaySetup.d.ts +59 -0
  63. package/src/app/gatewayHome/hooks/useMessageStats.d.ts +17 -0
  64. package/src/app/gatewayHome/hooks/useQuickstartRequest.d.ts +31 -0
  65. package/src/app/gatewayHome/hooks/useSendableTemplates.d.ts +9 -0
  66. package/src/app/gatewayHome/pages/GatewayHomePage.d.ts +1 -0
  67. package/src/app/gatewayHome/types/index.d.ts +21 -0
  68. package/src/app/gatewayHome/utils/buildRequestBody.d.ts +7 -0
  69. package/src/app/gatewayHome/utils/buildSnippet.d.ts +9 -0
  70. package/src/app/gatewayHome/utils/sendTestMessage.d.ts +3 -0
  71. package/src/app/gatewayHome/utils/setupStorage.d.ts +8 -0
  72. package/src/app/gatewayHome/utils/templateHasParameters.d.ts +6 -0
  73. package/src/app/generic/components/HeaderImageInput.d.ts +3 -1
  74. package/src/app/generic/components/MessagePreview.d.ts +1 -1
  75. package/src/app/generic/components/PreviewHeaderDocument.d.ts +5 -0
  76. package/src/app/generic/utils/chunkErrorRecovery.d.ts +7 -0
  77. package/src/app/generic/utils/onesignal.d.ts +13 -0
  78. package/src/app/inbox/calls/useIncomingCallAlerts.d.ts +2 -0
  79. package/src/app/inbox/components/Calls/ActiveCallControls.d.ts +6 -0
  80. package/src/app/inbox/components/Calls/IncomingCallBanner.d.ts +6 -0
  81. package/src/app/inbox/components/Chat/QuickReplyEmpty.d.ts +5 -0
  82. package/src/app/inbox/components/Chat/QuickReplyPickerMenu.d.ts +2 -2
  83. package/src/app/inbox/components/NewDetails/ClientSection.d.ts +3 -1
  84. package/src/app/inbox/components/NewDetails/SuggestedAssignee.d.ts +7 -0
  85. package/src/app/inbox/components/NewDetails/SuggestedStage.d.ts +13 -0
  86. package/src/app/inbox/components/NewDetails/SuggestedTags.d.ts +18 -0
  87. package/src/app/inbox/components/NewDetails/SuggestionItems.d.ts +16 -0
  88. package/src/app/inbox/constants/index.d.ts +1 -0
  89. package/src/app/inbox/context/CallSession.d.ts +16 -0
  90. package/src/app/inbox/context/SuggestionsContext.d.ts +25 -0
  91. package/src/app/inbox/hooks/useAgentSuggestions.d.ts +20 -0
  92. package/src/app/inbox/hooks/useApplySuggestion.d.ts +18 -0
  93. package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +30 -0
  94. package/src/app/inbox/hooks/useIncomingCallAlerts.d.ts +2 -0
  95. package/src/app/inbox/hooks/useNewSortedEvents.d.ts +1 -1
  96. package/src/app/inbox/hooks/useQuickReplyPicker.d.ts +5 -3
  97. package/src/app/inbox/pages/InboxPage.d.ts +1 -1
  98. package/src/app/inbox/utils/callUi.d.ts +25 -0
  99. package/src/app/inbox/utils/convSuggestions.d.ts +59 -0
  100. package/src/app/inbox/utils/convSuggestionsStorage.d.ts +20 -0
  101. package/src/app/inbox/utils/sounds.d.ts +2 -0
  102. package/src/app/layout/hooks/useCallsEnabled.d.ts +1 -0
  103. package/src/app/layout/hooks/useGatewayPlanEnabled.d.ts +5 -0
  104. package/src/app/layout/hooks/useWebchatEnabled.d.ts +5 -0
  105. package/src/app/managemnet/components/channels/ChannelItem.d.ts +2 -1
  106. package/src/app/managemnet/components/channels/ChannelSettingsDrawer.d.ts +15 -0
  107. package/src/app/managemnet/components/channels/ShareChannelLinkDialog.d.ts +11 -0
  108. package/src/app/managemnet/components/channels/WebChatSnippetBlock.d.ts +7 -0
  109. package/src/app/managemnet/config/webchat.d.ts +5 -0
  110. package/src/app/managemnet/pages/connectChannel/ConnectChannel.d.ts +2 -0
  111. package/src/app/managemnet/pages/generalSettings/NoiseFilterSettings.d.ts +8 -0
  112. package/src/app/managemnet/pages/generalSettings/noiseFilterConstants.d.ts +24 -0
  113. package/src/app/managemnet/utils/webChatSnippet.d.ts +2 -0
  114. package/src/app/onboarding/components/OnboardingView.d.ts +3 -1
  115. package/src/app/onboarding/components/useOnboardingChecklist.d.ts +12 -9
  116. package/src/app/onboarding/constants/workspaceProfileOptions.d.ts +30 -0
  117. package/src/app/onboarding/utils/onboardingApi.d.ts +23 -0
  118. package/src/app/onboarding/utils/onboardingChecklistStorage.d.ts +42 -49
  119. package/src/app/resources/components/Integrations/ChannelDialogLayout.d.ts +6 -1
  120. package/src/app/resources/components/Integrations/RenderCorrectIntegrationFlow.d.ts +3 -1
  121. package/src/app/resources/components/Integrations/WebChat/index.d.ts +8 -0
  122. package/src/app/resources/components/Integrations/WhatsApp/index.d.ts +1 -0
  123. package/src/app/resources/hooks/useFBPagesHook.d.ts +4 -2
  124. package/src/app/resources/hooks/useWabaHook.d.ts +5 -4
  125. package/src/app/resources/utils/channelSetupTracking.d.ts +21 -0
  126. package/src/app/resources/utils/facebookSdk.d.ts +11 -0
  127. package/src/app/subscriptions/components/NewSubscription/OnboardingStepper.d.ts +2 -2
  128. package/src/app/subscriptions/components/NewSubscription/SubscriptionName.d.ts +2 -0
  129. package/src/app/subscriptions/components/NewSubscription/WorkspaceProfile.d.ts +18 -0
  130. package/src/app/subscriptions/components/NewSubscription/WorkspaceStepLayout.d.ts +5 -2
  131. package/src/app/subscriptions/hooks/useWorkspaceProfileSubmit.d.ts +12 -0
  132. package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +8 -0
  133. package/src/assets/locales/translations.d.ts +319 -20
  134. package/src/config/constants.d.ts +1 -2
  135. package/src/graphql.autogenerated.d.ts +1907 -117
  136. package/src/testUtils/bcUiMock.d.ts +16 -0
  137. package/src/utils/colorPool.d.ts +1 -2
  138. package/src/utils/getActiveChannelList.d.ts +6 -1
  139. package/src/utils/globalHelper.d.ts +22 -0
  140. package/src/app/billing/pages/GuidePage.d.ts +0 -1
  141. package/src/app/contact/components/ImportProgressDialog.d.ts +0 -14
  142. package/src/app/managemnet/components/channels/EditChannelDialog.d.ts +0 -11
  143. package/src/app/onboarding/utils/onboardingChecklistPersistence.d.ts +0 -18
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bcrumbs.net/inbox",
3
3
  "description": "Inbox widget for Bread Crumbs portals",
4
- "version": "0.0.64",
4
+ "version": "0.0.65",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ export type CrumbyChatErrorProps = {
3
+ rtl: boolean;
4
+ onClose: () => void;
5
+ /** Starts a fresh chat session in place of the crashed one. */
6
+ onRestart: () => void;
7
+ };
8
+ /** Shown in the Crumby panel when the chat crashed, instead of blanking the portal. */
9
+ export declare const CrumbyChatError: FC<CrumbyChatErrorProps>;
@@ -0,0 +1,13 @@
1
+ import { type ReactElement, type ReactNode } from 'react';
2
+ type RenderFallback = (resetError: () => void) => ReactElement | null;
3
+ type CrumbyChatErrorBoundaryProps = {
4
+ /** Rendered after a crash (null while the panel is closed); `resetError` remounts the children, i.e. a fresh chat runtime. */
5
+ renderFallback: RenderFallback;
6
+ children: ReactNode;
7
+ };
8
+ /**
9
+ * Keeps a Crumby chat render crash (e.g. assistant-ui losing a message mid-render after a
10
+ * failed run) inside the chat panel instead of unmounting the whole portal into a white page.
11
+ */
12
+ export declare const CrumbyChatErrorBoundary: ({ renderFallback, children }: CrumbyChatErrorBoundaryProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ export type CrumbyHeaderProps = {
3
+ rtl: boolean;
4
+ onClose: () => void;
5
+ /** When set, shows a back arrow (e.g. back to the onboarding checklist). */
6
+ onBack?: () => void;
7
+ };
8
+ /** Crumby panel header: optional back arrow, brand, close button. */
9
+ export declare const CrumbyHeader: FC<CrumbyHeaderProps>;
@@ -0,0 +1,22 @@
1
+ import { type MutableRefObject } from 'react';
2
+ import type { PromptSectionChange, PromptSectionsUpdateResult, PromptState } from '../../config/promptSettings';
3
+ /** Lets Crumby read and edit the Prompt settings form while that page is mounted. */
4
+ export type PromptEditorBridge = {
5
+ getSections: () => PromptState;
6
+ applyChanges: (changes: PromptSectionChange[]) => PromptSectionsUpdateResult;
7
+ };
8
+ type CrumbyPageContextValue = {
9
+ /** Ref (not state) so the chat transport always reads the latest page values at send time. */
10
+ promptEditorRef: MutableRefObject<PromptEditorBridge | null>;
11
+ isPromptEditorActive: boolean;
12
+ registerPromptEditor: (bridge: PromptEditorBridge) => () => void;
13
+ /** Increments on every open request; the widget opens its chat when it changes. */
14
+ openRequestId: number;
15
+ requestOpen: () => void;
16
+ };
17
+ /** Shares page-level state between portal pages and the Crumby widget mounted in the layout. */
18
+ export declare const CrumbyPageProvider: ({ children }: {
19
+ children: React.ReactNode;
20
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
21
+ export declare const useCrumbyPageContext: () => CrumbyPageContextValue;
22
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type CrumbyRuntimeProviderProps = {
3
+ api: string;
4
+ userId?: string;
5
+ children: React.ReactNode;
6
+ };
7
+ /** Chat runtime for the Crumby widget, wired to the crumby-assist gateway endpoint. */
8
+ export declare const CrumbyRuntimeProvider: ({ api, userId, children }: CrumbyRuntimeProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { PromptKey } from '../../config/promptSettings';
2
+ type CrumbyEditsBannerProps = {
3
+ editedSections: PromptKey[];
4
+ canUndo: boolean;
5
+ onUndo: () => void;
6
+ onDiscard: () => void;
7
+ onSave: () => void;
8
+ saveDisabled: boolean;
9
+ saving: boolean;
10
+ rtl?: boolean;
11
+ };
12
+ /** Tells the user Crumby changed prompt sections and offers save / undo / discard. */
13
+ declare const CrumbyEditsBanner: ({ editedSections, canUndo, onUndo, onDiscard, onSave, saveDisabled, saving, rtl, }: CrumbyEditsBannerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
14
+ export default CrumbyEditsBanner;
@@ -0,0 +1,9 @@
1
+ type Props = {
2
+ language: string;
3
+ voiceId: string;
4
+ voiceName: string;
5
+ onLanguageChange: (language: string) => void;
6
+ onVoiceChange: (voiceId: string, voiceName: string) => void;
7
+ };
8
+ declare const VoiceSettingsSection: ({ language, voiceId, voiceName, onLanguageChange, onVoiceChange }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export default VoiceSettingsSection;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "outline" | "default" | "ghost" | null | undefined;
4
+ variant?: "default" | "outline" | "ghost" | null | undefined;
5
5
  size?: "default" | "icon" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -5,7 +5,7 @@ export type TooltipIconButtonProps = ComponentPropsWithoutRef<typeof Button> & {
5
5
  side?: "top" | "bottom" | "left" | "right";
6
6
  };
7
7
  export declare const TooltipIconButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("class-variance-authority").VariantProps<(props?: ({
8
- variant?: "outline" | "default" | "ghost" | null | undefined;
8
+ variant?: "default" | "outline" | "ghost" | null | undefined;
9
9
  size?: "default" | "icon" | null | undefined;
10
10
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & {
11
11
  asChild?: boolean | undefined;
@@ -0,0 +1,8 @@
1
+ import { MediaType } from '../../../../graphql.autogenerated';
2
+ interface UploadType {
3
+ mediaType: MediaType;
4
+ contentType: string;
5
+ }
6
+ export declare function uploadTypeForFile(fileName: string): UploadType;
7
+ export declare function fileWithContentType(file: File, contentType: string): File;
8
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { ConfigurationsInput } from '../../../graphql.autogenerated';
2
+ export type PromptKey = 'contextPrompt' | 'rolePrompt' | 'personaPrompt' | 'workflowPrompt' | 'constraints';
3
+ export type PromptState = Record<PromptKey, string>;
4
+ export type PromptSectionChange = {
5
+ section: PromptKey;
6
+ value: string;
7
+ };
8
+ export type PromptSectionsUpdateResult = {
9
+ ok: true;
10
+ updatedSections: PromptKey[];
11
+ } | {
12
+ ok: false;
13
+ error: string;
14
+ };
15
+ export declare const PROMPT_FIELDS: PromptKey[];
16
+ export declare const PROMPT_CHARACTER_LIMITS: Record<PromptKey, number>;
17
+ export declare const EMPTY_PROMPTS: PromptState;
18
+ /** Must match PROMPT_EDITOR_PAGE / UPDATE_PROMPT_SECTIONS_TOOL in the bot's crumby-assistance prompt editor. */
19
+ export declare const PROMPT_EDITOR_PAGE = "aiPromptSettings";
20
+ export declare const UPDATE_PROMPT_SECTIONS_TOOL = "updatePromptSections";
21
+ export declare const isPromptKey: (value: unknown) => value is PromptKey;
22
+ export declare const getPromptState: (configuration?: {
23
+ contextPrompt?: string | null | undefined;
24
+ rolePrompt?: string | null | undefined;
25
+ personaPrompt?: string | null | undefined;
26
+ workflowPrompt?: string | null | undefined;
27
+ constraints?: string | null | undefined;
28
+ } | null | undefined) => PromptState;
29
+ export declare const getPromptConfigurationInput: (prompts: PromptState) => Pick<ConfigurationsInput, PromptKey>;
30
+ /** Validates Crumby's proposed section changes; returns an error message the model can act on, or null. */
31
+ export declare const validatePromptSectionChanges: (changes: unknown) => string | null;
@@ -0,0 +1,22 @@
1
+ import { type Dispatch, type SetStateAction } from 'react';
2
+ import { type PromptKey, type PromptState } from '../config/promptSettings';
3
+ type UsePromptCopilotOptions = {
4
+ prompts: PromptState;
5
+ setPrompts: Dispatch<SetStateAction<PromptState>>;
6
+ /** Last saved values; a new object here (save / refetch) resets Crumby's edit history. */
7
+ savedPrompts: PromptState;
8
+ /** Register with Crumby only once the saved values are loaded, so loading can't overwrite edits. */
9
+ enabled: boolean;
10
+ };
11
+ /**
12
+ * Connects the Prompt settings form to Crumby: Crumby's edits land as unsaved changes
13
+ * that the user can save, undo step by step, revert per section, or discard.
14
+ */
15
+ declare const usePromptCopilot: ({ prompts, setPrompts, savedPrompts, enabled }: UsePromptCopilotOptions) => {
16
+ crumbyEditedSections: PromptKey[];
17
+ canUndo: boolean;
18
+ undoLast: () => void;
19
+ revertSection: (key: PromptKey) => void;
20
+ discardAll: () => void;
21
+ };
22
+ export default usePromptCopilot;
@@ -0,0 +1,2 @@
1
+ /** Registers the client-executed tool that writes Crumby's edits into the Prompt settings form. */
2
+ export declare const PromptEditorTool: () => null;
@@ -43,7 +43,7 @@ export interface SourcesSummary {
43
43
  size: number;
44
44
  };
45
45
  }
46
- export type SupportedFileType = 'TXT' | 'MD' | 'JSON' | 'HTML';
46
+ export type SupportedFileType = 'TXT' | 'MD' | 'JSON' | 'HTML' | 'PDF';
47
47
  export interface FileValidationResult {
48
48
  isValid: boolean;
49
49
  error?: string;
@@ -0,0 +1,8 @@
1
+ import { type UIMessage } from 'ai';
2
+ /**
3
+ * `sendAutomaticallyWhen` for the Crumby chat: resubmit only after our client tool produced its output.
4
+ * Server tools finish inside the same request, so resubmitting for them would loop.
5
+ */
6
+ export declare const shouldResubmitAfterClientTool: ({ messages }: {
7
+ messages: UIMessage[];
8
+ }) => boolean;
@@ -0,0 +1,15 @@
1
+ type FetchFn = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
2
+ type CrumbyChatFetchOptions = {
3
+ /** Token for each request; defaults to the live Clerk JWT, falling back to the stored token. */
4
+ getToken?: () => Promise<string | null | undefined>;
5
+ /** Forced refresh used once after a 401. */
6
+ refreshToken?: () => Promise<string | null>;
7
+ fetchImpl?: FetchFn;
8
+ };
9
+ /**
10
+ * Fetch for the Crumby chat transport. The chat runtime is created once and outlives the
11
+ * short-lived (~60s) Clerk JWT, so the token is read per request instead of being baked
12
+ * into the transport headers. A 401 gets one retry with a force-refreshed token.
13
+ */
14
+ export declare const createCrumbyChatFetch: ({ getToken, refreshToken, fetchImpl, }?: CrumbyChatFetchOptions) => FetchFn;
15
+ export {};
@@ -2,6 +2,8 @@ import { ReactNode } from 'react';
2
2
  type AuthPasswordPageLayoutProps = {
3
3
  children: ReactNode;
4
4
  backgroundImage?: string;
5
+ cardMaxWidth?: number;
6
+ showLanguagePicker?: boolean;
5
7
  };
6
- export declare function AuthPasswordPageLayout({ children, backgroundImage }: AuthPasswordPageLayoutProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare function AuthPasswordPageLayout({ children, backgroundImage, cardMaxWidth, showLanguagePicker, }: AuthPasswordPageLayoutProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -3,6 +3,7 @@ type PasswordSuccessViewProps = {
3
3
  subtitle: string;
4
4
  actionLabel?: string;
5
5
  onAction?: () => void;
6
+ hideIcon?: boolean;
6
7
  };
7
- export declare function PasswordSuccessView({ title, subtitle, actionLabel, onAction }: PasswordSuccessViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare function PasswordSuccessView({ title, subtitle, actionLabel, onAction, hideIcon }: PasswordSuccessViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -1,4 +1,13 @@
1
1
  import type { AuthProvider } from '../../../environments/types';
2
+ export declare const CLERK_ENABLED_FLAG = "clerk_enabled";
3
+ /**
4
+ * Pin the Clerk JS bundle to one version so the main script and the lazy chunks
5
+ * it loads always come from the same build. Without a pin, clerk-react asks the
6
+ * CDN for the floating `@5` script while that script requests version-pinned
7
+ * chunks; any drift makes the chunk fetch fail with ChunkLoadError. Keep this at
8
+ * the latest Clerk JS v5, which matches @clerk/clerk-react v5.
9
+ */
10
+ export declare const CLERK_JS_VERSION = "5.127.2";
2
11
  /**
3
12
  * Selects the frontend auth UI provider. Runtime window._env_ overrides build-time
4
13
  * environment so deployments can flip without a rebuild.
@@ -6,7 +15,16 @@ import type { AuthProvider } from '../../../environments/types';
6
15
  export declare function getAuthProvider(): AuthProvider;
7
16
  export declare function getClerkPublishableKey(): string | undefined;
8
17
  /**
9
- * Clerk UI is only mounted when selected and a publishable key is present, matching
10
- * the auth service's isClerkEnabled() gate.
18
+ * Clerk UI is mounted when a publishable key is present and the PostHog
19
+ * `clerk_enabled` boolean flag is true. Without PostHog, falls back to AUTH_PROVIDER.
11
20
  */
12
21
  export declare function isClerkAuthEnabled(): boolean;
22
+ export type ClerkAuthGate = {
23
+ ready: boolean;
24
+ enabled: boolean;
25
+ };
26
+ /**
27
+ * Subscribes to PostHog feature flags so Clerk vs legacy UI updates when
28
+ * `clerk_enabled` loads or changes. When PostHog is off, `ready` is immediate.
29
+ */
30
+ export declare function useClerkAuthEnabled(): ClerkAuthGate;
@@ -1,12 +1,11 @@
1
- import { FontFamilyStack } from '@bcrumbs.net/bc-ui';
2
1
  /**
3
2
  * Clerk UI theme aligned with legacy auth pages.
4
3
  * Uses --bc-font-stack-poppins so Arabic (lang=ar) swaps to AvenirArabic.
5
4
  */
6
5
  export declare const clerkAppearance: {
7
6
  variables: {
8
- fontFamily: FontFamilyStack;
9
- fontFamilyButtons: FontFamilyStack;
7
+ fontFamily: "var(--fontFamily-poppins)";
8
+ fontFamilyButtons: "var(--fontFamily-poppins)";
10
9
  fontSize: string;
11
10
  colorPrimary: string;
12
11
  colorTextOnPrimaryBackground: string;
@@ -25,7 +24,7 @@ export declare const clerkAppearance: {
25
24
  card: {
26
25
  boxShadow: string;
27
26
  width: string;
28
- fontFamily: FontFamilyStack;
27
+ fontFamily: "var(--fontFamily-poppins)";
29
28
  paddingTop: string;
30
29
  paddingBottom: string;
31
30
  };
@@ -34,27 +33,27 @@ export declare const clerkAppearance: {
34
33
  paddingTop: string;
35
34
  };
36
35
  headerTitle: {
37
- fontFamily: FontFamilyStack;
36
+ fontFamily: "var(--fontFamily-poppins)";
38
37
  fontSize: string;
39
38
  fontWeight: string;
40
39
  lineHeight: string;
41
40
  color: string;
42
41
  };
43
42
  headerSubtitle: {
44
- fontFamily: FontFamilyStack;
43
+ fontFamily: "var(--fontFamily-poppins)";
45
44
  fontSize: string;
46
45
  fontWeight: string;
47
46
  lineHeight: string;
48
47
  color: string;
49
48
  };
50
49
  formFieldLabel: {
51
- fontFamily: FontFamilyStack;
50
+ fontFamily: "var(--fontFamily-poppins)";
52
51
  fontSize: string;
53
52
  fontWeight: string;
54
53
  color: string;
55
54
  };
56
55
  formFieldInput: {
57
- fontFamily: FontFamilyStack;
56
+ fontFamily: "var(--fontFamily-poppins)";
58
57
  fontSize: string;
59
58
  fontWeight: string;
60
59
  height: string;
@@ -78,7 +77,7 @@ export declare const clerkAppearance: {
78
77
  color: string;
79
78
  };
80
79
  formButtonPrimary: {
81
- fontFamily: FontFamilyStack;
80
+ fontFamily: "var(--fontFamily-poppins)";
82
81
  fontSize: string;
83
82
  fontWeight: string;
84
83
  lineHeight: string;
@@ -109,7 +108,7 @@ export declare const clerkAppearance: {
109
108
  gap: string;
110
109
  };
111
110
  socialButtonsBlockButton: {
112
- fontFamily: FontFamilyStack;
111
+ fontFamily: "var(--fontFamily-poppins)";
113
112
  fontSize: string;
114
113
  fontWeight: string;
115
114
  lineHeight: string;
@@ -128,7 +127,7 @@ export declare const clerkAppearance: {
128
127
  };
129
128
  };
130
129
  socialButtonsBlockButtonText: {
131
- fontFamily: FontFamilyStack;
130
+ fontFamily: "var(--fontFamily-poppins)";
132
131
  fontSize: string;
133
132
  fontWeight: string;
134
133
  };
@@ -137,7 +136,7 @@ export declare const clerkAppearance: {
137
136
  height: string;
138
137
  };
139
138
  lastAuthenticationStrategyBadge: {
140
- fontFamily: FontFamilyStack;
139
+ fontFamily: "var(--fontFamily-poppins)";
141
140
  fontSize: string;
142
141
  fontWeight: string;
143
142
  lineHeight: string;
@@ -149,27 +148,27 @@ export declare const clerkAppearance: {
149
148
  boxSizing: string;
150
149
  };
151
150
  footerActionText: {
152
- fontFamily: FontFamilyStack;
151
+ fontFamily: "var(--fontFamily-poppins)";
153
152
  fontSize: string;
154
153
  };
155
154
  footerActionLink: {
156
- fontFamily: FontFamilyStack;
155
+ fontFamily: "var(--fontFamily-poppins)";
157
156
  fontSize: string;
158
157
  };
159
158
  identityPreviewText: {
160
- fontFamily: FontFamilyStack;
159
+ fontFamily: "var(--fontFamily-poppins)";
161
160
  fontSize: string;
162
161
  };
163
162
  formFieldSuccessText: {
164
- fontFamily: FontFamilyStack;
163
+ fontFamily: "var(--fontFamily-poppins)";
165
164
  fontSize: string;
166
165
  };
167
166
  formFieldErrorText: {
168
- fontFamily: FontFamilyStack;
167
+ fontFamily: "var(--fontFamily-poppins)";
169
168
  fontSize: string;
170
169
  };
171
170
  dividerText: {
172
- fontFamily: FontFamilyStack;
171
+ fontFamily: "var(--fontFamily-poppins)";
173
172
  fontSize: string;
174
173
  };
175
174
  };
@@ -198,7 +197,7 @@ export declare const clerkSignInAppearance: {
198
197
  card: {
199
198
  boxShadow: string;
200
199
  width: string;
201
- fontFamily: FontFamilyStack;
200
+ fontFamily: "var(--fontFamily-poppins)";
202
201
  paddingTop: string;
203
202
  paddingBottom: string;
204
203
  };
@@ -207,27 +206,27 @@ export declare const clerkSignInAppearance: {
207
206
  paddingTop: string;
208
207
  };
209
208
  headerTitle: {
210
- fontFamily: FontFamilyStack;
209
+ fontFamily: "var(--fontFamily-poppins)";
211
210
  fontSize: string;
212
211
  fontWeight: string;
213
212
  lineHeight: string;
214
213
  color: string;
215
214
  };
216
215
  headerSubtitle: {
217
- fontFamily: FontFamilyStack;
216
+ fontFamily: "var(--fontFamily-poppins)";
218
217
  fontSize: string;
219
218
  fontWeight: string;
220
219
  lineHeight: string;
221
220
  color: string;
222
221
  };
223
222
  formFieldLabel: {
224
- fontFamily: FontFamilyStack;
223
+ fontFamily: "var(--fontFamily-poppins)";
225
224
  fontSize: string;
226
225
  fontWeight: string;
227
226
  color: string;
228
227
  };
229
228
  formFieldInput: {
230
- fontFamily: FontFamilyStack;
229
+ fontFamily: "var(--fontFamily-poppins)";
231
230
  fontSize: string;
232
231
  fontWeight: string;
233
232
  height: string;
@@ -251,7 +250,7 @@ export declare const clerkSignInAppearance: {
251
250
  color: string;
252
251
  };
253
252
  formButtonPrimary: {
254
- fontFamily: FontFamilyStack;
253
+ fontFamily: "var(--fontFamily-poppins)";
255
254
  fontSize: string;
256
255
  fontWeight: string;
257
256
  lineHeight: string;
@@ -282,7 +281,7 @@ export declare const clerkSignInAppearance: {
282
281
  gap: string;
283
282
  };
284
283
  socialButtonsBlockButton: {
285
- fontFamily: FontFamilyStack;
284
+ fontFamily: "var(--fontFamily-poppins)";
286
285
  fontSize: string;
287
286
  fontWeight: string;
288
287
  lineHeight: string;
@@ -301,7 +300,7 @@ export declare const clerkSignInAppearance: {
301
300
  };
302
301
  };
303
302
  socialButtonsBlockButtonText: {
304
- fontFamily: FontFamilyStack;
303
+ fontFamily: "var(--fontFamily-poppins)";
305
304
  fontSize: string;
306
305
  fontWeight: string;
307
306
  };
@@ -310,7 +309,7 @@ export declare const clerkSignInAppearance: {
310
309
  height: string;
311
310
  };
312
311
  lastAuthenticationStrategyBadge: {
313
- fontFamily: FontFamilyStack;
312
+ fontFamily: "var(--fontFamily-poppins)";
314
313
  fontSize: string;
315
314
  fontWeight: string;
316
315
  lineHeight: string;
@@ -322,33 +321,33 @@ export declare const clerkSignInAppearance: {
322
321
  boxSizing: string;
323
322
  };
324
323
  footerActionText: {
325
- fontFamily: FontFamilyStack;
324
+ fontFamily: "var(--fontFamily-poppins)";
326
325
  fontSize: string;
327
326
  };
328
327
  footerActionLink: {
329
- fontFamily: FontFamilyStack;
328
+ fontFamily: "var(--fontFamily-poppins)";
330
329
  fontSize: string;
331
330
  };
332
331
  identityPreviewText: {
333
- fontFamily: FontFamilyStack;
332
+ fontFamily: "var(--fontFamily-poppins)";
334
333
  fontSize: string;
335
334
  };
336
335
  formFieldSuccessText: {
337
- fontFamily: FontFamilyStack;
336
+ fontFamily: "var(--fontFamily-poppins)";
338
337
  fontSize: string;
339
338
  };
340
339
  formFieldErrorText: {
341
- fontFamily: FontFamilyStack;
340
+ fontFamily: "var(--fontFamily-poppins)";
342
341
  fontSize: string;
343
342
  };
344
343
  dividerText: {
345
- fontFamily: FontFamilyStack;
344
+ fontFamily: "var(--fontFamily-poppins)";
346
345
  fontSize: string;
347
346
  };
348
347
  };
349
348
  variables: {
350
- fontFamily: FontFamilyStack;
351
- fontFamilyButtons: FontFamilyStack;
349
+ fontFamily: "var(--fontFamily-poppins)";
350
+ fontFamilyButtons: "var(--fontFamily-poppins)";
352
351
  fontSize: string;
353
352
  colorPrimary: string;
354
353
  colorTextOnPrimaryBackground: string;
@@ -375,7 +374,7 @@ export declare const clerkSignUpAppearance: {
375
374
  card: {
376
375
  boxShadow: string;
377
376
  width: string;
378
- fontFamily: FontFamilyStack;
377
+ fontFamily: "var(--fontFamily-poppins)";
379
378
  paddingTop: string;
380
379
  paddingBottom: string;
381
380
  };
@@ -384,27 +383,27 @@ export declare const clerkSignUpAppearance: {
384
383
  paddingTop: string;
385
384
  };
386
385
  headerTitle: {
387
- fontFamily: FontFamilyStack;
386
+ fontFamily: "var(--fontFamily-poppins)";
388
387
  fontSize: string;
389
388
  fontWeight: string;
390
389
  lineHeight: string;
391
390
  color: string;
392
391
  };
393
392
  headerSubtitle: {
394
- fontFamily: FontFamilyStack;
393
+ fontFamily: "var(--fontFamily-poppins)";
395
394
  fontSize: string;
396
395
  fontWeight: string;
397
396
  lineHeight: string;
398
397
  color: string;
399
398
  };
400
399
  formFieldLabel: {
401
- fontFamily: FontFamilyStack;
400
+ fontFamily: "var(--fontFamily-poppins)";
402
401
  fontSize: string;
403
402
  fontWeight: string;
404
403
  color: string;
405
404
  };
406
405
  formFieldInput: {
407
- fontFamily: FontFamilyStack;
406
+ fontFamily: "var(--fontFamily-poppins)";
408
407
  fontSize: string;
409
408
  fontWeight: string;
410
409
  height: string;
@@ -428,7 +427,7 @@ export declare const clerkSignUpAppearance: {
428
427
  color: string;
429
428
  };
430
429
  formButtonPrimary: {
431
- fontFamily: FontFamilyStack;
430
+ fontFamily: "var(--fontFamily-poppins)";
432
431
  fontSize: string;
433
432
  fontWeight: string;
434
433
  lineHeight: string;
@@ -459,7 +458,7 @@ export declare const clerkSignUpAppearance: {
459
458
  gap: string;
460
459
  };
461
460
  socialButtonsBlockButton: {
462
- fontFamily: FontFamilyStack;
461
+ fontFamily: "var(--fontFamily-poppins)";
463
462
  fontSize: string;
464
463
  fontWeight: string;
465
464
  lineHeight: string;
@@ -478,7 +477,7 @@ export declare const clerkSignUpAppearance: {
478
477
  };
479
478
  };
480
479
  socialButtonsBlockButtonText: {
481
- fontFamily: FontFamilyStack;
480
+ fontFamily: "var(--fontFamily-poppins)";
482
481
  fontSize: string;
483
482
  fontWeight: string;
484
483
  };
@@ -487,7 +486,7 @@ export declare const clerkSignUpAppearance: {
487
486
  height: string;
488
487
  };
489
488
  lastAuthenticationStrategyBadge: {
490
- fontFamily: FontFamilyStack;
489
+ fontFamily: "var(--fontFamily-poppins)";
491
490
  fontSize: string;
492
491
  fontWeight: string;
493
492
  lineHeight: string;
@@ -499,33 +498,33 @@ export declare const clerkSignUpAppearance: {
499
498
  boxSizing: string;
500
499
  };
501
500
  footerActionText: {
502
- fontFamily: FontFamilyStack;
501
+ fontFamily: "var(--fontFamily-poppins)";
503
502
  fontSize: string;
504
503
  };
505
504
  footerActionLink: {
506
- fontFamily: FontFamilyStack;
505
+ fontFamily: "var(--fontFamily-poppins)";
507
506
  fontSize: string;
508
507
  };
509
508
  identityPreviewText: {
510
- fontFamily: FontFamilyStack;
509
+ fontFamily: "var(--fontFamily-poppins)";
511
510
  fontSize: string;
512
511
  };
513
512
  formFieldSuccessText: {
514
- fontFamily: FontFamilyStack;
513
+ fontFamily: "var(--fontFamily-poppins)";
515
514
  fontSize: string;
516
515
  };
517
516
  formFieldErrorText: {
518
- fontFamily: FontFamilyStack;
517
+ fontFamily: "var(--fontFamily-poppins)";
519
518
  fontSize: string;
520
519
  };
521
520
  dividerText: {
522
- fontFamily: FontFamilyStack;
521
+ fontFamily: "var(--fontFamily-poppins)";
523
522
  fontSize: string;
524
523
  };
525
524
  };
526
525
  variables: {
527
- fontFamily: FontFamilyStack;
528
- fontFamilyButtons: FontFamilyStack;
526
+ fontFamily: "var(--fontFamily-poppins)";
527
+ fontFamilyButtons: "var(--fontFamily-poppins)";
529
528
  fontSize: string;
530
529
  colorPrimary: string;
531
530
  colorTextOnPrimaryBackground: string;
@@ -1,3 +1,3 @@
1
1
  export declare const LegacyLoginPage: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
2
- declare const Login: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const Login: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element | null;
3
3
  export default Login;
@@ -1,2 +1,3 @@
1
+ export declare const LegacyRegisterPage: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
1
2
  declare const Register: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
2
3
  export default Register;