@moonpay/platform-sdk-core 1.31.0 → 1.32.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.cjs.map +1 -1
- package/dist/index.d.cts +20 -8
- package/dist/index.d.ts +20 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -175,11 +175,21 @@ declare function buildFrameUrl(path: string, query?: Record<string, unknown>, op
|
|
|
175
175
|
/** A 6-digit hex color, with or without the leading `#` (e.g. `'FF6B00'`). */
|
|
176
176
|
type HexColor = string;
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
179
|
-
* field is optional; omitted fields
|
|
180
|
-
* the whole object if it is invalid
|
|
178
|
+
* Brand style, border radius, color scheme and palette overrides, sent
|
|
179
|
+
* as the `customTheme` query param. Every field is optional; omitted fields
|
|
180
|
+
* keep the frame's default. The frame drops the whole object if it is invalid
|
|
181
|
+
* or over 4 KB once serialized.
|
|
181
182
|
*/
|
|
182
183
|
interface CustomTheme {
|
|
184
|
+
/**
|
|
185
|
+
* How strongly the brand color shows on primary buttons. Frame default:
|
|
186
|
+
* `'minimal'` (neutral black or white primary buttons). `'branded'` fills
|
|
187
|
+
* primary buttons with `brandColor`, or MoonPay's accent color when
|
|
188
|
+
* `brandColor` isn't set.
|
|
189
|
+
*
|
|
190
|
+
* Light or dark mode is `ThemeOptions.appearance`, not this field.
|
|
191
|
+
*/
|
|
192
|
+
brandStyle?: 'minimal' | 'branded';
|
|
183
193
|
/** Named radius scale applied across the frame. Frame default: `'m'`. */
|
|
184
194
|
borderRadius?: 'none' | 's' | 'm' | 'l' | 'full';
|
|
185
195
|
/**
|
|
@@ -202,10 +212,9 @@ interface CustomTheme {
|
|
|
202
212
|
/**
|
|
203
213
|
* Theming options for visible MoonPay frames.
|
|
204
214
|
*
|
|
205
|
-
* `appearance` is honoured by every visible frame
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* the connect, add card, challenge and reset frames ignore them for now.
|
|
215
|
+
* `appearance` is honoured by every visible frame except the widget, which
|
|
216
|
+
* embeds the buy page without it. `brandColor` and `customTheme` are only
|
|
217
|
+
* shown by the auth frame for now; other frames receive them and ignore them.
|
|
209
218
|
*/
|
|
210
219
|
interface ThemeOptions {
|
|
211
220
|
/**
|
|
@@ -221,7 +230,10 @@ interface ThemeOptions {
|
|
|
221
230
|
* Values the frame can't parse are ignored and the default MoonPay theme applies.
|
|
222
231
|
*/
|
|
223
232
|
brandColor?: string;
|
|
224
|
-
/**
|
|
233
|
+
/**
|
|
234
|
+
* Brand style, border radius, color scheme and palette overrides.
|
|
235
|
+
* Applies alongside `brandColor`.
|
|
236
|
+
*/
|
|
225
237
|
customTheme?: CustomTheme;
|
|
226
238
|
}
|
|
227
239
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -175,11 +175,21 @@ declare function buildFrameUrl(path: string, query?: Record<string, unknown>, op
|
|
|
175
175
|
/** A 6-digit hex color, with or without the leading `#` (e.g. `'FF6B00'`). */
|
|
176
176
|
type HexColor = string;
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
179
|
-
* field is optional; omitted fields
|
|
180
|
-
* the whole object if it is invalid
|
|
178
|
+
* Brand style, border radius, color scheme and palette overrides, sent
|
|
179
|
+
* as the `customTheme` query param. Every field is optional; omitted fields
|
|
180
|
+
* keep the frame's default. The frame drops the whole object if it is invalid
|
|
181
|
+
* or over 4 KB once serialized.
|
|
181
182
|
*/
|
|
182
183
|
interface CustomTheme {
|
|
184
|
+
/**
|
|
185
|
+
* How strongly the brand color shows on primary buttons. Frame default:
|
|
186
|
+
* `'minimal'` (neutral black or white primary buttons). `'branded'` fills
|
|
187
|
+
* primary buttons with `brandColor`, or MoonPay's accent color when
|
|
188
|
+
* `brandColor` isn't set.
|
|
189
|
+
*
|
|
190
|
+
* Light or dark mode is `ThemeOptions.appearance`, not this field.
|
|
191
|
+
*/
|
|
192
|
+
brandStyle?: 'minimal' | 'branded';
|
|
183
193
|
/** Named radius scale applied across the frame. Frame default: `'m'`. */
|
|
184
194
|
borderRadius?: 'none' | 's' | 'm' | 'l' | 'full';
|
|
185
195
|
/**
|
|
@@ -202,10 +212,9 @@ interface CustomTheme {
|
|
|
202
212
|
/**
|
|
203
213
|
* Theming options for visible MoonPay frames.
|
|
204
214
|
*
|
|
205
|
-
* `appearance` is honoured by every visible frame
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* the connect, add card, challenge and reset frames ignore them for now.
|
|
215
|
+
* `appearance` is honoured by every visible frame except the widget, which
|
|
216
|
+
* embeds the buy page without it. `brandColor` and `customTheme` are only
|
|
217
|
+
* shown by the auth frame for now; other frames receive them and ignore them.
|
|
209
218
|
*/
|
|
210
219
|
interface ThemeOptions {
|
|
211
220
|
/**
|
|
@@ -221,7 +230,10 @@ interface ThemeOptions {
|
|
|
221
230
|
* Values the frame can't parse are ignored and the default MoonPay theme applies.
|
|
222
231
|
*/
|
|
223
232
|
brandColor?: string;
|
|
224
|
-
/**
|
|
233
|
+
/**
|
|
234
|
+
* Brand style, border radius, color scheme and palette overrides.
|
|
235
|
+
* Applies alongside `brandColor`.
|
|
236
|
+
*/
|
|
225
237
|
customTheme?: CustomTheme;
|
|
226
238
|
}
|
|
227
239
|
/**
|