@encorekit/web-sdk 2.0.3 → 2.0.6

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 (79) hide show
  1. package/README.md +112 -40
  2. package/dist/cjs/index.cjs +1 -1
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/esm/index.js +1 -1
  5. package/dist/esm/index.js.map +1 -1
  6. package/dist/umd/encore.min.js +1 -1
  7. package/dist/umd/encore.min.js.map +1 -1
  8. package/embed/README.md +82 -367
  9. package/examples/ios-webview/EncoreURLBuilder.swift +179 -61
  10. package/examples/ios-webview/README.md +75 -354
  11. package/examples/ios-webview/SimpleEncoreView.swift +49 -36
  12. package/examples/ios-webview/SimpleExample.swift +30 -86
  13. package/package.json +3 -7
  14. package/types/analytics/DiagnosticsOutbox.d.ts +22 -0
  15. package/types/analytics/DiagnosticsOutbox.d.ts.map +1 -0
  16. package/types/analytics/ReliableOutbox.d.ts +40 -0
  17. package/types/analytics/ReliableOutbox.d.ts.map +1 -0
  18. package/types/analytics/events.d.ts +100 -0
  19. package/types/analytics/events.d.ts.map +1 -1
  20. package/types/analytics/placementResolved.d.ts +150 -0
  21. package/types/analytics/placementResolved.d.ts.map +1 -0
  22. package/types/api/APIClient.d.ts +10 -2
  23. package/types/api/APIClient.d.ts.map +1 -1
  24. package/types/api/errorReportLimits.d.ts +50 -0
  25. package/types/api/errorReportLimits.d.ts.map +1 -0
  26. package/types/api/generated/types.d.ts +54 -7
  27. package/types/api/generated/types.d.ts.map +1 -1
  28. package/types/core/Configuration.d.ts +5 -0
  29. package/types/core/Configuration.d.ts.map +1 -1
  30. package/types/core/Encore.d.ts +61 -2
  31. package/types/core/Encore.d.ts.map +1 -1
  32. package/types/core/OfferManager.d.ts +29 -3
  33. package/types/core/OfferManager.d.ts.map +1 -1
  34. package/types/core/PlacementBuilder.d.ts +26 -2
  35. package/types/core/PlacementBuilder.d.ts.map +1 -1
  36. package/types/core/StrictUnlock.d.ts +20 -0
  37. package/types/core/StrictUnlock.d.ts.map +1 -0
  38. package/types/core/StrictUnlockReconciler.d.ts +94 -0
  39. package/types/core/StrictUnlockReconciler.d.ts.map +1 -0
  40. package/types/core/TransactionStore.d.ts +57 -13
  41. package/types/core/TransactionStore.d.ts.map +1 -1
  42. package/types/core/VerificationPoller.d.ts.map +1 -1
  43. package/types/core/claimBehavior.d.ts +28 -0
  44. package/types/core/claimBehavior.d.ts.map +1 -0
  45. package/types/core/errorContext.d.ts +18 -0
  46. package/types/core/errorContext.d.ts.map +1 -0
  47. package/types/core/errorType.d.ts +59 -0
  48. package/types/core/errorType.d.ts.map +1 -0
  49. package/types/core/hostDisplay.d.ts +50 -0
  50. package/types/core/hostDisplay.d.ts.map +1 -0
  51. package/types/core/useCase.d.ts +21 -0
  52. package/types/core/useCase.d.ts.map +1 -1
  53. package/types/core/version.d.ts +1 -1
  54. package/types/experiments/ExposureOutbox.d.ts +4 -28
  55. package/types/experiments/ExposureOutbox.d.ts.map +1 -1
  56. package/types/types.d.ts +188 -3
  57. package/types/types.d.ts.map +1 -1
  58. package/types/ui/OfferCard.d.ts +3 -1
  59. package/types/ui/OfferCard.d.ts.map +1 -1
  60. package/types/ui/OfferCarousel.d.ts +5 -0
  61. package/types/ui/OfferCarousel.d.ts.map +1 -1
  62. package/types/ui/OfferModal.d.ts +20 -0
  63. package/types/ui/OfferModal.d.ts.map +1 -1
  64. package/types/ui/PrimerScreen.d.ts +18 -11
  65. package/types/ui/PrimerScreen.d.ts.map +1 -1
  66. package/types/ui/RedemptionScreen.d.ts +15 -19
  67. package/types/ui/RedemptionScreen.d.ts.map +1 -1
  68. package/types/ui/RewardActions.d.ts +35 -0
  69. package/types/ui/RewardActions.d.ts.map +1 -1
  70. package/types/ui/appearance.d.ts +14 -0
  71. package/types/ui/appearance.d.ts.map +1 -1
  72. package/types/ui/brandComponents.d.ts.map +1 -1
  73. package/types/ui/styles.d.ts.map +1 -1
  74. package/types/utils/logger.d.ts +11 -1
  75. package/types/utils/logger.d.ts.map +1 -1
  76. package/embed/index.html +0 -57
  77. package/embed/styles.css +0 -154
  78. package/examples/ios-webview/EncoreWebViewBridge.swift +0 -419
  79. package/examples/ios-webview/ExampleViewController.swift +0 -233
