@pybara/pybara-js 0.6.0 → 0.7.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/checkout.schema.json +24 -0
- package/dist/buttons.d.ts +11 -0
- package/dist/buttons.d.ts.map +1 -0
- package/dist/checkout.d.ts +12 -1
- package/dist/checkout.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/pybara-js.iife.js +9 -9
- package/dist/pybara-js.js +123 -30
- package/dist/types.d.ts +33 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/pybara-js.js
CHANGED
|
@@ -52,9 +52,103 @@ var c = class extends Error {
|
|
|
52
52
|
constructor(e, t) {
|
|
53
53
|
super(t), this.name = "PybaraError", this.code = e;
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/buttons.ts
|
|
58
|
+
function l(e) {
|
|
59
|
+
let t = typeof e?.height == "number" && Number.isFinite(e.height) ? Math.round(e.height) : 45;
|
|
60
|
+
return Math.min(55, Math.max(25, t));
|
|
61
|
+
}
|
|
62
|
+
function u(e, t) {
|
|
63
|
+
return e?.shape === "sharp" ? "0" : e?.shape === "rect" ? "4px" : `${t / 2}px`;
|
|
64
|
+
}
|
|
65
|
+
function d(e) {
|
|
66
|
+
let t = typeof e == "string" ? document.querySelector(e) : e;
|
|
67
|
+
if (!t) throw new c("INVALID_CONFIG", `buttons().render(): no element matches ${JSON.stringify(e)}`);
|
|
68
|
+
return t;
|
|
69
|
+
}
|
|
70
|
+
function f(e, t) {
|
|
71
|
+
if (typeof t?.createPayment != "function") throw new c("INVALID_CONFIG", "buttons(): \"createPayment\" is required, a function returning the payment from the form, e.g. () => ({ amount: form.amount.value, currency: \"EUR\" })");
|
|
72
|
+
let n = new URL(e.walletUrl).origin, r = [], i = null;
|
|
73
|
+
async function a() {
|
|
74
|
+
try {
|
|
75
|
+
let n = await t.createPayment();
|
|
76
|
+
await e.open({
|
|
77
|
+
...n,
|
|
78
|
+
onSuccess: t.onSuccess,
|
|
79
|
+
onError: t.onError,
|
|
80
|
+
onClose: t.onClose
|
|
81
|
+
});
|
|
82
|
+
} catch (e) {
|
|
83
|
+
t.onError?.(e instanceof Error ? e : Error(String(e)));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function o(o) {
|
|
87
|
+
let s = d(o), c = l(t.style), f = document.createElement("div");
|
|
88
|
+
f.style.cssText = `position:relative;width:100%;height:${c}px;`;
|
|
89
|
+
let p = document.createElement("div");
|
|
90
|
+
p.setAttribute("aria-hidden", "true"), p.style.cssText = `position:absolute;inset:0;border-radius:${u(t.style, c)};background:rgba(128,128,128,0.16);`;
|
|
91
|
+
let m = document.createElement("iframe");
|
|
92
|
+
m.src = `${n}/button`, m.title = "Pybara", m.style.cssText = "position:absolute;inset:0;width:100%;height:100%;border:0;opacity:0;color-scheme:normal;background:transparent;", f.append(p, m), s.appendChild(f);
|
|
93
|
+
let h = !1, g = null, _ = {};
|
|
94
|
+
i ??= _;
|
|
95
|
+
let v = (e) => {
|
|
96
|
+
m.contentWindow?.postMessage(e, n);
|
|
97
|
+
}, y = (e) => {
|
|
98
|
+
g = e, h && v({
|
|
99
|
+
type: "pybara_button_availability",
|
|
100
|
+
v: 1,
|
|
101
|
+
status: e.status
|
|
102
|
+
}), i ??= _, i === _ && t.onStateChange?.(e);
|
|
103
|
+
};
|
|
104
|
+
m.addEventListener("load", () => {
|
|
105
|
+
v({
|
|
106
|
+
type: "pybara_button_init",
|
|
107
|
+
v: 1,
|
|
108
|
+
style: t.style ?? {},
|
|
109
|
+
hideWhenUnavailable: t.hideWhenUnavailable === !0
|
|
110
|
+
});
|
|
111
|
+
}, { once: !0 });
|
|
112
|
+
let b = (e) => {
|
|
113
|
+
if (e.origin !== n || e.source !== m.contentWindow) return;
|
|
114
|
+
let t = e.data;
|
|
115
|
+
t?.type === "pybara_button_ready" || t?.type === "pybara_button_resize" ? (typeof t.height == "number" && (f.style.height = `${t.height}px`), h || (h = !0, m.style.opacity = "1", p.remove(), g && v({
|
|
116
|
+
type: "pybara_button_availability",
|
|
117
|
+
v: 1,
|
|
118
|
+
status: g.status
|
|
119
|
+
}))) : t?.type === "pybara_button_click" && a();
|
|
120
|
+
};
|
|
121
|
+
window.addEventListener("message", b);
|
|
122
|
+
let x = e.subscribeAvailability(y);
|
|
123
|
+
r.push(() => {
|
|
124
|
+
window.removeEventListener("message", b), x(), i === _ && (i = null), f.remove();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
render: o,
|
|
129
|
+
destroy() {
|
|
130
|
+
for (let e of r.splice(0)) e();
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/checkout.ts
|
|
136
|
+
var p = /^(0|[1-9]\d*)(\.\d+)?$/, m = /^[a-z0-9-]{1,64}$/, h = class {
|
|
56
137
|
constructor(e) {
|
|
57
|
-
this.adminClient = null, this.modal = null, this.gateOutcome = null, this.isOpen = !1, this.completedPayment = !1, this.activePayment = null, this.lastPrecheck = {}, this.config =
|
|
138
|
+
this.adminClient = null, this.modal = null, this.gateOutcome = null, this.isOpen = !1, this.completedPayment = !1, this.activePayment = null, this.lastPrecheck = {}, this.availabilityListeners = /* @__PURE__ */ new Set(), this.latestAvailability = null, this.config = v(e), this.config.onAvailability && this.availabilityListeners.add(this.config.onAvailability), this.ready = this.init(), this.config.onAvailability && this.precheck();
|
|
139
|
+
}
|
|
140
|
+
buttons(e) {
|
|
141
|
+
return f({
|
|
142
|
+
walletUrl: t[this.config.staging ? "staging" : "prod"],
|
|
143
|
+
open: (e) => this.open(e),
|
|
144
|
+
subscribeAvailability: (e) => (this.availabilityListeners.add(e), this.latestAvailability ? e(this.latestAvailability) : !this.config.onAvailability && this.availabilityListeners.size === 1 && this.precheck(this.lastPrecheck), () => {
|
|
145
|
+
this.availabilityListeners.delete(e);
|
|
146
|
+
})
|
|
147
|
+
}, e);
|
|
148
|
+
}
|
|
149
|
+
emitAvailability(e) {
|
|
150
|
+
this.latestAvailability = e;
|
|
151
|
+
for (let t of this.availabilityListeners) t(e);
|
|
58
152
|
}
|
|
59
153
|
precheck(e = {}) {
|
|
60
154
|
let t = typeof e.amount == "number" && Number.isFinite(e.amount) ? String(e.amount) : e.amount;
|
|
@@ -64,25 +158,24 @@ var c = class extends Error {
|
|
|
64
158
|
}, this.sendPrecheck();
|
|
65
159
|
}
|
|
66
160
|
async sendPrecheck() {
|
|
67
|
-
|
|
68
|
-
if (!e) return;
|
|
161
|
+
if (this.availabilityListeners.size === 0) return;
|
|
69
162
|
await this.ready;
|
|
70
|
-
let
|
|
71
|
-
if (
|
|
72
|
-
let
|
|
163
|
+
let e = this.gateOutcome;
|
|
164
|
+
if (e && !e.show) {
|
|
165
|
+
let t = e.cause === "unreadable" ? {
|
|
73
166
|
status: "retry-later",
|
|
74
167
|
reason: "GATE_UNREADABLE",
|
|
75
|
-
detail: `Pybara: ${
|
|
76
|
-
} :
|
|
168
|
+
detail: `Pybara: ${e.reason}; the checkout tries again at the click.`
|
|
169
|
+
} : e.cause === "switched-off" ? {
|
|
77
170
|
status: "unavailable",
|
|
78
171
|
reason: "SWITCHED_OFF",
|
|
79
|
-
detail: `Pybara: ${
|
|
172
|
+
detail: `Pybara: ${e.reason}.`
|
|
80
173
|
} : {
|
|
81
174
|
status: "unavailable",
|
|
82
175
|
reason: "SITE_NOT_READY",
|
|
83
|
-
detail: `Pybara: ${
|
|
176
|
+
detail: `Pybara: ${e.reason}; the site owner does this, not the page. https://docs.pybara.com/pybara-js/setup/`
|
|
84
177
|
};
|
|
85
|
-
|
|
178
|
+
t.detail && console.warn(t.detail), this.emitAvailability(t);
|
|
86
179
|
} else this.modal?.precheck({
|
|
87
180
|
beneficiary: this.config.recipientPrincipal,
|
|
88
181
|
siteUrl: this.config.siteUrl,
|
|
@@ -94,7 +187,7 @@ var c = class extends Error {
|
|
|
94
187
|
}
|
|
95
188
|
async open(e) {
|
|
96
189
|
if (await this.ready, this.gateOutcome && !this.gateOutcome.show) throw new c("GATE_REFUSED", this.gateOutcome.reason ?? "This site cannot accept Pybara payments yet.");
|
|
97
|
-
let t =
|
|
190
|
+
let t = g(e.amount);
|
|
98
191
|
if (t === null) throw new c("INVALID_CONFIG", `open(): "amount" must be a decimal string in the currency's major units, e.g. "12.34", or a positive number — got ${JSON.stringify(e.amount)}`);
|
|
99
192
|
let n = e.currency ?? this.config.currency;
|
|
100
193
|
if (!n) throw new c("INVALID_CONFIG", "open(): \"currency\" is required — pass it to open(), or set it once in Pybara.checkout()");
|
|
@@ -123,14 +216,14 @@ var c = class extends Error {
|
|
|
123
216
|
a.show({
|
|
124
217
|
modalData: {
|
|
125
218
|
beneficiary: this.config.recipientPrincipal,
|
|
126
|
-
salt:
|
|
219
|
+
salt: y(),
|
|
127
220
|
reference: this.config.siteName
|
|
128
221
|
},
|
|
129
222
|
recurring: r,
|
|
130
223
|
checkout: this.checkoutFor(e, t, n)
|
|
131
224
|
});
|
|
132
225
|
} catch (e) {
|
|
133
|
-
throw this.isOpen = !1, this.activePayment = null,
|
|
226
|
+
throw this.isOpen = !1, this.activePayment = null, b(e);
|
|
134
227
|
}
|
|
135
228
|
}
|
|
136
229
|
}
|
|
@@ -165,7 +258,7 @@ var c = class extends Error {
|
|
|
165
258
|
context: "donation",
|
|
166
259
|
thankYouMessage: n.thankYouMessage,
|
|
167
260
|
locale: n.locale,
|
|
168
|
-
onAvailability:
|
|
261
|
+
onAvailability: (e) => i.emitAvailability(e),
|
|
169
262
|
onSuccess: (e) => {
|
|
170
263
|
i.completedPayment = !0;
|
|
171
264
|
let t = i.activePayment, r = t?.frequency != null, a = {
|
|
@@ -184,14 +277,14 @@ var c = class extends Error {
|
|
|
184
277
|
onError: (e) => {
|
|
185
278
|
i.isOpen = !1;
|
|
186
279
|
let t = i.activePayment;
|
|
187
|
-
i.activePayment = null, t?.onError?.(
|
|
280
|
+
i.activePayment = null, t?.onError?.(b(e)), i.modal = null, i.initCheckoutModal();
|
|
188
281
|
},
|
|
189
282
|
onClose: () => {
|
|
190
283
|
i.isOpen = !1;
|
|
191
284
|
let e = i.activePayment;
|
|
192
285
|
i.activePayment = null, e?.onClose?.(), i.completedPayment && n.thankYouRedirectUrl ? window.location.href = n.thankYouRedirectUrl : (i.completedPayment = !1, i.modal = null, i.initCheckoutModal());
|
|
193
286
|
}
|
|
194
|
-
}),
|
|
287
|
+
}), this.availabilityListeners.size > 0 && this.modal && Object.keys(this.lastPrecheck).length > 0 && this.sendPrecheck();
|
|
195
288
|
}
|
|
196
289
|
checkoutFor(e, t, n) {
|
|
197
290
|
let r = this.config;
|
|
@@ -245,11 +338,11 @@ var c = class extends Error {
|
|
|
245
338
|
n.rel = "preconnect", n.href = new URL(t[e]).origin, n.crossOrigin = "anonymous", document.head.appendChild(n);
|
|
246
339
|
}
|
|
247
340
|
};
|
|
248
|
-
function
|
|
341
|
+
function g(e) {
|
|
249
342
|
let t = typeof e == "number" && Number.isFinite(e) ? String(e) : e;
|
|
250
|
-
return typeof t != "string" || !
|
|
343
|
+
return typeof t != "string" || !p.test(t) || !/[1-9]/.test(t) ? null : t;
|
|
251
344
|
}
|
|
252
|
-
function
|
|
345
|
+
function _(e) {
|
|
253
346
|
let t = e.trim();
|
|
254
347
|
if (!t) return null;
|
|
255
348
|
let n;
|
|
@@ -260,14 +353,14 @@ function p(e) {
|
|
|
260
353
|
}
|
|
261
354
|
return n.protocol !== "https:" && n.protocol !== "http:" ? null : n.origin + n.pathname.replace(/\/+$/, "");
|
|
262
355
|
}
|
|
263
|
-
function
|
|
356
|
+
function v(e) {
|
|
264
357
|
if (!e.recipientPrincipal) throw new c("INVALID_CONFIG", "Pybara.checkout: \"recipientPrincipal\" is required");
|
|
265
358
|
if (!e.siteUrl) throw new c("INVALID_CONFIG", "Pybara.checkout: \"siteUrl\" is required");
|
|
266
|
-
let t =
|
|
359
|
+
let t = _(e.siteUrl);
|
|
267
360
|
if (!t) throw new c("INVALID_CONFIG", `Pybara.checkout: "siteUrl" is not a valid http(s) URL: ${e.siteUrl}`);
|
|
268
361
|
if (!e.siteName) throw new c("INVALID_CONFIG", "Pybara.checkout: \"siteName\" is required");
|
|
269
362
|
if (e.currency != null && !/^[A-Z]{3}$/.test(e.currency)) throw new c("INVALID_CONFIG", `Pybara.checkout: "currency" must be an uppercase ISO 4217 code, e.g. "EUR" — got ${JSON.stringify(e.currency)}`);
|
|
270
|
-
if (e.platform != null && !
|
|
363
|
+
if (e.platform != null && !m.test(e.platform)) throw new c("INVALID_CONFIG", "Pybara.checkout: \"platform\" must be a lowercase slug (a-z, 0-9, -), at most 64 characters");
|
|
271
364
|
return {
|
|
272
365
|
...e,
|
|
273
366
|
siteUrl: t,
|
|
@@ -275,18 +368,18 @@ function m(e) {
|
|
|
275
368
|
debug: e.debug ?? !1
|
|
276
369
|
};
|
|
277
370
|
}
|
|
278
|
-
function
|
|
371
|
+
function y() {
|
|
279
372
|
let e = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
280
373
|
return btoa(String.fromCharCode(...e));
|
|
281
374
|
}
|
|
282
|
-
function
|
|
375
|
+
function b(e) {
|
|
283
376
|
return e instanceof Error ? e : Error(String(e));
|
|
284
377
|
}
|
|
285
378
|
//#endregion
|
|
286
379
|
//#region src/index.ts
|
|
287
|
-
function
|
|
288
|
-
return new
|
|
380
|
+
function x(e) {
|
|
381
|
+
return new h(e);
|
|
289
382
|
}
|
|
290
|
-
var
|
|
383
|
+
var S = { checkout: x };
|
|
291
384
|
//#endregion
|
|
292
|
-
export {
|
|
385
|
+
export { S as Pybara, h as PybaraCheckout, c as PybaraError, x as checkout };
|
package/dist/types.d.ts
CHANGED
|
@@ -86,6 +86,39 @@ export interface PaymentParams {
|
|
|
86
86
|
/** Called when the payer closes the modal — after success or on manual close. */
|
|
87
87
|
onClose?: () => void;
|
|
88
88
|
}
|
|
89
|
+
/** The payment a button's createPayment() returns: open()'s params, without the callbacks, which buttons() takes itself. */
|
|
90
|
+
export type ButtonPayment = Omit<PaymentParams, 'onSuccess' | 'onError' | 'onClose'>;
|
|
91
|
+
/** Options for checkout.buttons(): a "Pybara" button, served by Pybara, that opens this checkout on click. */
|
|
92
|
+
export interface ButtonsOptions {
|
|
93
|
+
/**
|
|
94
|
+
* Passed to the button as given, and read by it: `color` 'brand' | 'black' | 'white' (PayPal's names; its 'gold', 'blue' and 'silver' read as 'brand'), `shape` 'pill' | 'rect' | 'sharp', `height` 25–55 px (PayPal's range, default 45).
|
|
95
|
+
* Copy a PayPal button's style and the two match. A value the button doesn't know falls back to its default.
|
|
96
|
+
*/
|
|
97
|
+
style?: {
|
|
98
|
+
color?: string;
|
|
99
|
+
shape?: string;
|
|
100
|
+
height?: number;
|
|
101
|
+
};
|
|
102
|
+
/** Collapse the button to no height when Pybara is unavailable on this page; by default its slot stays, empty, so the layout never moves. */
|
|
103
|
+
hideWhenUnavailable?: boolean;
|
|
104
|
+
/** Called on the payer's click: the payment from the form's current values, as open() takes it (amount, currency, frequency, donor fields). */
|
|
105
|
+
createPayment: () => ButtonPayment | Promise<ButtonPayment>;
|
|
106
|
+
/** The button's availability, the checkout's answer as onAvailability gives it: update the page around the button with it, e.g. show `message` below the minimum. */
|
|
107
|
+
onStateChange?: (availability: Availability) => void;
|
|
108
|
+
/** Called once the payment is confirmed on-chain. */
|
|
109
|
+
onSuccess?: (result: CheckoutResult) => void;
|
|
110
|
+
/** A refusal, from createPayment(), open() or the checkout. */
|
|
111
|
+
onError?: (error: Error) => void;
|
|
112
|
+
/** The payer closed the checkout. */
|
|
113
|
+
onClose?: () => void;
|
|
114
|
+
}
|
|
115
|
+
/** What checkout.buttons() returns. */
|
|
116
|
+
export interface PybaraButtons {
|
|
117
|
+
/** Draw a button in the element (or the first element matching the selector), at the style's height and the element's full width. Call it again to draw another button with the same options. */
|
|
118
|
+
render(container: string | HTMLElement): void;
|
|
119
|
+
/** Remove every button these options drew, and stop listening for them. */
|
|
120
|
+
destroy(): void;
|
|
121
|
+
}
|
|
89
122
|
/** Result passed to the onSuccess callback once the payment is confirmed. */
|
|
90
123
|
export interface CheckoutResult {
|
|
91
124
|
/** Ledger block index of the confirmed transaction, as the frame reports it. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,8IAA8I;AAC9I,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEtE,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,uKAAuK;IACvK,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gIAAgI;IAChI,OAAO,EAAE,MAAM,CAAC;IAChB,iHAAiH;IACjH,QAAQ,EAAE,MAAM,CAAC;IACjB,uLAAuL;IACvL,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yJAAyJ;IACzJ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2PAA2P;IAC3P,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6KAA6K;IAC7K,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mHAAmH;IACnH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wFAAwF;IACxF,sBAAsB,CAAC,EAAE,MAAM,CAAC;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