@sesamy/sesamy-components 2.27.4 → 2.28.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
@@ -299,7 +299,7 @@ A web component that displays a paywall for content, loading paywall settings fr
299
299
 
300
300
  **Props/Attributes:**
301
301
 
302
- - `settings-url`: URL to fetch paywall settings (required)
302
+ - `settings-url`: URL to fetch paywall settings (required). Path-like relative URLs — starting with `/`, `./` or `../`, or containing `/` (e.g. `/paywall/settings.json`) — are supported and resolved against the page. A value with no slash is treated as a paywall id, so use `./settings.json` for a same-directory file.
303
303
  - `item-src`: URL of the content item
304
304
  - `price`: Price of the content
305
305
  - `currency`: Currency code for the price
@@ -355,6 +355,7 @@ The paywall also emits the `addToCart` interaction through sesamy-js when the us
355
355
  - `below-headline`: Content rendered below the paywall headline (e.g., additional info, custom elements)
356
356
  - `features`: Content rendered in the features section of the paywall (e.g., feature list, benefits)
357
357
  - `login-button-text`: Replaces the text of the "already subscribing" login button
358
+ - `logout-button-text`: Replaces the "Log out" text in the row a logged-in reader without access sees
358
359
 
359
360
  **Basic Usage Example:**
360
361
 
@@ -377,7 +378,7 @@ The paywall also emits the `addToCart` interaction through sesamy-js when the us
377
378
 
378
379
  #### Slots
379
380
 
380
- The `sesamy-paywall` component provides four slots for customization:
381
+ The `sesamy-paywall` component provides five slots for customization:
381
382
 
382
383
  ##### headline
383
384
 
@@ -433,9 +434,21 @@ The `sesamy-paywall` component provides four slots for customization:
433
434
  </sesamy-paywall>
434
435
  ```
435
436
 
437
+ ##### logout-button-text
438
+
439
+ - **Purpose:** Replaces the "Log out" label in the row a logged-in reader without access sees.
440
+ - **Behavior:** When the reader is logged in but has no access and `showLoginButton` is on, the paywall shows "Logged in as {email} · Log out" in place of the login button. This slot replaces only the "Log out" label; the "Logged in as {email}" prefix is translated and can't be slotted. When you leave it empty, the default translated text is used. After the reader logs out, the paywall switches back to the login row without a page reload.
441
+ - **Availability:** Only the `ARTICLE` template renders this row, so the slot has no effect in the `BOXES` and `LOGIN` templates.
442
+ - **Example:**
443
+ ```html
444
+ <sesamy-paywall settings-url="https://api.example.com/paywall/settings">
445
+ <span slot="logout-button-text">Sign out</span>
446
+ </sesamy-paywall>
447
+ ```
448
+
436
449
  **Note:**
437
450
 
438
- - The `below-headline` slot adds to the paywall, while the `headline`, `features` and `login-button-text` slots replace the default content entirely.
451
+ - The `below-headline` slot adds to the paywall, while the `headline`, `features` and `login-button-text` slots replace the default content entirely. The `logout-button-text` slot replaces only the "Log out" label.
439
452
 
440
453
  ### sesamy-visibility
441
454