@whop/embedded-components-vanilla-js 0.0.4-beta.1 → 0.0.5-beta.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/lib/index.d.ts +13 -1
- package/dist/url.js +1 -1
- package/dist/url.mjs +1 -1
- package/package.json +1 -1
package/dist/lib/index.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ type CSSValue = string;
|
|
|
5
5
|
type CSSProps = Record<string, CSSValue>;
|
|
6
6
|
type Classes = Record<string, CSSProps>;
|
|
7
7
|
type Variables = Record<`--${string}`, string>;
|
|
8
|
+
type AccentColor = "ruby" | "blue" | "red" | "yellow" | "green" | "gray" | "tomato" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "cyan" | "teal" | "jade" | "grass" | "brown" | "orange" | "indigo" | "sky" | "mint" | "amber" | "lime" | "lemon" | "magenta" | "gold" | "bronze";
|
|
8
9
|
type Theme = {
|
|
9
10
|
appearance?: "light" | "dark";
|
|
10
|
-
accentColor?:
|
|
11
|
+
accentColor?: AccentColor;
|
|
11
12
|
grayColor?: "gray" | "mauve" | "slate" | "sage" | "olive" | "sand" | "auto";
|
|
12
13
|
dangerColor?: "ruby" | "red" | "tomato";
|
|
13
14
|
warningColor?: "yellow" | "amber";
|
|
@@ -220,6 +221,10 @@ interface WithdrawButtonElementOptions {
|
|
|
220
221
|
onReady?: (element: WithdrawButtonElement) => void;
|
|
221
222
|
onVerificationSubmitted?: (ev: CustomEvent<WithdrawButtonElement>) => void;
|
|
222
223
|
onWithdrawalRequested?: (ev: CustomEvent<WithdrawButtonElement>) => void;
|
|
224
|
+
size?: "1" | "2" | "3" | "4";
|
|
225
|
+
variant?: "solid" | "soft" | "surface" | "ghost" | "classic";
|
|
226
|
+
color?: AccentColor;
|
|
227
|
+
highContrast?: boolean;
|
|
223
228
|
}
|
|
224
229
|
interface WithdrawButtonElementSnapshot {
|
|
225
230
|
state: "loading" | "ready";
|
|
@@ -332,6 +337,12 @@ interface PayoutsSessionOptions {
|
|
|
332
337
|
* The company ID to use in the Elements
|
|
333
338
|
*/
|
|
334
339
|
companyId: string;
|
|
340
|
+
/**
|
|
341
|
+
* URL to redirect to after identity verification is completed.
|
|
342
|
+
* This must be an absolute URL (e.g., "https://yourapp.com/callback").
|
|
343
|
+
* Localhost URLs will not work - use ngrok for local development.
|
|
344
|
+
*/
|
|
345
|
+
redirectUrl: string;
|
|
335
346
|
}
|
|
336
347
|
interface ExpandedPayoutsSessionOptions extends PayoutsSessionOptions {
|
|
337
348
|
}
|
|
@@ -340,6 +351,7 @@ interface PayoutsSessionEvents {
|
|
|
340
351
|
tokenRefreshed: (token: string) => void;
|
|
341
352
|
tokenRefreshError: (error: unknown) => void;
|
|
342
353
|
error: (error: unknown) => void;
|
|
354
|
+
ready: () => void;
|
|
343
355
|
}
|
|
344
356
|
type PayoutsSessionElements = {
|
|
345
357
|
"balance-element": [BalanceElementOptions, BalanceElement];
|
package/dist/url.js
CHANGED
|
@@ -22,6 +22,6 @@ __export(url_exports, {
|
|
|
22
22
|
SCRIPT_URL: () => SCRIPT_URL
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(url_exports);
|
|
25
|
-
const ORIGIN = "https://0-0-
|
|
25
|
+
const ORIGIN = "https://0-0-5-beta-0.elements.whop.com/";
|
|
26
26
|
const SCRIPT_URL = new URL(`/release/elements.js`, ORIGIN).toString();
|
|
27
27
|
//# sourceMappingURL=url.js.map
|
package/dist/url.mjs
CHANGED