@crossmint/client-sdk-react-ui 0.0.8-alpha.0 → 0.0.8-alpha.4
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/lib/cjs/CrossMintButton.d.ts +16 -16
- package/lib/cjs/CrossMintButton.js +59 -59
- package/lib/cjs/CrossMintModal.d.ts +6 -6
- package/lib/cjs/CrossMintModal.js +54 -54
- package/lib/cjs/CrossMintModal.js.map +1 -1
- package/lib/cjs/CrossMintModalProvider.d.ts +6 -6
- package/lib/cjs/CrossMintModalProvider.js +47 -47
- package/lib/cjs/CrossMintPopupProvider.d.ts +6 -6
- package/lib/cjs/CrossMintPopupProvider.js +69 -69
- package/lib/cjs/CrossMintPopupProvider.js.map +1 -1
- package/lib/cjs/CrossMintProvider.d.ts +10 -9
- package/lib/cjs/CrossMintProvider.js +51 -51
- package/lib/cjs/CrossMintProvider.js.map +1 -1
- package/lib/cjs/CrossMintStatusButton.d.ts +10 -10
- package/lib/cjs/CrossMintStatusButton.js +65 -65
- package/lib/cjs/CrossMintStatusButton.js.map +1 -1
- package/lib/cjs/CrossMintStatusProvider.d.ts +8 -7
- package/lib/cjs/CrossMintStatusProvider.js +69 -64
- package/lib/cjs/CrossMintStatusProvider.js.map +1 -1
- package/lib/cjs/index.d.ts +7 -7
- package/lib/cjs/index.js +19 -19
- package/lib/cjs/package.json +1 -3
- 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/useCrossMintStatus.d.ts +16 -15
- package/lib/cjs/useCrossMintStatus.js +17 -17
- package/lib/cjs/useCrossMintStatus.js.map +1 -1
- package/lib/esm/CrossMintButton.d.ts +16 -16
- package/lib/esm/CrossMintButton.js +24 -24
- package/lib/esm/CrossMintModal.d.ts +6 -6
- package/lib/esm/CrossMintModal.js +31 -31
- package/lib/esm/CrossMintModal.js.map +1 -1
- package/lib/esm/CrossMintModalProvider.d.ts +6 -6
- package/lib/esm/CrossMintModalProvider.js +12 -12
- package/lib/esm/CrossMintPopupProvider.d.ts +6 -6
- package/lib/esm/CrossMintPopupProvider.js +46 -46
- package/lib/esm/CrossMintPopupProvider.js.map +1 -1
- package/lib/esm/CrossMintProvider.d.ts +10 -9
- package/lib/esm/CrossMintProvider.js +16 -16
- package/lib/esm/CrossMintProvider.js.map +1 -1
- package/lib/esm/CrossMintStatusButton.d.ts +10 -10
- package/lib/esm/CrossMintStatusButton.js +30 -30
- package/lib/esm/CrossMintStatusButton.js.map +1 -1
- package/lib/esm/CrossMintStatusProvider.d.ts +8 -7
- package/lib/esm/CrossMintStatusProvider.js +35 -30
- package/lib/esm/CrossMintStatusProvider.js.map +1 -1
- package/lib/esm/index.d.ts +7 -7
- package/lib/esm/index.js +7 -7
- 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/useCrossMintStatus.d.ts +16 -15
- package/lib/esm/useCrossMintStatus.js +13 -13
- package/lib/esm/useCrossMintStatus.js.map +1 -1
- package/package.json +2 -3
- package/src/CrossMintModal.tsx +54 -54
- package/src/CrossMintPopupProvider.tsx +9 -9
- package/src/CrossMintStatusButton.tsx +2 -2
- package/src/CrossMintStatusProvider.tsx +5 -0
- package/src/useCrossMintModal.tsx +12 -12
- package/lib/esm/package.json +0 -3
|
@@ -1,55 +1,55 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.CrossMintModal = void 0;
|
|
23
|
-
const react_1 = __importStar(require("react"));
|
|
24
|
-
const react_dom_1 = require("react-dom");
|
|
25
|
-
const useCrossMintModal_1 = require("./useCrossMintModal");
|
|
26
|
-
const CrossMintModal = ({ className = "", container = "body" }) => {
|
|
27
|
-
const ref = (0, react_1.useRef)(null);
|
|
28
|
-
const { setVisible } = (0, useCrossMintModal_1.useCrossMintModal)();
|
|
29
|
-
const [fadeIn, setFadeIn] = (0, react_1.useState)(false);
|
|
30
|
-
const [portal, setPortal] = (0, react_1.useState)(null);
|
|
31
|
-
const hideModal = (0, react_1.useCallback)(() => {
|
|
32
|
-
setFadeIn(false);
|
|
33
|
-
setTimeout(() => setVisible(false), 150);
|
|
34
|
-
}, [setFadeIn, setVisible]);
|
|
35
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
36
|
-
// Get original overflow
|
|
37
|
-
const { overflow } = window.getComputedStyle(document.body);
|
|
38
|
-
// Hack to enable fade in animation after mount
|
|
39
|
-
setTimeout(() => setFadeIn(true), 0);
|
|
40
|
-
// Prevent scrolling on mount
|
|
41
|
-
document.body.style.overflow = "hidden";
|
|
42
|
-
return () => {
|
|
43
|
-
// Re-enable scrolling when component unmounts
|
|
44
|
-
document.body.style.overflow = overflow;
|
|
45
|
-
};
|
|
46
|
-
}, [hideModal]);
|
|
47
|
-
(0, react_1.useLayoutEffect)(() => setPortal(document.querySelector(container)), [setPortal, container]);
|
|
48
|
-
return (portal &&
|
|
49
|
-
(0, react_dom_1.createPortal)(react_1.default.createElement("div", { "aria-modal": "true", className: `client-sdk-modal ${fadeIn
|
|
50
|
-
react_1.default.createElement("div", { className: "client-sdk-modal-container" },
|
|
51
|
-
react_1.default.createElement("span", { className: "client-sdk-modal-loader" })),
|
|
52
|
-
react_1.default.createElement("div", { className: "client-sdk-modal-overlay" })), portal));
|
|
53
|
-
};
|
|
54
|
-
exports.CrossMintModal = CrossMintModal;
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.CrossMintModal = void 0;
|
|
23
|
+
const react_1 = __importStar(require("react"));
|
|
24
|
+
const react_dom_1 = require("react-dom");
|
|
25
|
+
const useCrossMintModal_1 = require("./useCrossMintModal");
|
|
26
|
+
const CrossMintModal = ({ className = "", container = "body" }) => {
|
|
27
|
+
const ref = (0, react_1.useRef)(null);
|
|
28
|
+
const { setVisible } = (0, useCrossMintModal_1.useCrossMintModal)();
|
|
29
|
+
const [fadeIn, setFadeIn] = (0, react_1.useState)(false);
|
|
30
|
+
const [portal, setPortal] = (0, react_1.useState)(null);
|
|
31
|
+
const hideModal = (0, react_1.useCallback)(() => {
|
|
32
|
+
setFadeIn(false);
|
|
33
|
+
setTimeout(() => setVisible(false), 150);
|
|
34
|
+
}, [setFadeIn, setVisible]);
|
|
35
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
36
|
+
// Get original overflow
|
|
37
|
+
const { overflow } = window.getComputedStyle(document.body);
|
|
38
|
+
// Hack to enable fade in animation after mount
|
|
39
|
+
setTimeout(() => setFadeIn(true), 0);
|
|
40
|
+
// Prevent scrolling on mount
|
|
41
|
+
document.body.style.overflow = "hidden";
|
|
42
|
+
return () => {
|
|
43
|
+
// Re-enable scrolling when component unmounts
|
|
44
|
+
document.body.style.overflow = overflow;
|
|
45
|
+
};
|
|
46
|
+
}, [hideModal]);
|
|
47
|
+
(0, react_1.useLayoutEffect)(() => setPortal(document.querySelector(container)), [setPortal, container]);
|
|
48
|
+
return (portal &&
|
|
49
|
+
(0, react_dom_1.createPortal)(react_1.default.createElement("div", { "aria-modal": "true", className: `client-sdk-modal ${fadeIn ? "client-sdk-modal-fade-in" : ""} ${className}`, ref: ref },
|
|
50
|
+
react_1.default.createElement("div", { className: "client-sdk-modal-container" },
|
|
51
|
+
react_1.default.createElement("span", { className: "client-sdk-modal-loader" })),
|
|
52
|
+
react_1.default.createElement("div", { className: "client-sdk-modal-overlay" })), portal));
|
|
53
|
+
};
|
|
54
|
+
exports.CrossMintModal = CrossMintModal;
|
|
55
55
|
//# sourceMappingURL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,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC5D,+CAA+C;QAC/C,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,6BAA6B;QAC7B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAExC,OAAO,GAAG,EAAE;YACR,8CAA8C;YAC9C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC5C,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,IAAA,uBAAe,EAAC,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IAE5F,OAAO,CACH,MAAM;QACN,IAAA,wBAAY,EACR,qDACe,MAAM,EACjB,SAAS,EAAE,oBAAoB,MAAM,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,IAAI,SAAS,EAAE,EACtF,GAAG,EAAE,GAAG;YAER,uCAAK,SAAS,EAAC,4BAA4B;gBACvC,wCAAM,SAAS,EAAC,yBAAyB,GAAG,CAC1C;YACN,uCAAK,SAAS,EAAC,0BAA0B,GAAG,CAC1C,EACN,MAAM,CACT,CACJ,CAAC;AACN,CAAC,CAAC;AA5CW,QAAA,cAAc,kBA4CzB"}
|
|
@@ -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,48 +1,48 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
-
var t = {};
|
|
23
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
-
t[p] = s[p];
|
|
25
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
-
t[p[i]] = s[p[i]];
|
|
29
|
-
}
|
|
30
|
-
return t;
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.CrossMintModalProvider = void 0;
|
|
34
|
-
const react_1 = __importStar(require("react"));
|
|
35
|
-
const CrossMintModal_1 = require("./CrossMintModal");
|
|
36
|
-
const useCrossMintModal_1 = require("./useCrossMintModal");
|
|
37
|
-
const CrossMintModalProvider = (_a) => {
|
|
38
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
39
|
-
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
40
|
-
return (react_1.default.createElement(useCrossMintModal_1.CrossMintModalContext.Provider, { value: {
|
|
41
|
-
visible,
|
|
42
|
-
setVisible,
|
|
43
|
-
} },
|
|
44
|
-
children,
|
|
45
|
-
visible && react_1.default.createElement(CrossMintModal_1.CrossMintModal, Object.assign({}, props))));
|
|
46
|
-
};
|
|
47
|
-
exports.CrossMintModalProvider = CrossMintModalProvider;
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
+
t[p] = s[p];
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
+
t[p[i]] = s[p[i]];
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.CrossMintModalProvider = void 0;
|
|
34
|
+
const react_1 = __importStar(require("react"));
|
|
35
|
+
const CrossMintModal_1 = require("./CrossMintModal");
|
|
36
|
+
const useCrossMintModal_1 = require("./useCrossMintModal");
|
|
37
|
+
const CrossMintModalProvider = (_a) => {
|
|
38
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
39
|
+
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
40
|
+
return (react_1.default.createElement(useCrossMintModal_1.CrossMintModalContext.Provider, { value: {
|
|
41
|
+
visible,
|
|
42
|
+
setVisible,
|
|
43
|
+
} },
|
|
44
|
+
children,
|
|
45
|
+
visible && react_1.default.createElement(CrossMintModal_1.CrossMintModal, Object.assign({}, props))));
|
|
46
|
+
};
|
|
47
|
+
exports.CrossMintModalProvider = CrossMintModalProvider;
|
|
48
48
|
//# sourceMappingURL=CrossMintModalProvider.js.map
|
|
@@ -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,70 +1,70 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.CrossMintPopupProvider = void 0;
|
|
23
|
-
const react_1 = __importStar(require("react"));
|
|
24
|
-
const _1 = require(".");
|
|
25
|
-
const useCrossMintPopup_1 = require("./useCrossMintPopup");
|
|
26
|
-
const PROD_URL = "https://crossmint.io";
|
|
27
|
-
const DEV_URL = "http://localhost:3001";
|
|
28
|
-
const CrossMintPopupProvider = ({ development, children }) => {
|
|
29
|
-
const [connecting, setConnecting] = (0, react_1.useState)(false);
|
|
30
|
-
const [popup, setPopup] = (0, react_1.useState)(null);
|
|
31
|
-
const { clientId } = (0, _1.useCrossMintStatus)();
|
|
32
|
-
const { setVisible } = (0, _1.useCrossMintModal)();
|
|
33
|
-
const createPopup = (collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId) => {
|
|
34
|
-
const pop = window.open(`${development ? DEV_URL : PROD_URL}/signin?callbackUrl=${encodeURIComponent(`${development ? DEV_URL : PROD_URL}/checkout/mint?clientId=${clientId}&closeOnSuccess=false
|
|
35
|
-
if (pop) {
|
|
36
|
-
setVisible(true);
|
|
37
|
-
setPopup(pop);
|
|
38
|
-
registerListeners(pop);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
setConnecting(false);
|
|
42
|
-
console.log("Failed to open popup window");
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const connect = (collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId) => {
|
|
46
|
-
if (connecting)
|
|
47
|
-
return;
|
|
48
|
-
setConnecting(true);
|
|
49
|
-
createPopup(collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId);
|
|
50
|
-
};
|
|
51
|
-
function registerListeners(pop) {
|
|
52
|
-
const timer = setInterval(function () {
|
|
53
|
-
if (pop.closed) {
|
|
54
|
-
clearInterval(timer);
|
|
55
|
-
setConnecting(false);
|
|
56
|
-
setVisible(false);
|
|
57
|
-
}
|
|
58
|
-
}, 500);
|
|
59
|
-
}
|
|
60
|
-
function createPopupString() {
|
|
61
|
-
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`;
|
|
62
|
-
}
|
|
63
|
-
return (react_1.default.createElement(useCrossMintPopup_1.PopupContext.Provider, { value: {
|
|
64
|
-
connecting,
|
|
65
|
-
popup,
|
|
66
|
-
connect,
|
|
67
|
-
} }, children));
|
|
68
|
-
};
|
|
69
|
-
exports.CrossMintPopupProvider = CrossMintPopupProvider;
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.CrossMintPopupProvider = void 0;
|
|
23
|
+
const react_1 = __importStar(require("react"));
|
|
24
|
+
const _1 = require(".");
|
|
25
|
+
const useCrossMintPopup_1 = require("./useCrossMintPopup");
|
|
26
|
+
const PROD_URL = "https://www.crossmint.io";
|
|
27
|
+
const DEV_URL = "http://localhost:3001";
|
|
28
|
+
const CrossMintPopupProvider = ({ development, children }) => {
|
|
29
|
+
const [connecting, setConnecting] = (0, react_1.useState)(false);
|
|
30
|
+
const [popup, setPopup] = (0, react_1.useState)(null);
|
|
31
|
+
const { clientId } = (0, _1.useCrossMintStatus)();
|
|
32
|
+
const { setVisible } = (0, _1.useCrossMintModal)();
|
|
33
|
+
const createPopup = (collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId) => {
|
|
34
|
+
const pop = window.open(`${development ? DEV_URL : PROD_URL}/signin?callbackUrl=${encodeURIComponent(`${development ? DEV_URL : PROD_URL}/checkout/mint?clientId=${encodeURIComponent(clientId)}&closeOnSuccess=false&${collectionTitle ? `collectionTitle=${encodeURIComponent(collectionTitle)}` : ""}${collectionDescription ? `&collectionDescription=${encodeURIComponent(collectionDescription)}` : ""}${collectionPhoto ? `&collectionPhoto=${encodeURIComponent(collectionPhoto)}` : ""}${mintTo ? `&mintTo=${encodeURIComponent(mintTo)}` : ""}${emailTo ? `&emailTo=${encodeURIComponent(emailTo)}` : ""}${listingId ? `&listingId=${encodeURIComponent(listingId)}` : ""}`)}`, "popUpWindow", createPopupString());
|
|
35
|
+
if (pop) {
|
|
36
|
+
setVisible(true);
|
|
37
|
+
setPopup(pop);
|
|
38
|
+
registerListeners(pop);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
setConnecting(false);
|
|
42
|
+
console.log("Failed to open popup window");
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const connect = (collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId) => {
|
|
46
|
+
if (connecting)
|
|
47
|
+
return;
|
|
48
|
+
setConnecting(true);
|
|
49
|
+
createPopup(collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId);
|
|
50
|
+
};
|
|
51
|
+
function registerListeners(pop) {
|
|
52
|
+
const timer = setInterval(function () {
|
|
53
|
+
if (pop.closed) {
|
|
54
|
+
clearInterval(timer);
|
|
55
|
+
setConnecting(false);
|
|
56
|
+
setVisible(false);
|
|
57
|
+
}
|
|
58
|
+
}, 500);
|
|
59
|
+
}
|
|
60
|
+
function createPopupString() {
|
|
61
|
+
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`;
|
|
62
|
+
}
|
|
63
|
+
return (react_1.default.createElement(useCrossMintPopup_1.PopupContext.Provider, { value: {
|
|
64
|
+
connecting,
|
|
65
|
+
popup,
|
|
66
|
+
connect,
|
|
67
|
+
} }, children));
|
|
68
|
+
};
|
|
69
|
+
exports.CrossMintPopupProvider = CrossMintPopupProvider;
|
|
70
70
|
//# sourceMappingURL=CrossMintPopupProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossMintPopupProvider.js","sourceRoot":"","sources":["../../src/CrossMintPopupProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AACvD,wBAA0D;AAC1D,2DAAmD;AAOnD,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"CrossMintPopupProvider.js","sourceRoot":"","sources":["../../src/CrossMintPopupProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AACvD,wBAA0D;AAC1D,2DAAmD;AAOnD,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAC5C,MAAM,OAAO,GAAG,uBAAuB,CAAC;AAEjC,MAAM,sBAAsB,GAA2B,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAgB,IAAI,CAAC,CAAC;IAExD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAkB,GAAE,CAAC;IAE1C,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,oBAAiB,GAAE,CAAC;IAE3C,MAAM,WAAW,GAAG,CAChB,eAAwB,EACxB,qBAA8B,EAC9B,eAAwB,EACxB,MAAe,EACf,OAAgB,EAChB,SAAkB,EACpB,EAAE;QACA,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CACf,GAAG,WAAW,CAAC,CAAC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pB,WAAW,CAAC,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACrG,CAAC,CAAC;IAEF,SAAS,iBAAiB,CAAC,GAAW;QAClC,MAAM,KAAK,GAAG,WAAW,CAAC;YACtB,IAAI,GAAG,CAAC,MAAM,EAAE;gBACZ,aAAa,CAAC,KAAK,CAAC,CAAC;gBACrB,aAAa,CAAC,KAAK,CAAC,CAAC;gBACrB,UAAU,CAAC,KAAK,CAAC,CAAC;aACrB;QACL,CAAC,EAAE,GAAG,CAAC,CAAC;IACZ,CAAC;IAED,SAAS,iBAAiB;QACtB,OAAO,6BAA6B,MAAM,CAAC,UAAU,GAAG,CAAC,GAAG,GAAG,QAC3D,MAAM,CAAC,WAAW,GAAG,CAAC,GAAG,GAC7B,+FAA+F,CAAC;IACpG,CAAC;IAED,OAAO,CACH,8BAAC,gCAAY,CAAC,QAAQ,IAClB,KAAK,EAAE;YACH,UAAU;YACV,KAAK;YACL,OAAO;SACV,IAEA,QAAQ,CACW,CAC3B,CAAC;AACN,CAAC,CAAC;AAjFW,QAAA,sBAAsB,0BAiFjC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { FC, ReactNode } from "react";
|
|
2
|
-
import { CrossMintModalProps } from "./CrossMintModal";
|
|
3
|
-
export interface CrossMintProviderProps extends CrossMintModalProps {
|
|
4
|
-
clientId: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { CrossMintModalProps } from "./CrossMintModal";
|
|
3
|
+
export interface CrossMintProviderProps extends CrossMintModalProps {
|
|
4
|
+
clientId: string;
|
|
5
|
+
auctionId?: string;
|
|
6
|
+
hideMintOnInactiveClient?: boolean;
|
|
7
|
+
development?: boolean;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const CrossMintProvider: FC<CrossMintProviderProps>;
|
|
@@ -1,52 +1,52 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
-
var t = {};
|
|
23
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
-
t[p] = s[p];
|
|
25
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
-
t[p[i]] = s[p[i]];
|
|
29
|
-
}
|
|
30
|
-
return t;
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.CrossMintProvider = void 0;
|
|
34
|
-
const react_1 = __importStar(require("react"));
|
|
35
|
-
const CrossMintModal_1 = require("./CrossMintModal");
|
|
36
|
-
const CrossMintPopupProvider_1 = require("./CrossMintPopupProvider");
|
|
37
|
-
const CrossMintStatusProvider_1 = require("./CrossMintStatusProvider");
|
|
38
|
-
const useCrossMintModal_1 = require("./useCrossMintModal");
|
|
39
|
-
const CrossMintProvider = (_a) => {
|
|
40
|
-
var { clientId, hideMintOnInactiveClient = false, development = false, children } = _a, props = __rest(_a, ["clientId", "hideMintOnInactiveClient", "development", "children"]);
|
|
41
|
-
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
42
|
-
return (react_1.default.createElement(CrossMintStatusProvider_1.CrossMintStatusProvider, { clientId: clientId, hideMintOnInactiveClient: hideMintOnInactiveClient },
|
|
43
|
-
react_1.default.createElement(useCrossMintModal_1.CrossMintModalContext.Provider, { value: {
|
|
44
|
-
visible,
|
|
45
|
-
setVisible,
|
|
46
|
-
} },
|
|
47
|
-
react_1.default.createElement(CrossMintPopupProvider_1.CrossMintPopupProvider, { development: development },
|
|
48
|
-
children,
|
|
49
|
-
visible && react_1.default.createElement(CrossMintModal_1.CrossMintModal, Object.assign({}, props))))));
|
|
50
|
-
};
|
|
51
|
-
exports.CrossMintProvider = CrossMintProvider;
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
+
t[p] = s[p];
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
+
t[p[i]] = s[p[i]];
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.CrossMintProvider = void 0;
|
|
34
|
+
const react_1 = __importStar(require("react"));
|
|
35
|
+
const CrossMintModal_1 = require("./CrossMintModal");
|
|
36
|
+
const CrossMintPopupProvider_1 = require("./CrossMintPopupProvider");
|
|
37
|
+
const CrossMintStatusProvider_1 = require("./CrossMintStatusProvider");
|
|
38
|
+
const useCrossMintModal_1 = require("./useCrossMintModal");
|
|
39
|
+
const CrossMintProvider = (_a) => {
|
|
40
|
+
var { clientId, auctionId, hideMintOnInactiveClient = false, development = false, children } = _a, props = __rest(_a, ["clientId", "auctionId", "hideMintOnInactiveClient", "development", "children"]);
|
|
41
|
+
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
42
|
+
return (react_1.default.createElement(CrossMintStatusProvider_1.CrossMintStatusProvider, { clientId: clientId, hideMintOnInactiveClient: hideMintOnInactiveClient, auctionId: auctionId },
|
|
43
|
+
react_1.default.createElement(useCrossMintModal_1.CrossMintModalContext.Provider, { value: {
|
|
44
|
+
visible,
|
|
45
|
+
setVisible,
|
|
46
|
+
} },
|
|
47
|
+
react_1.default.createElement(CrossMintPopupProvider_1.CrossMintPopupProvider, { development: development },
|
|
48
|
+
children,
|
|
49
|
+
visible && react_1.default.createElement(CrossMintModal_1.CrossMintModal, Object.assign({}, props))))));
|
|
50
|
+
};
|
|
51
|
+
exports.CrossMintProvider = CrossMintProvider;
|
|
52
52
|
//# sourceMappingURL=CrossMintProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossMintProvider.js","sourceRoot":"","sources":["../../src/CrossMintProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AACvD,qDAAuE;AACvE,qEAAkE;AAClE,uEAAoE;AACpE,2DAA4D;
|
|
1
|
+
{"version":3,"file":"CrossMintProvider.js","sourceRoot":"","sources":["../../src/CrossMintProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AACvD,qDAAuE;AACvE,qEAAkE;AAClE,uEAAoE;AACpE,2DAA4D;AAUrD,MAAM,iBAAiB,GAA+B,CAAC,EAO7D,EAAE,EAAE;QAPyD,EAC1D,QAAQ,EACR,SAAS,EACT,wBAAwB,GAAG,KAAK,EAChC,WAAW,GAAG,KAAK,EACnB,QAAQ,OAEX,EADM,KAAK,cANkD,gFAO7D,CADW;IAER,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACH,8BAAC,iDAAuB,IACpB,QAAQ,EAAE,QAAQ,EAClB,wBAAwB,EAAE,wBAAwB,EAClD,SAAS,EAAE,SAAS;QAEpB,8BAAC,yCAAqB,CAAC,QAAQ,IAC3B,KAAK,EAAE;gBACH,OAAO;gBACP,UAAU;aACb;YAED,8BAAC,+CAAsB,IAAC,WAAW,EAAE,WAAW;gBAC3C,QAAQ;gBACR,OAAO,IAAI,8BAAC,+BAAc,oBAAK,KAAK,EAAI,CACpB,CACI,CACX,CAC7B,CAAC;AACN,CAAC,CAAC;AA7BW,QAAA,iBAAiB,qBA6B5B"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CSSProperties, FC, MouseEvent } from "react";
|
|
2
|
-
export interface StatusButtonProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
style?: CSSProperties;
|
|
7
|
-
tabIndex?: number;
|
|
8
|
-
theme?: "light" | "dark";
|
|
9
|
-
}
|
|
10
|
-
export declare const CrossMintStatusButton: FC<StatusButtonProps>;
|
|
1
|
+
import { CSSProperties, FC, MouseEvent } from "react";
|
|
2
|
+
export interface StatusButtonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
tabIndex?: number;
|
|
8
|
+
theme?: "light" | "dark";
|
|
9
|
+
}
|
|
10
|
+
export declare const CrossMintStatusButton: FC<StatusButtonProps>;
|