@mezo-org/passport 0.16.0-dev.3 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/assets/DefaultAvatar.d.ts +5 -0
- package/dist/src/assets/DefaultAvatar.d.ts.map +1 -0
- package/dist/src/assets/DefaultAvatar.js +21 -0
- package/dist/src/assets/DefaultAvatar.js.map +1 -0
- package/dist/src/assets/EditIcon.d.ts +5 -0
- package/dist/src/assets/EditIcon.d.ts.map +1 -0
- package/dist/src/assets/EditIcon.js +10 -0
- package/dist/src/assets/EditIcon.js.map +1 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.d.ts +8 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.d.ts.map +1 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.js +39 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.js.map +1 -0
- package/dist/src/components/Dropdown/Content.d.ts +8 -0
- package/dist/src/components/Dropdown/Content.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Content.js +29 -0
- package/dist/src/components/Dropdown/Content.js.map +1 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.d.ts +7 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.d.ts.map +1 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.js +13 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.js.map +1 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts +23 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Dropdown.js +45 -0
- package/dist/src/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/src/components/Dropdown/ListingItem.d.ts +14 -0
- package/dist/src/components/Dropdown/ListingItem.d.ts.map +1 -0
- package/dist/src/components/Dropdown/ListingItem.js +42 -0
- package/dist/src/components/Dropdown/ListingItem.js.map +1 -0
- package/dist/src/components/Dropdown/NestedViewLayout.d.ts +8 -0
- package/dist/src/components/Dropdown/NestedViewLayout.d.ts.map +1 -0
- package/dist/src/components/Dropdown/NestedViewLayout.js +33 -0
- package/dist/src/components/Dropdown/NestedViewLayout.js.map +1 -0
- package/dist/src/components/Dropdown/Receive/Receive.d.ts +4 -0
- package/dist/src/components/Dropdown/Receive/Receive.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Receive/Receive.js +64 -0
- package/dist/src/components/Dropdown/Receive/Receive.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.d.ts +4 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.js +49 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.d.ts +6 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.js +32 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.d.ts +6 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.js +28 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountError.d.ts +8 -0
- package/dist/src/components/Dropdown/Root/AccountError.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountError.js +17 -0
- package/dist/src/components/Dropdown/Root/AccountError.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.d.ts +4 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.js +21 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.d.ts +8 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.js +43 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.js.map +1 -0
- package/dist/src/components/Dropdown/Root/Root.d.ts +8 -0
- package/dist/src/components/Dropdown/Root/Root.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/Root.js +49 -0
- package/dist/src/components/Dropdown/Root/Root.js.map +1 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.d.ts +4 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.js +66 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.js.map +1 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.d.ts +6 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.js +88 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.js.map +1 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.d.ts +12 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.js +95 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.js.map +1 -0
- package/dist/src/components/Dropdown/Settings/Settings.d.ts +4 -0
- package/dist/src/components/Dropdown/Settings/Settings.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Settings/Settings.js +36 -0
- package/dist/src/components/Dropdown/Settings/Settings.js.map +1 -0
- package/dist/src/components/Dropdown/SlotNumber.d.ts +19 -0
- package/dist/src/components/Dropdown/SlotNumber.d.ts.map +1 -0
- package/dist/src/components/Dropdown/SlotNumber.js +67 -0
- package/dist/src/components/Dropdown/SlotNumber.js.map +1 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.d.ts +3 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.d.ts.map +1 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.js +14 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.js.map +1 -0
- package/dist/src/components/Dropdown/index.d.ts +3 -0
- package/dist/src/components/Dropdown/index.d.ts.map +1 -0
- package/dist/src/components/Dropdown/index.js +2 -0
- package/dist/src/components/Dropdown/index.js.map +1 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/index.js +2 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/hooks/useAuthenticateWithWallet.d.ts +11 -11
- package/dist/src/hooks/useSignInWithWallet.d.ts +11 -11
- package/dist/src/hooks/useSignUpWithWallet.d.ts +11 -11
- package/dist/src/hooks/useWalletAccount.d.ts.map +1 -1
- package/dist/src/hooks/useWalletAccount.js +2 -5
- package/dist/src/hooks/useWalletAccount.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -1
- package/src/assets/DefaultAvatar.tsx +74 -0
- package/src/assets/EditIcon.tsx +33 -0
- package/src/components/Dropdown/ConnectedTrigger.tsx +76 -0
- package/src/components/Dropdown/Content.tsx +56 -0
- package/src/components/Dropdown/DisconnectedTrigger.tsx +36 -0
- package/src/components/Dropdown/Dropdown.tsx +100 -0
- package/src/components/Dropdown/ListingItem.tsx +176 -0
- package/src/components/Dropdown/NestedViewLayout.tsx +88 -0
- package/src/components/Dropdown/README.md +41 -0
- package/src/components/Dropdown/Receive/Receive.tsx +144 -0
- package/src/components/Dropdown/Root/AccountAddressActions.tsx +99 -0
- package/src/components/Dropdown/Root/AccountBalance.tsx +69 -0
- package/src/components/Dropdown/Root/AccountBtcListing.tsx +53 -0
- package/src/components/Dropdown/Root/AccountError.tsx +34 -0
- package/src/components/Dropdown/Root/AccountMusdListing.tsx +45 -0
- package/src/components/Dropdown/Root/AccountOtherAssets.tsx +85 -0
- package/src/components/Dropdown/Root/Root.tsx +104 -0
- package/src/components/Dropdown/Root/WalletAddress.tsx +123 -0
- package/src/components/Dropdown/Root/WelcomeBlock.tsx +173 -0
- package/src/components/Dropdown/Settings/InlineEditField.tsx +214 -0
- package/src/components/Dropdown/Settings/Settings.tsx +87 -0
- package/src/components/Dropdown/SlotNumber.tsx +131 -0
- package/src/components/Dropdown/TestnetTopBanner.tsx +32 -0
- package/src/components/Dropdown/index.ts +2 -0
- package/src/components/index.ts +1 -0
- package/src/hooks/useWalletAccount.ts +1 -6
- package/src/index.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/Settings/Settings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAM1C,iBAAS,QAAQ,sBA6EhB;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Block, ParagraphSmall, Link, useStyletron } from "@mezo-org/mezo-clay";
|
|
2
|
+
import React, { useCallback } from "react";
|
|
3
|
+
import NestedViewLayout from "../NestedViewLayout";
|
|
4
|
+
import InlineEditField from "./InlineEditField";
|
|
5
|
+
import { useGetCurrentAccount, useUpdateUserProfile } from "../../../hooks";
|
|
6
|
+
import { validateEmail, validateTelegram } from "../../../utils/validation";
|
|
7
|
+
function Settings() {
|
|
8
|
+
const [, theme] = useStyletron();
|
|
9
|
+
const { data: account, isPending: isCurrentAccountPending } = useGetCurrentAccount();
|
|
10
|
+
const { updateProfileAsync } = useUpdateUserProfile();
|
|
11
|
+
const handleSaveEmail = useCallback(async (value) => {
|
|
12
|
+
await updateProfileAsync({ email: value || "" });
|
|
13
|
+
}, [updateProfileAsync]);
|
|
14
|
+
const handleSaveTelegram = useCallback(async (value) => {
|
|
15
|
+
const handle = value.startsWith("@") ? value.slice(1) : value;
|
|
16
|
+
await updateProfileAsync({ telegram: handle || "" });
|
|
17
|
+
}, [updateProfileAsync]);
|
|
18
|
+
return (React.createElement(NestedViewLayout, null,
|
|
19
|
+
React.createElement(ParagraphSmall, { marginTop: 0, marginBottom: theme.sizing.scale800, color: theme.colors.contentSecondary }, "Update your contact information to stay connected."),
|
|
20
|
+
React.createElement(Block, { display: "flex", flexDirection: "column", overrides: {
|
|
21
|
+
Block: {
|
|
22
|
+
style: {
|
|
23
|
+
gap: theme.sizing.scale600,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
} },
|
|
27
|
+
React.createElement(InlineEditField, { label: "Email", value: account?.email || "", placeholder: "Enter your email", onSave: handleSaveEmail, validate: validateEmail, isLoading: isCurrentAccountPending }),
|
|
28
|
+
React.createElement(InlineEditField, { label: "Telegram", value: account?.telegram || "", placeholder: "Enter your Telegram handle", onSave: handleSaveTelegram, validate: validateTelegram, isLoading: isCurrentAccountPending })),
|
|
29
|
+
React.createElement(ParagraphSmall, { marginTop: theme.sizing.scale800, marginBottom: 0, color: theme.colors.contentTertiary },
|
|
30
|
+
"By providing your contact information, you agree to receive service notifications and occasional promotional messages. Promotional messages will always include an opt out link. The Privacy Policy is available",
|
|
31
|
+
" ",
|
|
32
|
+
React.createElement(Link, { href: "https://mezo.org/privacy", target: "_blank" }, "here"),
|
|
33
|
+
".")));
|
|
34
|
+
}
|
|
35
|
+
export default Settings;
|
|
36
|
+
//# sourceMappingURL=Settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../../../../src/components/Dropdown/Settings/Settings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC/E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,gBAAgB,MAAM,qBAAqB,CAAA;AAClD,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC3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AAK,EAAC,OAAO,EACb,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,EAC3B,WAAW,EAAC,kBAAkB,EAC9B,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,uBAAuB,GAClC;YAEF,oBAAC,eAAe,IACd,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAC9B,WAAW,EAAC,4BAA4B,EACxC,MAAM,EAAE,kBAAkB,EAC1B,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,EAAE,uBAAuB,GAClC,CACI;QAER,oBAAC,cAAc,IACb,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAChC,YAAY,EAAE,CAAC,EACf,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;;YAIkC,GAAG;YACxE,oBAAC,IAAI,IAAC,IAAI,EAAC,0BAA0B,EAAC,MAAM,EAAC,QAAQ,WAE9C;gBAEQ,CACA,CACpB,CAAA;AACH,CAAC;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type SlotNumberProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: number;
|
|
5
|
+
formatFunction?: (value: number) => string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* SlotNumber component displays a number with animated digits.
|
|
9
|
+
*
|
|
10
|
+
* @typedef {object} SlotNumberProps
|
|
11
|
+
* @property {number} children - The number to display.
|
|
12
|
+
* @property {function} [formatFunction] - Optional function to format the number.
|
|
13
|
+
* @property {BlockProps} [restProps] - Additional properties for the Block component.
|
|
14
|
+
* @see https://pyszkowski.dev/writings/slot-number
|
|
15
|
+
* @returns {JSX.Element} The rendered SlotNumber component.
|
|
16
|
+
*/
|
|
17
|
+
declare function SlotNumber(props: SlotNumberProps): React.JSX.Element;
|
|
18
|
+
export default SlotNumber;
|
|
19
|
+
//# sourceMappingURL=SlotNumber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlotNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/SlotNumber.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAItC,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAC3C,CAAA;AAoED;;;;;;;;;GASG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,qBAyCzC;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable react/no-array-index-key */
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
4
|
+
import { Block, useStyletron } from "@mezo-org/mezo-clay";
|
|
5
|
+
function SlotNumberDigit(props) {
|
|
6
|
+
const { children: value, ...restProps } = props;
|
|
7
|
+
const [css] = useStyletron();
|
|
8
|
+
const digits = [...Array(10).keys()];
|
|
9
|
+
return (React.createElement(AnimatePresence, { initial: false },
|
|
10
|
+
React.createElement(motion.div, { initial: {
|
|
11
|
+
y: "100%",
|
|
12
|
+
}, animate: {
|
|
13
|
+
y: "0%",
|
|
14
|
+
}, layout: "position", className: css({
|
|
15
|
+
position: "relative",
|
|
16
|
+
}), ...restProps },
|
|
17
|
+
React.createElement(Block, { overrides: {
|
|
18
|
+
Block: {
|
|
19
|
+
style: {
|
|
20
|
+
visibility: "hidden",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
} }, value),
|
|
24
|
+
React.createElement(motion.div, { className: css({
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexDirection: "column",
|
|
27
|
+
position: "absolute",
|
|
28
|
+
inset: 0,
|
|
29
|
+
height: "fit-content",
|
|
30
|
+
}), initial: false, animate: { y: `${(value / 10) * -100}%` }, transition: {
|
|
31
|
+
type: "spring",
|
|
32
|
+
damping: 16,
|
|
33
|
+
stiffness: 220,
|
|
34
|
+
} }, digits.map((digit) => (React.createElement(Block, { as: "span", key: digit }, digit)))))));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* SlotNumber component displays a number with animated digits.
|
|
38
|
+
*
|
|
39
|
+
* @typedef {object} SlotNumberProps
|
|
40
|
+
* @property {number} children - The number to display.
|
|
41
|
+
* @property {function} [formatFunction] - Optional function to format the number.
|
|
42
|
+
* @property {BlockProps} [restProps] - Additional properties for the Block component.
|
|
43
|
+
* @see https://pyszkowski.dev/writings/slot-number
|
|
44
|
+
* @returns {JSX.Element} The rendered SlotNumber component.
|
|
45
|
+
*/
|
|
46
|
+
function SlotNumber(props) {
|
|
47
|
+
const { children: value, formatFunction, ...restProps } = props;
|
|
48
|
+
const [css] = useStyletron();
|
|
49
|
+
const characters = useMemo(() => {
|
|
50
|
+
const formattedValue = formatFunction
|
|
51
|
+
? formatFunction(value)
|
|
52
|
+
: value.toString();
|
|
53
|
+
return formattedValue
|
|
54
|
+
.split("")
|
|
55
|
+
.map((character) => (/^[0-9]$/.test(character) ? +character : character))
|
|
56
|
+
.reverse();
|
|
57
|
+
}, [formatFunction, value]);
|
|
58
|
+
return (React.createElement(motion.div, { layout: true, className: css({
|
|
59
|
+
display: "inline-flex",
|
|
60
|
+
flexDirection: "row-reverse",
|
|
61
|
+
justifyContent: "flex-end",
|
|
62
|
+
overflow: "hidden",
|
|
63
|
+
userSelect: "none",
|
|
64
|
+
}), ...restProps }, characters.map((character, index) => typeof character === "number" ? (React.createElement(SlotNumberDigit, { key: `slot-number-character-${index}` }, character)) : (React.createElement(motion.span, { layout: true, key: `slot-number-character-${index}` }, character)))));
|
|
65
|
+
}
|
|
66
|
+
export default SlotNumber;
|
|
67
|
+
//# sourceMappingURL=SlotNumber.js.map
|
|
@@ -0,0 +1 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AAS,IAEZ,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CACnC,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC9B,oBAAC,eAAe,IAAC,GAAG,EAAE,yBAAyB,KAAK,EAAE,IACnD,SAAS,CACM,CACnB,CAAC,CAAC,CAAC,CACF,oBAAC,MAAM,CAAC,IAAI,IAAC,MAAM,QAAC,GAAG,EAAE,yBAAyB,KAAK,EAAE,IACtD,SAAS,CACE,CACf,CACF,CACU,CACd,CAAA;AACH,CAAC;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestnetTopBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/TestnetTopBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,MAAM,CAAC,OAAO,UAAU,gBAAgB,6BAsBvC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Block, InfoCircle, LabelSmall, useStyletron, } from "@mezo-org/mezo-clay";
|
|
3
|
+
import { usePassportContext } from "../../hooks/usePassportContext";
|
|
4
|
+
export default function TestnetTopBanner() {
|
|
5
|
+
const [, theme] = useStyletron();
|
|
6
|
+
const { environment } = usePassportContext();
|
|
7
|
+
if (environment !== "testnet") {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return (React.createElement(Block, { display: "flex", alignItems: "center", padding: `${theme.sizing.scale700} ${theme.sizing.scale600}`, backgroundColor: theme.colors.warning },
|
|
11
|
+
React.createElement(InfoCircle, { size: theme.sizing.scale550 }),
|
|
12
|
+
React.createElement(LabelSmall, { marginLeft: theme.sizing.scale500 }, "You are using testnet funds.")));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=TestnetTopBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestnetTopBanner.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/TestnetTopBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,KAAK,EACL,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAEnE,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,YAAY,EAAE,CAAA;IAEhC,MAAM,EAAE,WAAW,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAE5C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CACL,oBAAC,KAAK,IACJ,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,QAAQ,EACnB,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,EAC5D,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;QAErC,oBAAC,UAAU,IAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAI;QAC3C,oBAAC,UAAU,IAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,mCAEhC,CACP,CACT,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAA"}
|
|
@@ -15,11 +15,11 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
18
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
19
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void;
|
|
22
|
+
variables: number | void | undefined;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
35
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
36
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void;
|
|
40
|
+
variables: number | void | undefined;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
52
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
53
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void;
|
|
57
|
+
variables: number | void | undefined;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
69
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
70
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useAuthenticateWithWallet };
|
|
73
73
|
//# sourceMappingURL=useAuthenticateWithWallet.d.ts.map
|
|
@@ -15,11 +15,11 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
18
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
19
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void;
|
|
22
|
+
variables: number | void | undefined;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
35
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
36
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void;
|
|
40
|
+
variables: number | void | undefined;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
52
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
53
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void;
|
|
57
|
+
variables: number | void | undefined;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
69
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
70
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useSignInWithWallet };
|
|
73
73
|
//# sourceMappingURL=useSignInWithWallet.d.ts.map
|
|
@@ -15,11 +15,11 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
18
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
19
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void;
|
|
22
|
+
variables: number | void | undefined;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
35
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
36
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void;
|
|
40
|
+
variables: number | void | undefined;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
52
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
53
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void;
|
|
57
|
+
variables: number | void | undefined;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
69
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
70
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useSignUpWithWallet };
|
|
73
73
|
//# sourceMappingURL=useSignUpWithWallet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWalletAccount.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAc,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAExD,KAAK,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAAG;IACpE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,SAAS,GAAG,KAAK,CAAA;CACjC,CAAA;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useWalletAccount.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAc,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAExD,KAAK,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAAG;IACpE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,SAAS,GAAG,KAAK,CAAA;CACjC,CAAA;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CA6CzD"}
|
|
@@ -2,9 +2,9 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useAccount } from "wagmi";
|
|
4
4
|
export function useWalletAccount() {
|
|
5
|
-
const { address: evmAddress, connector, chainId, isConnected,
|
|
5
|
+
const { address: evmAddress, connector, chainId, isConnected, ...rest } = useAccount();
|
|
6
6
|
const networkFamily = useMemo(() => (connector?.type !== "orangekit" ? "evm" : "bitcoin"), [connector]);
|
|
7
|
-
const { data: btcData
|
|
7
|
+
const { data: btcData } = useQuery({
|
|
8
8
|
queryKey: [connector?.id],
|
|
9
9
|
queryFn: async () => {
|
|
10
10
|
const bitcoinProvider = connector.getBitcoinProvider();
|
|
@@ -23,9 +23,6 @@ export function useWalletAccount() {
|
|
|
23
23
|
walletAddress: btcAddress ?? evmAddress,
|
|
24
24
|
isConnected: isConnected &&
|
|
25
25
|
(networkFamily === "bitcoin" ? !!btcAddress : !!evmAddress),
|
|
26
|
-
isConnecting: networkFamily === "bitcoin"
|
|
27
|
-
? isConnecting && isPendingBtcData
|
|
28
|
-
: isConnecting,
|
|
29
26
|
networkFamily,
|
|
30
27
|
connector,
|
|
31
28
|
chainId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWalletAccount.js","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAwB,MAAM,OAAO,CAAA;AAQxD,MAAM,UAAU,gBAAgB;IAC9B,MAAM,EACJ,OAAO,EAAE,UAAU,EACnB,SAAS,EACT,OAAO,EACP,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"useWalletAccount.js","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAwB,MAAM,OAAO,CAAA;AAQxD,MAAM,UAAU,gBAAgB;IAC9B,MAAM,EACJ,OAAO,EAAE,UAAU,EACnB,SAAS,EACT,OAAO,EACP,WAAW,EACX,GAAG,IAAI,EACR,GAAG,UAAU,EAAE,CAAA;IAEhB,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,EAC3D,CAAC,SAAS,CAAC,CACZ,CAAA;IAED,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC;QACjC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,eAAe,GACnB,SACD,CAAC,kBAAkB,EAAE,CAAA;YAEtB,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,UAAU,EAAE,CAAA;YAClD,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,UAAU,EAAE,CAAA;YAElD,OAAO;gBACL,OAAO;gBACP,OAAO;aACR,CAAA;QACH,CAAC;QACD,OAAO,EAAE,aAAa,KAAK,SAAS,IAAI,CAAC,CAAC,SAAS;KACpD,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;IAE7C,OAAO;QACL,cAAc,EAAE,UAAU;QAC1B,aAAa,EAAE,UAAU,IAAI,UAAU;QACvC,WAAW,EACT,WAAW;YACX,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QAC7D,aAAa;QACb,SAAS;QACT,OAAO;QACP,GAAG,IAAI;KACR,CAAA;AACH,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./components";
|
|
1
2
|
export { unisatWalletMezoMainnet, unisatWalletMezoTestnet, okxWalletMezoMainnet, okxWalletMezoTestnet, xverseWalletMezoMainnet, xverseWalletMezoTestnet, getDefaultWallets, getConfig, } from "./config";
|
|
2
3
|
export * from "./constants";
|
|
3
4
|
export * from "./hooks";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./components";
|
|
1
2
|
export { unisatWalletMezoMainnet, unisatWalletMezoTestnet, okxWalletMezoMainnet, okxWalletMezoTestnet, xverseWalletMezoMainnet, xverseWalletMezoTestnet, getDefaultWallets, getConfig, } from "./config";
|
|
2
3
|
export * from "./constants";
|
|
3
4
|
export * from "./hooks";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mezo-org/passport",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"scripts": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"typescript": "^5.8.2"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@mezo-org/mezo-clay": "0.1.0-dev.37",
|
|
40
41
|
"@mezo-org/mezod-contracts": "^1.0.0",
|
|
41
42
|
"@mezo-org/musd-contracts": "^1.0.1",
|
|
42
43
|
"@mezo-org/orangekit": "1.0.0-beta.40",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Block, BlockProps } from "@mezo-org/mezo-clay"
|
|
2
|
+
import React, { SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
function DefaultAvatar(props: SVGProps<SVGSVGElement>) {
|
|
5
|
+
return (
|
|
6
|
+
<svg viewBox="0 0 214 214" fill="none" {...props}>
|
|
7
|
+
<rect y="-0.478027" width="166.379" height="81.7091" fill="#FF004D" />
|
|
8
|
+
<rect x="166" y="-0.478027" width="48" height="82" fill="black" />
|
|
9
|
+
<rect
|
|
10
|
+
x="166.379"
|
|
11
|
+
y="81.231"
|
|
12
|
+
width="24.1044"
|
|
13
|
+
height="132.291"
|
|
14
|
+
fill="#DFFF80"
|
|
15
|
+
/>
|
|
16
|
+
<rect
|
|
17
|
+
x="118.758"
|
|
18
|
+
y="81.231"
|
|
19
|
+
width="24.1044"
|
|
20
|
+
height="132.291"
|
|
21
|
+
fill="#FF5500"
|
|
22
|
+
/>
|
|
23
|
+
<rect
|
|
24
|
+
x="71.1372"
|
|
25
|
+
y="81.231"
|
|
26
|
+
width="24.1044"
|
|
27
|
+
height="132.291"
|
|
28
|
+
fill="#5A59A7"
|
|
29
|
+
/>
|
|
30
|
+
<rect
|
|
31
|
+
x="23.5166"
|
|
32
|
+
y="81.231"
|
|
33
|
+
width="24.1044"
|
|
34
|
+
height="132.291"
|
|
35
|
+
fill="#47B5FF"
|
|
36
|
+
/>
|
|
37
|
+
<rect y="81.231" width="23.5165" height="132.291" fill="#A3C238" />
|
|
38
|
+
<rect
|
|
39
|
+
x="190.483"
|
|
40
|
+
y="81.231"
|
|
41
|
+
width="23.5165"
|
|
42
|
+
height="132.291"
|
|
43
|
+
fill="#6E6E70"
|
|
44
|
+
/>
|
|
45
|
+
<rect
|
|
46
|
+
x="142.863"
|
|
47
|
+
y="81.231"
|
|
48
|
+
width="23.5165"
|
|
49
|
+
height="132.291"
|
|
50
|
+
fill="#0A3C01"
|
|
51
|
+
/>
|
|
52
|
+
<rect
|
|
53
|
+
x="95.2417"
|
|
54
|
+
y="81.231"
|
|
55
|
+
width="23.5165"
|
|
56
|
+
height="132.291"
|
|
57
|
+
fill="#F2A91F"
|
|
58
|
+
/>
|
|
59
|
+
<rect
|
|
60
|
+
x="47.6211"
|
|
61
|
+
y="81.231"
|
|
62
|
+
width="23.5165"
|
|
63
|
+
height="132.291"
|
|
64
|
+
fill="#6B3D01"
|
|
65
|
+
/>
|
|
66
|
+
</svg>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function DefaultAvatarComponent(props: BlockProps) {
|
|
71
|
+
return <Block as={DefaultAvatar} {...props} />
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default DefaultAvatarComponent
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Icon, IconProps } from "@mezo-org/mezo-clay"
|
|
2
|
+
import React, { forwardRef, Ref } from "react"
|
|
3
|
+
|
|
4
|
+
function EditIcon(props: IconProps, ref: Ref<SVGSVGElement>) {
|
|
5
|
+
const { title, size = 16, color = "black", ...restProps } = props
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<Icon
|
|
9
|
+
ref={ref}
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
title={title ?? "Edit"}
|
|
12
|
+
size={size}
|
|
13
|
+
color={color}
|
|
14
|
+
role="graphics-symbol"
|
|
15
|
+
{...restProps}
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
d="M18 10L21 7L17 3L14 6M18 10L8 20H4V16L14 6M18 10L14 6"
|
|
19
|
+
stroke={color}
|
|
20
|
+
strokeWidth="2"
|
|
21
|
+
strokeLinecap="round"
|
|
22
|
+
strokeLinejoin="round"
|
|
23
|
+
fill="none"
|
|
24
|
+
/>
|
|
25
|
+
</Icon>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const ForwardedEditIcon: React.ForwardRefExoticComponent<
|
|
30
|
+
IconProps & React.RefAttributes<SVGSVGElement>
|
|
31
|
+
> = forwardRef<SVGSVGElement, IconProps>(EditIcon)
|
|
32
|
+
|
|
33
|
+
export default ForwardedEditIcon
|