@extenshi/pay 0.8.0 → 0.9.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 +6 -2
- package/dist/core/extenshi-pay.d.ts +1 -1
- package/dist/core.d.mts +14 -3
- package/dist/core.d.ts +14 -3
- package/dist/core.js +3 -3
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +3 -3
- package/dist/core.mjs.map +1 -1
- package/dist/extenshi-pay-lite.js +3 -3
- package/dist/extenshi-pay-lite.js.map +1 -1
- package/dist/extenshi-pay-lite.min.js +3 -3
- package/dist/extenshi-pay-lite.min.js.map +1 -1
- package/dist/extenshi-pay-lite.mjs +3 -3
- package/dist/extenshi-pay-lite.mjs.map +1 -1
- package/dist/extenshi-pay.cjs.js +156 -15
- package/dist/extenshi-pay.cjs.js.map +1 -1
- package/dist/extenshi-pay.d.ts.map +1 -1
- package/dist/extenshi-pay.js +156 -15
- package/dist/extenshi-pay.js.map +1 -1
- package/dist/extenshi-pay.min.js +3 -3
- package/dist/extenshi-pay.min.js.map +1 -1
- package/dist/extenshi-pay.min.mjs +3 -3
- package/dist/extenshi-pay.min.mjs.map +1 -1
- package/dist/extenshi-pay.mjs +156 -15
- package/dist/extenshi-pay.mjs.map +1 -1
- package/dist/index.d.mts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/lite.d.mts +14 -3
- package/dist/lite.d.ts +14 -3
- package/dist/paywall/icon.d.ts +18 -0
- package/dist/paywall/icon.d.ts.map +1 -0
- package/dist/paywall/renderer.d.ts +8 -0
- package/dist/paywall/renderer.d.ts.map +1 -1
- package/dist/paywall.d.mts +20 -1
- package/dist/paywall.d.ts +20 -1
- package/dist/paywall.js +79 -13
- package/dist/paywall.js.map +1 -1
- package/dist/paywall.mjs +79 -13
- package/dist/paywall.mjs.map +1 -1
- package/dist/types/paywall.d.ts +12 -1
- package/dist/types/paywall.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -327,10 +327,21 @@ interface PaywallOptions {
|
|
|
327
327
|
sku?: string;
|
|
328
328
|
title?: string;
|
|
329
329
|
description?: string;
|
|
330
|
-
/**
|
|
330
|
+
/**
|
|
331
|
+
* Bullet points, in the user's language (`chrome.i18n.getMessage`). The
|
|
332
|
+
* offer's `features[]` are entitlement keys and are never shown: without
|
|
333
|
+
* this option the paywall has no feature list.
|
|
334
|
+
*/
|
|
331
335
|
features?: string[];
|
|
332
336
|
/** Free-tier bullets for the comparison templates (`inline`, `fullscreen`). */
|
|
333
337
|
freeFeatures?: string[];
|
|
338
|
+
/**
|
|
339
|
+
* Header image in place of the template's glyph: a path inside the
|
|
340
|
+
* extension (`icons/icon128.png`) or a `data:image/` URL. Defaults to the
|
|
341
|
+
* largest `manifest.icons` entry on the extension's own pages (popup,
|
|
342
|
+
* options); `false` keeps the glyph. Remote URLs are ignored.
|
|
343
|
+
*/
|
|
344
|
+
icon?: string | false;
|
|
334
345
|
theme?: ThemeConfig;
|
|
335
346
|
/** Mount point for `inline` mode (default `document.body`). */
|
|
336
347
|
container?: HTMLElement;
|
|
@@ -785,7 +796,7 @@ declare class Logger {
|
|
|
785
796
|
declare const logger: Logger;
|
|
786
797
|
|
|
787
798
|
/** Kept in sync with package.json by tests/unit/version.test.ts. */
|
|
788
|
-
declare const VERSION = "0.
|
|
799
|
+
declare const VERSION = "0.9.0";
|
|
789
800
|
|
|
790
801
|
/** Same shape the BFF accepts (`en`, `de-DE`, `zh-Hant`). */
|
|
791
802
|
declare const LOCALE_RE: RegExp;
|
|
@@ -822,7 +833,7 @@ interface ExtenshiPayDeps {
|
|
|
822
833
|
now?: () => number;
|
|
823
834
|
}
|
|
824
835
|
declare class ExtenshiPayLite {
|
|
825
|
-
static readonly version = "0.
|
|
836
|
+
static readonly version = "0.9.0";
|
|
826
837
|
protected readonly config: ResolvedConfig;
|
|
827
838
|
protected readonly emitter: EventEmitter<ExtenshiPayEvents>;
|
|
828
839
|
protected readonly storage: StorageAdapter;
|
|
@@ -1011,6 +1022,8 @@ interface PaywallView {
|
|
|
1011
1022
|
description: string;
|
|
1012
1023
|
features: string[];
|
|
1013
1024
|
freeFeatures: string[];
|
|
1025
|
+
/** Header image URL (./icon.ts) in place of the template's glyph; absent or null keeps the glyph. */
|
|
1026
|
+
icon?: string | null;
|
|
1014
1027
|
brandName: string;
|
|
1015
1028
|
offer: PayOfferDto | null;
|
|
1016
1029
|
checkoutEnabled: boolean;
|
|
@@ -1051,6 +1064,12 @@ declare class PaywallRenderer {
|
|
|
1051
1064
|
show(view: PaywallView): HTMLElement;
|
|
1052
1065
|
hide(): void;
|
|
1053
1066
|
private prune;
|
|
1067
|
+
/**
|
|
1068
|
+
* Swaps the templates' product glyphs for the extension's icon. A tile's
|
|
1069
|
+
* gradient only backs the white glyph, so it goes too; an image that fails
|
|
1070
|
+
* to load puts the glyph (and the gradient) back.
|
|
1071
|
+
*/
|
|
1072
|
+
private placeIcon;
|
|
1054
1073
|
/**
|
|
1055
1074
|
* Inserts the unticked waiver checkbox right before the first upgrade
|
|
1056
1075
|
* button and keeps every upgrade button disabled until it is ticked.
|
package/dist/index.d.ts
CHANGED
|
@@ -327,10 +327,21 @@ interface PaywallOptions {
|
|
|
327
327
|
sku?: string;
|
|
328
328
|
title?: string;
|
|
329
329
|
description?: string;
|
|
330
|
-
/**
|
|
330
|
+
/**
|
|
331
|
+
* Bullet points, in the user's language (`chrome.i18n.getMessage`). The
|
|
332
|
+
* offer's `features[]` are entitlement keys and are never shown: without
|
|
333
|
+
* this option the paywall has no feature list.
|
|
334
|
+
*/
|
|
331
335
|
features?: string[];
|
|
332
336
|
/** Free-tier bullets for the comparison templates (`inline`, `fullscreen`). */
|
|
333
337
|
freeFeatures?: string[];
|
|
338
|
+
/**
|
|
339
|
+
* Header image in place of the template's glyph: a path inside the
|
|
340
|
+
* extension (`icons/icon128.png`) or a `data:image/` URL. Defaults to the
|
|
341
|
+
* largest `manifest.icons` entry on the extension's own pages (popup,
|
|
342
|
+
* options); `false` keeps the glyph. Remote URLs are ignored.
|
|
343
|
+
*/
|
|
344
|
+
icon?: string | false;
|
|
334
345
|
theme?: ThemeConfig;
|
|
335
346
|
/** Mount point for `inline` mode (default `document.body`). */
|
|
336
347
|
container?: HTMLElement;
|
|
@@ -785,7 +796,7 @@ declare class Logger {
|
|
|
785
796
|
declare const logger: Logger;
|
|
786
797
|
|
|
787
798
|
/** Kept in sync with package.json by tests/unit/version.test.ts. */
|
|
788
|
-
declare const VERSION = "0.
|
|
799
|
+
declare const VERSION = "0.9.0";
|
|
789
800
|
|
|
790
801
|
/** Same shape the BFF accepts (`en`, `de-DE`, `zh-Hant`). */
|
|
791
802
|
declare const LOCALE_RE: RegExp;
|
|
@@ -822,7 +833,7 @@ interface ExtenshiPayDeps {
|
|
|
822
833
|
now?: () => number;
|
|
823
834
|
}
|
|
824
835
|
declare class ExtenshiPayLite {
|
|
825
|
-
static readonly version = "0.
|
|
836
|
+
static readonly version = "0.9.0";
|
|
826
837
|
protected readonly config: ResolvedConfig;
|
|
827
838
|
protected readonly emitter: EventEmitter<ExtenshiPayEvents>;
|
|
828
839
|
protected readonly storage: StorageAdapter;
|
|
@@ -1011,6 +1022,8 @@ interface PaywallView {
|
|
|
1011
1022
|
description: string;
|
|
1012
1023
|
features: string[];
|
|
1013
1024
|
freeFeatures: string[];
|
|
1025
|
+
/** Header image URL (./icon.ts) in place of the template's glyph; absent or null keeps the glyph. */
|
|
1026
|
+
icon?: string | null;
|
|
1014
1027
|
brandName: string;
|
|
1015
1028
|
offer: PayOfferDto | null;
|
|
1016
1029
|
checkoutEnabled: boolean;
|
|
@@ -1051,6 +1064,12 @@ declare class PaywallRenderer {
|
|
|
1051
1064
|
show(view: PaywallView): HTMLElement;
|
|
1052
1065
|
hide(): void;
|
|
1053
1066
|
private prune;
|
|
1067
|
+
/**
|
|
1068
|
+
* Swaps the templates' product glyphs for the extension's icon. A tile's
|
|
1069
|
+
* gradient only backs the white glyph, so it goes too; an image that fails
|
|
1070
|
+
* to load puts the glyph (and the gradient) back.
|
|
1071
|
+
*/
|
|
1072
|
+
private placeIcon;
|
|
1054
1073
|
/**
|
|
1055
1074
|
* Inserts the unticked waiver checkbox right before the first upgrade
|
|
1056
1075
|
* button and keeps every upgrade button disabled until it is ticked.
|
package/dist/lite.d.mts
CHANGED
|
@@ -289,10 +289,21 @@ interface PaywallOptions {
|
|
|
289
289
|
sku?: string;
|
|
290
290
|
title?: string;
|
|
291
291
|
description?: string;
|
|
292
|
-
/**
|
|
292
|
+
/**
|
|
293
|
+
* Bullet points, in the user's language (`chrome.i18n.getMessage`). The
|
|
294
|
+
* offer's `features[]` are entitlement keys and are never shown: without
|
|
295
|
+
* this option the paywall has no feature list.
|
|
296
|
+
*/
|
|
293
297
|
features?: string[];
|
|
294
298
|
/** Free-tier bullets for the comparison templates (`inline`, `fullscreen`). */
|
|
295
299
|
freeFeatures?: string[];
|
|
300
|
+
/**
|
|
301
|
+
* Header image in place of the template's glyph: a path inside the
|
|
302
|
+
* extension (`icons/icon128.png`) or a `data:image/` URL. Defaults to the
|
|
303
|
+
* largest `manifest.icons` entry on the extension's own pages (popup,
|
|
304
|
+
* options); `false` keeps the glyph. Remote URLs are ignored.
|
|
305
|
+
*/
|
|
306
|
+
icon?: string | false;
|
|
296
307
|
theme?: ThemeConfig;
|
|
297
308
|
/** Mount point for `inline` mode (default `document.body`). */
|
|
298
309
|
container?: HTMLElement;
|
|
@@ -669,7 +680,7 @@ interface ExtenshiPayDeps {
|
|
|
669
680
|
now?: () => number;
|
|
670
681
|
}
|
|
671
682
|
declare class ExtenshiPayLite {
|
|
672
|
-
static readonly version = "0.
|
|
683
|
+
static readonly version = "0.9.0";
|
|
673
684
|
protected readonly config: ResolvedConfig;
|
|
674
685
|
protected readonly emitter: EventEmitter<ExtenshiPayEvents>;
|
|
675
686
|
protected readonly storage: StorageAdapter;
|
|
@@ -747,7 +758,7 @@ declare class ExtenshiPayLite {
|
|
|
747
758
|
}
|
|
748
759
|
|
|
749
760
|
/** Kept in sync with package.json by tests/unit/version.test.ts. */
|
|
750
|
-
declare const VERSION = "0.
|
|
761
|
+
declare const VERSION = "0.9.0";
|
|
751
762
|
|
|
752
763
|
export { ERROR_CODES, ExtenshiPayLite as ExtenshiPay, ExtenshiPayError, ExtenshiPayLite, MockTransport, PAY_WITHDRAWAL_WAIVER_VERSION, VERSION, ExtenshiPayLite as default };
|
|
753
764
|
export type { CheckoutOptions, CheckoutResult, CheckoutState, CustomerPortalOptions, Entitlement, EntitlementSource, ErrorCode, ExtenshiPayConfig, ExtenshiPayDeps, ExtenshiPayEventName, ExtenshiPayEvents, GetEntitlementOptions, LicenseSummary, MockData, PayEntitlementItem, PayEntitlementStatus, PayOfferDto, PayPortalAccount, PayPortalResponse, PaySellerPublic, PayWithdrawalWaiver, RequireFeatureOptions, RestoreOptions, RestoreResult, StorageAdapter, ThemeConfig, Transport, WithdrawalWaiverConsent };
|
package/dist/lite.d.ts
CHANGED
|
@@ -289,10 +289,21 @@ interface PaywallOptions {
|
|
|
289
289
|
sku?: string;
|
|
290
290
|
title?: string;
|
|
291
291
|
description?: string;
|
|
292
|
-
/**
|
|
292
|
+
/**
|
|
293
|
+
* Bullet points, in the user's language (`chrome.i18n.getMessage`). The
|
|
294
|
+
* offer's `features[]` are entitlement keys and are never shown: without
|
|
295
|
+
* this option the paywall has no feature list.
|
|
296
|
+
*/
|
|
293
297
|
features?: string[];
|
|
294
298
|
/** Free-tier bullets for the comparison templates (`inline`, `fullscreen`). */
|
|
295
299
|
freeFeatures?: string[];
|
|
300
|
+
/**
|
|
301
|
+
* Header image in place of the template's glyph: a path inside the
|
|
302
|
+
* extension (`icons/icon128.png`) or a `data:image/` URL. Defaults to the
|
|
303
|
+
* largest `manifest.icons` entry on the extension's own pages (popup,
|
|
304
|
+
* options); `false` keeps the glyph. Remote URLs are ignored.
|
|
305
|
+
*/
|
|
306
|
+
icon?: string | false;
|
|
296
307
|
theme?: ThemeConfig;
|
|
297
308
|
/** Mount point for `inline` mode (default `document.body`). */
|
|
298
309
|
container?: HTMLElement;
|
|
@@ -669,7 +680,7 @@ interface ExtenshiPayDeps {
|
|
|
669
680
|
now?: () => number;
|
|
670
681
|
}
|
|
671
682
|
declare class ExtenshiPayLite {
|
|
672
|
-
static readonly version = "0.
|
|
683
|
+
static readonly version = "0.9.0";
|
|
673
684
|
protected readonly config: ResolvedConfig;
|
|
674
685
|
protected readonly emitter: EventEmitter<ExtenshiPayEvents>;
|
|
675
686
|
protected readonly storage: StorageAdapter;
|
|
@@ -747,7 +758,7 @@ declare class ExtenshiPayLite {
|
|
|
747
758
|
}
|
|
748
759
|
|
|
749
760
|
/** Kept in sync with package.json by tests/unit/version.test.ts. */
|
|
750
|
-
declare const VERSION = "0.
|
|
761
|
+
declare const VERSION = "0.9.0";
|
|
751
762
|
|
|
752
763
|
export { ERROR_CODES, ExtenshiPayLite as ExtenshiPay, ExtenshiPayError, ExtenshiPayLite, MockTransport, PAY_WITHDRAWAL_WAIVER_VERSION, VERSION, ExtenshiPayLite as default };
|
|
753
764
|
export type { CheckoutOptions, CheckoutResult, CheckoutState, CustomerPortalOptions, Entitlement, EntitlementSource, ErrorCode, ExtenshiPayConfig, ExtenshiPayDeps, ExtenshiPayEventName, ExtenshiPayEvents, GetEntitlementOptions, LicenseSummary, MockData, PayEntitlementItem, PayEntitlementStatus, PayOfferDto, PayPortalAccount, PayPortalResponse, PaySellerPublic, PayWithdrawalWaiver, RequireFeatureOptions, RestoreOptions, RestoreResult, StorageAdapter, ThemeConfig, Transport, WithdrawalWaiverConsent };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paywall's header image: the extension's own icon in place of the
|
|
3
|
+
* templates' generic glyph (lock, layers).
|
|
4
|
+
*
|
|
5
|
+
* Only images from the extension package or `data:image/` URLs: a remote
|
|
6
|
+
* image would be a request to a third party on every paywall view. The
|
|
7
|
+
* manifest icon is the default on the extension's own pages (popup, options)
|
|
8
|
+
* only. A content script runs on the site's origin, where the package's files
|
|
9
|
+
* load only when `web_accessible_resources` lists them, and the SDK never asks
|
|
10
|
+
* for that.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The header image for `PaywallOptions.icon`, or null to keep the template's
|
|
14
|
+
* glyph: `false` opts out, a `data:image/` URL is used anywhere, a package path
|
|
15
|
+
* (or the manifest's largest icon by default) only on the extension's pages.
|
|
16
|
+
*/
|
|
17
|
+
export declare function paywallIconUrl(option?: string | false): string | null;
|
|
18
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/paywall/icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA8CH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,CAerE"}
|
|
@@ -17,6 +17,8 @@ export interface PaywallView {
|
|
|
17
17
|
description: string;
|
|
18
18
|
features: string[];
|
|
19
19
|
freeFeatures: string[];
|
|
20
|
+
/** Header image URL (./icon.ts) in place of the template's glyph; absent or null keeps the glyph. */
|
|
21
|
+
icon?: string | null;
|
|
20
22
|
brandName: string;
|
|
21
23
|
offer: PayOfferDto | null;
|
|
22
24
|
checkoutEnabled: boolean;
|
|
@@ -57,6 +59,12 @@ export declare class PaywallRenderer {
|
|
|
57
59
|
show(view: PaywallView): HTMLElement;
|
|
58
60
|
hide(): void;
|
|
59
61
|
private prune;
|
|
62
|
+
/**
|
|
63
|
+
* Swaps the templates' product glyphs for the extension's icon. A tile's
|
|
64
|
+
* gradient only backs the white glyph, so it goes too; an image that fails
|
|
65
|
+
* to load puts the glyph (and the gradient) back.
|
|
66
|
+
*/
|
|
67
|
+
private placeIcon;
|
|
60
68
|
/**
|
|
61
69
|
* Inserts the unticked waiver checkbox right before the first upgrade
|
|
62
70
|
* button and keeps every upgrade button disabled until it is ticked.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/paywall/renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAOtE,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,WAAW,GAAG,IAAI,CAAA;IACzB,eAAe,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAC/B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC7C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,EAAE,WAAW,CAAA;IAClB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IAChC,SAAS,CAAC,EAAE,WAAW,CAAA;CACvB;AAED,MAAM,WAAW,wBAAwB;IACxC,kGAAkG;IAClG,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB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|
116
116
|
sku?: string;
|
|
117
117
|
title?: string;
|
|
118
118
|
description?: string;
|
|
119
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Bullet points, in the user's language (`chrome.i18n.getMessage`). The
|
|
121
|
+
* offer's `features[]` are entitlement keys and are never shown: without
|
|
122
|
+
* this option the paywall has no feature list.
|
|
123
|
+
*/
|
|
120
124
|
features?: string[];
|
|
121
125
|
/** Free-tier bullets for the comparison templates (`inline`, `fullscreen`). */
|
|
122
126
|
freeFeatures?: string[];
|
|
127
|
+
/**
|
|
128
|
+
* Header image in place of the template's glyph: a path inside the
|
|
129
|
+
* extension (`icons/icon128.png`) or a `data:image/` URL. Defaults to the
|
|
130
|
+
* largest `manifest.icons` entry on the extension's own pages (popup,
|
|
131
|
+
* options); `false` keeps the glyph. Remote URLs are ignored.
|
|
132
|
+
*/
|
|
133
|
+
icon?: string | false;
|
|
123
134
|
theme?: ThemeConfig;
|
|
124
135
|
/** Mount point for `inline` mode (default `document.body`). */
|
|
125
136
|
container?: HTMLElement;
|
|
@@ -169,6 +180,8 @@ interface PaywallView {
|
|
|
169
180
|
description: string;
|
|
170
181
|
features: string[];
|
|
171
182
|
freeFeatures: string[];
|
|
183
|
+
/** Header image URL (./icon.ts) in place of the template's glyph; absent or null keeps the glyph. */
|
|
184
|
+
icon?: string | null;
|
|
172
185
|
brandName: string;
|
|
173
186
|
offer: PayOfferDto | null;
|
|
174
187
|
checkoutEnabled: boolean;
|
|
@@ -209,6 +222,12 @@ declare class PaywallRenderer {
|
|
|
209
222
|
show(view: PaywallView): HTMLElement;
|
|
210
223
|
hide(): void;
|
|
211
224
|
private prune;
|
|
225
|
+
/**
|
|
226
|
+
* Swaps the templates' product glyphs for the extension's icon. A tile's
|
|
227
|
+
* gradient only backs the white glyph, so it goes too; an image that fails
|
|
228
|
+
* to load puts the glyph (and the gradient) back.
|
|
229
|
+
*/
|
|
230
|
+
private placeIcon;
|
|
212
231
|
/**
|
|
213
232
|
* Inserts the unticked waiver checkbox right before the first upgrade
|
|
214
233
|
* button and keeps every upgrade button disabled until it is ticked.
|
package/dist/paywall.d.ts
CHANGED
|
@@ -116,10 +116,21 @@ interface PaywallOptions {
|
|
|
116
116
|
sku?: string;
|
|
117
117
|
title?: string;
|
|
118
118
|
description?: string;
|
|
119
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Bullet points, in the user's language (`chrome.i18n.getMessage`). The
|
|
121
|
+
* offer's `features[]` are entitlement keys and are never shown: without
|
|
122
|
+
* this option the paywall has no feature list.
|
|
123
|
+
*/
|
|
120
124
|
features?: string[];
|
|
121
125
|
/** Free-tier bullets for the comparison templates (`inline`, `fullscreen`). */
|
|
122
126
|
freeFeatures?: string[];
|
|
127
|
+
/**
|
|
128
|
+
* Header image in place of the template's glyph: a path inside the
|
|
129
|
+
* extension (`icons/icon128.png`) or a `data:image/` URL. Defaults to the
|
|
130
|
+
* largest `manifest.icons` entry on the extension's own pages (popup,
|
|
131
|
+
* options); `false` keeps the glyph. Remote URLs are ignored.
|
|
132
|
+
*/
|
|
133
|
+
icon?: string | false;
|
|
123
134
|
theme?: ThemeConfig;
|
|
124
135
|
/** Mount point for `inline` mode (default `document.body`). */
|
|
125
136
|
container?: HTMLElement;
|
|
@@ -169,6 +180,8 @@ interface PaywallView {
|
|
|
169
180
|
description: string;
|
|
170
181
|
features: string[];
|
|
171
182
|
freeFeatures: string[];
|
|
183
|
+
/** Header image URL (./icon.ts) in place of the template's glyph; absent or null keeps the glyph. */
|
|
184
|
+
icon?: string | null;
|
|
172
185
|
brandName: string;
|
|
173
186
|
offer: PayOfferDto | null;
|
|
174
187
|
checkoutEnabled: boolean;
|
|
@@ -209,6 +222,12 @@ declare class PaywallRenderer {
|
|
|
209
222
|
show(view: PaywallView): HTMLElement;
|
|
210
223
|
hide(): void;
|
|
211
224
|
private prune;
|
|
225
|
+
/**
|
|
226
|
+
* Swaps the templates' product glyphs for the extension's icon. A tile's
|
|
227
|
+
* gradient only backs the white glyph, so it goes too; an image that fails
|
|
228
|
+
* to load puts the glyph (and the gradient) back.
|
|
229
|
+
*/
|
|
230
|
+
private placeIcon;
|
|
212
231
|
/**
|
|
213
232
|
* Inserts the unticked waiver checkbox right before the first upgrade
|
|
214
233
|
* button and keeps every upgrade button disabled until it is ticked.
|