@sesamy/sesamy-js 1.38.1 → 1.40.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
@@ -174,19 +174,29 @@ These are the available configuration options, with their default values:
174
174
  endpoint: 'https://auth.sesamy.com',
175
175
  redirectUri: window.location.origin
176
176
  },
177
- content: {
178
- article: {
179
- article: { selector: 'article' },
180
- image: { selector: 'img', attribute: 'src' },
181
- title: { selector: 'h1', attribute: 'textContent' },
182
- excerpt: { selector: 'p', attribute: 'textContent' },
183
- price: { selector: 'article', attribute: 'data-price' },
184
- currency: { selector: 'article', attribute: 'data-currency' },
185
- url: { selector: 'link', attribute: 'href' },
186
- id: { selector: 'article', attribute: 'data-id' },
187
- pass: { selector: 'article', attribute: 'data-pass' },
177
+ content: [
178
+ {
179
+ type: 'article',
180
+ path: '/articles', // Optional: matches URLs containing this path
181
+ pass: 'premium', // Optional: pass requirement
182
+ price: { // Optional: price information
183
+ amount: 9.99,
184
+ currency: 'USD'
185
+ },
186
+ paywallUrl: 'https://example.com/paywall', // Optional: custom paywall URL
187
+ selectors: {
188
+ article: { selector: 'article' },
189
+ image: { selector: 'img', attribute: 'src' },
190
+ title: { selector: 'h1', attribute: 'textContent' },
191
+ excerpt: { selector: 'p', attribute: 'textContent' },
192
+ price: { selector: 'article', attribute: 'data-price' },
193
+ currency: { selector: 'article', attribute: 'data-currency' },
194
+ url: { selector: 'link', attribute: 'href' },
195
+ id: { selector: 'article', attribute: 'data-id' },
196
+ pass: { selector: 'article', attribute: 'data-pass' },
197
+ }
188
198
  }
189
- },
199
+ ],
190
200
  tranforms: {
191
201
  enabled: false,
192
202
  rules: []