@bcrumbs.net/inbox 0.0.62 → 0.0.63

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 (28) hide show
  1. package/index.cjs.js +119 -93
  2. package/index.esm.js +119 -93
  3. package/package.json +1 -1
  4. package/src/app/auth/components/ClerkForgetPanel.d.ts +6 -0
  5. package/src/app/auth/components/ClerkResetPasswordPanel.d.ts +6 -0
  6. package/src/app/auth/components/ClerkSessionBridge.d.ts +12 -0
  7. package/src/app/auth/components/ClerkSignInPanel.d.ts +2 -0
  8. package/src/app/auth/components/ClerkSignUpPanel.d.ts +2 -0
  9. package/src/app/auth/components/password-page/PasswordFormView.d.ts +10 -1
  10. package/src/app/auth/config/authProvider.d.ts +12 -0
  11. package/src/app/auth/config/clerkAppearance.d.ts +430 -0
  12. package/src/app/auth/pages/Auth.style.d.ts +14 -0
  13. package/src/app/auth/pages/CheckAuth.d.ts +7 -4
  14. package/src/app/auth/pages/Forget.d.ts +2 -2
  15. package/src/app/auth/pages/Login.d.ts +2 -3
  16. package/src/app/auth/pages/Password.d.ts +2 -2
  17. package/src/app/auth/pages/Register.d.ts +2 -3
  18. package/src/app/auth/utils/clerkTracking.d.ts +9 -0
  19. package/src/app/billing/utils/pendingPlanPurchaseStorage.d.ts +6 -6
  20. package/src/app/generic/hooks/useOnlineStatus.d.ts +1 -1
  21. package/src/app/inbox/components/Shared/MobileChatDetailsSlider.d.ts +1 -0
  22. package/src/app/inbox/components/Shared/MobileDetailsSwipeHint.d.ts +1 -1
  23. package/src/app/resources/components/ListResources/Utils.d.ts +0 -1
  24. package/src/app/subscriptions/utils/estimateUpgradeProration.d.ts +19 -0
  25. package/src/assets/locales/translations.d.ts +6 -0
  26. package/src/environments/types.d.ts +5 -0
  27. package/src/graphql.autogenerated.d.ts +73 -2
  28. package/src/lib/EmbeddedMobileMenu.d.ts +1 -2
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.62",
4
+ "version": "0.0.63",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Clerk forgot-password flow: sends a reset code email, then routes to the Clerk
3
+ * reset page where the user enters the code + new password.
4
+ */
5
+ export declare function ClerkForgetPanel(): import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export default ClerkForgetPanel;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Completes Clerk's reset_password_email_code flow after ClerkForgetPanel
3
+ * requested the email code.
4
+ */
5
+ export declare function ClerkResetPasswordPanel(): import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export default ClerkResetPasswordPanel;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Keeps localStorage.token in sync with the Clerk session JWT so Apollo handleAuth
3
+ * and BCRoutesGuard continue to work without per-client changes.
4
+ *
5
+ * Prefer the AspNetUsers id returned by /auth/authorize so the rest of the portal
6
+ * keeps seeing the same user id shape as legacy login.
7
+ *
8
+ * Forwards the PostHog distinct id so auth can alias + emit authoritative
9
+ * "Signup Success" when JIT-provisioning a new AspNetUsers row.
10
+ */
11
+ export declare function ClerkSessionBridge(): null;
12
+ export default ClerkSessionBridge;
@@ -0,0 +1,2 @@
1
+ export declare function ClerkSignInPanel(): import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export default ClerkSignInPanel;
@@ -0,0 +1,2 @@
1
+ export declare function ClerkSignUpPanel(): import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export default ClerkSignUpPanel;
@@ -7,16 +7,25 @@ export type PasswordFieldConfig = {
7
7
  onChange: (value: string) => void;
8
8
  onToggleVisibility: () => void;
9
9
  };
