@flopay/js 2.0.3 → 2.0.5
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.
|
@@ -3,6 +3,8 @@ export declare function isRecord(value: unknown): value is JsonRecord;
|
|
|
3
3
|
export declare function text(...values: unknown[]): string | undefined;
|
|
4
4
|
/** The record inside the API's `data` wrapper, or the body itself when it has none. */
|
|
5
5
|
export declare function dataOf(body: unknown): JsonRecord;
|
|
6
|
+
/** Sets inline styles: the runtime ships no stylesheet to the merchant page. */
|
|
7
|
+
export declare function applyStyles(element: HTMLElement, styles: Record<string, string>): void;
|
|
6
8
|
export declare function delay(ms: number): Promise<void>;
|
|
7
9
|
export declare function providerMessage(error: unknown, fallback: string): string;
|
|
8
10
|
export declare function pageGlobal(name: string): unknown;
|
|
@@ -132,6 +132,8 @@ export interface PaymentMethodsContext {
|
|
|
132
132
|
}
|
|
133
133
|
export interface PaymentMethodsSurface {
|
|
134
134
|
setLayout(layout: PaymentMethodGroupLayout): void;
|
|
135
|
+
/** Hides every method but the card while the buttons layout shows its card form. */
|
|
136
|
+
setCardOpen(open: boolean): void;
|
|
135
137
|
destroy(): void;
|
|
136
138
|
}
|
|
137
139
|
/**
|
|
@@ -4,3 +4,17 @@
|
|
|
4
4
|
* a brand-new APM still produces a legible label until the matrix catches up.
|
|
5
5
|
*/
|
|
6
6
|
export declare function getStripeMethodDisplayName(type: string | null | undefined): string;
|
|
7
|
+
/**
|
|
8
|
+
* How a method's tile is drawn on the merchant page: its buyer-facing name and, when the method
|
|
9
|
+
* has a brand entry, its colours and mark (the light variant, which carries its own background).
|
|
10
|
+
*/
|
|
11
|
+
export interface StripeMethodTile {
|
|
12
|
+
label: string;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
textColor?: string;
|
|
16
|
+
/** Inline SVG from this module's own table: never text from the API or the merchant. */
|
|
17
|
+
logoSvg?: string;
|
|
18
|
+
}
|
|
19
|
+
/** The tile for a method type. A type the matrix does not know gets its title-cased name only. */
|
|
20
|
+
export declare function getStripeMethodTile(type: string): StripeMethodTile;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flopay/js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@flopay/shared": "2.0.
|
|
34
|
+
"@flopay/shared": "2.0.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@flopay/ui": "2.0.
|
|
37
|
+
"@flopay/ui": "2.0.5",
|
|
38
38
|
"jsdom": "^29.1.1",
|
|
39
39
|
"tsup": "^9.0.0",
|
|
40
40
|
"typescript": "^7.0.2",
|