@stripe/connect-js 3.0.1 → 3.1.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 +0 -11
- package/dist/connect.esm.js +1 -1
- package/dist/connect.js +1 -1
- package/dist/pure.esm.js +1 -1
- package/dist/pure.js +1 -1
- package/package.json +1 -1
- package/types/shared.d.ts +55 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -60,17 +60,6 @@ script tag is inserted immediately upon page load.
|
|
|
60
60
|
import "@stripe/connect-js";
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
### Manually include the script tag
|
|
64
|
-
|
|
65
|
-
Manually add the Connect.js script tag to the `<head>` of each page on your site.
|
|
66
|
-
If an existing script tag is already present, this module will not insert a new
|
|
67
|
-
one. When you call `loadConnectAndInitialize`, it will use the existing script tag.
|
|
68
|
-
|
|
69
|
-
```html
|
|
70
|
-
<!-- Somewhere in your site's <head> -->
|
|
71
|
-
<script src="https://connect-js.stripe.com/v0.1/connect.js" async></script>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
63
|
### Importing `loadConnectAndInitialize` without side effects
|
|
75
64
|
|
|
76
65
|
If you would like to use `loadConnectAndInitialize` in your application, but defer loading the
|
package/dist/connect.esm.js
CHANGED
package/dist/connect.js
CHANGED
package/dist/pure.esm.js
CHANGED
package/dist/pure.js
CHANGED
package/package.json
CHANGED
package/types/shared.d.ts
CHANGED
|
@@ -6,6 +6,56 @@ export declare type LoadConnectAndInitialize = (
|
|
|
6
6
|
|
|
7
7
|
export declare type OverlayOption = "dialog" | "drawer";
|
|
8
8
|
|
|
9
|
+
/*
|
|
10
|
+
* Use a `CssFontSource` to pass custom fonts via a stylesheet URL when initializing a Connect instance.
|
|
11
|
+
*/
|
|
12
|
+
export declare type CssFontSource = {
|
|
13
|
+
/**
|
|
14
|
+
* A relative or absolute URL pointing to a CSS file with [@font-face](https://developer.mozilla.org/en/docs/Web/CSS/@font-face) definitions, for example:
|
|
15
|
+
*
|
|
16
|
+
* https://fonts.googleapis.com/css?family=Open+Sans
|
|
17
|
+
*
|
|
18
|
+
* Note that if you are using a [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) (CSP), [additional directives](https://stripe.com/docs/security#content-security-policy) may be necessary.
|
|
19
|
+
*/
|
|
20
|
+
cssSrc: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* Use a `CustomFontSource` to pass custom fonts when initializing a Connect instance.
|
|
25
|
+
*/
|
|
26
|
+
export declare type CustomFontSource = {
|
|
27
|
+
/**
|
|
28
|
+
* The name to give the font
|
|
29
|
+
*/
|
|
30
|
+
family: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A valid [src](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src) value pointing to your custom font file.
|
|
34
|
+
* This is usually (though not always) a link to a file with a `.woff` , `.otf`, or `.svg` suffix.
|
|
35
|
+
*/
|
|
36
|
+
src: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A valid [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) value.
|
|
40
|
+
*/
|
|
41
|
+
display?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Defaults to `normal`.
|
|
45
|
+
*/
|
|
46
|
+
style?: "normal" | "italic" | "oblique";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A valid [unicode-range](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) value.
|
|
50
|
+
*/
|
|
51
|
+
unicodeRange?: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A valid [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight), as a string.
|
|
55
|
+
*/
|
|
56
|
+
weight?: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
9
59
|
/**
|
|
10
60
|
* Appearance options for the Connect instance.
|
|
11
61
|
*/
|
|
@@ -354,6 +404,11 @@ export interface IStripeConnectInitParams {
|
|
|
354
404
|
* The locale to use for the Connect instance.
|
|
355
405
|
*/
|
|
356
406
|
locale?: string;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* An array of custom fonts, which embedded components created from a ConnectInstance can use.
|
|
410
|
+
*/
|
|
411
|
+
fonts?: Array<CssFontSource | CustomFontSource>;
|
|
357
412
|
}
|
|
358
413
|
|
|
359
414
|
type ConnectElementCustomMethods = typeof ConnectElementCustomMethodConfig;
|
|
File without changes
|