@flopay/js 1.20.11 → 1.20.12

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.
@@ -0,0 +1,23 @@
1
+ import type { CheckoutRuntime, CheckoutRuntimeConfig } from './contract.js';
2
+ /** The global the runtime script registers itself under (see checkout-runtime-loader.ts). */
3
+ export declare const RUNTIME_REGISTRY_KEY = "FloPayCheckoutRuntime";
4
+ /**
5
+ * The runtime's own configuration, from the URL its script was served from: the stage origin
6
+ * calls the stage API, every other origin the production API. The checkout frame page is the
7
+ * `frame.html` of the same version folder.
8
+ */
9
+ export declare function hostedRuntimeConfig(scriptUrl: string): CheckoutRuntimeConfig;
10
+ /** The URL of the classic script being evaluated, when there is a document to ask. */
11
+ export declare function currentScriptUrl(): string | undefined;
12
+ /**
13
+ * The entry point's stand-in runtime. `load` is called once, on the first mount, and answers the
14
+ * real runtime; a failed load is tried again on the next mount.
15
+ */
16
+ export declare function deferredRuntime(load: () => Promise<CheckoutRuntime>): CheckoutRuntime;
17
+ /**
18
+ * Loads a runtime script into the page and answers what it registers. The stand-in itself is
19
+ * registered under the same name, so only a different object counts as the loaded runtime. A
20
+ * script that neither loads nor fails within `timeoutMs` is removed and rejected, and a load or
21
+ * error that comes after the answer is ignored.
22
+ */
23
+ export declare function loadRuntimeScript(src: string, standIn: CheckoutRuntime, timeoutMs?: number): Promise<CheckoutRuntime>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flopay/js",
3
- "version": "1.20.11",
3
+ "version": "1.20.12",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "publishConfig": {
@@ -31,11 +31,11 @@
31
31
  "dist"
32
32
  ],
33
33
  "dependencies": {
34
- "@flopay/shared": "1.20.11",
34
+ "@flopay/shared": "1.20.12",
35
35
  "@stripe/stripe-js": "^10.3.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@flopay/ui": "1.20.11",
38
+ "@flopay/ui": "1.20.12",
39
39
  "jsdom": "^29.1.1",
40
40
  "tsup": "^9.0.0",
41
41
  "typescript": "^7.0.2",