@sesamy/sesamy-components 2.24.3 → 2.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -301,6 +301,22 @@ A web component that displays a paywall for content, loading paywall settings fr
301
301
  - `utm-source`, `utm-medium`, `utm-campaign`, `utm-term`, `utm-content`: UTM parameters for tracking
302
302
  - `pass`: Pass ID for access
303
303
 
304
+ **Post-purchase redirect:**
305
+
306
+ Where the visitor lands after buying is resolved when they go to checkout, first
307
+ usable value winning:
308
+
309
+ 1. `redirectUrl` on the chosen subscription option (from the paywall settings)
310
+ 2. `settings.redirectUrl` on the paywall (the paywall-wide default)
311
+ 3. the `redirect-url` attribute on the element
312
+ 4. the page the visitor is on
313
+
314
+ Only an absolute URL counts as usable. Empty, whitespace-only and unparseable
315
+ values fall through to the next level (the last with a `console.warn`) instead
316
+ of sending a broken `redirect-url` to checkout. Single purchases have no
317
+ per-option redirect, so they start at level 2; subscription options of type URL
318
+ link straight out and never reach checkout at all.
319
+
304
320
  **Events:**
305
321
 
306
322
  Per-element events dispatched directly on the `<sesamy-paywall>` element (bubble, composed):
@@ -353,7 +369,7 @@ The paywall also emits the `addToCart` interaction through sesamy-js when the us
353
369
 
354
370
  #### Slots
355
371
 
356
- The `sesamy-paywall` component provides two main slots for customization:
372
+ The `sesamy-paywall` component provides three slots for customization:
357
373
 
358
374
  ##### below-headline
359
375
 
@@ -383,9 +399,22 @@ The `sesamy-paywall` component provides two main slots for customization:
383
399
  </sesamy-paywall>
384
400
  ```
385
401
 
402
+ ##### login-button-text
403
+
404
+ - **Purpose:** Replaces the text of the "already subscribing" login button the paywall renders above the headline.
405
+ - **Behavior:** The paywall embeds a nested `sesamy-login` component and forwards this slot into that component's own `button-text` slot. When you leave it empty, the default translated text (`Already subscribing? Login`) is used.
406
+ - **Availability:** Only the `ARTICLE` template renders this login button. The `BOXES` template hides it, and the `LOGIN` template doesn't embed a `sesamy-login` at all, so the slot has no effect there.
407
+ - **Styling:** Inside the paywall this button is rendered borderless and underlined (4px offset), at the base font size (16px by default) rather than the 14px a standalone `sesamy-login` uses, and it fades to 80% opacity on hover. Set `--sesamy-login-button-text-size` on the paywall to override the size; the other `--sesamy-login-button-*` variables apply as usual.
408
+ - **Example:**
409
+ ```html
410
+ <sesamy-paywall settings-url="https://api.example.com/paywall/settings">
411
+ <span slot="login-button-text">Already a subscriber? Sign in</span>
412
+ </sesamy-paywall>
413
+ ```
414
+
386
415
  **Note:**
387
416
 
388
- - The `below-headline` slot adds to the paywall, while the `features` slot replaces the default features section entirely.
417
+ - The `below-headline` slot adds to the paywall, while the `features` and `login-button-text` slots replace the default content entirely.
389
418
 
390
419
  ### sesamy-visibility
391
420