@namehash/namehash-ui 0.0.0-next-20260119132859 → 0.0.0-next-20260120091912
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/index.cjs +29 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1602 -2
- package/dist/index.d.ts +1602 -2
- package/dist/index.js +29 -15
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -2194,12 +2194,14 @@ __export(index_exports, {
|
|
|
2194
2194
|
IdentityLink: () => IdentityLink,
|
|
2195
2195
|
IdentityTooltip: () => IdentityTooltip,
|
|
2196
2196
|
InfoIcon: () => InfoIcon,
|
|
2197
|
+
LabeledField: () => LabeledField,
|
|
2197
2198
|
NameDisplay: () => NameDisplay,
|
|
2198
2199
|
RegistrarActionCard: () => RegistrarActionCard,
|
|
2199
2200
|
RegistrarActionCardLoading: () => RegistrarActionCardLoading,
|
|
2200
2201
|
RegistrarActionCardMemo: () => RegistrarActionCardMemo,
|
|
2201
2202
|
RelativeTime: () => RelativeTime,
|
|
2202
2203
|
ResolveAndDisplayIdentity: () => ResolveAndDisplayIdentity,
|
|
2204
|
+
SUPPORTED_CHAINS: () => SUPPORTED_CHAINS,
|
|
2203
2205
|
TelegramIcon: () => TelegramIcon,
|
|
2204
2206
|
TwitterIcon: () => TwitterIcon,
|
|
2205
2207
|
formatRelativeTime: () => formatRelativeTime,
|
|
@@ -2212,6 +2214,7 @@ __export(index_exports, {
|
|
|
2212
2214
|
getEnsManagerNameDetailsUrl: () => getEnsManagerNameDetailsUrl,
|
|
2213
2215
|
getEnsManagerUrl: () => getEnsManagerUrl,
|
|
2214
2216
|
getEnsMetadataServiceAvatarUrl: () => getEnsMetadataServiceAvatarUrl,
|
|
2217
|
+
useIsMobile: () => useIsMobile,
|
|
2215
2218
|
useNow: () => useNow
|
|
2216
2219
|
});
|
|
2217
2220
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -4290,7 +4293,7 @@ var SUPPORTED_CHAINS = [
|
|
|
4290
4293
|
];
|
|
4291
4294
|
var CUSTOM_CHAIN_NAMES = /* @__PURE__ */ new Map([
|
|
4292
4295
|
[import_datasources2.ensTestEnvL1Chain.id, "Ethereum Local (ens-test-env)"],
|
|
4293
|
-
[mainnet.id, "
|
|
4296
|
+
[mainnet.id, "Mainnet"],
|
|
4294
4297
|
[sepolia.id, "Ethereum Sepolia"],
|
|
4295
4298
|
[base.id, "Base"],
|
|
4296
4299
|
[baseSepolia.id, "Base Sepolia"],
|
|
@@ -5537,8 +5540,8 @@ var IdentityTooltip = ({
|
|
|
5537
5540
|
{
|
|
5538
5541
|
value: identity.address,
|
|
5539
5542
|
className: "nhui:text-gray-500 nhui:hover:text-gray-700 nhui:transition-colors",
|
|
5540
|
-
successIcon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react.CheckIcon, { className: "nhui:h-4 nhui:w-4" }),
|
|
5541
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react.CopyIcon, { className: "nhui:h-4 nhui:w-4" }),
|
|
5543
|
+
successIcon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react.CheckIcon, { className: "nhui:h-4 nhui:w-4", style: { fill: "none" } }),
|
|
5544
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react.CopyIcon, { className: "nhui:h-4 nhui:w-4", style: { fill: "none" } }),
|
|
5542
5545
|
showToast: true
|
|
5543
5546
|
}
|
|
5544
5547
|
),
|
|
@@ -5580,17 +5583,17 @@ var import_ensnode_sdk5 = require("@ensnode/ensnode-sdk");
|
|
|
5580
5583
|
// src/hooks/useIsMobile.tsx
|
|
5581
5584
|
var React5 = __toESM(require("react"), 1);
|
|
5582
5585
|
var MOBILE_BREAKPOINT = 640;
|
|
5583
|
-
function useIsMobile() {
|
|
5586
|
+
function useIsMobile(breakpoint = MOBILE_BREAKPOINT) {
|
|
5584
5587
|
const [isMobile, setIsMobile] = React5.useState(void 0);
|
|
5585
5588
|
React5.useEffect(() => {
|
|
5586
|
-
const mql = window.matchMedia(`(max-width: ${
|
|
5589
|
+
const mql = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
|
|
5587
5590
|
const onChange = () => {
|
|
5588
|
-
setIsMobile(window.innerWidth <
|
|
5591
|
+
setIsMobile(window.innerWidth < breakpoint);
|
|
5589
5592
|
};
|
|
5590
5593
|
mql.addEventListener("change", onChange);
|
|
5591
|
-
setIsMobile(window.innerWidth <
|
|
5594
|
+
setIsMobile(window.innerWidth < breakpoint);
|
|
5592
5595
|
return () => mql.removeEventListener("change", onChange);
|
|
5593
|
-
}, []);
|
|
5596
|
+
}, [breakpoint]);
|
|
5594
5597
|
return !!isMobile;
|
|
5595
5598
|
}
|
|
5596
5599
|
|
|
@@ -5746,7 +5749,11 @@ var import_lucide_react2 = require("lucide-react");
|
|
|
5746
5749
|
var import_react4 = require("react");
|
|
5747
5750
|
var import_ensnode_sdk6 = require("@ensnode/ensnode-sdk");
|
|
5748
5751
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5749
|
-
function LabeledField({
|
|
5752
|
+
function LabeledField({
|
|
5753
|
+
fieldLabel,
|
|
5754
|
+
className,
|
|
5755
|
+
children
|
|
5756
|
+
}) {
|
|
5750
5757
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5751
5758
|
"div",
|
|
5752
5759
|
{
|
|
@@ -5767,6 +5774,7 @@ function ResolveAndDisplayReferrerIdentity({
|
|
|
5767
5774
|
referral,
|
|
5768
5775
|
accelerate = true,
|
|
5769
5776
|
withLink = true,
|
|
5777
|
+
getReferrerLink,
|
|
5770
5778
|
withTooltip = true,
|
|
5771
5779
|
withAvatar = false,
|
|
5772
5780
|
withIdentifier = true,
|
|
@@ -5796,7 +5804,7 @@ function ResolveAndDisplayReferrerIdentity({
|
|
|
5796
5804
|
TooltipContent,
|
|
5797
5805
|
{
|
|
5798
5806
|
side: "top",
|
|
5799
|
-
className: "nhui:bg-gray-50 nhui:text-sm nhui:text-black nhui:text-left nhui:shadow-md nhui:outline-hidden nhui:w-fit",
|
|
5807
|
+
className: "nhui:bg-gray-50 nhui:text-sm nhui:text-black nhui:text-left nhui:shadow-md nhui:outline-hidden nhui:w-fit [&_svg]:fill-gray-50 [&_svg]:bg-gray-50",
|
|
5800
5808
|
children: [
|
|
5801
5809
|
"Encoded referrer",
|
|
5802
5810
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("code", { className: "nhui:block", children: referral.encodedReferrer }),
|
|
@@ -5821,7 +5829,7 @@ function ResolveAndDisplayReferrerIdentity({
|
|
|
5821
5829
|
withLink,
|
|
5822
5830
|
identityLinkDetails: {
|
|
5823
5831
|
isExternal: true,
|
|
5824
|
-
link:
|
|
5832
|
+
link: getReferrerLink(referrerIdentity.address, namespaceId)
|
|
5825
5833
|
}
|
|
5826
5834
|
}
|
|
5827
5835
|
);
|
|
@@ -5863,6 +5871,10 @@ function RegistrarActionCard({
|
|
|
5863
5871
|
namedRegistrarAction,
|
|
5864
5872
|
now,
|
|
5865
5873
|
links,
|
|
5874
|
+
showIdentityTooltips = {
|
|
5875
|
+
registrant: false,
|
|
5876
|
+
referrer: false
|
|
5877
|
+
},
|
|
5866
5878
|
showReferrer = true,
|
|
5867
5879
|
referralProgramField
|
|
5868
5880
|
}) {
|
|
@@ -5922,7 +5934,7 @@ function RegistrarActionCard({
|
|
|
5922
5934
|
identity: registrantIdentity,
|
|
5923
5935
|
namespaceId,
|
|
5924
5936
|
withAvatar: true,
|
|
5925
|
-
withTooltip:
|
|
5937
|
+
withTooltip: showIdentityTooltips.registrant,
|
|
5926
5938
|
withIdentifier: false,
|
|
5927
5939
|
identityLinkDetails: links.registrant
|
|
5928
5940
|
}
|
|
@@ -5933,7 +5945,7 @@ function RegistrarActionCard({
|
|
|
5933
5945
|
identity: registrantIdentity,
|
|
5934
5946
|
namespaceId,
|
|
5935
5947
|
withAvatar: isMobile,
|
|
5936
|
-
withTooltip:
|
|
5948
|
+
withTooltip: showIdentityTooltips.registrant,
|
|
5937
5949
|
className: "nhui:font-medium nhui:sm:max-[1220px]:max-w-[110px] nhui:min-[1220px]:max-w-[140px]",
|
|
5938
5950
|
identityLinkDetails: links.registrant
|
|
5939
5951
|
}
|
|
@@ -5948,7 +5960,8 @@ function RegistrarActionCard({
|
|
|
5948
5960
|
referral,
|
|
5949
5961
|
withAvatar: true,
|
|
5950
5962
|
withIdentifier: false,
|
|
5951
|
-
withTooltip:
|
|
5963
|
+
withTooltip: showIdentityTooltips.referrer,
|
|
5964
|
+
getReferrerLink: links.referrerLinkFunction
|
|
5952
5965
|
}
|
|
5953
5966
|
),
|
|
5954
5967
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(LabeledField, { fieldLabel: "Referrer", className: "nhui:w-[15%] nhui:min-w-[110px]", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
@@ -5959,7 +5972,8 @@ function RegistrarActionCard({
|
|
|
5959
5972
|
referral,
|
|
5960
5973
|
withAvatar: isMobile,
|
|
5961
5974
|
withIdentifier: true,
|
|
5962
|
-
withTooltip:
|
|
5975
|
+
withTooltip: showIdentityTooltips.referrer,
|
|
5976
|
+
getReferrerLink: links.referrerLinkFunction
|
|
5963
5977
|
}
|
|
5964
5978
|
) })
|
|
5965
5979
|
] }),
|