package/types/types.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  * Shared types used across the SDK
4
4
  */
5
5
  import type { TextSlot, ButtonSlot } from './ui/appearance';
6
+ import type { LogLevel } from './utils/logger';
6
7
  /**
7
8
  * Supported entitlement types with optional values
8
9
  */
@@ -61,9 +62,19 @@ export interface UserAttributes {
61
62
  custom?: Record<string, string>;
62
63
  }
63
64
  /**
64
- * Reasons why an entitlement was not granted
65
+ * Reasons why an entitlement was not granted. `notConfigured` and
66
+ * `alreadyPresenting` mirror the case names iOS uses for the same conditions
67
+ * (`NotPresentedReason`), so a cross-platform integration reads one vocabulary.
65
68
  */
66
- export type NotGrantedReason = 'userClosedModal' | 'userClickedOutside' | 'userDeclinedLastOffer' | 'noOffersAvailable' | {
69
+ export type NotGrantedReason = 'userClosedModal' | 'userClickedOutside' | 'userDeclinedLastOffer' | 'noOffersAvailable'
70
+ /** A `show()` was already in flight — see the reentrancy guard in `Encore.show()`. */
71
+ | 'alreadyPresenting'
72
+ /**
73
+ * `show()` was called before `configure()`. A named reason rather than a generic
74
+ * error because it is one specific, always-the-same integration mistake with one
75
+ * fix, and it is what iOS reports for the identical condition.
76
+ */
77
+ | 'notConfigured' | {
67
78
  type: 'error';
68
79
  error: EncoreError;
69
80
  };
@@ -192,6 +203,40 @@ export interface PlacementOptions {
192
203
  headline?: string;
193
204
  /** Counterpart to {@link headline}: same precedence, same blank-falls-through rule. */
194
205
  subheadline?: string;
206
+ /**
207
+ * Whether the user can dismiss the sheet. Defaults to `true`, and almost
208
+ * every integration should leave it there.
209
+ *
210
+ * `false` removes every in-sheet way out at once — the ×, the "No thanks"
211
+ * decline CTA, backdrop-click and Escape. Not "fewer ways out": a sheet that
212
+ * still closes on a backdrop tap is dismissable, so the flag would be doing
213
+ * nothing while reading as though it did.
214
+ *
215
+ * ⚠️ ONLY FOR A HOST THAT IS ITSELF THE WAY OUT. The single intended caller
216
+ * is Encore's hosted offer page, which a publisher's app opens in a webview:
217
+ * closing that webview is the dismissal, and it is a better one, because the
218
+ * in-sheet dismissal only ever landed the user on a page they then had to
219
+ * close the webview to leave anyway.
220
+ *
221
+ * On your own site there is no webview to close. A user who cannot dismiss
222
+ * the sheet is stuck on your page, so do not pass this. Nothing about the
223
+ * default changes for an integration that never mentions it.
224
+ *
225
+ * The focus trap is unaffected: Tab still cycles inside the sheet, which is
226
+ * a statement about where focus goes rather than a way out.
227
+ *
228
+ * ⚠️ THE PROMISE `show()` RETURNS THEN SETTLES ONLY ON A CLAIM. Every other
229
+ * resolution came from a dismissal, and there is no longer one — so a user
230
+ * who claims nothing leaves it pending for the life of the page. Correct
231
+ * where the host is the way out, since closing the webview ends the page and
232
+ * the promise with it, and another reason not to pass this anywhere else: on
233
+ * your own site it is a promise that never resolves.
234
+ *
235
+ * On the reward composition the "No thanks" button becomes "Next offer"
236
+ * rather than disappearing — see `RewardActionsOptions.secondary`. A button
237
+ * reading "No thanks" on a sheet with no way out is a control that lies.
238
+ */
239
+ dismissible?: boolean;
195
240
  /**
196
241
  * Status icon above the headline. Defaults to `'none'` — nothing renders unless
197
242
  * you explicitly ask for `'success'`, which draws a green-circle check.
@@ -232,6 +277,15 @@ export interface PlacementBuilder {
232
277
  * `.useCase(...)` step the native SDKs expose. See {@link UseCase}.
233
278
  */
234
279
  useCase(useCase: UseCase): PlacementBuilder;
280
+ /**
281
+ * Override the sheet's headline for this presentation — the same `.headline(...)`
282
+ * step the native SDKs expose. Equivalent to the `headline` field of
283
+ * {@link PlacementOptions}, and subject to the same precedence and
284
+ * blank-falls-through rules.
285
+ */
286
+ headline(text: string): PlacementBuilder;
287
+ /** Counterpart to {@link PlacementBuilder.headline}: same rules. */
288
+ subheadline(text: string): PlacementBuilder;
235
289
  /** Fires when the sheet closes without a claim — carries the dismissal reason. */
236
290
  onNotGranted(callback: (reason: NotGrantedReason) => void): PlacementBuilder;
237
291
  onLoadingStateChange(callback: (isLoading: boolean) => void): PlacementBuilder;
@@ -242,6 +296,23 @@ export interface PlacementBuilder {
242
296
  * `Encore.show()`. Never rejects.
243
297
  */
244
298
  show(): Promise<ShowResult>;
299
+ /**
300
+ * Redeem the claim made at this placement — phase 2 of the deferred flow.
301
+ *
302
+ * Scoping follows the placement ID, and only a PUBLISHER-SET one exists to scope
303
+ * by:
304
+ * - `placement('cancel_flow').redeem()` resolves only the claim banked at
305
+ * `'cancel_flow'`, never crossing to another placement's. Nothing there
306
+ * resolves `unavailable`, even when a claim exists elsewhere.
307
+ * - `placement().redeem()` — the no-id form — has no placement to scope by. Its
308
+ * minted `placement_<hex>` is local builder identity that never goes on the
309
+ * wire, so no claim was ever filed under it. It falls back to the flat
310
+ * most-recent-claim rule, i.e. exactly `Encore.redeem()`.
311
+ *
312
+ * Either form resolves `unavailable` when the variant's claim behaviour is
313
+ * `immediate`, since nothing is ever banked.
314
+ */
315
+ redeem(): Promise<RedeemResult>;
245
316
  }
246
317
  /**
247
318
  * Error codes used throughout the SDK
@@ -302,7 +373,32 @@ export interface UIConfiguration {
302
373
  export interface EncoreConfig {
303
374
  apiKey: string;
304
375
  environment?: 'production' | 'development' | 'staging' | 'localhost';
305
- logLevel?: 'none' | 'debug';
376
+ /**
377
+ * Console verbosity. An ordered ladder: `'warn'` shows warnings and errors.
378
+ * Defaults to `'none'`, matching the Swift and Android SDKs.
379
+ */
380
+ logLevel?: LogLevel;
381
+ /**
382
+ * When a claim is treated as confirmed — the same axis as iOS's and Android's
383
+ * `UnlockMode`, and global for the session (the native SDKs deliberately have no
384
+ * per-placement override either).
385
+ *
386
+ * - `'optimistic'` (default): a claim is confirmed the moment the advertiser
387
+ * handoff happens. Byte-identical to the behavior before this option existed.
388
+ * - `'strict'`: the claim is additionally verified against the advertiser's
389
+ * postback (bounded poll, ~15s) before it is reported as confirmed. Offers are
390
+ * pre-filtered to campaigns whose postback latency can plausibly land inside
391
+ * that window, and such a fetch bypasses the offer cache. A claim that has not
392
+ * verified by the time the user navigates away is reconciled on a later page
393
+ * load — see `Encore.onStrictUnlockVerified`.
394
+ *
395
+ * `show()` resolves `'claimed'` at handoff in BOTH modes: on web the advertiser
396
+ * opens in a separate tab and the SDK renders nothing post-claim, so there is no
397
+ * sheet left to hold a verification spinner in the way iOS does. Strict mode
398
+ * reports its verification through the callback instead — a deliberate divergence,
399
+ * see docs/architecture/platform-divergence/web.md.
400
+ */
401
+ unlockMode?: 'strict' | 'optimistic';
306
402
  }
307
403
  /** Result of `show()` / `present()`. */
308
404
  export type ShowResult =
@@ -344,6 +440,95 @@ export type ShowResult =
344
440
  | {
345
441
  status: 'unavailable';
346
442
  };
443
+ /**
444
+ * The offer descriptor carried on a transaction — enough to render the redemption
445
+ * screen AND to rebuild the advertiser redirect at redeem() time, so a deferred
446
+ * claim never needs the live offer again (it may be redeemed on a page load that
447
+ * fetched no offers at all). `advertiserUrl` may contain a TRANSACTION_ID
448
+ * placeholder, substituted when the redemption fires.
449
+ */
450
+ export interface OfferRef {
451
+ id: string;
452
+ campaignId: string;
453
+ advertiserUrl: string;
454
+ trackingParameters?: Record<string, string>;
455
+ advertiserName?: string;
456
+ /** Display-only reward copy (e.g. "30 days of Apple Music"). NOT an entitlement. */
457
+ reward?: string;
458
+ imageUrl?: string;
459
+ logoUrl?: string;
460
+ }
461
+ /**
462
+ * A claimed offer awaiting redemption. Claiming starts a transaction, and `id` is
463
+ * that transaction's durable handle — the same value `didGrant()`,
464
+ * `waitForVerification()` and the backend all key on.
465
+ *
466
+ * Present only for the deferred claim behaviours. An `immediate` claim redeems
467
+ * inside the click and records nothing here.
468
+ */
469
+ export interface Transaction {
470
+ id: string;
471
+ /** The persistent account identity this transaction is bound to (app_account_id). */
472
+ appAccountId: string;
473
+ /** The placement the offer was claimed at, if any (keys the placement->claim map). */
474
+ placementId?: string;
475
+ offer: OfferRef;
476
+ /**
477
+ * The use case this claim was made under — persisted because redeem() may run on
478
+ * a later page load with only this record in hand, and the entitlement grant and
479
+ * the redemption narrative both turn on it. Stored as the PUBLIC symbol; records
480
+ * written by 2.0.1 and earlier carry the wire value and are normalised on read.
481
+ */
482
+ useCase?: UseCase;
483
+ status: 'claimed' | 'redeemed';
484
+ /** ISO-8601 timestamps. */
485
+ createdAt: string;
486
+ expiresAt: string;
487
+ redeemedAt?: string;
488
+ }
489
+ /** Options for `redeem()`. */
490
+ export interface RedeemOptions {
491
+ /**
492
+ * Redeem the claim made at this placement. If none exists there it resolves
493
+ * `unavailable` — it never crosses to another placement's claim. Omit to take
494
+ * the single most-recent claim for this user.
495
+ */
496
+ placement?: string;
497
+ /**
498
+ * Host product row for the redemption screen's ledger. Override-only: name and
499
+ * logo default from the same remote config the primer uses, so most integrations
500
+ * never pass this. The trial-end detail line is always DERIVED (remote
501
+ * durationDays + the redemption moment) and is not settable.
502
+ */
503
+ host?: {
504
+ name?: string;
505
+ status?: string;
506
+ logoUrl?: string;
507
+ };
508
+ }
509
+ /** Result of `redeem()`. */
510
+ export type RedeemResult =
511
+ /** The advertiser redirect was performed and the claim is now consumed. */
512
+ {
513
+ status: 'redeemed';
514
+ }
515
+ /**
516
+ * The sheet closed without redeeming. `reason` mirrors show(): user-driven
517
+ * closes carry no reason or a user reason; internal failures carry
518
+ * `{ type: 'error', error }` — redeem() never rejects. On an error the claim is
519
+ * untouched, so calling redeem() again later is safe.
520
+ */
521
+ | {
522
+ status: 'dismissed';
523
+ reason?: NotGrantedReason;
524
+ }
525
+ /**
526
+ * STRICTLY "there is no claim to redeem" — never an error in disguise. This is
527
+ * also what an `immediate` integration always gets: nothing was ever held.
528
+ */
529
+ | {
530
+ status: 'unavailable';
531
+ };
347
532
  /**
348
533
  * A subscription/conversion event forwarded from the host (Tier-1 client signal).
349
534
  * NON-AUTHORITATIVE — posted via the pk-authed analytics channel, never the HMAC
@@ -1 +1 @@
1
- {"version":3,"file":"types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;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAMD;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC"}
@@ -11,7 +11,9 @@ interface OfferCardEventMap extends Record<string, unknown> {
11
11
  }
12
12
  export declare class OfferCard {
13
13
  #private;
14
- constructor();
14
+ constructor(options?: {
15
+ claimEnabled?: boolean;
16
+ });
15
17
  /**
16
18
  * Render the offer card
17
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"OfferCard.d.ts","sourceRoot":"","sources":["../../src/ui/OfferCard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAOpD,UAAU,iBAAkB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzD,KAAK,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC;IACxB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,qBAAa,SAAS;;;IAUpB;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW;IAkBjC;;OAEG;IACH,EAAE,CAAC,CAAC,SAAS,MAAM,iBAAiB,EAClC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,MAAM,IAAI;IAgKb;;OAEG;IACH,OAAO,IAAI,IAAI;CAUhB"}
1
+ {"version":3,"file":"OfferCard.d.ts","sourceRoot":"","sources":["../../src/ui/OfferCard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAOpD,UAAU,iBAAkB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzD,KAAK,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC;IACxB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,qBAAa,SAAS;;gBAaR,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE;IAKhD;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW;IAkBjC;;OAEG;IACH,EAAE,CAAC,CAAC,SAAS,MAAM,iBAAiB,EAClC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,MAAM,IAAI;IAyKb;;OAEG;IACH,OAAO,IAAI,IAAI;CAUhB"}
@@ -45,6 +45,11 @@ export interface OfferCarouselOptions {
45
45
  * Off by default, so the churn-intervention and thankYou carousels are untouched.
46
46
  */
47
47
  selectable?: boolean;
48
+ /**
49
+ * When false every Claim affordance renders disabled — `Encore.isClaimEnabled`.
50
+ * Defaults true, which is byte-identical to before the option existed.
51
+ */
52
+ claimEnabled?: boolean;
48
53
  /**
49
54
  * Publisher colours for the compact page indicator: the inactive dots and the active
50
55
  * one. Written as CSS custom properties on the indicator element, so an unset value
@@ -1 +1 @@
1
- {"version":3,"file":"OfferCarousel.d.ts","sourceRoot":"","sources":["../../src/ui/OfferCarousel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAA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AAA;KAAE,CAAC;IAChC,SAAS,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C;;;;;;;OAOG;IACH,MAAM,EAAE;QAAE,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,QAAQ,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAED,qBAAa,aAAa;;gBAuEZ,MAAM,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,oBAAoB;IAoBvF;;OAEG;IACH,MAAM,IAAI,WAAW;IA8PrB;;OAEG;IACH,EAAE,CAAC,CAAC,SAAS,MAAM,gBAAgB,EACjC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC9C,MAAM,IAAI;IAIb;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;;;OAIG;IACH,IAAI,IAAI,IAAI;IAUZ;;;;;OAKG;IACH,gBAAgB,IAAI,KAAK,GAAG,SAAS;IAIrC;;;;;;;;;;OAUG;IACH,aAAa,IAAI,IAAI;IASrB;;;;;OAKG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAiBhC;;OAEG;IACH,QAAQ,IAAI,IAAI;IA4nBhB;;OAEG;IACH,OAAO,IAAI,IAAI;CA2BhB"}
@@ -26,6 +26,26 @@ export interface OfferModalOptions {
26
26
  * remain on every composition.
27
27
  */
28
28
  showCloseButton?: boolean;
29
+ /**
30
+ * Whether the sheet can be dismissed AT ALL. Defaults to `true`, which is
31
+ * every integration that does not deliberately ask otherwise.
32
+ *
33
+ * `false` removes the ×, backdrop-click and Escape together, because
34
+ * removing any one of them alone leaves the sheet dismissable and the caller
35
+ * did not ask for "fewer ways out", they asked for none. It is a
36
+ * host-capability statement, not a style: the only caller is Encore's own
37
+ * hosted offer page, where the surrounding webview is itself the way out and
38
+ * an in-sheet dismissal lands the user on a page they cannot leave either.
39
+ *
40
+ * ⚠️ A publisher's own site must NEVER pass this. There the sheet sits over
41
+ * the publisher's content with no webview to close, so a user who cannot
42
+ * dismiss is trapped on the page. The default keeps that impossible by
43
+ * omission rather than by convention.
44
+ *
45
+ * THE FOCUS TRAP IS NOT PART OF THIS. Tab still cycles inside the sheet:
46
+ * that is an accessibility guarantee about where focus goes, not a way out.
47
+ */
48
+ dismissible?: boolean;
29
49
  /**
30
50
  * Publisher override for the modal container's background, applied INLINE on the
31
51
  * modal element. Narrower than the `backgroundColor` theme variable, which also moves
@@ -1 +1 @@
1
- {"version":3,"file":"OfferModal.d.ts","sourceRoot":"","sources":["../../src/ui/OfferModal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,UAAU,aAAc,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrD,KAAK,EAAE,IAAI,CAAC;IACZ,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,UAAU;;gBAaT,KAAK,GAAE,cAAmB,EAAE,OAAO,GAAE,iBAAsB;IASvE;;OAEG;IACH,IAAI,IAAI,IAAI;IAqCZ;;OAEG;IACH,IAAI,IAAI,IAAI;IA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GAAG,IAAI;IA4BtC;;OAEG;IACH,EAAE,CAAC,CAAC,SAAS,MAAM,aAAa,EAC9B,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,GAC3C,MAAM,IAAI;IAmKb;;OAEG;IACH,OAAO,IAAI,IAAI;CAoBhB"}
@@ -1,17 +1,24 @@
1
1
  /**
2
- * Primer Screen Component (S1.5 of the deferred flow)
2
+ * Primer Screen — the holding state a deferred claim lands on.
3
3
  *
4
- * Rendered into the open OfferModal immediately after a deferred-mode claim: the
5
- * handoff moment that converts claim momentum into starting the host's own trial.
6
- * Dual-brand lockup (partner + host), SDK-composed copy from the resolved display
7
- * nouns, and a single forward CTA. show()'s promise settles on this screen's CTA
8
- * or on any modal dismissal — both resolve 'claimed' (the claim is a fact either
9
- * way); dismissal is the modal's own X-chrome, not a control here.
4
+ * Rendered into the open modal immediately after a deferred claim: the moment the
5
+ * claim is banked and the user is told it will be waiting. show() settles
6
+ * 'claimed' on this screen's CTA or on ANY modal dismissal — the claim is a fact
7
+ * either way, so the post-claim latch holds here.
8
+ *
9
+ * Two narratives, chosen by whether the host is nameable:
10
+ * - 'activation': the host's own trial is what happens next, so the copy names it.
11
+ * - 'holding': no host nouns resolved, so the sentence is about the reward
12
+ * itself. This is a DEGRADATION, never an error — 2.0.1 refused to
13
+ * present at all here, which is the worse failure for an SDK.
10
14
  */
11
- import { type ResolvedDisplay } from '../core/DisplayResolver';
15
+ import { type HostDisplay } from '../core/hostDisplay';
16
+ export type PrimerVariant = 'activation' | 'holding';
12
17
  export interface PrimerScreenConfig {
13
- /** Resolved host display nouns (guard-validated before Screen 1 rendered). */
14
- display: ResolvedDisplay;
18
+ /** Which narrative to render. Defaults to 'holding' (the safe, host-free story). */
19
+ variant?: PrimerVariant;
20
+ /** Resolved host nouns. Empty is legal and selects 'holding'. */
21
+ display: HostDisplay;
15
22
  /** Partner branding from the just-claimed offer. */
16
23
  partner: {
17
24
  name?: string;
@@ -20,7 +27,7 @@ export interface PrimerScreenConfig {
20
27
  };
21
28
  }
22
29
  interface PrimerScreenEventMap extends Record<string, unknown> {
23
- /** The user tapped the forward CTA — caller settles 'claimed' and closes. */
30
+ /** The user tapped the forward CTA — the caller settles 'claimed' and closes. */
24
31
  continue: undefined;
25
32
  }
26
33
  export declare class PrimerScreen {
@@ -1 +1 @@
1
- {"version":3,"file":"PrimerScreen.d.ts","sourceRoot":"","sources":["../../src/ui/PrimerScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG5E,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,OAAO,EAAE,eAAe,CAAC;IACzB,oDAAoD;IACpD,OAAO,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjE;AAED,UAAU,oBAAqB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5D,6EAA6E;IAC7E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,qBAAa,YAAY;;gBAKX,MAAM,EAAE,kBAAkB;IAKtC,MAAM,IAAI,WAAW;IA+CrB,EAAE,CAAC,CAAC,SAAS,MAAM,oBAAoB,EACrC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,IAAI,GAClD,MAAM,IAAI;IAIb,OAAO,IAAI,IAAI;CAQhB"}
1
+ {"version":3,"file":"PrimerScreen.d.ts","sourceRoot":"","sources":["../../src/ui/PrimerScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGpE,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,oFAAoF;IACpF,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,iEAAiE;IACjE,OAAO,EAAE,WAAW,CAAC;IACrB,oDAAoD;IACpD,OAAO,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjE;AAED,UAAU,oBAAqB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5D,iFAAiF;IACjF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,qBAAa,YAAY;;gBAKX,MAAM,EAAE,kBAAkB;IAKtC,MAAM,IAAI,WAAW;IAoErB,EAAE,CAAC,CAAC,SAAS,MAAM,oBAAoB,EACrC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,IAAI,GAClD,MAAM,IAAI;IAIb,OAAO,IAAI,IAAI;CAQhB"}
@@ -1,22 +1,21 @@
1
1
  /**
2
- * Redemption Screen Component (S2 of the deferred flow)
2
+ * Redemption Screen — the ready state, shown by redeem().
3
3
  *
4
- * Phase 2, shown by redeem(). The NARRATIVE is a function of the claim's
5
- * originating surface (Transaction.claimLayout), expressed as a variant map of
6
- * separate builders — extensible by adding an entry, never by threading more
4
+ * The narrative is a function of the claim's use case, expressed as a variant map
5
+ * of separate builders — extensible by adding an entry, never by threading more
7
6
  * conditionals through one render path:
8
7
  *
9
- * - 'activation' (claims from the 'list' handoff flow): the host conversion just
10
- * completed — dual-brand lockup, "your trial is active" copy, and the deal
11
- * ledger (host row Active with the derived trial-end detail, partner Pending).
12
- * - 'reward' (claims from 'thankYou' or unknown/legacy provenance): there was no
13
- * host-unlock moment — minimal congratulations + the pending partner row.
8
+ * - 'activation' (a reduceChurn claim with a nameable host): the host's own
9
+ * conversion has happened — dual-brand lockup, "your trial is active", and the
10
+ * deal ledger (host row Active with the derived trial-end detail, partner Pending).
11
+ * - 'reward' (a rewardUsers claim, or any claim whose host cannot be named): there
12
+ * was no host-unlock moment — minimal congratulations + the pending partner row.
14
13
  *
15
- * Both variants share the same chrome: reassurance note + one CTA ("Claim your
16
- * reward") that sends the user to the advertiser inside the click gesture.
14
+ * Both share the chrome: reassurance note + one CTA that sends the user to the
15
+ * advertiser inside the click gesture.
17
16
  */
18
- type RedemptionVariant = 'activation' | 'reward';
19
- interface RedemptionScreenConfig {
17
+ export type RedemptionVariant = 'activation' | 'reward';
18
+ export interface RedemptionScreenConfig {
20
19
  /** Which narrative to render. Defaults to 'reward' (the safe minimal story). */
21
20
  variant?: RedemptionVariant;
22
21
  /** Display reward copy, e.g. "30 days of free Apple Music". */
@@ -26,10 +25,7 @@ interface RedemptionScreenConfig {
26
25
  /** Partner logo (preferred) or a fallback image. */
27
26
  logoUrl?: string;
28
27
  imageUrl?: string;
29
- /**
30
- * Host product context — consumed by the 'activation' variant only (resolved
31
- * from live remote config + the redeem() host override by the caller).
32
- */
28
+ /** Host product context — the 'activation' variant only. */
33
29
  host?: {
34
30
  name?: string;
35
31
  trialPeriod?: string;
@@ -39,11 +35,11 @@ interface RedemptionScreenConfig {
39
35
  detail?: string;
40
36
  logoUrl?: string;
41
37
  };
42
- /** Optional CTA override; default is exactly "Claim your reward". */
38
+ /** Optional CTA override; the default is exactly "Claim your reward". */
43
39
  buttonText?: string;
44
40
  }
45
41
  interface RedemptionScreenEventMap extends Record<string, unknown> {
46
- /** The user tapped the claim CTA — caller fires the advertiser redirect. */
42
+ /** The user tapped the claim CTA — the caller fires the advertiser redirect. */
47
43
  continue: undefined;
48
44
  }
49
45
  export declare class RedemptionScreen {
@@ -1 +1 @@
1
- {"version":3,"file":"RedemptionScreen.d.ts","sourceRoot":"","sources":["../../src/ui/RedemptionScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,KA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AAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,8CAA8C;QAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,gEAAgE;QAChE,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,wBAAyB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChE,gFAAgF;IAChF,QAAQ,EAAE,SAAS,CAAC;CACrB;AA0ED,qBAAa,gBAAgB;;gBAKf,MAAM,EAAE,sBAAsB;IAK1C,MAAM,IAAI,WAAW;IAsCrB,EAAE,CAAC,CAAC,SAAS,MAAM,wBAAwB,EACzC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,KAAK,IAAI,GACtD,MAAM,IAAI;IAIb,OAAO,IAAI,IAAI;CAQhB"}
@@ -26,18 +26,53 @@ export declare const REWARD_COPY: {
26
26
  readonly trust: "No charges until trial ends, cancel anytime.";
27
27
  readonly primary: "Claim gift";
28
28
  readonly secondary: "No thanks";
29
+ /** The secondary's other job — see `RewardActionsOptions.secondary`. */
30
+ readonly next: "Next offer";
29
31
  };
30
32
  export interface RewardActionsOptions {
31
33
  /** Claim the selected offer (the variant's `claimOffer` action). */
32
34
  onClaim: () => void;
33
35
  /** Dismiss the sheet (the variant's `close` action). */
34
36
  onDecline: () => void;
37
+ /**
38
+ * Advance the carousel's selection. Required only for `secondary: 'next'`;
39
+ * ignored otherwise, so a decline-mode caller need not supply one.
40
+ */
41
+ onNext?: () => void;
42
+ /**
43
+ * WHAT THE SECONDARY BUTTON DOES. Defaults to `'decline'`, which is the
44
+ * "No thanks" every integration has today.
45
+ *
46
+ * `'next'` makes it "Next offer": it advances the carousel's SELECTION — the
47
+ * same state the Claim CTA acts on — with the same animated scroll a swipe or
48
+ * a nav arrow produces. For a sheet the user cannot dismiss, that is the
49
+ * honest button: "No thanks" on a sheet with no way out is a control that
50
+ * lies about what it does, and the slot is better spent on the thing they
51
+ * actually want, which is to see the other offers.
52
+ *
53
+ * `'none'` renders nothing. Only for `'next'` with a single offer, where the
54
+ * button would be permanently inert.
55
+ *
56
+ * ⚠️ A publisher's own site keeps `'decline'`. `enabled` below can switch
57
+ * CLAIMING off and the decline stays live precisely so a user can always
58
+ * leave; anything but `'decline'` is for a host that leaves for them.
59
+ */
60
+ secondary?: 'decline' | 'next' | 'none';
35
61
  /**
36
62
  * Overrides the default trust line. Present so a publisher whose reward is not a
37
63
  * free trial is not stuck asserting "No charges until trial ends" — the default
38
64
  * is the variant's copy, not a universal truth.
39
65
  */
40
66
  trustText?: string;
67
+ /**
68
+ * When false the primary CTA renders disabled — the host has switched claiming
69
+ * off via `Encore.isClaimEnabled`. "No thanks" stays live: a user must always be
70
+ * able to leave.
71
+ *
72
+ * Independent of `claimSlot`: the gate is the SDK's, so it holds whether the CTA is
73
+ * the SDK's own button or a publisher's element. See `createActionSlot`.
74
+ */
75
+ claimEnabled?: boolean;
41
76
  /**
42
77
  * Publisher appearance for the two buttons: styled config, a ready element, or a
43
78
  * renderer.
@@ -1 +1 @@
1
- {"version":3,"file":"RewardActions.d.ts","sourceRoot":"","sources":["../../src/ui/RewardActions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CA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C,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,aAAa;;gBAwBZ,OAAO,EAAE,oBAAoB;IAIzC,MAAM,IAAI,WAAW;IA8DrB;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAW/C,OAAO,IAAI,IAAI;CAWhB"}
@@ -115,6 +115,20 @@ export interface ActionSlotOptions {
115
115
  label: string;
116
116
  /** The SDK behaviour. Runs on every activation, before anything the publisher wired up. */
117
117
  onActivate: () => void;
118
+ /**
119
+ * Whether the control acts. Defaults true. `false` renders it visibly unavailable and
120
+ * attaches NO activation listener, which is what makes the gate real rather than
121
+ * cosmetic — there is no handler to reach, so no publisher element, stray dispatch or
122
+ * synthetic `.click()` can claim through a disabled CTA.
123
+ *
124
+ * The two paths express it differently because they have to. A `<button>` gets the
125
+ * native `disabled` property, which the `:disabled` rules already style and which
126
+ * drops the tab stop for free. A host `<div role="button">` cannot be `disabled` at
127
+ * all — the attribute is meaningless on a non-form element and `:disabled` never
128
+ * matches it — so it gets `aria-disabled="true"`, styled through the matching
129
+ * `[aria-disabled='true']` rule, and its tab stop removed by hand.
130
+ */
131
+ enabled?: boolean;
118
132
  useCase: UseCase;
119
133
  slot?: ButtonSlot;
120
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"appearance.d.ts","sourceRoot":"","sources":["../../src/ui/appearance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAgBxC,wFAAwF;AACxF,MAAM,WAAW,qBAAqB;I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ACtD;AAoCD,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,WAAW,CAKjE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,IAAI,GAClB,iBAAiB,CAOnB"}
1
+ {"version":3,"file":"brandComponents.d.ts","sourceRoot":"","sources":["../../src/ui/brandComponents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA8CD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAG,WAAW,CAwBpF;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,CAAC;IAChB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAA;KAAE,CAAC;CACtD;AAqCD,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,WAAW,CAKjE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,IAAI,GAClB,iBAAiB,CAOnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAGX,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX;;;;;;;;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;;;;;GAaG;AACH,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;IAI/B,0FAA0F;;CAElF,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAwgED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,GAAE,cAAmB,GAAG,IAAI,CAgB7D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAe1D;AAED;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7C"}
@@ -2,7 +2,17 @@
2
2
  * Logger utility for Encore Web SDK
3
3
  * Respects configured log level and prefixes all messages
4
4
  */
5
- export type LogLevel = 'none' | 'debug';
5
+ /**
6
+ * Log verbosity, as an ordered ladder: each level includes the ones below it,
7
+ * so `'warn'` shows warnings and errors.
8
+ *
9
+ * The rungs and their order match the Swift and Android SDKs
10
+ * (`none < error < warn < info < debug`), and so does the `'none'` default.
11
+ * Before this, web had only `'none' | 'debug'`, so a publisher who wanted to
12
+ * see SDK errors had to accept every debug line with them.
13
+ */
14
+ export declare const LOG_LEVELS: readonly ["none", "error", "warn", "info", "debug"];
15
+ export type LogLevel = (typeof LOG_LEVELS)[number];
6
16
  declare class Logger {
7
17
  #private;
8
18
  setLogLevel(level: LogLevel): void;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAIxC,cAAM,MAAM;;IAGV,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAIlC,WAAW,IAAI,QAAQ;IAIvB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/B;;OAEG;IACH,QAAQ,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAGnC;AAGD,eAAO,MAAM,MAAM,QAAe,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,qDAAsD,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAOnD,cAAM,MAAM;;IAGV,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAIlC,WAAW,IAAI,QAAQ;IAQvB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,I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