@stripe/stripe-js 8.8.0 → 8.9.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/dist/index.js CHANGED
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
71
71
 
72
72
  stripe._registerWrapper({
73
73
  name: 'stripe-js',
74
- version: "8.8.0",
74
+ version: "8.9.0",
75
75
  startTime: startTime
76
76
  });
77
77
  };
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
172
172
  var expectedVersion = RELEASE_TRAIN;
173
173
 
174
174
  if (isTestKey && version !== expectedVersion) {
175
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
175
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.9.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
176
176
  }
177
177
 
178
178
  var stripe = maybeStripe.apply(undefined, args);
package/dist/index.mjs CHANGED
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
67
67
 
68
68
  stripe._registerWrapper({
69
69
  name: 'stripe-js',
70
- version: "8.8.0",
70
+ version: "8.9.0",
71
71
  startTime: startTime
72
72
  });
73
73
  };
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
168
168
  var expectedVersion = RELEASE_TRAIN;
169
169
 
170
170
  if (isTestKey && version !== expectedVersion) {
171
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
171
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.9.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
172
172
  }
173
173
 
174
174
  var stripe = maybeStripe.apply(undefined, args);
package/dist/pure.js CHANGED
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
71
71
 
72
72
  stripe._registerWrapper({
73
73
  name: 'stripe-js',
74
- version: "8.8.0",
74
+ version: "8.9.0",
75
75
  startTime: startTime
76
76
  });
77
77
  };
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
172
172
  var expectedVersion = RELEASE_TRAIN;
173
173
 
174
174
  if (isTestKey && version !== expectedVersion) {
175
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
175
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.9.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
176
176
  }
177
177
 
178
178
  var stripe = maybeStripe.apply(undefined, args);
package/dist/pure.mjs CHANGED
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
67
67
 
68
68
  stripe._registerWrapper({
69
69
  name: 'stripe-js',
70
- version: "8.8.0",
70
+ version: "8.9.0",
71
71
  startTime: startTime
72
72
  });
73
73
  };
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
168
168
  var expectedVersion = RELEASE_TRAIN;
169
169
 
170
170
  if (isTestKey && version !== expectedVersion) {
171
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
171
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.9.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
172
172
  }
173
173
 
174
174
  var stripe = maybeStripe.apply(undefined, args);
@@ -86,6 +86,26 @@ export interface StripePaymentFormElementChangeEvent {
86
86
  savePaymentMethod?: boolean;
87
87
  };
88
88
  };
89
+
90
+ /**
91
+ * Array of views in compact layout. Only defined for compact layout.
92
+ */
93
+ views?: {
94
+ /**
95
+ * Localized view name: "Express" | "Payment" | etc
96
+ * */
97
+ label: string;
98
+
99
+ /**
100
+ * Whether the user can currently navigate to this view
101
+ * */
102
+ canNavigate: boolean;
103
+
104
+ /**
105
+ * Whether this is the current view
106
+ * */
107
+ active: boolean;
108
+ }[];
89
109
  }
90
110
 
91
111
  /**
@@ -262,4 +282,9 @@ export type StripePaymentFormElement = StripeElementBase & {
262
282
  * Retrieves the current form values from the PaymentFormElement.
263
283
  */
264
284
  getValue(): Promise<StripePaymentFormElementChangeEvent>;
285
+
286
+ /**
287
+ * Navigates to the view at the given index (from the change event's views array).
288
+ */
289
+ setView(viewIndex: number): Promise<void>;
265
290
  };
@@ -86,6 +86,26 @@ export interface StripePaymentFormElementChangeEvent {
86
86
  savePaymentMethod?: boolean;
87
87
  };
88
88
  };
89
+
90
+ /**
91
+ * Array of views in compact layout. Only defined for compact layout.
92
+ */
93
+ views?: {
94
+ /**
95
+ * Localized view name: "Express" | "Payment" | etc
96
+ * */
97
+ label: string;
98
+
99
+ /**
100
+ * Whether the user can currently navigate to this view
101
+ * */
102
+ canNavigate: boolean;
103
+
104
+ /**
105
+ * Whether this is the current view
106
+ * */
107
+ active: boolean;
108
+ }[];
89
109
  }
90
110
 
91
111
  /**
@@ -262,4 +282,9 @@ export type StripePaymentFormElement = StripeElementBase & {
262
282
  * Retrieves the current form values from the PaymentFormElement.
263
283
  */
264
284
  getValue(): Promise<StripePaymentFormElementChangeEvent>;
285
+
286
+ /**
287
+ * Navigates to the view at the given index (from the change event's views array).
288
+ */
289
+ setView(viewIndex: number): Promise<void>;
265
290
  };
@@ -1139,6 +1139,10 @@ export interface Appearance {
1139
1139
  colorDanger?: string;
1140
1140
  colorWarning?: string;
1141
1141
 
1142
+ // Button Colors
1143
+ buttonColorBackground?: string;
1144
+ buttonColorText?: string;
1145
+
1142
1146
  // Text variations
1143
1147
  colorTextSecondary?: string;
1144
1148
  colorTextPlaceholder?: string;
@@ -1139,6 +1139,10 @@ export interface Appearance {
1139
1139
  colorDanger?: string;
1140
1140
  colorWarning?: string;
1141
1141
 
1142
+ // Button Colors
1143
+ buttonColorBackground?: string;
1144
+ buttonColorText?: string;
1145
+
1142
1146
  // Text variations
1143
1147
  colorTextSecondary?: string;
1144
1148
  colorTextPlaceholder?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "8.8.0",
3
+ "version": "8.9.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "repository": "github:stripe/stripe-js",
6
6
  "main": "lib/index.js",