@crossmint/client-sdk-react-ui 0.0.8-alpha.2 → 0.1.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.
Files changed (137) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +18 -12
  3. package/lib/cjs/CrossmintPayButton.d.ts +3 -0
  4. package/lib/cjs/CrossmintPayButton.js +87 -0
  5. package/lib/cjs/CrossmintPayButton.js.map +1 -0
  6. package/lib/cjs/CrossmintStatusButton.d.ts +3 -0
  7. package/lib/cjs/CrossmintStatusButton.js +71 -0
  8. package/lib/cjs/CrossmintStatusButton.js.map +1 -0
  9. package/lib/cjs/hooks/useCrossmintModal.d.ts +12 -0
  10. package/lib/cjs/hooks/useCrossmintModal.js +90 -0
  11. package/lib/cjs/hooks/useCrossmintModal.js.map +1 -0
  12. package/lib/cjs/{useCrossMintStatus.d.ts → hooks/useCrossmintStatus.d.ts} +19 -16
  13. package/lib/cjs/hooks/useCrossmintStatus.js +75 -0
  14. package/lib/cjs/hooks/useCrossmintStatus.js.map +1 -0
  15. package/lib/cjs/index.d.ts +2 -7
  16. package/lib/cjs/index.js +14 -19
  17. package/lib/cjs/index.js.map +1 -1
  18. package/lib/cjs/package.json +1 -3
  19. package/lib/cjs/styles/index.d.ts +9 -0
  20. package/lib/cjs/styles/index.js +45 -0
  21. package/lib/cjs/styles/index.js.map +1 -0
  22. package/lib/cjs/types.d.ts +48 -0
  23. package/lib/cjs/types.js +29 -0
  24. package/lib/cjs/types.js.map +1 -0
  25. package/lib/cjs/utils.d.ts +1 -0
  26. package/lib/cjs/utils.js +5 -0
  27. package/lib/cjs/utils.js.map +1 -0
  28. package/lib/cjs/version.d.ts +1 -0
  29. package/lib/cjs/version.js +5 -0
  30. package/lib/cjs/version.js.map +1 -0
  31. package/lib/esm/CrossmintPayButton.d.ts +3 -0
  32. package/lib/esm/CrossmintPayButton.js +49 -0
  33. package/lib/esm/CrossmintPayButton.js.map +1 -0
  34. package/lib/esm/CrossmintStatusButton.d.ts +3 -0
  35. package/lib/esm/CrossmintStatusButton.js +36 -0
  36. package/lib/esm/CrossmintStatusButton.js.map +1 -0
  37. package/lib/esm/hooks/useCrossmintModal.d.ts +12 -0
  38. package/lib/esm/hooks/useCrossmintModal.js +87 -0
  39. package/lib/esm/hooks/useCrossmintModal.js.map +1 -0
  40. package/lib/esm/{useCrossMintStatus.d.ts → hooks/useCrossmintStatus.d.ts} +19 -16
  41. package/lib/esm/hooks/useCrossmintStatus.js +60 -0
  42. package/lib/esm/hooks/useCrossmintStatus.js.map +1 -0
  43. package/lib/esm/index.d.ts +2 -7
  44. package/lib/esm/index.js +2 -7
  45. package/lib/esm/index.js.map +1 -1
  46. package/lib/esm/package.json +1 -3
  47. package/lib/esm/styles/index.d.ts +9 -0
  48. package/lib/esm/styles/index.js +41 -0
  49. package/lib/esm/styles/index.js.map +1 -0
  50. package/lib/esm/types.d.ts +48 -0
  51. package/lib/esm/types.js +26 -0
  52. package/lib/esm/types.js.map +1 -0
  53. package/lib/esm/utils.d.ts +1 -0
  54. package/lib/esm/utils.js +2 -0
  55. package/lib/esm/utils.js.map +1 -0
  56. package/lib/esm/version.d.ts +1 -0
  57. package/lib/esm/version.js +2 -0
  58. package/lib/esm/version.js.map +1 -0
  59. package/package.json +12 -8
  60. package/src/CrossmintPayButton.tsx +108 -0
  61. package/src/CrossmintStatusButton.tsx +77 -0
  62. package/src/hooks/useCrossmintModal.ts +143 -0
  63. package/src/hooks/useCrossmintStatus.ts +85 -0
  64. package/src/index.ts +2 -7
  65. package/src/styles/index.ts +50 -0
  66. package/src/types.ts +56 -0
  67. package/src/utils.ts +1 -0
  68. package/src/version.ts +1 -0
  69. package/lib/cjs/CrossMintButton.d.ts +0 -16
  70. package/lib/cjs/CrossMintButton.js +0 -60
  71. package/lib/cjs/CrossMintButton.js.map +0 -1
  72. package/lib/cjs/CrossMintModal.d.ts +0 -6
  73. package/lib/cjs/CrossMintModal.js +0 -55
  74. package/lib/cjs/CrossMintModal.js.map +0 -1
  75. package/lib/cjs/CrossMintModalProvider.d.ts +0 -6
  76. package/lib/cjs/CrossMintModalProvider.js +0 -48
  77. package/lib/cjs/CrossMintModalProvider.js.map +0 -1
  78. package/lib/cjs/CrossMintPopupProvider.d.ts +0 -6
  79. package/lib/cjs/CrossMintPopupProvider.js +0 -70
  80. package/lib/cjs/CrossMintPopupProvider.js.map +0 -1
  81. package/lib/cjs/CrossMintProvider.d.ts +0 -10
  82. package/lib/cjs/CrossMintProvider.js +0 -52
  83. package/lib/cjs/CrossMintProvider.js.map +0 -1
  84. package/lib/cjs/CrossMintStatusButton.d.ts +0 -10
  85. package/lib/cjs/CrossMintStatusButton.js +0 -66
  86. package/lib/cjs/CrossMintStatusButton.js.map +0 -1
  87. package/lib/cjs/CrossMintStatusProvider.d.ts +0 -8
  88. package/lib/cjs/CrossMintStatusProvider.js +0 -66
  89. package/lib/cjs/CrossMintStatusProvider.js.map +0 -1
  90. package/lib/cjs/useCrossMintModal.d.ts +0 -7
  91. package/lib/cjs/useCrossMintModal.js +0 -10
  92. package/lib/cjs/useCrossMintModal.js.map +0 -1
  93. package/lib/cjs/useCrossMintPopup.d.ts +0 -8
  94. package/lib/cjs/useCrossMintPopup.js +0 -10
  95. package/lib/cjs/useCrossMintPopup.js.map +0 -1
  96. package/lib/cjs/useCrossMintStatus.js +0 -18
  97. package/lib/cjs/useCrossMintStatus.js.map +0 -1
  98. package/lib/esm/CrossMintButton.d.ts +0 -16
  99. package/lib/esm/CrossMintButton.js +0 -25
  100. package/lib/esm/CrossMintButton.js.map +0 -1
  101. package/lib/esm/CrossMintModal.d.ts +0 -6
  102. package/lib/esm/CrossMintModal.js +0 -32
  103. package/lib/esm/CrossMintModal.js.map +0 -1
  104. package/lib/esm/CrossMintModalProvider.d.ts +0 -6
  105. package/lib/esm/CrossMintModalProvider.js +0 -13
  106. package/lib/esm/CrossMintModalProvider.js.map +0 -1
  107. package/lib/esm/CrossMintPopupProvider.d.ts +0 -6
  108. package/lib/esm/CrossMintPopupProvider.js +0 -47
  109. package/lib/esm/CrossMintPopupProvider.js.map +0 -1
  110. package/lib/esm/CrossMintProvider.d.ts +0 -10
  111. package/lib/esm/CrossMintProvider.js +0 -17
  112. package/lib/esm/CrossMintProvider.js.map +0 -1
  113. package/lib/esm/CrossMintStatusButton.d.ts +0 -10
  114. package/lib/esm/CrossMintStatusButton.js +0 -31
  115. package/lib/esm/CrossMintStatusButton.js.map +0 -1
  116. package/lib/esm/CrossMintStatusProvider.d.ts +0 -8
  117. package/lib/esm/CrossMintStatusProvider.js +0 -32
  118. package/lib/esm/CrossMintStatusProvider.js.map +0 -1
  119. package/lib/esm/useCrossMintModal.d.ts +0 -7
  120. package/lib/esm/useCrossMintModal.js +0 -6
  121. package/lib/esm/useCrossMintModal.js.map +0 -1
  122. package/lib/esm/useCrossMintPopup.d.ts +0 -8
  123. package/lib/esm/useCrossMintPopup.js +0 -6
  124. package/lib/esm/useCrossMintPopup.js.map +0 -1
  125. package/lib/esm/useCrossMintStatus.js +0 -14
  126. package/lib/esm/useCrossMintStatus.js.map +0 -1
  127. package/src/CrossMintButton.tsx +0 -75
  128. package/src/CrossMintModal.tsx +0 -54
  129. package/src/CrossMintModalProvider.tsx +0 -23
  130. package/src/CrossMintPopupProvider.tsx +0 -94
  131. package/src/CrossMintProvider.tsx +0 -44
  132. package/src/CrossMintStatusButton.tsx +0 -73
  133. package/src/CrossMintStatusProvider.tsx +0 -58
  134. package/src/useCrossMintModal.tsx +0 -12
  135. package/src/useCrossMintPopup.tsx +0 -21
  136. package/src/useCrossMintStatus.tsx +0 -22
  137. package/styles.css +0 -119
