@stripe/connect-js 3.1.0-beta.1 → 3.2.0-beta.1

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 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
@@ -146,7 +146,7 @@ const createWrapper = stripeConnect => {
146
146
  sdk: true,
147
147
  sdkOptions: {
148
148
  // This will be replaced by the npm package version when bundling
149
- sdkVersion: "3.1.0-beta.1"
149
+ sdkVersion: "3.2.0-beta.1"
150
150
  }
151
151
  })
152
152
  }));
package/dist/connect.js CHANGED
@@ -150,7 +150,7 @@ const createWrapper = stripeConnect => {
150
150
  sdk: true,
151
151
  sdkOptions: {
152
152
  // This will be replaced by the npm package version when bundling
153
- sdkVersion: "3.1.0-beta.1"
153
+ sdkVersion: "3.2.0-beta.1"
154
154
  }
155
155
  })
156
156
  }));
package/dist/pure.esm.js CHANGED
@@ -146,7 +146,7 @@ const createWrapper = stripeConnect => {
146
146
  sdk: true,
147
147
  sdkOptions: {
148
148
  // This will be replaced by the npm package version when bundling
149
- sdkVersion: "3.1.0-beta.1"
149
+ sdkVersion: "3.2.0-beta.1"
150
150
  }
151
151
  })
152
152
  }));
package/dist/pure.js CHANGED
@@ -150,7 +150,7 @@ const createWrapper = stripeConnect => {
150
150
  sdk: true,
151
151
  sdkOptions: {
152
152
  // This will be replaced by the npm package version when bundling
153
- sdkVersion: "3.1.0-beta.1"
153
+ sdkVersion: "3.2.0-beta.1"
154
154
  }
155
155
  })
156
156
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "3.1.0-beta.1",
3
+ "version": "3.2.0-beta.1",
4
4
  "description": "Connect.js loading utility package",
5
5
  "main": "dist/connect.js",
6
6
  "module": "dist/connect.esm.js",
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
  */
@@ -374,6 +424,11 @@ export interface IStripeConnectInitParams {
374
424
  * The locale to use for the Connect instance.
375
425
  */
376
426
  locale?: string;
427
+
428
+ /**
429
+ * An array of custom fonts, which embedded components created from a ConnectInstance can use.
430
+ */
431
+ fonts?: Array<CssFontSource | CustomFontSource>;
377
432
  }
378
433
 
379
434
  type ConnectElementCustomMethods = typeof ConnectElementCustomMethodConfig;
File without changes