@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 +22 -12
- package/dist/sesamy-js.cjs +7 -7
- package/dist/sesamy-js.d.ts +19 -3
- package/dist/sesamy-js.iife.js +7 -7
- package/dist/sesamy-js.mjs +2504 -2411
- package/package.json +1 -1
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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: []
|