10
+ export type TextFieldConfig = {
11
+ label: string;
12
+ placeholder: string;
13
+ value: string;
14
+ error?: string;
15
+ onChange: (value: string) => void;
16
+ };
10
17
  type PasswordFormViewProps = {
11
18
  title: string;
12
19
  subtitle: string;
13
20
  submitLabel: string;
14
21
  passwordField: PasswordFieldConfig;
15
22
  confirmPasswordField: PasswordFieldConfig;
23
+ /** Optional verification code field used by the Clerk reset flow. */
24
+ codeField?: TextFieldConfig;
16
25
  submitDisabled?: boolean;
17
26
  loading?: boolean;
18
27
  onBack?: () => void;
19
28
  onSubmit: () => void;
20
29
  };
21
- export declare function PasswordFormView({ title, subtitle, submitLabel, passwordField, confirmPasswordField, submitDisabled, loading, onBack, onSubmit, }: PasswordFormViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
30
+ export declare function PasswordFormView({ title, subtitle, submitLabel, passwordField, confirmPasswordField, codeField, submitDisabled, loading, onBack, onSubmit, }: PasswordFormViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
22
31
  export {};
@@ -0,0 +1,12 @@
1
+ import type { AuthProvider } from '../../../environments/types';
2
+ /**
3
+ * Selects the frontend auth UI provider. Runtime window._env_ overrides build-time
4
+ * environment so deployments can flip without a rebuild.
5
+ */
6
+ export declare function getAuthProvider(): AuthProvider;
7
+ export declare function getClerkPublishableKey(): string | undefined;
8
+ /**
9
+ * Clerk UI is only mounted when selected and a publishable key is present, matching
10
+ * the auth service's isClerkEnabled() gate.
11
+ */
12
+ export declare function isClerkAuthEnabled(): boolean;
@@ -0,0 +1,430 @@
1
+ /**
2
+ * Clerk UI theme aligned with legacy auth pages (Poppins + legacy type scale).
3
+ */
4
+ export declare const clerkAppearance: {
5
+ variables: {
6
+ fontFamily: string;
7
+ fontFamilyButtons: string;
8
+ fontSize: string;
9
+ colorPrimary: string;
10
+ colorTextOnPrimaryBackground: string;
11
+ borderRadius: string;
12
+ };
13
+ elements: {
14
+ rootBox: {
15
+ width: string;
16
+ };
17
+ cardBox: {
18
+ boxShadow: string;
19
+ width: string;
20
+ paddingTop: string;
21
+ paddingBottom: string;
22
+ };
23
+ card: {
24
+ boxShadow: string;
25
+ width: string;
26
+ fontFamily: string;
27
+ paddingTop: string;
28
+ paddingBottom: string;
29
+ };
30
+ header: {
31
+ marginTop: string;
32
+ paddingTop: string;
33
+ };
34
+ headerTitle: {
35
+ fontFamily: string;
36
+ fontSize: string;
37
+ fontWeight: string;
38
+ lineHeight: string;
39
+ color: string;
40
+ };
41
+ headerSubtitle: {
42
+ fontFamily: string;
43
+ fontSize: string;
44
+ fontWeight: string;
45
+ lineHeight: string;
46
+ color: string;
47
+ };
48
+ formFieldLabel: {
49
+ fontFamily: string;
50
+ fontSize: string;
51
+ fontWeight: string;
52
+ color: string;
53
+ };
54
+ formFieldInput: {
55
+ fontFamily: string;
56
+ fontSize: string;
57
+ fontWeight: string;
58
+ };
59
+ formButtonPrimary: {
60
+ fontFamily: string;
61
+ fontSize: string;
62
+ fontWeight: string;
63
+ lineHeight: string;
64
+ letterSpacing: string;
65
+ textTransform: string;
66
+ height: string;
67
+ borderRadius: string;
68
+ backgroundColor: string;
69
+ color: string;
70
+ boxShadow: string;
71
+ width: string;
72
+ '&:hover': {
73
+ backgroundColor: string;
74
+ opacity: number;
75
+ };
76
+ '&:focus': {
77
+ backgroundColor: string;
78
+ boxShadow: string;
79
+ };
80
+ '&:active': {
81
+ backgroundColor: string;
82
+ };
83
+ };
84
+ socialButtons: {
85
+ gap: string;
86
+ };
87
+ socialButtonsBlockButton: {
88
+ fontFamily: string;
89
+ fontSize: string;
90
+ fontWeight: string;
91
+ lineHeight: string;
92
+ letterSpacing: string;
93
+ textTransform: string;
94
+ height: string;
95
+ minHeight: string;
96
+ padding: string;
97
+ borderRadius: string;
98
+ border: string;
99
+ backgroundColor: string;
100
+ color: string;
101
+ boxShadow: string;
102
+ '&:hover': {
103
+ backgroundColor: string;
104
+ };
105
+ };
106
+ socialButtonsBlockButtonText: {
107
+ fontFamily: string;
108
+ fontSize: string;
109
+ fontWeight: string;
110
+ };
111
+ socialButtonsProviderIcon: {
112
+ width: string;
113
+ height: string;
114
+ };
115
+ footerActionText: {
116
+ fontFamily: string;
117
+ fontSize: string;
118
+ };
119
+ footerActionLink: {
120
+ fontFamily: string;
121
+ fontSize: string;
122
+ };
123
+ identityPreviewText: {
124
+ fontFamily: string;
125
+ fontSize: string;
126
+ };
127
+ formFieldSuccessText: {
128
+ fontFamily: string;
129
+ fontSize: string;
130
+ };
131
+ formFieldErrorText: {
132
+ fontFamily: string;
133
+ fontSize: string;
134
+ };
135
+ dividerText: {
136
+ fontFamily: string;
137
+ fontSize: string;
138
+ };
139
+ };
140
+ };
141
+ /**
142
+ * Hides Clerk's own footer (incl. "Secured by" / built-in account switch row).
143
+ * Custom login/register/forgot links are rendered below the panel instead.
144
+ */
145
+ export declare const clerkSignInAppearance: {
146
+ elements: {
147
+ footer: {
148
+ display: string;
149
+ };
150
+ footerPages: {
151
+ display: string;
152
+ };
153
+ rootBox: {
154
+ width: string;
155
+ };
156
+ cardBox: {
157
+ boxShadow: string;
158
+ width: string;
159
+ paddingTop: string;
160
+ paddingBottom: string;
161
+ };
162
+ card: {
163
+ boxShadow: string;
164
+ width: string;
165
+ fontFamily: string;
166
+ paddingTop: string;
167
+ paddingBottom: string;
168
+ };
169
+ header: {
170
+ marginTop: string;
171
+ paddingTop: string;
172
+ };
173
+ headerTitle: {
174
+ fontFamily: string;
175
+ fontSize: string;
176
+ fontWeight: string;
177
+ lineHeight: string;
178
+ color: string;
179
+ };
180
+ headerSubtitle: {
181
+ fontFamily: string;
182
+ fontSize: string;
183
+ fontWeight: string;
184
+ lineHeight: string;
185
+ color: string;
186
+ };
187
+ formFieldLabel: {
188
+ fontFamily: string;
189
+ fontSize: string;
190
+ fontWeight: string;
191
+ color: string;
192
+ };
193
+ formFieldInput: {
194
+ fontFamily: string;
195
+ fontSize: string;
196
+ fontWeight: string;
197
+ };
198
+ formButtonPrimary: {
199
+ fontFamily: string;
200
+ fontSize: string;
201
+ fontWeight: string;
202
+ lineHeight: string;
203
+ letterSpacing: string;
204
+ textTransform: string;
205
+ height: string;
206
+ borderRadius: string;
207
+ backgroundColor: string;
208
+ color: string;
209
+ boxShadow: string;
210
+ width: string;
211
+ '&:hover': {
212
+ backgroundColor: string;
213
+ opacity: number;
214
+ };
215
+ '&:focus': {
216
+ backgroundColor: string;
217
+ boxShadow: string;
218
+ };
219
+ '&:active': {
220
+ backgroundColor: string;
221
+ };
222
+ };
223
+ socialButtons: {
224
+ gap: string;
225
+ };
226
+ socialButtonsBlockButton: {
227
+ fontFamily: string;
228
+ fontSize: string;
229
+ fontWeight: string;
230
+ lineHeight: string;
231
+ letterSpacing: string;
232
+ textTransform: string;
233
+ height: string;
234
+ minHeight: string;
235
+ padding: string;
236
+ borderRadius: string;
237
+ border: string;
238
+ backgroundColor: string;
239
+ color: string;
240
+ boxShadow: string;
241
+ '&:hover': {
242
+ backgroundColor: string;
243
+ };
244
+ };
245
+ socialButtonsBlockButtonText: {
246
+ fontFamily: string;
247
+ fontSize: string;
248
+ fontWeight: string;
249
+ };
250
+ socialButtonsProviderIcon: {
251
+ width: string;
252
+ height: string;
253
+ };
254
+ footerActionText: {
255
+ fontFamily: string;
256
+ fontSize: string;
257
+ };
258
+ footerActionLink: {
259
+ fontFamily: string;
260
+ fontSize: string;
261
+ };
262
+ identityPreviewText: {
263
+ fontFamily: string;
264
+ fontSize: string;
265
+ };
266
+ formFieldSuccessText: {
267
+ fontFamily: string;
268
+ fontSize: string;
269
+ };
270
+ formFieldErrorText: {
271
+ fontFamily: string;
272
+ fontSize: string;
273
+ };
274
+ dividerText: {
275
+ fontFamily: string;
276
+ fontSize: string;
277
+ };
278
+ };
279
+ variables: {
280
+ fontFamily: string;
281
+ fontFamilyButtons: string;
282
+ fontSize: string;
283
+ colorPrimary: string;
284
+ colorTextOnPrimaryBackground: string;
285
+ borderRadius: string;
286
+ };
287
+ };
288
+ export declare const clerkSignUpAppearance: {
289
+ elements: {
290
+ footer: {
291
+ display: string;
292
+ };
293
+ footerPages: {
294
+ display: string;
295
+ };
296
+ rootBox: {
297
+ width: string;
298
+ };
299
+ cardBox: {
300
+ boxShadow: string;
301
+ width: string;
302
+ paddingTop: string;
303
+ paddingBottom: string;
304
+ };
305
+ card: {
306
+ boxShadow: string;
307
+ width: string;
308
+ fontFamily: string;
309
+ paddingTop: string;
310
+ paddingBottom: string;
311
+ };
312
+ header: {
313
+ marginTop: string;
314
+ paddingTop: string;
315
+ };
316
+ headerTitle: {
317
+ fontFamily: string;
318
+ fontSize: string;
319
+ fontWeight: string;
320
+ lineHeight: string;
321
+ color: string;
322
+ };
323
+ headerSubtitle: {
324
+ fontFamily: string;
325
+ fontSize: string;
326
+ fontWeight: string;
327
+ lineHeight: string;
328
+ color: string;
329
+ };
330
+ formFieldLabel: {
331
+ fontFamily: string;
332
+ fontSize: string;
333
+ fontWeight: string;
334
+ color: string;
335
+ };
336
+ formFieldInput: {
337
+ fontFamily: string;
338
+ fontSize: string;
339
+ fontWeight: string;
340
+ };
341
+ formButtonPrimary: {
342
+ fontFamily: string;
343
+ fontSize: string;
344
+ fontWeight: string;
345
+ lineHeight: string;
346
+ letterSpacing: string;
347
+ textTransform: string;
348
+ height: string;
349
+ borderRadius: string;
350
+ backgroundColor: string;
351
+ color: string;
352
+ boxShadow: string;
353
+ width: string;
354
+ '&:hover': {
355
+ backgroundColor: string;
356
+ opacity: number;
357
+ };
358
+ '&:focus': {
359
+ backgroundColor: string;
360
+ boxShadow: string;
361
+ };
362
+ '&:active': {
363
+ backgroundColor: string;
364
+ };
365
+ };
366
+ socialButtons: {
367
+ gap: string;
368
+ };
369
+ socialButtonsBlockButton: {
370
+ fontFamily: string;
371
+ fontSize: string;
372
+ fontWeight: string;
373
+ lineHeight: string;
374
+ letterSpacing: string;
375
+ textTransform: string;
376
+ height: string;
377
+ minHeight: string;
378
+ padding: string;
379
+ borderRadius: string;
380
+ border: string;
381
+ backgroundColor: string;
382
+ color: string;
383
+ boxShadow: string;
384
+ '&:hover': {
385
+ backgroundColor: string;
386
+ };
387
+ };
388
+ socialButtonsBlockButtonText: {
389
+ fontFamily: string;
390
+ fontSize: string;
391
+ fontWeight: string;
392
+ };
393
+ socialButtonsProviderIcon: {
394
+ width: string;
395
+ height: string;
396
+ };
397
+ footerActionText: {
398
+ fontFamily: string;
399
+ fontSize: string;
400
+ };
401
+ footerActionLink: {
402
+ fontFamily: string;
403
+ fontSize: string;
404
+ };
405
+ identityPreviewText: {
406
+ fontFamily: string;
407
+ fontSize: string;
408
+ };
409
+ formFieldSuccessText: {
410
+ fontFamily: string;
411
+ fontSize: string;
412
+ };
413
+ formFieldErrorText: {
414
+ fontFamily: string;
415
+ fontSize: string;
416
+ };
417
+ dividerText: {
418
+ fontFamily: string;
419
+ fontSize: string;
420
+ };
421
+ };
422
+ variables: {
423
+ fontFamily: string;
424
+ fontFamilyButtons: string;
425
+ fontSize: string;
426
+ colorPrimary: string;
427
+ colorTextOnPrimaryBackground: string;
428
+ borderRadius: string;
429
+ };
430
+ };
@@ -12,6 +12,20 @@ export declare const AuthFormContent: import("@emotion/styled").StyledComponent<
12
12
  theme?: import("@emotion/react").Theme | undefined;
13
13
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
14
14
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
15
+ /** Tighter stack so the BC logo sits near Clerk's heading (legacy keeps the 48px gap). */
16
+ export declare const ClerkAuthFormColumn: import("@emotion/styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
19
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
20
+ theme?: import("@emotion/react").Theme | undefined;
21
+ }, {}, {}>;
22
+ /** Clerk v5 draws the card shadow on .cl-cardBox; force it off inside our auth shell. */
23
+ export declare const ClerkAuthFormContent: import("@emotion/styled").StyledComponent<{
24
+ theme?: import("@emotion/react").Theme | undefined;
25
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
26
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
27
+ theme?: import("@emotion/react").Theme | undefined;
28
+ }, {}, {}>;
15
29
  export declare const SigninForm: import("@emotion/styled").StyledComponent<{
16
30
  theme?: import("@emotion/react").Theme | undefined;
17
31
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * Public entry from marketing pricing CTAs (?planType=...).
3
3
  * Verifies the session via currentUser, then:
4
- * - authenticated + planType in query → upgrade flow (auto Polar/Stripe checkout)
5
- * - authenticated + no planType → inbox
6
- * - guest + planType → register with planType preserved
7
- * - guest + no planType → login
4
+ * - authenticated + plan intent → upgrade flow (auto Polar/Stripe checkout)
5
+ * - authenticated + no plan intent → inbox
6
+ * - guest + plan intent → register with planType preserved
7
+ * - guest + no plan intent → login
8
+ *
9
+ * The plan intent comes from the query when present, otherwise from the value stored earlier
10
+ * in this tab.
8
11
  */
9
12
  declare const CheckAuth: () => import("@emotion/react/jsx-runtime").JSX.Element;
10
13
  export default CheckAuth;
@@ -6,5 +6,5 @@ export type Props = {
6
6
  error: any;
7
7
  status: any;
8
8
  };
9
- declare const _default: any;
10
- export default _default;
9
+ declare const Forget: (props: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ export default Forget;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const _default: import("react").ComponentClass<{}, any>;
3
- export default _default;
1
+ declare const Login: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export default Login;
@@ -8,5 +8,5 @@ export type Props = {
8
8
  error: any;
9
9
  status: any;
10
10
  };
11
- declare const _default: any;
12
- export default _default;
11
+ declare const Password: (props: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
12
+ export default Password;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const _default: import("react").ComponentClass<{}, any>;
3
- export default _default;
1
+ declare const Register: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export default Register;
@@ -0,0 +1,9 @@
1
+ import type { PostHog } from 'posthog-js';
2
+ /** Funnel / UX events captured in the portal for Clerk auth flows. */
3
+ export declare const ClerkTrackingEvents: {
4
+ readonly SignupStarted: "Signup Started";
5
+ readonly ForgetPasswordSuccess: "Forget Password Success";
6
+ readonly ResetPasswordSuccess: "Reset Password Success";
7
+ };
8
+ export declare function captureClerkEvent(posthog: PostHog | null | undefined, eventName: string, properties?: Record<string, string | number | boolean | undefined>): void;
9
+ export declare function identifyClerkUser(posthog: PostHog | null | undefined, userId: string, email?: string): void;
@@ -1,10 +1,10 @@
1
1
  import { PlanType } from '../../../graphql.billing.autogenerated';
2
- /** Normalizes landing-page planType query values to billing PlanType. */
3
- export declare function normalizePendingPlanType(raw: string | null | undefined): PlanType | null;
4
2
  export declare function setPendingPlanPurchase(planType: string): void;
5
3
  export declare function getPendingPlanPurchase(): PlanType | null;
6
4
  export declare function clearPendingPlanPurchase(): void;
7
- /** True when the URL search string contains a valid paid planType. */
8
- export declare function hasPlanTypeInSearch(search: string): boolean;
9
- /** Reads planType from a URL search string and persists it when valid. */
10
- export declare function capturePendingPlanFromSearch(search: string): PlanType | null;
5
+ /**
6
+ * Resolves the plan the user intends to buy from the URL first, then from the stored value.
7
+ * A planType found in the URL is persisted, so later steps of the flow keep working once the
8
+ * query param is gone.
9
+ */
10
+ export declare function resolvePendingPlanType(search: string): PlanType | null;
@@ -1,5 +1,5 @@
1
1
  export declare function useOnlineStatus(): {
2
2
  isOnline: boolean;
3
- networkStatus: "online" | "offline" | "checking";
3
+ networkStatus: "offline" | "online" | "checking";
4
4
  isChecking: boolean;
5
5
  };
@@ -8,6 +8,7 @@ type MobileChatDetailsSliderProps = {
8
8
  };
9
9
  /**
10
10
  * Side-by-side chat/details pager with follow-the-finger drag.
11
+ * Pane order is always [chat | details] in physical LTR space.
11
12
  * Edge chevron buttons remain for one-tap navigation.
12
13
  */
13
14
  export declare const MobileChatDetailsSlider: ({ showDetails, onShowDetailsChange, rtl, chat, details, }: MobileChatDetailsSliderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -5,5 +5,5 @@ type MobileDetailsSwipeHintProps = {
5
5
  direction?: 'toDetails' | 'toChat';
6
6
  };
7
7
  /** Edge affordance for mobile chat ↔ details swipe navigation. */
8
- export declare const MobileDetailsSwipeHint: ({ rtl, onClick, direction, }: MobileDetailsSwipeHintProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare const MobileDetailsSwipeHint: ({ onClick, direction, }: MobileDetailsSwipeHintProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TFunction } from "i18next";
3
2
  import { Row, Action } from "@bcrumbs.net/bc-ui";
4
3
  import { ResourceDefinition } from "../../config";
@@ -0,0 +1,19 @@
1
+ import { PlanType, Term } from '../../../graphql.billing.autogenerated';
2
+ export type UpgradeProrationEstimate = {
3
+ newPlanPrice: number;
4
+ remainingValue: number;
5
+ chargeAmount: number;
6
+ remainingDays: number;
7
+ };
8
+ /**
9
+ * Estimates Polar-style mid-cycle upgrade charge:
10
+ * (newPeriodPrice − currentPeriodPrice) × remainingFraction, floored at 0.
11
+ */
12
+ export declare function estimateUpgradeProration(params: {
13
+ currentPlanType: PlanType;
14
+ currentTerm: Term;
15
+ targetPlanType: PlanType;
16
+ targetTerm: Term;
17
+ startDate?: string | null;
18
+ endDate?: string | null;
19
+ }): UpgradeProrationEstimate | null;