@delopay/sdk 0.232.0 → 0.234.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/{chunk-3I5BQEA4.js → chunk-3NOAX6WN.js} +144 -2
- package/dist/{chunk-3I5BQEA4.js.map → chunk-3NOAX6WN.js.map} +1 -1
- package/dist/index.cjs +149 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +13 -1
- package/dist/internal.cjs +149 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +13 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
|
@@ -8667,6 +8667,114 @@ var WHOP_GRAY_COLORS = [
|
|
|
8667
8667
|
"sand"
|
|
8668
8668
|
];
|
|
8669
8669
|
var WHOP_BILLING_DETAILS = ["minimal", "full"];
|
|
8670
|
+
var WHOP_RADII = ["checkout", "square", "small", "medium", "large"];
|
|
8671
|
+
var WHOP_SHADOWS = ["none", "soft"];
|
|
8672
|
+
var WHOP_SELECTIONS = ["radio_tint", "radio", "tint"];
|
|
8673
|
+
var WHOP_LOOKS = [
|
|
8674
|
+
"standard",
|
|
8675
|
+
"clean",
|
|
8676
|
+
"whop",
|
|
8677
|
+
"cards",
|
|
8678
|
+
"tiles",
|
|
8679
|
+
"soft",
|
|
8680
|
+
"minimal"
|
|
8681
|
+
];
|
|
8682
|
+
var WHOP_LOOK_SETTINGS = {
|
|
8683
|
+
// The fewest fields Whop takes a card with, laid out as Stripe's card
|
|
8684
|
+
// form: the email, the number above expiry and code, then one group of
|
|
8685
|
+
// name, country (preselected) and postal code. Whop refuses a card without
|
|
8686
|
+
// any of them. The wallets are the shop's own express buttons.
|
|
8687
|
+
standard: {
|
|
8688
|
+
whopCardPreset: "card_stacked",
|
|
8689
|
+
whopBillingDetails: "minimal",
|
|
8690
|
+
whopSeparated: false,
|
|
8691
|
+
whopFieldChrome: "outlined",
|
|
8692
|
+
whopEmailLabel: "above",
|
|
8693
|
+
whopRadius: "checkout",
|
|
8694
|
+
whopShadow: "soft",
|
|
8695
|
+
whopMethodIcons: true,
|
|
8696
|
+
whopSelection: "radio_tint"
|
|
8697
|
+
},
|
|
8698
|
+
// Flat fields like the checkout's own, the method list with the chosen
|
|
8699
|
+
// method tinted beside its radio.
|
|
8700
|
+
clean: {
|
|
8701
|
+
whopCardPreset: "accordion",
|
|
8702
|
+
whopBillingDetails: "minimal",
|
|
8703
|
+
whopSeparated: false,
|
|
8704
|
+
whopFieldChrome: "outlined",
|
|
8705
|
+
whopEmailLabel: "above",
|
|
8706
|
+
whopRadius: "checkout",
|
|
8707
|
+
whopShadow: "none",
|
|
8708
|
+
whopMethodIcons: true,
|
|
8709
|
+
whopSelection: "radio_tint"
|
|
8710
|
+
},
|
|
8711
|
+
// Whop's own form: its corners, its soft shadow, its radio dots.
|
|
8712
|
+
whop: {
|
|
8713
|
+
whopCardPreset: "accordion",
|
|
8714
|
+
whopBillingDetails: "minimal",
|
|
8715
|
+
whopSeparated: false,
|
|
8716
|
+
whopFieldChrome: "outlined",
|
|
8717
|
+
whopEmailLabel: "above",
|
|
8718
|
+
whopRadius: "small",
|
|
8719
|
+
whopShadow: "soft",
|
|
8720
|
+
whopMethodIcons: true,
|
|
8721
|
+
whopSelection: "radio"
|
|
8722
|
+
},
|
|
8723
|
+
// Each method its own raised card, the chosen one tinted, no dots.
|
|
8724
|
+
cards: {
|
|
8725
|
+
whopCardPreset: "accordion",
|
|
8726
|
+
whopBillingDetails: "minimal",
|
|
8727
|
+
whopSeparated: true,
|
|
8728
|
+
whopFieldChrome: "outlined",
|
|
8729
|
+
whopEmailLabel: "above",
|
|
8730
|
+
whopRadius: "medium",
|
|
8731
|
+
whopShadow: "soft",
|
|
8732
|
+
whopMethodIcons: true,
|
|
8733
|
+
whopSelection: "tint"
|
|
8734
|
+
},
|
|
8735
|
+
// The methods as tiles above the card's fields.
|
|
8736
|
+
tiles: {
|
|
8737
|
+
whopCardPreset: "tiles",
|
|
8738
|
+
whopBillingDetails: "minimal",
|
|
8739
|
+
whopSeparated: false,
|
|
8740
|
+
whopFieldChrome: "outlined",
|
|
8741
|
+
whopEmailLabel: "above",
|
|
8742
|
+
whopRadius: "checkout",
|
|
8743
|
+
whopShadow: "none",
|
|
8744
|
+
whopMethodIcons: true,
|
|
8745
|
+
whopSelection: "radio_tint"
|
|
8746
|
+
},
|
|
8747
|
+
// Filled fields with the captions inside, round corners.
|
|
8748
|
+
soft: {
|
|
8749
|
+
whopCardPreset: "accordion",
|
|
8750
|
+
whopBillingDetails: "minimal",
|
|
8751
|
+
whopSeparated: false,
|
|
8752
|
+
whopFieldChrome: "filled",
|
|
8753
|
+
whopEmailLabel: "floating",
|
|
8754
|
+
whopRadius: "large",
|
|
8755
|
+
whopShadow: "none",
|
|
8756
|
+
whopMethodIcons: false,
|
|
8757
|
+
whopSelection: "radio_tint"
|
|
8758
|
+
},
|
|
8759
|
+
// The card alone on one line, underlined, captions inside.
|
|
8760
|
+
minimal: {
|
|
8761
|
+
whopCardPreset: "card_compact",
|
|
8762
|
+
whopBillingDetails: "minimal",
|
|
8763
|
+
whopSeparated: false,
|
|
8764
|
+
whopFieldChrome: "underline",
|
|
8765
|
+
whopEmailLabel: "floating",
|
|
8766
|
+
whopRadius: "square",
|
|
8767
|
+
whopShadow: "none",
|
|
8768
|
+
whopMethodIcons: true,
|
|
8769
|
+
whopSelection: "radio_tint"
|
|
8770
|
+
}
|
|
8771
|
+
};
|
|
8772
|
+
function matchWhopLook(settings) {
|
|
8773
|
+
const keys = Object.keys(WHOP_LOOK_SETTINGS.clean);
|
|
8774
|
+
return WHOP_LOOKS.find(
|
|
8775
|
+
(look) => keys.every((key) => WHOP_LOOK_SETTINGS[look][key] === settings[key])
|
|
8776
|
+
) ?? null;
|
|
8777
|
+
}
|
|
8670
8778
|
|
|
8671
8779
|
// src/branding.ts
|
|
8672
8780
|
function surchargeShowsLabel(labelMode, style, position) {
|
|
@@ -9433,7 +9541,7 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
9433
9541
|
micropaymentFieldFontSize: "md",
|
|
9434
9542
|
micropaymentFieldWeight: "regular",
|
|
9435
9543
|
micropaymentFocusRing: "strong",
|
|
9436
|
-
whopCardPreset: "
|
|
9544
|
+
whopCardPreset: "card_stacked",
|
|
9437
9545
|
whopAccentColor: "auto",
|
|
9438
9546
|
whopGrayColor: "auto",
|
|
9439
9547
|
whopBillingDetails: "minimal",
|
|
@@ -9443,6 +9551,10 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
9443
9551
|
whopFieldFontSize: "md",
|
|
9444
9552
|
whopFieldWeight: "regular",
|
|
9445
9553
|
whopFocusRing: "strong",
|
|
9554
|
+
whopRadius: "checkout",
|
|
9555
|
+
whopShadow: "soft",
|
|
9556
|
+
whopMethodIcons: true,
|
|
9557
|
+
whopSelection: "radio_tint",
|
|
9446
9558
|
customCss: ""
|
|
9447
9559
|
};
|
|
9448
9560
|
var DEFAULT_BRANDING = {
|
|
@@ -10431,6 +10543,18 @@ function decodeBranding(source) {
|
|
|
10431
10543
|
CARD_FOCUS_RINGS,
|
|
10432
10544
|
DEFAULT_BRANDING.whopFocusRing
|
|
10433
10545
|
),
|
|
10546
|
+
whopRadius: pickEnum(extras["whopRadius"], WHOP_RADII, DEFAULT_BRANDING.whopRadius),
|
|
10547
|
+
whopShadow: pickEnum(
|
|
10548
|
+
extras["whopShadow"],
|
|
10549
|
+
WHOP_SHADOWS,
|
|
10550
|
+
DEFAULT_BRANDING.whopShadow
|
|
10551
|
+
),
|
|
10552
|
+
whopMethodIcons: parseBool(extras["whopMethodIcons"], DEFAULT_BRANDING.whopMethodIcons),
|
|
10553
|
+
whopSelection: pickEnum(
|
|
10554
|
+
extras["whopSelection"],
|
|
10555
|
+
WHOP_SELECTIONS,
|
|
10556
|
+
DEFAULT_BRANDING.whopSelection
|
|
10557
|
+
),
|
|
10434
10558
|
paypalValidTint: parseBool(extras["paypalValidTint"], DEFAULT_BRANDING.paypalValidTint),
|
|
10435
10559
|
nomupayFormStyle: pickEnum(
|
|
10436
10560
|
extras["nomupayFormStyle"],
|
|
@@ -10588,6 +10712,10 @@ function encodeBranding(branding, base) {
|
|
|
10588
10712
|
whopFieldFontSize: branding.whopFieldFontSize,
|
|
10589
10713
|
whopFieldWeight: branding.whopFieldWeight,
|
|
10590
10714
|
whopFocusRing: branding.whopFocusRing,
|
|
10715
|
+
whopRadius: branding.whopRadius,
|
|
10716
|
+
whopShadow: branding.whopShadow,
|
|
10717
|
+
whopMethodIcons: String(branding.whopMethodIcons),
|
|
10718
|
+
whopSelection: branding.whopSelection,
|
|
10591
10719
|
paypalValidTint: String(branding.paypalValidTint),
|
|
10592
10720
|
nomupayFormStyle: branding.nomupayFormStyle,
|
|
10593
10721
|
nomupayShowLabels: String(branding.nomupayShowLabels),
|
|
@@ -11041,6 +11169,14 @@ function parseImportedBranding(raw) {
|
|
|
11041
11169
|
CARD_FOCUS_RINGS,
|
|
11042
11170
|
dflt.whopFocusRing
|
|
11043
11171
|
),
|
|
11172
|
+
whopRadius: pickEnum(root["whopRadius"], WHOP_RADII, dflt.whopRadius),
|
|
11173
|
+
whopShadow: pickEnum(root["whopShadow"], WHOP_SHADOWS, dflt.whopShadow),
|
|
11174
|
+
whopMethodIcons: parseBool(root["whopMethodIcons"], dflt.whopMethodIcons),
|
|
11175
|
+
whopSelection: pickEnum(
|
|
11176
|
+
root["whopSelection"],
|
|
11177
|
+
WHOP_SELECTIONS,
|
|
11178
|
+
dflt.whopSelection
|
|
11179
|
+
),
|
|
11044
11180
|
paypalValidTint: parseBool(root["paypalValidTint"], dflt.paypalValidTint),
|
|
11045
11181
|
nomupayFormStyle: pickEnum(
|
|
11046
11182
|
root["nomupayFormStyle"],
|
|
@@ -12325,6 +12461,12 @@ export {
|
|
|
12325
12461
|
WHOP_EMAIL_LABELS,
|
|
12326
12462
|
WHOP_GRAY_COLORS,
|
|
12327
12463
|
WHOP_BILLING_DETAILS,
|
|
12464
|
+
WHOP_RADII,
|
|
12465
|
+
WHOP_SHADOWS,
|
|
12466
|
+
WHOP_SELECTIONS,
|
|
12467
|
+
WHOP_LOOKS,
|
|
12468
|
+
WHOP_LOOK_SETTINGS,
|
|
12469
|
+
matchWhopLook,
|
|
12328
12470
|
surchargeShowsLabel,
|
|
12329
12471
|
surchargeFigurePlan,
|
|
12330
12472
|
readableInkOn,
|
|
@@ -12469,4 +12611,4 @@ export {
|
|
|
12469
12611
|
decodeNativePanes,
|
|
12470
12612
|
encodeNativePanes
|
|
12471
12613
|
};
|
|
12472
|
-
//# sourceMappingURL=chunk-
|
|
12614
|
+
//# sourceMappingURL=chunk-3NOAX6WN.js.map
|