@crossmint/client-sdk-react-ui 0.0.5-alpha.1 → 0.0.8-alpha.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/LICENSE +201 -201
- package/README.md +1 -1
- package/lib/cjs/CrossMintButton.d.ts +16 -14
- package/lib/cjs/CrossMintButton.js +59 -54
- package/lib/cjs/CrossMintButton.js.map +1 -1
- package/lib/cjs/CrossMintModal.d.ts +6 -6
- package/lib/cjs/CrossMintModal.js +54 -54
- package/lib/cjs/CrossMintModalProvider.d.ts +6 -6
- package/lib/cjs/CrossMintModalProvider.js +47 -47
- package/lib/cjs/CrossMintModalProvider.js.map +1 -1
- package/lib/cjs/CrossMintPopupProvider.d.ts +6 -6
- package/lib/cjs/CrossMintPopupProvider.js +69 -68
- package/lib/cjs/CrossMintPopupProvider.js.map +1 -1
- package/lib/cjs/CrossMintProvider.d.ts +9 -7
- package/lib/cjs/CrossMintProvider.js +51 -49
- package/lib/cjs/CrossMintProvider.js.map +1 -1
- package/lib/cjs/CrossMintStatusButton.d.ts +10 -0
- package/lib/cjs/CrossMintStatusButton.js +66 -0
- package/lib/cjs/CrossMintStatusButton.js.map +1 -0
- package/lib/cjs/CrossMintStatusProvider.d.ts +7 -0
- package/lib/cjs/CrossMintStatusProvider.js +65 -0
- package/lib/cjs/CrossMintStatusProvider.js.map +1 -0
- package/lib/cjs/index.d.ts +7 -5
- package/lib/cjs/index.js +19 -17
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/useCrossMintModal.d.ts +7 -7
- package/lib/cjs/useCrossMintModal.js +9 -9
- package/lib/cjs/useCrossMintPopup.d.ts +8 -8
- package/lib/cjs/useCrossMintPopup.js +9 -9
- package/lib/cjs/useCrossMintPopup.js.map +1 -1
- package/lib/cjs/useCrossMintStatus.d.ts +15 -0
- package/lib/cjs/useCrossMintStatus.js +18 -0
- package/lib/cjs/useCrossMintStatus.js.map +1 -0
- package/lib/esm/CrossMintButton.d.ts +16 -14
- package/lib/esm/CrossMintButton.js +24 -19
- package/lib/esm/CrossMintButton.js.map +1 -1
- package/lib/esm/CrossMintModal.d.ts +6 -6
- package/lib/esm/CrossMintModal.js +31 -31
- package/lib/esm/CrossMintModalProvider.d.ts +6 -6
- package/lib/esm/CrossMintModalProvider.js +12 -12
- package/lib/esm/CrossMintModalProvider.js.map +1 -1
- package/lib/esm/CrossMintPopupProvider.d.ts +6 -6
- package/lib/esm/CrossMintPopupProvider.js +46 -45
- package/lib/esm/CrossMintPopupProvider.js.map +1 -1
- package/lib/esm/CrossMintProvider.d.ts +9 -7
- package/lib/esm/CrossMintProvider.js +16 -14
- package/lib/esm/CrossMintProvider.js.map +1 -1
- package/lib/esm/CrossMintStatusButton.d.ts +10 -0
- package/lib/esm/CrossMintStatusButton.js +31 -0
- package/lib/esm/CrossMintStatusButton.js.map +1 -0
- package/lib/esm/CrossMintStatusProvider.d.ts +7 -0
- package/lib/esm/CrossMintStatusProvider.js +31 -0
- package/lib/esm/CrossMintStatusProvider.js.map +1 -0
- package/lib/esm/index.d.ts +7 -5
- package/lib/esm/index.js +7 -5
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/useCrossMintModal.d.ts +7 -7
- package/lib/esm/useCrossMintModal.js +5 -5
- package/lib/esm/useCrossMintPopup.d.ts +8 -8
- package/lib/esm/useCrossMintPopup.js +5 -5
- package/lib/esm/useCrossMintPopup.js.map +1 -1
- package/lib/esm/useCrossMintStatus.d.ts +15 -0
- package/lib/esm/useCrossMintStatus.js +14 -0
- package/lib/esm/useCrossMintStatus.js.map +1 -0
- package/package.json +3 -3
- package/src/CrossMintButton.tsx +14 -3
- package/src/CrossMintModal.tsx +54 -54
- package/src/CrossMintModalProvider.tsx +0 -1
- package/src/CrossMintPopupProvider.tsx +19 -13
- package/src/CrossMintProvider.tsx +28 -12
- package/src/CrossMintStatusButton.tsx +73 -0
- package/src/CrossMintStatusProvider.tsx +58 -0
- package/src/index.ts +2 -0
- package/src/useCrossMintModal.tsx +12 -12
- package/src/useCrossMintPopup.tsx +4 -2
- package/src/useCrossMintStatus.tsx +22 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.CrossMintStatusProvider = void 0;
|
|
32
|
+
const react_1 = __importStar(require("react"));
|
|
33
|
+
const useCrossMintStatus_1 = require("./useCrossMintStatus");
|
|
34
|
+
const CrossMintStatusProvider = ({ clientId, hideMintOnInactiveClient, children, }) => {
|
|
35
|
+
const [status, setStatus] = (0, react_1.useState)(useCrossMintStatus_1.OnboardingRequestStatusResponse.WAITING_SUBMISSION);
|
|
36
|
+
function fetchClientIntegration() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const res = yield fetch(`https://crossmint.io/api/crossmint/onboardingRequests/${clientId}/status`);
|
|
39
|
+
if (res.status === 200) {
|
|
40
|
+
const resData = yield res.json();
|
|
41
|
+
console.log("resData", resData);
|
|
42
|
+
setStatus(resData.status);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
if (status !== useCrossMintStatus_1.OnboardingRequestStatusResponse.INVALID) {
|
|
46
|
+
setStatus(useCrossMintStatus_1.OnboardingRequestStatusResponse.INVALID);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
(0, react_1.useEffect)(() => {
|
|
52
|
+
fetchClientIntegration();
|
|
53
|
+
const interval = setInterval(() => {
|
|
54
|
+
fetchClientIntegration();
|
|
55
|
+
}, 60 * 1000);
|
|
56
|
+
return () => clearInterval(interval);
|
|
57
|
+
}, []);
|
|
58
|
+
return (react_1.default.createElement(useCrossMintStatus_1.CrossMintStatusContext.Provider, { value: {
|
|
59
|
+
status,
|
|
60
|
+
clientId,
|
|
61
|
+
hideMintOnInactiveClient,
|
|
62
|
+
} }, children));
|
|
63
|
+
};
|
|
64
|
+
exports.CrossMintStatusProvider = CrossMintStatusProvider;
|
|
65
|
+
//# sourceMappingURL=CrossMintStatusProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossMintStatusProvider.js","sourceRoot":"","sources":["../../src/CrossMintStatusProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkE;AAClE,6DAA+F;AAQxF,MAAM,uBAAuB,GAAqC,CAAC,EACtE,QAAQ,EACR,wBAAwB,EACxB,QAAQ,GACX,EAAE,EAAE;IACD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAChC,oDAA+B,CAAC,kBAAkB,CACrD,CAAC;IAEF,SAAe,sBAAsB;;YACjC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,yDAAyD,QAAQ,SAAS,CAAC,CAAC;YAEpG,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;gBACpB,MAAM,OAAO,GAAkE,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;gBAEhG,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;gBAChC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;aAC7B;iBAAM;gBACH,IAAI,MAAM,KAAK,oDAA+B,CAAC,OAAO,EAAE;oBACpD,SAAS,CAAC,oDAA+B,CAAC,OAAO,CAAC,CAAC;iBACtD;aACJ;QACL,CAAC;KAAA;IAED,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,sBAAsB,EAAE,CAAC;QAEzB,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAC9B,sBAAsB,EAAE,CAAC;QAC7B,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;QAEd,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,8BAAC,2CAAsB,CAAC,QAAQ,IAC5B,KAAK,EAAE;YACH,MAAM;YACN,QAAQ;YACR,wBAAwB;SAC3B,IAEA,QAAQ,CACqB,CACrC,CAAC;AACN,CAAC,CAAC;AA7CW,QAAA,uBAAuB,2BA6ClC"}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export * from "./CrossMintButton";
|
|
2
|
-
export * from "./CrossMintModal";
|
|
3
|
-
export * from "./useCrossMintModal";
|
|
4
|
-
export * from "./useCrossMintPopup";
|
|
5
|
-
export * from "./CrossMintProvider";
|
|
1
|
+
export * from "./CrossMintButton";
|
|
2
|
+
export * from "./CrossMintModal";
|
|
3
|
+
export * from "./useCrossMintModal";
|
|
4
|
+
export * from "./useCrossMintPopup";
|
|
5
|
+
export * from "./CrossMintProvider";
|
|
6
|
+
export * from "./useCrossMintStatus";
|
|
7
|
+
export * from "./CrossMintStatusButton";
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./CrossMintButton"), exports);
|
|
14
|
-
__exportStar(require("./CrossMintModal"), exports);
|
|
15
|
-
__exportStar(require("./useCrossMintModal"), exports);
|
|
16
|
-
__exportStar(require("./useCrossMintPopup"), exports);
|
|
17
|
-
__exportStar(require("./CrossMintProvider"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./CrossMintButton"), exports);
|
|
14
|
+
__exportStar(require("./CrossMintModal"), exports);
|
|
15
|
+
__exportStar(require("./useCrossMintModal"), exports);
|
|
16
|
+
__exportStar(require("./useCrossMintPopup"), exports);
|
|
17
|
+
__exportStar(require("./CrossMintProvider"), exports);
|
|
18
|
+
__exportStar(require("./useCrossMintStatus"), exports);
|
|
19
|
+
__exportStar(require("./CrossMintStatusButton"), exports);
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkC;AAClC,mDAAiC;AACjC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkC;AAClC,mDAAiC;AACjC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,0DAAwC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface CrossMintModalContextState {
|
|
3
|
-
visible: boolean;
|
|
4
|
-
setVisible: (open: boolean) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const CrossMintModalContext: import("react").Context<CrossMintModalContextState>;
|
|
7
|
-
export declare function useCrossMintModal(): CrossMintModalContextState;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface CrossMintModalContextState {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
setVisible: (open: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const CrossMintModalContext: import("react").Context<CrossMintModalContextState>;
|
|
7
|
+
export declare function useCrossMintModal(): CrossMintModalContextState;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCrossMintModal = exports.CrossMintModalContext = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
exports.CrossMintModalContext = (0, react_1.createContext)({});
|
|
6
|
-
function useCrossMintModal() {
|
|
7
|
-
return (0, react_1.useContext)(exports.CrossMintModalContext);
|
|
8
|
-
}
|
|
9
|
-
exports.useCrossMintModal = useCrossMintModal;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCrossMintModal = exports.CrossMintModalContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.CrossMintModalContext = (0, react_1.createContext)({});
|
|
6
|
+
function useCrossMintModal() {
|
|
7
|
+
return (0, react_1.useContext)(exports.CrossMintModalContext);
|
|
8
|
+
}
|
|
9
|
+
exports.useCrossMintModal = useCrossMintModal;
|
|
10
10
|
//# sourceMappingURL=useCrossMintModal.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface PopupContextState {
|
|
3
|
-
connecting: boolean;
|
|
4
|
-
connect: (
|
|
5
|
-
popup: Window | null;
|
|
6
|
-
}
|
|
7
|
-
export declare const PopupContext: import("react").Context<PopupContextState>;
|
|
8
|
-
export declare function useCrossMintPopup(): PopupContextState;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PopupContextState {
|
|
3
|
+
connecting: boolean;
|
|
4
|
+
connect: (collectionTitle?: string, collectionDescription?: string, collectionPhoto?: string, mintTo?: string, emailTo?: string, listingId?: string) => void;
|
|
5
|
+
popup: Window | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const PopupContext: import("react").Context<PopupContextState>;
|
|
8
|
+
export declare function useCrossMintPopup(): PopupContextState;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCrossMintPopup = exports.PopupContext = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
exports.PopupContext = (0, react_1.createContext)({});
|
|
6
|
-
function useCrossMintPopup() {
|
|
7
|
-
return (0, react_1.useContext)(exports.PopupContext);
|
|
8
|
-
}
|
|
9
|
-
exports.useCrossMintPopup = useCrossMintPopup;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCrossMintPopup = exports.PopupContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.PopupContext = (0, react_1.createContext)({});
|
|
6
|
+
function useCrossMintPopup() {
|
|
7
|
+
return (0, react_1.useContext)(exports.PopupContext);
|
|
8
|
+
}
|
|
9
|
+
exports.useCrossMintPopup = useCrossMintPopup;
|
|
10
10
|
//# sourceMappingURL=useCrossMintPopup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossMintPopup.js","sourceRoot":"","sources":["../../src/useCrossMintPopup.tsx"],"names":[],"mappings":";;;AAAA,iCAAkD;
|
|
1
|
+
{"version":3,"file":"useCrossMintPopup.js","sourceRoot":"","sources":["../../src/useCrossMintPopup.tsx"],"names":[],"mappings":";;;AAAA,iCAAkD;AAgBrC,QAAA,YAAY,GAAG,IAAA,qBAAa,EAAoB,EAAuB,CAAC,CAAC;AAEtF,SAAgB,iBAAiB;IAC7B,OAAO,IAAA,kBAAU,EAAC,oBAAY,CAAC,CAAC;AACpC,CAAC;AAFD,8CAEC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare enum OnboardingRequestStatusResponse {
|
|
3
|
+
WAITING_SUBMISSION = "waiting-submission",
|
|
4
|
+
PENDING = "pending",
|
|
5
|
+
REJECTED = "rejected",
|
|
6
|
+
ACCEPTED = "accepted",
|
|
7
|
+
INVALID = "invalid"
|
|
8
|
+
}
|
|
9
|
+
export interface CrossMintStatusContextState {
|
|
10
|
+
status: OnboardingRequestStatusResponse;
|
|
11
|
+
clientId: string;
|
|
12
|
+
hideMintOnInactiveClient: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const CrossMintStatusContext: import("react").Context<CrossMintStatusContextState>;
|
|
15
|
+
export declare function useCrossMintStatus(): CrossMintStatusContextState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCrossMintStatus = exports.CrossMintStatusContext = exports.OnboardingRequestStatusResponse = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
var OnboardingRequestStatusResponse;
|
|
6
|
+
(function (OnboardingRequestStatusResponse) {
|
|
7
|
+
OnboardingRequestStatusResponse["WAITING_SUBMISSION"] = "waiting-submission";
|
|
8
|
+
OnboardingRequestStatusResponse["PENDING"] = "pending";
|
|
9
|
+
OnboardingRequestStatusResponse["REJECTED"] = "rejected";
|
|
10
|
+
OnboardingRequestStatusResponse["ACCEPTED"] = "accepted";
|
|
11
|
+
OnboardingRequestStatusResponse["INVALID"] = "invalid";
|
|
12
|
+
})(OnboardingRequestStatusResponse = exports.OnboardingRequestStatusResponse || (exports.OnboardingRequestStatusResponse = {}));
|
|
13
|
+
exports.CrossMintStatusContext = (0, react_1.createContext)({});
|
|
14
|
+
function useCrossMintStatus() {
|
|
15
|
+
return (0, react_1.useContext)(exports.CrossMintStatusContext);
|
|
16
|
+
}
|
|
17
|
+
exports.useCrossMintStatus = useCrossMintStatus;
|
|
18
|
+
//# sourceMappingURL=useCrossMintStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCrossMintStatus.js","sourceRoot":"","sources":["../../src/useCrossMintStatus.tsx"],"names":[],"mappings":";;;AAAA,iCAAkD;AAElD,IAAY,+BAMX;AAND,WAAY,+BAA+B;IACvC,4EAAyC,CAAA;IACzC,sDAAmB,CAAA;IACnB,wDAAqB,CAAA;IACrB,wDAAqB,CAAA;IACrB,sDAAmB,CAAA;AACvB,CAAC,EANW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAM1C;AAQY,QAAA,sBAAsB,GAAG,IAAA,qBAAa,EAA8B,EAAiC,CAAC,CAAC;AAEpH,SAAgB,kBAAkB;IAC9B,OAAO,IAAA,kBAAU,EAAC,8BAAsB,CAAC,CAAC;AAC9C,CAAC;AAFD,gDAEC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { CSSProperties, FC, MouseEvent } from "react";
|
|
2
|
-
export interface ButtonProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { CSSProperties, FC, MouseEvent } from "react";
|
|
2
|
+
export interface ButtonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
tabIndex?: number;
|
|
8
|
+
theme?: "light" | "dark";
|
|
9
|
+
collectionTitle?: string;
|
|
10
|
+
collectionDescription?: string;
|
|
11
|
+
collectionPhoto?: string;
|
|
12
|
+
mintTo?: string;
|
|
13
|
+
emailTo?: string;
|
|
14
|
+
listingId?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const CrossMintButton: FC<ButtonProps>;
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import React, { useMemo, useCallback } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import React, { useMemo, useCallback } from "react";
|
|
2
|
+
import { OnboardingRequestStatusResponse, useCrossMintStatus } from ".";
|
|
3
|
+
import { useCrossMintPopup } from "./useCrossMintPopup";
|
|
4
|
+
export const CrossMintButton = ({ className, disabled, onClick, style, tabIndex, theme = "dark", collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId, ...props }) => {
|
|
5
|
+
const { hideMintOnInactiveClient, status } = useCrossMintStatus();
|
|
6
|
+
const { connecting, connect } = useCrossMintPopup();
|
|
7
|
+
const handleClick = useCallback((event) => {
|
|
8
|
+
if (onClick)
|
|
9
|
+
onClick(event);
|
|
10
|
+
if (!event.defaultPrevented)
|
|
11
|
+
connect(collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId);
|
|
12
|
+
}, [onClick]);
|
|
13
|
+
const content = useMemo(() => {
|
|
14
|
+
if (connecting)
|
|
15
|
+
return React.createElement("p", null, "Connecting ...");
|
|
16
|
+
return React.createElement("p", null, "Buy with credit card");
|
|
17
|
+
}, [connecting]);
|
|
18
|
+
if (hideMintOnInactiveClient && status !== OnboardingRequestStatusResponse.ACCEPTED) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return (React.createElement("button", { className: `client-sdk-button-trigger client-sdk-button-trigger-${theme}`, disabled: disabled, onClick: handleClick, style: { ...style }, tabIndex: tabIndex, ...props },
|
|
22
|
+
React.createElement("img", { className: "client-sdk-button-icon", src: "https://www.crossmint.io/assets/crossmint/logo.png", alt: "Crossmint logo" }),
|
|
23
|
+
content));
|
|
24
|
+
};
|
|
20
25
|
//# sourceMappingURL=CrossMintButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossMintButton.js","sourceRoot":"","sources":["../../src/CrossMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"CrossMintButton.js","sourceRoot":"","sources":["../../src/CrossMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACtG,OAAO,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,MAAM,GAAG,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAiBxD,MAAM,CAAC,MAAM,eAAe,GAAoB,CAAC,EAC7C,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,GAAG,MAAM,EACd,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,MAAM,EACN,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACX,EAAE,EAAE;IACD,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAElE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAEpD,MAAM,WAAW,GAAyC,WAAW,CACjE,CAAC,KAAK,EAAE,EAAE;QACN,IAAI,OAAO;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAE5B,IAAI,CAAC,KAAK,CAAC,gBAAgB;YACvB,OAAO,CAAC,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACrG,CAAC,EACD,CAAC,OAAO,CAAC,CACZ,CAAC;IAEF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE;QACzB,IAAI,UAAU;YAAE,OAAO,gDAAqB,CAAC;QAC7C,OAAO,sDAA2B,CAAC;IACvC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,IAAI,wBAAwB,IAAI,MAAM,KAAK,+BAA+B,CAAC,QAAQ,EAAE;QACjF,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,gCACI,SAAS,EAAE,uDAAuD,KAAK,EAAE,EACzE,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,EACnB,QAAQ,EAAE,QAAQ,KACd,KAAK;QAET,6BACI,SAAS,EAAC,wBAAwB,EAClC,GAAG,EAAC,oDAAoD,EACxD,GAAG,EAAC,gBAAgB,GACtB;QACD,OAAO,CACH,CACZ,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
export interface CrossMintModalProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
container?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const CrossMintModal: FC<CrossMintModalProps>;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
export interface CrossMintModalProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
container?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const CrossMintModal: FC<CrossMintModalProps>;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import React, { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
-
import { createPortal } from "react-dom";
|
|
3
|
-
import { useCrossMintModal } from "./useCrossMintModal";
|
|
4
|
-
export const CrossMintModal = ({ className = "", container = "body" }) => {
|
|
5
|
-
const ref = useRef(null);
|
|
6
|
-
const { setVisible } = useCrossMintModal();
|
|
7
|
-
const [fadeIn, setFadeIn] = useState(false);
|
|
8
|
-
const [portal, setPortal] = useState(null);
|
|
9
|
-
const hideModal = useCallback(() => {
|
|
10
|
-
setFadeIn(false);
|
|
11
|
-
setTimeout(() => setVisible(false), 150);
|
|
12
|
-
}, [setFadeIn, setVisible]);
|
|
13
|
-
useLayoutEffect(() => {
|
|
14
|
-
// Get original overflow
|
|
15
|
-
const { overflow } = window.getComputedStyle(document.body);
|
|
16
|
-
// Hack to enable fade in animation after mount
|
|
17
|
-
setTimeout(() => setFadeIn(true), 0);
|
|
18
|
-
// Prevent scrolling on mount
|
|
19
|
-
document.body.style.overflow = "hidden";
|
|
20
|
-
return () => {
|
|
21
|
-
// Re-enable scrolling when component unmounts
|
|
22
|
-
document.body.style.overflow = overflow;
|
|
23
|
-
};
|
|
24
|
-
}, [hideModal]);
|
|
25
|
-
useLayoutEffect(() => setPortal(document.querySelector(container)), [setPortal, container]);
|
|
26
|
-
return (portal &&
|
|
27
|
-
createPortal(React.createElement("div", { "aria-modal": "true", className: `client-sdk-modal ${fadeIn && "client-sdk-modal-fade-in"} ${className}`, ref: ref },
|
|
28
|
-
React.createElement("div", { className: "client-sdk-modal-container" },
|
|
29
|
-
React.createElement("span", { className: "client-sdk-modal-loader" })),
|
|
30
|
-
React.createElement("div", { className: "client-sdk-modal-overlay" })), portal));
|
|
31
|
-
};
|
|
1
|
+
import React, { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import { createPortal } from "react-dom";
|
|
3
|
+
import { useCrossMintModal } from "./useCrossMintModal";
|
|
4
|
+
export const CrossMintModal = ({ className = "", container = "body" }) => {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
const { setVisible } = useCrossMintModal();
|
|
7
|
+
const [fadeIn, setFadeIn] = useState(false);
|
|
8
|
+
const [portal, setPortal] = useState(null);
|
|
9
|
+
const hideModal = useCallback(() => {
|
|
10
|
+
setFadeIn(false);
|
|
11
|
+
setTimeout(() => setVisible(false), 150);
|
|
12
|
+
}, [setFadeIn, setVisible]);
|
|
13
|
+
useLayoutEffect(() => {
|
|
14
|
+
// Get original overflow
|
|
15
|
+
const { overflow } = window.getComputedStyle(document.body);
|
|
16
|
+
// Hack to enable fade in animation after mount
|
|
17
|
+
setTimeout(() => setFadeIn(true), 0);
|
|
18
|
+
// Prevent scrolling on mount
|
|
19
|
+
document.body.style.overflow = "hidden";
|
|
20
|
+
return () => {
|
|
21
|
+
// Re-enable scrolling when component unmounts
|
|
22
|
+
document.body.style.overflow = overflow;
|
|
23
|
+
};
|
|
24
|
+
}, [hideModal]);
|
|
25
|
+
useLayoutEffect(() => setPortal(document.querySelector(container)), [setPortal, container]);
|
|
26
|
+
return (portal &&
|
|
27
|
+
createPortal(React.createElement("div", { "aria-modal": "true", className: `client-sdk-modal ${fadeIn && "client-sdk-modal-fade-in"} ${className}`, ref: ref },
|
|
28
|
+
React.createElement("div", { className: "client-sdk-modal-container" },
|
|
29
|
+
React.createElement("span", { className: "client-sdk-modal-loader" })),
|
|
30
|
+
React.createElement("div", { className: "client-sdk-modal-overlay" })), portal));
|
|
31
|
+
};
|
|
32
32
|
//# sourceMappingURL=CrossMintModal.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC, ReactNode } from "react";
|
|
2
|
-
import { CrossMintModalProps } from "./CrossMintModal";
|
|
3
|
-
export interface CrossMintModalProviderProps extends CrossMintModalProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare const CrossMintModalProvider: FC<CrossMintModalProviderProps>;
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { CrossMintModalProps } from "./CrossMintModal";
|
|
3
|
+
export interface CrossMintModalProviderProps extends CrossMintModalProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CrossMintModalProvider: FC<CrossMintModalProviderProps>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { CrossMintModal } from "./CrossMintModal";
|
|
3
|
-
import { CrossMintModalContext } from "./useCrossMintModal";
|
|
4
|
-
export const CrossMintModalProvider = ({ children, ...props }) => {
|
|
5
|
-
const [visible, setVisible] = useState(false);
|
|
6
|
-
return (React.createElement(CrossMintModalContext.Provider, { value: {
|
|
7
|
-
visible,
|
|
8
|
-
setVisible,
|
|
9
|
-
} },
|
|
10
|
-
children,
|
|
11
|
-
visible && React.createElement(CrossMintModal, { ...props })));
|
|
12
|
-
};
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { CrossMintModal } from "./CrossMintModal";
|
|
3
|
+
import { CrossMintModalContext } from "./useCrossMintModal";
|
|
4
|
+
export const CrossMintModalProvider = ({ children, ...props }) => {
|
|
5
|
+
const [visible, setVisible] = useState(false);
|
|
6
|
+
return (React.createElement(CrossMintModalContext.Provider, { value: {
|
|
7
|
+
visible,
|
|
8
|
+
setVisible,
|
|
9
|
+
} },
|
|
10
|
+
children,
|
|
11
|
+
visible && React.createElement(CrossMintModal, { ...props })));
|
|
12
|
+
};
|
|
13
13
|
//# sourceMappingURL=CrossMintModalProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossMintModalProvider.js","sourceRoot":"","sources":["../../src/CrossMintModalProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"CrossMintModalProvider.js","sourceRoot":"","sources":["../../src/CrossMintModalProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,MAAM,CAAC,MAAM,sBAAsB,GAAoC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9F,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACH,oBAAC,qBAAqB,CAAC,QAAQ,IAC3B,KAAK,EAAE;YACH,OAAO;YACP,UAAU;SACb;QAEA,QAAQ;QACR,OAAO,IAAI,oBAAC,cAAc,OAAK,KAAK,GAAI,CACZ,CACpC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC, ReactNode } from "react";
|
|
2
|
-
export interface PopupProviderProps {
|
|
3
|
-
development: boolean;
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare const CrossMintPopupProvider: FC<PopupProviderProps>;
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
export interface PopupProviderProps {
|
|
3
|
+
development: boolean;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CrossMintPopupProvider: FC<PopupProviderProps>;
|
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { useCrossMintModal } from ".";
|
|
3
|
-
import { PopupContext } from "./useCrossMintPopup";
|
|
4
|
-
const PROD_URL = "https://crossmint.io";
|
|
5
|
-
const DEV_URL = "http://localhost:3001";
|
|
6
|
-
export const CrossMintPopupProvider = ({ development, children }) => {
|
|
7
|
-
const [connecting, setConnecting] = useState(false);
|
|
8
|
-
const [popup, setPopup] = useState(null);
|
|
9
|
-
const {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { useCrossMintModal, useCrossMintStatus } from ".";
|
|
3
|
+
import { PopupContext } from "./useCrossMintPopup";
|
|
4
|
+
const PROD_URL = "https://crossmint.io";
|
|
5
|
+
const DEV_URL = "http://localhost:3001";
|
|
6
|
+
export const CrossMintPopupProvider = ({ development, children }) => {
|
|
7
|
+
const [connecting, setConnecting] = useState(false);
|
|
8
|
+
const [popup, setPopup] = useState(null);
|
|
9
|
+
const { clientId } = useCrossMintStatus();
|
|
10
|
+
const { setVisible } = useCrossMintModal();
|
|
11
|
+
const createPopup = (collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId) => {
|
|
12
|
+
const pop = window.open(`${development ? DEV_URL : PROD_URL}/signin?callbackUrl=${encodeURIComponent(`${development ? DEV_URL : PROD_URL}/checkout/mint?clientId=${clientId}&closeOnSuccess=false${collectionTitle && `collectionTitle=${collectionTitle}`}${collectionDescription && `&collectionDescription=${collectionDescription}`}${collectionPhoto && `&collectionPhoto=${collectionPhoto}`}${mintTo && `&mintTo=${mintTo}`}${emailTo && `&emailTo=${emailTo}`}${listingId && `&listingId=${listingId}`}`)}`, "popUpWindow", createPopupString());
|
|
13
|
+
if (pop) {
|
|
14
|
+
setVisible(true);
|
|
15
|
+
setPopup(pop);
|
|
16
|
+
registerListeners(pop);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
setConnecting(false);
|
|
20
|
+
console.log("Failed to open popup window");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const connect = (collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId) => {
|
|
24
|
+
if (connecting)
|
|
25
|
+
return;
|
|
26
|
+
setConnecting(true);
|
|
27
|
+
createPopup(collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId);
|
|
28
|
+
};
|
|
29
|
+
function registerListeners(pop) {
|
|
30
|
+
const timer = setInterval(function () {
|
|
31
|
+
if (pop.closed) {
|
|
32
|
+
clearInterval(timer);
|
|
33
|
+
setConnecting(false);
|
|
34
|
+
setVisible(false);
|
|
35
|
+
}
|
|
36
|
+
}, 500);
|
|
37
|
+
}
|
|
38
|
+
function createPopupString() {
|
|
39
|
+
return `height=750,width=400,left=${window.innerWidth / 2 - 200},top=${window.innerHeight / 2 - 375},resizable=yes,scrollbars=yes,toolbar=yes,menubar=true,location=no,directories=no, status=yes`;
|
|
40
|
+
}
|
|
41
|
+
return (React.createElement(PopupContext.Provider, { value: {
|
|
42
|
+
connecting,
|
|
43
|
+
popup,
|
|
44
|
+
connect,
|
|
45
|
+
} }, children));
|
|
46
|
+
};
|
|
46
47
|
//# sourceMappingURL=CrossMintPopupProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossMintPopupProvider.js","sourceRoot":"","sources":["../../src/CrossMintPopupProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"CrossMintPopupProvider.js","sourceRoot":"","sources":["../../src/CrossMintPopupProvider.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { FC, ReactNode } from "react";
|
|
2
|
-
import { CrossMintModalProps } from "./CrossMintModal";
|
|
3
|
-
export interface CrossMintProviderProps extends CrossMintModalProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { CrossMintModalProps } from "./CrossMintModal";
|
|
3
|
+
export interface CrossMintProviderProps extends CrossMintModalProps {
|
|
4
|
+
clientId: string;
|
|
5
|
+
hideMintOnInactiveClient?: boolean;
|
|
6
|
+
development?: boolean;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const CrossMintProvider: FC<CrossMintProviderProps>;
|