@@ -0,0 +1,143 @@
1
+ import { useState } from "react";
2
+ import { LIB_VERSION } from "../version";
3
+ import { baseUrls, clientNames, PayButtonConfig } from "../types";
4
+
5
+ function createPopupString() {
6
+ return `height=750,width=400,left=${window.innerWidth / 2 - 200},top=${
7
+ window.innerHeight / 2 - 375
8
+ },resizable=yes,scrollbars=yes,toolbar=yes,menubar=true,location=no,directories=no, status=yes`;
9
+ }
10
+
11
+ interface IProps {
12
+ development: boolean;
13
+ clientId: string;
14
+ showOverlay: boolean;
15
+ }
16
+
17
+ interface IReturn {
18
+ connecting: boolean;
19
+ connect: (
20
+ mintConfig: PayButtonConfig,
21
+ collectionTitle?: string,
22
+ collectionDescription?: string,
23
+ collectionPhoto?: string,
24
+ mintTo?: string,
25
+ emailTo?: string,
26
+ listingId?: string
27
+ ) => void;
28
+ }
29
+
30
+ type MintQueryParams = {
31
+ clientId: string;
32
+ closeOnSuccess: string;
33
+ collectionTitle?: string;
34
+ collectionDescription?: string;
35
+ collectionPhoto?: string;
36
+ mintTo?: string;
37
+ emailTo?: string;
38
+ listingId?: string;
39
+ clientName: string;
40
+ clientVersion: string;
41
+ mintConfig: string;
42
+ };
43
+
44
+ const overlayId = "__crossmint-overlay__";
45
+
46
+ const addLoadingOverlay = (): void => {
47
+ const overlayEl = document.createElement("div");
48
+ overlayEl.setAttribute("id", overlayId);
49
+ const overlayStyles = {
50
+ width: "100vw",
51
+ height: "100vh",
52
+ "background-color": "rgba(0, 0, 0, 0.5)",
53
+ position: "fixed",
54
+ "z-index": "99999999",
55
+ top: "0",
56
+ left: "0",
57
+ };
58
+ Object.assign(overlayEl.style, overlayStyles);
59
+ document.body.appendChild(overlayEl);
60
+ };
61
+
62
+ const removeLoadingOverlay = (): void => {
63
+ const overlayEl = document.getElementById(overlayId);
64
+ if (overlayEl) overlayEl.remove();
65
+ };
66
+
67
+ export default function useCrossMintModal({ development, clientId, showOverlay }: IProps): IReturn {
68
+ const [connecting, setConnecting] = useState(false);
69
+
70
+ const createPopup = (
71
+ mintConfig: PayButtonConfig,
72
+ collectionTitle?: string,
73
+ collectionDescription?: string,
74
+ collectionPhoto?: string,
75
+ mintTo?: string,
76
+ emailTo?: string,
77
+ listingId?: string
78
+ ) => {
79
+ const urlOrigin = development ? baseUrls.dev : baseUrls.prod;
80
+ const getMintQueryParams = (): string => {
81
+ const mintQueryParams: MintQueryParams = {
82
+ clientId: encodeURIComponent(clientId),
83
+ closeOnSuccess: "false",
84
+ clientName: clientNames.reactUi,
85
+ clientVersion: LIB_VERSION,
86
+ mintConfig: encodeURIComponent(JSON.stringify(mintConfig)),
87
+ };
88
+
89
+ if (collectionTitle) mintQueryParams.collectionTitle = encodeURIComponent(collectionTitle);
90
+ if (collectionDescription)
91
+ mintQueryParams.collectionDescription = encodeURIComponent(collectionDescription);
92
+ if (collectionPhoto) mintQueryParams.collectionPhoto = encodeURIComponent(collectionPhoto);
93
+ if (mintTo) mintQueryParams.mintTo = encodeURIComponent(mintTo);
94
+ if (emailTo) mintQueryParams.emailTo = encodeURIComponent(emailTo);
95
+ if (listingId) mintQueryParams.listingId = encodeURIComponent(listingId);
96
+
97
+ return new URLSearchParams(mintQueryParams).toString();
98
+ };
99
+ const callbackUrl = encodeURIComponent(`${urlOrigin}/checkout/mint?${getMintQueryParams()}`);
100
+ const url = `${urlOrigin}/signin?callbackUrl=${callbackUrl}`;
101
+
102
+ const pop = window.open(url, "popUpWindow", createPopupString());
103
+ if (pop) {
104
+ registerListeners(pop);
105
+ if (showOverlay) {
106
+ addLoadingOverlay();
107
+ }
108
+ } else {
109
+ setConnecting(false);
110
+ console.error("Failed to open popup window");
111
+ }
112
+ };
113
+
114
+ const connect = (
115
+ mintConfig: PayButtonConfig,
116
+ collectionTitle?: string,
117
+ collectionDescription?: string,
118
+ collectionPhoto?: string,
119
+ mintTo?: string,
120
+ emailTo?: string,
121
+ listingId?: string
122
+ ) => {
123
+ if (connecting) return;
124
+
125
+ setConnecting(true);
126
+
127
+ createPopup(mintConfig, collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId);
128
+ };
129
+
130
+ function registerListeners(pop: Window) {
131
+ const timer = setInterval(function () {
132
+ if (pop.closed) {
133
+ clearInterval(timer);
134
+ setConnecting(false);
135
+ if (showOverlay) {
136
+ removeLoadingOverlay();
137
+ }
138
+ }
139
+ }, 500);
140
+ }
141
+
142
+ return { connecting, connect };
143
+ }
@@ -0,0 +1,85 @@
1
+ import { useState, useEffect } from "react";
2
+ import { validate } from "uuid";
3
+ import { LIB_VERSION } from "../version";
4
+ import { clientNames, baseUrls, customHeaders } from "../types";
5
+
6
+ export enum OnboardingRequestStatusResponse {
7
+ WAITING_SUBMISSION = "waiting-submission",
8
+ PENDING = "pending",
9
+ REJECTED = "rejected",
10
+ ACCEPTED = "accepted",
11
+ INVALID = "invalid",
12
+ }
13
+
14
+ export interface CrossMintStatusContextState {
15
+ status: OnboardingRequestStatusResponse;
16
+ clientId: string;
17
+ auctionId?: string;
18
+ hideMintOnInactiveClient: boolean;
19
+ }
20
+
21
+ interface IProps {
22
+ clientId: string;
23
+ development: boolean;
24
+ }
25
+
26
+ const validateClientId = (clientId: string): boolean => {
27
+ try {
28
+ const isValid = validate(clientId);
29
+ return !!isValid;
30
+ } catch (e) {
31
+ console.error(e);
32
+ return false;
33
+ }
34
+ };
35
+
36
+ export default function useCrossMintStatus({ clientId, development }: IProps) {
37
+ const [status, setStatus] = useState<OnboardingRequestStatusResponse>(
38
+ OnboardingRequestStatusResponse.WAITING_SUBMISSION
39
+ );
40
+
41
+ async function fetchClientIntegration() {
42
+ if (!clientId || clientId === "" || clientId === "<YOUR_CLIENT_ID>") {
43
+ console.error("You must enter your own Crossmint client ID in <CrossmintPayButton clientId=XXX>");
44
+ return;
45
+ }
46
+
47
+ if (!validateClientId(clientId)) {
48
+ console.error(
49
+ "The clientId passed to is invalid. Make sure to pass the clientId obtained from the crossmint team, with format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX"
50
+ );
51
+ return;
52
+ }
53
+
54
+ const baseUrl = development ? baseUrls.dev : baseUrls.prod;
55
+
56
+ const res = await fetch(`${baseUrl}/api/crossmint/onboardingRequests/${clientId}/status`, {
57
+ headers: {
58
+ [customHeaders.clientVersion]: LIB_VERSION,
59
+ [customHeaders.clientName]: clientNames.reactUi,
60
+ },
61
+ });
62
+
63
+ if (res.status === 200) {
64
+ const resData: { clientId: string; status: OnboardingRequestStatusResponse } = await res.json();
65
+
66
+ setStatus(resData.status);
67
+ } else {
68
+ if (status !== OnboardingRequestStatusResponse.INVALID) {
69
+ setStatus(OnboardingRequestStatusResponse.INVALID);
70
+ }
71
+ }
72
+ }
73
+
74
+ useEffect(() => {
75
+ fetchClientIntegration();
76
+
77
+ const interval = setInterval(() => {
78
+ fetchClientIntegration();
79
+ }, 60 * 1000);
80
+
81
+ return () => clearInterval(interval);
82
+ }, []);
83
+
84
+ return status;
85
+ }
package/src/index.ts CHANGED
@@ -1,7 +1,2 @@
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";
1
+ export * from "./CrossmintPayButton";
2
+ export * from "./CrossmintStatusButton";
@@ -0,0 +1,50 @@
1
+ import { createUseStyles } from "react-jss";
2
+
3
+ const DARK_BG = "#1e1e1e";
4
+
5
+ interface CustomStylingProps {
6
+ buttonBgColor?: string;
7
+ paragraphColor?: string;
8
+ }
9
+
10
+ const themeIsLight = (theme: string) => theme === "light";
11
+ export const formatProps = (theme: string): CustomStylingProps => ({
12
+ buttonBgColor: themeIsLight(theme) ? "white" : DARK_BG,
13
+ paragraphColor: themeIsLight(theme) ? "black" : "white",
14
+ });
15
+
16
+ export const useStyles = createUseStyles({
17
+ "@global": {
18
+ "@import":
19
+ "url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap')",
20
+ },
21
+ crossmintButton: {
22
+ display: "flex",
23
+ "flex-direction": "row",
24
+ "align-items": "center",
25
+ padding: "0.875rem 0.875rem",
26
+ "font-weight": "900",
27
+ transition: "opacity ease-in-out 0.25s",
28
+ "border-radius": "0.5rem",
29
+ "font-family": `"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif`,
30
+ outline: "none",
31
+ border: "none",
32
+ "box-shadow": "0px 8px 15px rgba(0, 0, 0, 0.1)",
33
+ "justify-content": "center",
34
+ background: ({ buttonBgColor }: CustomStylingProps) => buttonBgColor,
35
+
36
+ "&:hover:enabled": {
37
+ opacity: "0.6",
38
+ cursor: "pointer",
39
+ },
40
+ },
41
+ crossmintImg: {
42
+ width: "21px",
43
+ height: "21px",
44
+ "margin-right": "0.875rem",
45
+ },
46
+ crossmintParagraph: {
47
+ color: ({ paragraphColor }: CustomStylingProps) => paragraphColor,
48
+ margin: "0",
49
+ },
50
+ });
package/src/types.ts ADDED
@@ -0,0 +1,56 @@
1
+ import { CSSProperties, MouseEvent } from "react";
2
+
3
+ export enum clientNames {
4
+ reactUi = "client-sdk-react-ui",
5
+ }
6
+
7
+ export enum baseUrls {
8
+ prod = "https://www.crossmint.io",
9
+ dev = "http://localhost:3001",
10
+ }
11
+
12
+ export enum customHeaders {
13
+ clientVersion = "X-Client-Version",
14
+ clientName = "X-Client-Name",
15
+ }
16
+
17
+ enum theme {
18
+ light = "light",
19
+ dark = "dark",
20
+ }
21
+
22
+ export enum mintingContractTypes {
23
+ CANDY_MACHINE = "candy-machine",
24
+ SOLANA_AUCTION = "solana-auction",
25
+ ERC_721 = "erc-721",
26
+ }
27
+
28
+ export interface PayButtonConfig {
29
+ type: string;
30
+
31
+ [propName: string]: any;
32
+ }
33
+
34
+ export interface BaseButtonProps {
35
+ className?: string;
36
+ disabled?: boolean;
37
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
38
+ style?: CSSProperties;
39
+ tabIndex?: number;
40
+ clientId: string;
41
+ auctionId?: string;
42
+ theme?: theme;
43
+ development?: boolean;
44
+ }
45
+
46
+ export interface CrossmintPayButtonProps extends BaseButtonProps {
47
+ collectionTitle?: string;
48
+ collectionDescription?: string;
49
+ collectionPhoto?: string;
50
+ mintTo?: string;
51
+ emailTo?: string;
52
+ listingId?: string;
53
+ showOverlay?: boolean;
54
+ hideMintOnInactiveClient?: boolean;
55
+ mintConfig?: PayButtonConfig;
56
+ }
package/src/utils.ts ADDED
@@ -0,0 +1 @@
1
+ export const isClientSide = typeof window !== "undefined";
package/src/version.ts ADDED
@@ -0,0 +1 @@
1
+ export const LIB_VERSION = "0.1.0";
@@ -1,16 +0,0 @@
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,60 +0,0 @@
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.CrossMintButton = void 0;
34
- const react_1 = __importStar(require("react"));
35
- const _1 = require(".");
36
- const useCrossMintPopup_1 = require("./useCrossMintPopup");
37
- const CrossMintButton = (_a) => {
38
- var { className, disabled, onClick, style, tabIndex, theme = "dark", collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId } = _a, props = __rest(_a, ["className", "disabled", "onClick", "style", "tabIndex", "theme", "collectionTitle", "collectionDescription", "collectionPhoto", "mintTo", "emailTo", "listingId"]);
39
- const { hideMintOnInactiveClient, status } = (0, _1.useCrossMintStatus)();
40
- const { connecting, connect } = (0, useCrossMintPopup_1.useCrossMintPopup)();
41
- const handleClick = (0, react_1.useCallback)((event) => {
42
- if (onClick)
43
- onClick(event);
44
- if (!event.defaultPrevented)
45
- connect(collectionTitle, collectionDescription, collectionPhoto, mintTo, emailTo, listingId);
46
- }, [onClick]);
47
- const content = (0, react_1.useMemo)(() => {
48
- if (connecting)
49
- return react_1.default.createElement("p", null, "Connecting ...");
50
- return react_1.default.createElement("p", null, "Buy with credit card");
51
- }, [connecting]);
52
- if (hideMintOnInactiveClient && status !== _1.OnboardingRequestStatusResponse.ACCEPTED) {
53
- return null;
54
- }
55
- return (react_1.default.createElement("button", Object.assign({ className: `client-sdk-button-trigger client-sdk-button-trigger-${theme}`, disabled: disabled, onClick: handleClick, style: Object.assign({}, style), tabIndex: tabIndex }, props),
56
- react_1.default.createElement("img", { className: "client-sdk-button-icon", src: "https://www.crossmint.io/assets/crossmint/logo.png", alt: "Crossmint logo" }),
57
- content));
58
- };
59
- exports.CrossMintButton = CrossMintButton;
60
- //# sourceMappingURL=CrossMintButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CrossMintButton.js","sour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K,GACjB,QAAQ,EAAE,QAAQ,IACd,KAAK;QAET,uCACI,SAAS,EAAC,wBAAwB,EAClC,GAAG,EAAC,oDAAoD,EACxD,GAAG,EAAC,gBAAgB,GACtB;QACD,OAAO,CACH,CACZ,CAAC;AACN,CAAC,CAAC;AAvDW,QAAA,eAAe,mBAuD1B"}
@@ -1,6 +0,0 @@
1
- import { FC } from "react";
2
- export interface CrossMintModalProps {
3
- className?: string;
4
- container?: string;
5
- }
6
- export declare const CrossMintModal: FC<CrossMintModalProps>;
@@ -1,55 +0,0 @@
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
- //# sourceMappingURL=CrossMintModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CrossMintModal.js","sourceRoot":"","sources":["../../src/CrossMintModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkF;AAClF,yCAAyC;AACzC,2DAAwD;AAOjD,MAAM,cAAc,GAA4B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,GAAG,MAAM,EAAE,EAAE,EAAE;IAC9F,MAAM,GAAG,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IACzC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,qCAAiB,GAAE,CAAC;IAE3C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAiB,IAAI,CAAC,CAAC;IAE3D,MAAM,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CAAC;AA5CW,QAAA,cAAc,kBA4CzB"}
@@ -1,6 +0,0 @@
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 +0,0 @@
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
- //# sourceMappingURL=CrossMintModalProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CrossMintModalProvider.js","sourceRoot":"","sources":["../../src/CrossMintModalProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AACvD,qDAAuE;AACvE,2DAA4D;AAMrD,MAAM,sBAAsB,GAAoC,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,cAApB,YAAsB,CAAF;IACxF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACH,8BAAC,yCAAqB,CAAC,QAAQ,IAC3B,KAAK,EAAE;YACH,OAAO;YACP,UAAU;SACb;QAEA,QAAQ;QACR,OAAO,IAAI,8BAAC,+BAAc,oBAAK,KAAK,EAAI,CACZ,CACpC,CAAC;AACN,CAAC,CAAC;AAdW,QAAA,sBAAsB,0BAcjC"}
@@ -1,6 +0,0 @@
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 +0,0 @@
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=${clientId}&closeOnSuccess=false${collectionTitle ? `collectionTitle=${collectionTitle}` : ""}${collectionDescription ? `&collectionDescription=${collectionDescription}` : ""}${collectionPhoto ? `&collectionPhoto=${collectionPhoto}` : ""}${mintTo ? `&mintTo=${mintTo}` : ""}${emailTo ? `&emailTo=${emailTo}` : ""}${listingId ? `&listingId=${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
- //# sourceMappingURL=CrossMintPopupProvider.js.map
@@ -1 +0,0 @@
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,E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AAC,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,10 +0,0 @@
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>;